Skip to content

Commit

Permalink
Skip all lines in playlist with reserved character '#'
Browse files Browse the repository at this point in the history
  • Loading branch information
uklotzde committed Jul 5, 2019
1 parent 8e5c787 commit aae966a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/library/parserm3u.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,10 @@ QList<QString> ParserM3u::parse(QString sFilename)
QString ParserM3u::getFilepath(QTextStream* stream, QString basepath) {
QString textline;
while (!(textline = stream->readLine().trimmed()).isEmpty()) {
if (textline.startsWith("#")) {
// Skip comments
if (textline.contains("#")) {
// Skip all lines with comments or special tags that are
// prefixed with the reserved character '#'. In file URLs
// this special character needs to be encoded as "%23".
continue;
}
QString trackLocation = playlistEntrytoLocalFile(textline);
Expand Down

0 comments on commit aae966a

Please sign in to comment.