Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump youtubei.js from 10.5.0 to 12.2.0 + Bump version number to from v022.0 to v0.22.1 + Fix incompatibility with upcoming YouTube.js version #6343

Merged
merged 4 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "freetube",
"productName": "FreeTube",
"description": "A private YouTube client",
"version": "0.22.0",
"version": "0.22.1",
"license": "AGPL-3.0-or-later",
"main": "./dist/main.js",
"private": true,
Expand Down Expand Up @@ -74,7 +74,7 @@
"vue-observe-visibility": "^1.0.0",
"vue-router": "^3.6.5",
"vuex": "^3.6.2",
"youtubei.js": "^10.5.0"
"youtubei.js": "^12.1.0"
},
"devDependencies": {
"@babel/core": "^7.25.8",
Expand Down
20 changes: 10 additions & 10 deletions src/renderer/helpers/api/local.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ClientType, Endpoints, Innertube, Misc, Parser, UniversalCache, Utils, YT } from 'youtubei.js'
import { ClientType, Innertube, Misc, Parser, UniversalCache, Utils, YT, YTNodes } from 'youtubei.js'

Check warning on line 1 in src/renderer/helpers/api/local.js

View workflow job for this annotation

GitHub Actions / lint

'YTNodes' is defined but never used
import Autolinker from 'autolinker'
import { SEARCH_CHAR_LIMIT } from '../../../constants'

Expand Down Expand Up @@ -379,12 +379,12 @@
const innertube = await createInnertube()

try {
const response = await innertube.actions.execute(Endpoints.BrowseEndpoint.PATH, Endpoints.BrowseEndpoint.build({
browse_id: id,
const response = await innertube.actions.execute('/browse', {
browseId: id,
params: 'EgZ2aWRlb3PyBgQKAjoA'
// protobuf for the videos tab (this is the one that YouTube uses,
// it has some empty fields in the protobuf but it doesn't work if you remove them)
}))
})

const videosTab = new YT.Channel(null, response)
const { id: channelId = id, name, thumbnailUrl } = parseLocalChannelHeader(videosTab, true)
Expand Down Expand Up @@ -436,12 +436,12 @@
const innertube = await createInnertube()

try {
const response = await innertube.actions.execute(Endpoints.BrowseEndpoint.PATH, Endpoints.BrowseEndpoint.build({
browse_id: id,
const response = await innertube.actions.execute('/browse', {
browseId: id,
params: 'EgdzdHJlYW1z8gYECgJ6AA%3D%3D'
// protobuf for the live tab (this is the one that YouTube uses,
// it has some empty fields in the protobuf but it doesn't work if you remove them)
}))
})

let liveStreamsTab = new YT.Channel(innertube.actions, response)
const { id: channelId = id, name, thumbnailUrl } = parseLocalChannelHeader(liveStreamsTab, true)
Expand Down Expand Up @@ -484,12 +484,12 @@
const innertube = await createInnertube()

try {
const response = await innertube.actions.execute(Endpoints.BrowseEndpoint.PATH, Endpoints.BrowseEndpoint.build({
browse_id: id,
const response = await innertube.actions.execute('/browse', {
browseId: id,
params: 'Egljb21tdW5pdHnyBgQKAkoA'
// protobuf for the community tab (this is the one that YouTube uses,
// it has some empty fields in the protobuf but it doesn't work if you remove them)
}))
})

const communityTab = new YT.Channel(null, response)

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9412,10 +9412,10 @@ yocto-queue@^1.0.0:
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.0.0.tgz#7f816433fb2cbc511ec8bf7d263c3b58a1a3c251"
integrity sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==

youtubei.js@^10.5.0:
version "10.5.0"
resolved "https://registry.yarnpkg.com/youtubei.js/-/youtubei.js-10.5.0.tgz#3cf0c79cf73fb26e13d167f37dec7d65419e91b8"
integrity sha512-iyA+VF28c15tCCKH9ExM2RKC3zYiHzA/eixGlJ3vERANkuI+xYKzAZ4vtOhmyqwrAddu88R/DkzEsmpph5NWjg==
youtubei.js@^12.1.0:
version "12.1.0"
resolved "https://registry.yarnpkg.com/youtubei.js/-/youtubei.js-12.1.0.tgz#46fd1911b11984e47d41d4cbebcc2a4fcf822036"
integrity sha512-42SUw7zPpx4b7+XBm9QW+//T2/tixBRoEjJAbfOLmGCiyGZuvfW+oq/IngnXo2Keu+yD7YVAfYFc/NaFjFDxGg==
dependencies:
"@bufbuild/protobuf" "^2.0.0"
jintr "^2.1.1"
Expand Down
Loading