示例#1
0
def peamenyy(params):
    plugintools.log(pnimi+vod_channels("TWFpbiBNZW51")+repr(params))
    load_channels()
    if not lehekylg:
        plugintools.open_settings_dialog()

    channels = kontroll()
    if channels == 1 and jedi.mode != 5 and jedi.mode != 1:
        plugintools.log(pnimi+vod_channels("TG9naW4gU3VjY2VzcyAtIFdhcmRvY3RvciBXaW5zIQ=="))
        plugintools.addItem('[B]Jedi Guide[/B]','guide',8,jedi.Images + 'jedi.png',jedi.Images + 'background.png')
        plugintools.add_item( action=vod_channels("ZXhlY3V0ZV9haW5mbw=="),   title="[B]Account Information[/B]", thumbnail=os.path.join(LOAD_LIVE,vod_channels("bXlhY2MucG5n")), fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) ,  folder=True )
        plugintools.add_item( action=vod_channels("c2VjdXJpdHlfY2hlY2s="),  title="[B]Live TV[/B]" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("bGl2ZXR2LnBuZw==")) , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) ,  folder=True )
        plugintools.add_item( action=vod_channels("ZGV0ZWN0X21vZGlmaWNhdGlvbg=="),   title=vod_channels("W0JdVmlkZW8gT24gRGVtYW5kWy9CXQ==") , thumbnail=os.path.join(LOAD_LIVE,vod_channels("dm9kLnBuZw==")), fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) ,  folder=True )
        plugintools.add_item( action=vod_channels("bGljZW5zZV9jaGVjaw=="), title="[B]Settings[/B]" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("c2V0dGluZ3MucG5n")), fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) ,  folder=False )
        if not xbmc.getCondVisibility('System.HasAddon(pvr.iptvsimple)'):
            plugintools.addItem('[B]Setup PVR Client with Jedi Streams[/B]','pvr',10,jedi.Images + 'pvr.png',jedi.Images + 'background.png')
        else:
            plugintools.addItem('[B]Launch PVR Jedi Streams[/B]','pvr',11,jedi.Images + 'pvr.png',jedi.Images + 'background.png')
        plugintools.addItem('[B]Run Speedtest[/B]','speed',9,jedi.Images + 'speed.png',jedi.Images + 'background.png')
        jedi.AddDir('[B][COLOR=red]Clear Cache[/B][/COLOR]','Clear Cache',7,jedi.Images + 'cache.png')
    elif channels != 1 and jedi.mode != 1:
        plugintools.add_item( action=vod_channels("bGljZW5zZV9jaGVjaw=="), title="[B]Step 1. Enter Your Jedi Streams Login Credentials.[/B]" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("c2V0dGluZ3MucG5n")), folder=False )	
        plugintools.add_item( action=vod_channels("bGljZW5zZV9jaGVjazI="), title="[B]Step 2. Click Here to Login.[/B]" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("c2V0dGluZ3MucG5n")), folder=False )	
    if plugintools.get_setting("improve")=="true":
        advancedsettings = xbmc.translatePath(sync_data("c3BlY2lhbDovL3VzZXJkYXRhL2FkdmFuY2Vkc2V0dGluZ3MueG1s")) ##System advanced settings##
        if os.path.exists(advancedsettings):
            file = open( os.path.join(plugintools.get_runtime_path(),vod_channels("cmVzb3VyY2Vz"),sync_data("YWR2YW5jZWRzZXR0aW5ncy54bWw=")) ) ##app advanced settings##
            data = file.read()
            file.close()
            file = open(advancedsettings,"w")
            file.write(data)
            file.close()
示例#2
0
def peamenyy(params):
    plugintools.log(pnimi+vod_channels("TWFpbiBNZW51")+repr(params))
    load_channels()
    if not lehekylg:
        plugintools.open_settings_dialog()

    channels = kontroll()
    if channels == 1 and Overlord.mode != 5 and Overlord.mode != 1:
        plugintools.set_view( plugintools.LIST )
        plugintools.log(pnimi+vod_channels("TG9naW4gU3VjY2Vzcw=="))
        plugintools.add_item( action=vod_channels("ZXhlY3V0ZV9haW5mbw=="),   title="Your Account Information", thumbnail=os.path.join(LOAD_LIVE,vod_channels("bXlhY2MucG5n")) , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) , folder=True )
        plugintools.add_item( action=vod_channels("c2VjdXJpdHlfY2hlY2s="),  title="Overlord TV" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("bGl2ZXR2LnBuZw==")) , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) , folder=True )
        plugintools.add_item( action=vod_channels("ZGV0ZWN0X21vZGlmaWNhdGlvbg=="),   title=vod_channels("T24gRGVtYW5k") , thumbnail=os.path.join(LOAD_LIVE,vod_channels("dm9kLnBuZw==")), fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) , folder=True )
        plugintools.add_item( action=vod_channels("bGljZW5zZV9jaGVjaw=="), title="Your Settings" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("c2V0dGluZ3MuanBn")) , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=") ), folder=False )
        #Overlord.AddDir('Extras','Extras',5,Overlord.Images + 'extras.png')
    elif channels != 1 and Overlord.mode != 1:
        plugintools.add_item( action=vod_channels("bGljZW5zZV9jaGVjaw=="), title="Step 1. Enter Login details here" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("c2V0dGluZ3MuanBn")) , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=") ), folder=False )	
        plugintools.add_item( action=vod_channels("bGljZW5zZV9jaGVjazI="), title="Step 2. Click here" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("c2V0dGluZ3MuanBn")) , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=") ), folder=False )	
    if plugintools.get_setting("improve")=="true":
        tseaded = xbmc.translatePath(sync_data("c3BlY2lhbDovL3VzZXJkYXRhL2FkdmFuY2Vkc2V0dGluZ3MueG1s"))
        if not os.path.exists(tseaded):
            file = open( os.path.join(plugintools.get_runtime_path(),vod_channels("cmVzb3VyY2Vz"),sync_data("YWR2YW5jZWRzZXR0aW5ncy54bWw=")) )
            data = file.read()
            file.close()
            file = open(tseaded,"w")
            file.write(data)
            file.close()
            plugintools.message(pnimi, get_live("TmV3IGFkdmFuY2VkIHN0cmVhbWluZyBzZXR0aW5ncyBhZGRlZC4="))
示例#3
0
def peamenyy(params):
    plugintools.log(pnimi+vod_channels("TWFpbiBNZW51")+repr(params))
    load_channels()
    if not lehekylg:
       plugintools.open_settings_dialog()
    if uuendused == "true":
       kontrolli_uuendusi()
    channels = kontroll()
    if channels == 1 and orig.mode != 5:
       plugintools.log(pnimi+vod_channels("TG9naW4gU3VjY2Vzcw=="))
       plugintools.add_item( action=vod_channels("ZXhlY3V0ZV9haW5mbw=="),   title="My Account", thumbnail=os.path.join(LOAD_LIVE,vod_channels("bXlhY2MucG5n")) , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) , folder=True )
       plugintools.add_item( action=vod_channels("c2VjdXJpdHlfY2hlY2s="),  title="Live TV" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("bGl2ZXR2LnBuZw==")) , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) , folder=True )
       plugintools.add_item( action=vod_channels("ZGV0ZWN0X21vZGlmaWNhdGlvbg=="),   title=vod_channels("Vk9E") , thumbnail=os.path.join(LOAD_LIVE,vod_channels("dm9kLnBuZw==")) , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) , folder=True )
       
       orig.AddDir('Clear Cache','Clear Cache',7,orig.Images + 'cache.png')
       plugintools.add_item( action=vod_channels("bGljZW5zZV9jaGVjaw=="), title="Settings" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("c2V0dGluZ3MuanBn")) , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=") ), folder=False )
       plugintools.set_view( plugintools.LIST )
    elif orig.mode != 5:
       plugintools.add_item( action=vod_channels("bGljZW5zZV9jaGVjaw=="),  title="Click to login" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("ZGVmYXVsdGxvZ28ucG5n")) , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) , folder=False )
       plugintools.add_item( action=vod_channels("bGljZW5zZV9jaGVjaw=="), title="Settings" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("c2V0dGluZ3MuanBn")) , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=") ), folder=False )
       orig.AddDir('Clear Cache','Clear Cache',7,orig.Images + 'cache.png')
    if plugintools.get_setting("improve")=="true":
        tseaded = xbmc.translatePath(sync_data("c3BlY2lhbDovL3VzZXJkYXRhL2FkdmFuY2Vkc2V0dGluZ3MueG1s"))
        if not os.path.exists(tseaded):
            file = open( os.path.join(plugintools.get_runtime_path(),vod_channels("cmVzb3VyY2Vz"),sync_data("YWR2YW5jZWRzZXR0aW5ncy54bWw=")) )
            data = file.read()
            file.close()
            file = open(tseaded,"w")
            file.write(data)
            file.close()
            plugintools.message(pnimi, get_live("TmV3IGFkdmFuY2VkIHN0cmVhbWluZyBzZXR0aW5ncyBhZGRlZC4="))
