New API method for guid
This commit is contained in:
parent
7f20309dc5
commit
861f6213f1
1 changed files with 12 additions and 1 deletions
|
@ -41,7 +41,7 @@ from xbmcvfs import exists
|
||||||
import clientinfo as client
|
import clientinfo as client
|
||||||
from downloadutils import DownloadUtils as DU
|
from downloadutils import DownloadUtils as DU
|
||||||
from utils import window, settings, language as lang, try_decode, try_encode, \
|
from utils import window, settings, language as lang, try_decode, try_encode, \
|
||||||
unix_date_to_kodi, exists_dir, slugify, dialog
|
unix_date_to_kodi, exists_dir, slugify, dialog, escape_html
|
||||||
import PlexFunctions as PF
|
import PlexFunctions as PF
|
||||||
import plexdb_functions as plexdb
|
import plexdb_functions as plexdb
|
||||||
import variables as v
|
import variables as v
|
||||||
|
@ -365,6 +365,17 @@ class API(object):
|
||||||
genre.append(child.attrib['tag'])
|
genre.append(child.attrib['tag'])
|
||||||
return genre
|
return genre
|
||||||
|
|
||||||
|
def guid_html_escaped(self):
|
||||||
|
"""
|
||||||
|
Returns the 'guid' attribute, e.g.
|
||||||
|
'com.plexapp.agents.thetvdb://76648/2/4?lang=en'
|
||||||
|
as an HTML-escaped string or None
|
||||||
|
"""
|
||||||
|
answ = self.item.get('guid')
|
||||||
|
if answ is not None:
|
||||||
|
answ = escape_html(answ)
|
||||||
|
return answ
|
||||||
|
|
||||||
def provider(self, providername=None):
|
def provider(self, providername=None):
|
||||||
"""
|
"""
|
||||||
providername: e.g. 'imdb', 'tvdb'
|
providername: e.g. 'imdb', 'tvdb'
|
||||||
|
|
Loading…
Add table
Reference in a new issue