Exemple #1
0
def Login ( username, password, hidesuccess ) :
    uc = username[0].upper() + username[1:]
    lc = username.lower

    logged_in = weblogin.doLogin(__datapath__,username,password)
    if logged_in == True:
        avatar = get_avatar(lc)
Exemple #2
0
def INDEX_PROG_CH():
    cookiepath = weblogin.doLogin(username, password)
    source = weblogin.openUrl(programme_url, cookiepath)
    match = Compile(
        '<a href=programme\?cid=(.+?)#..class=tab >(.+?)<\/a>').findall(source)
    for cid, name in match:
        addDir(name, cid, 41, prog_icon)
def AUTHCHECK():
        logged_in = weblogin.check_if_logged_in(__datapath__)
        if logged_in == False:
                logged_in = weblogin.doLogin(__cookiepath__,__username__,__password__)
            
        if logged_in == True:
                cj.load(__cookiepath__)
Exemple #4
0
def LOGIN(username,password,hidesuccess):
	#uc = username[0].upper() + username[0:]
	lc = username.lower()
	hidesuccess = __settings__.getSetting('hide-successful-login-messages')
	logged_in = weblogin.doLogin(cookiepath,username,password)
	
	# Comprueba si esta logeado, y si lo esta, ejecuta las acciones
	if logged_in == True:
	        
		Bienve1 = dialogo.ok('[COLOR red]Bienvenidos a [/COLOR]***[COLOR blue]PROYECTOLUZDIGITAL[/COLOR]***','[COLOR red]     El plugin PLD-Visiontv [COLOR blue]Proyectoluzdigital[/COLOR][COLOR red] esta Activado[/COLOR]   [/COLOR]','Esperamos Disfruteis de este plugin echo para ustedes, PLD no se hace RESPONSABLE del uso que les den a este plugin esto es solo, con fines de investigacion.','        Visiten el foro para cualquier duda y consulta Gracias.    [COLOR blue]----------------------[COLOR blue] http://proyectoluzdigital.info[/COLOR]-----------------------[/COLOR] ')
		import activador
		
		# Debajo de esta linea iran las opciones especiales de los que esten logeados
		#############################################################################
		#############################################################################
		
		#si Desactivar Notificaciones esta Desactivado, envia todas las notificaciones que haya, tanto avisos, errores etc
		if hidesuccess == 'false':
			pass

	# Si no esta logeado te manda el error de login, y las funciones que se añadan para los desconectados.
	if logged_in == False:
		Notificaciones('[COLOR blue]Visite ProyectoLuzDigital.info[/COLOR]','El Usuario y Contraseña no son Correcto Introduzcalo de nuevo','5000',notierror)
		
	        Bienve1 = dialogo.ok('Bienvenidos a [COLOR blue]PROYECTOLUZDIGITAL[/COLOR]','###### [COLOR red]El Usuario y Contraseña no son Correcto[/COLOR]######','########         [COLOR red]Vuelva ha EJECUTAR EL ACTIVADOR [/COLOR]      ########','###### O Visite  [COLOR blue] http://proyectoluzdigital.info[/COLOR] #######')
		__settings__.openSettings()
		sys.exit(0)
Exemple #5
0
def LOGIN(username, password, hidesuccess):
    uc = username[0].upper() + username[1:]
    lc = username.lower()

    logged_in, avatar = weblogin.doLogin(__datapath__, username, password)
    if logged_in:
        if hidesuccess == 'false':
            Notify('Welcome back ' + uc, 'Fantasti.cc loves you', 4000,
                   avatar)

        addDir(uc + '\'s Videos',
               main_url + 'user/' + lc + '/videos/', 3, avatar)
        addDir(uc + '\'s Turn Videos',
               main_url + 'user/' + lc + '/videos/?type=video', 3, avatar)
        addDir(uc + '\'s Turn Tubes',
               main_url + 'user/' + lc + '/videos/?type=tube', 3, avatar)
        addDir(uc + '\'s Favourite Videos',
               main_url + 'user/' + lc + '/videos/?type=favourite', 3, avatar)
        addDir(uc + '\'s Collections',
               main_url + 'user/' + lc + '/collections/recently-updated/all/author/', 2, avatar)
        addDir(uc + '\'s Favourited Collections',
               main_url + 'user/' + lc + '/collections/recently-updated/all/favorited/', 2, avatar)
        addDir(uc + '\'s Rated Collections',
               main_url + 'user/' + lc + '/collections/recently-updated/all/rated/', 2, avatar)
        addDir(uc + '\'s Commented Collections',
               main_url + 'user/' + lc + '/collections/recently-updated/all/commented/', 2, avatar)

    else:
        Notify('Login Failure', uc + ' could not login', 4000, default_image)
