Removed dz as first parameter
This commit is contained in:
parent
bd8a1948d4
commit
9c49bf5d23
|
@ -33,3 +33,4 @@ yarn-error.log*
|
||||||
/build
|
/build
|
||||||
/*egg-info
|
/*egg-info
|
||||||
updatePyPi.sh
|
updatePyPi.sh
|
||||||
|
/deezer
|
||||||
|
|
|
@ -14,9 +14,9 @@ class cli(deemix):
|
||||||
for link in url:
|
for link in url:
|
||||||
if ';' in link:
|
if ';' in link:
|
||||||
for l in link.split(";"):
|
for l in link.split(";"):
|
||||||
self.qm.addToQueue(self.dz, l, self.set.settings, bitrate)
|
self.qm.addToQueue(l, self.set.settings, bitrate)
|
||||||
else:
|
else:
|
||||||
self.qm.addToQueue(self.dz, link, self.set.settings, bitrate)
|
self.qm.addToQueue(link, self.set.settings, bitrate)
|
||||||
|
|
||||||
def requestValidArl(self):
|
def requestValidArl(self):
|
||||||
while True:
|
while True:
|
||||||
|
|
|
@ -97,7 +97,7 @@ class QueueManager:
|
||||||
|
|
||||||
# If the album is a single download as a track
|
# If the album is a single download as a track
|
||||||
if albumAPI['nb_tracks'] == 1:
|
if albumAPI['nb_tracks'] == 1:
|
||||||
return self.generateTrackQueueItem(dz, albumAPI['tracks']['data'][0]['id'], settings, bitrate, albumAPI=albumAPI)
|
return self.generateTrackQueueItem(albumAPI['tracks']['data'][0]['id'], settings, bitrate, albumAPI=albumAPI, dz=dz)
|
||||||
|
|
||||||
tracksArray = dz.gw.get_album_tracks(id)
|
tracksArray = dz.gw.get_album_tracks(id)
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ class QueueManager:
|
||||||
allReleases = artistDiscographyAPI.pop('all', [])
|
allReleases = artistDiscographyAPI.pop('all', [])
|
||||||
albumList = []
|
albumList = []
|
||||||
for album in allReleases:
|
for album in allReleases:
|
||||||
albumList.append(self.generateAlbumQueueItem(dz, album['id'], settings, bitrate, rootArtist=rootArtist))
|
albumList.append(self.generateAlbumQueueItem(album['id'], settings, bitrate, rootArtist=rootArtist, dz=dz))
|
||||||
|
|
||||||
if interface: interface.send("finishAddingArtist", {'name': artistAPI['name'], 'id': artistAPI['id']})
|
if interface: interface.send("finishAddingArtist", {'name': artistAPI['name'], 'id': artistAPI['id']})
|
||||||
return albumList
|
return albumList
|
||||||
|
@ -229,7 +229,7 @@ class QueueManager:
|
||||||
albumList = []
|
albumList = []
|
||||||
for type in artistDiscographyAPI:
|
for type in artistDiscographyAPI:
|
||||||
for album in artistDiscographyAPI[type]:
|
for album in artistDiscographyAPI[type]:
|
||||||
albumList.append(self.generateAlbumQueueItem(dz, album['id'], settings, bitrate, rootArtist=rootArtist))
|
albumList.append(self.generateAlbumQueueItem(album['id'], settings, bitrate, rootArtist=rootArtist, dz=dz))
|
||||||
|
|
||||||
if interface: interface.send("finishAddingArtist", {'name': artistAPI['name'], 'id': artistAPI['id']})
|
if interface: interface.send("finishAddingArtist", {'name': artistAPI['name'], 'id': artistAPI['id']})
|
||||||
return albumList
|
return albumList
|
||||||
|
@ -316,17 +316,17 @@ class QueueManager:
|
||||||
return QueueError(url, "URL not recognized", "invalidURL")
|
return QueueError(url, "URL not recognized", "invalidURL")
|
||||||
|
|
||||||
if type == "track":
|
if type == "track":
|
||||||
return self.generateTrackQueueItem(dz, id, settings, bitrate)
|
return self.generateTrackQueueItem(id, settings, bitrate, dz=dz)
|
||||||
elif type == "album":
|
elif type == "album":
|
||||||
return self.generateAlbumQueueItem(dz, id, settings, bitrate)
|
return self.generateAlbumQueueItem(id, settings, bitrate, dz=dz)
|
||||||
elif type == "playlist":
|
elif type == "playlist":
|
||||||
return self.generatePlaylistQueueItem(dz, id, settings, bitrate)
|
return self.generatePlaylistQueueItem(id, settings, bitrate, dz=dz)
|
||||||
elif type == "artist":
|
elif type == "artist":
|
||||||
return self.generateArtistQueueItem(dz, id, settings, bitrate, interface=interface)
|
return self.generateArtistQueueItem(id, settings, bitrate, interface=interface, dz=dz)
|
||||||
elif type == "artistdiscography":
|
elif type == "artistdiscography":
|
||||||
return self.generateArtistDiscographyQueueItem(dz, id, settings, bitrate, interface=interface)
|
return self.generateArtistDiscographyQueueItem(id, settings, bitrate, interface=interface, dz=dz)
|
||||||
elif type == "artisttop":
|
elif type == "artisttop":
|
||||||
return self.generateArtistTopQueueItem(dz, id, settings, bitrate, interface=interface)
|
return self.generateArtistTopQueueItem(id, settings, bitrate, interface=interface, dz=dz)
|
||||||
elif type.startswith("spotify") and self.sp:
|
elif type.startswith("spotify") and self.sp:
|
||||||
if not self.sp.spotifyEnabled:
|
if not self.sp.spotifyEnabled:
|
||||||
logger.warn("Spotify Features is not setted up correctly.")
|
logger.warn("Spotify Features is not setted up correctly.")
|
||||||
|
@ -341,7 +341,7 @@ class QueueManager:
|
||||||
return QueueError(url, "Something went wrong: "+str(e))
|
return QueueError(url, "Something went wrong: "+str(e))
|
||||||
|
|
||||||
if track_id != "0":
|
if track_id != "0":
|
||||||
return self.generateTrackQueueItem(dz, track_id, settings, bitrate, trackAPI=trackAPI)
|
return self.generateTrackQueueItem(track_id, settings, bitrate, trackAPI=trackAPI, dz=dz)
|
||||||
else:
|
else:
|
||||||
logger.warn("Track not found on deezer!")
|
logger.warn("Track not found on deezer!")
|
||||||
return QueueError(url, "Track not found on deezer!", "trackNotOnDeezer")
|
return QueueError(url, "Track not found on deezer!", "trackNotOnDeezer")
|
||||||
|
@ -355,7 +355,7 @@ class QueueManager:
|
||||||
return QueueError(url, "Something went wrong: "+str(e))
|
return QueueError(url, "Something went wrong: "+str(e))
|
||||||
|
|
||||||
if album_id != "0":
|
if album_id != "0":
|
||||||
return self.generateAlbumQueueItem(dz, album_id, settings, bitrate)
|
return self.generateAlbumQueueItem(album_id, settings, bitrate, dz=dz)
|
||||||
else:
|
else:
|
||||||
logger.warn("Album not found on deezer!")
|
logger.warn("Album not found on deezer!")
|
||||||
return QueueError(url, "Album not found on deezer!", "albumNotOnDeezer")
|
return QueueError(url, "Album not found on deezer!", "albumNotOnDeezer")
|
||||||
|
@ -381,7 +381,7 @@ class QueueManager:
|
||||||
link = link.strip()
|
link = link.strip()
|
||||||
if link == "": return False
|
if link == "": return False
|
||||||
logger.info("Generating queue item for: "+link)
|
logger.info("Generating queue item for: "+link)
|
||||||
item = self.generateQueueItem(dz, link, settings, bitrate, interface=interface)
|
item = self.generateQueueItem(link, settings, bitrate, interface=interface, dz=dz)
|
||||||
|
|
||||||
# Add ack to all items
|
# Add ack to all items
|
||||||
if type(item) is list:
|
if type(item) is list:
|
||||||
|
|
Loading…
Reference in New Issue