mirror of
https://github.com/jellyfin/jellycon.git
synced 2024-11-24 06:29:40 +00:00
add Series/TV Show Genre
This commit is contained in:
parent
a4f17861d7
commit
2b3566b372
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<addon id="plugin.video.embycon"
|
<addon id="plugin.video.embycon"
|
||||||
name="EmbyCon"
|
name="EmbyCon"
|
||||||
version="1.3.36"
|
version="1.3.37"
|
||||||
provider-name="Team B">
|
provider-name="Team B">
|
||||||
<requires>
|
<requires>
|
||||||
<import addon="xbmc.python" version="2.24.0"/>
|
<import addon="xbmc.python" version="2.24.0"/>
|
||||||
|
@ -557,3 +557,7 @@ msgstr ""
|
|||||||
msgctxt "#30288"
|
msgctxt "#30288"
|
||||||
msgid " - Latest"
|
msgid " - Latest"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "#30289"
|
||||||
|
msgid "TV Show (Genre)"
|
||||||
|
msgstr ""
|
@ -109,8 +109,10 @@ def mainEntryPoint():
|
|||||||
delete(item_id)
|
delete(item_id)
|
||||||
elif mode == "MOVIE_ALPHA":
|
elif mode == "MOVIE_ALPHA":
|
||||||
showMovieAlphaList()
|
showMovieAlphaList()
|
||||||
elif mode == "MOVIE_GENRA":
|
elif mode == "MOVIE_GENRE":
|
||||||
showGenreList()
|
showGenreList()
|
||||||
|
elif mode == "SERIES_GENRE":
|
||||||
|
showGenreList(item_type="series")
|
||||||
elif mode == "WIDGETS":
|
elif mode == "WIDGETS":
|
||||||
showWidgets()
|
showWidgets()
|
||||||
elif mode == "SHOW_MENU":
|
elif mode == "SHOW_MENU":
|
||||||
|
@ -20,7 +20,7 @@ downloadUtils = DownloadUtils()
|
|||||||
__addon__ = xbmcaddon.Addon(id='plugin.video.embycon')
|
__addon__ = xbmcaddon.Addon(id='plugin.video.embycon')
|
||||||
|
|
||||||
|
|
||||||
def showGenreList():
|
def showGenreList(item_type=None):
|
||||||
log.debug("== ENTER: showGenreList() ==")
|
log.debug("== ENTER: showGenreList() ==")
|
||||||
|
|
||||||
server = downloadUtils.getServer()
|
server = downloadUtils.getServer()
|
||||||
@ -29,8 +29,20 @@ def showGenreList():
|
|||||||
|
|
||||||
detailsString = getDetailsString()
|
detailsString = getDetailsString()
|
||||||
|
|
||||||
|
kodi_type = "Movies"
|
||||||
|
emby_type = "Movie"
|
||||||
|
if item_type is not None and item_type == "series":
|
||||||
|
emby_type = "Series"
|
||||||
|
kodi_type = "tvshows"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
jsonData = downloadUtils.downloadUrl("{server}/emby/Genres?SortBy=SortName&SortOrder=Ascending&IncludeTypes=Movie&Recursive=true&UserId={userid}&format=json")
|
jsonData = downloadUtils.downloadUrl("{server}/emby/Genres?" +
|
||||||
|
"SortBy=SortName" +
|
||||||
|
"&SortOrder=Ascending" +
|
||||||
|
"&IncludeItemTypes=" + emby_type +
|
||||||
|
"&Recursive=true" +
|
||||||
|
"&UserId={userid}" +
|
||||||
|
"&format=json")
|
||||||
log.debug("GENRE_LIST_DATA : " + jsonData)
|
log.debug("GENRE_LIST_DATA : " + jsonData)
|
||||||
except Exception, msg:
|
except Exception, msg:
|
||||||
error = "Get connect : " + str(msg)
|
error = "Get connect : " + str(msg)
|
||||||
@ -44,11 +56,11 @@ def showGenreList():
|
|||||||
for genre in result:
|
for genre in result:
|
||||||
item_data = {}
|
item_data = {}
|
||||||
item_data['title'] = genre.get("Name")
|
item_data['title'] = genre.get("Name")
|
||||||
item_data['media_type'] = "Movies"
|
item_data['media_type'] = kodi_type
|
||||||
item_data['thumbnail'] = downloadUtils.getArtwork(genre, "Thumb", server=server)
|
item_data['thumbnail'] = downloadUtils.getArtwork(genre, "Thumb", server=server)
|
||||||
item_data['path'] = ('{server}/emby/Users/{userid}/Items?Fields=' + detailsString +
|
item_data['path'] = ('{server}/emby/Users/{userid}/Items?Fields=' + detailsString +
|
||||||
'&Recursive=true&GenreIds=' + genre.get("Id") +
|
'&Recursive=true&GenreIds=' + genre.get("Id") +
|
||||||
'&IncludeItemTypes=Movie' +
|
'&IncludeItemTypes=' + emby_type +
|
||||||
'&ImageTypeLimit=1&format=json')
|
'&ImageTypeLimit=1&format=json')
|
||||||
collections.append(item_data)
|
collections.append(item_data)
|
||||||
|
|
||||||
@ -129,8 +141,9 @@ def displaySections():
|
|||||||
log.debug("addMenuDirectoryItem: " + collection.get('title', i18n('unknown')) + " " + str(url))
|
log.debug("addMenuDirectoryItem: " + collection.get('title', i18n('unknown')) + " " + str(url))
|
||||||
addMenuDirectoryItem(collection.get('title', i18n('unknown')), url, thumbnail=collection.get("thumbnail"))
|
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_genre'), "plugin://plugin.video.embycon/?mode=MOVIE_GENRE")
|
||||||
addMenuDirectoryItem(i18n('movies_az'), "plugin://plugin.video.embycon/?mode=MOVIE_ALPHA")
|
addMenuDirectoryItem(i18n('movies_az'), "plugin://plugin.video.embycon/?mode=MOVIE_ALPHA")
|
||||||
|
addMenuDirectoryItem(i18n('tvshow_genre'), "plugin://plugin.video.embycon/?mode=SERIES_GENRE")
|
||||||
addMenuDirectoryItem(i18n('search'), "plugin://plugin.video.embycon/?mode=SEARCH")
|
addMenuDirectoryItem(i18n('search'), "plugin://plugin.video.embycon/?mode=SEARCH")
|
||||||
|
|
||||||
addMenuDirectoryItem(i18n('show_clients'), "plugin://plugin.video.embycon/?mode=SHOW_SERVER_SESSIONS")
|
addMenuDirectoryItem(i18n('show_clients'), "plugin://plugin.video.embycon/?mode=SHOW_SERVER_SESSIONS")
|
||||||
|
@ -97,5 +97,6 @@ STRINGS = {
|
|||||||
'_unwatched': 30285,
|
'_unwatched': 30285,
|
||||||
'movies_unwatched': 30286,
|
'movies_unwatched': 30286,
|
||||||
'tvshows_latest' : 30287,
|
'tvshows_latest' : 30287,
|
||||||
'_latest' : 30288
|
'_latest' : 30288,
|
||||||
|
'tvshow_genre': 30289
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user