diff options
Diffstat (limited to 'src/DetachedSong.cxx')
-rw-r--r-- | src/DetachedSong.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/DetachedSong.cxx b/src/DetachedSong.cxx index 4e52afb0c..83106edee 100644 --- a/src/DetachedSong.cxx +++ b/src/DetachedSong.cxx @@ -32,13 +32,23 @@ DetachedSong::DetachedSong(const LightSong &other) bool DetachedSong::IsRemote() const { - return uri_has_scheme(uri.c_str()); + return uri_has_scheme(GetRealURI()); } bool DetachedSong::IsAbsoluteFile() const { - return PathTraitsUTF8::IsAbsolute(uri.c_str()); + return PathTraitsUTF8::IsAbsolute(GetRealURI()); +} + +bool +DetachedSong::IsInDatabase() const +{ + /* here, we use GetURI() and not GetRealURI() because + GetRealURI() is never relative */ + + const char *_uri = GetURI(); + return !uri_has_scheme(_uri) && !PathTraitsUTF8::IsAbsolute(_uri); } double |