mirror of
https://github.com/clangen/musikcube.git
synced 2024-10-02 04:52:32 +00:00
Conditionally enable piggy; disabled by default.
This commit is contained in:
parent
fa2d95a9e6
commit
4ff25b19d2
@ -6,11 +6,13 @@
|
|||||||
a list of actions for the current track/artist/album
|
a list of actions for the current track/artist/album
|
||||||
* added the ability to use `libelogind` or `basu` instead of `libsystemd` for
|
* added the ability to use `libelogind` or `basu` instead of `libsystemd` for
|
||||||
the `mpris` plugin (@robertgzr)
|
the `mpris` plugin (@robertgzr)
|
||||||
* some warning cleanups when using wsprintw (@trofi)
|
* some warning cleanups when using `wsprintw` (@trofi)
|
||||||
* further improvements to build system to remove OS-specific conditionals in
|
* further improvements to build system to remove OS-specific conditionals in
|
||||||
favor of library detection
|
favor of library detection
|
||||||
* added color output to various important cmake messages, making it much easier
|
* added color output to various important cmake messages, making it much easier
|
||||||
to spot check configuration issues.
|
to spot check configuration issues.
|
||||||
|
* added support for the `piggy` debug tool to help with log collection and
|
||||||
|
remote app monitoring. disabled by default.
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -82,6 +82,8 @@ namespace musik { namespace core { namespace prefs {
|
|||||||
const std::string keys::RemoteLibraryTranscoderBitrate = "RemoteLibraryTranscoderBitrate";
|
const std::string keys::RemoteLibraryTranscoderBitrate = "RemoteLibraryTranscoderBitrate";
|
||||||
const std::string keys::RemoteLibraryIgnoreVersionMismatch = "RemoteLibraryIgnoreVersionMismatch";
|
const std::string keys::RemoteLibraryIgnoreVersionMismatch = "RemoteLibraryIgnoreVersionMismatch";
|
||||||
const std::string keys::AsyncTrackListQueries = "AsyncTrackListQueries";
|
const std::string keys::AsyncTrackListQueries = "AsyncTrackListQueries";
|
||||||
|
const std::string keys::PiggyEnabled = "PiggyEnabled";
|
||||||
|
const std::string keys::PiggyHostname = "PiggyHostname";
|
||||||
|
|
||||||
} } }
|
} } }
|
||||||
|
|
||||||
|
@ -86,6 +86,8 @@ namespace musik { namespace core { namespace prefs {
|
|||||||
extern const std::string RemoteLibraryTranscoderBitrate;
|
extern const std::string RemoteLibraryTranscoderBitrate;
|
||||||
extern const std::string RemoteLibraryIgnoreVersionMismatch;
|
extern const std::string RemoteLibraryIgnoreVersionMismatch;
|
||||||
extern const std::string AsyncTrackListQueries;
|
extern const std::string AsyncTrackListQueries;
|
||||||
|
extern const std::string PiggyEnabled;
|
||||||
|
extern const std::string PiggyHostname;
|
||||||
}
|
}
|
||||||
|
|
||||||
} } }
|
} } }
|
||||||
|
@ -116,13 +116,21 @@ int main(int argc, char* argv[]) {
|
|||||||
std::string errorFn = core::GetDataDirectory() + "stderr.txt";
|
std::string errorFn = core::GetDataDirectory() + "stderr.txt";
|
||||||
freopen(errorFn.c_str(), "w", stderr);
|
freopen(errorFn.c_str(), "w", stderr);
|
||||||
|
|
||||||
auto piggyClient = std::make_shared<PiggyWebSocketClient>(&Window::MessageQueue());
|
auto prefs = Preferences::ForComponent(core::prefs::components::Settings);
|
||||||
piggyClient->Connect("localhost");
|
|
||||||
auto piggyLogger = new PiggyDebugBackend(piggyClient);
|
|
||||||
|
|
||||||
auto fileLogger = new debug::SimpleFileBackend();
|
|
||||||
auto consoleLogger = new ConsoleLogger(Window::MessageQueue());
|
auto consoleLogger = new ConsoleLogger(Window::MessageQueue());
|
||||||
debug::Start({ fileLogger, consoleLogger, piggyLogger });
|
|
||||||
|
std::vector<debug::IBackend*> debuggerBackends = {
|
||||||
|
new debug::SimpleFileBackend(), consoleLogger
|
||||||
|
};
|
||||||
|
|
||||||
|
if (prefs->GetBool(core::prefs::keys::PiggyEnabled, false)) {
|
||||||
|
auto piggyClient = std::make_shared<PiggyWebSocketClient>(&Window::MessageQueue());
|
||||||
|
piggyClient->Connect(prefs->GetString(core::prefs::keys::PiggyHostname, "localhost"));
|
||||||
|
debuggerBackends.push_back(new PiggyDebugBackend(piggyClient));
|
||||||
|
}
|
||||||
|
|
||||||
|
debug::Start(debuggerBackends);
|
||||||
|
|
||||||
plugin::Init();
|
plugin::Init();
|
||||||
|
|
||||||
@ -138,8 +146,6 @@ int main(int argc, char* argv[]) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
{
|
{
|
||||||
auto prefs = Preferences::ForComponent(core::prefs::components::Settings);
|
|
||||||
|
|
||||||
PlaybackService playback(Window::MessageQueue(), library);
|
PlaybackService playback(Window::MessageQueue(), library);
|
||||||
|
|
||||||
GlobalHotkeys globalHotkeys(playback, library);
|
GlobalHotkeys globalHotkeys(playback, library);
|
||||||
|
@ -123,6 +123,8 @@ static inline std::shared_ptr<ISchema> AdvancedSettingsSchema() {
|
|||||||
schema->AddInt(core::prefs::keys::IndexerTransactionInterval, 300);
|
schema->AddInt(core::prefs::keys::IndexerTransactionInterval, 300);
|
||||||
schema->AddString(core::prefs::keys::AuddioApiToken, "");
|
schema->AddString(core::prefs::keys::AuddioApiToken, "");
|
||||||
schema->AddBool(core::prefs::keys::ResumePlaybackOnStartup, false);
|
schema->AddBool(core::prefs::keys::ResumePlaybackOnStartup, false);
|
||||||
|
schema->AddBool(core::prefs::keys::PiggyEnabled, false);
|
||||||
|
schema->AddString(core::prefs::keys::PiggyHostname, "localhost");
|
||||||
return schema;
|
return schema;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user