mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Fix boxsets for dynamic listing
This commit is contained in:
parent
ee23d73848
commit
3297e47ff8
2 changed files with 18 additions and 7 deletions
|
@ -91,18 +91,27 @@ def get_filtered_section(parent_id, media=None, limit=None, recursive=None, sort
|
|||
'Limit': limit,
|
||||
'SortBy': sort or "SortName",
|
||||
'SortOrder': sort_order or "Ascending",
|
||||
'Filters': filters,
|
||||
'ImageTypeLimit': 1,
|
||||
'IsVirtualUnaired': False,
|
||||
'CollapseBoxSetItems': settings('groupedSets.bool'),
|
||||
'Fields': browse_info()
|
||||
}
|
||||
if filters:
|
||||
|
||||
if 'Boxsets' in filters:
|
||||
|
||||
filters.remove('Boxsets')
|
||||
params['CollapseBoxSetItems'] = settings('groupedSets.bool')
|
||||
|
||||
params['Filters'] = ','.join(filters)
|
||||
|
||||
if settings('getCast.bool'):
|
||||
params['Fields'] += ",People"
|
||||
|
||||
if media and 'Photo' in media:
|
||||
params['Fields'] += ",Width,Height"
|
||||
|
||||
LOG.info(params)
|
||||
|
||||
return _get("Users/{UserId}/Items", params, server_id)
|
||||
|
||||
def get_movies_by_boxset(boxset_id):
|
||||
|
|
|
@ -235,15 +235,17 @@ def browse(media, view_id=None, folder=None, server_id=None):
|
|||
content_type = "images"
|
||||
|
||||
if folder == 'FavEpisodes':
|
||||
listing = TheVoid('Browse', {'Media': "Episode", 'ServerId': server_id, 'Limit': 25, 'Filters': "IsFavorite"}).get()
|
||||
listing = TheVoid('Browse', {'Media': "Episode", 'ServerId': server_id, 'Limit': 25, 'Filters': ["IsFavorite"]}).get()
|
||||
elif media == 'homevideos':
|
||||
listing = TheVoid('Browse', {'Id': folder or view_id, 'Media': "Video,Folder,PhotoAlbum,Photo", 'ServerId': server_id, 'Recursive': False}).get()
|
||||
elif media == 'movies':
|
||||
listing = TheVoid('Browse', {'Id': folder or view_id, 'Media': "Movie,BoxSet", 'ServerId': server_id, 'Recursive': True}).get()
|
||||
listing = TheVoid('Browse', {'Id': folder or view_id, 'Media': "Movie,Boxset", 'ServerId': server_id, 'Recursive': True}).get()
|
||||
elif media in ('boxset', 'library'):
|
||||
listing = TheVoid('Browse', {'Id': folder or view_id, 'ServerId': server_id, 'Recursive': True}).get()
|
||||
elif media == 'episodes':
|
||||
listing = TheVoid('Browse', {'Id': folder or view_id, 'Media': "Episode", 'ServerId': server_id, 'Recursive': True}).get()
|
||||
elif media == 'library':
|
||||
listing = TheVoid('Browse', {'Id': folder or view_id, 'ServerId': server_id, 'Recursive': True}).get()
|
||||
elif media == 'boxsets':
|
||||
listing = TheVoid('Browse', {'Id': folder or view_id, 'ServerId': server_id, 'Recursive': False, 'Filters': ["Boxsets"]}).get()
|
||||
else:
|
||||
listing = TheVoid('Browse', {'Id': folder or view_id, 'ServerId': server_id, 'Recursive': False}).get()
|
||||
|
||||
|
@ -322,7 +324,7 @@ def get_folder_type(item):
|
|||
elif media == 'Season':
|
||||
return "episodes"
|
||||
elif media == 'BoxSet':
|
||||
return "movies"
|
||||
return "boxset"
|
||||
elif media == 'MusicArtist':
|
||||
return "albums"
|
||||
elif media == 'MusicAlbum':
|
||||
|
|
Loading…
Reference in a new issue