Exemple #6
0
def LIST_VID():
    channel_source = weblogin.doLogin('', username, password, url_login)
    channel_source = weblogin.openUrl(url_videos)
    match = re.compile(
        '<li>\s*.*<a href="(.+?)"\s*class="side-nav__item.*"\s.*.\s*>(.+?)<\/a>'
    ).findall(channel_source)
    for url_chann, name in match:
        addDir(name, url_chann, 2, '')
Exemple #7
0
def LIST_REC():
    cookiepath = weblogin.doLogin(username, password)
    source = weblogin.openUrl(recording_url, cookiepath)
    match = Compile('<a href=recording(.+?)#..class=tab.>(.+?)<\/a>').findall(
        source)
    for cid, name in match:
        rec_url = (recording_url + cid)
        addDir(name, rec_url, 31, vid_icon)
 def login(self):
     if self.__dbg__:            print ("hockeystreams: login attempt")
     if not self.__settings__.getSetting('username') or not self.__settings__.getSetting('password'):
         self.__settings__.openSettings()
         return False
     if not weblogin.doLogin(self.cookiepath, self.__settings__.getSetting('username'), self.__settings__.getSetting('password'), self.__dbg__):
         if self.__dbg__:                print ("hockeystreams: login fail")
         return False
     return True
Exemple #9
0
def LIST_CHANNELS():
    channel_source = weblogin.doLogin('', username, password, url_login)
    channel_source = weblogin.openUrl(url_live)
    match = re.compile(
        '<a href="(.+?)".*\n.*\n.*\n.*>(.+?)<\/span>.*\n.*<img src="(.+?)"'
    ).findall(channel_source)
    for url_chann, name, thumbnail in match:
        if (videoquality == "true"):
            url_chann = url_chann + "?quality=25&type=html"
        addDir(name, url_chann, 1, thumbnail)
Exemple #10
0
def INDEX_VID(name, url):
    channel_source = weblogin.doLogin('', username, password, url_login)
    channel_source = weblogin.openUrl(url)
    match = re.compile(',{"id":(.+?),"tag":"(.+?)","name":"(.+?)"').findall(
        channel_source)
    for id, url, name in match:
        url = url_videos + "/" + url
        try:
            name = name.decode('unicode-escape').encode('utf-8')
        except:
            pass
        addDir(name, url, 3, '')
Exemple #11
0
def LIST_REC_CHAN(url):
    cookiepath = weblogin.doLogin(username, password)
    source = weblogin.openUrl(url, cookiepath)
    match = Compile(
        '(<div class="day">(.+?)<\/div>)*(<a href=(.+?)><li><span class="time">(.+?)<\/span><span class="title">(.+?)<\/span>)'
    ).findall(source)
    for temp1, day, temp2, rec_url, time, name in match:
        del temp1, temp2
        if day is not '':
            addLink('=[' + day + ']=', '', '')
        time_convd = time_convert(time)
        desc_txt = ('[' + time_convd + '] ' + name)
        addDir(desc_txt, rec_url.strip('"'), 32, vid_icon)
Exemple #12
0
def LIST_PROG_CH(cid):
    url = programme_url + '?cid=' + cid
    cookiepath = weblogin.doLogin(username, password)
    source = weblogin.openUrl(url, cookiepath)
    match = Compile(
        '(<div class="day">(.+?)<\/div>)*(<li style="list-style: none;"><span class="time">(.+?)<\/span><span class="title">(.+?)<\/span>)'
    ).findall(source)
    for temp1, day, temp2, time, name in match:
        del temp1, temp2
        if day is not '':
            addDir('=[' + day + ']=', cid, 42, prog_icon)
        time_convd = time_convert(time)
        desc_txt = ('[' + time_convd + '] ' + name)
        addDir(desc_txt, cid, 42, prog_icon)
