예제 #1
0
    def premiumizeNav(self):
        from resources.lib.api import premiumize
        try:
            accountStatus = premiumize.info()
            self.addDirectoryItem(accountStatus, '0', 'search.png',
                                  'DefaultMovies.png')
        except:
            pass

        from resources.lib.api import premiumize
        validAccount = premiumize.validAccount()
        if not validAccount:
            authDialog = deviceAuthDialog.DeviceAuthDialog(
                'script-DeviceAuthDialog.xml',
                __addon__.getAddonInfo('path'),
                code='',
                url='http://premiumize.me')
            authDialog.doModal()
            del authDialog
            sys.exit()

        else:
            self.addDirectoryItem(50002, 'premiumizerootFolder', 'cloud.png',
                                  'DefaultMovies.png')
            self.addDirectoryItem(50003, 'premiumizeTransfers', 'cloud.png',
                                  'DefaultMovies.png')
            self.addDirectoryItem(50004, 'premiumizeAdd', 'cloud.png',
                                  'DefaultMovies.png')
            self.addDirectoryItem('Library',
                                  'libraryNavigator',
                                  'cloud.png',
                                  'DefaultMovies.png',
                                  isFolder=True)

        self.endDirectory()
예제 #2
0
    def root(self):
        from resources.lib.api import premiumize
        validAccount = premiumize.validAccount()
        if not validAccount:
            authDialog = deviceAuthDialog.DeviceAuthDialog(
                'script-DeviceAuthDialog.xml',
                __addon__.getAddonInfo('path'),
                code='',
                url='http://premiumize.me')
            authDialog.doModal()
            del authDialog
            sys.exit()

        #self.addDirectoryItem('TEST', 'testItem', 'movies.png', 'DefaultMovies.png')
        self.addDirectoryItem(50001, 'premiumizeNavigator', 'cloud.png',
                              'DefaultTVShows.png')
        self.addDirectoryItem('Lists', 'browse_nav', 'cloud.png',
                              'DefaultTVShows.png')

        downloads = True if control.setting('downloads') == 'true' else False
        if downloads == True:
            self.addDirectoryItem('Download Manager', 'download_manager',
                                  'cloud.png', 'DefaultTVShows.png')
        self.addDirectoryItem(32008, 'toolNavigator', 'settings.png',
                              'DefaultAddonProgram.png')
        self.endDirectory()
예제 #3
0
def checkinfo():

    validAccount = premiumize.validAccount()

    firstSetup = control.setting('first.setup')
    popup = control.setting('popup.date')

    if not validAccount:
        from resources.lib.modules import deviceAuthDialog
        authDialog = deviceAuthDialog.DonationDialog(
            'firstrun.xml',
            xbmcaddon.Addon().getAddonInfo('path'),
            code='',
            url='')
        authDialog.doModal()
        del authDialog
        control.openSettings('0.0')

    elif (popup == '0' or ((int(timeNow) - int(popup)) > 30)):
        from resources.lib.modules import deviceAuthDialog
        authDialog = deviceAuthDialog.DonationDialog(
            'donations.xml',
            xbmcaddon.Addon().getAddonInfo('path'),
            code='',
            url='')
        authDialog.doModal()
        del authDialog
        control.setSetting(id='popup.date', value=timeNow)
예제 #4
0
    def root(self):
        from resources.lib.api import premiumize
        validAccount = premiumize.validAccount()
        if not validAccount:
            from resources.lib.modules import deviceAuthDialog
            authDialog = deviceAuthDialog.DonationDialog(
                'firstrun.xml',
                xbmcaddon.Addon().getAddonInfo('path'),
                code='',
                url='')
            authDialog.doModal()
            del authDialog
            control.openSettings('0.0')
            sys.exit()
        elif (popup == '0' or ((int(timeNow) - int(popup)) > 30)):
            from resources.lib.modules import deviceAuthDialog
            authDialog = deviceAuthDialog.DonationDialog(
                'donations.xml',
                xbmcaddon.Addon().getAddonInfo('path'),
                code='',
                url='')
            authDialog.doModal()
            del authDialog
            control.setSetting(id='popup.date', value=timeNow)
        #self.addDirectoryItem('TEST', 'testItem', 'movies.png', 'DefaultMovies.png')
        self.addDirectoryItem('Search Cloud', 'premiumizeSearch', 'cloud.png',
                              'DefaultMovies.png')
        self.addDirectoryItem('Meta Cloud', 'meta_cloud', 'cloud.png',
                              'DefaultTVShows.png')
        #        self.addDirectoryItem('Meta Library', 'libraryNavigator',
        #                              'cloud.png', 'DefaultMovies.png', isFolder=True)
        self.addDirectoryItem(50001, 'premiumizeNavigator', 'cloud.png',
                              'DefaultTVShows.png')
        self.addDirectoryItem('Lists', 'browse_nav', 'cloud.png',
                              'DefaultTVShows.png')

        downloads = True if control.setting('downloads') == 'true' else False
        if downloads == True:
            self.addDirectoryItem('Download Manager', 'download_manager',
                                  'cloud.png', 'DefaultTVShows.png')
        self.addDirectoryItem(32008, 'toolNavigator', 'settings.png',
                              'DefaultAddonProgram.png')
        self.addDirectoryItem('[I]Support and Donations[/I]',
                              'donations',
                              'support.png',
                              'DefaultAddonProgram.png',
                              isFolder=False)
        self.endDirectory()