コード例 #1
0
def getResponse(silent=False):
    if not dixie.validToRun(silent):
        return {'Error' : 'Failed to obtain a valid response from On-Tapp.TV'}

    url      = dixie.GetDixieUrl() + 'update.txt'
    request  = requests.get(url, cookies=dixie.loadCookies(cookiefile), verify=False)
    code     = request.status_code
    response = request.content

    if (code == 200) and ('no-access-redirect' not in response):
        dixie.log ('OTT response status_code %s ' % code)
        return json.loads(u"" + (response))
    
    if (code == 401) or (code == 404) or (code == 503):
        try:
            response = re.compile('<div id="login_error">(.+?)<br />').search(code).groups(1)[0]
            response = response.replace('<strong>',  '')
            response = response.replace('</strong>', '')
            response = response.replace('<a href="https://www.on-tapp.tv/wp-login.php?action=lostpassword">Lost your password?</a>', '')
            response = response.strip()
            dixie.log ('OTT response error code %s ' % code)
        except:
            response = ''
            return {'Error' : response}
                
    if 'no-access-redirect' in response:
        response = 'It appears that your subscription has expired.'
        dixie.log ('OTT error code 301 %s ' % code)
        return {'Error' : response}
コード例 #2
0
def getResponse(silent=False):
    if not dixie.validToRun(silent):
        return {'Error' : 'Failed to obtain a valid response from On-Tapp.TV'}

    url      = dixie.GetDixieUrl() + 'update.txt'
    request  = requests.get(url, cookies=dixie.loadCookies(cookiefile), verify=False)
    code     = request.status_code
    response = request.content

    if (code == 200) and ('no-access-redirect' not in response):
        dixie.log ('OTT response status_code %s ' % code)
        return json.loads(u"" + (response))
    
    if (code == 401) or (code == 404) or (code == 503):
        try:
            response = re.compile('<div id="login_error">(.+?)<br />').search(code).groups(1)[0]
            response = response.replace('<strong>',  '')
            response = response.replace('</strong>', '')
            response = response.replace('<a href="https://www.on-tapp.tv/wp-login.php?action=lostpassword">Lost your password?</a>', '')
            response = response.strip()
            dixie.log ('OTT response error code %s ' % code)
        except:
            response = ''
            return {'Error' : response}
                
    if 'no-access-redirect' in response:
        response = 'It appears that your subscription has expired.'
        dixie.log ('OTT error code 301 %s ' % code)
        return {'Error' : response}
コード例 #3
0
def main(doLogin=True):
    dixie.CheckUsername()
    import message
    message.check()
    CheckChanXML()
    CheckSkin()
    CheckLogos()
    dixie.ShowBusy()

    import buggalo
    import gui

    buggalo.GMAIL_RECIPIENT = '*****@*****.**'


    try:
        if not dixie.validToRun():
            dixie.notify('Failed to obtain a response from On-Tapp.TV')
            return
            
        CheckVersion()
        CheckSkinVersion()
        CheckLogoVersion()
        CheckIniVersion()
        CheckFilmOn()
        
        CheckForUpdate()
        CheckForChannels()

        dixie.log('****** OnTapp.TV - All OK *******')

        dixie.CloseBusy()

        xbmcgui.Window(10000).setProperty('OTT_RUNNING', 'True')
        xbmc.executebuiltin('XBMC.ActivateWindow(home)')

        w = gui.TVGuide()

        CopyKeymap()
        w.doModal()
        RemoveKeymap()
        del w

        xbmcgui.Window(10000).clearProperty('OTT_RUNNING')

    except Exception:
        buggalo.onExceptionRaised()
コード例 #4
0
def main(doLogin=True):
    import message
    dixie.CheckUsername()
    dixie.ShowBusy()
    CheckChanXML()

    import gui


    try:
        if not dixie.validToRun():
            dixie.CloseBusy()
            dixie.notify('Failed to obtain a response from On-Tapp.TV')
            return
            
        CheckPlugin()
        CheckVersion()
        CheckIniVersion()
        CheckFilmOn()
        CheckForUpdate()
        CheckForChannels()

        dixie.log('****** On-Tapp.EPG - All OK *******')
        
        message.check()
        dixie.CloseBusy()

        xbmcgui.Window(10000).setProperty('OTT_RUNNING', 'True')

        w = gui.TVGuide()

        CopyKeymap()
        w.doModal()
        RemoveKeymap()
        del w

        xbmcgui.Window(10000).clearProperty('OTT_RUNNING')
        xbmcgui.Window(10000).clearProperty('OTT_WINDOW')

    except Exception:
        raise
コード例 #5
0
def main(doLogin=True):
    import message
    dixie.CheckUsername()
    dixie.ShowBusy()
    CheckChanXML()

    import gui

    try:
        if not dixie.validToRun():
            dixie.CloseBusy()
            dixie.notify('Failed to obtain a response from On-Tapp.TV')
            return

        CheckPlugin()
        CheckVersion()
        CheckIniVersion()
        CheckFilmOn()
        CheckForUpdate()
        CheckForChannels()

        dixie.log('****** On-Tapp.EPG - All OK *******')

        message.check()
        dixie.CloseBusy()

        xbmcgui.Window(10000).setProperty('OTT_RUNNING', 'True')

        w = gui.TVGuide()

        CopyKeymap()
        w.doModal()
        RemoveKeymap()
        del w

        xbmcgui.Window(10000).clearProperty('OTT_RUNNING')
        xbmcgui.Window(10000).clearProperty('OTT_WINDOW')

    except Exception:
        raise