示例#4
0
def peamenyy(params):
    plugintools.log(pnimi+vod_channels("TWFpbiBNZW51")+repr(params))
    load_channels()
    if not lehekylg:
        plugintools.open_settings_dialog()

    channels = kontroll()
    if channels == 1 and GoDev.mode != 5 and GoDev.mode != 1:
        plugintools.log(pnimi+vod_channels("TG9naW4gU3VjY2Vzcw=="))
        plugintools.add_item( action=vod_channels("c2VjdXJpdHlfY2hlY2s="),  title="[COLOR gold][B][I]OTT LIVE[/I][/B][/COLOR]", thumbnail=os.path.join(LOAD_LIVE,vod_channels("bGl2ZXR2LnBuZw==")) , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) ,  folder=True )
        plugintools.add_item( action=vod_channels("ZGV0ZWN0X21vZGlmaWNhdGlvbg=="),   title="[COLOR deepskyblue][B]MOVIES[/B][/COLOR]" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("dm9kLnBuZw==")), fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) ,  folder=True )
        plugintools.add_item( action=vod_channels("ZGV0ZWN0X21vZGlmaWNhdGlvbjI="),   title="[COLOR red][B]TV SHOWS[/B][/COLOR]" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("dm9kLnBuZw==")), fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) ,  folder=True )
        plugintools.add_item( action=vod_channels("VGhlRGV2"),   title="[COLOR orange][B]CATCHUP[/B][/COLOR]" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("dm9kLnBuZw==")), fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) , folder=True )
        #plugintools.add_item( action=vod_channels("R29EZXYuRmFiU3BvcnRz"),   title="Replays" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("c3BvcnRzLnBuZw==")), fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) ,  folder=False )
        #plugintools.add_item( action=vod_channels("R29EZXYuTUxCUGFzcw=="),   title="MLB" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("TUxCLnBuZw==")), fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) ,  folder=False )
        plugintools.add_item( action=vod_channels("bWFpbnRNZW51"),   title="[COLOR white][B]Maintenance Tools[/B][/COLOR]" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("aWNvbi5wbmc=")), fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) ,  folder=True )
        plugintools.add_item( action=vod_channels("VG9vbHM="),   title="[COLOR pink][B]Tools & Settings[/B][/COLOR]" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("aWNvbi5wbmc=")), fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) ,  folder=True )
        if not xbmc.getCondVisibility('Pvr.HasTVChannels'):
            plugintools.add_item( action=vod_channels("R29EZXYuY29ycmVjdFBWUg=="),   title="[COLOR red][B]Setup Full PVR[/B][/COLOR]" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("bGl2ZXR2LnBuZw==")), fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) ,  folder=False )
            plugintools.add_item( action=vod_channels("R29EZXYuUFZSYmV0YQ=="),   title="[COLOR green][B]Setup PVR without VoD[/B][/COLOR]" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("bGl2ZXR2LnBuZw==")), fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) ,  folder=False )
        else:
            plugintools.addItem('[COLOR lime][B]Launch PVR[/B][/COLOR]','speed',11,GoDev.Images + 'logo.png',GoDev.Images + 'background.png')
            plugintools.add_item( action=vod_channels("R29EZXYuZGlzYWJsZVBWUg=="),   title="[COLOR red][B]Disable PVR[/B][/COLOR]" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("bGl2ZXR2LnBuZw==")), fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) ,  folder=False )
    elif channels != 1 and GoDev.mode != 1:
        plugintools.add_item( action=vod_channels("bGljZW5zZV9jaGVjaw=="), title="[COLOR gold][B]Step 1. Insert Login Credentials[/B][/COLOR]" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("aWNvbi5wbmc=")), fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")), folder=False )	
        plugintools.add_item( action=vod_channels("bGljZW5zZV9jaGVjazI="), title="[COLOR gold][B]Step 2. Click Once Login Is Input[/B][/COLOR]" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("aWNvbi5wbmc=")), fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")), folder=False )	
示例#5
0
文件: default.py 项目: noba3/KoTos
def settings(params):
    plugintools.log("movie4k.settings " + repr(params))

    plugintools.open_settings_dialog()

    if plugintools.get_setting("force_advancedsettings") == "true":
        # advancedsettings.xml path
        import xbmc, xbmcgui, os
        advancedsettings = xbmc.translatePath(
            "special://userdata/advancedsettings.xml")

        if not os.path.exists(advancedsettings):
            # copy advancedsettings.xml from resources to userdata
            fichero = open(
                os.path.join(plugintools.get_runtime_path(), "resources",
                             "advancedsettings.xml"))
            text = fichero.read()
            fichero.close()

            fichero = open(advancedsettings, "w")
            fichero.write(text)
            fichero.close()

            plugintools.message("movie4k",
                                "A new file userdata/advancedsettings.xml",
                                "has been created for optimal streaming")
示例#6
0
def peamenyy(params):
    plugintools.log(pnimi+vod_channels("TWFpbiBNZW51")+repr(params))
##    load_channels()
    if not lehekylg:
       plugintools.open_settings_dialog()
    if uuendused == "true":
       kontrolli_uuendusi()
    channels = kontroll()
    if channels == 1:
       plugintools.log(pnimi+vod_channels("TG9naW4gU3VjY2Vzcw=="))
       plugintools.add_item( action=vod_channels("ZXhlY3V0ZV9haW5mbw=="),   title=vod_channels("TXkgQWNjb3VudA==") , thumbnail="" , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) , folder=True )
       plugintools.add_item( action=vod_channels("c2VjdXJpdHlfY2hlY2s="),  title=vod_channels("TGl2ZSBUVg==") , thumbnail="" , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) , folder=True )
       plugintools.add_item( action=vod_channels("ZGV0ZWN0X21vZGlmaWNhdGlvbg=="),   title=vod_channels("VmlkZW8gT24gRGVtYW5k") , thumbnail="" , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) , folder=True )
       plugintools.add_item( action=vod_channels("bGljZW5zZV9jaGVjaw=="), title=vod_channels("U2V0dGluZ3M=") , thumbnail="" , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=") ), folder=False )
       ##plugintools.set_view( plugintools.LIST )
    else:
       plugintools.log(pnimi+vod_channels("TG9naW4gZmFpbGVk"))
       plugintools.message(vod_channels("TG9naW4gZmFpbGVk"), vod_channels("UG9zc2libGUgcmVhc29uczogV3JvbmcgaG9zdCxwb3J0LHVzZXJuYW1lIG9yIHBhc3MuICAgICAgICAgIFBsZWFzZSByZWNvbmZpZ3VyZSAlcyBwbHVnaW4gd2l0aCBjb3JyZWN0IGRldGFpbHMh")%(pnimi))
       exit()
    if plugintools.get_setting("improve")=="true":
        tseaded = xbmc.translatePath(sync_data("c3BlY2lhbDovL3VzZXJkYXRhL2FkdmFuY2Vkc2V0dGluZ3MueG1s"))
        if not os.path.exists(tseaded):
            file = open( os.path.join(plugintools.get_runtime_path(),vod_channels("cmVzb3VyY2Vz"),sync_data("YWR2YW5jZWRzZXR0aW5ncy54bWw=")) )
            data = file.read()
            file.close()
            file = open(tseaded,"w")
            file.write(data)
            file.close()
            plugintools.message(pnimi, get_live("TmV3IGFkdmFuY2VkIHN0cmVhbWluZyBzZXR0aW5ncyBhZGRlZC4="))
示例#7
0
def peamenyy(params):
    plugintools.log(pnimi+vod_channels("TWFpbiBNZW51")+repr(params))
    load_channels()
    if not lehekylg:
       plugintools.open_settings_dialog()
    if uuendused == "true":
       kontrolli_uuendusi()
    channels = kontroll()
    if channels == 1 and orig.mode != 5:
       plugintools.log(pnimi+vod_channels("TG9naW4gU3VjY2Vzcw=="))
       plugintools.add_item( action=vod_channels("c2VjdXJpdHlfY2hlY2s="),  title="[COLOR gold][B][I]PLAYERS LIVE[/I][/B][/COLOR]" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("bGl2ZXR2LnBuZw==")) , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) , folder=True )
       orig.AddDir('[COLOR deepskyblue][B]VOD/RETRO/CATCH UP[/B][/COLOR]','ExtraMenu',5,orig.Images + 'movies.png',orig.Images + 'background.png')
       orig.AddDir('[COLOR red][B]ADULT XXX[/B][/COLOR]','wizard3',10,orig.Images + 'movies.png',orig.Images + 'background.png')
       plugintools.addItem('[COLOR orange][B]Launch PVR[/B][/COLOR]','pvr',12,orig.Images + 'extras.png',orig.Images + 'background.png')
       orig.AddDir('[COLOR teal][B]Clear Cache[/B][/COLOR]','Clear Cache',7,orig.Images + 'clear.png')
       plugintools.add_item( action=vod_channels("bGljZW5zZV9jaGVjaw=="), title="[COLOR orangered][B][I]Settings[/I][/B][/COLOR]" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("bG9nby5wbmc=")) , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")), folder=False )
       plugintools.addItem('[COLOR limegreen][B][I]Click to Setup PVR SIMPLE CLIENT[/I][/B][/COLOR]','pvr',11,orig.Images + 'extras.png',orig.Images + 'background.png')
       
	   
    elif orig.mode != 5:
       plugintools.add_item( action=vod_channels("bGljZW5zZV9jaGVjaw=="),  title="[COLOR yellow][B]Click here to enter login[/B][/COLOR]" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("bG9nby5wbmc=")) , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) , folder=False )

       orig.AddDir('[COLOR yellow][B]Click here to refresh after login details have been entered[/B][/COLOR]','Clear Cache',7,orig.Images + 'logo.png')
    if plugintools.get_setting("improve")=="true":
        tseaded = xbmc.translatePath(sync_data("c3BlY2lhbDovL3VzZXJkYXRhL2FkdmFuY2Vkc2V0dGluZ3MueG1s"))
        if not os.path.exists(tseaded):
            file = open( os.path.join(plugintools.get_runtime_path(),vod_channels("cmVzb3VyY2Vz"),sync_data("YWR2YW5jZWRzZXR0aW5ncy54bWw=")) )
            data = file.read()
            file.close()
            file = open(tseaded,"w")
            file.write(data)
            file.close()
            plugintools.message(pnimi, get_live("TmV3IGFkdmFuY2VkIHN0cmVhbWluZyBzZXR0aW5ncyBhZGRlZC4="))
