diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index ee3d757b..196c4190 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -48,10 +48,10 @@ jobs: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Build and push Docker image - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: . - platforms: linux/amd64,linux/arm64,linux/arm/v7 + platforms: linux/amd64 push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/package-lock.json b/package-lock.json index 87e11661..6afe977b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,7 @@ "set-cookie-parser": "2.6.0", "undici": "^5.19.1", "url-pattern": "1.0.3", - "youtubei.js": "^10.2.0" + "youtubei.js": "git://github.com/LuanRT/YouTube.js.git#04369be620e452ab3c4b2d14991fc55773995137" }, "engines": { "node": ">=18" @@ -1124,8 +1124,8 @@ }, "node_modules/youtubei.js": { "version": "10.2.0", - "resolved": "https://registry.npmjs.org/youtubei.js/-/youtubei.js-10.2.0.tgz", - "integrity": "sha512-JLKW9AHQ1qrTwBbre1aDkH8UJFmNcc4+kOSaVou5jSY7AzfFPFJK0yvX6afnLst0UVC9wfXHrLiNx93sutVErA==", + "resolved": "git+ssh://git@github.com/LuanRT/YouTube.js.git#04369be620e452ab3c4b2d14991fc55773995137", + "integrity": "sha512-rFjkH7A8ZvQRmCCxIj/AfWHIkEZTQI5N2VN2Oag77oEHF3HYKMNwQkHPVSDNR/qy61cJVvEoP5Azuk0GK7+VFQ==", "funding": [ "https://github.com/sponsors/LuanRT" ], diff --git a/package.json b/package.json index 58fdec83..5900a034 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "set-cookie-parser": "2.6.0", "undici": "^5.19.1", "url-pattern": "1.0.3", - "youtubei.js": "^10.2.0" + "youtubei.js": "git://github.com/LuanRT/YouTube.js.git#04369be620e452ab3c4b2d14991fc55773995137" }, "optionalDependencies": { "freebind": "^0.2.2" diff --git a/src/localization/languages/en.json b/src/localization/languages/en.json index 2b10f41d..8db4585b 100644 --- a/src/localization/languages/en.json +++ b/src/localization/languages/en.json @@ -160,6 +160,7 @@ "ErrorYTAgeRestrict": "this youtube video is age-restricted, so i can't see it. try another one!", "ErrorYTLogin": "couldn't get this youtube video because it requires an account to view.\n\nthis limitation is done by google to seemingly stop scraping, affecting all 3rd party tools and even their own clients.\n\ntry again, but if issue persists, {ContactLink}.", "ErrorYTRateLimit": "i got rate limited by youtube. try again in a few seconds, but if issue persists, {ContactLink}.", - "ErrorInvalidAcceptHeader": "invalid accept header" + "ErrorInvalidAcceptHeader": "invalid accept header", + "ErrorYoutubeDecipher": "youtube updated its decipher algorithm, so i can't get the video info. try again, but if it still doesn't work, please create an issue on github." } } diff --git a/src/modules/processing/services/youtube.js b/src/modules/processing/services/youtube.js index 5aa201ce..d3ee5602 100644 --- a/src/modules/processing/services/youtube.js +++ b/src/modules/processing/services/youtube.js @@ -50,7 +50,9 @@ const transformSessionData = (cookie) => { const cloneInnertube = async (customFetch) => { const innertube = await ytBase; if (innertube instanceof Error) { - throw innertube; + if (innertube?.message?.endsWith("decipher algorithm")) { + return { error: "ErrorYoutubeDecipher" } + } else throw innertube; } const session = new Session( @@ -101,6 +103,7 @@ export default async function(o) { dispatcher: o.dispatcher }) ); + if (yt.error) return yt; const quality = o.quality === "max" ? "9000" : o.quality;