mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-01-17 14:28:24 +01:00
Do not set empty mimetype on results
This commit is contained in:
parent
87278456f4
commit
0bdb8061e2
@ -370,11 +370,17 @@ ScriptAccount::parseResultVariantList( const QVariantList& reslist )
|
||||
// rp->track()->setAttributes( attr );
|
||||
}
|
||||
|
||||
rp->setMimetype( m.value( "mimetype" ).toString() );
|
||||
if ( rp->mimetype().isEmpty() )
|
||||
|
||||
QString mimetype = m.value( "mimetype" ).toString();
|
||||
if ( mimetype.isEmpty() )
|
||||
{
|
||||
rp->setMimetype( TomahawkUtils::extensionToMimetype( m.value( "extension" ).toString() ) );
|
||||
Q_ASSERT( !rp->mimetype().isEmpty() );
|
||||
mimetype = TomahawkUtils::extensionToMimetype( m.value( "extension" ).toString() );
|
||||
}
|
||||
Q_ASSERT( !mimetype.isEmpty() );
|
||||
|
||||
if ( !mimetype.isEmpty() )
|
||||
{
|
||||
rp->setMimetype( mimetype );
|
||||
}
|
||||
|
||||
rp->setFriendlySource( name() );
|
||||
|
Loading…
x
Reference in New Issue
Block a user