Renamed to plugin.video.plexkodiconnect. Adjusted addon.xml

This commit is contained in:
tomkat83 2015-12-27 11:49:14 +01:00
parent e9863b5aa3
commit 962fe6c605
12 changed files with 63 additions and 66 deletions

View file

@ -1,14 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.emby"
name="Emby"
<addon id="plugin.video.plexkodiconnect"
name="PlexKodiConnect"
version="1.1.67"
provider-name="Emby.media">
provider-name="tomkat83">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.requests" version="2.3.0" />
<import addon="plugin.video.emby.movies" version="0.01" />
<import addon="plugin.video.emby.tvshows" version="0.01" />
<import addon="plugin.video.emby.musicvideos" version="0.01" />
</requires>
<extension point="xbmc.python.pluginsource"
library="default.py">
@ -21,9 +18,9 @@
<language>en</language>
<license>GNU GENERAL PUBLIC LICENSE. Version 2, June 1991</license>
<forum></forum>
<website>http://mediabrowser.tv/</website>
<website>https://github.com/tomkat83/PlexKodiConnect</website>
<source></source>
<summary lang="en"></summary>
<description lang="en">Welcome to Emby for Kodi A whole new way to manage and view your media library. The Emby addon for Kodi combines the best of Kodi - ultra smooth navigation, beautiful UIs and playback of any file under the sun, and Emby - the most powerful fully open source multi-client media metadata indexer and server.&#10;&#10;Emby for Kodi is the absolute best way to enjoy the incredible Kodi playback engine combined with the power of Emby's centralized database. Features: Direct integration with the Kodi library for native Kodi speed Instant synchronization with the Emby server Full support for Movie, TV and Music collections Emby Server direct stream and transcoding support - use Kodi when you are away from home!</description>
<description lang="en">To be done</description>
</extension>
</addon>

View file

@ -12,7 +12,7 @@ import xbmcgui
#################################################################################################
addon_ = xbmcaddon.Addon(id='plugin.video.emby')
addon_ = xbmcaddon.Addon(id='plugin.video.plexkodiconnect')
addon_path = addon_.getAddonInfo('path').decode('utf-8')
base_resource = xbmc.translatePath(os.path.join(addon_path, 'resources', 'lib')).decode('utf-8')
sys.path.append(base_resource)
@ -86,7 +86,7 @@ class Main:
else:
# Other functions
if mode == "settings":
xbmc.executebuiltin('Addon.OpenSettings(plugin.video.emby)')
xbmc.executebuiltin('Addon.OpenSettings(plugin.video.plexkodiconnect)')
elif mode in ("manualsync", "repair"):
if utils.window('emby_dbScan') != "true":
import librarysync
@ -108,7 +108,7 @@ class Main:
if ( __name__ == "__main__" ):
xbmc.log('plugin.video.emby started')
xbmc.log('plugin.video.plexkodiconnect started')
if enableProfiling:
import cProfile
@ -129,4 +129,4 @@ if ( __name__ == "__main__" ):
else:
Main()
xbmc.log('plugin.video.emby stopped')
xbmc.log('plugin.video.plexkodiconnect stopped')

View file

@ -33,7 +33,7 @@ class ClientInfo():
def getAddonId(self):
return "plugin.video.emby"
return "plugin.video.plexkodiconnect"
def getVersion(self):

View file

