当前位置: 首页>>代码示例>>Python>>正文


Python favouritesManager.FavouritesManager类代码示例

本文整理汇总了Python中favouritesManager.FavouritesManager的典型用法代码示例。如果您正苦于以下问题:Python FavouritesManager类的具体用法?Python FavouritesManager怎么用?Python FavouritesManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了FavouritesManager类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

    def __init__(self):
        #BASE_RESOURCE_PATH = os.path.join( os.getcwd(), "resources" )
        BASE_RESOURCE_PATH = os.path.join( ptv.getAddonInfo('path'), "resources" )
        BASE_RESOURCE_PATH = os.path.join( ptv2.getAddonInfo('path'), "resources" )

        sys.path.append( os.path.join( BASE_RESOURCE_PATH, "lib" ) )
        sys.path.append( os.path.join( BASE_RESOURCE_PATH, "resources" ) )

        sys.path.append( os.path.join( ptv.getAddonInfo('path'), "host" ) )
        import mrknow_pLog, settings, Parser, mrknow_pCommon

        self.cm = mrknow_pCommon.common()
        self.log = mrknow_pLog.pLog()
        self.settings = settings.TVSettings()
        self.parser = Parser.Parser()
        #self.log.info("DIR " + common.Paths.modulesDir + 'mainMenu.cfg')
        #self.MAIN_MENU_FILE = os.path.join( common.Paths.modulesDir, 'mainMenu.cfg' )
        self.MAIN_MENU_FILE = 'mainMenu.cfg'
        if not os.path.exists(common.Paths.pluginDataDir):
            os.makedirs(common.Paths.pluginDataDir, 0777)

        self.favouritesManager = FavouritesManager(common.Paths.favouritesFolder)
        self.customModulesManager = CustomModulesManager(common.Paths.customModulesDir, common.Paths.customModulesRepo)

        if not os.path.exists(common.Paths.customModulesDir):
            os.makedirs(common.Paths.customModulesDir, 0777)

        self.parser2 = Parser2()
        self.currentlist = None

        self.addon = None
        self.log.info('Filmy online www.mrknow.pl')
        common.clearCache()
开发者ID:neopack1,项目名称:filmkodi,代码行数:33,代码来源:default.py

示例2: __init__

    def __init__(self):
        
        if not os.path.exists(common.Paths.pluginDataDir):
            os.makedirs(common.Paths.pluginDataDir, 0777)

        self.favouritesManager = FavouritesManager(common.Paths.favouritesFolder)
        self.parser = Parser()
        self.currentlist = None
        self.addon = None
        
        common.log('SportsDevilNL initialized')
开发者ID:EPiC-APOC,项目名称:repository.xvbmc,代码行数:11,代码来源:main.py

示例3: __init__

    def __init__(self):
        
        if not os.path.exists(common.Paths.pluginDataDir):
            os.makedirs(common.Paths.pluginDataDir, 0777)

        self.favouritesManager = FavouritesManager(common.Paths.favouritesFolder)
        self.parser = Parser()
        self.currentlist = None
        self.addon = None
        
        common.log('SportsDevil initialized')
        common.log('Running on Python %s'%(str(sys.version)))
开发者ID:vphuc81,项目名称:MyRepository,代码行数:12,代码来源:main.py

示例4: __init__

    def __init__(self):

        if not os.path.exists(common.Paths.pluginDataDir):
            os.makedirs(common.Paths.pluginDataDir, 0777)

        self.favouritesManager = FavouritesManager(common.Paths.favouritesFolder)
        self.customModulesManager = CustomModulesManager(common.Paths.customModulesDir, common.Paths.customModulesRepo)

        if not os.path.exists(common.Paths.customModulesDir):
            os.makedirs(common.Paths.customModulesDir, 0777)

        self.parser = Parser()
        self.currentlist = None

        self.addon = None

        common.log('ViendoKodiStreaming initialized')
开发者ID:HarryElSuzio,项目名称:plugin.video.ViendoKodiStreaming-1,代码行数:17,代码来源:main.py

示例5: __init__

    def __init__(self):
        self.base = sys.argv[0]
        self.handle = int(sys.argv[1])
        paramstring = urllib.unquote_plus(sys.argv[2])
        
        if not os.path.exists(common.Paths.pluginDataDir):
            os.makedirs(common.Paths.pluginDataDir, 0777)

        self.favouritesManager = FavouritesManager(common.Paths.favouritesFolder)
        self.customModulesManager = CustomModulesManager(common.Paths.customModulesDir, common.Paths.customModulesRepo)
        self.syncManager = SyncManager()
        self.syncManager.addSource("Max Mustermann", SyncSourceType.CATCHERS, common.Paths.catchersRepo)
        
        if not os.path.exists(common.Paths.customModulesDir):
            os.makedirs(common.Paths.customModulesDir, 0777)

        self.parser = Parser()
        self.currentlist = None
        common.log('SportsDevil initialized')
        
        self.run(paramstring)
开发者ID:gtfamily,项目名称:gtfamily,代码行数:21,代码来源:main.py