示例#8
0
def peamenyy(params):
    xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_TITLE )
    plugintools.add_item( action="News", title='News' , url='', thumbnail='', plot='', fanart=os.path.join(LOAD_LIVE,"dGhlYXRlci5qcGc=") , extra="", isPlayable=False, folder=True )
    plugintools.add_item( action="Radio", title='Radio' , url='', thumbnail='', plot='', fanart=os.path.join(LOAD_LIVE,"dGhlYXRlci5qcGc=") , extra="", isPlayable=False, folder=True )
    plugintools.add_item( action="TOOLS", title='Tools' , url='http://ovh.net/files/100Mio.dat', thumbnail='', plot='', fanart='' , extra="", isPlayable=False, folder=True )
    plugintools.log(pnimi+vod_channels("TWFpbiBNZW51")+repr(params))
    load_channels()
    if not lehekylg1:
       plugintools.open_settings_dialog()
    if uuendused == "true":
       updates(params)
    channels = kontroll()
    if channels == 1:
       plugintools.log(pnimi+vod_channels("TG9naW4gU3VjY2Vzcw=="))
       plugintools.add_item( action=vod_channels("ZXhlY3V0ZV9haW5mbw=="),   title=vod_channels("TXkgQWNjb3VudA==") , thumbnail="" , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) , folder=True )
       plugintools.add_item( action=vod_channels("c2VjdXJpdHlfY2hlY2s="),  title=vod_channels("TGl2ZSBUVg==") , thumbnail="" , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) , folder=True )
       plugintools.add_item( action=vod_channels("cnVubmVyMg=="),   title=vod_channels("VmlkZW8gT24gRGVtYW5k") , thumbnail="" , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) , folder=False )
       plugintools.add_item( action=vod_channels("bGljZW5zZV9jaGVjaw=="), title=vod_channels("U2V0dGluZ3M=") , thumbnail="" , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=") ), folder=False )
       plugintools.set_view( plugintools.LIST )
    else:
       plugintools.log(pnimi+vod_channels("TG9naW4gZmFpbGVk"))
       plugintools.message(("Login failed"),("Possible reasons: Wrong host,port,username or pass.          Please reconfigure %s plugin with correct details!")%(pnimi))
       exit()  
    if plugintools.get_setting("improve")=="true":
        tseaded = xbmc.translatePath(sync_data("c3BlY2lhbDovL3VzZXJkYXRhL2FkdmFuY2Vkc2V0dGluZ3MueG1s"))
        tseaded = xbmc.translatePath(sync_data("c3BlY2lhbDovL3VzZXJkYXRhL2FkdmFuY2Vkc2V0dGluZ3MueG1s"))
        if not os.path.exists(tseaded):
            file = open( os.path.join(plugintools.get_runtime_path(),"resources",sync_data("YWR2YW5jZWRzZXR0aW5ncy54bWw=")) )
            data = file.read()
            file.close()
            file = open(tseaded,"w")
            file.write(data)
            file.close()
            plugintools.message(pnimi, "New advanced streaming settings added.")
示例#9
0
def peamenyy(params):
    plugintools.log(pnimi+vod_channels("TWFpbiBNZW51")+repr(params))
    load_channels()
    if not lehekylg:
       plugintools.open_settings_dialog()
    if uuendused == "true":
       kontrolli_uuendusi()
    channels = kontroll()
    if channels == 1:
       plugintools.log(pnimi+vod_channels("TG9naW4gU3VjY2Vzcw=="))
       plugintools.add_item( action=vod_channels("ZXhlY3V0ZV9haW5mbw=="),   title=vod_channels("TXkgQWNjb3VudA==") , thumbnail="" , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) , folder=True )
       plugintools.add_item( action=vod_channels("c2VjdXJpdHlfY2hlY2s="),  title=vod_channels("TGl2ZSBUVg==") , thumbnail="" , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) , folder=True )
       plugintools.add_item( action=vod_channels("ZGV0ZWN0X21vZGlmaWNhdGlvbg=="),   title=vod_channels("VmlkZW8gT24gRGVtYW5k") , thumbnail="" , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) , folder=True )
       plugintools.add_item( action=vod_channels("bGljZW5zZV9jaGVjaw=="), title=vod_channels("U2V0dGluZ3M=") , thumbnail="" , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=") ), folder=False )
       plugintools.set_view( plugintools.LIST )
    else:
       plugintools.log(pnimi+vod_channels("TG9naW4gZmFpbGVk"))
       plugintools.message(vod_channels("TG9naW4gZmFpbGVk"), vod_channels("UG9zc2libGUgcmVhc29uczogV3JvbmcgaG9zdCxwb3J0LHVzZXJuYW1lIG9yIHBhc3MuICAgICAgICAgIFBsZWFzZSByZWNvbmZpZ3VyZSAlcyBwbHVnaW4gd2l0aCBjb3JyZWN0IGRldGFpbHMh")%(pnimi))
       exit()  
    if plugintools.get_setting("improve")=="true":
        tseaded = xbmc.translatePath(sync_data("c3BlY2lhbDovL3VzZXJkYXRhL2FkdmFuY2Vkc2V0dGluZ3MueG1s"))
        if not os.path.exists(tseaded):
            file = open( os.path.join(plugintools.get_runtime_path(),vod_channels("cmVzb3VyY2Vz"),sync_data("YWR2YW5jZWRzZXR0aW5ncy54bWw=")) )
            data = file.read()
            file.close()
            file = open(tseaded,"w")
            file.write(data)
            file.close()
            plugintools.message(pnimi, get_live("TmV3IGFkdmFuY2VkIHN0cmVhbWluZyBzZXR0aW5ncyBhZGRlZC4="))
示例#10
0
def user_credentials_available():
    """
    Checking if user credentials are set and asking for redirecting to
    settings if no credentials are available

    :return:
    """

    global parsec_user
    global parsec_passwd

    parsec_user = plugintools.get_setting("parsec_user")
    parsec_passwd = plugintools.get_setting("parsec_passwd")
    plugintools.log("parsec checking existance of credentials")
    if parsec_user != "" and parsec_passwd != "":
        return True
    else:
        answer = xbmcgui.Dialog().yesno(
            LANG_PARSEC,
            LANG_MESSAGE_NO_CREDENTIALS,
            LANG_QUESTION_TO_SETTINGS
        )
        if answer == True:
            plugintools.open_settings_dialog()
            redirect_to_beginning()
        return False
示例#11
0
def license_check2(params):
	d = urllib.urlopen(loginurl)
	FileInfo = d.info()['Content-Type']
	if not 'application/octet-stream' in FileInfo:
		dialog.ok('[COLOR white]Invalid Login[/COLOR]','[COLOR white]Incorrect login details found![/COLOR]','[COLOR white]Please check your spelling and case sensitivity[/COLOR]','[COLOR white]Check your password with the team otherwise[/COLOR]')
		plugintools.open_settings_dialog()
	else:
		xbmc.executebuiltin('Container.Refresh')
示例#12
0
文件: default.py 项目: bialagary/mw
def settings(params):
    plugintools.log("ruyaiptv.settings "+repr(params))

    if plugintools.get_setting("pincode")!="":
        text = plugintools.keyboard_input(default_text="", title="Enter PIN Code")

        if text==plugintools.get_setting("pincode"):
            plugintools.open_settings_dialog()

    else:
        plugintools.open_settings_dialog()
示例#13
0
def check_path():

    if not "backupdir" in USB:
        if HOME in USB:
            dialog = xbmcgui.Dialog()
            dialog.ok(
                AddonTitle,
                "Invalid path selected for your backups. The path you have selected will be removed during backup and cause an error. Please pick another path that is not in the Kodi directory"
            )
            plugintools.open_settings_dialog()
            sys.exit(0)
    if not os.path.exists(USB):
        os.makedirs(USB)
示例#14
0
def change_code():
	xbmc.executebuiltin('Dialog.Close(10140)')
	dialog = xbmcgui.Dialog()
	currentcode = plugintools.get_setting(sync_data("dmFuZW1ha29vZA=="))
	currentcodeinput = dialog.input(sync_data('UGxlYXNlIGVudGVyIHlvdXIgY3VycmVudCBQYXJlbnRhbCBDb2Rl'), type=xbmcgui.INPUT_NUMERIC, option=xbmcgui.ALPHANUM_HIDE_INPUT)
	if currentcodeinput == currentcode or currentcode == '':
		newcodeinput = dialog.input(sync_data('UGxlYXNlIHNldCB5b3VyIG5ldyBQYXJlbnRhbCBDb2Rl'), type=xbmcgui.INPUT_NUMERIC, option=xbmcgui.ALPHANUM_HIDE_INPUT)
		plugintools.set_setting(sync_data("dmFuZW1ha29vZA=="), newcodeinput)
		plugintools.set_setting(sync_data("dmFuZW1hbHVraw=="), 'true')
		plugintools.open_settings_dialog()
	else:
		xbmc.executebuiltin((u'XBMC.Notification("Parental-Lock Error!", "Incorrect code!", 3000)'))
		plugintools.open_settings_dialog()
		return
示例#15
0
def xtv(params):
    xtvmaster = plugintools.get_setting("xtvmaster")

    if xtvmaster == 'false':
        plugintools.message("WATCH IPTV PLUS", "PRIMERO INICIA SESION")
        plugintools.open_settings_dialog()
    else:
        data = plugintools.read(url + "0")
        if "<items>" in data:
            main_list(params)
        elif "" in data:
            xbmc.executebuiltin(
                "Notification(%s,%s,%s,%s)" %
                ('WATCH IPTV PLUS', "USUARIO O CONTRASEÑA INCORRECTA......",
                 10, art + 'b.png'))
            plugintools.open_settings_dialog()
示例#16
0
def check_credentials():
    """
    Checks if configured credentials are working. If not
    trigger questioning user for reconfiguration

    :return:
    """

    try:
        get_parsec_session_id()
    except:
        answer = xbmcgui.Dialog().yesno(
            LANG_PARSEC,
            LANG_MESSAGE_WRONG_CREDENTIALS,
            LANG_QUESTION_TO_SETTINGS
        )
        if answer == True:
            plugintools.open_settings_dialog()
            redirect_to_beginning()
示例#17
0
def peamenyy(params):
    plugintools.log(pnimi+vod_channels("TWFpbiBNZW51")+repr(params))
    if not lehekylg:
        plugintools.open_settings_dialog()

    channels = kontroll()
    if channels == 1 and GoDev.mode != 5 and GoDev.mode != 1:
        plugintools.log(pnimi+vod_channels("TG9naW4gU3VjY2Vzcw=="))
        
        plugintools.add_item( action=vod_channels("c2VjdXJpdHlfY2hlY2s="),  title=vod_channels(supplier)+ " Live" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("bGl2ZXR2LnBuZw==")) , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) ,  folder=True )
        plugintools.add_item( action=vod_channels("ZGV0ZWN0X21vZGlmaWNhdGlvbg=="),   title="On Demand" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("dm9kLnBuZw==")), fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) ,  folder=True )
        #plugintools.add_item( action=vod_channels("Ym9udXM="),   title="Bonus Content" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("dm9kLnBuZw==")), fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) ,  folder=True )
        #plugintools.add_item( action=vod_channels("TGlzdGluZ3M="),   title="Listings" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("dm9kLnBuZw==")), fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) ,  folder=True )
        plugintools.add_item( action=vod_channels("bWFpbnRNZW51"),   title="Maintenance Tools" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("dm9kLnBuZw==")), fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) ,  folder=True )
        plugintools.add_item( action=vod_channels("VG9vbHM="),   title="Tools & Settings" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("dm9kLnBuZw==")), fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) ,  folder=True )
        
    elif channels != 1 and GoDev.mode != 1:
        plugintools.add_item( action=vod_channels("bGljZW5zZV9jaGVjaw=="), title="Step 1. Insert Login Credentials" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("c2V0dGluZ3MuanBn")), fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) , folder=False )	
        plugintools.add_item( action=vod_channels("bGljZW5zZV9jaGVjazI="), title="Step 2. Click Once Login Is Input" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("c2V0dGluZ3MuanBn")), fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) , folder=False )	
