mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-12 00:54:20 +02:00
support loading local .xspfs from files
(cherry picked from commit 4095f4b5aa
)
This commit is contained in:
@@ -384,10 +384,16 @@ TomahawkWindow::loadSpiff()
|
|||||||
if ( !ok || urlstr.isEmpty() )
|
if ( !ok || urlstr.isEmpty() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QUrl url( urlstr );
|
|
||||||
|
|
||||||
XSPFLoader* loader = new XSPFLoader;
|
XSPFLoader* loader = new XSPFLoader;
|
||||||
loader->load( url );
|
QFileInfo info( urlstr );
|
||||||
|
if( info.isFile() )
|
||||||
|
{
|
||||||
|
QFile f( urlstr );
|
||||||
|
loader->load( f );
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
loader->load( QUrl( urlstr ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user