From c15cb2b950ccf5701e9faedce075c437ac2f209b Mon Sep 17 00:00:00 2001 From: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Date: Wed, 12 Aug 2026 23:19:23 +0000 Subject: [PATCH] Fixes YTDLP sounds - again (#32420) * Fixes a small issue with playing web sounds * Fixes play internet sound again --- code/modules/admin/verbs/playsound.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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())