Checks config; other changes

This commit is contained in:
localhost_frssoft 2022-11-10 02:23:18 +03:00
parent 097051cdef
commit fba68e7a70
4 changed files with 37 additions and 66 deletions

View file

@ -41,6 +41,9 @@ def play_artist(artist_id):
storage = {}
if tracks_count > 50:
print(f'Loading {tracks_count} tracks...')
elif tracks_count == 0:
logger.warning('Empty tracks. Nothing to do')
return
while True:
tracks_results = tracks.get('results')
tracks_next = tracks.get('next')
@ -52,4 +55,5 @@ def play_artist(artist_id):
tracks = get_tracks(artist=artist_id, include_channels=True, pg=tracks_next)
else:
break
player_menu("Artist playing...", storage)
artist_name = tracks.get('results')[0].get('artist').get('name')
player_menu(f"Artist {artist_name} playing...", storage)