Exemple #1
0
 def __init__(self,
              url,
              clip=None,
              width=640,
              height=480,
              live=False,
              title=None,
              subtitle=None,
              summary=None,
              duration=None,
              thumb=None,
              art=None,
              **kwargs):
     if isinstance(url, basestring):
         final_url = "http://www.plexapp.com/player/player.php" + \
           "?url=" + String.Quote(url) + \
           "&clip=" + String.Quote(clip) + \
           "&width=" + str(width) + \
           "&height=" + str(height) + \
           "&live="
         if live:
             final_url += "true"
         else:
             final_url += "false"
     else:
         final_url = url
     WebVideoItem.__init__(self,
                           final_url,
                           title=title,
                           subtitle=subtitle,
                           summary=summary,
                           duration=duration,
                           thumb=thumb,
                           art=art,
                           **kwargs)
Exemple #2
0
 def __init__(self,
              url,
              width=720,
              height=576,
              title=None,
              subtitle=None,
              summary=None,
              duration=None,
              thumb=None,
              art=None,
              **kwargs):
     if isinstance(url, basestring):
         final_url = "http://www.plexapp.com/player/silverlight.php" + \
           "?stream=" + String.Quote(url) + \
           "&width=" + str(width) + \
           "&height=" + str(height)
     else:
         final_url = url
     WebVideoItem.__init__(self,
                           final_url,
                           title=title,
                           subtitle=subtitle,
                           summary=summary,
                           duration=duration,
                           thumb=thumb,
                           art=art,
                           **kwargs)
Exemple #3
0
 def __init__(self,
              url,
              title=None,
              subtitle=None,
              summary=None,
              duration=None,
              thumb=None,
              art=None,
              **kwargs):
     if Plugin.LastPrefix: prefix = Plugin.LastPrefix
     else: prefix = Plugin.Prefixes()[0]
     if isinstance(url, basestring):
         key = "plex://127.0.0.1/video/:/webkit?url=%s&prefix=%s" % (
             String.Quote(url, usePlus=True), prefix)
     else:
         key = url
     XMLObject.__init__(self,
                        key=key,
                        title=title,
                        subtitle=subtitle,
                        summary=summary,
                        duration=duration,
                        thumb=thumb,
                        art=art,
                        **kwargs)
     self.tagName = "Video"
Exemple #4
0
 def ToElement(self):
     el = XML.Element(self.tagName)
     for key in self.__dict__:
         if key[0] != "_" and self.__dict__[
                 key].__class__.__name__ != "function" and key != "tagName" and self.__dict__[
                     key] != None:
             value = self.__dict__[key]
             if key == "ratingKey":
                 el.set(
                     key,
                     String.Quote(String.Encode(unicode(
                         self.__dict__[key]))))
             elif value == True:
                 el.set(key, "1")
             elif value == False:
                 el.set(key, "0")
             else:
                 el.set(key, unicode(self.__dict__[key]))
     return el