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)
|
||||
* input
|
||||
- mms: fix deadlock bug
|
||||
* playlist
|
||||
- extm3u: fix Extended M3U detection
|
||||
* fix build failure on Mac OS X
|
||||
* add missing file systemd/mpd.socket to tarball
|
||||
|
||||
|
|
|
@ -39,8 +39,12 @@ public:
|
|||
}
|
||||
|
||||
bool CheckFirstLine() {
|
||||
const char *line = tis.ReadLine();
|
||||
return line != nullptr && strcmp(line, "#EXTM3U") == 0;
|
||||
char *line = tis.ReadLine();
|
||||
if (line == nullptr)
|
||||
return false;
|
||||
|
||||
StripRight(line);
|
||||
return strcmp(line, "#EXTM3U") == 0;
|
||||
}
|
||||
|
||||
virtual DetachedSong *NextSong() override;
|
||||
|
|
Loading…
Reference in New Issue