Skip to content

Commit

Permalink
fix(YouTube - Client spoof): Restore clipping videos functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Sep 25, 2023
1 parent 978f630 commit 2cd1738
Showing 1 changed file with 7 additions and 0 deletions.
Expand Up @@ -51,6 +51,13 @@ public static String spoofParameter(String parameters) {

if (!SettingsEnum.SPOOF_SIGNATURE.getBoolean()) 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.
var isClip = parameters.length() > 150;
if (isClip) return parameters;


// Shorts do not need to be spoofed.
//noinspection AssignmentUsedAsCondition
if (isPlayingShorts = parameters.startsWith(SHORTS_PLAYER_PARAMETERS)) return parameters;
Expand Down

0 comments on commit 2cd1738

Please sign in to comment.