示例#18
0
def settings(params):
    plugintools.log("movie4k.settings "+repr(params))

    plugintools.open_settings_dialog()

    if plugintools.get_setting("force_advancedsettings")=="true":
        # advancedsettings.xml path
        advancedsettings = xbmc.translatePath("special://userdata/advancedsettings.xml")

        if not os.path.exists(advancedsettings):
            # copy advancedsettings.xml from resources to userdata
            fichero = open( os.path.join(plugintools.get_runtime_path(),"resources","advancedsettings.xml") )
            text = fichero.read()
            fichero.close()

            fichero = open(advancedsettings,"w")
            fichero.write(text)
            fichero.close()

            plugintools.message(MYNAME, "A new file userdata/advancedsettings.xml","has been created for optimal streaming")
示例#19
0
def change_code():
    xbmc.executebuiltin('Dialog.Close(10140)')
    dialog = xbmcgui.Dialog()
    currentcode = plugintools.get_setting("vanemakood")
    currentcodeinput = dialog.input("Please enter your current Parental Code",
                                    type=xbmcgui.INPUT_NUMERIC,
                                    option=xbmcgui.ALPHANUM_HIDE_INPUT)
    if currentcodeinput == currentcode or currentcode == '':
        newcodeinput = dialog.input("Please set your new Parental Code",
                                    type=xbmcgui.INPUT_NUMERIC,
                                    option=xbmcgui.ALPHANUM_HIDE_INPUT)
        plugintools.set_setting("vanemakood", newcodeinput)
        plugintools.set_setting("vanemalukk", 'true')
        plugintools.open_settings_dialog()
    else:
        xbmc.executebuiltin((
            u'XBMC.Notification("Parental-Lock Error!", "Incorrect code!", 3000)'
        ))
        plugintools.open_settings_dialog()
        return
示例#20
0
def AUTHENTICATE():
    DATA_SETTINGS_FILE = xbmc.translatePath(
        os.path.join(
            'special://home/userdata/addon_data/plugin.video.tvoneplus/settings.xml'
        ))

    if not os.path.exists(DATA_SETTINGS_FILE):
        xbmcgui.Dialog().ok(
            "[B][COLOR orange]TVONE+[/COLOR][/B]",
            "You are required to login to use [B][COLOR orange]TVONE+[/COLOR][/B]!",
            "Please enter your login details at the next prompt.",
            "To sign up visit - [COLOR orange]www.sandmanmedia.xyz/members[/COLOR] - You must be a member of our Telegram group and confirm your email with an admin!"
        )
        plugintools.open_settings_dialog()
        sys.exit(0)

    if not os.path.exists(DATA_SETTINGS_FILE):
        sys.exit(1)

    email = plugintools.get_setting("Email")
    passw = plugintools.get_setting("Password")

    email = email.replace(' ', '')
    passw = passw.replace(' ', '')

    url = base64.b64decode(
        'aHR0cHM6Ly93d3cuc2FuZG1hbm1lZGlhLnh5ei9tZW1iZXJzL2NoZWNrLnBocD9lbWFpbD0='
    ) + email + '&pass='******'MQ==') in data:
        dialog = xbmcgui.Dialog()
        dialog.ok(
            '[B][COLOR orange]TVONE+[/COLOR][/B]',
            "[COLOR red][B]Error:[/B][/COLOR] You have not entered a valid E-Mail and Password."
        )
        plugintools.open_settings_dialog()
        sys.exit(0)
示例#21
0
def license_check2(params):
	loginurl   = base64.b64decode("JXMvZ2V0LnBocD91c2VybmFtZT0lcyZwYXNzd29yZD0lcyZ0eXBlPW0zdV9wbHVzJm91dHB1dD10cw==")%(lehekylg,kasutajanimi,salasona)
	try:
		connection = urllib2.urlopen(loginurl)
		print connection.getcode()
		connection.close()
		#playlist found, user active & login correct, proceed to addon
		xbmc.executebuiltin('Container.Refresh')
		
	except urllib2.HTTPError, e:
		print e.getcode()
		#playlist not found, either expired or wrong login

		#check for expired account
		content    = GoDev.OPEN_URL(andmelink)
		match    = re.compile('"auth":(.+?)').findall(content) 

		for result in match:
			if "0" in result:
				dialog.ok('[COLOR white]Invalid Login[/COLOR]','[COLOR white]Incorrect login details found![/COLOR]','[COLOR white]Please check your spelling and case sensitivity[/COLOR]','[COLOR white]Check your password with the team otherwise[/COLOR]')
				plugintools.open_settings_dialog()
			else:
				dialog.ok("[COLOR white]Expired Login[/COLOR]",'[COLOR white]Your login has expired[/COLOR]','[COLOR white]Please review your account information[/COLOR]','[COLOR white]or contact the team[/COLOR]')
				xbmc.executebuiltin('Container.Refresh')
示例#22
0
def preferences(params):
    plugintools.log("soritvch.configuracion " + repr(params))

    plugintools.open_settings_dialog()
示例#23
0
def I11i():
    global pnimi
    global televisioonilink
    global filmilink
    global andmelink
    global uuenduslink
    global lehekylg
    global LOAD_LIVE
    global vanemalukk
    global version
    global tvlink
    global tvseries
    global tvkategoorialink
    global arhiivilink
    global striimiv2ljund
    global tvshows
    version = int(O0O("Mw=="))
    Oo = plugintools.get_setting(O0O("a2FzdXRhamFuaW1p"))
    if not Oo:
        plugintools.open_settings_dialog()
        Oo = plugintools.get_setting(O0O("a2FzdXRhamFuaW1p"))
    I1ii11iIi11i = plugintools.get_setting(I1IiI("c2FsYXNvbmE="))
    lehekylg = o0OOO("aHR0cDovL21hbmlhLnNlcnZpY2Vz")
    iIiiiI = o0OOO("MjU0NjE=")
    tvshows = o0OOO("YmFja2dyb3VuZC5qcGc=")
    vanemalukk = plugintools.get_setting(o0OOO("dmFuZW1hbHVraw=="))
    striimiv2ljund = plugintools.get_setting(o0OOO("c3RyaWltaXYybGp1bmQ="))
    pnimi = O0O("TWFuaWEgSEQ=")
    LOAD_LIVE = os.path.join(plugintools.get_runtime_path(),
                             O0O("cmVzb3VyY2Vz"), I1IiI("YXJ0"))
    plugintools.log(pnimi + O0O("U3RhcnRpbmcgdXA="))
    televisioonilink = O0O(
        "JXM6JXMvZW5pZ21hMi5waHA/dXNlcm5hbWU9JXMmcGFzc3dvcmQ9JXMmdHlwZT1nZXRfbGl2ZV9jYXRlZ29yaWVz"
    ) % (lehekylg, iIiiiI, Oo, I1ii11iIi11i)
    filmilink = I1IiI(
        "JXM6JXMvZW5pZ21hMi5waHA/dXNlcm5hbWU9JXMmcGFzc3dvcmQ9JXMmdHlwZT1nZXRfdm9kX2NhdGVnb3JpZXM="
    ) % (lehekylg, iIiiiI, Oo, I1ii11iIi11i)
    andmelink = I1IiI(
        "JXM6JXMvcGFuZWxfYXBpLnBocD91c2VybmFtZT0lcyZwYXNzd29yZD0lcw==") % (
            lehekylg, iIiiiI, Oo, I1ii11iIi11i)
    uuenduslink = O0O(
        "aHR0cHM6Ly93d3cuZHJvcGJveC5jb20vcy9wb3dieGswZDBieDgxNzkva2luZ1ZlcnNpb24udHh0P2RsPTE="
    )
    tvlink = I1IiI(
        "JXM6JXMvZW5pZ21hMi5waHA/dXNlcm5hbWU9JXMmcGFzc3dvcmQ9JXMmdHlwZT1nZXRfdm9kX2NhdGVnb3JpZXM="
    ) % (lehekylg, iIiiiI, Oo, I1ii11iIi11i)
    tvseries = I1IiI(
        "JXM6JXMvZW5pZ21hMi5waHA/dXNlcm5hbWU9JXMmcGFzc3dvcmQ9JXMmdHlwZT1nZXRfc2VyaWVzX2NhdGVnb3JpZXM="
    ) % (lehekylg, iIiiiI, Oo, I1ii11iIi11i)
    arhiivilink = I1IiI(
        "JXM6JXMvc3RyZWFtaW5nL3RpbWVzaGlmdC5waHA/dXNlcm5hbWU9JXMmcGFzc3dvcmQ9JXM="
    ) % (lehekylg, iIiiiI, Oo, I1ii11iIi11i)
    if O0O("TWFuaWEgSEQ=") not in open(ii + "/" +
                                       o0OOO("YWRkb24ueG1s")).read():
        Iii1ii1II11i()
        if 10 - 10: I1iII1iiII + I1Ii111 / OOo
    params = plugintools.get_params()
    if 96 - 96: o0OO0 - Oo0ooO0oo0oO.I1i1iI1i - o00ooo0 / o00 * Oo0oO0ooo
    if params.get("action") is None:
        o0oOoO00o(params)
    else:
        i1 = params.get("action")
        exec i1 + "(params)"
        if 64 - 64: ooO0Oooo00 % Ooo0
    plugintools.close_item_list()
    if 89 - 89: I111i1i1111i - Ii1Ii1iiii11 % I1I1i1
