1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 11:20:22 +02:00

support loading local .xspfs from files

This commit is contained in:
Leo Franchi
2011-04-11 10:11:40 -04:00
parent 5235cc9093
commit 4095f4b5aa
3 changed files with 21 additions and 15 deletions

View File

@@ -384,10 +384,16 @@ TomahawkWindow::loadSpiff()
if ( !ok || urlstr.isEmpty() )
return;
QUrl url( urlstr );
XSPFLoader* loader = new XSPFLoader;
loader->load( url );
QFileInfo info( urlstr );
if( info.isFile() )
{
QFile f( urlstr );
loader->load( f );
} else
{
loader->load( QUrl( urlstr ) );
}
}