decoder/Thread: enable output tags for Tidal and Qobuz

Fixes formatted paths in the `recorder` output, closing #345.
This commit is contained in:
Max Kellermann 2018-10-24 16:38:26 +02:00
parent 426bde3f75
commit 9ec86acb9c

View File

@ -35,6 +35,7 @@
#include "util/RuntimeError.hxx" #include "util/RuntimeError.hxx"
#include "util/Domain.hxx" #include "util/Domain.hxx"
#include "util/ScopeExit.hxx" #include "util/ScopeExit.hxx"
#include "util/StringCompare.hxx"
#include "thread/Name.hxx" #include "thread/Name.hxx"
#include "tag/ApeReplayGain.hxx" #include "tag/ApeReplayGain.hxx"
#include "Log.hxx" #include "Log.hxx"
@ -431,6 +432,14 @@ try {
error_uri)); 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 * Try to guess whether tags attached to the given song are
* "volatile", e.g. if they have been received by a live stream, but * "volatile", e.g. if they have been received by a live stream, but
@ -441,7 +450,7 @@ gcc_pure
static bool static bool
SongHasVolatileTags(const DetachedSong &song) noexcept SongHasVolatileTags(const DetachedSong &song) noexcept
{ {
return !song.IsFile(); return !song.IsFile() && !HasRemoteTagScanner(song.GetRealURI());
} }
/** /**