def LOGIN(username,password):
        uc = username[0].upper() + username[1:]
        lc = username.lower()
        
        logged_in = weblogin.doLogin(__datapath__,username,password)
        print logged_in
        if logged_in == True:

                #avatar = get_avatar(lc)

                Notify('Welcome back '+uc,'','4000','')

                

        elif logged_in == False:

                Notify('Login Failure',uc+' could not login','4000',default_image)
Exemple #14
0
def INDEX_CHANNELS(cid):
    url = (BASE + "teko/getchaclap_mbr.php?cid=" + cid)
    cookiepath = weblogin.doLogin(username, password)
    source = weblogin.openUrl(url, cookiepath)
    src_list = list(source.split(","))
    if quality == 'moderate':
        for i in range(len(src_list)):
            play_list = correct_stream_url(src_list[i])
            addLink('PLAY: ' + play_list[0], play_list[1], vid_icon)
    else:
        '''
        Presuming that the first stream has the lowest quality and the last - the highest
         0 : getting the first stream link
        -1 : getting the last stream link
        '''
        if quality == 'low' or len(src_list) == 1:
            element = 0
        if quality == 'high' and len(src_list) > 1:
            element = -1
        xbmc.log('2-quality: ' + quality + ' and nuber of streams: ' +
                 str(len(src_list)))
        play_list = correct_stream_url(src_list[element])
        #xbmc.log(play_list)
        '''
        loading json clap conf
        '''
        source_clap = weblogin.openUrl(BASE + 'teko/onairclap.php', cookiepath)
        clap_json_config = json.loads(source_clap)
        for i in range(len(clap_json_config)):
            if clap_json_config[i]['cid'] == cid:
                text1 = clap_json_config[i]['chName']
                text2 = clap_json_config[i]['name']
                icon = clap_json_config[i]['logo']
        '''
        playing the stream
        '''
        liz = xbmcgui.ListItem(play_list[0])
        liz.setInfo(type="Video", infoLabels={"Title": play_list[0]})
        liz.setProperty('IsPlayable', 'true')
        xbmc.Player().play(item=play_list[1],
                           listitem=liz,
                           windowed=False,
                           startpos=-1)
        xbmcgui.Dialog().notification(text1, text2, icon, 10000, sound=False)
        return xbmcplugin.endOfDirectory(int(sys.argv[1]), succeeded=False)
Exemple #15
0
def LOGIN(username,password,hidesuccess):
	uc = username[0].upper() + username[1:]
	lc = username.lower()
	hidesuccess = __settings__.getSetting('hide-successful-login-messages')
	logged_in = weblogin.doLogin(cookiepath,username,password)
	
	# Comprueba si esta logeado, y si lo esta, ejecuta las acciones
	if logged_in == True:
		# Debajo de esta linea iran las opciones especiales de los que esten logeados
		#############################################################################
		#############################################################################
		
		#si Desactivar Notificaciones esta Desactivado, envia todas las notificaciones que haya, tanto avisos, errores etc
		if hidesuccess == 'false':
			pass

	# Si no esta logeado te manda el error de login, y las funciones que se añadan para los desconectados.
	if logged_in == False:
		Notificaciones('Error de Login',username+' Comprueba tus datos.','4000',notierror)
def LOGIN(username,password):
        uc = username[0].upper() + username[1:]
        lc = username.lower()

        logged_in = weblogin.check_if_logged_in(__datapath__)
        if logged_in == False:
            logged_in = weblogin.doLogin(__datapath__,username,password)
            
        if logged_in == True:
                cookiepath = os.path.join(__datapath__,'cookies.lwp')
                cj.load(cookiepath)
                
                Notify('Welcome back','Successfully logged into Bayyinah.tv','4000',__icon__)

                addDir('COURSES','http://www.bayyinah.tv/categories/137959',1,'http://s3.amazonaws.com/kajabi-media/assets/category_images/137959/small/4_Series.jpg?1372522400')
                addDir('RAMADAN','http://www.bayyinah.tv/categories/137658',1,'http://s3.amazonaws.com/kajabi-media/assets/category_images/137658/small/bonus.png?1372357554')
                addDir('EXTRAS','http://www.bayyinah.tv/categories/138762',1,'http://s3.amazonaws.com/kajabi-media/assets/category_images/138762/small/icon-universe.png?1372890269')
        elif logged_in == False:
                Notify('Login Failure',' could not login','4000',__icon__)
