mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-04 08:42:07 +00:00
Ensure the metadata proxy always references the local library.
This commit is contained in:
parent
8200e7003e
commit
6f302cd374
@ -47,6 +47,7 @@
|
||||
#include <musikcore/support/Preferences.h>
|
||||
#include <musikcore/support/PreferenceKeys.h>
|
||||
#include <musikcore/library/LocalMetadataProxy.h>
|
||||
#include <musikcore/library/LibraryFactory.h>
|
||||
#include <musikcore/runtime/Message.h>
|
||||
#include <musikcore/support/Messages.h>
|
||||
|
||||
@ -367,9 +368,12 @@ namespace musik { namespace core { namespace plugin {
|
||||
::messageQueue = messageQueue;
|
||||
::defaultLibrary = library;
|
||||
::playback = playback;
|
||||
::metadataProxy = new LocalMetadataProxy(library);
|
||||
::playbackPrefs = Preferences::ForComponent(prefs::components::Playback);
|
||||
|
||||
/* even if the local client is connected to a remote server, the metadata proxy
|
||||
always uses the default local library. */
|
||||
::metadataProxy = new LocalMetadataProxy(LibraryFactory::Instance().DefaultLocalLibrary());
|
||||
|
||||
PluginFactory::Instance().QueryFunction<SetMetadataProxy>(
|
||||
"SetMetadataProxy",
|
||||
[](musik::core::sdk::IPlugin* plugin, SetMetadataProxy func) {
|
||||
|
@ -607,6 +607,12 @@ int HttpServer::HandleAudioTrackRequest(
|
||||
file = nullptr;
|
||||
}
|
||||
}
|
||||
else {
|
||||
status = MHD_HTTP_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
else {
|
||||
status = MHD_HTTP_NOT_FOUND;
|
||||
}
|
||||
|
||||
return status;
|
||||
|
Loading…
Reference in New Issue
Block a user