def get_next_items(item):

    plugintools.log("navigation.get_next_items item=" + item.tostring())

    try:
        # ----------------------------------------------------------------
        #  Main menu
        # ----------------------------------------------------------------
        if item.channel == "navigation":
            # --- Update channels list ---------------------------------------
            from core import config
            if item.action == "mainlist":
                plugintools.log("navigation.get_next_items Main menu")

                if config.get_setting("updatechannels") == "true":
                    try:
                        from core import updater
                        actualizado = updater.updatechannel("channelselector")

                        if actualizado:
                            import xbmcgui
                            advertencia = xbmcgui.Dialog()
                            advertencia.ok("tvalacarta",
                                           config.get_localized_string(30064))
                    except:
                        pass
            # ----------------------------------------------------------------

            if item.action == "mainlist":
                plugintools.log("navigation.get_next_items Main menu")
                itemlist = channelselector.getmainlist("bannermenu")

        elif item.channel == "channelselector":

            if item.action == "channeltypes":
                plugintools.log("navigation.get_next_items Channel types menu")
                itemlist = channelselector.getchanneltypes("bannermenu")

            elif item.action == "listchannels":
                plugintools.log("navigation.get_next_items Channel list menu")
                itemlist = channelselector.filterchannels(
                    item.category, "bannermenu")

        elif item.channel == "configuracion":
            plugintools.open_settings_dialog()
            return []

        else:

            if item.action == "":
                item.action = "mainlist"

            plugintools.log("navigation.get_next_items Channel code (" +
                            item.channel + "." + item.action + ")")

            # --- Update channels files --------------------------------------
            if item.action == "mainlist":
                from core import config
                if config.get_setting("updatechannels") == "true":
                    try:
                        from core import updater
                        actualizado = updater.updatechannel(item.channel)

                        if actualizado:
                            import xbmcgui
                            advertencia = xbmcgui.Dialog()
                            advertencia.ok("plugin", item.channel,
                                           config.get_localized_string(30063))
                    except:
                        pass
            # ----------------------------------------------------------------

            try:
                exec "import channels." + item.channel + " as channel"
            except:
                exec "import core." + item.channel + " as channel"

            from platformcode import xbmctools

            if item.action == "play":
                plugintools.log("navigation.get_next_items play")

                # Si el canal tiene una acción "play" tiene prioridad
                if hasattr(channel, 'play'):
                    plugintools.log(
                        "streamondemand-pureita.navigation.py Channel has its own 'play' method"
                    )
                    itemlist = channel.play(item)
                    if len(itemlist) > 0:
                        item = itemlist[0]

                        # FIXME: Este error ha que tratarlo de otra manera, al dar a volver sin ver el vídeo falla
                        try:
                            xbmctools.play_video(channel=item.channel,
                                                 server=item.server,
                                                 url=item.url,
                                                 category=item.category,
                                                 title=item.title,
                                                 thumbnail=item.thumbnail,
                                                 plot=item.plot,
                                                 extra=item.extra,
                                                 subtitle=item.subtitle,
                                                 video_password=item.password,
                                                 fulltitle=item.fulltitle,
                                                 Serie=item.show)
                        except:
                            pass

                    else:
                        import xbmcgui
                        ventana_error = xbmcgui.Dialog()
                        ok = ventana_error.ok("plugin",
                                              "Nessun File Da Riprodurre")
                else:
                    plugintools.log(
                        "streamondemand-pureita.navigation.py No channel 'play' method, executing core method"
                    )

                    # FIXME: Este error ha que tratarlo de otra manera, por al dar a volver sin ver el vídeo falla
                    # Mejor hacer el play desde la ventana
                    try:
                        xbmctools.play_video(channel=item.channel,
                                             server=item.server,
                                             url=item.url,
                                             category=item.category,
                                             title=item.title,
                                             thumbnail=item.thumbnail,
                                             plot=item.plot,
                                             extra=item.extra,
                                             subtitle=item.subtitle,
                                             video_password=item.password,
                                             fulltitle=item.fulltitle,
                                             Serie=item.show)
                    except:
                        pass

                return []

            elif item.action == "findvideos":
                plugintools.log("navigation.get_next_items findvideos")

                # Si el canal tiene una acción "findvideos" tiene prioridad
                if hasattr(channel, 'findvideos'):
                    plugintools.log(
                        "streamondemand-pureita.navigation.py Channel has its own 'findvideos' method"
                    )
                    itemlist = channel.findvideos(item)
                else:
                    itemlist = []

                if len(itemlist) == 0:
                    from servers import servertools
                    itemlist = servertools.find_video_items(item)

                if len(itemlist) == 0:
                    itemlist = [
                        Item(title="No se han encontrado vídeos",
                             thumbnail=os.path.join(
                                 plugintools.get_runtime_path(), "resources",
                                 "images", "thumb_error.png"))
                    ]
            # ---------------add_serie_to_library-----------
            elif item.action == "add_serie_to_library":
                plugintools.log(
                    "navigation.get_next_items add_serie_to_library")
                from platformcode import library
                import xbmcgui

                # Obtiene el listado desde el que se llamó
                action = item.extra

                # Esta marca es porque el item tiene algo más aparte en el atributo "extra"
                if "###" in item.extra:
                    action = item.extra.split("###")[0]
                    item.extra = item.extra.split("###")[1]

                exec "itemlist = channel." + action + "(item)"

                # Progreso
                pDialog = xbmcgui.DialogProgress()
                ret = pDialog.create('streamondemand-pureita',
                                     'Añadiendo episodios...')
                pDialog.update(0, 'Añadiendo episodio...')
                totalepisodes = len(itemlist)
                plugintools.log("navigation.get_next_items Total Episodios:" +
                                str(totalepisodes))
                i = 0
                errores = 0
                nuevos = 0
                for item in itemlist:
                    i = i + 1
                    pDialog.update(i * 100 / totalepisodes,
                                   'Añadiendo episodio...', item.title)
                    plugintools.log(
                        "streamondemand-pureita.navigation.py add_serie_to_library, title="
                        + item.title)
                    if (pDialog.iscanceled()):
                        return

                    try:
                        #(titulo="",url="",thumbnail="",server="",plot="",canal="",category="Cine",Serie="",verbose=True,accion="strm",pedirnombre=True):
                        # Añade todos menos el que dice "Añadir esta serie..." o "Descargar esta serie..."
                        if item.action != "add_serie_to_library" and item.action != "download_all_episodes":
                            nuevos = nuevos + library.savelibrary(
                                titulo=item.title,
                                url=item.url,
                                thumbnail=item.thumbnail,
                                server=item.server,
                                plot=item.plot,
                                canal=item.channel,
                                category="Series",
                                Serie=item.show.strip(),
                                verbose=False,
                                accion="play_from_library",
                                pedirnombre=False,
                                subtitle=item.subtitle,
                                extra=item.extra)
                    except IOError:
                        import sys
                        for line in sys.exc_info():
                            logger.error("%s" % line)
                        plugintools.log(
                            "streamondemand-pureita.navigation.py Error al grabar el archivo "
                            + item.title)
                        errores = errores + 1

                pDialog.close()

                # Actualizacion de la biblioteca
                itemlist = []
                if errores > 0:
                    itemlist.append(
                        Item(
                            title=
                            "ERRORE, la serie NON si è aggiunta alla biblioteca o la fatto in modo incompleto"
                        ))
                    plugintools.log(
                        "navigation.get_next_items No se pudo añadir " +
                        str(errores) + " episodios")
                else:
                    itemlist.append(
                        Item(
                            title="La serie è stata aggiunta alla biblioteca"))
                    plugintools.log(
                        "navigation.get_next_items Ningún error al añadir " +
                        str(errores) + " episodios")

                # FIXME:jesus Comentado porque no funciona bien en todas las versiones de XBMC
                #library.update(totalepisodes,errores,nuevos)
                #xbmctools.renderItems(itemlist, params, url, category)

                #Lista con series para actualizar
                from core import config
                nombre_fichero_config_canal = os.path.join(
                    config.get_library_path(), "series.xml")
                if not os.path.exists(nombre_fichero_config_canal):
                    nombre_fichero_config_canal = os.path.join(
                        config.get_data_path(), "series.xml")

                plugintools.log("nombre_fichero_config_canal=" +
                                nombre_fichero_config_canal)
                if not os.path.exists(nombre_fichero_config_canal):
                    f = open(nombre_fichero_config_canal, "w")
                else:
                    f = open(nombre_fichero_config_canal, "r")
                    contenido = f.read()
                    f.close()
                    f = open(nombre_fichero_config_canal, "w")
                    f.write(contenido)
                from platformcode import library
                f.write(
                    library.title_to_folder_name(item.show) + "," + item.url +
                    "," + item.channel + "\n")
                f.close()
                return itemlist
            # --------------------------------------------------------------------
            elif item.action == "download_all_episodes":
                plugintools.log(
                    "navigation.get_next_items download_all_episodes")
                download_all_episodes(item, channel)

#---------------------------------------------------------------------
            else:

                if item.action == "search":
                    tecleado = plugintools.keyboard_input()
                    if tecleado != "":
                        tecleado = tecleado.replace(" ", "+")
                        itemlist = channel.search(item, tecleado)
                elif item.channel == "novedades" and item.action == "mainlist":
                    itemlist = channel.mainlist(item, "bannermenu")
                elif item.channel == "buscador" and item.action == "mainlist":
                    itemlist = channel.mainlist(item, "bannermenu")
                else:
                    exec "itemlist = channel." + item.action + "(item)"

                for loaded_item in itemlist:

                    if loaded_item.thumbnail == "":
                        if loaded_item.folder:
                            loaded_item.thumbnail = os.path.join(
                                plugintools.get_runtime_path(), "resources",
                                "images", "thumb_folder.png")
                        else:
                            loaded_item.thumbnail = os.path.join(
                                plugintools.get_runtime_path(), "resources",
                                "images", "thumb_nofolder.png")

                if len(itemlist) == 0:
                    itemlist = [
                        Item(title="Nessun Elemento Da Visualizzare",
                             thumbnail=os.path.join(
                                 plugintools.get_runtime_path(), "resources",
                                 "images", "thumb_error.png"))
                    ]

    except:
        import traceback
        plugintools.log("navigation.get_next_items " + traceback.format_exc())
        itemlist = [
            Item(title="Rimozione Effettuata - Riavviare",
                 thumbnail=os.path.join(plugintools.get_runtime_path(),
                                        "resources", "images",
                                        "thumb_error.png"))
        ]

    return itemlist
def settings(params):
    plugintools.open_settings_dialog()
示例#26
0
def license_check(params):
    plugintools.log(pnimi +
                    get_live("U2V0dGluZ3MgbWVudSAtIFdhcmRvY3RvciB3aW5zIQ==") +
                    repr(params))
    plugintools.open_settings_dialog()
示例#27
0
def settings(params):
    plugintools.log("movie4k.settings "+repr(params))
    plugintools.open_settings_dialog()
