M3U Parser: Remove the #EXTM3U header from no-metadata playlists.
This commit is contained in:
parent
20c6ae6c14
commit
dc51176437
|
@ -103,13 +103,15 @@ bool M3UParser::ParseMetadata(const QString& line,
|
|||
|
||||
void M3UParser::Save(const SongList& songs, QIODevice* device, const QDir& dir,
|
||||
Playlist::Path path_type) const {
|
||||
device->write("#EXTM3U\n");
|
||||
|
||||
QSettings s;
|
||||
s.beginGroup(Playlist::kSettingsGroup);
|
||||
bool writeMetadata = s.value(Playlist::kWriteMetadata, true).toBool();
|
||||
s.endGroup();
|
||||
|
||||
if (writeMetadata) {
|
||||
device->write("#EXTM3U\n");
|
||||
}
|
||||
|
||||
for (const Song& song : songs) {
|
||||
if (song.url().isEmpty()) {
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue