fix(YouTube - Client spoof): Restore clipping videos functionality

This commit is contained in:
oSumAtrIX 2023-09-25 16:33:06 +02:00
parent 978f630c02
commit 2cd1738d24
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -51,6 +51,13 @@ public class SpoofSignaturePatch {
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;