1
0
mirror of https://github.com/clementine-player/Clementine synced 2025-01-19 04:50:16 +01:00

Revert r1020, it wasn't necessary - see issue #364

This commit is contained in:
David Sansome 2010-06-02 21:08:37 +00:00
parent 2381d2ba1a
commit 7cbd8f7500

View File

@ -29,11 +29,11 @@ SongList M3UParser::Load(QIODevice* device, const QDir& dir) const {
M3UType type = STANDARD; M3UType type = STANDARD;
Metadata current_metadata; Metadata current_metadata;
QString line = QString::fromUtf8(device->readLine()).trimmed(); QString line = QString::fromLocal8Bit(device->readLine()).trimmed();
if (line.startsWith("#EXTM3U")) { if (line.startsWith("#EXTM3U")) {
// This is in extended M3U format. // This is in extended M3U format.
type = EXTENDED; type = EXTENDED;
line = QString::fromUtf8(device->readLine()).trimmed(); line = QString::fromLocal8Bit(device->readLine()).trimmed();
} }
forever { forever {
@ -65,7 +65,7 @@ SongList M3UParser::Load(QIODevice* device, const QDir& dir) const {
if (device->atEnd()) { if (device->atEnd()) {
break; break;
} }
line = QString::fromUtf8(device->readLine()).trimmed(); line = QString::fromLocal8Bit(device->readLine()).trimmed();
} }
return ret; return ret;
@ -101,8 +101,8 @@ void M3UParser::Save(const SongList &songs, QIODevice *device, const QDir &dir)
continue; continue;
} }
QString meta = QString("#EXTINF:%1,%2 - %3\n").arg(song.length()).arg(song.artist()).arg(song.title()); QString meta = QString("#EXTINF:%1,%2 - %3\n").arg(song.length()).arg(song.artist()).arg(song.title());
device->write(meta.toUtf8()); device->write(meta.toLocal8Bit());
device->write(MakeRelativeTo(song.filename(), dir).toUtf8()); device->write(MakeRelativeTo(song.filename(), dir).toLocal8Bit());
device->write("\n"); device->write("\n");
} }
} }