playlist/extm3u: strip first line for #EXTM3U detection
This commit is contained in:
parent
bc840b69d5
commit
a0fae8dacc
2
NEWS
2
NEWS
|
@ -1,6 +1,8 @@
|
||||||
ver 0.19.1 (not yet released)
|
ver 0.19.1 (not yet released)
|
||||||
* input
|
* input
|
||||||
- mms: fix deadlock bug
|
- mms: fix deadlock bug
|
||||||
|
* playlist
|
||||||
|
- extm3u: fix Extended M3U detection
|
||||||
* fix build failure on Mac OS X
|
* fix build failure on Mac OS X
|
||||||
* add missing file systemd/mpd.socket to tarball
|
* add missing file systemd/mpd.socket to tarball
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,12 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CheckFirstLine() {
|
bool CheckFirstLine() {
|
||||||
const char *line = tis.ReadLine();
|
char *line = tis.ReadLine();
|
||||||
return line != nullptr && strcmp(line, "#EXTM3U") == 0;
|
if (line == nullptr)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
StripRight(line);
|
||||||
|
return strcmp(line, "#EXTM3U") == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual DetachedSong *NextSong() override;
|
virtual DetachedSong *NextSong() override;
|
||||||
|
|
Loading…
Reference in New Issue