コード例 #1
0
ファイル: addon.py プロジェクト: boogieeeee/repository.boogie
 def index(self):
     for [adn, aid, desc] in addons:
         if not addon.has_addon(aid):
             install = "[COLOR red][not installed][/COLOR]"
         else:
             install = "[COLOR green][installed][/COLOR]"
         name = "%s %s - %s" % (install, adn, desc)
         self.item(name).call()
コード例 #2
0
 def geturls(self, link, headers=None):
     if not addon.has_addon('plugin.video.youtube'):
         yield
     up = urlparse.urlparse(link)
     dom = up.netloc.lower()
     if "dailymotion.com" in dom:
         vid = up.path.split("/")[-1]
         yield "plugin://plugin.video.dailymotion_com/?url=%s&mode=playLiveVideo" % vid
     else:
         yield
コード例 #3
0
 def geturls(self, link, headers=None):
     if addon.has_addon('program.plexus'):
         mode = 0
         if link.lower().startswith("acestream://"):
             mode = 1
         elif link.lower().startswith("sop://"):
             mode = 2
         if not mode:
             yield
         query = {"url": link, "mode": mode, "name": "Acestream"}
         yield "plugin://program.plexus/?" + urlencode(query)
コード例 #4
0
 def geturls(self, link, headers=None):
     if not addon.has_addon('plugin.video.youtube'):
         yield
     up = urlparse.urlparse(link)
     dom = up.netloc.lower()
     if dom == "youtube.com" or dom.startswith("www.youtube.com"):
         if up.path.startswith("/embed/"):
             vid = up.path.split("/")[2]
         else:
             vid = urlparse.parse_qs(up.query)["v"][0]
     elif dom in ["youtu.be", "www.youtu.be"]:
         vid = up.path[1:]
     else:
         yield
     yield "plugin://plugin.video.youtube/play/?video_id=%s" % vid
コード例 #5
0
 def geturls(self, link, headers=None):
     if not addon.has_addon('plugin.video.elementum'):
         yield
     if link.lower().startswith("magnet:?") or link.lower().endswith(
             ".torrent"):
         yield "plugin://plugin.video.elementum/play?uri=%s" % link