Ejemplo n.º 1
0
    def youtube(self, url, action):
        try:
            key = trailer.trailer().key_link.split('=', 1)[-1]

            if 'PlaylistTuner' in action:
                self.list = cache.get(
                    youtube.youtube(key=key).playlist, 1, url)
            elif 'Playlist' in action:
                self.list = cache.get(
                    youtube.youtube(key=key).playlist, 1, url, True)
            elif 'ChannelTuner' in action:
                self.list = cache.get(youtube.youtube(key=key).videos, 1, url)
            elif 'Channel' in action:
                self.list = cache.get(
                    youtube.youtube(key=key).videos, 1, url, True)

            if 'Tuner' in action:
                for i in self.list:
                    i.update({
                        'name': i['title'],
                        'poster': i['image'],
                        'action': 'plugin',
                        'folder': False
                    })
                if 'Tuner2' in action:
                    self.list = sorted(self.list,
                                       key=lambda x: random.random())
                self.addDirectory(self.list, queue=True)
            else:
                for i in self.list:
                    i.update({
                        'name': i['title'],
                        'poster': i['image'],
                        'nextaction': action,
                        'action': 'play',
                        'folder': False
                    })
                self.addDirectory(self.list)

            return self.list
        except:
            pass
Ejemplo n.º 2
0
    def youtube(self, url, action):
        try:
            key = trailer.trailer().key_link.split('=', 1)[-1]

            if 'PlaylistTuner' in action:
                self.list = cache.get(youtube.youtube(key=key).playlist, 1, url)
            elif 'Playlist' in action:
                self.list = cache.get(youtube.youtube(key=key).playlist, 1, url, True)
            elif 'ChannelTuner' in action:
                self.list = cache.get(youtube.youtube(key=key).videos, 1, url)
            elif 'Channel' in action:
                self.list = cache.get(youtube.youtube(key=key).videos, 1, url, True)

            if 'Tuner' in action:
                for i in self.list: i.update({'name': i['title'], 'poster': i['image'], 'action': 'plugin', 'folder': False})
                if 'Tuner2' in action: self.list = sorted(self.list, key=lambda x: random.random())
                self.addDirectory(self.list, queue=True)
            else:
                for i in self.list: i.update({'name': i['title'], 'poster': i['image'], 'nextaction': action, 'action': 'play', 'folder': False})
                self.addDirectory(self.list)

            return self.list
        except:
            pass
Ejemplo n.º 3
0
elif action == 'moviePlaycount':
    from resources.lib.modules import playcount
    playcount.movies(imdb, query)

elif action == 'episodePlaycount':
    from resources.lib.modules import playcount
    playcount.episodes(imdb, tvdb, season, episode, query)

elif action == 'tvPlaycount':
    from resources.lib.modules import playcount
    playcount.tvshows(name, imdb, tvdb, season, query)

elif action == 'trailer':
    from resources.lib.modules import trailer
    trailer.trailer().play(name, url)

elif action == 'traktManager':
    from resources.lib.modules import trakt
    trakt.manager(name, imdb, tvdb, content)

elif action == 'authTrakt':
    from resources.lib.modules import trakt
    trakt.authTrakt()

elif action == 'rdAuthorize':
    from resources.lib.modules import debrid
    debrid.rdAuthorize()

elif action == 'download':
    import json
Ejemplo n.º 4
0
elif action == 'moviePlaycount':
    from resources.lib.modules import playcount
    playcount.movies(imdb, query)

elif action == 'episodePlaycount':
    from resources.lib.modules import playcount
    playcount.episodes(imdb, tvdb, season, episode, query)

elif action == 'tvPlaycount':
    from resources.lib.modules import playcount
    playcount.tvshows(name, imdb, tvdb, season, query)

elif action == 'trailer':
    from resources.lib.modules import trailer
    trailer.trailer().play(name, url, windowedtrailer)

elif action == 'traktManager':
    from resources.lib.modules import trakt
    trakt.manager(name, imdb, tvdb, content)

elif action == 'authTrakt':
    from resources.lib.modules import trakt
    trakt.authTrakt()

elif action == 'urlResolver':
    try:
        import resolveurl
    except:
        pass
    resolveurl.display_settings()
Ejemplo n.º 5
0
elif action == 'addDownload':
	from resources.lib.modules import downloader
	downloader.addDownload(name,url,image)

elif action == 'removeDownload':
	from resources.lib.modules import downloader
	downloader.removeDownload(url)

elif action == 'startDownload':
	from resources.lib.modules import downloader
	downloader.startDownload()

