1 # -*- coding: utf-8 -*-
3 # Copyright © 2018-2019 Nick Bowler
5 # License GPLv3+: GNU General Public License version 3 or any later version.
6 # This is free software: you are free to change and redistribute it.
7 # There is NO WARRANTY, to the extent permitted by law.
9 PLUGIN_NAME = u"No remote plugins"
10 PLUGIN_AUTHOR = u"Nick Bowler"
11 PLUGIN_DESCRIPTION = u'''<p>This plugin disables querying the MusicBrainz
12 server for plugins. This avoids network activity at startup and prevents
13 the options dialog from suggesting non-free plugins for installation.</p>
15 PLUGIN_VERSION = "1.1"
16 PLUGIN_API_VERSIONS = ["1.0", "2.0"]
17 PLUGIN_LICENSE = "GPL-3.0-or-later"
19 from picard import (config, log, plugin)
22 from PyQt5 import QtCore
23 except (RuntimeError, ImportError):
24 from PyQt4 import QtCore
29 return modulename.__module__[len("picard.plugins."):]
31 def repl_query(self, callback=None):
34 tagger = QtCore.QObject.tagger
36 tagger.pluginmanager.query_available_plugins = \
37 types.MethodType(repl_query, plugin.PluginManager)
38 log.info("%s activated" % (modulename()))
40 if modulename() in config.setting["enabled_plugins"]:
43 log.debug("%s disabled in configuration" % (modulename()))