Skip to content

Commit

Permalink
fix(YouTube - Client spoof): Allow playback for links with timestamp (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
YT-Advanced committed Mar 4, 2024
1 parent 36aa6c9 commit eee3f35
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -90,15 +90,15 @@ public static String spoofParameter(String parameters, boolean isShortAndOpening
try {
Logger.printDebug(() -> "Original protobuf parameter value: " + parameters);

if (!Settings.SPOOF_SIGNATURE.get()) {
if (parameters == null || !Settings.SPOOF_SIGNATURE.get()) {
return parameters;
}

// Clip's player parameters contain a lot of information (e.g. video start and end time or whether it loops)
// For this reason, the player parameters of a clip are usually very long (150~300 characters).
// Clips are 60 seconds or less in length, so no spoofing.
//noinspection AssignmentUsedAsCondition
if (useOriginalStoryboardRenderer = parameters.length() > 150 || containsAny(parameters, CLIPS_PARAMETERS)) {
if (useOriginalStoryboardRenderer = parameters.length() > 150 || parameters.startsWith(CLIPS_PARAMETERS)) {
return parameters;
}

Expand Down

0 comments on commit eee3f35

Please sign in to comment.