Add node for all episodes in seasons node (#14)
Add all seasons node to seasons list
This commit is contained in:
@@ -560,4 +560,8 @@ msgstr ""
|
||||
|
||||
msgctxt "#30289"
|
||||
msgid "TV Show (Genre)"
|
||||
msgstr ""
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30290"
|
||||
msgid "All"
|
||||
msgstr ""
|
||||
|
||||
@@ -621,7 +621,7 @@ def processDirectory(results, progress, params):
|
||||
|
||||
item_count = len(result)
|
||||
current_item = 1
|
||||
|
||||
added_all_seasons = False
|
||||
for item in result:
|
||||
|
||||
if (progress != None):
|
||||
@@ -634,6 +634,38 @@ def processDirectory(results, progress, params):
|
||||
|
||||
item_type = str(item.get("Type")).encode('utf-8')
|
||||
|
||||
if item_type == "Season" and added_all_seasons == False:
|
||||
series_url = ('{server}/emby/Users/{userid}/items' +
|
||||
'?ParentId=' + str(item.get("SeriesId")).encode('utf-8') +
|
||||
'&IsVirtualUnAired=false' +
|
||||
'&IsMissing=false' +
|
||||
'&Fields=' + detailsString +
|
||||
'&Recursive=true' +
|
||||
'&IncludeItemTypes=Episode' +
|
||||
'&format=json')
|
||||
details = {'title': i18n('all'),
|
||||
}
|
||||
art = getArt(item, server)
|
||||
# Populate the extraData list
|
||||
extraData = {'thumb': art['tvshow.poster'],
|
||||
'fanart': art['fanart'],
|
||||
'poster': art['tvshow.poster'],
|
||||
'banner': art['tvshow.banner'],
|
||||
'clearlogo': art['clearlogo'],
|
||||
'discart': art['discart'],
|
||||
'clearart': art['clearart'],
|
||||
'landscape': art['landscape'],
|
||||
'tvshow.poster': art['tvshow.poster'],
|
||||
'tvshow.clearart': art['tvshow.clearart'],
|
||||
'tvshow.banner': art['tvshow.banner'],
|
||||
'tvshow.landscape': art['tvshow.landscape'],
|
||||
'itemtype': 'Episodes',
|
||||
'UnWatchedEpisodes': '0',
|
||||
'mode': 'GET_CONTENT',
|
||||
}
|
||||
dirItems.append(addGUIItem(series_url, details, extraData, {}, folder=True))
|
||||
added_all_seasons = True
|
||||
|
||||
# set the episode number
|
||||
tempEpisode = ""
|
||||
if item_type == "Episode":
|
||||
|
||||
@@ -98,5 +98,6 @@ STRINGS = {
|
||||
'movies_unwatched': 30286,
|
||||
'tvshows_latest' : 30287,
|
||||
'_latest' : 30288,
|
||||
'tvshow_genre': 30289
|
||||
'tvshow_genre': 30289,
|
||||
'all': 30290
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user