Пример #1
0
def main_menu():
    addDir(translate(40114), MainURL, 400, addonpath + art + "web-parsers-menu.png", 2, True)
    addDir(translate(40115), MainURL, 100, addonpath + art + "xml_lists.png", 2, True)
    addDir(translate(40144), MainURL, 200, addonpath + art + "Favorites-menu.png", 2, True)
    if "confluence" in xbmc.getSkinDir():
        addLink("", "", "p2p")
    if (
        xbmc.getCondVisibility("system.platform.windows")
        or xbmc.getCondVisibility("system.platform.linux")
        or xbmc.getCondVisibility("System.Platform.OSX")
        or xbmc.getCondVisibility("System.Platform.Android")
    ):
        addDir(
            "[COLOR orange]AceStream: [/COLOR]" + translate(40004),
            MainURL,
            4,
            addonpath + art + "acestream-menu-item.png",
            1,
            False,
        )
        addDir(
            "[COLOR orange]AceStream: [/COLOR]" + translate(600029),
            MainURL,
            6,
            addonpath + art + "acestream-menu-item.png",
            1,
            False,
        )
    if (
        xbmc.getCondVisibility("system.platform.windows")
        or xbmc.getCondVisibility("system.platform.linux")
        or xbmc.getCondVisibility("System.Platform.OSX")
        or xbmc.getCondVisibility("System.Platform.Android")
    ):
        addDir(
            "[COLOR orange]SopCast: [/COLOR]" + translate(40005),
            MainURL,
            3,
            addonpath + art + "sopcast-menu-item.png",
            1,
            False,
        )
        addDir(
            "[COLOR orange]SopCast: [/COLOR]" + translate(40006),
            MainURL,
            5,
            addonpath + art + "sopcast-menu-item.png",
            1,
            False,
        )
    if xbmc.getCondVisibility("System.Platform.IOS") or xbmc.getCondVisibility("System.Platform.ATV2"):
        addLink(translate(40056), "", addonpath + art + "processwarning.png")
    if "confluence" in xbmc.getSkinDir():
        addLink("", "", "p2p")
    addDir("[B]" + translate(40057) + "[/B]", MainURL, 300, addonpath + art + "settings_menu.png", 2, True)
    xbmc.executebuiltin("Container.SetViewMode(50)")
    # break_sopcast is a function used in windows to intentionally break the sopcast.exe setup by renaming one of its codec files. It's ran here to rename the file again in case it failed when played before
    sop.break_sopcast()
Пример #2
0
def main_menu():
      addDir(translate(40114),MainURL,400,addonpath + art + 'web-parsers-menu.png',2,True)
      addDir(translate(40115),MainURL,100,addonpath + art + 'xml_lists.png',2,True)
      addDir(translate(40144),MainURL,200,addonpath + art + 'Favorites-menu.png',2,True)
      addLink('','','p2p')
      if xbmc.getCondVisibility('system.platform.windows') or xbmc.getCondVisibility('system.platform.linux') or xbmc.getCondVisibility('System.Platform.OSX') or xbmc.getCondVisibility('System.Platform.Android'):
          addDir('[COLOR orange]AceStream: [/COLOR]' + translate(40004),MainURL,4,addonpath + art + 'acestream-menu-item.png',1,False)
          addDir('[COLOR orange]AceStream: [/COLOR]' + translate(600029),MainURL,6,addonpath + art + 'acestream-menu-item.png',1,False)
      if xbmc.getCondVisibility('system.platform.windows') or xbmc.getCondVisibility('system.platform.linux') or xbmc.getCondVisibility('System.Platform.OSX') or xbmc.getCondVisibility('System.Platform.Android'):
          addDir('[COLOR orange]SopCast: [/COLOR]' + translate(40005),MainURL,3,addonpath + art + 'sopcast-menu-item.png',1,False)
          addDir('[COLOR orange]SopCast: [/COLOR]' + translate(40006),MainURL,5,addonpath + art + 'sopcast-menu-item.png',1,False)
      if xbmc.getCondVisibility('System.Platform.IOS') or xbmc.getCondVisibility('System.Platform.ATV2'):
          addLink(translate(40056),'',addonpath + art + 'processwarning.png')
      addLink('','','p2p')
      addDir('[B]' + translate(40057) + '[/B]',MainURL,300,addonpath + art + 'settings_menu.png',2,True)       
      xbmc.executebuiltin("Container.SetViewMode(50)")
      #break_sopcast is a function used in windows to intentionally break the sopcast.exe setup by renaming one of its codec files. It's ran here to rename the file again in case it failed when played before
      sop.break_sopcast()
