From d9c1cd4bd300c0b3a0e7085010e7b3cacab0abdb Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Tue, 4 Nov 2008 16:17:58 +0100 Subject: [PATCH] make check if file is from music db while getting song info --- src/helpers.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/helpers.cpp b/src/helpers.cpp index 51ce3a59..9d9d9c2c 100644 --- a/src/helpers.cpp +++ b/src/helpers.cpp @@ -833,7 +833,10 @@ string GetInfo(Song &s) { string result; # ifdef HAVE_TAGLIB_H - string path_to_file = Config.mpd_music_dir + s.GetFile(); + string path_to_file; + if (s.IsFromDB()) + path_to_file += Config.mpd_music_dir; + path_to_file += s.GetFile(); TagLib::FileRef f(path_to_file.c_str()); if (!f.isNull()) s.SetComment(f.tag()->comment().to8Bit(UNICODE));