diff options
author | Malte Jürgens | 2022-04-26 13:24:16 +0000 |
---|---|---|
committer | Malte Jürgens | 2022-04-26 13:24:16 +0000 |
commit | 8e82024cdb1fde8e2dd8a7bfbe0c2450759b89c2 (patch) | |
tree | 90652e0b5ad2ee5f534dc73cf19e7c6028a57bd3 | |
parent | 47467c1c4aa37344c14bcdc0292bd8b61d6b06e9 (diff) | |
download | aur-8e82024cdb1fde8e2dd8a7bfbe0c2450759b89c2.tar.gz |
fix patch
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 2 | ||||
-rw-r--r-- | zspotify-paths.patch | 38 |
3 files changed, 25 insertions, 17 deletions
@@ -1,7 +1,7 @@ pkgbase = zspotify pkgdesc = A Spotify downloader needing only a python interpreter and ffmpeg. pkgver = 0.5.2 - pkgrel = 1 + pkgrel = 2 url = https://github.com/afkcodes/zspotify arch = x86_64 license = GPL3 @@ -2,7 +2,7 @@ pkgname=zspotify pkgver=0.5.2 -pkgrel=1 +pkgrel=2 pkgdesc="A Spotify downloader needing only a python interpreter and ffmpeg." arch=("x86_64") url="https://github.com/afkcodes/zspotify" diff --git a/zspotify-paths.patch b/zspotify-paths.patch index 6888bb1f5534..c23786565622 100644 --- a/zspotify-paths.patch +++ b/zspotify-paths.patch @@ -20,25 +20,16 @@ SKIP_EXISTING_FILES: { 'default': 'True', 'type': bool, 'arg': '--skip-existing-files' }, SKIP_PREVIOUSLY_DOWNLOADED: { 'default': 'False', 'type': bool, 'arg': '--skip-previously-downloaded' }, RETRY_ATTEMPTS: { 'default': '5', 'type': int, 'arg': '--retry-attemps' }, -@@ -43,14 +43,14 @@ CONFIG_VALUES = { - FORCE_PREMIUM: { 'default': 'False', 'type': bool, 'arg': '--force-premium' }, - ANTI_BAN_WAIT_TIME: { 'default': '1', 'type': int, 'arg': '--anti-ban-wait-time' }, - OVERRIDE_AUTO_WAIT: { 'default': 'False', 'type': bool, 'arg': '--override-auto-wait' }, -- CHUNK_SIZE: { 'default': '50000', 'type': int, 'arg': '--chunk-size' }, -+ CHUNK_SIZE: { 'default': 50000, 'type': int, 'arg': '--chunk-size' }, - SPLIT_ALBUM_DISCS: { 'default': 'False', 'type': bool, 'arg': '--split-album-discs' }, - DOWNLOAD_REAL_TIME: { 'default': 'False', 'type': bool, 'arg': '--download-real-time' }, +@@ -49,7 +49,7 @@ CONFIG_VALUES = { LANGUAGE: { 'default': 'en', 'type': str, 'arg': '--language' }, BITRATE: { 'default': '', 'type': str, 'arg': '--bitrate' }, SONG_ARCHIVE: { 'default': '.song_archive', 'type': str, 'arg': '--song-archive' }, - CREDENTIALS_LOCATION: { 'default': 'credentials.json', 'type': str, 'arg': '--credentials-location' }, -- OUTPUT: { 'default': '', 'type': str, 'arg': '--output' }, + CREDENTIALS_LOCATION: { 'default': '~/.local/share/zspotify/credentials.json', 'type': str, 'arg': '--credentials-location' }, -+ OUTPUT: { 'default': '{artist} - {song_name}.ogg','type': str, 'arg': '--output' }, + OUTPUT: { 'default': '', 'type': str, 'arg': '--output' }, PRINT_SPLASH: { 'default': 'False', 'type': bool, 'arg': '--print-splash' }, PRINT_SKIPS: { 'default': 'True', 'type': bool, 'arg': '--print-skips' }, - PRINT_DOWNLOAD_PROGRESS: { 'default': 'True', 'type': bool, 'arg': '--print-download-progress' }, -@@ -82,11 +82,12 @@ class Config: +@@ -82,21 +82,21 @@ class Config: if args.config_location: config_fp = args.config_location @@ -51,8 +42,25 @@ + os.makedirs(os.path.dirname(true_config_file_path), exist_ok=True) with open(true_config_file_path, 'w', encoding='utf-8') as config_file: json.dump(cls.get_default_json(), config_file, indent=4) - cls.Values = cls.get_default_json() -@@ -142,11 +143,11 @@ class Config: +- cls.Values = cls.get_default_json() +- else: +- with open(true_config_file_path, encoding='utf-8') as config_file: +- jsonvalues = json.load(config_file) +- cls.Values = {} +- for key in CONFIG_VALUES: +- if key in jsonvalues: +- cls.Values[key] = cls.parse_arg_value(key, jsonvalues[key]) ++ ++ with open(true_config_file_path, encoding='utf-8') as config_file: ++ jsonvalues = json.load(config_file) ++ cls.Values = {} ++ for key in CONFIG_VALUES: ++ if key in jsonvalues: ++ cls.Values[key] = cls.parse_arg_value(key, jsonvalues[key]) + + # Add default values for missing keys + +@@ -142,11 +142,11 @@ class Config: @classmethod def get_root_path(cls) -> str: @@ -66,7 +74,7 @@ @classmethod def get_skip_existing_files(cls) -> bool: -@@ -194,17 +195,17 @@ class Config: +@@ -194,17 +194,17 @@ class Config: @classmethod def get_song_archive(cls) -> str: |