summaryrefslogtreecommitdiff
path: root/src/input
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2020-07-06 20:58:33 +0200
committerMax Kellermann <max@musicpd.org>2020-07-06 21:08:22 +0200
commit5ece9685c2dc0441bb0bf1aef3b3e5e548a8ee0c (patch)
tree18bf9cf4b5be6ee8b66878abb8202852587c8542 /src/input
parente7c5a42821ebe7767f76aabebf1247fddd3c6376 (diff)
PluginUnavailable: backport class PluginUnconfigured from master
Stop bothering people about the Tidal/Qobuz plugins.
Diffstat (limited to 'src/input')
-rw-r--r--src/input/Init.cxx5
-rw-r--r--src/input/plugins/QobuzInputPlugin.cxx8
-rw-r--r--src/input/plugins/TidalInputPlugin.cxx6
3 files changed, 12 insertions, 7 deletions
diff --git a/src/input/Init.cxx b/src/input/Init.cxx
index 3b714bf5c..e944ff697 100644
--- a/src/input/Init.cxx
+++ b/src/input/Init.cxx
@@ -58,6 +58,11 @@ input_stream_global_init(const ConfigData &config, EventLoop &event_loop)
if (plugin->init != nullptr)
plugin->init(event_loop, *block);
input_plugins_enabled[i] = true;
+ } catch (const PluginUnconfigured &e) {
+ LogFormat(LogLevel::INFO, e,
+ "Input plugin '%s' is not configured",
+ plugin->name);
+ continue;
} catch (const PluginUnavailable &e) {
FormatError(e,
"Input plugin '%s' is unavailable",
diff --git a/src/input/plugins/QobuzInputPlugin.cxx b/src/input/plugins/QobuzInputPlugin.cxx
index 31f60cb24..372a38752 100644
--- a/src/input/plugins/QobuzInputPlugin.cxx
+++ b/src/input/plugins/QobuzInputPlugin.cxx
@@ -133,11 +133,11 @@ InitQobuzInput(EventLoop &event_loop, const ConfigBlock &block)
const char *app_id = block.GetBlockValue("app_id");
if (app_id == nullptr)
- throw PluginUnavailable("No Qobuz app_id configured");
+ throw PluginUnconfigured("No Qobuz app_id configured");
const char *app_secret = block.GetBlockValue("app_secret");
if (app_secret == nullptr)
- throw PluginUnavailable("No Qobuz app_secret configured");
+ throw PluginUnconfigured("No Qobuz app_secret configured");
const char *device_manufacturer_id = block.GetBlockValue("device_manufacturer_id",
"df691fdc-fa36-11e7-9718-635337d7df8f");
@@ -145,11 +145,11 @@ InitQobuzInput(EventLoop &event_loop, const ConfigBlock &block)
const char *username = block.GetBlockValue("username");
const char *email = block.GetBlockValue("email");
if (username == nullptr && email == nullptr)
- throw PluginUnavailable("No Qobuz username configured");
+ throw PluginUnconfigured("No Qobuz username configured");
const char *password = block.GetBlockValue("password");
if (password == nullptr)
- throw PluginUnavailable("No Qobuz password configured");
+ throw PluginUnconfigured("No Qobuz password configured");
const char *format_id = block.GetBlockValue("format_id", "5");
diff --git a/src/input/plugins/TidalInputPlugin.cxx b/src/input/plugins/TidalInputPlugin.cxx
index 3592262b2..426244af9 100644
--- a/src/input/plugins/TidalInputPlugin.cxx
+++ b/src/input/plugins/TidalInputPlugin.cxx
@@ -170,15 +170,15 @@ InitTidalInput(EventLoop &event_loop, const ConfigBlock &block)
const char *token = block.GetBlockValue("token");
if (token == nullptr)
- throw PluginUnavailable("No Tidal application token configured");
+ throw PluginUnconfigured("No Tidal application token configured");
const char *username = block.GetBlockValue("username");
if (username == nullptr)
- throw PluginUnavailable("No Tidal username configured");
+ throw PluginUnconfigured("No Tidal username configured");
const char *password = block.GetBlockValue("password");
if (password == nullptr)
- throw PluginUnavailable("No Tidal password configured");
+ throw PluginUnconfigured("No Tidal password configured");
FormatWarning(tidal_domain, "The Tidal input plugin is deprecated because Tidal has changed the protocol and doesn't share documentation");