Added search continuous scrolling
This commit is contained in:
parent
05ef2a6fba
commit
4b2d9a15f9
|
@ -202,7 +202,7 @@ class Deezer:
|
||||||
tracks_array.append(track)
|
tracks_array.append(track)
|
||||||
return tracks_array
|
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']
|
results = self.gw_api_call('deezer.pageSearch', {"query": term, "start": 0, "nb": 40, "suggest": True, "artist_suggest": True, "top_tracks": True})['results']
|
||||||
order = []
|
order = []
|
||||||
for x in results['ORDER']:
|
for x in results['ORDER']:
|
||||||
|
@ -211,6 +211,9 @@ class Deezer:
|
||||||
results['ORDER'] = order
|
results['ORDER'] = order
|
||||||
return results
|
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):
|
def get_lyrics_gw(self, sng_id):
|
||||||
return self.gw_api_call('song.getLyrics', {'sng_id': sng_id})["results"]
|
return self.gw_api_call('song.getLyrics', {'sng_id': sng_id})["results"]
|
||||||
|
|
||||||
|
|
|
@ -37,13 +37,11 @@ def initialize():
|
||||||
login()
|
login()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def search(term, type):
|
|
||||||
result = dz.search(term, type)
|
|
||||||
print(result)
|
|
||||||
return result
|
|
||||||
|
|
||||||
def mainSearch(term):
|
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):
|
def downloadLink(url, bitrate=None):
|
||||||
global settings
|
global settings
|
||||||
|
|
Loading…
Reference in New Issue