diff --git a/default.py b/default.py
index 9485afe1..865e2ffa 100644
--- a/default.py
+++ b/default.py
@@ -27,21 +27,9 @@ except:
mode = None
##### Play items via plugin://plugin.video.emby/ #####
-if mode == "play":
- addonSettings = xbmcaddon.Addon(id='plugin.video.emby')
- selectAction = addonSettings.getSetting('selectAction')
- ##### info only working from widgets currently #####
- if selectAction == "1" and xbmc.getCondVisibility("Window.IsActive(home)"):
- entrypoint.showInfo(id)
- else:
- entrypoint.doPlayback(id)
-
-elif mode == "playnow":
+if mode == "play" or mode == "playnow":
entrypoint.doPlayback(id)
-
-elif mode == "person":
- entrypoint.showPersonInfo(id,name)
-
+
##### DO DATABASE RESET #####
elif mode == "reset":
utils.reset()
diff --git a/resources/lib/Entrypoint.py b/resources/lib/Entrypoint.py
index 891b49c4..06b3121b 100644
--- a/resources/lib/Entrypoint.py
+++ b/resources/lib/Entrypoint.py
@@ -28,29 +28,6 @@ def doPlayback(id):
item = PlaybackUtils().PLAY(result, setup="default")
-##### Show the item info window #####
-def showInfo(id):
- xbmcplugin.endOfDirectory(int(sys.argv[1]), cacheToDisc=False)
- addonSettings = xbmcaddon.Addon(id='plugin.video.emby')
- infoPage = ItemInfo("ItemInfo.xml", addonSettings.getAddonInfo('path'), "default", "720p")
- infoPage.setId(id)
- infoPage.doModal()
- del infoPage
-
-
-def showPersonInfo(id,basename):
- xbmcplugin.endOfDirectory(int(sys.argv[1]), cacheToDisc=False)
- addonSettings = xbmcaddon.Addon(id='plugin.video.emby')
- infoPage = PersonInfo("PersonInfo.xml", addonSettings.getAddonInfo('path'), "default", "720p")
- infoPage.setPersonName(basename)
- infoPage.doModal()
-
- if(infoPage.showMovies == True):
- xbmc.log("RUNNING_PLUGIN: " + infoPage.pluginCastLink)
- xbmc.executebuiltin(infoPage.pluginCastLink)
-
- del infoPage
-
#### DO RESET AUTH #####
def resetAuth():
# User tried login and failed too many times
diff --git a/resources/lib/ItemInfo.py b/resources/lib/ItemInfo.py
deleted file mode 100644
index d3a292e7..00000000
--- a/resources/lib/ItemInfo.py
+++ /dev/null
@@ -1,527 +0,0 @@
-
-import sys
-import xbmc
-import xbmcgui
-import xbmcaddon
-import json as json
-import urllib
-from DownloadUtils import DownloadUtils
-from API import API
-
-
-_MODE_BASICPLAY=12
-_MODE_CAST_LIST=14
-_MODE_PERSON_DETAILS=15
-CP_ADD_URL = 'plugin://plugin.video.couchpotato_manager/movies/add?title='
-CP_ADD_VIA_IMDB = 'plugin://plugin.video.couchpotato_manager/movies/add?imdb_id='
-
-
-class ItemInfo(xbmcgui.WindowXMLDialog):
-
- id = ""
- playUrl = ""
- trailerUrl = ""
- couchPotatoUrl = ""
- userid = ""
- server = ""
- downloadUtils = DownloadUtils()
- item= []
- isTrailer = False
-
- def __init__(self, *args, **kwargs):
- xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs)
- xbmc.log("WINDOW INITIALISED")
-
- def onInit(self):
- self.action_exitkeys_id = [10, 13]
- url = "{server}/mediabrowser/Users/{UserId}/Items/" + self.id + "?Fields=SeriesGenres,AirTime&format=json"
- item = self.downloadUtils.downloadUrl(url)
- self.item = item
-
- id = item.get("Id")
- WINDOW = xbmcgui.Window( 10025 )
- WINDOW.setProperty('ItemGUID', id)
-
- name = item.get("Name")
- image = API().getArtwork(item, "poster")
- fanArt = API().getArtwork(item, "BackdropNoIndicators")
- self.getControl(3001).setImage(fanArt)
-
- discart = API().getArtwork(item ,"Disc")
- logo = API().getArtwork(item ,"Logo")
- # calculate the percentage complete
- userData = item.get("UserData")
- cappedPercentage = 0
-
- if(userData != None):
- playBackTicks = float(userData.get("PlaybackPositionTicks"))
- if(playBackTicks != None and playBackTicks > 0):
- runTimeTicks = float(item.get("RunTimeTicks", "0"))
- if(runTimeTicks > 0):
- percentage = int((playBackTicks / runTimeTicks) * 100.0)
- cappedPercentage = percentage - (percentage % 10)
- if(cappedPercentage == 0):
- cappedPercentage = 10
- if(cappedPercentage == 100):
- cappedPercentage = 90
-
- try:
- watchedButton = self.getControl(3192)
- except:
- watchedButton = None
- if(watchedButton != None):
- if userData.get("Played") == True:
- watchedButton.setSelected(True)
- else:
- watchedButton.setSelected(False)
-
- try:
- dislikeButton = self.getControl(3193)
- except:
- dislikeButton = None
- if(dislikeButton != None):
- if userData.get("Likes") != None and userData.get("Likes") == False:
- dislikeButton.setSelected(True)
- else:
- dislikeButton.setSelected(False)
-
- try:
- likeButton = self.getControl(3194)
- except:
- likeButton = None
- if(likeButton != None):
- if userData.get("Likes") != None and userData.get("Likes") == True:
- likeButton.setSelected(True)
- else:
- likeButton.setSelected(False)
-
- try:
- favouriteButton = self.getControl(3195)
- except:
- favouriteButton = None
- if(favouriteButton != None):
- if userData.get("IsFavorite") == True:
- favouriteButton.setSelected(True)
- else:
- favouriteButton.setSelected(False)
-
-
- episodeInfo = ""
- type = item.get("Type")
- WINDOW.setProperty('ItemType', type)
- if(type == "Episode" or type == "Season"):
- WINDOW.setProperty('ItemGUID', item.get("SeriesId"))
- name = item.get("SeriesName") + ": " + name
- season = str(item.get("ParentIndexNumber")).zfill(2)
- episodeNum = str(item.get("IndexNumber")).zfill(2)
- episodeInfo = "S" + season + "xE" + episodeNum
- elif type == "Movie":
- if item.get("Taglines") != None and item.get("Taglines") != [] and item.get("Taglines")[0] != None:
- episodeInfo = item.get("Taglines")[0]
- elif type == "ChannelVideoItem":
- if item.get("ExtraType") != None:
- if item.get('ExtraType') == "Trailer":
- self.isTrailer = True
-
-
- self.playUrl = "plugin://plugin.video.emby/?id=%s&mode=playnow" % id
-
- try:
- trailerButton = self.getControl(3102)
- if(trailerButton != None):
- if not self.isTrailer and item.get("LocalTrailerCount") != None and item.get("LocalTrailerCount") > 0:
- itemTrailerUrl = "{server}/mediabrowser/Users/{UserId}/Items/" + id + "/LocalTrailers?format=json"
- jsonData = self.downloadUtils.downloadUrl(itemTrailerUrl)
- if(jsonData != ""):
- trailerItem = jsonData
- self.trailerUrl = "plugin://plugin.video.emby/trailer/?id=%s&mode=playnow" % trailerItem[0][u'Id']
- else:
- trailerButton.setEnabled(False)
- except:
- pass
-
- try:
- couchPotatoButton = self.getControl(3103)
- if(couchPotatoButton != None):
- if self.isTrailer and item.get("ProviderIds") != None and item.get("ProviderIds").get("Imdb") != None:
- self.couchPotatoUrl = CP_ADD_VIA_IMDB + item.get("ProviderIds").get("Imdb")
- elif self.isTrailer:
- self.couchPotatoUrl = CP_ADD_URL + name
- elif not self.isTrailer:
- couchPotatoButton.setEnabled(False)
- except:
- pass
-
- # all the media stream info
- mediaList = self.getControl(3220)
-
- mediaStreams = item.get("MediaStreams")
- if(mediaStreams != None):
- for mediaStream in mediaStreams:
- if(mediaStream.get("Type") == "Video"):
- videocodec = mediaStream.get("Codec")
- if(videocodec == "mpeg2video"):
- videocodec = "mpeg2"
- height = str(mediaStream.get("Height"))
- width = str(mediaStream.get("Width"))
- aspectratio = mediaStream.get("AspectRatio")
- fr = mediaStream.get("RealFrameRate")
- videoInfo = width + "x" + height + " " + videocodec + " " + str(round(fr, 2))
- listItem = xbmcgui.ListItem("Video:", videoInfo)
- mediaList.addItem(listItem)
- if(mediaStream.get("Type") == "Audio"):
- audiocodec = mediaStream.get("Codec")
- channels = mediaStream.get("Channels")
- lang = mediaStream.get("Language")
- audioInfo = audiocodec + " " + str(channels)
- if(lang != None and len(lang) > 0 and lang != "und"):
- audioInfo = audioInfo + " " + lang
- listItem = xbmcgui.ListItem("Audio:", audioInfo)
- mediaList.addItem(listItem)
- if(mediaStream.get("Type") == "Subtitle"):
- lang = mediaStream.get("Language")
- codec = mediaStream.get("Codec")
- subInfo = codec
- if(lang != None and len(lang) > 0 and lang != "und"):
- subInfo = subInfo + " " + lang
- listItem = xbmcgui.ListItem("Sub:", subInfo)
- mediaList.addItem(listItem)
-
-
- #for x in range(0, 10):
- # listItem = xbmcgui.ListItem("Test:", "Test 02 " + str(x))
- # mediaList.addItem(listItem)
-
- # add overview
- overview = item.get("Overview")
- self.getControl(3223).setText(overview)
-
- # add people
- peopleList = self.getControl(3230)
- people = item.get("People")
- director=''
- writer=''
- for person in people:
- displayName = person.get("Name")
- if person.get("Role") != None and person.get("Role") != '':
- role = "as " + person.get("Role")
- else:
- role = ''
- id = person.get("Id")
- tag = person.get("PrimaryImageTag")
-
- baseName = person.get("Name")
- baseName = baseName.replace(" ", "+")
- baseName = baseName.replace("&", "_")
- baseName = baseName.replace("?", "_")
- baseName = baseName.replace("=", "_")
-
- actionUrl = "plugin://plugin.video.emby?mode=person&name=" + baseName
-
- if(tag != None and len(tag) > 0):
- thumbPath = self.downloadUtils.imageUrl(id, "Primary", 0, 400, 400)
- listItem = xbmcgui.ListItem(label=displayName, label2=role, iconImage=thumbPath, thumbnailImage=thumbPath)
- else:
- listItem = xbmcgui.ListItem(label=displayName, label2=role)
-
- listItem.setProperty("ActionUrl", actionUrl)
- peopleList.addItem(listItem)
- if(person.get("Type") == "Director") and director =='':
- director = displayName
- if(tag != None and len(tag) > 0):
- thumbPath = self.downloadUtils.imageUrl(id, "Primary", 0, 580, 860)
- directorlistItem = xbmcgui.ListItem("Director:", label2=displayName, iconImage=thumbPath, thumbnailImage=thumbPath)
- else:
- directorlistItem = xbmcgui.ListItem("Director:", label2=displayName)
- directorlistItem.setProperty("ActionUrl", actionUrl)
- if(person.get("Type") == "Writing") and writer == '':
- writer = person.get("Name")
- if(tag != None and len(tag) > 0):
- thumbPath = self.downloadUtils.imageUrl(id, "Primary", 0, 580, 860)
- writerlistItem = xbmcgui.ListItem("Writer:", label2=displayName, iconImage=thumbPath, thumbnailImage=thumbPath)
- else:
- writerlistItem = xbmcgui.ListItem("Writer:", label2=displayName)
- writerlistItem.setProperty("ActionUrl", actionUrl)
- if(person.get("Type") == "Writer") and writer == '':
- writer = person.get("Name")
- if(tag != None and len(tag) > 0):
- thumbPath = self.downloadUtils.imageUrl(id, "Primary", 0, 580, 860)
- writerlistItem = xbmcgui.ListItem("Writer:", label2=displayName, iconImage=thumbPath, thumbnailImage=thumbPath)
- else:
- writerlistItem = xbmcgui.ListItem("Writer:", label2=displayName)
- writerlistItem.setProperty("ActionUrl", actionUrl)
- # add general info
- infoList = self.getControl(3226)
- listItem = xbmcgui.ListItem("Year:", str(item.get("ProductionYear")))
- infoList.addItem(listItem)
- listItem = xbmcgui.ListItem("Rating:", str(item.get("CommunityRating")))
- infoList.addItem(listItem)
- listItem = xbmcgui.ListItem("MPAA:", str(item.get("OfficialRating")))
- infoList.addItem(listItem)
- duration = str(int(item.get("RunTimeTicks", "0"))/(10000000*60))
- listItem = xbmcgui.ListItem("RunTime:", str(duration) + " Minutes")
- infoList.addItem(listItem)
-
- genre = ""
- genres = item.get("Genres")
- if genres != None and genres != []:
- for genre_string in genres:
- if genre == "": #Just take the first genre
- genre = genre_string
- else:
- genre = genre + " / " + genre_string
- elif item.get("SeriesGenres") != None and item.get("SeriesGenres") != '':
- genres = item.get("SeriesGenres")
- if genres != None and genres != []:
- for genre_string in genres:
- if genre == "": #Just take the first genre
- genre = genre_string
- else:
- genre = genre + " / " + genre_string
-
- genrelistItem = xbmcgui.ListItem("Genre:", genre)
- genrelistItem2 = xbmcgui.ListItem("Genre:", genre)
- infoList.addItem(genrelistItem)
-
- path = item.get('Path')
- pathlistItem = xbmcgui.ListItem("Path:", path)
- pathlistItem2 = xbmcgui.ListItem("Path:", path)
- infoList.addItem(pathlistItem)
-
- if item.get("CriticRating") != None:
- listItem = xbmcgui.ListItem("CriticRating:", str(item.get("CriticRating")))
- infoList.addItem(listItem)
-
- # Process Studio
- studio = ""
- if item.get("SeriesStudio") != None and item.get("SeriesStudio") != '':
- studio = item.get("SeriesStudio")
- if studio == "":
- studios = item.get("Studios")
- if(studios != None):
- for studio_string in studios:
- if studio=="": #Just take the first one
- temp=studio_string.get("Name")
- studio=temp.encode('utf-8')
-
- if studio != "":
- listItem = xbmcgui.ListItem("Studio:", studio)
- infoList.addItem(listItem)
-
- if item.get("Metascore") != None:
- listItem = xbmcgui.ListItem("Metascore:", str(item.get("Metascore")))
- infoList.addItem(listItem)
-
- playCount = 0
- if(userData != None and userData.get("Played") == True):
- playCount = 1
- listItem = xbmcgui.ListItem("PlayedCount:", str(playCount))
- infoList.addItem(listItem)
-
- if item.get("ProviderIds") != None and item.get("ProviderIds").get("Imdb") != None and type == "Movie":
- listItem = xbmcgui.ListItem("ID:", item.get("ProviderIds").get("Imdb"))
- infoList.addItem(listItem)
- elif item.get("ProviderIds") != None and item.get("ProviderIds").get("Tvdb") != None and type == "Series":
- listItem = xbmcgui.ListItem("ID:", item.get("ProviderIds").get("Tvdb"))
- infoList.addItem(listItem)
- elif (type == "Episode" or type == "Season"):
- url = "{server}/mediabrowser/Users/{UserId}/Items/" + item.get("SeriesId") + "?Fields=SeriesGenres,AirTime&format=json"
- seriesitem = self.downloadUtils.downloadUrl(url)
-
- if seriesitem.get("ProviderIds") != None and seriesitem.get("ProviderIds").get("Tvdb") != None:
- listItem = xbmcgui.ListItem("ID:", seriesitem.get("ProviderIds").get("Tvdb"))
- infoList.addItem(listItem)
-
- # alternate list
- try:
- alternateList = self.getControl(3291)
- if alternateList != None:
- if directorlistItem != None:
- alternateList.addItem(directorlistItem)
- if writerlistItem != None:
- alternateList.addItem(writerlistItem)
- alternateList.addItem(genrelistItem2)
- if item.get("ProductionLocations") !=None and item.get("ProductionLocations") != []:
- listItem = xbmcgui.ListItem("Country:", item.get("ProductionLocations")[0])
- alternateList.addItem(listItem)
- elif item.get("AirTime") !=None:
- listItem = xbmcgui.ListItem("Air Time:", item.get("AirTime"))
- alternateList.addItem(listItem)
- if(item.get("PremiereDate") != None):
- premieredatelist = (item.get("PremiereDate")).split("T")
- premieredate = premieredatelist[0]
- listItem = xbmcgui.ListItem("Premiered Date:", premieredate)
- alternateList.addItem(listItem)
- alternateList.addItem(pathlistItem2)
-
- except:
- pass
-
- self.getControl(3000).setLabel(name)
- self.getControl(3003).setLabel(episodeInfo)
-
- try:
- discartImageControl = self.getControl(3091)
- artImageControl = self.getControl(3092)
- thumbImageControl = self.getControl(3093)
- logoImageControl = self.getControl(3094)
-
- if discartImageControl != None and artImageControl != None and thumbImageControl != None and logoImageControl != None:
-
- if logo != "":
- self.getControl(3094).setImage(logo)
- else:
- self.getControl(3000).setVisible(True)
-
- if discart != '':
- self.getControl(3091).setImage(discart)
- self.getControl(3092).setVisible(False)
- self.getControl(3093).setVisible(False)
- else:
- self.getControl(3091).setVisible(False)
- art = API().getArtwork(item,"Art")
- if (artImageControl != None):
- if art != '':
- self.getControl(3092).setImage(art)
- self.getControl(3093).setVisible(False)
- else:
- self.getControl(3092).setVisible(False)
- if (type == "Episode"):
- thumb = API().getArtwork(item,"Thumb3")
- else:
- thumb = API().getArtwork(item,"Thumb")
- if (thumbImageControl != None):
- if thumb != '':
- self.getControl(3093).setImage(thumb)
- else:
- self.getControl(3093).setVisible(False)
-
-
- except:
- pass
-
- if(type == "Episode"):
- # null_pointer - I have removed this in favor of letting the user chose from the setting and using the "poster" type in the above image url create
- #image = API().getArtwork(seriesitem, "Primary")
- seriesimage = API().getArtwork(item, "SeriesPrimary")
- try:
- self.getControl(3099).setImage(seriesimage)
- self.getControl(3009).setImage(image)
-
- except:
- pass
-
- if(cappedPercentage != None):
- self.getControl(3010).setImage("Progress\progress_" + str(cappedPercentage) + ".png")
- else:
- self.getControl(3011).setImage(image)
- if(cappedPercentage != None):
- self.getControl(3012).setImage("Progress\progress_" + str(cappedPercentage) + ".png")
-
- # disable play button
- if(type == "Season" or type == "Series"):
- self.setFocusId(3226)
- self.getControl(3002).setEnabled(False)
-
- def setId(self, id):
- self.id = id
-
- def onFocus(self, controlId):
- pass
-
- def doAction(self):
- pass
-
- def closeDialog(self):
- self.close()
-
- def onClick(self, controlID):
-
- if(controlID == 3002):
-
- # close all dialogs when playing an item
- xbmc.executebuiltin("Dialog.Close(all,true)")
-
- xbmc.executebuiltin("RunPlugin(" + self.playUrl + ")")
- self.close()
-
- elif(controlID == 3102):
-
- # close all dialogs when playing an item
- xbmc.executebuiltin("Dialog.Close(all,true)")
-
- xbmc.executebuiltin("RunPlugin(" + self.trailerUrl + ")")
- self.close()
-
- elif(controlID == 3103):
-
- # close all dialogs when playing an item
- xbmc.executebuiltin("Dialog.Close(all,true)")
- xbmc.executebuiltin("RunPlugin(" + self.couchPotatoUrl + ")")
-
- elif(controlID == 3230):
-
- peopleList = self.getControl(3230)
- item = peopleList.getSelectedItem()
- action = item.getProperty("ActionUrl")
-
- xbmc.log(action)
- xbmc.executebuiltin("RunPlugin(" + action + ")")
- elif(controlID == 3291):
-
- list = self.getControl(3291)
- item = list.getSelectedItem()
- action = item.getProperty("ActionUrl")
-
- xbmc.log(action)
- xbmc.executebuiltin("RunPlugin(" + action + ")")
- elif(controlID == 3192):
- url = '{server}/mediabrowser/Users/{UserId}/PlayedItems/' + self.id
- button = self.getControl(3192)
- watched = button.isSelected()
- if watched == True:
- self.postUrl(url)
- else:
- self.deleteUrl(url)
- self.onInit()
- elif(controlID == 3193):
- url = '{server}/mediabrowser/Users/{UserId}/Items/' + self.id + '/Rating'
- dislikebutton = self.getControl(3193)
- dislike = dislikebutton.isSelected()
- if dislike == True:
- url = url + '?likes=false'
- self.postUrl(url)
- else:
- self.deleteUrl(url)
- self.onInit()
- elif(controlID == 3194):
- url = '{server}/mediabrowser/Users/{UserId}/Items/' + self.id + '/Rating'
- likebutton = self.getControl(3194)
- like = likebutton.isSelected()
- if like == True:
- url = url + '?likes=true'
- self.postUrl(url)
- else:
- self.deleteUrl(url)
- self.onInit()
- elif(controlID == 3195):
- url = '{server}/mediabrowser/Users/{UserId}/FavoriteItems/' + self.id
- button = self.getControl(3195)
- favourite = button.isSelected()
- if favourite == True:
- self.postUrl(url)
- else:
- self.deleteUrl(url)
- self.onInit()
- elif(controlID == 3006):
- url = "{server}/mediabrowser/Users/{UserId}/PlayingItems/" + self.id + "/Progress?PositionTicks=0"
- self.postUrl(url)
- self.onInit()
- pass
-
- def postUrl (self,url):
- self.downloadUtils.downloadUrl(url, postBody="", type="POST")
-
- def deleteUrl (self,url):
- self.downloadUtils.downloadUrl(url, type="DELETE")
-
diff --git a/resources/lib/VideoNodes.py b/resources/lib/VideoNodes.py
index 8bc3357b..0327b8d6 100644
--- a/resources/lib/VideoNodes.py
+++ b/resources/lib/VideoNodes.py
@@ -44,7 +44,7 @@ class VideoNodes():
etree.ElementTree(root).write(nodefile)
#create tag node - all items
- nodefile = os.path.join(libraryPath, tagname + "_all.xml")
+ nodefile_root = os.path.join(libraryPath, tagname + "_all.xml")
root = etree.Element("node", {"order":"1", "type":"filter"})
etree.SubElement(root, "label").text = tagname
etree.SubElement(root, "match").text = "all"
@@ -59,9 +59,9 @@ class VideoNodes():
WINDOW.setProperty("Emby.nodes.%s.type" %str(windowPropId),type)
etree.SubElement(Rule, "value").text = tagname
try:
- etree.ElementTree(root).write(nodefile, xml_declaration=True)
+ etree.ElementTree(root).write(nodefile_root, xml_declaration=True)
except:
- etree.ElementTree(root).write(nodefile)
+ etree.ElementTree(root).write(nodefile_root)
#create tag node - recent items
nodefile = os.path.join(libraryPath, tagname + "_recent.xml")
@@ -154,9 +154,8 @@ class VideoNodes():
etree.SubElement(root, "label").text = label
etree.SubElement(root, "match").text = "all"
etree.SubElement(root, "content").text = "episodes"
+ etree.SubElement(root, "path").text = nodefile_root
etree.SubElement(root, "icon").text = "special://home/addons/plugin.video.emby/icon.png"
- Rule = etree.SubElement(root, "rule", {"field":"tag","operator":"is"})
- etree.SubElement(Rule, "value").text = tagname
etree.SubElement(root, "order", {"direction":"descending"}).text = "dateadded"
#set limit to 25 --> currently hardcoded --> TODO: add a setting for this ?
etree.SubElement(root, "limit").text = "25"
@@ -180,8 +179,7 @@ class VideoNodes():
etree.SubElement(root, "match").text = "all"
etree.SubElement(root, "content").text = "episodes"
etree.SubElement(root, "icon").text = "special://home/addons/plugin.video.emby/icon.png"
- Rule = etree.SubElement(root, "rule", {"field":"tag","operator":"is"})
- etree.SubElement(Rule, "value").text = tagname
+ etree.SubElement(root, "path").text = nodefile_root
#set limit to 25 --> currently hardcoded --> TODO: add a setting for this ?
etree.SubElement(root, "limit").text = "25"
Rule2 = etree.SubElement(root, "rule", {"field":"inprogress","operator":"true"})
@@ -200,8 +198,7 @@ class VideoNodes():
label = language(30179)
etree.SubElement(root, "label").text = label
etree.SubElement(root, "content").text = "episodes"
- path = "plugin://plugin.video.emby/?id=%s&mode=nextup&limit=25" %tagname
- etree.SubElement(root, "path").text = path
+ etree.SubElement(root, "path").text = nodefile_root
etree.SubElement(root, "icon").text = "special://home/addons/plugin.video.emby/icon.png"
WINDOW.setProperty("Emby.nodes.%s.nextepisodes.title" %str(windowPropId),label)
path = "library://video/Emby - %s/%s_nextup_episodes.xml"%(tagname,tagname)
diff --git a/resources/lib/WriteKodiMusicDB.py b/resources/lib/WriteKodiMusicDB.py
index 20b9ee8c..8ea1fa12 100644
--- a/resources/lib/WriteKodiMusicDB.py
+++ b/resources/lib/WriteKodiMusicDB.py
@@ -249,7 +249,7 @@ class WriteKodiMusicDB():
#link album to artist
artistid = None
- album_artists = None
+ album_artists = []
if MBitem.get("AlbumArtists"):
album_artists = MBitem.get("AlbumArtists")
elif MBitem.get("ArtistItems"):
@@ -366,19 +366,9 @@ class WriteKodiMusicDB():
filename = playurl.rsplit("/",1)[-1]
path = playurl.replace(filename,"")
else:
- #for transcoding we need to create a fake strm file because I couldn't figure out how to set a http or plugin path in the music DB
- playurl = "plugin://plugin.video.emby/music/?id=%s&mode=play" %MBitem["Id"]
- dataPath = os.path.join(addondir,"musicfiles" + os.sep)
- #create fake strm file
- if not xbmcvfs.exists(dataPath):
- xbmcvfs.mkdir(dataPath)
- filename = MBitem["Id"] + ".strm"
- path = dataPath
- strmFile = os.path.join(dataPath,filename)
- text_file = open(strmFile, "w")
- text_file.writelines(playurl)
- text_file.close()
-
+ #for transcoding we just use the server's streaming path because I couldn't figure out how to set a http or plugin path in the music DB
+ path = server + "/Audio/%s/" %MBitem["Id"]
+ filename = "stream.mp3"
#get the path
cursor.execute("SELECT idPath as pathid FROM path WHERE strPath = ?",(path,))
diff --git a/resources/lib/WriteKodiVideoDB.py b/resources/lib/WriteKodiVideoDB.py
index 4039c82d..b262d6e2 100644
--- a/resources/lib/WriteKodiVideoDB.py
+++ b/resources/lib/WriteKodiVideoDB.py
@@ -106,7 +106,7 @@ class WriteKodiVideoDB():
jsonData = downloadUtils.downloadUrl(itemTrailerUrl)
if(jsonData != ""):
trailerItem = jsonData
- trailerUrl = "plugin://plugin.video.emby/trailer/?id=%s&mode=playnow" % trailerItem[0][u'Id']
+ trailerUrl = "plugin://plugin.video.emby/trailer/?id=%s&mode=play" % trailerItem[0][u'Id']
if MBitem.get("DateCreated") != None:
dateadded = MBitem["DateCreated"].split('.')[0].replace('T', " ")
diff --git a/resources/settings.xml b/resources/settings.xml
index 96677c2c..fce2d68f 100644
--- a/resources/settings.xml
+++ b/resources/settings.xml
@@ -17,27 +17,27 @@
-
+
-
-
-
-
+
+
+
+
-
+
diff --git a/resources/skins/default/720p/ItemInfo.xml b/resources/skins/default/720p/ItemInfo.xml
deleted file mode 100644
index 64d100c2..00000000
--- a/resources/skins/default/720p/ItemInfo.xml
+++ /dev/null
@@ -1,415 +0,0 @@
-
-
- 3002
- 2
-
- 1
- 120
- 50
-
- dialogeffect
-
-
-
- 0
- 0
- 1040
- 600
- DialogBack.png
-
-
-
- 20
- 20
- 1000
- 560
- FF444444
-
-
-
- 30
- 25
- 950
- 20
- left
-
- font24_title
- FFFFFFFFFF
-
-
-
- 30
- 55
- 300
- 20
- left
-
- font18_title
- FFFFFFFFFF
-
-
-
-
- 40
- 130
- 250
- 140
- stretch
-
-
- 40
- 265
- 250
- 5
- -
- AAFFFFFF
- stretch
-
-
-
-
- 60
- 100
- 175
- 250
- stretch
-
-
- 60
- 345
- 175
- 5
- -
- AAFFFFFF
- stretch
-
-
-
- 30
- 380
- 240
- 120
- 3002
- 3221
- 3235
- 3002
- 3221
- 200
-
-
- 60
- 0
- 60
- 20
- font10
- right
- center
- blue
- selected
- ListItem.Label
-
-
- 65
- 0
- 180
- 20
- font10
- left
- center
- white
- white
- ListItem.Label2
-
-
-
-
- 0
- 0
- 240
- 20
- Control.HasFocus(3220)
- MenuItemFO.png
- VisibleFadeEffect
-
-
- 60
- 0
- 60
- 20
- font10
- right
- center
- blue
- selected
- ListItem.Label
-
-
- 65
- 0
- 180
- 20
- font10
- left
- center
- white
- white
- ListItem.Label2
-
-
-
-
- 270
- 380
- 20
- 120
- ScrollBarV.png
- ScrollBarV_bar.png
- ScrollBarV_bar_focus.png
- ScrollBarNib.png
- ScrollBarNib.png
- 3220
- 3226
- false
- vertical
-
-
-
- 310
- 380
- 415
- 120
- 3221
- 3235
- 3235
- 3002
- -
- 200
-
-
- 70
- 0
- 70
- 20
- font10
- right
- center
- blue
- selected
- ListItem.Label
-
-
- 75
- 0
- 340
- 20
- font10
- left
- center
- white
- white
- ListItem.Label2
-
-
-
-
- 0
- 0
- 400
- 20
- Control.HasFocus(3226)
- MenuItemFO.png
- VisibleFadeEffect
-
-
- 70
- 0
- 70
- 20
- font10
- right
- center
- blue
- selected
- ListItem.Label
-
-
- 75
- 0
- 340
- 20
- font10
- left
- center
- white
- white
- ListItem.Label2
-
-
-
-
-
-
- 320
- 100
- 400
- 250
- font12
-
- white
- 3235
- true
-
-
- 720
- 100
- 20
- 250
- ScrollBarV.png
- ScrollBarV_bar.png
- ScrollBarV_bar_focus.png
- ScrollBarNib.png
- ScrollBarNib.png
- 3226
- -
- 3230
- false
- vertical
-
-
-
- 760
- 100
- 245calc
- 450
- 3235
- 3231
- -
- -
- 3231
- 200
-
-
- 0
- 0
- 60
- 60
- $INFO[Listitem.Icon]
- scale
-
-
- 65
- 0
- 160
- 30
- font12
- left
- center
- blue
- selected
- ListItem.Label
-
-
- 65
- 30
- 160
- 30
- font10
- left
- center
- white
- white
- ListItem.Label2
-
-
-
-
- 0
- 0
- 60
- 60
- $INFO[Listitem.Icon]
- scale
-
-
- 60
- 0
- 160
- 30
- Control.HasFocus(3230)
- MenuItemFO.png
- VisibleFadeEffect
-
-
- 65
- 0
- 160
- 30
- font12
- left
- center
- blue
- selected
- ListItem.Label
-
-
- 65
- 30
- 160
- 30
- font10
- left
- center
- white
- white
- ListItem.Label2
-
-
-
-
- 985
- 100
- 20
- 450
- ScrollBarV.png
- ScrollBarV_bar.png
- ScrollBarV_bar_focus.png
- ScrollBarNib.png
- ScrollBarNib.png
- 3230
- -
- false
- vertical
-
-
-
- 30
- 520
- 150
- 40
- center
-
- font13
- -
- 3220
- 3220
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/skins/default/720p/PersonInfo.xml b/resources/skins/default/720p/PersonInfo.xml
deleted file mode 100644
index e05ca112..00000000
--- a/resources/skins/default/720p/PersonInfo.xml
+++ /dev/null
@@ -1,205 +0,0 @@
-
-
- 3010
- 2
-
- 1
- 120
- 50
-
- dialogeffect
-
-
- 0
- 0
- 1040
- 600
- DialogBack.png
-
-
-
- 20
- 20
- 1000
- 560
- $INFO[Skin.CurrentTheme,special://skin/backgrounds/,.jpg]
- ![Skin.HasSetting(UseCustomBackground) + !IsEmpty(Skin.String(CustomBackgroundPath))]
- VisibleFadeEffect
- FF444444
-
-
-
- Dialog Header image
- 40
- 16
- 960
- 40
- dialogheader.png
-
-
-
- header label
- 40
- 20
- 960
- 30
- font13_title
-
- center
- center
- selected
- black
-
-
-
-
-
- person name
- 30
- 65
- 550
- 100
- left
-
- font13
- white
-
-
-
- 30
- 120
- 250
- 250
- keep
-
-
-
- text
- 300
- 100
- 630
- 280
- left
-
- font12
- 3005
-
-
- 940
- 100
- 20
- 280
- ScrollBarV.png
- ScrollBarV_bar.png
- ScrollBarV_bar_focus.png
- ScrollBarNib.png
- ScrollBarNib.png
- 8
- 3001
- -
- 3010
- false
- vertical
-
-
-
-
- 40
- 390
- 940
- 170
- -
- -
- 3005
- 3011
- 3011
- 200
- horizontal
-
-
- 0
- 0
- 100
- 150
- $INFO[Listitem.Icon]
- button-nofocus.png
- 5
-
-
- 0
- 150
- 100
- 20
- left
- font10
- FFFFFFFFFF
-
-
-
-
-
- 0
- 0
- 100
- 150
- $INFO[Listitem.Icon]
- button-nofocus.png
- 5
-
-
- 0
- 0
- 100
- 150
- $INFO[Listitem.Icon]
- button-focus.png
- 5
- Control.HasFocus(3010)
-
-
- 0
- 150
- 100
- 20
- left
- font10
- FFFFFFFFFF
-
-
-
-
-
- 40
- 560
- 940
- 20
- ScrollBarH.png
- ScrollBarH_bar.png
- ScrollBarH_bar_focus.png
- ScrollBarNib.png
- ScrollBarNib.png
- 3010
- false
- horizontal
-
-
-
-
-