示例#28
0
def o0oOoO00o(params):
    plugintools.log(pnimi + I1IiI("TWFpbiBNZW51") + repr(params))
    #IiI1i ( )
    if not lehekylg:
        plugintools.open_settings_dialog()
    OOo0o0 = oOOo()
    ii11i1i1ii00ooo00o0o0o0o = (time.strftime("%d/%m/%Y"))
    #gksie0s011saew ( )
    if OOo0o0 == 1:
        plugintools.log(pnimi + I1IiI("TG9naW4gU3VjY2Vzcw=="))
        plugintools.add_item(
            action="maintenance",
            title=I1IiI(
                "TWFpbnRlbmFuY2UgVG9vbHMgIChVbmRlciBEZXZlbG9wbWVudCk="),
            thumbnail=os.path.join(LOAD_LIVE, o0OOO("")),
            fanart=os.path.join(LOAD_LIVE, I1IiI("bWFpbnRlbmFuY2UucG5n")),
            folder=False)
        plugintools.add_item(
            action="O0ooo0O0oo0",
            title=I1IiI("TXkgQWNjb3VudA=="),
            thumbnail=os.path.join(LOAD_LIVE,
                                   o0OOO("YWNjb3VudF9pY29uLnBuZw==")),
            fanart=os.path.join(LOAD_LIVE, I1IiI("YmFja2dyb3VuZC5qcGc=")),
            folder=True)
        plugintools.add_item(
            action="OoOo",
            title=I1IiI("TGl2ZSBUVg=="),
            thumbnail=os.path.join(LOAD_LIVE, o0OOO("bGl2ZV9pY29uLnBuZw==")),
            fanart=os.path.join(LOAD_LIVE, I1IiI("YmFja2dyb3VuZC5qcGc=")),
            folder=True)
        plugintools.add_item(action="O0O00o0OOO0",
                             title=I1IiI("VmlkZW8gT24gRGVtYW5k"),
                             thumbnail=os.path.join(LOAD_LIVE,
                                                    o0OOO("dm9kX2ljb24ucG5n")),
                             fanart=os.path.join(
                                 LOAD_LIVE, I1IiI("YmFja2dyb3VuZC5qcGc=")),
                             folder=True)
        plugintools.add_item(action="O0O00o0OOO02",
                             title=I1IiI("VFYgU2VyaWVz"),
                             thumbnail=os.path.join(LOAD_LIVE,
                                                    o0OOO("dHZzLnBuZw==")),
                             fanart=os.path.join(
                                 LOAD_LIVE, I1IiI("YmFja2dyb3VuZC5qcGc=")),
                             folder=True)
        plugintools.add_item(
            action="oo00O00oO",
            title=I1IiI("TWFuaWEgSEQgQ2F0Y2h1cCA="),
            thumbnail=os.path.join(LOAD_LIVE,
                                   o0OOO("YXJjaGl2ZV9pY29uLnBuZw==")),
            fanart=os.path.join(LOAD_LIVE, I1IiI("YmFja2dyb3VuZC5qcGc=")),
            folder=True)
        plugintools.add_item(
            action="i1I111I",
            title=I1IiI("U2V0dGluZ3M="),
            thumbnail=os.path.join(LOAD_LIVE,
                                   o0OOO("c2V0dGluZ3NfaWNvbi5wbmc=")),
            fanart=os.path.join(LOAD_LIVE, I1IiI("YmFja2dyb3VuZC5qcGc=")),
            folder=False)
        plugintools.add_item(action="speedTest",
                             title=I1IiI("SW50ZXJuZXQgU3BlZWQgVGVzdA=="),
                             thumbnail=os.path.join(
                                 LOAD_LIVE, o0OOO("c3BlZWR0ZXN0LnBuZw==")),
                             fanart=os.path.join(LOAD_LIVE,
                                                 I1IiI("c3BlZWRiZy5wbmc=")),
                             folder=False)
        plugintools.set_view(plugintools.LIST)
    else:
        plugintools.log(pnimi + I1IiI("TG9naW4gZmFpbGVk"))
        plugintools.message(
            I1IiI("TG9naW4gZmFpbGVk"),
            I1IiI(
                "UG9zc2libGUgcmVhc29uczogV3JvbmcgaG9zdCxwb3J0LHVzZXJuYW1lIG9yIHBhc3MuICAgICAgICAgIFBsZWFzZSByZWNvbmZpZ3VyZSAlcyBwbHVnaW4gd2l0aCBjb3JyZWN0IGRldGFpbHMh"
            ) % (pnimi))
        plugintools.open_settings_dialog()
        #Oo = plugintools . get_setting ( O0O ( "a2FzdXRhamFuaW1p" ) )
        #I1ii11iIi11i = plugintools . get_setting ( I1IiI ( "c2FsYXNvbmE=" ) )
        I11i()
    if plugintools.get_setting("improve") == "true":
        O0OoOoo00o = xbmc.translatePath(
            o0OOO("c3BlY2lhbDovL3VzZXJkYXRhL2FkdmFuY2Vkc2V0dGluZ3MueG1s"))
        if not os.path.exists(O0OoOoo00o):
            file = open(
                os.path.join(plugintools.get_runtime_path(),
                             I1IiI("cmVzb3VyY2Vz"),
                             o0OOO("YWR2YW5jZWRzZXR0aW5ncy54bWw=")))
            iiiI11 = file.read()
            file.close()
            file = open(O0OoOoo00o, "w")
            file.write(iiiI11)
            file.close()
            plugintools.message(
                pnimi,
                O0O("TmV3IGFkdmFuY2VkIHN0cmVhbWluZyBzZXR0aW5ncyBhZGRlZC4="))
            if 91 - 91: oOOOO / i1iiIII111ii + iiIIi1IiIi11.i1Ii
            if 25 - 25:
                OO00O0O0O00Oo + OOoooooO / Oo0ooO0oo0oO.oOOOO % Oo0oO0ooo.Ooo0
示例#29
0
文件: default.py 项目: ssneoh/sstv
def OPEN_SETTINGS(params):
        plugintools.open_settings_dialog()
        xbmc.executebuiltin("Container.Refresh")
示例#30
0
def settings(params):
    plugintools.log("dandb.settings "+repr(params))
    plugintools.open_settings_dialog()
示例#31
0
def license_check(params):
    plugintools.log(pnimi+get_live("U2V0dGluZ3MgbWVudQ==")+repr(params))
    plugintools.open_settings_dialog()
示例#32
0
def OPEN_SETTINGS(params):
    plugintools.open_settings_dialog()
    xbmc.executebuiltin("Container.Refresh")
示例#33
0
def get_next_items(item):

    plugintools.log("navigation.get_next_items item=" + item.tostring())

    try:
        # ----------------------------------------------------------------
        #  Main menu
        # ----------------------------------------------------------------
        if item.channel == "navigation":

            if item.action == "mainlist":
                plugintools.log("navigation.get_next_items Main menu")
                itemlist = channelselector.getmainlist("bannermenu")

        elif item.channel == "channelselector":

            if item.action == "channeltypes":
                plugintools.log("navigation.get_next_items Channel types menu")
                itemlist = channelselector.getchanneltypes("bannermenu")

            if item.action == "program_types":
                plugintools.log("navigation.get_next_items Program types menu")
                itemlist = channelselector.get_program_types("bannermenu")

            elif item.action == "listchannels":
                plugintools.log("navigation.get_next_items Channel list menu")
                itemlist = channelselector.filterchannels(
                    item.category, "bannermenu")

        elif item.channel == "configuracion":
            plugintools.open_settings_dialog()
            return []

        else:

            if item.action == "":
                item.action = "mainlist"

            plugintools.log("navigation.get_next_items Channel code (" +
                            item.channel + "." + item.action + ")")

            try:
                exec "import channels." + item.channel + " as channel"
            except:
                exec "import core." + item.channel + " as channel"

            from platformcode import xbmctools

            if item.action == "play":
                plugintools.log("navigation.get_next_items play")

                # Si el canal tiene una acción "play" tiene prioridad
                if hasattr(channel, 'play'):
                    plugintools.log(
                        "pelisalacarta.platformcode.launcher Channel has its own 'play' method"
                    )
                    itemlist = channel.play(item)
                    if len(itemlist) > 0:
                        item = itemlist[0]

                        # FIXME: Este error ha que tratarlo de otra manera, al dar a volver sin ver el vídeo falla
                        try:
                            xbmctools.play_video(channel=item.channel,
                                                 server=item.server,
                                                 url=item.url,
                                                 category=item.category,
                                                 title=item.title,
                                                 thumbnail=item.thumbnail,
                                                 plot=item.plot,
                                                 extra=item.extra,
                                                 subtitle=item.subtitle,
                                                 video_password=item.password,
                                                 fulltitle=item.fulltitle,
                                                 Serie=item.show)
                        except:
                            pass

                    else:
                        import xbmcgui
                        ventana_error = xbmcgui.Dialog()
                        ok = ventana_error.ok("plugin",
                                              "No hay nada para reproducir")
                else:
                    plugintools.log(
                        "pelisalacarta.platformcode.launcher No channel 'play' method, executing core method"
                    )

                    # FIXME: Este error ha que tratarlo de otra manera, por al dar a volver sin ver el vídeo falla
                    # Mejor hacer el play desde la ventana
                    try:
                        xbmctools.play_video(channel=item.channel,
                                             server=item.server,
                                             url=item.url,
                                             category=item.category,
                                             title=item.title,
                                             thumbnail=item.thumbnail,
                                             plot=item.plot,
                                             extra=item.extra,
                                             subtitle=item.subtitle,
                                             video_password=item.password,
                                             fulltitle=item.fulltitle,
                                             Serie=item.show)
                    except:
                        pass

                return []

            elif item.action == "findvideos":
                plugintools.log("navigation.get_next_items findvideos")

                # Si el canal tiene una acción "findvideos" tiene prioridad
                if hasattr(channel, 'findvideos'):
                    plugintools.log(
                        "pelisalacarta.platformcode.launcher Channel has its own 'findvideos' method"
                    )
                    itemlist = channel.findvideos(item)
                else:
                    itemlist = []

                if len(itemlist) == 0:
                    from servers import servertools
                    itemlist = servertools.find_video_items(item)

                if len(itemlist) == 0:
                    itemlist = [
                        Item(title="No se han encontrado vídeos",
                             thumbnail=os.path.join(
                                 plugintools.get_runtime_path(), "resources",
                                 "images", "thumb_error.png"))
                    ]

            else:

                if item.action == "search":
                    tecleado = plugintools.keyboard_input()
                    if tecleado != "":
                        tecleado = tecleado.replace(" ", "+")
                        itemlist = channel.search(item, tecleado)
                elif item.channel == "novedades" and item.action == "mainlist":
                    itemlist = channel.mainlist(item, "bannermenu")
                elif item.channel == "buscador" and item.action == "mainlist":
                    itemlist = channel.mainlist(item, "bannermenu")
                else:
                    exec "itemlist = channel." + item.action + "(item)"

                for loaded_item in itemlist:

                    if loaded_item.thumbnail == "":
                        if loaded_item.folder:
                            loaded_item.thumbnail = os.path.join(
                                plugintools.get_runtime_path(), "resources",
                                "images", "thumb_folder.png")
                        else:
                            loaded_item.thumbnail = os.path.join(
                                plugintools.get_runtime_path(), "resources",
                                "images", "thumb_nofolder.png")

                if len(itemlist) == 0:
                    itemlist = [
                        Item(title="No hay elementos para mostrar",
                             thumbnail=os.path.join(
                                 plugintools.get_runtime_path(), "resources",
                                 "images", "thumb_error.png"))
                    ]

    except:
        import traceback
        plugintools.log("navigation.get_next_items " + traceback.format_exc())
        itemlist = [
            Item(title="Se ha producido un error",
                 thumbnail=os.path.join(plugintools.get_runtime_path(),
                                        "resources", "images",
                                        "thumb_error.png"))
        ]

    return itemlist
