mirror of
https://zotify.xyz/zotify/zotify.git
synced 2024-11-10 01:02:06 +01:00
default to -s
This commit is contained in:
parent
fd4e93df8b
commit
e74dba6344
4 changed files with 14 additions and 2 deletions
|
@ -3,6 +3,7 @@
|
|||
## 0.6.3
|
||||
- Less stupid single format
|
||||
- Fixed error in json fetching
|
||||
- Default to search if no other option is provided
|
||||
|
||||
## v0.6.2
|
||||
- Won't crash if downloading a song with no lyrics and `DOWNLOAD_LYRICS` is set to True
|
||||
|
|
|
@ -25,7 +25,7 @@ def main():
|
|||
parser.add_argument('--password',
|
||||
type=str,
|
||||
help='Account password')
|
||||
group = parser.add_mutually_exclusive_group(required=True)
|
||||
group = parser.add_mutually_exclusive_group(required=False)
|
||||
group.add_argument('urls',
|
||||
type=str,
|
||||
# action='extend',
|
||||
|
|
|
@ -41,13 +41,16 @@ def client(args) -> None:
|
|||
|
||||
else:
|
||||
Printer.print(PrintChannel.ERRORS, f'File {filename} not found.\n')
|
||||
return
|
||||
|
||||
if args.urls:
|
||||
if len(args.urls) > 0:
|
||||
download_from_urls(args.urls)
|
||||
return
|
||||
|
||||
if args.playlist:
|
||||
download_from_user_playlist()
|
||||
return
|
||||
|
||||
if args.liked_songs:
|
||||
for song in get_saved_tracks():
|
||||
|
@ -55,6 +58,7 @@ def client(args) -> None:
|
|||
Printer.print(PrintChannel.SKIPS, '### SKIPPING: SONG DOES NOT EXIST ANYMORE ###' + "\n")
|
||||
else:
|
||||
download_track('liked', song[TRACK][ID])
|
||||
return
|
||||
|
||||
if args.search:
|
||||
if args.search == ' ':
|
||||
|
@ -65,6 +69,13 @@ def client(args) -> None:
|
|||
else:
|
||||
if not download_from_urls([args.search]):
|
||||
search(args.search)
|
||||
return
|
||||
|
||||
else:
|
||||
search_text = ''
|
||||
while len(search_text) == 0:
|
||||
search_text = input('Enter search or URL: ')
|
||||
search(search_text)
|
||||
|
||||
def download_from_urls(urls: list[str]) -> bool:
|
||||
""" Downloads from a list of urls """
|
||||
|
|
|
@ -54,7 +54,7 @@ CONFIG_VALUES = {
|
|||
TRANSCODE_BITRATE: { 'default': 'auto', 'type': str, 'arg': '--transcode-bitrate' },
|
||||
SKIP_EXISTING: { 'default': 'True', 'type': bool, 'arg': '--skip-existing' },
|
||||
SKIP_PREVIOUSLY_DOWNLOADED: { 'default': 'False', 'type': bool, 'arg': '--skip-previously-downloaded' },
|
||||
RETRY_ATTEMPTS: { 'default': '5', 'type': int, 'arg': '--retry-attemps' },
|
||||
RETRY_ATTEMPTS: { 'default': '1', 'type': int, 'arg': '--retry-attemps' },
|
||||
BULK_WAIT_TIME: { 'default': '1', 'type': int, 'arg': '--bulk-wait-time' },
|
||||
OVERRIDE_AUTO_WAIT: { 'default': 'False', 'type': bool, 'arg': '--override-auto-wait' },
|
||||
CHUNK_SIZE: { 'default': '50000', 'type': int, 'arg': '--chunk-size' },
|
||||
|
|
Loading…
Reference in a new issue