def LOGIN(username, password, hidesuccess):
    root_xml_url = "http://laffinatcha.stream/xml/main.xml"
    uc = username[0].upper() + username[1:]
    lc = username.lower()
    true_path = koding.Physical_Path(
        'special://home/addons/plugin.video.auryn/')
    logged_in = weblogin.doLogin(true_path, username, password)

    if logged_in == True:
        Notify('Welcome', uc + '', '4000')
        get_list(root_xml_url)
    elif logged_in == False:

        Notify('Login Failure', uc + ' could not login', '4000')
        koding.Add_Dir(name=_("You must be logged in"),
                       url=_("You are not logged in"),
                       mode="message",
                       folder=True,
                       icon=xbmcaddon.Addon().getAddonInfo("icon"),
                       fanart=xbmcaddon.Addon().getAddonInfo("fanart"),
                       content_type="")
Exemple #18
0
def check_validity(account_active=False):
    cookiepath = weblogin.doLogin(username, password)
    subscribe_source = weblogin.openUrl(subscribe_url, cookiepath)
    match = Compile('<p><span.*>(.+?)<\/span><\/p>').findall(subscribe_source)
    for subs_text in match:
        account_active = True
        dates_match = Compile('.* (.+?)-(.+?)-(.+?)\.').findall(subs_text)
        for s_day, s_month, s_year in dates_match:
            date_expire = datetime.datetime(int(s_year), int(s_month),
                                            int(s_day))
            date_today = datetime.datetime.now()
            days_delta = date_expire - date_today
            xbmc.log("Account is active! You have " + str(days_delta.days) +
                     " days until it expires")
            if days_delta.days <= 5:
                xbmcgui.Dialog().notification(
                    '[ Your subscribtion will expire soon ]',
                    'Only ' + str(days_delta.days) + ' days left!',
                    xbmcgui.NOTIFICATION_INFO,
                    10000,
                    sound=False)
    return (account_active, cookiepath)
def LOGIN(username, password, hidesuccess):
    uc = username[0].upper() + username[1:]
    lc = username.lower()

    logged_in = weblogin.doLogin(__datapath__, username, password)
    if logged_in == True:
        avatar = get_avatar(lc)

        if hidesuccess == 'false':
            Notify('Welcome back ' + uc, 'Fantasti.cc loves you', '4000',
                   avatar)

        addDir(uc + '\'s Videos',
               main_url + 'user/' + lc + '/videos/save_date', 1, avatar)
        addDir(uc + '\'s Collections',
               main_url + 'user/' + lc + '/collections', 2, avatar)
        addDir(uc + '\'s Favourited Collections',
               main_url + 'user/' + lc + '/collections/favorited', 2, avatar)
        addDir(uc + '\'s Rated Collections',
               main_url + 'user/' + lc + '/collections/rated', 2, avatar)

    elif logged_in == False:
        Notify('Login Failure', uc + ' could not login', '4000', default_image)
Exemple #20
0
def LOGIN(username, password, hidesuccess):
    uc = username[0].upper() + username[1:]
    lc = username.lower()

    logged_in = weblogin.doLogin(__datapath__, username, password)
    if logged_in == True:
        avatar = get_avatar(lc)

        if hidesuccess == 'false':
            Notify('Welcome back ' + uc, 'Fantasti.cc loves you', '4000',
                   avatar)

        addDir(uc + '\'s Videos',
               main_url + 'user/' + lc + '/videos/save_date', 1, avatar)
        addDir(uc + '\'s Collections',
               main_url + 'user/' + lc + '/collections', 2, avatar)
        addDir(uc + '\'s Favourited Collections',
               main_url + 'user/' + lc + '/collections/favorited', 2, avatar)
        addDir(uc + '\'s Rated Collections',
               main_url + 'user/' + lc + '/collections/rated', 2, avatar)

    elif logged_in == False:
        Notify('Login Failure', uc + ' could not login', '4000', default_image)
