[PromoDJ] Fix page size for playlists

This commit is contained in:
DmitryScaletta 2024-02-15 12:39:46 +03:00
parent e6f3e6de0e
commit 7e96492ba0
No known key found for this signature in database
GPG Key ID: 167A65222EDD4C2A

View File

@ -521,10 +521,10 @@ class PromoDJPlaylistIE(PromoDJBaseIE):
_ALLOWED_MEDIA_CATS = ['music', 'video']
def _get_page_size(self, url):
if '/uenno' in url:
def _get_page_size(self, type):
if type == 'uenno':
return 15
if '/groups/' in url:
if type == 'groups':
return 30
return 20
@ -536,7 +536,7 @@ def _real_extract(self, url):
entries = OnDemandPagedList(
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)