本文整理汇总了Python中picard.plugin.PluginManager.query_available_plugins方法的典型用法代码示例。如果您正苦于以下问题:Python PluginManager.query_available_plugins方法的具体用法?Python PluginManager.query_available_plugins怎么用?Python PluginManager.query_available_plugins使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类picard.plugin.PluginManager
的用法示例。
在下文中一共展示了PluginManager.query_available_plugins方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Tagger
# 需要导入模块: from picard.plugin import PluginManager [as 别名]
# 或者: from picard.plugin.PluginManager import query_available_plugins [as 别名]
#.........这里部分代码省略.........
# for compatibility with pre-1.3 plugins
QtCore.QObject.tagger = self
QtCore.QObject.config = config
QtCore.QObject.log = log
check_io_encoding()
# Must be before config upgrade because upgrade dialogs need to be
# translated
setup_gettext(localedir, config.setting["ui_language"], log.debug)
upgrade_config()
self.xmlws = XmlWebService()
load_user_collections()
# Initialize fingerprinting
self._acoustid = acoustid.AcoustIDClient()
self._acoustid.init()
# Load plugins
self.pluginmanager = PluginManager()
if hasattr(sys, "frozen"):
self.pluginmanager.load_plugindir(os.path.join(os.path.dirname(sys.argv[0]), "plugins"))
else:
mydir = os.path.dirname(os.path.abspath(__file__))
self.pluginmanager.load_plugindir(os.path.join(mydir, "plugins"))
self.pluginmanager.load_plugindir(os.path.join(mydir, os.pardir, "contrib", "plugins"))
if not os.path.exists(USER_PLUGIN_DIR):
os.makedirs(USER_PLUGIN_DIR)
self.pluginmanager.load_plugindir(USER_PLUGIN_DIR)
self.pluginmanager.query_available_plugins()
self.acoustidmanager = AcoustIDManager()
self.browser_integration = BrowserIntegration()
self.files = {}
self.clusters = ClusterList()
self.albums = {}
self.release_groups = {}
self.mbid_redirects = {}
self.unmatched_files = UnmatchedFiles()
self.nats = None
self.window = MainWindow()
self.exit_cleanup = []
self.stopping = False
def register_cleanup(self, func):
self.exit_cleanup.append(func)
def run_cleanup(self):
for f in self.exit_cleanup:
f()
def debug(self, debug):
if self._debug == debug:
return
if debug:
log.log_levels = log.log_levels | log.LOG_DEBUG
log.debug("Debug mode on")
else:
log.debug("Debug mode off")
log.log_levels = log.log_levels & ~log.LOG_DEBUG
self._debug = debug