Fixed download of tracks with no explicit data
This commit is contained in:
parent
7a932c376b
commit
a6f5b75577
|
@ -107,7 +107,7 @@ class QueueManager:
|
|||
trackAPI['FILENAME_TEMPLATE'] = settings['albumTracknameTemplate']
|
||||
collection.append(trackAPI)
|
||||
|
||||
explicit = albumAPI_gw['EXPLICIT_ALBUM_CONTENT']['EXPLICIT_LYRICS_STATUS'] in [LyricsStatus.EXPLICIT, LyricsStatus.PARTIALLY_EXPLICIT]
|
||||
explicit = albumAPI_gw.get('EXPLICIT_ALBUM_CONTENT', {}).get('EXPLICIT_LYRICS_STATUS', LyricsStatus.UNKNOWN) in [LyricsStatus.EXPLICIT, LyricsStatus.PARTIALLY_EXPLICIT]
|
||||
|
||||
return QICollection(
|
||||
id=id,
|
||||
|
@ -151,7 +151,7 @@ class QueueManager:
|
|||
playlistAPI['nb_tracks'] = totalSize
|
||||
collection = []
|
||||
for pos, trackAPI in enumerate(playlistTracksAPI, start=1):
|
||||
if trackAPI['EXPLICIT_TRACK_CONTENT'].get('EXPLICIT_LYRICS_STATUS', LyricsStatus.UNKNOWN) in [LyricsStatus.EXPLICIT, LyricsStatus.PARTIALLY_EXPLICIT]:
|
||||
if trackAPI.get('EXPLICIT_TRACK_CONTENT', {}).get('EXPLICIT_LYRICS_STATUS', LyricsStatus.UNKNOWN) in [LyricsStatus.EXPLICIT, LyricsStatus.PARTIALLY_EXPLICIT]:
|
||||
playlistAPI['explicit'] = True
|
||||
trackAPI['_EXTRA_PLAYLIST'] = playlistAPI
|
||||
trackAPI['POSITION'] = pos
|
||||
|
@ -258,7 +258,7 @@ class QueueManager:
|
|||
playlistAPI['nb_tracks'] = totalSize
|
||||
collection = []
|
||||
for pos, trackAPI in enumerate(artistTopTracksAPI_gw, start=1):
|
||||
if trackAPI['EXPLICIT_TRACK_CONTENT'].get('EXPLICIT_LYRICS_STATUS', LyricsStatus.UNKNOWN) in [LyricsStatus.EXPLICIT, LyricsStatus.PARTIALLY_EXPLICIT]:
|
||||
if trackAPI.get('EXPLICIT_TRACK_CONTENT', {}).get('EXPLICIT_LYRICS_STATUS', LyricsStatus.UNKNOWN) in [LyricsStatus.EXPLICIT, LyricsStatus.PARTIALLY_EXPLICIT]:
|
||||
playlistAPI['explicit'] = True
|
||||
trackAPI['_EXTRA_PLAYLIST'] = playlistAPI
|
||||
trackAPI['POSITION'] = pos
|
||||
|
|
|
@ -273,8 +273,7 @@ class Track:
|
|||
self.album['recordType'] = "album"
|
||||
self.album['label'] = albumAPI_gw.get('LABEL_NAME', self.album['label'])
|
||||
|
||||
if albumAPI_gw.get('EXPLICIT_ALBUM_CONTENT') and albumAPI_gw['EXPLICIT_ALBUM_CONTENT'].get('EXPLICIT_LYRICS_STATUS'):
|
||||
explicitLyricsStatus = albumAPI_gw['EXPLICIT_ALBUM_CONTENT']['EXPLICIT_LYRICS_STATUS']
|
||||
explicitLyricsStatus = albumAPI_gw.get('EXPLICIT_ALBUM_CONTENT', {}).get('EXPLICIT_LYRICS_STATUS', LyricsStatus.UNKNOWN)
|
||||
self.album['explicit'] = explicitLyricsStatus in [LyricsStatus.EXPLICIT, LyricsStatus.PARTIALLY_EXPLICIT]
|
||||
|
||||
if not self.album['pic']:
|
||||
|
|
Loading…
Reference in New Issue