示例6: __init__

    def __init__(self):
        common.log('Initializing SportsDevil')

        if not os.path.exists(common.Paths.pluginDataDir):
            os.makedirs(common.Paths.pluginDataDir)

        self.curr_file = ''
        self.urlList = []
        self.extensionList = []
        self.selectionList = []
        self.currentlist = None
        self.favouritesManager = FavouritesManager(common.Paths.favouritesFolder)

        self.parser = Parser()

        self.handle = int(sys.argv[1])

        common.log('SportsDevil initialized')

        paramstring = sys.argv[2]
        self.run(paramstring)
开发者ID:rollysalvana,项目名称:pampereo-xbmc-plugins,代码行数:21,代码来源:main.py

示例7: __init__

    def __init__(self):
        
        if not os.path.exists(common.Paths.pluginDataDir):
            os.makedirs(common.Paths.pluginDataDir, 0777)

        self.favouritesManager = FavouritesManager(common.Paths.favouritesFolder)
        self.customModulesManager = CustomModulesManager(common.Paths.customModulesDir, common.Paths.customModulesRepo)
        
        # todo: cache this (due to limited API calls for github)
        self.syncManager = SyncManager()
        #self.syncManager.addSource("Max Mustermann - Catchers", SyncSourceType.CATCHERS, common.Paths.catchersRepo)
        #self.syncManager.addSource("Max Mustermann - Modules", SyncSourceType.MODULES, common.Paths.modulesRepo)
        
        if not os.path.exists(common.Paths.customModulesDir):
            os.makedirs(common.Paths.customModulesDir, 0777)

        self.parser = Parser()
        self.currentlist = None
        
        self.addon = None
        
        common.log('SportsDevil initialized')
开发者ID:hackur,项目名称:SportsDevil-Fixes,代码行数:22,代码来源:main.py

示例8: __init__

class Main:

    MAIN_MENU_FILE = "mainMenu.cfg"

    def __init__(self):

        if not os.path.exists(common.Paths.pluginDataDir):
            os.makedirs(common.Paths.pluginDataDir, 0777)

        self.favouritesManager = FavouritesManager(common.Paths.favouritesFolder)
        self.customModulesManager = CustomModulesManager(common.Paths.customModulesDir, common.Paths.customModulesRepo)

        if not os.path.exists(common.Paths.customModulesDir):
            os.makedirs(common.Paths.customModulesDir, 0777)

        self.parser = Parser()
        self.currentlist = None

        self.addon = None

        common.log("SportsDevil initialized")

    def getPlayerType(self):
        sPlayerType = common.getSetting("playerType")

        if sPlayerType == "0":
            return xbmc.PLAYER_CORE_AUTO
        elif sPlayerType == "1":
            return xbmc.PLAYER_CORE_MPLAYER
        elif sPlayerType == "2":
            return xbmc.PLAYER_CORE_DVDPLAYER
        # PLAYER_CORE_AMLPLAYER
        elif sPlayerType == "3":
            return 5

        return xbmc.PLAYER_CORE_AUTO

    def playVideo(self, videoItem, isAutoplay=False):
        if not videoItem:
            return

        listitem = self.createXBMCListItem(videoItem)

        title = videoItem["videoTitle"]
        if title:
            listitem.setInfo("video", {"title": title})

        if not isAutoplay:
            xbmcplugin.setResolvedUrl(self.handle, True, listitem)
        else:
            url = urllib.unquote_plus(videoItem["url"])
            # xbmc.Player(self.getPlayerType()).play(url, listitem)
            xbmc.Player().play(url, listitem)

    def launchChrome(self, url, title):
        action = "RunPlugin(%s)" % (
            "plugin://plugin.program.chrome.launcher/?kiosk=yes&mode=showSite&stopPlayback=yes&url=" + url
        )
        common.log("chrome test:" + str(action))
        xbmc.executebuiltin(action)

    def playWebDriver(self, url, title):
        try:
            import liveremote

            video = liveremote.resolve(url)
            liz = xbmcgui.ListItem(title)
            liz.setPath(video)
            liz.setProperty("IsPlayable", "true")
            # xbmc.Player(self.getPlayerType()).play(video, liz)
            xbmc.Player().play(video, liz)
        except:
            import sys, traceback

            traceback.print_exc(file=sys.stdout)
            common.showInfo("This is not the option you are looking for.")

    def downloadVideo(self, url, title):
        common.log("Trying to download video " + str(url))

        # check url
        if url.startswith("plugin"):
            common.log("Video is not downloadable")
            return None

        path = common.getSetting("download_path")
        if not path:
            path = common.browseFolders(common.translate(30017))
            common.setSetting("download_path", path)

        title = getKeyboard(default=fu.cleanFilename(title), heading="SportsDevil")
        if title == None or title == "":
            return None

        downloader = Downloader()
        downloaded_file = downloader.downloadMovie(url, path, fu.cleanFilename(title), ".flv")

        if downloaded_file == None:
            common.log("Download cancelled")
        else:
#.........这里部分代码省略.........
开发者ID:mrknow,项目名称:filmkodi,代码行数:101,代码来源:main.py


注:本文中的favouritesManager.FavouritesManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。