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:
+4
-2
@@ -51,7 +51,7 @@ static gboolean gst_bus_call(GstBus* bus, GstMessage* message, gpointer data) {
|
||||
gchar* debug;
|
||||
GError* error;
|
||||
gst_message_parse_error(message, &error, &debug);
|
||||
printf("Gstreamer Error: %s\n", error);
|
||||
printf("Gstreamer Error: %s\n", error->message);
|
||||
g_error_free(error);
|
||||
g_free(debug);
|
||||
break;
|
||||
@@ -150,7 +150,9 @@ void* OSSPlayer_ThrdInit(void*) {
|
||||
discordrpc->songLength = songStruct->duration;
|
||||
discordrpc->songTitle = strdup(songStruct->title);
|
||||
discordrpc->songArtist = strdup(songStruct->artist);
|
||||
//discordrpc->coverArtUrl = strdup(coverart_url->formedUrl);
|
||||
if (configObj->discordrpc_showCoverArt) {
|
||||
discordrpc->coverArtUrl = strdup(coverart_url->formedUrl);
|
||||
}
|
||||
discordrpc_update(&discordrpc);
|
||||
discordrpc_struct_deinit(&discordrpc);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user