Skip to content

Commit be8f7c8

Browse files
committed
Temporarily rewrite tce script URLs
1 parent b0baeae commit be8f7c8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

common/src/main/java/dev/lavalink/youtube/cipher/SignatureCipherManager.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,13 @@ private CachedPlayerScript getPlayerScript(@NotNull HttpInterface httpInterface)
174174
throw throwWithDebugInfo(log, null, "no jsUrl found", "html", responseText);
175175
}
176176

177+
if (scriptUrl.contains("/player_ias_tce.vflset/")) {
178+
// TODO: tce player scripts need proper support
179+
// see https://github.com/yt-dlp/yt-dlp/issues/12398
180+
log.debug("jsUrl URL points to tce-variant player script, rewriting to non-tce.");
181+
scriptUrl = scriptUrl.replace("/player_ias_tce.vflset/", "/player_ias.vflset/");
182+
}
183+
177184
return (cachedPlayerScript = new CachedPlayerScript(scriptUrl));
178185
} catch (IOException e) {
179186
throw ExceptionTools.toRuntimeException(e);

0 commit comments

Comments
 (0)