mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-02-23 11:25:52 +01:00
Added path check for metadata.json through Attica.
This commit is contained in:
parent
2d57f6c140
commit
8cc52bca75
@ -81,8 +81,12 @@ ResolverAccountFactory::createFromPath( const QString& path, const QString& fact
|
|||||||
if ( dir.cdUp() && dir.cdUp() ) //go up twice to the content dir, if any
|
if ( dir.cdUp() && dir.cdUp() ) //go up twice to the content dir, if any
|
||||||
{
|
{
|
||||||
QString metadataFilePath = dir.absoluteFilePath( "metadata.json" );
|
QString metadataFilePath = dir.absoluteFilePath( "metadata.json" );
|
||||||
configuration = metadataFromJsonFile( metadataFilePath );
|
QFileInfo metadataFileInfo( metadataFilePath );
|
||||||
expandPaths( dir, configuration );
|
if ( metadataFileInfo.isFile() && metadataFileInfo.isReadable() )
|
||||||
|
{
|
||||||
|
configuration = metadataFromJsonFile( metadataFilePath );
|
||||||
|
expandPaths( dir, configuration );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return new AtticaResolverAccount( generateId( factory ), path, pathInfo.baseName(), configuration );
|
return new AtticaResolverAccount( generateId( factory ), path, pathInfo.baseName(), configuration );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user