mirror of
https://github.com/THIS-IS-NOT-A-BACKUP/zspotify.git
synced 2024-11-29 19:24:34 +01:00
Print "No Genres found for song" to own channel
This commit is contained in:
parent
d0e95aace1
commit
5404ccaf9d
@ -30,6 +30,7 @@ TEMP_DOWNLOAD_DIR = 'TEMP_DOWNLOAD_DIR'
|
|||||||
MD_ALLGENRES = 'MD_ALLGENRES'
|
MD_ALLGENRES = 'MD_ALLGENRES'
|
||||||
MD_GENREDELIMITER = 'MD_GENREDELIMITER'
|
MD_GENREDELIMITER = 'MD_GENREDELIMITER'
|
||||||
PRINT_PROGRESS_INFO = 'PRINT_PROGRESS_INFO'
|
PRINT_PROGRESS_INFO = 'PRINT_PROGRESS_INFO'
|
||||||
|
PRINT_WARNINGS = 'PRINT_WARNINGS'
|
||||||
|
|
||||||
CONFIG_VALUES = {
|
CONFIG_VALUES = {
|
||||||
ROOT_PATH: { 'default': '../ZSpotify Music/', 'type': str, 'arg': '--root-path' },
|
ROOT_PATH: { 'default': '../ZSpotify Music/', 'type': str, 'arg': '--root-path' },
|
||||||
@ -55,6 +56,7 @@ CONFIG_VALUES = {
|
|||||||
PRINT_DOWNLOADS: { 'default': 'False', 'type': bool, 'arg': '--print-downloads' },
|
PRINT_DOWNLOADS: { 'default': 'False', 'type': bool, 'arg': '--print-downloads' },
|
||||||
PRINT_API_ERRORS: { 'default': 'False', 'type': bool, 'arg': '--print-api-errors' },
|
PRINT_API_ERRORS: { 'default': 'False', 'type': bool, 'arg': '--print-api-errors' },
|
||||||
PRINT_PROGRESS_INFO: { 'default': 'True', 'type': bool, 'arg': '--print-progress-info' },
|
PRINT_PROGRESS_INFO: { 'default': 'True', 'type': bool, 'arg': '--print-progress-info' },
|
||||||
|
PRINT_WARNINGS: { 'default': 'True', 'type': bool, 'arg': '--print-warnings' },
|
||||||
MD_ALLGENRES: { 'default': 'False', 'type': bool, 'arg': '--md-allgenres' },
|
MD_ALLGENRES: { 'default': 'False', 'type': bool, 'arg': '--md-allgenres' },
|
||||||
MD_GENREDELIMITER: { 'default': ';', 'type': str, 'arg': '--md-genredelimiter' },
|
MD_GENREDELIMITER: { 'default': ';', 'type': str, 'arg': '--md-genredelimiter' },
|
||||||
TEMP_DOWNLOAD_DIR: { 'default': '', 'type': str, 'arg': '--temp-download-dir' }
|
TEMP_DOWNLOAD_DIR: { 'default': '', 'type': str, 'arg': '--temp-download-dir' }
|
||||||
|
@ -10,6 +10,7 @@ class PrintChannel(Enum):
|
|||||||
SKIPS = PRINT_SKIPS
|
SKIPS = PRINT_SKIPS
|
||||||
DOWNLOAD_PROGRESS = PRINT_DOWNLOAD_PROGRESS
|
DOWNLOAD_PROGRESS = PRINT_DOWNLOAD_PROGRESS
|
||||||
ERRORS = PRINT_ERRORS
|
ERRORS = PRINT_ERRORS
|
||||||
|
WARNINGS = PRINT_WARNINGS
|
||||||
DOWNLOADS = PRINT_DOWNLOADS
|
DOWNLOADS = PRINT_DOWNLOADS
|
||||||
API_ERRORS = PRINT_API_ERRORS
|
API_ERRORS = PRINT_API_ERRORS
|
||||||
PROGRESS_INFO = PRINT_PROGRESS_INFO
|
PROGRESS_INFO = PRINT_PROGRESS_INFO
|
||||||
|
@ -58,7 +58,7 @@ def get_song_info(song_id) -> Tuple[List[str], List[str], str, str, Any, Any, An
|
|||||||
genres.append(artistInfo[GENRES][0])
|
genres.append(artistInfo[GENRES][0])
|
||||||
|
|
||||||
if len(genres) == 0:
|
if len(genres) == 0:
|
||||||
Printer.print(PrintChannel.SKIPS, '### No Genre found.')
|
Printer.print(PrintChannel.WARNINGS, '### No Genres found for song ' + info[TRACKS][0][NAME])
|
||||||
genres.append('')
|
genres.append('')
|
||||||
|
|
||||||
album_name = info[TRACKS][0][ALBUM][NAME]
|
album_name = info[TRACKS][0][ALBUM][NAME]
|
||||||
|
Loading…
Reference in New Issue
Block a user