db/simple: purge songs for unavailable decoder plugins on update
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "db/plugins/simple/Directory.hxx"
|
||||
#include "storage/StorageInterface.hxx"
|
||||
#include "storage/FileInfo.hxx"
|
||||
#include "decoder/DecoderList.hxx"
|
||||
#include "fs/AllocatedPath.hxx"
|
||||
#include "fs/FileInfo.hxx"
|
||||
#include "tag/Builder.hxx"
|
||||
@@ -40,6 +41,14 @@
|
||||
|
||||
#ifdef ENABLE_DATABASE
|
||||
|
||||
bool
|
||||
Song::IsPluginAvailable() const noexcept
|
||||
{
|
||||
const char *suffix = GetFilenameSuffix();
|
||||
return suffix != nullptr &&
|
||||
decoder_plugins_supports_suffix(suffix);
|
||||
}
|
||||
|
||||
SongPtr
|
||||
Song::LoadFile(Storage &storage, const char *path_utf8, Directory &parent)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user