Skip to content

Commit 9e0acd5

Browse files
committed
api/youtube/hack: do not compress players
* this broke with that pr and silently increased cpu & memory usage
1 parent 369f83a commit 9e0acd5

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,10 @@
33
"packageManager": "pnpm@9.6.0",
44
"engines": {
55
"pnpm": ">=9"
6+
},
7+
"pnpm": {
8+
"patchedDependencies": {
9+
"youtubei.js@16.0.1": "patches/youtubei.js@16.0.1.patch"
10+
}
611
}
712
}

patches/youtubei.js@16.0.1.patch

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
diff --git a/dist/src/utils/LZW.js b/dist/src/utils/LZW.js
2+
index 11ac7b9587c14d040d79b4e549cb27a59b818c29..907693df8cc40e605a88c5864e3ad144ae723e3c 100644
3+
--- a/dist/src/utils/LZW.js
4+
+++ b/dist/src/utils/LZW.js
5+
@@ -3,6 +3,7 @@
6+
* @param input - The data to compress.
7+
*/
8+
export function compress(input) {
9+
+ return input;
10+
const output = [];
11+
const dictionary = {};
12+
for (let i = 0; i < 256; i++) {
13+
@@ -32,6 +33,7 @@ export function compress(input) {
14+
* @param input - The data to be decompressed.
15+
*/
16+
export function decompress(input) {
17+
+ return input;
18+
const dictionary = {};
19+
const input_data = input.split('');
20+
const output = [input_data.shift()];

pnpm-lock.yaml

Lines changed: 7 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)