search: support podcasts and episodes

This commit is contained in:
sigma67 2023-11-11 17:05:13 +01:00
commit 6f80e94424
No known key found for this signature in database
GPG key ID: 1C314227DF0103D0
32 changed files with 175 additions and 37 deletions

View file

@ -5,7 +5,7 @@ from ._utils import *
def get_search_result_type(result_type_local, result_types_local):
if not result_type_local:
return None
result_types = ['artist', 'playlist', 'song', 'video', 'station', 'profile']
result_types = ['artist', 'playlist', 'song', 'video', 'station', 'profile', 'podcast', 'episode']
result_type_local = result_type_local.lower()
# default to album since it's labeled with multiple values ('Single', 'EP', etc.)
if result_type_local not in result_types_local:
@ -207,7 +207,9 @@ def _get_param2(filter):
'albums': 'IY',
'artists': 'Ig',
'playlists': 'Io',
'profiles': 'JY'
'profiles': 'JY',
'podcasts': 'JQ',
'episodes': 'JI'
}
return filter_params[filter]