diff --git a/resources/language/English/strings.po b/resources/language/English/strings.po index 742b975..1751bd2 100644 --- a/resources/language/English/strings.po +++ b/resources/language/English/strings.po @@ -154,6 +154,10 @@ msgctxt "#30120" msgid "Show Load Progress" msgstr "" +msgctxt "#30121" +msgid "On Resume" +msgstr "" + msgctxt "#30125" msgid "Done" msgstr "" @@ -490,6 +494,10 @@ msgctxt "#30277" msgid "EmbyCon needs to prompt for resume on partily played items, Kodi can also prompt, this can cause a double prompt. Do you want to remove the double prompt?" msgstr "" +msgctxt "#30278" +msgid " - Next Up" +msgstr "" + msgctxt "#30280" msgid "Missing Title" msgstr "" diff --git a/resources/lib/menu_functions.py b/resources/lib/menu_functions.py index a958fe5..2025f81 100644 --- a/resources/lib/menu_functions.py +++ b/resources/lib/menu_functions.py @@ -131,18 +131,22 @@ def displaySections(): # Add collections detailsString = getDetailsString() collections = getCollections(detailsString) + if collections: for collection in collections: url = (sys.argv[0] + "?url=" + urllib.quote(collection['path']) + "&mode=GET_CONTENT&media_type=" + collection["media_type"]) log.info("addMenuDirectoryItem: " + collection.get('title', i18n('unknown')) + " " + str(url)) addMenuDirectoryItem(collection.get('title', i18n('unknown')), url, thumbnail=collection.get("thumbnail")) + addMenuDirectoryItem(i18n('movies_genre'), "plugin://plugin.video.embycon/?mode=MOVIE_GENRA") addMenuDirectoryItem(i18n('movies_az'), "plugin://plugin.video.embycon/?mode=MOVIE_ALPHA") addMenuDirectoryItem(i18n('search'), "plugin://plugin.video.embycon/?mode=SEARCH") + addMenuDirectoryItem(i18n('change_user'), "plugin://plugin.video.embycon/?mode=CHANGE_USER") addMenuDirectoryItem(i18n('show_settings'), "plugin://plugin.video.embycon/?mode=SHOW_SETTINGS") addMenuDirectoryItem(i18n('set_default_views'), "plugin://plugin.video.embycon/?mode=SET_DEFAULT_VIEWS") + if collections: addMenuDirectoryItem(i18n('widgets'), "plugin://plugin.video.embycon/?mode=WIDGETS") @@ -246,6 +250,21 @@ def getCollections(detailsString): '&ImageTypeLimit=1' + '&format=json'), 'media_type': collection_type}) + collections.append({ + 'title': item_name + i18n('_next_up'), + 'thumbnail': downloadUtils.getArtwork(item, "Primary", server=server), + 'path': ('{server}/emby/Shows/NextUp/?Userid={userid}' + + '&ParentId=' + item.get("Id") + + '&Limit=20' + + '&Recursive=true' + + '&Fields=' + detailsString + + '&Filters=IsUnplayed,IsNotFolder' + + '&IsVirtualUnaired=false' + + '&IsMissing=False' + + '&IncludeItemTypes=Episode' + + '&ImageTypeLimit=1' + + '&format=json'), + 'media_type': collection_type}) if collection_type == "movies": collections.append({ diff --git a/resources/lib/play_utils.py b/resources/lib/play_utils.py index 56d2d47..7ba40dc 100644 --- a/resources/lib/play_utils.py +++ b/resources/lib/play_utils.py @@ -33,6 +33,7 @@ def playFile(play_info): settings = xbmcaddon.Addon('plugin.video.embycon') addon_path = settings.getAddonInfo('path') playback_type = settings.getSetting("playback_type") + jump_back_amount = int(settings.getSetting("jump_back_amount")) server = downloadUtils.getServer() @@ -130,6 +131,8 @@ def playFile(play_info): else: time.sleep(1) + seekTime = seekTime - jump_back_amount + while xbmc.Player().getTime() < (seekTime - 5): # xbmc.Player().pause() xbmc.sleep(100) diff --git a/resources/lib/translation.py b/resources/lib/translation.py index 61a58ee..88ef0f8 100644 --- a/resources/lib/translation.py +++ b/resources/lib/translation.py @@ -90,4 +90,5 @@ STRINGS = { 'no_server_detected': 30282, 'play_next_title': 30283, 'play_next_question': 30284, + '_next_up': 30278, } diff --git a/resources/settings.xml b/resources/settings.xml index 969f872..02014e1 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -29,6 +29,9 @@ + + +