elif action == 'startDownloadThread':
	from resources.lib.modules import downloader
	downloader.startDownloadThread()

elif action == 'stopDownload':
	from resources.lib.modules import downloader
	downloader.stopDownload()

elif action == 'statusDownload':
	from resources.lib.modules import downloader
	downloader.statusDownload()

elif action == 'trailer':
	from resources.lib.modules import trailer
	trailer.trailer().play(name)

elif action == 'clearCache':
	from resources.lib.modules import cache
	cache.clear()
Ejemplo n.º 6
0
elif action == 'moviePlaycount':
    from resources.lib.modules import playcount
    playcount.movies(imdb, query)

elif action == 'episodePlaycount':
    from resources.lib.modules import playcount
    playcount.episodes(imdb, tvdb, season, episode, query)

elif action == 'tvPlaycount':
    from resources.lib.modules import playcount
    playcount.tvshows(name, imdb, tvdb, season, query)

elif action == 'trailer':
    from resources.lib.modules import trailer
    trailer.trailer().play(name, url)

elif action == 'clearCache':
    from resources.lib.modules import cache
    cache.clear()

elif action == 'addView':
    from resources.lib.modules import views
    views.addView(content)

elif action == 'traktManager':
    from resources.lib.modules import trakt
    trakt.manager(name, imdb, tvdb, content)

elif action == 'authTrakt':
    from resources.lib.modules import trakt
Ejemplo n.º 7
0
elif action == 'startDownloadThread':
    from resources.lib.modules import downloader
    downloader.startDownloadThread()

elif action == 'stopDownload':
    from resources.lib.modules import downloader
    downloader.stopDownload()

elif action == 'statusDownload':
    from resources.lib.modules import downloader
    downloader.statusDownload()

elif action == 'trailer':
    from resources.lib.modules import trailer
    trailer.trailer().play(name)

elif action == 'clearCache':
    from resources.lib.modules import cache
    cache.clear()

elif action == 'radioDirectory':
    from resources.lib.indexers import phradios
    phradios.radioDirectory()

elif action == 'radioResolve':
    from resources.lib.indexers import phradios
    phradios.radioResolve(name, url, image)

elif action == 'radio1fm':
    from resources.lib.indexers import phradios
Ejemplo n.º 8
0
elif action == 'startDownloadThread':
    from resources.lib.modules import downloader_bennu
    downloader_bennu.startDownloadThread()

elif action == 'stopDownload':
    from resources.lib.modules import downloader_bennu
    downloader_bennu.stopDownload()

elif action == 'statusDownload':
    from resources.lib.modules import downloader_bennu
    downloader_bennu.statusDownload()

elif action == 'trailer':
    from resources.lib.modules import trailer
    trailer.trailer().play(name, windowedtrailer=windowedtrailer)

elif action == 'clearCache':
    from resources.lib.indexers import navigator
    navigator.navigator().clearCache()

elif action == 'clearCacheMeta':
    from resources.lib.indexers import navigator
    navigator.navigator().clearCacheMeta()

elif action == 'clearCacheProviders':
    from resources.lib.indexers import navigator
    navigator.navigator().clearCacheProviders()

elif action == 'clearCacheAll':
    from resources.lib.indexers import navigator
Ejemplo n.º 9
0
                with zipfile.ZipFile(zipdir, "r") as z:
                        z.extractall(datapath)
                        dialog.ok('Restore Watchlist', 'Restore complete', '', '')
        else:
                dialog.ok('Restore Watchlist', 'No item found: Please select your zipfile location in the addon settings', '', '')
                xbmc.executebuiltin('RunPlugin(%s?action=openSettings&query=7.1)' % sys.argv[0])
elif action == 'searchNavigator'       : navigator.navigator().search()
elif action == 'seasons'               : episodes.seasons().get(tvshowtitle, year, imdb, tvdb)
elif action == 'ShowChangelog'         : changelog.get()
elif action == 'showsProgress'         : episodes.episodes().in_progress()
elif action == 'similar_movies'        : movies.movies().similar_movies(imdb)
elif action == 'similar_shows'         : tvshows.tvshows().similar_shows(imdb)
elif action == 'soullessliteNavigator' : navigator.navigator().soulless(lite=True)
elif action == 'soullessNavigator'     : navigator.navigator().soulless()
elif action == 'toolNavigator'         : navigator.navigator().tools()
elif action == 'trailer'               : trailer.trailer().play(name, url)
elif action == 'traktManager':
    from resources.lib.modules import trakt
    trakt.manager(name, imdb, tvdb, content)
