summaryrefslogtreecommitdiff
path: root/src/decoder
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-10-24 16:38:26 +0200
committerMax Kellermann <max@musicpd.org>2018-10-24 16:38:26 +0200
commit9ec86acb9c92767fba9322000925b094aa4ea285 (patch)
treee99434950e4db850412e4bc896cb101e3e1910ed /src/decoder
parent426bde3f759cabfd240861ac41df78f1ddd4dfa8 (diff)
decoder/Thread: enable output tags for Tidal and Qobuz
Fixes formatted paths in the `recorder` output, closing #345.
Diffstat (limited to 'src/decoder')
-rw-r--r--src/decoder/Thread.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/decoder/Thread.cxx b/src/decoder/Thread.cxx
index f9dad2627..7a54af3e8 100644
--- a/src/decoder/Thread.cxx
+++ b/src/decoder/Thread.cxx
@@ -35,6 +35,7 @@
#include "util/RuntimeError.hxx"
#include "util/Domain.hxx"
#include "util/ScopeExit.hxx"
+#include "util/StringCompare.hxx"
#include "thread/Name.hxx"
#include "tag/ApeReplayGain.hxx"
#include "Log.hxx"
@@ -431,6 +432,14 @@ try {
error_uri));
}
+gcc_pure
+static bool
+HasRemoteTagScanner(const char *uri) noexcept
+{
+ return StringStartsWith(uri, "tidal://") ||
+ StringStartsWith(uri, "qobuz://");
+}
+
/**
* Try to guess whether tags attached to the given song are
* "volatile", e.g. if they have been received by a live stream, but
@@ -441,7 +450,7 @@ gcc_pure
static bool
SongHasVolatileTags(const DetachedSong &song) noexcept
{
- return !song.IsFile();
+ return !song.IsFile() && !HasRemoteTagScanner(song.GetRealURI());
}
/**