parent
808af1c01f
commit
032845f394
|
@ -84,7 +84,7 @@ class QueueManager:
|
|||
albumAPI['nb_disk'] = albumAPI_gw['NUMBER_DISK']
|
||||
albumAPI['copyright'] = albumAPI_gw['COPYRIGHT']
|
||||
if albumAPI['nb_tracks'] == 1:
|
||||
return generateQueueItem(dz, sp, f"https://www.deezer.com/track/{albumAPI['tracks']['data'][0]['id']}",
|
||||
return self.generateQueueItem(dz, sp, f"https://www.deezer.com/track/{albumAPI['tracks']['data'][0]['id']}",
|
||||
settings, bitrate, albumAPI)
|
||||
tracksArray = dz.get_album_tracks_gw(id)
|
||||
if albumAPI['nb_tracks'] == 255:
|
||||
|
@ -174,7 +174,7 @@ class QueueManager:
|
|||
artistAPITracks = dz.get_artist_albums(id)
|
||||
albumList = []
|
||||
for album in artistAPITracks['data']:
|
||||
albumList.append(generateQueueItem(dz, sp, album['link'], settings, bitrate))
|
||||
albumList.append(self.generateQueueItem(dz, sp, album['link'], settings, bitrate))
|
||||
|
||||
if interface:
|
||||
interface.send("finishAddingArtist", {'name': artistAPI['name'], 'id': artistAPI['id']})
|
||||
|
@ -196,7 +196,7 @@ class QueueManager:
|
|||
for type in artistDiscographyAPI:
|
||||
if type != 'all':
|
||||
for album in artistDiscographyAPI[type]:
|
||||
albumList.append(generateQueueItem(dz, sp, album['link'], settings, bitrate))
|
||||
albumList.append(self.generateQueueItem(dz, sp, album['link'], settings, bitrate))
|
||||
|
||||
if interface:
|
||||
interface.send("finishAddingArtist", {'name': artistAPI['name'], 'id': artistAPI['id']})
|
||||
|
@ -278,7 +278,7 @@ class QueueManager:
|
|||
return QueueError(url, "Wrong URL: "+e.msg[e.msg.find('\n')+2:])
|
||||
|
||||
if track_id != 0:
|
||||
return generateQueueItem(dz, sp, f'https://www.deezer.com/track/{track_id}', settings, bitrate)
|
||||
return self.generateQueueItem(dz, sp, f'https://www.deezer.com/track/{track_id}', settings, bitrate)
|
||||
else:
|
||||
logger.warn("Track not found on deezer!")
|
||||
return QueueError(url, "Track not found on deezer!", "trackNotOnDeezer")
|
||||
|
@ -294,7 +294,7 @@ class QueueManager:
|
|||
return QueueError(url, "Wrong URL: "+e.msg[e.msg.find('\n')+2:])
|
||||
|
||||
if album_id != 0:
|
||||
return generateQueueItem(dz, sp, f'https://www.deezer.com/album/{album_id}', settings, bitrate)
|
||||
return self.generateQueueItem(dz, sp, f'https://www.deezer.com/album/{album_id}', settings, bitrate)
|
||||
else:
|
||||
logger.warn("Album not found on deezer!")
|
||||
return QueueError(url, "Album not found on deezer!", "albumNotOnDeezer")
|
||||
|
|
Loading…
Reference in New Issue