diff --git a/Makefile b/Makefile index 370ce85..5f337c2 100644 --- a/Makefile +++ b/Makefile @@ -24,12 +24,6 @@ clean: rm -f $(ZIP_FILE) rm -rf $(NAME) -# extract: -# ./scripts/extract.py --exclude-icons -# -# extract-icons: -# ./scripts/extract.py --exclude-defs - upload: $(eval EXISTS := $(shell github-release info --user $(GIT_USER) --repo $(GIT_REPOSITORY) --tag v$(VERSION) 1>&2 2>/dev/null; echo $$?)) ifneq ($(EXISTS),1) diff --git a/addon.xml b/addon.xml index 542ad69..025b638 100644 --- a/addon.xml +++ b/addon.xml @@ -2,24 +2,21 @@ + - - - - special://userdata/addon_data/context.elementum/icon.png - String.IsEqual(ListItem.DBTYPE,episode) | String.IsEqual(ListItem.DBTYPE,movie) - - - + + + + + StringCompare(ListItem.dbtype,movie) | StringCompare(ListItem.dbtype,episode) + + + Elementum Context Menu @@ -30,9 +27,5 @@ https://elementum.surge.sh https://github.com/elgatito/context.elementum - - icon.png - fanart.jpg - diff --git a/context_menu.py b/context_menu.py new file mode 100644 index 0000000..eeb519e --- /dev/null +++ b/context_menu.py @@ -0,0 +1,6 @@ +import sys +import xbmc + +if __name__ == '__main__': + message = "Clicked on '%s'" % sys.listitem.getlabel() + xbmc.executebuiltin("Notification(\"Hello context items!\", \"%s\")" % message) diff --git a/context_play.py b/context_play.py index b9f3839..c378d12 100644 --- a/context_play.py +++ b/context_play.py @@ -2,7 +2,7 @@ import sys sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'lib')) -from context.utils import doPlay +from plugin import doPlay if __name__ == '__main__': doPlay() diff --git a/fanart.jpg b/fanart.jpg deleted file mode 100644 index fe26b76..0000000 Binary files a/fanart.jpg and /dev/null differ diff --git a/icon-menu.png b/icon-menu.png deleted file mode 100644 index 941e4f2..0000000 Binary files a/icon-menu.png and /dev/null differ diff --git a/icon.png b/icon.png deleted file mode 100644 index 69d57a2..0000000 Binary files a/icon.png and /dev/null differ diff --git a/logo.png b/logo.png deleted file mode 100644 index da28dfa..0000000 Binary files a/logo.png and /dev/null differ diff --git a/lib/context/utils.py b/plugin.py similarity index 87% rename from lib/context/utils.py rename to plugin.py index 803f5b9..fc2ba4b 100644 --- a/lib/context/utils.py +++ b/plugin.py @@ -38,29 +38,16 @@ def doAssign(): def doPlay(): - if not configureTMDB(): - return - dbid = getDbId() - imdbnumber = getIMDBNumber() mediatype = getMediaType() xbmcgui.Dialog().notification(ADDON.getLocalizedString(32009), sys.listitem.getLabel(), xbmcgui.NOTIFICATION_INFO, 3000) - log.debug("Playing for: DBID=%s, IMDB=%s, MediaType=%s" % (dbid, imdbnumber, mediatype)) - - if mediatype == 'movie': - tmdb_id = getTMDBId('movie', imdbnumber) - url = "plugin://plugin.video.elementum/library/movie/play/%s" % tmdb_id - elif mediatype == 'episode': - (show_id, season_number, episode_number) = getEpisodeDetails() - tmdb_id = getTMDBId('show', show_id) - url = "plugin://plugin.video.elementum/library/show/play/%s/%s/%s" % (tmdb_id, season_number, episode_number) + log.debug("Playing for: DBID=%s, MediaType=%s" % (dbid, mediatype)) - log.debug("Fetched TMDB: %s" % tmdb_id) - if tmdb_id is not None: - log.debug("Starting Elementum with: %s" % url) - xbmc.Player().play(url) + url = "plugin://plugin.video.elementum/context/%s/%s/play" % (mediatype, dbid) + log.debug("Starting Elementum with: %s" % url) + xbmc.Player().play(url) def getDbId(): diff --git a/requirements.txt b/requirements.txt index 59502ca..1160e2d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ flake8 sphinx sphinx-autobuild -https://github.com/romanvm/Kodistubs/tarball/master diff --git a/resources/language/English/strings.po b/resources/language/English/strings.po index aadf40c..0c03edc 100644 --- a/resources/language/English/strings.po +++ b/resources/language/English/strings.po @@ -23,7 +23,7 @@ msgid "[COLOR FF46B3B3]Elementum[/COLOR] Play" msgstr "" msgctxt "#32001" -msgid "[COLOR FF46B3B3]Elementum[/COLOR] Season Assign" +msgid "[COLOR FF46B3B3]Elementum[/COLOR] Control" msgstr "" msgctxt "#32002" diff --git a/resources/language/Russian/strings.po b/resources/language/Russian/strings.po index c5b52c6..8931a79 100644 --- a/resources/language/Russian/strings.po +++ b/resources/language/Russian/strings.po @@ -23,8 +23,8 @@ msgid "[COLOR FF46B3B3]Elementum[/COLOR] Play" msgstr "[COLOR FF46B3B3]Elementum[/COLOR] Воспроизвести" msgctxt "#32001" -msgid "[COLOR FF46B3B3]Elementum[/COLOR] Season Assign" -msgstr "[COLOR FF46B3B3]Elementum[/COLOR] Выбрать стрим для сезона" +msgid "[COLOR FF46B3B3]Elementum[/COLOR] Control" +msgstr "[COLOR FF46B3B3]Elementum[/COLOR] Управление" msgctxt "#32002" msgid "[COLOR FF46B3B3]Elementum[/COLOR] Assign"