Use yt-dlp by default instead of youtube-dl (#85953)

## About The Pull Request

This replaces references to youtube-dl in the config, pre-compile
script, and error messages with yt-dlp.

also wow yt-dlp seems like gibberish after seeing it so much lol

## Why It's Good For The Game

yt-dlp is more reliable and updated more frequently than youtube-dl, and
works as a drop-in replacement for the purposes of Play-Internet-Sound.

## Changelog

No player-facing changes
This commit is contained in:
Lucy
2024-08-19 13:09:40 +02:00
committed by GitHub
parent f2e93b63b1
commit 368ca25e6b
3 changed files with 18 additions and 18 deletions
+4 -4
View File
@@ -54,13 +54,13 @@ ADMIN_VERB(play_direct_mob_sound, R_SOUND, "Play Direct Mob Sound", "Play a soun
SEND_SOUND(target, sound)
BLACKBOX_LOG_ADMIN_VERB("Play Direct Mob Sound")
///Takes an input from either proc/play_web_sound or the request manager and runs it through youtube-dl and prompts the user before playing it to the server.
///Takes an input from either proc/play_web_sound or the request manager and runs it through yt-dlp and prompts the user before playing it to the server.
/proc/web_sound(mob/user, input, credit)
if(!check_rights(R_SOUND))
return
var/ytdl = CONFIG_GET(string/invoke_youtubedl)
if(!ytdl)
to_chat(user, span_boldwarning("Youtube-dl was not configured, action unavailable"), confidential = TRUE) //Check config.txt for the INVOKE_YOUTUBEDL value
to_chat(user, span_boldwarning("yt-dlp was not configured, action unavailable"), confidential = TRUE) //Check config.txt for the INVOKE_YOUTUBEDL value
return
var/web_sound_url = ""
var/stop_web_sounds = FALSE
@@ -73,14 +73,14 @@ ADMIN_VERB(play_direct_mob_sound, R_SOUND, "Play Direct Mob Sound", "Play a soun
var/stdout = output[SHELLEO_STDOUT]
var/stderr = output[SHELLEO_STDERR]
if(errorlevel)
to_chat(user, span_boldwarning("Youtube-dl URL retrieval FAILED:"), confidential = TRUE)
to_chat(user, span_boldwarning("yt-dlp URL retrieval FAILED:"), confidential = TRUE)
to_chat(user, span_warning("[stderr]"), confidential = TRUE)
return
var/list/data
try
data = json_decode(stdout)
catch(var/exception/e)
to_chat(user, span_boldwarning("Youtube-dl JSON parsing FAILED:"), confidential = TRUE)
to_chat(user, span_boldwarning("yt-dlp JSON parsing FAILED:"), confidential = TRUE)
to_chat(user, span_warning("[e]: [stdout]"), confidential = TRUE)
return
if (data["url"])