storage/smbclient: add StoragePlugin.prefixes
Should have been part of commit
ef24cfa523
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1279
This commit is contained in:
@@ -186,15 +186,15 @@ SmbclientDirectoryReader::GetInfo([[maybe_unused]] bool follow)
|
|||||||
static std::unique_ptr<Storage>
|
static std::unique_ptr<Storage>
|
||||||
CreateSmbclientStorageURI([[maybe_unused]] EventLoop &event_loop, const char *base)
|
CreateSmbclientStorageURI([[maybe_unused]] EventLoop &event_loop, const char *base)
|
||||||
{
|
{
|
||||||
if (!StringStartsWithCaseASCII(base, "smb://"))
|
|
||||||
return nullptr;
|
|
||||||
|
|
||||||
SmbclientInit();
|
SmbclientInit();
|
||||||
|
|
||||||
return std::make_unique<SmbclientStorage>(base);
|
return std::make_unique<SmbclientStorage>(base);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static constexpr const char *smbclient_prefixes[] = { "smb://", nullptr };
|
||||||
|
|
||||||
const StoragePlugin smbclient_storage_plugin = {
|
const StoragePlugin smbclient_storage_plugin = {
|
||||||
"smbclient",
|
"smbclient",
|
||||||
|
smbclient_prefixes,
|
||||||
CreateSmbclientStorageURI,
|
CreateSmbclientStorageURI,
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user