diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm index 90508d6dd18..48bdb054b46 100644 --- a/code/modules/admin/verbs/playsound.dm +++ b/code/modules/admin/verbs/playsound.dm @@ -140,11 +140,13 @@ USER_VERB(play_sound_tgchat, R_SOUNDS, "Play Global Sound", "Play a sound to be // Making these empty dicts overrides the default on the YTDLP server where it tries to parse with invalid args request_body["opts"] = alist() request_body["opts"]["extractor_args"] = alist() + // Needs to be application/json for flask to understand that this is infact, JSON + var/list/req_headers = list("Content-Type" = "application/json") // Send the request off var/datum/http_request/media_poll_request = new() // The fact we are using GET with a body offends me - media_poll_request.prepare(RUSTLIBS_HTTP_METHOD_GET, GLOB.configuration.system.ytdlp_url, json_encode(request_body)) + media_poll_request.prepare(RUSTLIBS_HTTP_METHOD_GET, GLOB.configuration.system.ytdlp_url, json_encode(request_body), req_headers) // Start it off and wait media_poll_request.begin_async() UNTIL(media_poll_request.is_complete())