mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +00:00
finished homevideos and photos
This commit is contained in:
parent
ee9f08080e
commit
b24e881f18
6 changed files with 203 additions and 123 deletions
|
@ -20,7 +20,7 @@
|
||||||
<item>
|
<item>
|
||||||
<label>30401</label>
|
<label>30401</label>
|
||||||
<description>Settings for the Emby Server</description>
|
<description>Settings for the Emby Server</description>
|
||||||
<visible>!IsEmpty(ListItem.DBID)</visible>
|
<visible>[!IsEmpty(ListItem.DBID) + !IsEmpty(ListItem.DBTYPE)] | !IsEmpty(ListItem.Property(embyid))</visible>
|
||||||
</item>
|
</item>
|
||||||
</extension>
|
</extension>
|
||||||
<extension point="xbmc.addon.metadata">
|
<extension point="xbmc.addon.metadata">
|
||||||
|
|
|
@ -33,35 +33,30 @@ def logMsg(msg, lvl=1):
|
||||||
#Kodi contextmenu item to configure the emby settings
|
#Kodi contextmenu item to configure the emby settings
|
||||||
#for now used to set ratings but can later be used to sync individual items etc.
|
#for now used to set ratings but can later be used to sync individual items etc.
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
||||||
|
|
||||||
itemid = xbmc.getInfoLabel("ListItem.DBID").decode("utf-8")
|
itemid = xbmc.getInfoLabel("ListItem.DBID").decode("utf-8")
|
||||||
itemtype = xbmc.getInfoLabel("ListItem.DBTYPE").decode("utf-8")
|
itemtype = xbmc.getInfoLabel("ListItem.DBTYPE").decode("utf-8")
|
||||||
|
|
||||||
|
emby = embyserver.Read_EmbyServer()
|
||||||
|
|
||||||
|
embyid = ""
|
||||||
if not itemtype and xbmc.getCondVisibility("Container.Content(albums)"): itemtype = "album"
|
if not itemtype and xbmc.getCondVisibility("Container.Content(albums)"): itemtype = "album"
|
||||||
if not itemtype and xbmc.getCondVisibility("Container.Content(artists)"): itemtype = "artist"
|
if not itemtype and xbmc.getCondVisibility("Container.Content(artists)"): itemtype = "artist"
|
||||||
if not itemtype and xbmc.getCondVisibility("Container.Content(songs)"): itemtype = "song"
|
if not itemtype and xbmc.getCondVisibility("Container.Content(songs)"): itemtype = "song"
|
||||||
|
if not itemtype and xbmc.getCondVisibility("Container.Content(pictures)"): itemtype = "picture"
|
||||||
|
|
||||||
logMsg("Contextmenu opened for itemid: %s - itemtype: %s" %(itemid,itemtype))
|
if (not itemid or itemid == "-1") and xbmc.getInfoLabel("ListItem.Property(embyid)"):
|
||||||
|
embyid = xbmc.getInfoLabel("ListItem.Property(embyid)")
|
||||||
|
else:
|
||||||
|
embyconn = utils.kodiSQL('emby')
|
||||||
|
embycursor = embyconn.cursor()
|
||||||
|
emby_db = embydb.Embydb_Functions(embycursor)
|
||||||
|
item = emby_db.getItem_byKodiId(itemid, itemtype)
|
||||||
|
if item: embyid = item[0]
|
||||||
|
|
||||||
userid = utils.window('emby_currUser')
|
logMsg("Contextmenu opened for embyid: %s - itemtype: %s" %(embyid,itemtype))
|
||||||
server = utils.window('emby_server%s' % userid)
|
|
||||||
embyconn = utils.kodiSQL('emby')
|
|
||||||
embycursor = embyconn.cursor()
|
|
||||||
kodiconn = utils.kodiSQL('music')
|
|
||||||
kodicursor = kodiconn.cursor()
|
|
||||||
|
|
||||||
emby = embyserver.Read_EmbyServer()
|
|
||||||
emby_db = embydb.Embydb_Functions(embycursor)
|
|
||||||
kodi_db = kodidb.Kodidb_Functions(kodicursor)
|
|
||||||
|
|
||||||
item = emby_db.getItem_byKodiId(itemid, itemtype)
|
|
||||||
if item:
|
|
||||||
embyid = item[0]
|
|
||||||
|
|
||||||
|
if embyid:
|
||||||
item = emby.getItem(embyid)
|
item = emby.getItem(embyid)
|
||||||
|
|
||||||
print item
|
|
||||||
|
|
||||||
API = api.API(item)
|
API = api.API(item)
|
||||||
userdata = API.getUserData()
|
userdata = API.getUserData()
|
||||||
likes = userdata['Likes']
|
likes = userdata['Likes']
|
||||||
|
@ -105,6 +100,8 @@ if __name__ == '__main__':
|
||||||
if options[ret] == utils.language(30406):
|
if options[ret] == utils.language(30406):
|
||||||
API.updateUserRating(embyid, favourite=False)
|
API.updateUserRating(embyid, favourite=False)
|
||||||
if options[ret] == utils.language(30407):
|
if options[ret] == utils.language(30407):
|
||||||
|
kodiconn = utils.kodiSQL('music')
|
||||||
|
kodicursor = kodiconn.cursor()
|
||||||
query = ' '.join(("SELECT rating", "FROM song", "WHERE idSong = ?" ))
|
query = ' '.join(("SELECT rating", "FROM song", "WHERE idSong = ?" ))
|
||||||
kodicursor.execute(query, (itemid,))
|
kodicursor.execute(query, (itemid,))
|
||||||
currentvalue = int(round(float(kodicursor.fetchone()[0]),0))
|
currentvalue = int(round(float(kodicursor.fetchone()[0]),0))
|
||||||
|
|
|
@ -242,6 +242,11 @@
|
||||||
<string id="30249">Enable server connection message on start-up</string>
|
<string id="30249">Enable server connection message on start-up</string>
|
||||||
<string id="30250">Use local paths instead of addon redirect for playback</string>
|
<string id="30250">Use local paths instead of addon redirect for playback</string>
|
||||||
|
|
||||||
|
<string id="30251">Recently added Home Videos</string>
|
||||||
|
<string id="30252">Recently added Photos</string>
|
||||||
|
<string id="30253">Favourite Home Videos</string>
|
||||||
|
<string id="30254">Favourite Photos</string>
|
||||||
|
<string id="30255">Favourite Albums</string>
|
||||||
|
|
||||||
<!-- Default views -->
|
<!-- Default views -->
|
||||||
<string id="30300">Active</string>
|
<string id="30300">Active</string>
|
||||||
|
|
|
@ -25,6 +25,7 @@ import playbackutils as pbutils
|
||||||
import playutils
|
import playutils
|
||||||
import api
|
import api
|
||||||
|
|
||||||
|
|
||||||
#################################################################################################
|
#################################################################################################
|
||||||
|
|
||||||
|
|
||||||
|
@ -56,7 +57,6 @@ def addDirectoryItem(label, path, folder=True):
|
||||||
xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=path, listitem=li, isFolder=folder)
|
xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=path, listitem=li, isFolder=folder)
|
||||||
|
|
||||||
def doMainListing():
|
def doMainListing():
|
||||||
|
|
||||||
xbmcplugin.setContent(int(sys.argv[1]), 'files')
|
xbmcplugin.setContent(int(sys.argv[1]), 'files')
|
||||||
# Get emby nodes from the window props
|
# Get emby nodes from the window props
|
||||||
embyprops = utils.window('Emby.nodes.total')
|
embyprops = utils.window('Emby.nodes.total')
|
||||||
|
@ -67,8 +67,8 @@ def doMainListing():
|
||||||
if not path:
|
if not path:
|
||||||
path = utils.window('Emby.nodes.%s.content' % i)
|
path = utils.window('Emby.nodes.%s.content' % i)
|
||||||
label = utils.window('Emby.nodes.%s.title' % i)
|
label = utils.window('Emby.nodes.%s.title' % i)
|
||||||
if path:
|
type = utils.window('Emby.nodes.%s.type' % i)
|
||||||
print path
|
if path and ((xbmc.getCondVisibility("Window.IsActive(Pictures)") and type=="photos") or (xbmc.getCondVisibility("Window.IsActive(VideoLibrary)") and type != "photos")):
|
||||||
addDirectoryItem(label, path)
|
addDirectoryItem(label, path)
|
||||||
|
|
||||||
# some extra entries for settings and stuff. TODO --> localize the labels
|
# some extra entries for settings and stuff. TODO --> localize the labels
|
||||||
|
@ -402,97 +402,147 @@ def refreshPlaylist():
|
||||||
sound=False)
|
sound=False)
|
||||||
|
|
||||||
##### BROWSE EMBY HOMEVIDEOS AND PICTURES #####
|
##### BROWSE EMBY HOMEVIDEOS AND PICTURES #####
|
||||||
def BrowseContent(viewname, type="", folderid=None, filter=None):
|
def BrowseContent(viewname, type="", folderid=None, filter=""):
|
||||||
|
|
||||||
_addon_id = int(sys.argv[1])
|
|
||||||
_addon_url = sys.argv[0]
|
|
||||||
doUtils = downloadutils.DownloadUtils()
|
|
||||||
emby = embyserver.Read_EmbyServer()
|
emby = embyserver.Read_EmbyServer()
|
||||||
art = artwork.Artwork()
|
utils.logMsg("BrowseHomeVideos","viewname: %s - type: %s - folderid: %s - filter: %s" %(viewname, type, folderid, filter))
|
||||||
utils.logMsg("BrowseHomeVideos","viewname: %s - type: %s - folderid: %s - filter: %s" %(viewname, type, folderid, filter),0)
|
xbmcplugin.setPluginCategory(int(sys.argv[1]), viewname)
|
||||||
|
#get views for root level
|
||||||
if type.lower() == "homevideos":
|
|
||||||
xbmcplugin.setContent(int(sys.argv[1]), 'episodes')
|
|
||||||
itemtype = "Video"
|
|
||||||
elif type.lower() == "photos":
|
|
||||||
xbmcplugin.setContent(int(sys.argv[1]), 'pictures')
|
|
||||||
itemtype = "Photo"
|
|
||||||
else:
|
|
||||||
itemtype = ""
|
|
||||||
|
|
||||||
if not folderid:
|
if not folderid:
|
||||||
views = emby.getViews(type)
|
views = emby.getViews(type)
|
||||||
for view in views:
|
for view in views:
|
||||||
if view.get("name") == viewname:
|
if view.get("name") == viewname:
|
||||||
folderid = view.get("id")
|
folderid = view.get("id")
|
||||||
print view
|
|
||||||
|
|
||||||
|
#set the correct params for the content type
|
||||||
|
#only proceed if we have a folderid
|
||||||
if folderid:
|
if folderid:
|
||||||
listing = emby.getSection(folderid).get("Items",[])
|
if type.lower() == "homevideos":
|
||||||
|
xbmcplugin.setContent(int(sys.argv[1]), 'episodes')
|
||||||
|
itemtype = "Video,Folder,PhotoAlbum"
|
||||||
|
elif type.lower() == "photos":
|
||||||
|
xbmcplugin.setContent(int(sys.argv[1]), 'files')
|
||||||
|
itemtype = "Photo,PhotoAlbum"
|
||||||
|
else:
|
||||||
|
itemtype = ""
|
||||||
|
|
||||||
|
#get the actual listing
|
||||||
|
if filter == "recent":
|
||||||
|
listing = emby.getFilteredSection("", itemtype=itemtype.split(",")[0], sortby="DateCreated", recursive=True, limit=25, sortorder="Descending").get("Items",[])
|
||||||
|
elif filter == "random":
|
||||||
|
listing = emby.getFilteredSection("", itemtype=itemtype.split(",")[0], sortby="Random", recursive=True, limit=150, sortorder="Descending").get("Items",[])
|
||||||
|
elif filter == "recommended":
|
||||||
|
listing = emby.getFilteredSection("", itemtype=itemtype.split(",")[0], sortby="SortName", recursive=True, limit=25, sortorder="Ascending", filter="IsFavorite").get("Items",[])
|
||||||
|
elif filter == "sets":
|
||||||
|
listing = emby.getFilteredSection("", itemtype=itemtype.split(",")[1], sortby="SortName", recursive=True, limit=25, sortorder="Ascending", filter="IsFavorite").get("Items",[])
|
||||||
|
else:
|
||||||
|
listing = emby.getFilteredSection(folderid, itemtype=itemtype, recursive=False).get("Items",[])
|
||||||
|
|
||||||
|
#process the listing
|
||||||
for item in listing:
|
for item in listing:
|
||||||
if item.get("Type") == itemtype or item.get("IsFolder") == True:
|
li = createListItemFromEmbyItem(item)
|
||||||
API = api.API(item)
|
if item.get("IsFolder") == True:
|
||||||
itemid = item['Id']
|
#for folders we add an additional browse request, passing the folderId
|
||||||
title = item.get('Name')
|
path = "%s?id=%s&mode=browsecontent&type=%s&folderid=%s" % (sys.argv[0], viewname, type, item.get("Id"))
|
||||||
li = xbmcgui.ListItem(title)
|
xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=path, listitem=li, isFolder=True)
|
||||||
|
else:
|
||||||
premieredate = API.getPremiereDate()
|
#playable item, set plugin path and mediastreams
|
||||||
genre = API.getGenres()
|
xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=li.getProperty("path"), listitem=li)
|
||||||
overlay = 0
|
|
||||||
userdata = API.getUserData()
|
|
||||||
seektime = userdata['Resume']
|
|
||||||
if seektime:
|
|
||||||
li.setProperty("resumetime", seektime)
|
|
||||||
li.setProperty("totaltime", item.get("RunTimeTicks")/ 10000000.0)
|
|
||||||
|
|
||||||
played = userdata['Played']
|
|
||||||
if played: overlay = 7
|
|
||||||
else: overlay = 6
|
|
||||||
|
|
||||||
favorite = userdata['Favorite']
|
|
||||||
if favorite: overlay = 5
|
|
||||||
|
|
||||||
playcount = userdata['PlayCount']
|
|
||||||
if playcount is None:
|
|
||||||
playcount = 0
|
|
||||||
|
|
||||||
rating = item.get('CommunityRating')
|
|
||||||
if not rating: rating = userdata['UserRating']
|
|
||||||
|
|
||||||
# Populate the extradata list and artwork
|
|
||||||
pbutils.PlaybackUtils(item).setArtwork(li)
|
|
||||||
extradata = {
|
|
||||||
|
|
||||||
'id': itemid,
|
|
||||||
'rating': rating,
|
|
||||||
'year': item.get('ProductionYear'),
|
|
||||||
'premieredate': premieredate,
|
|
||||||
'genre': genre,
|
|
||||||
'playcount': str(playcount),
|
|
||||||
'title': title,
|
|
||||||
'plot': API.getOverview(),
|
|
||||||
'Overlay': str(overlay),
|
|
||||||
}
|
|
||||||
li.setInfo('video', infoLabels=extradata)
|
|
||||||
li.setThumbnailImage(art.getAllArtwork(item)['Primary'])
|
|
||||||
li.setIconImage('DefaultTVShows.png')
|
|
||||||
|
|
||||||
if item.get("IsFolder") == True:
|
|
||||||
path = "%s?id=%s&mode=browsecontent&type=%s&folderid=%s" % (_addon_url, viewname, type, itemid)
|
|
||||||
xbmcplugin.addDirectoryItem(handle=_addon_id, url=path, listitem=li, isFolder=True)
|
|
||||||
else:
|
|
||||||
path = "%s?id=%s&mode=play" % (_addon_url, itemid)
|
|
||||||
li.setProperty('IsPlayable', 'true')
|
|
||||||
|
|
||||||
mediastreams = API.getMediaStreams()
|
|
||||||
if mediastreams:
|
|
||||||
for key, value in mediastreams.iteritems():
|
|
||||||
if value: li.addStreamInfo(key, value[0])
|
|
||||||
|
|
||||||
xbmcplugin.addDirectoryItem(handle=_addon_id, url=path, listitem=li)
|
|
||||||
|
|
||||||
|
|
||||||
xbmcplugin.endOfDirectory(handle=int(sys.argv[1]))
|
xbmcplugin.endOfDirectory(handle=int(sys.argv[1]))
|
||||||
|
if filter == "recent":
|
||||||
|
xbmcplugin.addSortMethod(int(sys.argv[1]), xbmcplugin.SORT_METHOD_DATE)
|
||||||
|
else:
|
||||||
|
xbmcplugin.addSortMethod(int(sys.argv[1]), xbmcplugin.SORT_METHOD_VIDEO_TITLE)
|
||||||
|
xbmcplugin.addSortMethod(int(sys.argv[1]), xbmcplugin.SORT_METHOD_DATE)
|
||||||
|
xbmcplugin.addSortMethod(int(sys.argv[1]), xbmcplugin.SORT_METHOD_VIDEO_RATING)
|
||||||
|
xbmcplugin.addSortMethod(int(sys.argv[1]), xbmcplugin.SORT_METHOD_VIDEO_RUNTIME)
|
||||||
|
|
||||||
|
##### CREATE LISTITEM FROM EMBY METADATA #####
|
||||||
|
def createListItemFromEmbyItem(item):
|
||||||
|
API = api.API(item)
|
||||||
|
art = artwork.Artwork()
|
||||||
|
doUtils = downloadutils.DownloadUtils()
|
||||||
|
itemid = item['Id']
|
||||||
|
|
||||||
|
title = item.get('Name')
|
||||||
|
li = xbmcgui.ListItem(title)
|
||||||
|
|
||||||
|
premieredate = item.get('PremiereDate',"")
|
||||||
|
if not premieredate: premieredate = item.get('DateCreated',"")
|
||||||
|
if premieredate:
|
||||||
|
premieredatelst = premieredate.split('T')[0].split("-")
|
||||||
|
premieredate = "%s.%s.%s" %(premieredatelst[2],premieredatelst[1],premieredatelst[0])
|
||||||
|
|
||||||
|
li.setProperty("embyid",itemid)
|
||||||
|
|
||||||
|
allart = art.getAllArtwork(item)
|
||||||
|
|
||||||
|
if item["Type"] in ["Photo","PhotoAlbum"]:
|
||||||
|
#listitem setup for pictures...
|
||||||
|
img_path = allart.get('Primary')
|
||||||
|
li.setProperty("path",img_path)
|
||||||
|
picture = doUtils.downloadUrl("{server}/Items/%s/Images" %itemid)[0]
|
||||||
|
if picture.get("Width") > picture.get("Height"):
|
||||||
|
li.setArt( {"fanart": img_path}) #add image as fanart for use with skinhelper auto thumb/backgrund creation
|
||||||
|
li.setInfo('pictures', infoLabels={ "picturepath": img_path, "date": premieredate, "size": picture.get("Size"), "exif:width": str(picture.get("Width")), "exif:height": str(picture.get("Height")), "title": "blaat" })
|
||||||
|
li.setThumbnailImage(img_path)
|
||||||
|
li.setIconImage('DefaultPicture.png')
|
||||||
|
else:
|
||||||
|
#normal video items
|
||||||
|
li.setProperty('IsPlayable', 'true')
|
||||||
|
path = "%s?id=%s&mode=play" % (sys.argv[0], item.get("Id"))
|
||||||
|
li.setProperty("path",path)
|
||||||
|
genre = API.getGenres()
|
||||||
|
overlay = 0
|
||||||
|
userdata = API.getUserData()
|
||||||
|
seektime = userdata['Resume']
|
||||||
|
if seektime:
|
||||||
|
li.setProperty("resumetime", seektime)
|
||||||
|
li.setProperty("totaltime", item.get("RunTimeTicks")/ 10000000.0)
|
||||||
|
|
||||||
|
played = userdata['Played']
|
||||||
|
if played: overlay = 7
|
||||||
|
else: overlay = 6
|
||||||
|
|
||||||
|
favorite = userdata['Favorite']
|
||||||
|
if favorite: overlay = 5
|
||||||
|
|
||||||
|
playcount = userdata['PlayCount']
|
||||||
|
if playcount is None:
|
||||||
|
playcount = 0
|
||||||
|
|
||||||
|
rating = item.get('CommunityRating')
|
||||||
|
if not rating: rating = userdata['UserRating']
|
||||||
|
|
||||||
|
# Populate the extradata list and artwork
|
||||||
|
extradata = {
|
||||||
|
'id': itemid,
|
||||||
|
'rating': rating,
|
||||||
|
'year': item.get('ProductionYear'),
|
||||||
|
'premieredate': premieredate,
|
||||||
|
'date': premieredate,
|
||||||
|
'genre': genre,
|
||||||
|
'playcount': str(playcount),
|
||||||
|
'title': title,
|
||||||
|
'plot': API.getOverview(),
|
||||||
|
'Overlay': str(overlay),
|
||||||
|
}
|
||||||
|
li.setInfo('video', infoLabels=extradata)
|
||||||
|
li.setThumbnailImage(allart.get('Primary'))
|
||||||
|
li.setIconImage('DefaultTVShows.png')
|
||||||
|
if not allart.get('Background'): #add image as fanart for use with skinhelper auto thumb/backgrund creation
|
||||||
|
li.setArt( {"fanart": allart.get('Primary') } )
|
||||||
|
else:
|
||||||
|
pbutils.PlaybackUtils(item).setArtwork(li)
|
||||||
|
|
||||||
|
mediastreams = API.getMediaStreams()
|
||||||
|
if mediastreams:
|
||||||
|
for key, value in mediastreams.iteritems():
|
||||||
|
if value: li.addStreamInfo(key, value[0])
|
||||||
|
|
||||||
|
return li
|
||||||
|
|
||||||
##### BROWSE EMBY CHANNELS #####
|
##### BROWSE EMBY CHANNELS #####
|
||||||
def BrowseChannels(itemid, folderid=None):
|
def BrowseChannels(itemid, folderid=None):
|
||||||
|
|
|
@ -125,6 +125,29 @@ class Read_EmbyServer():
|
||||||
|
|
||||||
return [viewName, viewId, mediatype]
|
return [viewName, viewId, mediatype]
|
||||||
|
|
||||||
|
def getFilteredSection(self, parentid, itemtype=None, sortby="SortName", recursive=True, limit=None, sortorder="Ascending", filter=""):
|
||||||
|
doUtils = self.doUtils
|
||||||
|
url = "{server}/emby/Users/{UserId}/Items?format=json"
|
||||||
|
params = {
|
||||||
|
|
||||||
|
'ParentId': parentid,
|
||||||
|
'IncludeItemTypes': itemtype,
|
||||||
|
'CollapseBoxSetItems': False,
|
||||||
|
'IsVirtualUnaired': False,
|
||||||
|
'IsMissing': False,
|
||||||
|
'Recursive': recursive,
|
||||||
|
'Limit': limit,
|
||||||
|
'SortBy': sortby,
|
||||||
|
'SortOrder': sortorder,
|
||||||
|
'Filters': filter,
|
||||||
|
'Fields': ( "Path,Genres,SortName,Studios,Writer,ProductionYear,Taglines,"
|
||||||
|
"CommunityRating,OfficialRating,CumulativeRunTimeTicks,"
|
||||||
|
"Metascore,AirTime,DateCreated,MediaStreams,People,Overview,"
|
||||||
|
"CriticRating,CriticRatingSummary,Etag,ShortOverview,ProductionLocations,"
|
||||||
|
"Tags,ProviderIds,ParentId,RemoteTrailers,SpecialEpisodeNumbers")
|
||||||
|
}
|
||||||
|
return doUtils.downloadUrl(url, parameters=params)
|
||||||
|
|
||||||
def getSection(self, parentid, itemtype=None, sortby="SortName", basic=False):
|
def getSection(self, parentid, itemtype=None, sortby="SortName", basic=False):
|
||||||
|
|
||||||
doUtils = self.doUtils
|
doUtils = self.doUtils
|
||||||
|
|
|
@ -120,11 +120,12 @@ class VideoNodes(object):
|
||||||
'8': "sets",
|
'8': "sets",
|
||||||
'9': "genres",
|
'9': "genres",
|
||||||
'10': "random",
|
'10': "random",
|
||||||
'11': "recommended"
|
'11': "recommended",
|
||||||
}
|
}
|
||||||
mediatypes = {
|
mediatypes = {
|
||||||
# label according to nodetype per mediatype
|
# label according to nodetype per mediatype
|
||||||
'movies': {
|
'movies':
|
||||||
|
{
|
||||||
'1': tagname,
|
'1': tagname,
|
||||||
'2': 30174,
|
'2': 30174,
|
||||||
'4': 30177,
|
'4': 30177,
|
||||||
|
@ -132,9 +133,11 @@ class VideoNodes(object):
|
||||||
'8': 20434,
|
'8': 20434,
|
||||||
'9': 135,
|
'9': 135,
|
||||||
'10': 30229,
|
'10': 30229,
|
||||||
'11': 30230},
|
'11': 30230
|
||||||
|
},
|
||||||
|
|
||||||
'tvshows': {
|
'tvshows':
|
||||||
|
{
|
||||||
'1': tagname,
|
'1': tagname,
|
||||||
'2': 30170,
|
'2': 30170,
|
||||||
'3': 30175,
|
'3': 30175,
|
||||||
|
@ -143,15 +146,23 @@ class VideoNodes(object):
|
||||||
'7': 30179,
|
'7': 30179,
|
||||||
'9': 135,
|
'9': 135,
|
||||||
'10': 30229,
|
'10': 30229,
|
||||||
'11': 30230},
|
'11': 30230
|
||||||
|
},
|
||||||
|
|
||||||
'homevideos': {
|
'homevideos':
|
||||||
|
{
|
||||||
'1': tagname,
|
'1': tagname,
|
||||||
'2': 30170},
|
'2': 30251,
|
||||||
|
'11': 30253
|
||||||
|
},
|
||||||
|
|
||||||
'photos': {
|
'photos':
|
||||||
|
{
|
||||||
'1': tagname,
|
'1': tagname,
|
||||||
'2': 30170},
|
'2': 30252,
|
||||||
|
'8': 30255,
|
||||||
|
'11': 30254
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
nodes = mediatypes[mediatype]
|
nodes = mediatypes[mediatype]
|
||||||
|
@ -169,18 +180,12 @@ class VideoNodes(object):
|
||||||
label = stringid
|
label = stringid
|
||||||
|
|
||||||
# Set window properties
|
# Set window properties
|
||||||
if mediatype == "homevideos" and nodetype == "all":
|
if (mediatype == "homevideos" or mediatype == "photos") and nodetype == "all":
|
||||||
# Custom query
|
# Custom query
|
||||||
path = "plugin://plugin.video.emby/?id=%s&mode=browsecontent&type=homevideos" % tagname
|
path = "plugin://plugin.video.emby/?id=%s&mode=browsecontent&type=%s" %(tagname,mediatype)
|
||||||
elif mediatype == "homevideos" and nodetype == "recent":
|
elif (mediatype == "homevideos" or mediatype == "photos"):
|
||||||
# Custom query
|
# Custom query
|
||||||
path = "plugin://plugin.video.emby/?id=%s&mode=browsecontent&type=homevideos&filter=recent" % tagname
|
path = "plugin://plugin.video.emby/?id=%s&mode=browsecontent&type=%s&filter=%s" %(tagname,mediatype,nodetype)
|
||||||
elif mediatype == "photos" and nodetype == "all":
|
|
||||||
# Custom query
|
|
||||||
path = "plugin://plugin.video.emby/?id=%s&mode=browsecontent&type=photos" % tagname
|
|
||||||
elif mediatype == "photos" and nodetype == "recent":
|
|
||||||
# Custom query
|
|
||||||
path = "plugin://plugin.video.emby/?id=%s&mode=browsecontent&type=photos&filter=recent" % tagname
|
|
||||||
elif nodetype == "nextepisodes":
|
elif nodetype == "nextepisodes":
|
||||||
# Custom query
|
# Custom query
|
||||||
path = "plugin://plugin.video.emby/?id=%s&mode=nextup&limit=25" % tagname
|
path = "plugin://plugin.video.emby/?id=%s&mode=nextup&limit=25" % tagname
|
||||||
|
|
Loading…
Reference in a new issue