mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
Added path check for metadata.json through Attica.
This commit is contained in:
@@ -81,9 +81,13 @@ ResolverAccountFactory::createFromPath( const QString& path, const QString& fact
|
||||
if ( dir.cdUp() && dir.cdUp() ) //go up twice to the content dir, if any
|
||||
{
|
||||
QString metadataFilePath = dir.absoluteFilePath( "metadata.json" );
|
||||
QFileInfo metadataFileInfo( metadataFilePath );
|
||||
if ( metadataFileInfo.isFile() && metadataFileInfo.isReadable() )
|
||||
{
|
||||
configuration = metadataFromJsonFile( metadataFilePath );
|
||||
expandPaths( dir, configuration );
|
||||
}
|
||||
}
|
||||
return new AtticaResolverAccount( generateId( factory ), path, pathInfo.baseName(), configuration );
|
||||
}
|
||||
else //on filesystem, but it could be a bundle or a legacy resolver file
|
||||
|
Reference in New Issue
Block a user