add Widgets menu with all widget end-points (#5)

This commit is contained in:
anxdpanic
2017-05-28 01:55:17 -04:00
committed by Shaun
parent b339cf8740
commit 69eed6a599
3 changed files with 24 additions and 2 deletions

View File

@@ -85,6 +85,10 @@
<string id="30237">Start from beginning</string>
<string id="30238">Default Sort</string>
<string id="30247">Widgets</string>
<string id="30248">Emby - Movies</string>
<string id="30249">Emby - TV Shows</string>
<string id="30250">Unknown</string>
<string id="30251">Movies (Genre)</string>
<string id="30252">Movies (A-Z)</string>
@@ -104,6 +108,7 @@
<string id="30266">Upcoming TV</string>
<string id="30267"> - In Progress</string>
<string id="30268"> - Recently Added</string>
<string id="30269">Movies - Random</string>
<string id="30270">Emby: Mark watched</string>
<string id="30271">Emby: Mark unwatched</string>

View File

@@ -23,7 +23,7 @@ from datamanager import DataManager
from views import DefaultViews, loadSkinDefaults
from server_detect import checkServer
from simple_logging import SimpleLogging
from menu_functions import displaySections, showMovieAlphaList, showGenreList
from menu_functions import displaySections, showMovieAlphaList, showGenreList, showWidgets
__settings__ = xbmcaddon.Addon(id='plugin.video.embycon')
__addon__ = xbmcaddon.Addon(id='plugin.video.embycon')
@@ -109,6 +109,8 @@ def mainEntryPoint():
showMovieAlphaList()
elif mode == "MOVIE_GENRA":
showGenreList()
elif mode == "WIDGETS":
showWidgets()
elif mode == "SHOW_SETTINGS":
__settings__.openSettings()
WINDOW = xbmcgui.getCurrentWindowId()

View File

@@ -132,6 +132,7 @@ def displaySections():
addMenuDirectoryItem(__language__(30253), "plugin://plugin.video.embycon/?mode=CHANGE_USER")
addMenuDirectoryItem(__language__(30254), "plugin://plugin.video.embycon/?mode=SHOW_SETTINGS")
addMenuDirectoryItem(__language__(30255), "plugin://plugin.video.embycon/?mode=SET_DEFAULT_VIEWS")
addMenuDirectoryItem(__language__(30247), "plugin://plugin.video.embycon/?mode=WIDGETS")
xbmcplugin.endOfDirectory(int(sys.argv[1]))
@@ -321,4 +322,18 @@ def getCollections(detailsString):
'path'] = '/emby/Users/' + userid + '/Items?Recursive=true&SortBy=PremiereDate&Fields=' + detailsString + '&SortOrder=Ascending&Filters=IsUnplayed&IsVirtualUnaired=true&IsNotFolder&IncludeItemTypes=Episode&ImageTypeLimit=1&format=json'
collections.append(item_data)
return collections
return collections
def showWidgets():
addMenuDirectoryItem(__language__(30248), 'plugin://plugin.video.embycon/?mode=SHOW_CONTENT&item_type=Movie&media_type=Movies')
addMenuDirectoryItem(__language__(30249), 'plugin://plugin.video.embycon/?mode=SHOW_CONTENT&item_type=Series&media_type=TVShows')
addMenuDirectoryItem(__language__(30257), 'plugin://plugin.video.embycon/?mode=WIDGET_CONTENT&type=recent_movies')
addMenuDirectoryItem(__language__(30258), 'plugin://plugin.video.embycon/?mode=WIDGET_CONTENT&type=inprogress_movies')
addMenuDirectoryItem(__language__(30269), 'plugin://plugin.video.embycon/?mode=WIDGET_CONTENT&type=random_movies')
addMenuDirectoryItem(__language__(30263), 'plugin://plugin.video.embycon/?mode=WIDGET_CONTENT&type=recent_episodes')
addMenuDirectoryItem(__language__(30264), 'plugin://plugin.video.embycon/?mode=WIDGET_CONTENT&type=inprogress_episodes')
addMenuDirectoryItem(__language__(30265), 'plugin://plugin.video.embycon/?mode=WIDGET_CONTENT&type=nextup_episodes')
xbmcplugin.endOfDirectory(int(sys.argv[1]))