Ignore:
Timestamp:
May 3, 2016, 2:14:41 PM (9 years ago)
Author:
Silvan Scherrer
Message:

smplayer: update vendor to version 16.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified smplayer/vendor/current/src/favorites.cpp

    r168 r175  
    11/*  smplayer, GUI front-end for mplayer.
    2     Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net>
     2    Copyright (C) 2006-2016 Ricardo Villalba <rvm@users.sourceforge.net>
    33
    44    This program is free software; you can redistribute it and/or modify
     
    292292        QRegExp info2("^#EXTINF:(.*),(.*),(.*),(.*)");
    293293
    294     QFile f( _filename );
    295     if ( f.open( QIODevice::ReadOnly ) ) {
     294        QFile f( _filename );
     295        if ( f.open( QIODevice::ReadOnly ) ) {
    296296
    297297                f_list.clear();
     
    299299                Favorite fav;
    300300
    301         QTextStream stream( &f );
     301                QTextStream stream( &f );
    302302                stream.setCodec("UTF-8");
    303303
    304         QString line;
    305         while ( !stream.atEnd() ) {
    306             line = stream.readLine(); // line of text excluding '\n'
     304                QString line;
     305                while ( !stream.atEnd() ) {
     306                        line = stream.readLine().trimmed();
     307                        if (line.isEmpty()) continue; // Ignore empty lines
    307308                        //qDebug("info2.indexIn: %d", info2.indexIn(line));
    308309                        //qDebug("info1.indexIn: %d", info1.indexIn(line));
    309             //qDebug( " * line: '%s'", line.toUtf8().data() );
     310                        //qDebug( " * line: '%s'", line.toUtf8().data() );
    310311                        if (m3u_id.indexIn(line)!=-1) {
    311312                                //#EXTM3U
     
    341342                                fav.setSubentry(false);
    342343                        }
    343         }
    344         f.close();
     344                }
     345                f.close();
    345346        }
    346347}
Note: See TracChangeset for help on using the changeset viewer.