當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。