Skip to content

Commit 5404cca

Browse files
committed
Print "No Genres found for song" to own channel
1 parent d0e95aa commit 5404cca

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

zspotify/config.py

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
MD_ALLGENRES = 'MD_ALLGENRES'
3131
MD_GENREDELIMITER = 'MD_GENREDELIMITER'
3232
PRINT_PROGRESS_INFO = 'PRINT_PROGRESS_INFO'
33+
PRINT_WARNINGS = 'PRINT_WARNINGS'
3334

3435
CONFIG_VALUES = {
3536
ROOT_PATH: { 'default': '../ZSpotify Music/', 'type': str, 'arg': '--root-path' },
@@ -55,6 +56,7 @@
5556
PRINT_DOWNLOADS: { 'default': 'False', 'type': bool, 'arg': '--print-downloads' },
5657
PRINT_API_ERRORS: { 'default': 'False', 'type': bool, 'arg': '--print-api-errors' },
5758
PRINT_PROGRESS_INFO: { 'default': 'True', 'type': bool, 'arg': '--print-progress-info' },
59+
PRINT_WARNINGS: { 'default': 'True', 'type': bool, 'arg': '--print-warnings' },
5860
MD_ALLGENRES: { 'default': 'False', 'type': bool, 'arg': '--md-allgenres' },
5961
MD_GENREDELIMITER: { 'default': ';', 'type': str, 'arg': '--md-genredelimiter' },
6062
TEMP_DOWNLOAD_DIR: { 'default': '', 'type': str, 'arg': '--temp-download-dir' }

zspotify/termoutput.py

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class PrintChannel(Enum):
1010
SKIPS = PRINT_SKIPS
1111
DOWNLOAD_PROGRESS = PRINT_DOWNLOAD_PROGRESS
1212
ERRORS = PRINT_ERRORS
13+
WARNINGS = PRINT_WARNINGS
1314
DOWNLOADS = PRINT_DOWNLOADS
1415
API_ERRORS = PRINT_API_ERRORS
1516
PROGRESS_INFO = PRINT_PROGRESS_INFO

zspotify/track.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def get_song_info(song_id) -> Tuple[List[str], List[str], str, str, Any, Any, An
5858
genres.append(artistInfo[GENRES][0])
5959

6060
if len(genres) == 0:
61-
Printer.print(PrintChannel.SKIPS, '### No Genre found.')
61+
Printer.print(PrintChannel.WARNINGS, '### No Genres found for song ' + info[TRACKS][0][NAME])
6262
genres.append('')
6363

6464
album_name = info[TRACKS][0][ALBUM][NAME]

0 commit comments

Comments
 (0)