Exemple #21
0
def PageDiff(url, page='', metamethod=''):
    logged_inDiff = weblogin.doLogin(addonPath, login, password)
    html = nURL(url)
    Browse_Items(html, metamethod)
    eod()
def Fav_List(site="", section="", subfav=""):
    favs = fav__COMMON__list_fetcher(site=site, section="diffanime", subfav=subfav)
    favs2 = fav__COMMON__list_fetcher(site=site, section="animecentrum", subfav=subfav)
    favs5 = fav__COMMON__list_fetcher(site=site, section="animeon", subfav=subfav)
    favs4 = fav__COMMON__list_fetcher(site=site, section="animeonline", subfav=subfav)
    favs3 = fav__COMMON__list_fetcher(site=site, section="animedrama", subfav=subfav)
    favs6 = fav__COMMON__list_fetcher(site=site, section="shnidenodc", subfav=subfav)
    ItemCount = len(favs) and len(favs2) and len(favs3) and len(favs4) and len(favs5) and len(favs6)
    if (
        len(favs) == 0
        and len(favs2) == 0
        and len(favs3) == 0
        and len(favs4) == 0
        and len(favs5) == 0
        and len(favs6) == 0
    ):
        myNote("Favorites", "None Found")
        eod()
        return
    if len(favs) == 0:
        favs = []
    if len(favs) > 0:
        logged_inDiff = weblogin.doLogin(addonPath, login, password)
    if len(favs2) == 0:
        favs2 = []
    if len(favs3) == 0:
        favs3 = []
    if len(favs4) == 0:
        favs4 = []
    if len(favs5) == 0:
        favs5 = []
    if len(favs6) == 0:
        favs6 = []
    favs += favs2
    favs += favs3
    favs += favs4
    favs += favs5
    favs += favs6
    for (
        _name,
        _year,
        _img,
        _fanart,
        _Country,
        _Url,
        _plot,
        _Genres,
        _site,
        _subfav,
        _section,
        _ToDoParams,
        _commonID,
        _commonID2,
    ) in favs:
        if _img > 0:
            img = _img
        else:
            img = iconSite
        if _fanart > 0:
            fimg = _fanart
        else:
            fimg = fanartSite
        pars = _addon.parse_query(_ToDoParams)
        _section
        _title = _name
        if _section == "diffanime":
            host = cFL(" (D-A)", "blueviolet")
            _title = _title + host
        if _section == "animecentrum":
            host = cFL(" (A-C)", "blue")
            _title = _title + host
        if _section == "animeon":
            host = cFL(" (A-ON)", "lime")
            _title = _title + host
        if _section == "animeonline":
            host = cFL(" (A-O)", "orange")
            _title = _title + host
        if _section == "animedrama":
            host = cFL(" (A-D)", "red")
            _title = _title + host
        if _section == "shnidenodc":
            host = cFL(" (A-S)", "yellow")
            _title = _title + host
        if (len(_year) > 0) and (not _year == "0000"):
            _title += cFL("  (" + cFL(_year, "deeppink") + ")", "pink")
        if len(_Country) > 0:
            _title += cFL("  [" + cFL(_Country, "deeppink") + "]", "pink")
        contextLabs = {
            "title": _name,
            "year": _year,
            "img": _img,
            "fanart": _fanart,
            "country": _Country,
            "url": _Url,
            "plot": _plot,
            "genres": _Genres,
            "site": _site,
            "subfav": _subfav,
            "section": _section,
            "todoparams": _ToDoParams,
            "commonid": _commonID,
            "commonid2": _commonID2,
        }
        contextMenuItems = ContextMenu_Favorites(contextLabs)
        _addon.add_directory(
            pars,
            {"title": _title, "plot": _plot},
            is_folder=True,
            fanart=fimg,
            img=img,
            total_items=ItemCount,
            contextmenu_items=contextMenuItems,
        )
    if "movie" in section.lower():
        content = "movies"
    else:
        content = "tvshows"
    set_view(content, view_mode=int(addst("tvshows-view")))
    eod()