elif action == 'authTrakt':
    from resources.lib.modules import trakt
    trakt.authTrakt()
elif action == 'tvCertificates'        : tvshows.tvshows().certifications()
elif action == 'tvFavourites'          : tvshows.tvshows().favourites()
elif action == 'tvGenres'              : tvshows.tvshows().genres()
elif action == 'tvlist'                : navigator.navigator().mytv()
elif action == 'tvliteNavigator'       : navigator.navigator().tvshows(lite=True)
elif action == 'tvNavigator'           : navigator.navigator().tvshows()
elif action == 'tvNetworks'            : tvshows.tvshows().networks()
elif action == 'tvPerson'              : tvshows.tvshows().person()
elif action == 'tvPersons'             : tvshows.tvshows().persons(url)
Ejemplo n.º 10
0
elif action == 'moviePlaycount':
    from resources.lib.modules import playcount
    playcount.movies(imdb, query)

elif action == 'episodePlaycount':
    from resources.lib.modules import playcount
    playcount.episodes(imdb, tvdb, season, episode, query)

elif action == 'tvPlaycount':
    from resources.lib.modules import playcount
    playcount.tvshows(name, imdb, tvdb, season, query)

elif action == 'trailer':
    from resources.lib.modules import trailer
    trailer.trailer().play(name, url, windowedtrailer)

elif action == 'traktManager':
    from resources.lib.modules import trakt
    trakt.manager(name, imdb, tvdb, content)

elif action == 'authTrakt':
    from resources.lib.modules import trakt
    trakt.authTrakt()

elif action == 'smuSettings':
    try: import resolveurl
    except: pass
    resolveurl.display_settings()

elif action == 'download':
Ejemplo n.º 11
0
elif action == 'browser':
    from resources.lib.indexers import bob; bob.Resolver().browser(url)
elif action == 'search':
    from resources.lib.indexers import bob; bob.Indexer().search()
elif action == 'add_search':
    from resources.lib.indexers import bob; bob.Indexer().add_search(url)
elif action == 'delete_search':
    from resources.lib.indexers import bob; bob.Indexer().delete_search()
elif action == 'openSettings':
    from resources.lib.modules import control; control.openSettings()
elif action == 'addView':
    from resources.lib.modules import views; views.addView(content)
elif action == 'clearCache':
    from resources.lib.modules import cache; cache.clear()
elif action == 'trailer':
    from resources.lib.modules import trailer; trailer.trailer().play(name)
elif action == 'ScraperSettings':
    from resources.lib.modules import control
    control.openSettings(id='script.module.nanscrapers')
elif action == 'ResolverSettings':
    from resources.lib.modules import control
    control.openSettings(id='script.mrknow.urlresolver')
elif action == 'queueItem':
    from resources.lib.modules import control
    from resources.lib.indexers.bob import Resolver, Indexer, replace_url

    item_urls = []
    selected_link = None
    play_now = False
    already_played = False
    if not url.endswith(".xml"):
Ejemplo n.º 12
0
    downloader.addDownload(O00ooOO, o0oO0, Ooo)
    if 91 - 91: oO0ooO % OoO0O00
elif IIiIiII11i == 'removeDownload':
    from resources.lib.modules import downloader
    downloader.removeDownload(o0oO0)
    if 64 - 64: ii1II11I1ii1I % iiIIIII1i1iI - ooO00oOoo - oO0ooO
elif IIiIiII11i == 'startDownload':
    from resources.lib.modules import downloader
    downloader.startDownload()
    if 31 - 31: ii1II11I1ii1I - II111iiii.ii1II11I1ii1I
elif IIiIiII11i == 'startDownloadThread':
    from resources.lib.modules import downloader
    downloader.startDownloadThread()
    if 18 - 18: OOooOOo
elif IIiIiII11i == 'stopDownload':
    from resources.lib.modules import downloader
    downloader.stopDownload()
    if 98 - 98: iiIIIII1i1iI * iiIIIII1i1iI / iiIIIII1i1iI + ii1II11I1ii1I
elif IIiIiII11i == 'statusDownload':
    from resources.lib.modules import downloader
    downloader.statusDownload()
    if 34 - 34: O0OOo
elif IIiIiII11i == 'trailer':
    from resources.lib.modules import trailer
    trailer.trailer().play(O00ooOO)
    if 15 - 15:
        ii1II11I1ii1I * O0OOo * OoO0O00 % i11iIiiIii % I1ii11iIi11i - iI1Ii11111iIi
elif IIiIiII11i == 'clearCache':
    from resources.lib.modules import cache
    cache.clear()