Пример #3
0
def main_menu():
      addDir(translate(40114),MainURL,400,addonpath + art + 'web-parsers-menu.png',2,True)
      addDir(translate(40115),MainURL,100,addonpath + art + 'xml_lists.png',2,True)
      addDir(translate(40144),MainURL,200,addonpath + art + 'Favorites-menu.png',2,True)
      if "confluence" in xbmc.getSkinDir(): addLink('','','p2p')
      if xbmc.getCondVisibility('system.platform.windows') or xbmc.getCondVisibility('system.platform.linux') or xbmc.getCondVisibility('System.Platform.OSX') or xbmc.getCondVisibility('System.Platform.Android'):
          addDir('[COLOR orange]AceStream: [/COLOR]' + translate(40004),MainURL,4,addonpath + art + 'acestream-menu-item.png',1,False)
          addDir('[COLOR orange]AceStream: [/COLOR]' + translate(600029),MainURL,6,addonpath + art + 'acestream-menu-item.png',1,False)
      if xbmc.getCondVisibility('system.platform.windows') or xbmc.getCondVisibility('system.platform.linux') or xbmc.getCondVisibility('System.Platform.OSX') or xbmc.getCondVisibility('System.Platform.Android'):
          addDir('[COLOR orange]SopCast: [/COLOR]' + translate(40005),MainURL,3,addonpath + art + 'sopcast-menu-item.png',1,False)
          addDir('[COLOR orange]SopCast: [/COLOR]' + translate(40006),MainURL,5,addonpath + art + 'sopcast-menu-item.png',1,False)
      if xbmc.getCondVisibility('System.Platform.IOS') or xbmc.getCondVisibility('System.Platform.ATV2'):
          addLink(translate(40056),'',addonpath + art + 'processwarning.png')
      if "confluence" in xbmc.getSkinDir(): addLink('','','p2p')
      addDir('[B]' + translate(40057) + '[/B]',MainURL,300,addonpath + art + 'settings_menu.png',2,True)       
      xbmc.executebuiltin("Container.SetViewMode(50)")
      #break_sopcast is a function used in windows to intentionally break the sopcast.exe setup by renaming one of its codec files. It's ran here to rename the file again in case it failed when played before
      sop.break_sopcast()
Пример #4
0
						except:sys.stdout.write('Could not stop sopcast !')
					currentace = False
					currentpvr = False
					linkarray = False
					link = False
					curmode = '0'
					isplay = False
			
		elif self.path == '/stop':
			if curmode == '1':
				TSPlayer = tsengine()
				TSPlayer.end()
			elif curmode == '2':
				try:sop.killme(linkarray[1])
				except:sys.stdout.write('Could not stop sopcast !')
		else:
			self.send_response(404)
			self.send_header('Content-type','text/html')
			self.end_headers()
			self.wfile.write("404")
			self.wfile.close();

if __name__ == '__main__':

	PORT = 6789
	handler = MyRequestHandler
	httpd = SocketServer.TCPServer(("", PORT), handler)
	sys.stdout.write("p2p web serving at port %d" % PORT)
	httpd.serve_forever()
	sop.break_sopcast()
Пример #5
0
                    linkarray = False
                    link = False
                    curmode = '0'
                    isplay = False

        elif self.path == '/stop':
            if curmode == '1':
                TSPlayer = tsengine()
                TSPlayer.end()
            elif curmode == '2':
                try:
                    sop.killme(linkarray[1])
                except:
                    sys.stdout.write('Could not stop sopcast !')
        else:
            self.send_response(404)
            self.send_header('Content-type', 'text/html')
            self.end_headers()
            self.wfile.write("404")
            self.wfile.close()


if __name__ == '__main__':

    PORT = 6789
    handler = MyRequestHandler
    httpd = SocketServer.TCPServer(("", PORT), handler)
    sys.stdout.write("p2p web serving at port %d" % PORT)
    httpd.serve_forever()
    sop.break_sopcast()