@ -46,13 +46,13 @@ def resetAuth():
utils.logMsg("EMBY", "Reset login attempts.", 1)
utils.window('emby_serverStatus', value="Auth")
else:
xbmc.executebuiltin('Addon.OpenSettings(plugin.video.emby)')
xbmc.executebuiltin('Addon.OpenSettings(plugin.video.plexkodiconnect)')
def addDirectoryItem(label, path, folder=True):
li = xbmcgui.ListItem(label, path=path)
li.setThumbnailImage("special://home/addons/plugin.video.emby/icon.png")
li.setArt({"fanart":"special://home/addons/plugin.video.emby/fanart.jpg"})
li.setArt({"landscape":"special://home/addons/plugin.video.emby/fanart.jpg"})
li.setThumbnailImage("special://home/addons/plugin.video.plexkodiconnect/icon.png")
li.setArt({"fanart":"special://home/addons/plugin.video.plexkodiconnect/fanart.jpg"})
li.setArt({"landscape":"special://home/addons/plugin.video.plexkodiconnect/fanart.jpg"})
xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=path, listitem=li, isFolder=folder)
def doMainListing():
@ -71,26 +71,26 @@ def doMainListing():
addDirectoryItem(label, path)
# some extra entries for settings and stuff. TODO --> localize the labels
addDirectoryItem("Network credentials", "plugin://plugin.video.emby/?mode=passwords", False)
addDirectoryItem("Settings", "plugin://plugin.video.emby/?mode=settings", False)
addDirectoryItem("Add user to session", "plugin://plugin.video.emby/?mode=adduser", False)
#addDirectoryItem("Cache all images to Kodi texture cache (advanced)", "plugin://plugin.video.emby/?mode=texturecache")
addDirectoryItem("Network credentials", "plugin://plugin.video.plexkodiconnect/?mode=passwords", False)
addDirectoryItem("Settings", "plugin://plugin.video.plexkodiconnect/?mode=settings", False)
addDirectoryItem("Add user to session", "plugin://plugin.video.plexkodiconnect/?mode=adduser", False)
#addDirectoryItem("Cache all images to Kodi texture cache (advanced)", "plugin://plugin.video.plexkodiconnect/?mode=texturecache")
addDirectoryItem(
label="Refresh Emby playlists",
path="plugin://plugin.video.emby/?mode=refreshplaylist",
path="plugin://plugin.video.plexkodiconnect/?mode=refreshplaylist",
folder=False)
addDirectoryItem("Perform manual sync", "plugin://plugin.video.emby/?mode=manualsync", False)
addDirectoryItem("Perform manual sync", "plugin://plugin.video.plexkodiconnect/?mode=manualsync", False)
addDirectoryItem(
label="Repair local database (force update all content)",
path="plugin://plugin.video.emby/?mode=repair",
path="plugin://plugin.video.plexkodiconnect/?mode=repair",
folder=False)
addDirectoryItem(
label="Perform local database reset (full resync)",
path="plugin://plugin.video.emby/?mode=reset",
path="plugin://plugin.video.plexkodiconnect/?mode=reset",
folder=False)
addDirectoryItem(
label="Sync Emby Theme Media to Kodi",
path="plugin://plugin.video.emby/?mode=thememedia",
path="plugin://plugin.video.plexkodiconnect/?mode=thememedia",
folder=False)
xbmcplugin.endOfDirectory(int(sys.argv[1]))
@ -152,7 +152,7 @@ def addUser():
dialog.notification(
heading="Success!",
message="%s removed from viewing session" % selected,
icon="special://home/addons/plugin.video.emby/icon.png",
icon="special://home/addons/plugin.video.plexkodiconnect/icon.png",
time=1000)
# clear picture
@ -185,7 +185,7 @@ def addUser():
dialog.notification(
heading="Success!",
message="%s added to viewing session" % selected,
icon="special://home/addons/plugin.video.emby/icon.png",
icon="special://home/addons/plugin.video.plexkodiconnect/icon.png",
time=1000)
except:
@ -233,7 +233,7 @@ def getThemeMedia():
return
library = xbmc.translatePath(
"special://profile/addon_data/plugin.video.emby/library/").decode('utf-8')
"special://profile/addon_data/plugin.video.plexkodiconnect/library/").decode('utf-8')
# Create library directory
if not xbmcvfs.exists(library):
xbmcvfs.mkdir(library)
@ -279,7 +279,7 @@ def getThemeMedia():
# Get paths for theme videos
for itemId in itemIds:
nfo_path = xbmc.translatePath(
"special://profile/addon_data/plugin.video.emby/library/%s/" % itemIds[itemId])
"special://profile/addon_data/plugin.video.plexkodiconnect/library/%s/" % itemIds[itemId])
# Create folders for each content
if not xbmcvfs.exists(nfo_path):
xbmcvfs.mkdir(nfo_path)
@ -340,7 +340,7 @@ def getThemeMedia():
continue
nfo_path = xbmc.translatePath(
"special://profile/addon_data/plugin.video.emby/library/%s/" % musicitemIds[itemId])
"special://profile/addon_data/plugin.video.plexkodiconnect/library/%s/" % musicitemIds[itemId])
# Create folders for each content
if not xbmcvfs.exists(nfo_path):
xbmcvfs.mkdir(nfo_path)
@ -371,7 +371,7 @@ def getThemeMedia():
dialog.notification(
heading="Emby for Kodi",
message="Themes added!",
icon="special://home/addons/plugin.video.emby/icon.png",
icon="special://home/addons/plugin.video.plexkodiconnect/icon.png",
time=1000,
sound=False)
@ -388,7 +388,7 @@ def refreshPlaylist():
dialog.notification(
heading="Emby for Kodi",
message="Emby playlist refreshed!",
icon="special://home/addons/plugin.video.emby/icon.png",
icon="special://home/addons/plugin.video.plexkodiconnect/icon.png",
time=1000,
sound=False)
except Exception as e:
@ -396,7 +396,7 @@ def refreshPlaylist():
dialog.notification(
heading="Emby for Kodi",
message="Emby playlist refresh failed!",
icon="special://home/addons/plugin.video.emby/icon.png",
icon="special://home/addons/plugin.video.plexkodiconnect/icon.png",
time=1000,
sound=False)

