diff --git a/src/db/update/Editor.cxx b/src/db/update/Editor.cxx index 910747a7e..57d7bb806 100644 --- a/src/db/update/Editor.cxx +++ b/src/db/update/Editor.cxx @@ -39,7 +39,7 @@ DatabaseEditor::DeleteSong(Directory &dir, Song *del) const ScopeDatabaseUnlock unlock; /* now take it out of the playlist (in the main_task) */ - remove.Remove(del); + remove.Remove(del->GetURI()); /* finally, all possible references gone, free it */ del->Free(); diff --git a/src/db/update/Remove.cxx b/src/db/update/Remove.cxx index 04232cf6a..499ef921c 100644 --- a/src/db/update/Remove.cxx +++ b/src/db/update/Remove.cxx @@ -20,7 +20,6 @@ #include "config.h" /* must be first for large file support */ #include "Remove.hxx" #include "UpdateDomain.hxx" -#include "db/plugins/simple/Song.hxx" #include "db/DatabaseListener.hxx" #include "Log.hxx" @@ -51,14 +50,14 @@ UpdateRemoveService::RunDeferred() } void -UpdateRemoveService::Remove(const Song *song) +UpdateRemoveService::Remove(std::string &&uri) { bool was_empty; { const ScopeLock protect(mutex); was_empty = uris.empty(); - uris.emplace_front(song->GetURI()); + uris.emplace_front(std::move(uri)); } /* inject an event into the main thread, but only if the list diff --git a/src/db/update/Remove.hxx b/src/db/update/Remove.hxx index 8b381b5fa..e8e1f137c 100644 --- a/src/db/update/Remove.hxx +++ b/src/db/update/Remove.hxx @@ -52,7 +52,7 @@ public: * This serialized access is implemented to avoid excessive * locking. */ - void Remove(const Song *song); + void Remove(std::string &&uri); private: /* virtual methods from class DeferredMonitor */