Added search continuous scrolling

This commit is contained in:
RemixDev 2020-04-09 16:06:33 +02:00
parent 05ef2a6fba
commit 4b2d9a15f9
2 changed files with 8 additions and 7 deletions

View File

@ -202,7 +202,7 @@ class Deezer:
tracks_array.append(track)
return tracks_array
def search_gw(self, term):
def search_main_gw(self, term):
results = self.gw_api_call('deezer.pageSearch', {"query": term, "start": 0, "nb": 40, "suggest": True, "artist_suggest": True, "top_tracks": True})['results']
order = []
for x in results['ORDER']:
@ -211,6 +211,9 @@ class Deezer:
results['ORDER'] = order
return results
def search_gw(self, term, type, start, nb=20):
return self.gw_api_call('search.music', {"query": term, "filter":"ALL", "output":type, "start": start, "nb": nb})['results']
def get_lyrics_gw(self, sng_id):
return self.gw_api_call('song.getLyrics', {'sng_id': sng_id})["results"]

View File

@ -37,13 +37,11 @@ def initialize():
login()
return True
def search(term, type):
result = dz.search(term, type)
print(result)
return result
def mainSearch(term):
return dz.search_gw(term)
return dz.search_main_gw(term)
def search(term, type, start, nb):
return dz.search_gw(term, type, start, nb)
def downloadLink(url, bitrate=None):
global settings