def root(self): popup = control.setting('popup.date') print ("POPUP DATE", popup) validAccount = debrid.realdebrid().accountInfo() if not validAccount: from resources.lib.modules import deviceAuthDialog authDialog = deviceAuthDialog.DonationDialog('firstrun_RD.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) or popup == None): 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('Cloud Browser', 'rdNavigator', 'cloud.png', 'DefaultAddonProgram.png') #self.addDirectoryItem('Lists', 'browse_nav', 'cloud.png', 'DefaultAddonProgram.png') #self.addDirectoryItem('Download Manager', 'download_manager', 'cloud.png', 'DefaultAddonProgram.png') #self.addDirectoryItem('RSS Manager', 'rss_manager_nav', 'cloud.png', 'DefaultAddonProgram.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()
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)
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()
if action == None: # from resources.lib.modules import changelog # changelog.get() from resources.lib.indexers import navigator navigator.navigator().root() elif action == 'donations': import xbmcaddon from resources.lib.modules import deviceAuthDialog authDialog = deviceAuthDialog.DonationDialog('donations.xml', xbmcaddon.Addon().getAddonInfo('path'), code='', url='') authDialog.doModal() del authDialog elif action == 'browse_nav': from resources.lib.indexers import navigator navigator.navigator().browse_nav() elif action == 'play': from resources.lib.sources import sources sources().play(title, year, imdb, tvdb, season, episode, tvshowtitle, premiered, meta, clearlogo) elif action == 'directPlay': from resources.lib.sources import sources sources().directPlay(url, title, year, imdb, tvdb, season, episode, tvshowtitle, premiered, meta, id, name, clearlogo)