diff options
author | Shaun <shaun@bluebit.com.au> | 2017-07-26 09:30:39 +1000 |
---|---|---|
committer | enen92 <enen92@users.noreply.github.com> | 2017-07-26 00:30:39 +0100 |
commit | d066354ed3c2162e6ea2e0a3d61ce95c3526145a (patch) | |
tree | 066ebf71eeca2e11933983e1b9efe14ec43d8c27 /plugin.video.embycon/resources/lib/menu_functions.py | |
parent | c59c7ae1bf49a8fa6db90f4bfab9e3258952ce9c (diff) |
latest version, add Latest TV Shows endpoint (#1342)
Diffstat (limited to 'plugin.video.embycon/resources/lib/menu_functions.py')
-rw-r--r-- | plugin.video.embycon/resources/lib/menu_functions.py | 49 |
1 files changed, 43 insertions, 6 deletions
diff --git a/plugin.video.embycon/resources/lib/menu_functions.py b/plugin.video.embycon/resources/lib/menu_functions.py index d18345c..19467b6 100644 --- a/plugin.video.embycon/resources/lib/menu_functions.py +++ b/plugin.video.embycon/resources/lib/menu_functions.py @@ -234,7 +234,25 @@ def getCollections(detailsString): '&ImageTypeLimit=1' + '&format=json'), 'media_type': 'Episodes', - 'name_format': 'episode_name_format'}) + 'name_format': 'Episode|episode_name_format'}) + collections.append({ + 'title': item_name + i18n('_latest'), + 'thumbnail': downloadUtils.getArtwork(item, "Primary", server=server), + 'path': ('{server}/emby/Users/{userid}/Items/Latest' + + '?ParentId=' + item.get("Id") + + '&Limit={ItemLimit}' + + '&IsVirtualUnaired=false' + + '&IsMissing=False' + + '&Fields=' + detailsString + + '&SortBy=DateCreated' + + '&SortOrder=Descending' + + '&Filters=IsUnplayed' + + '&Recursive=true' + + '&IncludeItemTypes=Episode' + + '&ImageTypeLimit=1' + + '&format=json'), + 'media_type': 'Episodes', + 'name_format': 'Episode|episode_name_format'}) collections.append({ 'title': item_name + i18n('_recently_added'), 'thumbnail': downloadUtils.getArtwork(item, "Primary", server=server), @@ -252,7 +270,7 @@ def getCollections(detailsString): '&ImageTypeLimit=1' + '&format=json'), 'media_type': 'Episodes', - 'name_format': 'episode_name_format'}) + 'name_format': 'Episode|episode_name_format'}) collections.append({ 'title': item_name + i18n('_next_up'), 'thumbnail': downloadUtils.getArtwork(item, "Primary", server=server), @@ -268,7 +286,7 @@ def getCollections(detailsString): '&ImageTypeLimit=1' + '&format=json'), 'media_type': 'Episodes', - 'name_format': 'episode_name_format'}) + 'name_format': 'Episode|episode_name_format'}) if collection_type == "movies": collections.append({ @@ -423,6 +441,25 @@ def getCollections(detailsString): collections.append(item_data) item_data = {} + item_data['title'] = i18n('tvshows_latest') + item_data['media_type'] = 'Episodes' + item_data['path'] = ('{server}/emby/Users/{userid}/Items/Latest' + + '?Limit={ItemLimit}' + + '&Recursive=true' + + '&GroupItems=true' + + '&SortBy=DateCreated' + + '&Fields=' + detailsString + + '&SortOrder=Descending' + + '&Filters=IsUnplayed' + + '&IsVirtualUnaired=false' + + '&IsMissing=False' + + '&IncludeItemTypes=Episode' + + '&ImageTypeLimit=1' + + '&format=json') + item_data['name_format'] = 'Episode|episode_name_format' + collections.append(item_data) + + item_data = {} item_data['title'] = i18n('episodes_in_progress') item_data['media_type'] = 'Episodes' item_data['path'] = ('{server}/emby/Users/{userid}/Items' + @@ -433,7 +470,7 @@ def getCollections(detailsString): '&IncludeItemTypes=Episode' + '&ImageTypeLimit=1' + '&format=json') - item_data['name_format'] = 'episode_name_format' + item_data['name_format'] = 'Episode|episode_name_format' collections.append(item_data) item_data = {} @@ -451,7 +488,7 @@ def getCollections(detailsString): '&IncludeItemTypes=Episode' + '&ImageTypeLimit=1' + '&format=json') - item_data['name_format'] = 'episode_name_format' + item_data['name_format'] = 'Episode|episode_name_format' collections.append(item_data) item_data = {} @@ -467,7 +504,7 @@ def getCollections(detailsString): '&IncludeItemTypes=Episode' + '&ImageTypeLimit=1' + '&format=json') - item_data['name_format'] = 'episode_name_format' + item_data['name_format'] = 'Episode|episode_name_format' collections.append(item_data) item_data = {} |