示例#34
0
def license_check(params):
    plugintools.log(pnimi + "Settings menu" + repr(params))
    plugintools.open_settings_dialog()
示例#35
0
def peamenyy(params):
    plugintools.log(pnimi + "Main Menu" + repr(params))
    load_channels()
    if not lehekylg:
        plugintools.open_settings_dialog()
    if uuendused == "true":
        kontrolli_uuendusi()
    channels = kontroll()
    if channels == 1 and orig.mode != 5:
        plugintools.log(pnimi + "Login Success")
        plugintools.add_item(
            action="security_check",
            title="[COLOR gold][B][I]PLAYERS LIVE[/I][/B][/COLOR]",
            thumbnail=os.path.join(LOAD_LIVE, "livetv.png"),
            fanart=os.path.join(LOAD_LIVE, "background.png"),
            folder=True)
        orig.AddDir('[COLOR deepskyblue][B]VOD/RETRO/CATCH UP[/B][/COLOR]',
                    'ExtraMenu', 5, orig.Images + 'movies.png',
                    orig.Images + 'background.png')
        orig.AddDir('[COLOR red][B]RED LIGHT[/B][/COLOR]', 'wizard3', 10,
                    orig.Images + 'adt.png', orig.Images + 'background.png')
        plugintools.addItem('[COLOR orange][B]Launch PVR[/B][/COLOR]', 'pvr',
                            12, orig.Images + 'launch-icon.png',
                            orig.Images + 'background.png')
        orig.AddDir('[COLOR teal][B]Clear Cache[/B][/COLOR]', 'Clear Cache', 7,
                    orig.Images + 'clear.png')
        plugintools.add_item(
            action="license_check",
            title="[COLOR orangered][B][I]Settings[/I][/B][/COLOR]",
            thumbnail=os.path.join(LOAD_LIVE, "logo.png"),
            fanart=os.path.join(LOAD_LIVE, "background.png"),
            folder=False)
        plugintools.addItem(
            '[COLOR limegreen][B][I]Click to Setup PVR SIMPLE CLIENT[/I][/B][/COLOR]',
            'pvr', 11, orig.Images + 'hqdefault.jpg',
            orig.Images + 'background.png')
        orig.AddDir('[COLOR blue][B]FAVOURITES[/B][/COLOR]', 'TVShows', 9,
                    orig.Images + 'Favorites.png',
                    orig.Images + 'background.png')

    elif orig.mode != 5:
        plugintools.add_item(
            action="license_check",
            title="[COLOR yellow][B]Click here to enter login[/B][/COLOR]",
            thumbnail=os.path.join(LOAD_LIVE, "logo.png"),
            fanart=os.path.join(LOAD_LIVE, "background.png"),
            folder=False)

        orig.AddDir(
            '[COLOR yellow][B]Click here to refresh after login details have been entered[/B][/COLOR]',
            'Clear Cache', 7, orig.Images + 'logo.png')
    if plugintools.get_setting("improve") == "true":
        tseaded = xbmc.translatePath("special://userdata/advancedsettings.xml")
        if not os.path.exists(tseaded):
            file = open(
                os.path.join(plugintools.get_runtime_path(), "resources",
                             "advancedsettings.xml"))
            data = file.read()
            file.close()
            file = open(tseaded, "w")
            file.write(data)
            file.close()
            plugintools.message(pnimi,
                                "New advanced streaming settings added.")
示例#36
0
def OPEN_SETTINGS(params):
    plugintools.open_settings_dialog()
示例#37
0
    maintool.autocleanask()

elif mode == 'clearthumbs':
    maintool.deleteThumbnails()

elif mode == 'crashlogs':
    maintool.DeleteCrashLogs()

elif mode == 'autocleanonoff':
    maintool.AUTO_WEEKLY_CLEAN_ON_OFF()

elif mode == 'autocleanlaunch':
    maintool.AUTO_CLEAN_ON_OFF()

elif mode == 'autocleanmb':
    plugintools.open_settings_dialog()

elif mode == 'repohealth':
    maintool.CHECK_BROKEN_REPOS()

elif mode == 'sourcehealth':
    maintool.CHECK_BROKEN_SOURCES()

elif mode == 'converttospecial':
    maintool.Fix_Special()

elif mode == 'reloadskin':
    choice = xbmcgui.Dialog().yesno(
        'steman',
        'Please confirm that you wish to reload the skin cache immediately.')
    if choice == 1:
示例#38
0
def license_check(params):
    plugintools.log(pnimi+get_live("U2V0dGluZ3MgbWVudQ==")+repr(params))
    plugintools.open_settings_dialog()
def get_next_items( item ):

    plugintools.log("navigation.get_next_items item="+item.tostring())

    try:
        # ----------------------------------------------------------------
        #  Main menu
        # ----------------------------------------------------------------
        if item.channel=="navigation":
		            # --- Update channels list ---------------------------------------
            from core import config
            if item.action=="mainlist":
                plugintools.log("navigation.get_next_items Main menu")

                if config.get_setting("updatechannels")=="true":
                    try:
                        from core import updater
                        actualizado = updater.updatechannel("channelselector")

                        if actualizado:
                            import xbmcgui
                            advertencia = xbmcgui.Dialog()
                            advertencia.ok("tvalacarta",config.get_localized_string(30064))
                    except:
                        pass
            # ----------------------------------------------------------------

            if item.action=="mainlist":
                plugintools.log("navigation.get_next_items Main menu")
                itemlist = channelselector.getmainlist("bannermenu")

        elif item.channel=="channelselector":

            if item.action=="channeltypes":
                plugintools.log("navigation.get_next_items Channel types menu")
                itemlist = channelselector.getchanneltypes("bannermenu")

            elif item.action=="listchannels":
                plugintools.log("navigation.get_next_items Channel list menu")
                itemlist = channelselector.filterchannels(item.category,"bannermenu")

        elif item.channel=="configuracion":
            plugintools.open_settings_dialog()
            return []

        else:

            if item.action=="":
                item.action="mainlist"

            plugintools.log("navigation.get_next_items Channel code ("+item.channel+"."+item.action+")")

            # --- Update channels files --------------------------------------
            if item.action=="mainlist":
                from core import config
                if config.get_setting("updatechannels")=="true":
                    try:
                        from core import updater
                        actualizado = updater.updatechannel(item.channel)

                        if actualizado:
                            import xbmcgui
                            advertencia = xbmcgui.Dialog()
                            advertencia.ok("plugin",item.channel,config.get_localized_string(30063))
                    except:
                        pass
            # ----------------------------------------------------------------

            try:
                exec "import channels."+item.channel+" as channel"
            except:
                exec "import core."+item.channel+" as channel"

            from platformcode import xbmctools

            if item.action=="play":
                plugintools.log("navigation.get_next_items play")

                # Si el canal tiene una acción "play" tiene prioridad
                if hasattr(channel, 'play'):
                    plugintools.log("streamondemand-pureita.navigation.py Channel has its own 'play' method")
                    itemlist = channel.play(item)
                    if len(itemlist)>0:
                        item = itemlist[0]

                        # FIXME: Este error ha que tratarlo de otra manera, al dar a volver sin ver el vídeo falla
                        try:
                            xbmctools.play_video(channel=item.channel, server=item.server, url=item.url, category=item.category, title=item.title, thumbnail=item.thumbnail, plot=item.plot, extra=item.extra, subtitle=item.subtitle, video_password = item.password, fulltitle=item.fulltitle, Serie=item.show)
                        except:
                            pass

                    else:
                        import xbmcgui
                        ventana_error = xbmcgui.Dialog()
                        ok = ventana_error.ok ("plugin", "No hay nada para reproducir")
                else:
                    plugintools.log("streamondemand-pureita.navigation.py No channel 'play' method, executing core method")

                    # FIXME: Este error ha que tratarlo de otra manera, por al dar a volver sin ver el vídeo falla
                    # Mejor hacer el play desde la ventana
                    try:
                        xbmctools.play_video(channel=item.channel, server=item.server, url=item.url, category=item.category, title=item.title, thumbnail=item.thumbnail, plot=item.plot, extra=item.extra, subtitle=item.subtitle, video_password = item.password, fulltitle=item.fulltitle, Serie=item.show)
                    except:
                        pass


                return []

            elif item.action=="findvideos":
                plugintools.log("navigation.get_next_items findvideos")

                # Si el canal tiene una acción "findvideos" tiene prioridad
                if hasattr(channel, 'findvideos'):
                    plugintools.log("streamondemand-pureita.navigation.py Channel has its own 'findvideos' method")
                    itemlist = channel.findvideos(item)
                else:
                    itemlist = []

                if len(itemlist)==0:
                    from servers import servertools
                    itemlist = servertools.find_video_items(item)

                if len(itemlist)==0:
                    itemlist = [ Item(title="No se han encontrado vídeos", thumbnail=os.path.join( plugintools.get_runtime_path() , "resources" , "images" , "thumb_error.png" )) ]
            # ---------------add_serie_to_library-----------
            elif item.action=="add_serie_to_library":
                plugintools.log("navigation.get_next_items add_serie_to_library")
                from platformcode import library
                import xbmcgui
                
                # Obtiene el listado desde el que se llamó
                action = item.extra
                    
                # Esta marca es porque el item tiene algo más aparte en el atributo "extra"
                if "###" in item.extra:
                    action = item.extra.split("###")[0]
                    item.extra = item.extra.split("###")[1]

                exec "itemlist = channel."+action+"(item)"

                # Progreso
                pDialog = xbmcgui.DialogProgress()
                ret = pDialog.create('streamondemand-pureita', 'Añadiendo episodios...')
                pDialog.update(0, 'Añadiendo episodio...')
                totalepisodes = len(itemlist)
                plugintools.log ("navigation.get_next_items Total Episodios:"+str(totalepisodes))
                i = 0
                errores = 0
                nuevos = 0
                for item in itemlist:
                    i = i + 1
                    pDialog.update(i*100/totalepisodes, 'Añadiendo episodio...',item.title)
                    plugintools.log("streamondemand-pureita.navigation.py add_serie_to_library, title="+item.title)
                    if (pDialog.iscanceled()):
                        return
                
                    try:
                        #(titulo="",url="",thumbnail="",server="",plot="",canal="",category="Cine",Serie="",verbose=True,accion="strm",pedirnombre=True):
                        # Añade todos menos el que dice "Añadir esta serie..." o "Descargar esta serie..."
                        if item.action!="add_serie_to_library" and item.action!="download_all_episodes":
                            nuevos = nuevos + library.savelibrary( titulo=item.title , url=item.url , thumbnail=item.thumbnail , server=item.server , plot=item.plot , canal=item.channel , category="Series" , Serie=item.show.strip() , verbose=False, accion="play_from_library", pedirnombre=False, subtitle=item.subtitle, extra=item.extra )
                    except IOError:
                        import sys
                        for line in sys.exc_info():
                            logger.error( "%s" % line )
                        plugintools.log("streamondemand-pureita.navigation.py Error al grabar el archivo "+item.title)
                        errores = errores + 1
                        
                pDialog.close()
                    
                # Actualizacion de la biblioteca
                itemlist=[]
                if errores > 0:
                    itemlist.append(Item(title="ERRORE, la serie NON si è aggiunta alla biblioteca o la fatto in modo incompleto"))
                    plugintools.log ("navigation.get_next_items No se pudo añadir "+str(errores)+" episodios")
                else:
                    itemlist.append(Item(title="La serie è stata aggiunta alla biblioteca"))
                    plugintools.log ("navigation.get_next_items Ningún error al añadir "+str(errores)+" episodios")
                    
                # FIXME:jesus Comentado porque no funciona bien en todas las versiones de XBMC
                #library.update(totalepisodes,errores,nuevos)
                #xbmctools.renderItems(itemlist, params, url, category)
                    
                #Lista con series para actualizar
                from core import config
                nombre_fichero_config_canal = os.path.join( config.get_library_path() , "series.xml" )
                if not os.path.exists(nombre_fichero_config_canal):
                    nombre_fichero_config_canal = os.path.join( config.get_data_path() , "series.xml" )

                plugintools.log("nombre_fichero_config_canal="+nombre_fichero_config_canal)
                if not os.path.exists(nombre_fichero_config_canal):
                    f = open( nombre_fichero_config_canal , "w" )
                else:
                    f = open( nombre_fichero_config_canal , "r" )
                    contenido = f.read()
                    f.close()
                    f = open( nombre_fichero_config_canal , "w" )
                    f.write(contenido)
                from platformcode import library
                f.write( library.title_to_folder_name(item.show)+","+item.url+","+item.channel+"\n")
                f.close();
                return itemlist
            # --------------------------------------------------------------------
            elif item.action=="download_all_episodes":
                plugintools.log("navigation.get_next_items download_all_episodes")
                download_all_episodes(item,channel)
			#---------------------------------------------------------------------
            else:

                if item.action=="search":
                    tecleado = plugintools.keyboard_input()
                    if tecleado!="":
                        tecleado = tecleado.replace(" ", "+")
                        itemlist = channel.search(item,tecleado)
                elif item.channel=="novedades" and item.action=="mainlist":
                    itemlist = channel.mainlist(item,"bannermenu")
                elif item.channel=="buscador" and item.action=="mainlist":
                    itemlist = channel.mainlist(item,"bannermenu")
                else:
                    exec "itemlist = channel."+item.action+"(item)"

                for loaded_item in itemlist:

                    if loaded_item.thumbnail=="":
                        if loaded_item.folder:
                            loaded_item.thumbnail = os.path.join( plugintools.get_runtime_path() , "resources" , "images" , "thumb_folder.png" )
                        else:
                            loaded_item.thumbnail = os.path.join( plugintools.get_runtime_path() , "resources" , "images" , "thumb_nofolder.png" )

                if len(itemlist)==0:
                    itemlist = [ Item(title="No hay elementos para mostrar", thumbnail=os.path.join( plugintools.get_runtime_path() , "resources" , "images" , "thumb_error.png" )) ]

    except:
        import traceback
        plugintools.log("navigation.get_next_items "+traceback.format_exc())
        itemlist = [ Item(title="Se ha producido un error", thumbnail=os.path.join( plugintools.get_runtime_path() , "resources" , "images" , "thumb_error.png" )) ]


    return itemlist