Exemple #23
0
def INDEX_CHANNELS(name, url):
    channel_source = weblogin.doLogin('', username, password, url_login)
    channel_source = weblogin.openUrl(url)
    match = re.compile('"link":"(.+?)"').findall(channel_source)
    stream = match[0].replace("\/", "/")
    addLink('PLAY: ' + name, stream, '')
def Fav_List(site='', section='', subfav=''):
    favs = fav__COMMON__list_fetcher(site=site, section='diffanime', subfav=subfav)
    favs2 = fav__COMMON__list_fetcher(site=site, section='animecentrum', subfav=subfav)
    favs3 = fav__COMMON__list_fetcher(site=site, section='animeon', subfav=subfav)
    favs4 = fav__COMMON__list_fetcher(site=site, section='animeonline', subfav=subfav)
    favs5 = fav__COMMON__list_fetcher(site=site, section='animedrama', subfav=subfav)
    favs6 = fav__COMMON__list_fetcher(site=site, section='shnidenodc', subfav=subfav)
    ItemCount = len(favs) and len(favs2) and len(favs3) and len(favs4) and len(favs5) and len(favs6)
    if len(favs) == 0 and len(favs2) == 0 and len(favs3) == 0 and len(favs4) == 0 and len(favs5) == 0and len(favs6) == 0:
        myNote('Favorites', 'None Found')
        eod()
        return
    if len(favs) == 0:
            favs = []
    if len(favs) > 0:
            logged_inDiff = weblogin.doLogin(addonPath, login, password)
    if len(favs2) == 0:
            favs2 = []
    if len(favs3) == 0:
            favs3 = []
    if len(favs4) == 0:
            favs4 = []
    if len(favs5) == 0:
            favs5 = []
    if len(favs6) == 0:
            favs6 = []
    favs += favs2
    favs += favs3
    favs += favs4
    favs += favs5
    favs += favs6
    for (_name, _year, _img, _fanart, _Country, _Url, _plot, _Genres, _site, _subfav, _section, _ToDoParams, _commonID, _commonID2) in favs:
        if _img > 0:
            img = _img
        else:
            img = iconSite
        if _fanart > 0:
            fimg = _fanart
        else:
            fimg = fanartSite
        pars = _addon.parse_query(_ToDoParams)
        _section
        _title = _name
        if _section == 'diffanime':
            host = cFL(' (D-A)', 'blueviolet')
            _title = _title + host
        if _section == 'animecentrum':
            host = cFL(' (A-C)', 'blue')
            _title = _title + host
        if _section == 'animeon':
            host = cFL(' (A-ON)', 'lime')
            _title = _title + host
        if _section == 'animeonline':
            host = cFL(' (A-O)', 'orange')
            _title = _title + host
        if _section == 'animedrama':
            host = cFL(' (A-D)', 'red')
            _title = _title + host
        if _section == 'shnidenodc':
            host = cFL(' (A-S)', 'yellow')
            _title = _title + host
        if (len(_year) > 0) and (not _year == '0000'):
            _title += cFL('  (' + cFL(_year, 'deeppink') + ')', 'pink')
        if len(_Country) > 0:
            _title += cFL('  [' + cFL(_Country, 'deeppink') + ']', 'pink')
        contextLabs = {'title': _name, 'year': _year, 'img': _img, 'fanart': _fanart, 'country': _Country, 'url': _Url, 'plot': _plot, 'genres': _Genres, 'site': _site, 'subfav': _subfav, 'section': _section, 'todoparams': _ToDoParams, 'commonid': _commonID, 'commonid2': _commonID2}
        contextMenuItems = ContextMenu_Favorites(contextLabs)
        _addon.add_directory(pars, {'title': _title, 'plot': _plot}, is_folder=True, fanart=fimg, img=img, total_items=ItemCount, contextmenu_items=contextMenuItems)
    if 'movie' in section.lower():
        content = 'movies'
    else:
        content = 'tvshows'
    set_view(content, view_mode=int(addst('tvshows-view')))
    eod()