Commit 023dc7af authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

MetadataParser: Use the appropriate device mountpoint as an external playlist media entrypoint

parent 9ae7fd26
...@@ -314,7 +314,14 @@ void MetadataParser::addPlaylistElement( parser::Task& task, const std::shared_p ...@@ -314,7 +314,14 @@ void MetadataParser::addPlaylistElement( parser::Task& task, const std::shared_p
auto parentFolder = Folder::fromMrl( m_ml, directoryMrl ); auto parentFolder = Folder::fromMrl( m_ml, directoryMrl );
bool parentKnown = parentFolder != nullptr; bool parentKnown = parentFolder != nullptr;
auto entryPoint = utils::file::scheme( mrl ) + '/' + utils::file::firstFolder( utils::file::stripScheme( mrl ) ); // The minimal entrypoint must be a device mountpoint
auto device = fsFactory->createDeviceFromMrl( mrl );
if ( device == nullptr )
{
LOG_ERROR( "Can't add a local folder with unknown storage device. ");
return;
}
auto entryPoint = device->mountpoint();
if ( parentKnown == false && Folder::fromMrl( m_ml, entryPoint ) != nullptr ) if ( parentKnown == false && Folder::fromMrl( m_ml, entryPoint ) != nullptr )
{ {
auto probePtr = std::unique_ptr<prober::PathProbe>( new prober::PathProbe{ utils::file::stripScheme( mrl ), auto probePtr = std::unique_ptr<prober::PathProbe>( new prober::PathProbe{ utils::file::stripScheme( mrl ),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment