Exemplo n.º 1
0
 def setPlayed(self):
     try: # DIALOG DELETE
         if control.setting('cloud.delete.mode') != 'true': raise Exception()
         if self.filetype == 'unknown' and control.setting('cloud.autodelete.unknown') != 'true': raise Exception()
         if self.filetype == 'movie' and control.setting('cloud.autodelete.movies') != 'true': raise Exception()
         if self.filetype == 'episode' and control.setting('cloud.autodelete.tv') != 'true': raise Exception()			
         from resources.lib.api import debrid
         debrid.realdebrid().delete(self.FileId)
     except:
         pass	
     control.refresh()
Exemplo n.º 2
0
    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()
Exemplo n.º 3
0
    def rdNav(self):
        status = debrid.realdebrid().accountInfo()
        
        if status != True: 
            authDialog = deviceAuthDialog.DeviceAuthDialog('script-DeviceAuthDialog.xml', __addon__.getAddonInfo('path'), code='', url='http://real-debrid.com/?id=915002')
            authDialog.doModal()
            del authDialog          
            sys.exit()  
            
        else:
            self.addDirectoryItem(50002, 'rdTorrentList&page=1', 'cloud.png', 'DefaultMovies.png')
            self.addDirectoryItem(50003, 'rdTransfers&page=1', 'cloud.png', 'DefaultMovies.png')

        self.endDirectory()
Exemplo n.º 4
0
    def root(self):
        status = debrid.realdebrid().accountInfo()
		
        if status != True: 
			authDialog = deviceAuthDialog.DeviceAuthDialog('script-DeviceAuthDialog.xml', __addon__.getAddonInfo('path'), code='', url='http://real-debrid.com/?id=915002')
			authDialog.doModal()
			del authDialog			
			sys.exit()	
        self.addDirectoryItem('Meta Cloud', 'meta_cloud', 'cloud.png', 'DefaultAddonProgram.png')		
        #self.addDirectoryItem('TEST', 'testItem', 'movies.png', 'DefaultMovies.png')
        self.addDirectoryItem(50001, '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()
Exemplo n.º 5
0
def update():
    VALID_EXT = debrid.VALID_EXT
    rsslist = rssList()
    rsslist = [i for i in rsslist if i['mode'] != 'read']
    sourceList = []
    if len(rsslist) > 0: control.infoDialog('Checking RSS Lists...')
    for x in rsslist:
        u = x['rss']
        timeNow = datetime.datetime.utcnow()
        timeOffset = int(x['offset'])
        timeOffset = (
            timeNow -
            datetime.timedelta(days=int(timeOffset))).strftime('%Y%m%d')

        html = feedparser.parse(u)
        rssEntries = html.entries
        try:
            rssTitle = html['feed']['title']
        except:
            rssTitle = html['feed']

        for item in rssEntries:
            try:

                title = item.title
                link = item.link
                dateString = item.published_parsed

                checkDB = rssDB(mode='check', link=link, title=title)

                if checkDB == True:
                    print("[REALIZER RSS MANAGER] TORRENT ALREADY ADDED: %s" %
                          title)
                    raise Exception()

                dt = datetime.datetime.fromtimestamp(mktime(dateString))
                pubDate = dt.strftime('%Y%m%d')
                strDate = dt.strftime('%Y-%m-%d')
                if int(pubDate) >= int(timeOffset):
                    r = debrid.realdebrid().addtorrent(link)
                    id = r['id']
                    select = debrid.realdebrid().torrentInfo(id)

                    status = str(select['status'])
                    print("[REALIZER RSS MANAGER] REALDEBRID STATUS", status)
                    if cleantitle.get(
                            status
                    ) != 'waitingfilesselection' and cleantitle.get(
                            status) != 'downloaded':
                        debrid.realdebrid().delete(id, type='torrents')
                        raise Exception()

                    files = select['files']
                    filesIDs = [
                        i['id'] for i in files
                        if i['path'].split('.')[-1].lower() in VALID_EXT
                    ]
                    if len(filesIDs) < 1 or filesIDs == []:
                        debrid.realdebrid().delete(id, type='torrents')
                        raise Exception()
                    r = debrid.realdebrid().selectTorrentList(id, filesIDs)
                    source = {
                        'title': title,
                        'link': link,
                        'id': id,
                        'date': str(strDate)
                    }
                    sourceList.append(source)
            except:
                pass
    control.infoDialog('RSS Lists check completed')
    rssDB(data=sourceList)
Exemplo n.º 6
0
    navigator.navigator().browse_nav()

elif action == 'play':
    from resources.lib.sources import sources
    sources().play(title, year, imdb, tvdb, season, episode, tvshowtitle,
                   premiered, meta)

elif action == 'directPlay':
    from resources.lib.sources import sources
    sources().directPlay(url, title, year, imdb, tvdb, season, episode,
                         tvshowtitle, premiered, meta, id)

elif action == 'authRealdebrid':
    from resources.lib.modules import control
    from resources.lib.api import debrid
    token = debrid.realdebrid().auth()

elif action == 'testItem':
    from resources.lib.api import fanarttv
    imdb = '121361'
    query = 'tv'
    fanarttv.get(imdb, query)
elif action == 'testSources':
    from resources.lib.sources import sources
    sources().advtestmode()

elif action == 'nextaired':
    from resources.lib.api import tvdbapi
    tvdbapi.airingtoday().get()

elif action == 'helpNavigator':