Esempio n. 1
0
def showCredit():

    if __debug:
        xbmc.log('- credit -')

    # user data
    login = xbmcplugin.getSetting(_handle, 'email')
    password = xbmcplugin.getSetting(_handle, 'pass')

    data = website.login(login, password, __cookiePath)

    # to do checks
    if (data.state == 'Premium'):
        xbmcgui.Dialog().ok(
            'otrstream',
            __addon.getLocalizedString(30040) + ' ' +
            xbmcplugin.getSetting(_handle, 'email'),
            __addon.getLocalizedString(30041) + ' ' + data.state + ' - ' +
            data.decode,
            __addon.getLocalizedString(30042) + ' ' + data.value)
    else:
        xbmcgui.Dialog().ok(
            'otrstream',
            __addon.getLocalizedString(30040) + ' ' +
            xbmcplugin.getSetting(_handle, 'email'),
            __addon.getLocalizedString(30041) + ' ' + data.state + ' - ' +
            data.decode,
            __addon.getLocalizedString(30042) + ' ' + data.value)
Esempio n. 2
0
def mainSelector():

    if __debug:
        xbmc.log('- main selector -')

    xbmcplugin.setContent(_handle, 'files')

    addPictureItem(__addon.getLocalizedString(30030), _url + '?actual=1',
                   'DefaultFolder.png')  # highlights

    # check for premium
    login = xbmcplugin.getSetting(_handle, 'email')
    password = xbmcplugin.getSetting(_handle, 'pass')

    data = website.login(login, password, __cookiePath)
    xbmc.log('OTR ' + data.state, xbmc.LOGNOTICE)

    if (data.state == 'Premium'):

        #start URL
        link = 'https://www.onlinetvrecorder.com/v2/watchlist/choose.php?genre=Comedy'
        link = urllib.quote_plus(link)
        addPictureItem(__addon.getLocalizedString(30045),
                       _url + '?online=nav&url=' + link,
                       'DefaultFolder.png')  # online

    addPictureItem(__addon.getLocalizedString(30034), _url + '?records=all',
                   'DefaultFolder.png')  # meine aufnahmen
    addPictureItem(__addon.getLocalizedString(30039), _url + '?decode=all',
                   'DefaultFolder.png')  # meine dekodings
    addPictureItem(__addon.getLocalizedString(30035), _url + '?toplist=all',
                   'DefaultFolder.png')  # top listen

    addPictureItem(__addon.getLocalizedString(30032), _url + '?genres=all',
                   'DefaultFolder.png')  # genres

    addPictureItem(__addon.getLocalizedString(30031), _url + '?search=now',
                   'DefaultFolder.png')  # suche
    addPictureItem(__addon.getLocalizedString(30037), _url + '?station=now',
                   'DefaultFolder.png')  # suche station

    str1 = __addon.getSetting('search1').decode("utf-8")
    str2 = __addon.getSetting('search2').decode("utf-8")
    str3 = __addon.getSetting('search3').decode("utf-8")

    if (str1 <> ''):
        addPictureItem(
            __addon.getLocalizedString(30031) + ' : ' + str1,
            _url + '?search=' + str1 + '&page=1', 'DefaultFolder.png')
    if (str2 <> ''):
        addPictureItem(
            __addon.getLocalizedString(30031) + ' : ' + str2,
            _url + '?search=' + str2 + '&page=1', 'DefaultFolder.png')
    if (str3 <> ''):
        addPictureItem(
            __addon.getLocalizedString(30031) + ' : ' + str3,
            _url + '?search=' + str3 + '&page=1', 'DefaultFolder.png')

    addPictureItem(__addon.getLocalizedString(30033), _url + '?credit=now',
                   'DefaultFolder.png')  # benutzer info
    addPictureItem('EPG', _url + '?epg=today', 'DefaultFolder.png')  #epg

    if (__view):
        xbmc.executebuiltin('Container.SetViewMode(%d)' % ThumbnailView)
    xbmcplugin.endOfDirectory(_handle)
Esempio n. 3
0
    PARAMS = urlparse.parse_qs(sys.argv[2][1:])

try:

    # check login
    check = website.checkCookie(__cookiePath)

    if (not check):
        xbmcgui.Dialog().notification(__addonname,
                                      __addon.getLocalizedString(30100),
                                      time=3000)

        user = xbmcplugin.getSetting(_handle, 'email')
        pw = xbmcplugin.getSetting(_handle, 'pass')
        login = website.login(user, pw, __cookiePath)
        if (login.state == 'not loged in'):
            xbmcgui.Dialog().notification(__addonname,
                                          __addon.getLocalizedString(30101),
                                          time=5000)

    if PARAMS.has_key('categories'):
        showCategory(PARAMS['categories'][0], PARAMS['title'][0])
    elif PARAMS.has_key('movie'):
        showMovie(PARAMS['cs'][0], PARAMS['rid'][0], PARAMS['epg_id'][0])
    elif PARAMS.has_key('online'):
        showOnline(PARAMS['online'][0], PARAMS['url'][0])
    elif PARAMS.has_key('screenshot'):
        showScreenshot(PARAMS['screenshot'][0])
    elif PARAMS.has_key('preview'):
        showPreview(PARAMS['preview'][0], PARAMS['title'][0])