mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-05-13 21:05:08 +00:00
added support for channels
This commit is contained in:
parent
57156cfb1c
commit
c374b166bb
3 changed files with 29 additions and 13 deletions
|
@ -163,6 +163,8 @@ class PlayUtils():
|
|||
return '2147483' # max bit rate supported by server (max signed 32bit integer)
|
||||
|
||||
def fileExists(self, result):
|
||||
if not result.has_key("Path"):
|
||||
return False
|
||||
path=result.get("Path").encode('utf-8')
|
||||
if os.path.exists(path) == True:
|
||||
return True
|
||||
|
|
|
@ -1040,8 +1040,19 @@ class WriteKodiDB():
|
|||
#we need to copy over the default items
|
||||
import shutil
|
||||
shutil.copytree(xbmc.translatePath("special://xbmc/system/library/video"), xbmc.translatePath("special://userdata/library/video"))
|
||||
|
||||
libraryPath = xbmc.translatePath("special://userdata/library/video/emby/")
|
||||
|
||||
#create tag node for emby channels
|
||||
nodefile = os.path.join(xbmc.translatePath("special://userdata/library/video"), "emby_channels.xml")
|
||||
if not xbmcvfs.exists(nodefile):
|
||||
root = Element("node", {"order":"20", "type":"folder"})
|
||||
SubElement(root, "label").text = "Emby - Channels"
|
||||
SubElement(root, "path").text = "plugin://plugin.video.emby/?id=0&mode=channels"
|
||||
SubElement(root, "icon").text = "DefaultMovies.png"
|
||||
try:
|
||||
ET.ElementTree(root).write(nodefile, xml_declaration=True)
|
||||
except:
|
||||
ET.ElementTree(root).write(nodefile)
|
||||
|
||||
|
||||
if type == "movie":
|
||||
type = "movies"
|
||||
|
@ -1170,6 +1181,7 @@ class WriteKodiDB():
|
|||
ET.ElementTree(root).write(nodefile, xml_declaration=True)
|
||||
except:
|
||||
ET.ElementTree(root).write(nodefile)
|
||||
|
||||
|
||||
def updateBoxsetToKodiLibrary(self, boxsetmovie, boxset, connection, cursor):
|
||||
strSet = boxset["Name"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue