[PromoDJ] Fix page size for playlists

pull/9200/head
DmitryScaletta 10 months ago
parent e6f3e6de0e
commit 7e96492ba0
No known key found for this signature in database
GPG Key ID: 167A65222EDD4C2A

@ -521,10 +521,10 @@ class PromoDJPlaylistIE(PromoDJBaseIE):
_ALLOWED_MEDIA_CATS = ['music', 'video'] _ALLOWED_MEDIA_CATS = ['music', 'video']
def _get_page_size(self, url): def _get_page_size(self, type):
if '/uenno' in url: if type == 'uenno':
return 15 return 15
if '/groups/' in url: if type == 'groups':
return 30 return 30
return 20 return 20
@ -536,7 +536,7 @@ class PromoDJPlaylistIE(PromoDJBaseIE):
entries = OnDemandPagedList( entries = OnDemandPagedList(
functools.partial(self._fetch_page, url, self._ALLOWED_MEDIA_CATS, playlist_id), functools.partial(self._fetch_page, url, self._ALLOWED_MEDIA_CATS, playlist_id),
self._get_page_size(url)) self._get_page_size(type))
return self.playlist_result(entries, playlist_id=playlist_id) return self.playlist_result(entries, playlist_id=playlist_id)

Loading…
Cancel
Save