mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-19 23:39:42 +01:00
Stylefix
This commit is contained in:
parent
df7550d73b
commit
71651f62b1
@ -77,9 +77,11 @@ M3uLoader::getTags( const QFileInfo& info )
|
||||
TagLib::FileRef f( encodedName );
|
||||
if( f.isNull() )
|
||||
return;
|
||||
|
||||
TagLib::Tag *tag = f.tag();
|
||||
if( !tag )
|
||||
return;
|
||||
|
||||
QString artist = TStringToQString( tag->artist() ).trimmed();
|
||||
QString album = TStringToQString( tag->album() ).trimmed();
|
||||
QString track = TStringToQString( tag->title() ).trimmed();
|
||||
@ -103,6 +105,7 @@ M3uLoader::getTags( const QFileInfo& info )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
M3uLoader::parseLine( const QString& line, const QFile& file )
|
||||
{
|
||||
@ -114,7 +117,7 @@ M3uLoader::parseLine( const QString& line, const QFile& file )
|
||||
}
|
||||
else
|
||||
{
|
||||
QUrl fileUrl = QUrl::fromUserInput( QString( QFileInfo(file).canonicalPath() + "/" + line.simplified() ) );
|
||||
QUrl fileUrl = QUrl::fromUserInput( QString( QFileInfo( file ).canonicalPath() + "/" + line.simplified() ) );
|
||||
QFileInfo tmpFile( fileUrl.toLocalFile() );
|
||||
if ( tmpFile.exists() )
|
||||
{
|
||||
@ -123,6 +126,7 @@ M3uLoader::parseLine( const QString& line, const QFile& file )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
M3uLoader::parseM3u( const QString& fileLink )
|
||||
{
|
||||
@ -145,7 +149,7 @@ M3uLoader::parseM3u( const QString& fileLink )
|
||||
QString line = stream.readLine().trimmed();
|
||||
|
||||
/// Fallback solution for, (drums) itunes!
|
||||
singleLine.append(line);
|
||||
singleLine.append( line );
|
||||
|
||||
/// If anyone wants to take on the regex for parsing EXT, go ahead
|
||||
/// But the notion that users does not tag by a common rule. that seems hard
|
||||
@ -161,7 +165,7 @@ M3uLoader::parseM3u( const QString& fileLink )
|
||||
{
|
||||
if ( !singleLine.isEmpty() )
|
||||
{
|
||||
QStringList m3uList = singleLine.split("\r");
|
||||
QStringList m3uList = singleLine.split( "\r" );
|
||||
foreach( const QString& line, m3uList )
|
||||
parseLine( line, file );
|
||||
}
|
||||
@ -190,6 +194,7 @@ M3uLoader::parseM3u( const QString& fileLink )
|
||||
m_tracks.clear();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
M3uLoader::playlistCreated()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user