1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-17 20:09:50 +01:00

Fix writing of album art paths when saving XSPF files

This commit is contained in:
David Sansome 2010-12-11 09:31:39 +00:00
parent 5f6dcbe4b7
commit 292fdd3e7f

View File

@ -130,9 +130,7 @@ void XSPFParser::Save(const SongList &songs, QIODevice *device, const QDir &dir)
// Ignore images that are in our resource bundle.
if (!art.startsWith(":") && !art.isEmpty()) {
// Convert local files to URLs.
if (!art.contains(QRegExp("^\\w+://"))) {
art = QUrl::fromLocalFile(MakeRelativeTo(art, dir)).toString();
}
art = MakeRelativeTo(art, dir);
writer.writeTextElement("image", art);
}
}