Fixed GStreamer error printing and added option to disable sending cover
art to Discord RPC (Security issue) GStreamer's GError is a struct, not a char*, with GError->message being the actual char* message. Since Subsonic/OpenSubsonic servers don't have a way of sending cover art unauthenticated, sending cover art to Discord using Discord RPC exposes an authenticated URL to Discord servers (But only Discord since it is then proxy'd). Added a config option to disable this behavior and only use the app icon if the user doesn't feel comfortable enough to trust Discord (understandable tbh)
This commit is contained in:
@@ -47,6 +47,7 @@ int configHandler_Read(configHandler_config_t** configObj) {
|
||||
(*configObj)->discordrpc_enable = false;
|
||||
(*configObj)->discordrpc_method = 0;
|
||||
(*configObj)->discordrpc_showSysDetails = false;
|
||||
(*configObj)->discordrpc_showCoverArt = false;
|
||||
(*configObj)->audio_equalizer_enable = false;
|
||||
(*configObj)->audio_equalizer_followPitch = false;
|
||||
(*configObj)->audio_equalizer_graphCount = 0;
|
||||
@@ -251,6 +252,13 @@ int configHandler_Read(configHandler_config_t** configObj) {
|
||||
}
|
||||
}
|
||||
|
||||
cJSON* discordrpc_showCoverArt = cJSON_GetObjectItemCaseSensitive(discordrpc_root, "showCoverArt");
|
||||
if (cJSON_IsBool(discordrpc_showCoverArt)) {
|
||||
if (cJSON_IsTrue(discordrpc_showCoverArt)) {
|
||||
(*configObj)->discordrpc_showCoverArt = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Make an object from audio
|
||||
cJSON* audio_root = cJSON_GetObjectItemCaseSensitive(root, "audio");
|
||||
if (audio_root == NULL) {
|
||||
|
||||
Reference in New Issue
Block a user