Update to innertube v17

This commit is contained in:
WardPearce
2026-03-17 10:54:56 +13:00
parent 9791fcb897
commit 20efbe0216
8 changed files with 39 additions and 25 deletions
+11 -11
View File
@@ -1,12 +1,12 @@
{
"name": "Materialious",
"version": "1.16.19",
"version": "1.16.21",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "Materialious",
"version": "1.16.19",
"version": "1.16.21",
"license": "MIT",
"dependencies": {
"@capacitor-community/electron": "^5.0.0",
@@ -197,9 +197,9 @@
}
},
"node_modules/@capacitor/cli/node_modules/tar": {
"version": "7.5.7",
"resolved": "https://registry.npmjs.org/tar/-/tar-7.5.7.tgz",
"integrity": "sha512-fov56fJiRuThVFXD6o6/Q354S7pnWMJIVlDBYijsTNx6jKSE4pvrDTs6lUnmGvNyfJwFQQwWy3owKz1ucIhveQ==",
"version": "7.5.11",
"resolved": "https://registry.npmjs.org/tar/-/tar-7.5.11.tgz",
"integrity": "sha512-ChjMH33/KetonMTAtpYdgUFr0tbz69Fp2v7zWxQfYZX4g5ZN2nOBXm1R2xyA+lMIKrLKIoKAwFj93jE/avX9cQ==",
"license": "BlueOak-1.0.0",
"dependencies": {
"@isaacs/fs-minipass": "^4.0.0",
@@ -926,9 +926,9 @@
}
},
"node_modules/@electron/rebuild/node_modules/tar": {
"version": "7.5.9",
"resolved": "https://registry.npmjs.org/tar/-/tar-7.5.9.tgz",
"integrity": "sha512-BTLcK0xsDh2+PUe9F6c2TlRp4zOOBMTkoQHQIWSIzI0R7KG46uEwq4OPk2W7bZcprBMsuaeFsqwYr7pjh6CuHg==",
"version": "7.5.11",
"resolved": "https://registry.npmjs.org/tar/-/tar-7.5.11.tgz",
"integrity": "sha512-ChjMH33/KetonMTAtpYdgUFr0tbz69Fp2v7zWxQfYZX4g5ZN2nOBXm1R2xyA+lMIKrLKIoKAwFj93jE/avX9cQ==",
"dev": true,
"license": "BlueOak-1.0.0",
"dependencies": {
@@ -1964,9 +1964,9 @@
}
},
"node_modules/app-builder-lib/node_modules/tar": {
"version": "7.5.9",
"resolved": "https://registry.npmjs.org/tar/-/tar-7.5.9.tgz",
"integrity": "sha512-BTLcK0xsDh2+PUe9F6c2TlRp4zOOBMTkoQHQIWSIzI0R7KG46uEwq4OPk2W7bZcprBMsuaeFsqwYr7pjh6CuHg==",
"version": "7.5.11",
"resolved": "https://registry.npmjs.org/tar/-/tar-7.5.11.tgz",
"integrity": "sha512-ChjMH33/KetonMTAtpYdgUFr0tbz69Fp2v7zWxQfYZX4g5ZN2nOBXm1R2xyA+lMIKrLKIoKAwFj93jE/avX9cQ==",
"dev": true,
"license": "BlueOak-1.0.0",
"dependencies": {
+6 -6
View File
@@ -1,12 +1,12 @@
{
"name": "materialious",
"version": "1.16.20",
"version": "1.16.21",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "materialious",
"version": "1.16.20",
"version": "1.16.21",
"hasInstallScript": true,
"dependencies": {
"@capacitor-community/electron": "^5.0.1",
@@ -59,7 +59,7 @@
"svelte-infinite-loading": "^1.4.0",
"tldts": "^7.0.24",
"trystero": "^0.22.0",
"youtubei.js": "^16.0.1",
"youtubei.js": "^17.0.1",
"zod": "^4.3.6"
},
"devDependencies": {
@@ -19574,9 +19574,9 @@
}
},
"node_modules/youtubei.js": {
"version": "16.0.1",
"resolved": "https://registry.npmjs.org/youtubei.js/-/youtubei.js-16.0.1.tgz",
"integrity": "sha512-3802bCAGkBc2/G5WUTc0l/bO5mPYJbQAHL04d9hE9PnrDHoBUT8MN721Yqt4RCNncAXdHcfee9VdJy3Fhq1r5g==",
"version": "17.0.1",
"resolved": "https://registry.npmjs.org/youtubei.js/-/youtubei.js-17.0.1.tgz",
"integrity": "sha512-1lO4b8UqMDzE0oh2qEGzbBOd4UYRdxn/4PdpRM7BGTHxM6ddsEsKZTu90jp8V9FHVgC2h1UirQyqoqLiKwl+Zg==",
"funding": [
"https://github.com/sponsors/LuanRT"
],
+2 -2
View File
@@ -98,7 +98,7 @@
"svelte-infinite-loading": "^1.4.0",
"tldts": "^7.0.24",
"trystero": "^0.22.0",
"youtubei.js": "^16.0.1",
"youtubei.js": "^17.0.1",
"zod": "^4.3.6"
}
}
}
+1 -1
View File
@@ -4,7 +4,7 @@ export interface SearchOptions {
sort_by?: 'relevance' | 'rating' | 'upload_date' | 'view_count';
type?: 'video' | 'playlist' | 'channel' | 'all';
duration?: 'short' | 'medium' | 'long';
date?: 'hour' | 'today' | 'week' | 'month' | 'year';
date?: 'today' | 'week' | 'month' | 'year';
features?: string;
page?: string;
}
+1 -1
View File
@@ -14,7 +14,7 @@ export async function getInnertube(): Promise<Innertube> {
cache: new UniversalCache(true),
location: get(interfaceRegionStore),
user_agent: USER_AGENT,
player_id: getPublicEnv('PLAYER_ID') ?? '9f4cc5e4'
player_id: getPublicEnv('PLAYER_ID')
});
return innertube;
+16 -2
View File
@@ -33,9 +33,23 @@ export async function getSearchYTjs(
): Promise<SearchResults> {
const innertube = await getInnertube();
let duration: Types.Duration = 'all';
switch (options.duration) {
case 'long':
duration = 'over_twenty_mins';
break;
case 'medium':
duration = 'three_to_twenty_mins';
break;
case 'short':
duration = 'under_three_mins';
break;
}
const innerResults = await innertube.search(search, {
sort_by: options.sort_by,
duration: options.duration,
prioritize: options.sort_by !== 'relevance' ? 'popularity' : 'relevance',
duration: duration,
features: [options.features] as Types.Feature[],
upload_date: options.date
});
@@ -30,7 +30,7 @@
key: 'type'
},
{
options: ['hour', 'today', 'week', 'month', 'year'],
options: ['today', 'week', 'month', 'year'],
title: $_('filters.uploadDate'),
key: 'date'
},
File diff suppressed because one or more lines are too long