playlist/registry: add option "as_directory"
This allows users to disable the "CUE files as directories" feature without having to disable the CUE playlist plugin completely. This feature has been annoying some users.
This commit is contained in:
@@ -95,7 +95,7 @@ UpdateWalk::UpdatePlaylistFile(Directory &directory,
|
||||
if (plugin == nullptr)
|
||||
return false;
|
||||
|
||||
if (plugin->as_folder)
|
||||
if (GetPlaylistPluginAsFolder(*plugin))
|
||||
UpdatePlaylistFile(directory, name, info, *plugin);
|
||||
|
||||
PlaylistInfo pi(name, info.mtime);
|
||||
|
@@ -52,7 +52,16 @@ static bool
|
||||
HavePlaylistPluginForFilename(const char *filename) noexcept
|
||||
{
|
||||
const char *suffix = PathTraitsUTF8::GetFilenameSuffix(filename);
|
||||
return suffix != nullptr && playlist_suffix_supported(suffix);
|
||||
if (suffix == nullptr)
|
||||
return false;
|
||||
|
||||
const auto plugin = FindPlaylistPluginBySuffix(suffix);
|
||||
if (plugin == nullptr)
|
||||
return false;
|
||||
|
||||
/* discard the special directory if the user disables the
|
||||
plugin's "as_directory" setting */
|
||||
return GetPlaylistPluginAsFolder(*plugin);
|
||||
}
|
||||
|
||||
bool
|
||||
|
Reference in New Issue
Block a user