mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-31 11:35:24 +01:00
Remove unnecessary checks.
This commit is contained in:
parent
07b2c38690
commit
a0f19e5923
@ -102,11 +102,7 @@ void M3UParser::Save(const SongList &songs, QIODevice *device, const QDir &dir)
|
||||
}
|
||||
QString meta = QString("#EXTINF:%1,%2 - %3\n").arg(song.length()).arg(song.artist()).arg(song.title());
|
||||
device->write(meta.toLatin1());
|
||||
if (song.filetype() == Song::Type_Stream) {
|
||||
device->write(song.filename().toLatin1());
|
||||
} else {
|
||||
device->write(MakeRelativeTo(song.filename(), dir).toLatin1());
|
||||
}
|
||||
device->write(MakeRelativeTo(song.filename(), dir).toLatin1());
|
||||
device->write("\n");
|
||||
}
|
||||
}
|
||||
|
@ -145,12 +145,7 @@ void XSPFParser::Save(const SongList &songs, QIODevice *device, const QDir &dir)
|
||||
QDomElement track_list = doc.createElement("trackList");
|
||||
root.appendChild(track_list);
|
||||
foreach (const Song& song, songs) {
|
||||
QString url;
|
||||
if (song.filetype() == Song::Type_Stream) {
|
||||
url = song.filename();
|
||||
} else {
|
||||
url = QUrl::fromLocalFile(MakeRelativeTo(song.filename(), dir)).toString();
|
||||
}
|
||||
QString url = MakeRelativeTo(song.filename(), dir);
|
||||
if (url.isEmpty()) {
|
||||
continue; // Skip empty items like Last.fm streams.
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user