View file

@ -222,7 +222,7 @@ class Items(object):
xbmcgui.Dialog().notification(
heading="Emby for Kodi",
message="Added: %s" % name,
icon="special://home/addons/plugin.video.emby/icon.png",
icon="special://home/addons/plugin.video.plexkodiconnect/icon.png",
sound=False)
@ -333,7 +333,7 @@ class Movies(Items):
% itemid
)
result = self.doUtils.downloadUrl(url)
trailer = "plugin://plugin.video.emby/trailer/?id=%s&mode=play" % result[0]['Id']
trailer = "plugin://plugin.video.plexkodiconnect/trailer/?id=%s&mode=play" % result[0]['Id']
else:
# Try to get the youtube trailer
try:
@ -379,7 +379,7 @@ class Movies(Items):
utils.window('emby_pathverified', value="true")
else:
# Set plugin path and media flags using real filename
path = "plugin://plugin.video.emby.movies/"
path = "plugin://plugin.video.plexkodiconnect.movies/"
params = {
'filename': filename.encode('utf-8'),
@ -723,7 +723,7 @@ class HomeVideos(Items):
utils.window('emby_pathverified', value="true")
else:
# Set plugin path and media flags using real filename
path = "plugin://plugin.video.emby.movies/"
path = "plugin://plugin.video.plexkodiconnect.movies/"
params = {
'filename': filename.encode('utf-8'),
@ -980,7 +980,7 @@ class MusicVideos(Items):
utils.window('emby_pathverified', value="true")
else:
# Set plugin path and media flags using real filename
path = "plugin://plugin.video.emby.musicvideos/"
path = "plugin://plugin.video.plexkodiconnect.musicvideos/"
params = {
'filename': filename.encode('utf-8'),
@ -1317,7 +1317,7 @@ class TVShows(Items):
utils.window('emby_pathverified', value="true")
else:
# Set plugin path
toplevelpath = "plugin://plugin.video.emby.tvshows/"
toplevelpath = "plugin://plugin.video.plexkodiconnect.tvshows/"
path = "%s%s/" % (toplevelpath, itemid)
@ -1558,7 +1558,7 @@ class TVShows(Items):
utils.window('emby_pathverified', value="true")
else:
# Set plugin path and media flags using real filename
path = "plugin://plugin.video.emby.tvshows/%s/" % seriesId
path = "plugin://plugin.video.plexkodiconnect.tvshows/%s/" % seriesId
params = {
'filename': filename.encode('utf-8'),
@ -1678,7 +1678,7 @@ class TVShows(Items):
kodi_db.addPlaystate(fileid, resume, total, playcount, dateplayed)
if not self.directpath and resume:
# Create additional entry for widgets. This is only required for plugin/episode.
temppathid = kodi_db.getPath("plugin://plugin.video.emby.tvshows/")
temppathid = kodi_db.getPath("plugin://plugin.video.plexkodiconnect.tvshows/")
tempfileid = kodi_db.addFile(filename, temppathid)
query = ' '.join((
@ -1732,7 +1732,7 @@ class TVShows(Items):
if not self.directpath and not resume:
# Make sure there's no other bookmarks created by widget.
filename = kodi_db.getFile(fileid)
kodi_db.removeFile("plugin://plugin.video.emby.tvshows/", filename)
kodi_db.removeFile("plugin://plugin.video.plexkodiconnect.tvshows/", filename)
emby_db.updateReference(itemid, checksum)
def remove(self, itemid):

View file

@ -297,7 +297,7 @@ class LibrarySync(threading.Thread):
heading="Emby for Kodi",
message="%s completed in: %s!" %
(message, str(elapsedtotal).split('.')[0]),
icon="special://home/addons/plugin.video.emby/icon.png",
icon="special://home/addons/plugin.video.plexkodiconnect/icon.png",
sound=False)
return True

View file

@ -120,7 +120,7 @@ class PlayUtils():
xbmcgui.Dialog().notification(
heading="Emby server",
message="Unable to direct play.",
icon="special://home/addons/plugin.video.emby/icon.png",
icon="special://home/addons/plugin.video.plexkodiconnect/icon.png",
sound=False)
elif utils.settings('playFromStream') != "true":
# Permanently set direct stream as true
@ -130,7 +130,7 @@ class PlayUtils():
heading="Emby server",
message=("Direct play failed 3 times. Enabled play "
"from HTTP in the add-on settings."),
icon="special://home/addons/plugin.video.emby/icon.png",
icon="special://home/addons/plugin.video.plexkodiconnect/icon.png",
sound=False)
return False

View file

@ -52,7 +52,7 @@ def window(property, value=None, clear=False, windowid=10000):
def settings(setting, value=None):
# Get or add addon setting
addon = xbmcaddon.Addon(id='plugin.video.emby')
addon = xbmcaddon.Addon(id='plugin.video.plexkodiconnect')
if value is not None:
addon.setSetting(setting, value)
@ -61,7 +61,7 @@ def settings(setting, value=None):
def language(stringid):
# Central string retrieval
addon = xbmcaddon.Addon(id='plugin.video.emby')
addon = xbmcaddon.Addon(id='plugin.video.plexkodiconnect')
string = addon.getLocalizedString(stringid)
return string
@ -377,7 +377,7 @@ def passwordsXML():
xbmcgui.Dialog().notification(
heading="Emby for Kodi",
message="%s removed from passwords.xml!" % credentials,
icon="special://home/addons/plugin.video.emby/icon.png",
icon="special://home/addons/plugin.video.plexkodiconnect/icon.png",
time=1000,
sound=False)
return
@ -436,7 +436,7 @@ def passwordsXML():
dialog.notification(
heading="Emby for Kodi",
message="%s added to passwords.xml!" % server,
icon="special://home/addons/plugin.video.emby/icon.png",
icon="special://home/addons/plugin.video.plexkodiconnect/icon.png",
time=1000,
sound=False)

View file

@ -48,7 +48,7 @@ class VideoNodes(object):
root = etree.Element('node', attrib={'order': "%s" % order, 'type': "folder"})
etree.SubElement(root, 'label').text = label
etree.SubElement(root, 'icon').text = "special://home/addons/plugin.video.emby/icon.png"
etree.SubElement(root, 'icon').text = "special://home/addons/plugin.video.plexkodiconnect/icon.png"
return root
@ -164,13 +164,13 @@ class VideoNodes(object):
# Set window properties
if nodetype == "nextupepisodes":
# Custom query
path = "plugin://plugin.video.emby/?id=%s&mode=nextup&limit=25" % tagname
path = "plugin://plugin.video.plexkodiconnect/?id=%s&mode=nextup&limit=25" % tagname
elif kodiversion == 14 and nodetype == "recentepisodes":
# Custom query
path = "plugin://plugin.video.emby/?id=%s&mode=recentepisodes&limit=25" % tagname
path = "plugin://plugin.video.plexkodiconnect/?id=%s&mode=recentepisodes&limit=25" % tagname
elif kodiversion == 14 and nodetype == "inprogressepisodes":
# Custom query
path = "plugin://plugin.video.emby/?id=%s&mode=inprogressepisodes&limit=25"% tagname
path = "plugin://plugin.video.plexkodiconnect/?id=%s&mode=inprogressepisodes&limit=25"% tagname
else:
path = "library://video/Emby - %s/%s_%s.xml" % (dirname, cleantagname, nodetype)
windowpath = "ActivateWindow(Video, %s, return)" % path
@ -307,7 +307,7 @@ class VideoNodes(object):
if itemtype == "channels":
root = self.commonRoot(order=1, label=label, tagname=tagname, roottype=2)
etree.SubElement(root, 'path').text = "plugin://plugin.video.emby/?id=0&mode=channels"
etree.SubElement(root, 'path').text = "plugin://plugin.video.plexkodiconnect/?id=0&mode=channels"
else:
root = self.commonRoot(order=1, label=label, tagname=tagname)
etree.SubElement(root, 'order', {'direction': "ascending"}).text = "sorttitle"

View file

@ -87,7 +87,7 @@ class WebSocket_Client(threading.Thread):
dialog.notification(
heading="Emby for Kodi",
message="Adding %s items to playlist." % len(itemIds),
icon="special://home/addons/plugin.video.emby/icon.png",
icon="special://home/addons/plugin.video.plexkodiconnect/icon.png",
sound=False)
startat = data.get('StartPositionTicks', 0)
pl.playAll(itemIds, startat)
@ -96,7 +96,7 @@ class WebSocket_Client(threading.Thread):
dialog.notification(
heading="Emby for Kodi",
message="Queueing %s items to playlist." % len(itemIds),
icon="special://home/addons/plugin.video.emby/icon.png",
icon="special://home/addons/plugin.video.plexkodiconnect/icon.png",
sound=False)
newplaylist = pl.modifyPlaylist(itemIds)
player = xbmc.Player()
@ -199,7 +199,7 @@ class WebSocket_Client(threading.Thread):
xbmcgui.Dialog().notification(
heading=header,
message=text,
icon="special://home/addons/plugin.video.emby/icon.png",
icon="special://home/addons/plugin.video.plexkodiconnect/icon.png",
time=4000)
elif command == "SendString":
@ -251,7 +251,7 @@ class WebSocket_Client(threading.Thread):
xbmcgui.Dialog().notification(
heading="Emby server",
message="Server is restarting.",
icon="special://home/addons/plugin.video.emby/icon.png")
icon="special://home/addons/plugin.video.plexkodiconnect/icon.png")
elif messageType == "UserConfigurationUpdated":
# Update user data set in userclient

View file

@ -19,7 +19,7 @@
<setting type="sep" />
<setting id="deviceNameOpt" label="Use altername Device Name" type="bool" default="false" />
<setting id="deviceName" label="30016" type="text" visible="eq(-1,true)" default="Kodi" />
<setting label="[COLOR yellow]Reset login attempts[/COLOR]" type="action" visible="eq(1,) + !eq(-15,)" action="RunPlugin(plugin://plugin.video.emby?mode=resetauth)" option="close" />
<setting label="[COLOR yellow]Reset login attempts[/COLOR]" type="action" visible="eq(1,) + !eq(-15,)" action="RunPlugin(plugin://plugin.video.plexkodiconnect?mode=resetauth)" option="close" />
<setting id="accessToken" type="text" visible="false" default="" />
<setting id="pathsub" type="bool" visible="false" default="false" />
</category>
@ -36,7 +36,7 @@
</category>
<category label="Playback"> <!-- Extra Sync options -->
<setting label="Network credentials" type="action" action="RunPlugin(plugin://plugin.video.emby?mode=passwords)" option="close" />
<setting label="Network credentials" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect?mode=passwords)" option="close" />
<setting type="sep" />
<setting id="enableCinema" type="bool" label="Enable Emby cinema mode" default="true" />
<setting id="askCinema" type="bool" label="Ask to play trailers" default="false" visible="eq(-1,true)" subsetting="true" />
@ -65,6 +65,6 @@
<setting id="connectMsg" type="bool" label="30249" default="true" />
<setting id="restartMsg" type="bool" label="Enable server message when it's restarting" default="false" />
<setting id="newContent" type="bool" label="Enable new content notification" default="false" />
<setting label="30239" type="action" action="RunPlugin(plugin://plugin.video.emby?mode=reset)" option="close" />
<setting label="30239" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect?mode=reset)" option="close" />
</category>
</settings>

View file

@ -14,7 +14,7 @@ import xbmcvfs
#################################################################################################
_addon = xbmcaddon.Addon(id='plugin.video.emby')
_addon = xbmcaddon.Addon(id='plugin.video.plexkodiconnect')
addon_path = _addon.getAddonInfo('path').decode('utf-8')
base_resource = xbmc.translatePath(os.path.join(addon_path, 'resources', 'lib')).decode('utf-8')
sys.path.append(base_resource)
@ -171,7 +171,7 @@ class Service():
xbmcgui.Dialog().notification(
heading="Emby server",
message="Welcome %s%s!" % (user.currUser, add),
icon="special://home/addons/plugin.video.emby/icon.png",
icon="special://home/addons/plugin.video.plexkodiconnect/icon.png",
time=2000,
sound=False)
@ -227,7 +227,7 @@ class Service():
xbmcgui.Dialog().notification(
heading="Error connecting",
message="%s Server is unreachable." % self.addonName,
icon="special://home/addons/plugin.video.emby/icon.png",
icon="special://home/addons/plugin.video.plexkodiconnect/icon.png",
sound=False)
self.server_online = False
@ -244,7 +244,7 @@ class Service():
xbmcgui.Dialog().notification(
heading="Emby server",
message="Server is online.",
icon="special://home/addons/plugin.video.emby/icon.png",
icon="special://home/addons/plugin.video.plexkodiconnect/icon.png",
time=2000,
sound=False)