Prepare V0.2
This commit is contained in:
@@ -41,7 +41,6 @@ LYRICS_FILENAME = 'LYRICS_FILENAME'
|
||||
ALWAYS_CHECK_LYRICS = 'ALWAYS_CHECK_LYRICS'
|
||||
LYRICS_MD_HEADER = 'LYRICS_MD_HEADER'
|
||||
MD_SAVE_LYRICS = 'MD_SAVE_LYRICS'
|
||||
UNIQUE_LYRICS_FILE = 'UNIQUE_LYRICS_FILE'
|
||||
LOCALE = 'LOCALE'
|
||||
|
||||
CONFIG_VALUES = {
|
||||
@@ -58,7 +57,6 @@ CONFIG_VALUES = {
|
||||
ALWAYS_CHECK_LYRICS: { 'default': 'False', 'type': bool, 'arg': '--always-check-lyrics' },
|
||||
LYRICS_MD_HEADER: { 'default': 'False', 'type': bool, 'arg': '--lyrics-md-header' },
|
||||
MD_SAVE_LYRICS: { 'default': 'True', 'type': bool, 'arg': '--md-save-lyrics' },
|
||||
UNIQUE_LYRICS_FILE: { 'default': 'False', 'type': bool, 'arg': '--unique-file' },
|
||||
MD_SAVE_GENRES: { 'default': 'False', 'type': bool, 'arg': '--md-save-genres' },
|
||||
MD_ALLGENRES: { 'default': 'False', 'type': bool, 'arg': '--md-allgenres' },
|
||||
MD_GENREDELIMITER: { 'default': ',', 'type': str, 'arg': '--md-genredelimiter' },
|
||||
@@ -239,10 +237,6 @@ class Config:
|
||||
def get_save_lyrics_tags(cls) -> bool:
|
||||
return cls.get(MD_SAVE_LYRICS)
|
||||
|
||||
@classmethod
|
||||
def get_unique_lyrics_file(cls) -> bool:
|
||||
return cls.get(UNIQUE_LYRICS_FILE)
|
||||
|
||||
@classmethod
|
||||
def get_bulk_wait_time(cls) -> int:
|
||||
return cls.get(BULK_WAIT_TIME)
|
||||
|
||||
@@ -338,10 +338,7 @@ def download_track(mode: str, track_id: str, extra_keys=None, disable_progressba
|
||||
lyr_name = lyr_name.replace('{artist}', fix_filename(artists[0]))
|
||||
lyr_name = lyr_name.replace('{song_name}', fix_filename(name))
|
||||
lyr_name = lyr_name.replace('{album}', fix_filename(album_name))
|
||||
if Zotify.CONFIG.get_unique_lyrics_file():
|
||||
lrc_path = PurePath(lyr_dir).joinpath("lyrics.lrc")
|
||||
else:
|
||||
lrc_path = PurePath(lyr_dir).joinpath(f"{lyr_name}.lrc")
|
||||
lrc_path = PurePath(lyr_dir).joinpath(f"{lyr_name}.lrc")
|
||||
get_song_lyrics(track_id, lrc_path, title=name, artists=artists, album=album_name, duration_ms=duration_ms)
|
||||
except ValueError:
|
||||
Printer.print(PrintChannel.SKIPS, f"### LYRICS_UNAVAILABLE: Lyrics for {song_name} not available or API returned empty/errored response ###")
|
||||
|
||||
@@ -125,7 +125,7 @@ class Zotify:
|
||||
time.sleep(5)
|
||||
return cls.invoke_url(url, tryCount + 1)
|
||||
|
||||
Printer.print(PrintChannel.API_ERRORS, f"Spotify API Error ({responsejson['error']['status']}): {responsejson['error']['message']}")
|
||||
# Printer.print(PrintChannel.API_ERRORS, f"Spotify API Error ({responsejson['error']['status']}): {responsejson['error']['message']}")
|
||||
|
||||
return responsetext, responsejson
|
||||
|
||||
|
||||
Reference in New Issue
Block a user