diff --git a/src/plugins/mpris/mpris.cpp b/src/plugins/mpris/mpris.cpp index 57c0372ab..4e6ce1d8e 100644 --- a/src/plugins/mpris/mpris.cpp +++ b/src/plugins/mpris/mpris.cpp @@ -10,38 +10,34 @@ extern "C" { #include } -thread_local char localBuffer[4096]; +thread_local char localBuffer[1024]; static MPRISRemote remote; -static const std::map> MPRISPropertyNames = +static const std::map> MPRISPropertyNames = {{MPRISProperty::Volume, {"Volume", NULL}}, {MPRISProperty::PlaybackStatus, {"PlaybackStatus", NULL}}, {MPRISProperty::LoopStatus, {"LoopStatus", NULL}}, {MPRISProperty::Shuffle, {"Shuffle", NULL}}, {MPRISProperty::Metadata, {"Metadata", NULL}}}; - static std::string GetMetadataString(ITrack* track, const char* key) { track->GetString(key, localBuffer, sizeof(localBuffer)); return std::string(localBuffer); } - static class MPRISPlugin : public IPlugin { -public: - MPRISPlugin() { - } - - void Release() { } - const char* Name() { return "MPRIS interface"; } - const char* Version() { return "0.1.0"; } - const char* Author() { return "brunosmmm"; } - const char* Guid() { return "457df67f-f489-415f-975e-282f470b1c10"; } - bool Configurable() { return false; } - void Configure() { } - void Reload() { } - int SdkVersion() { return musik::core::sdk::SdkVersion; } + public: + MPRISPlugin() { } + void Release() { } + const char* Name() { return "MPRIS interface"; } + const char* Version() { return "0.1.0"; } + const char* Author() { return "brunosmmm"; } + const char* Guid() { return "457df67f-f489-415f-975e-282f470b1c10"; } + bool Configurable() { return false; } + void Configure() { } + void Reload() { } + int SdkVersion() { return musik::core::sdk::SdkVersion; } } plugin; extern "C" IPlugin* GetPlugin() { @@ -328,7 +324,6 @@ void MPRISRemote::MPRISSetVolume(double vol) { } } - MPRISMetadataValues::MPRISMetadataValues() { trackid = ""; length = 0;