def settings(params):
    plugintools.open_settings_dialog()
示例#41
0
def settings():
    plugintools.open_settings_dialog()
示例#42
0
def get_next_items( item ):

    plugintools.log("navigation.get_next_items item="+item.tostring())

    try:
        # ----------------------------------------------------------------
        #  Main menu
        # ----------------------------------------------------------------
        if item.channel=="navigation":

            if item.action=="mainlist":
                plugintools.log("navigation.get_next_items Main menu")
                itemlist = channelselector.getmainlist("bannermenu")

        elif item.channel=="channelselector":

            if item.action=="channeltypes":
                plugintools.log("navigation.get_next_items Channel types menu")
                itemlist = channelselector.getchanneltypes("bannermenu")

            elif item.action=="listchannels":
                plugintools.log("navigation.get_next_items Channel list menu")
                itemlist = channelselector.filterchannels(item.category,"bannermenu")

        elif item.channel=="configuracion":
            plugintools.open_settings_dialog()
            return []

        else:

            if item.action=="":
                item.action="mainlist"

            plugintools.log("navigation.get_next_items Channel code ("+item.channel+"."+item.action+")")

            try:
                exec "import channels."+item.channel+" as channel"
            except:
                exec "import core."+item.channel+" as channel"

            from platformcode import xbmctools

            if item.action=="play":
                plugintools.log("navigation.get_next_items play")

                # Si el canal tiene una acción "play" tiene prioridad
                if hasattr(channel, 'play'):
                    plugintools.log("pelisalacarta.platformcode.launcher Channel has its own 'play' method")
                    itemlist = channel.play(item)
                    if len(itemlist)>0:
                        item = itemlist[0]

                        # FIXME: Este error ha que tratarlo de otra manera, al dar a volver sin ver el vídeo falla
                        try:
                            xbmctools.play_video(channel=item.channel, server=item.server, url=item.url, category=item.category, title=item.title, thumbnail=item.thumbnail, plot=item.plot, extra=item.extra, subtitle=item.subtitle, video_password = item.password, fulltitle=item.fulltitle, Serie=item.show)
                        except:
                            pass

                    else:
                        import xbmcgui
                        ventana_error = xbmcgui.Dialog()
                        ok = ventana_error.ok ("plugin", "No hay nada para reproducir")
                else:
                    plugintools.log("pelisalacarta.platformcode.launcher No channel 'play' method, executing core method")

                    # FIXME: Este error ha que tratarlo de otra manera, por al dar a volver sin ver el vídeo falla
                    # Mejor hacer el play desde la ventana
                    try:
                        xbmctools.play_video(channel=item.channel, server=item.server, url=item.url, category=item.category, title=item.title, thumbnail=item.thumbnail, plot=item.plot, extra=item.extra, subtitle=item.subtitle, video_password = item.password, fulltitle=item.fulltitle, Serie=item.show)
                    except:
                        pass


                return []

            elif item.action=="findvideos":
                plugintools.log("navigation.get_next_items findvideos")

                # Si el canal tiene una acción "findvideos" tiene prioridad
                if hasattr(channel, 'findvideos'):
                    plugintools.log("pelisalacarta.platformcode.launcher Channel has its own 'findvideos' method")
                    itemlist = channel.findvideos(item)
                else:
                    itemlist = []

                if len(itemlist)==0:
                    from servers import servertools
                    itemlist = servertools.find_video_items(item)

                if len(itemlist)==0:
                    itemlist = [ Item(title="No se han encontrado vídeos", thumbnail=os.path.join( plugintools.get_runtime_path() , "resources" , "images" , "thumb_error.png" )) ]

            else:

                if item.action=="search":
                    tecleado = plugintools.keyboard_input()
                    if tecleado!="":
                        tecleado = tecleado.replace(" ", "+")
                        itemlist = channel.search(item,tecleado)
                elif item.channel=="novedades" and item.action=="mainlist":
                    itemlist = channel.mainlist(item,"bannermenu")
                elif item.channel=="buscador" and item.action=="mainlist":
                    itemlist = channel.mainlist(item,"bannermenu")
                else:
                    exec "itemlist = channel."+item.action+"(item)"

                for loaded_item in itemlist:

                    if loaded_item.thumbnail=="":
                        if loaded_item.folder:
                            loaded_item.thumbnail = os.path.join( plugintools.get_runtime_path() , "resources" , "images" , "thumb_folder.png" )
                        else:
                            loaded_item.thumbnail = os.path.join( plugintools.get_runtime_path() , "resources" , "images" , "thumb_nofolder.png" )

                if len(itemlist)==0:
                    itemlist = [ Item(title="No hay elementos para mostrar", thumbnail=os.path.join( plugintools.get_runtime_path() , "resources" , "images" , "thumb_error.png" )) ]

    except:
        import traceback
        plugintools.log("navigation.get_next_items "+traceback.format_exc())
        itemlist = [ Item(title="Se ha producido un error", thumbnail=os.path.join( plugintools.get_runtime_path() , "resources" , "images" , "thumb_error.png" )) ]


    return itemlist
示例#43
0
文件: default.py 项目: noba3/KoTos
    mega = Mega()

    maindialog.update(50,"Connecting...")
    plugintools.log("mega.init Login...")
    USERNAME = plugintools.get_setting("username")
    PASSWORD = plugintools.get_setting("password")
    #plugintools.log("mega.init USERNAME="******"mega.init PASSWORD="******"":
            plugintools.open_settings_dialog()
            USERNAME = plugintools.get_setting("username")
            PASSWORD = plugintools.get_setting("password")
            #plugintools.log("mega.init USERNAME="******"mega.init PASSWORD="******"Invalid login","Wrong username or password")
                import traceback,sys
                from pprint import pprint
                exc_type, exc_value, exc_tb = sys.exc_info()
                lines = traceback.format_exception(exc_type, exc_value, exc_tb)
                for line in lines: