5867 Commits

Author SHA1 Message Date
Émilien (perso)
86482172c9
Merge 8864b41b0f4d19b3c90c049954033f3f4e54237e into 59bb97cdc3011b37cbcd9e85f2f708f009978893 2026-07-24 03:16:38 +00:00
Emilien
59bb97cdc3 chore: put back -dev in shards.yml 2026-07-23 23:10:25 +02:00
github-actions[bot]
5953859e29
Release v2.20260723.0 (#5824)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v2.20260723.0
2026-07-23 23:08:02 +02:00
Émilien (perso)
5510657e80
feat: add release script + trigger from github action (#5823) 2026-07-23 23:02:46 +02:00
gabe4278
adfec7646b
Hotfix - Fix YouTube change(#5818)
Co-authored-by: TheFrenchGhosty <47571719+TheFrenchGhosty@users.noreply.github.com>
2026-07-23 06:04:24 +02:00
bunchy7ss
30c0656a93
Hotfix - Fix YouTube change (#5819)
Credit to https://git.miningtcup.me/MiningTcup
2026-07-23 05:57:07 +02:00
Fijxu
e5bde4bc60
chore: update openssl to 3.6.3 in OCI (#5808) 2026-07-14 02:38:21 -04:00
dependabot[bot]
c84acc10ad
chore(deps): bump int128/docker-manifest-create-action (#5807)
Bumps [int128/docker-manifest-create-action](https://github.com/int128/docker-manifest-create-action) from 2.22.0 to 2.25.0.
- [Release notes](https://github.com/int128/docker-manifest-create-action/releases)
- [Commits](https://github.com/int128/docker-manifest-create-action/compare/v2.22.0...v2.25.0)

---
updated-dependencies:
- dependency-name: int128/docker-manifest-create-action
  dependency-version: 2.25.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-13 22:46:19 -04:00
TheFrenchGhosty
029a496578
Various enhancements and rewording to the issues/PRs templates (#5804)
* Various enhancements and rewording to the issues/PRs templates

* Remove the "explain how" from the checkboxes since the explanation is
below

* Make the checkbox valid markdown so that they don't appear as text next
to the rendered checked one

* Add comma to make the sentences flow better

* Consistency
2026-07-12 09:29:21 +02:00
TheFrenchGhosty
1111ea7294
Add a field for AI policy compliance in the issues/PRs templates (#5803)
* Convert issue templates to Issue Forms with AI policy disclosure

Convert the 3 markdown issue templates (.md) to GitHub Issue Forms (.yml)
to enable interactive form elements, and add an AI disclosure section per
the AI Policy (AI_POLICY.md):

- Required checkbox to acknowledge having read the AI Policy
- Required dropdown for AI usage (none / fully / partially with explanation)
- Optional input for model(s) used (open-weight examples in placeholder)
- Optional input for tool(s) used (FOSS examples in placeholder)
- Optional textarea to explain how AI was used (for the partial option)

The existing template content and structure is preserved, only converted
from markdown to the Issue Forms schema.

* Align pull request template with AI policy disclosure

Update the pull request template to match the AI disclosure standards
introduced in the issue templates:

- Use relative link to AI_POLICY.md instead of absolute GitHub URL
- Update dropdown wording to match issue forms
- Use open-weight models in placeholder examples
- Use FOSS tools in placeholder examples
- Add 'How was AI used?' section for the partial-usage explanation

* Fix assignees field type in issue templates

Use an empty array instead of an empty string for the assignees field,
as required by the GitHub Issue Forms schema.

* Enhance the PR template

* Reword the issue templates to be consistent with the PR template

* Enhance the PR template

* Typo coming from the original template

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Better wording for what comes from the original templates

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Switch to full URLs since relative URL break inconsistently

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-11 11:34:32 +02:00
absidue
9e8d102c94
Fix videos being incorrectly labelled as isUpcoming = true (#5800) 2026-07-11 07:33:23 +02:00
dependabot[bot]
6373ac7814
chore(deps): bump 84codes/crystal in /docker (#5797)
Bumps 84codes/crystal from 1.20.2-alpine to 1.20.3-alpine.

---
updated-dependencies:
- dependency-name: 84codes/crystal
  dependency-version: 1.20.3-alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-07 16:39:57 +02:00
TheFrenchGhosty
31ecdd85f9
Create AI_POLICY.md (#5791)
* Create AI_POLICY.md

* Add some more

* Typo

* Update AI_POLICY.md

Co-authored-by: Émilien (perso) <4016501+unixfox@users.noreply.github.com>

* Various minor enhancements

* Various small rewording

* Add a line about it being mostly done by the maintainers

---------

Co-authored-by: Émilien (perso) <4016501+unixfox@users.noreply.github.com>
2026-07-04 08:20:07 +02:00
Fijxu
9c62c8b660
Add option to disable easy to abuse API endpoints (#5630)
* Add option to disable easy to abuse API endpoints

The API endpoints that will be disabled when this option are:
 - /api/v1/videos
 - /api/v1/clips
 - /api/v1/transcripts

There is still API endponts that need some sort of validation or
connection/proxying to Invidious companion like
`/api/v1/captions` and `/api/v1/storyboards` since they also do a video
request to Invidious companion. I'm not sure if the `/next` API endpoint
could be used to gather that type of information, if so, that would be
better.

Closes #5599

* Rename configuration variable, add additional comment for the option
2026-06-30 11:55:47 +02:00
unrealtournament
d61dd7205c
[RefreshChannelsJob] Reduce backoff if no errors occur (#5759)
* [RefreshChannelsJob] Reduce backoff if no errors occur

* Change log level for backoff decrease
2026-06-30 10:29:03 +02:00
Émilien (perso)
77ad41678b
fix: security issue playlist deletion cross user (#5790)
fixes #5777
2026-06-30 10:28:51 +02:00
Fijxu
ab099e46cf
chore: update User-Agent header for Youtube requests (#5794) 2026-06-30 10:28:26 +02:00
dependabot[bot]
fe2b6dbd67
chore(deps): bump actions/cache from 5 to 6 (#5793)
Bumps [actions/cache](https://github.com/actions/cache) from 5 to 6.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-29 17:26:26 -04:00
Emilien
efb9269e58 Prepare for next release 2026-06-27 21:38:06 +02:00
Émilien (perso)
ad0bd9289f
Release v2.20260626.0 (#5787)
* Release v2.20260626.0

* chore: improve changelog x1

Co-authored-by: Fijxu <fijxu@nadeko.net>

* chore: apply second suggestion

Co-authored-by: Fijxu <fijxu@nadeko.net>

---------

Co-authored-by: Fijxu <fijxu@nadeko.net>
v2.20260626.0
2026-06-27 21:34:03 +02:00
Emilien
8864b41b0f Harden /next fallback: fix null subreason, escaping, caching
Review fixes on top of the rebased /next-fallback work:

- Fix TypeCastError when subreason is stored as JSON null: accessors use
  as_s?, and error returns go through a helper that omits nil subreason.
- Restore graceful no-companion path by reverting player() to return nil,
  and drop the now-dead info.nil? branch in fetch_video.
- Re-enable video caching when Invidious Companion is not configured.
- Detect genuinely unavailable videos via playabilityStatus == "ERROR"
  instead of the localized "Video unavailable" string.
- HTML-escape reason/subreason coming from YouTube to avoid HTML injection,
  and guard against a missing "runs" key.
- Tidy published-date fallback and add a regression test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 18:35:51 +02:00
Emilien
24182a28d5 Fix live_now detection to not override false with nil via ||=
||= with false then nil resets live_now to nil in Crystal.
Use explicit nil checks instead to preserve false values from
microformat.isLiveNow for scheduled streams.
2026-06-26 18:08:58 +02:00
Emilien
b80ac061b9 Apply remaining review feedback from PR #5237
- Simplify has_unlisted_badge? to one-liner with any? + dig?
- Add video_primary_renderer fallback for live_now detection
- Simplify early return condition (playability_status != 'UNPLAYABLE')
2026-06-26 18:02:41 +02:00
Emilien
c5eb4cee9d Add mock and test for video without videoDetails
- New mock: no-videodetails.player.json (player response without videoDetails)
- Test verifies fallback extraction from videoPrimaryInfoRenderer,
  videoSecondaryInfoRenderer, and videoOwnerRenderer when
  videoDetails is missing from the player response
2026-06-26 17:58:11 +02:00
Emilien
c3f16be5c4 Move error message and action links before video title
Error reason, subreason, and 'After which you should try to' links
now appear above the <h1> title, making them the first thing users
see when a video fails to play.
2026-06-26 17:51:13 +02:00
Emilien
9ae7bb4ff6 Fix missing channel name when falling back to /next-only data
Use extract_text() for author name from videoOwnerRenderer,
which handles both 'simpleText' and 'runs' formats.
2026-06-26 17:42:29 +02:00
Emilien
65e58e083c Skip caching entirely when Invidious Companion is not configured
When companion is absent, videos are always fetched fresh since they
lack streaming data. Caching is only enabled when companion is present.
2026-06-26 17:39:28 +02:00
Emilien
77259ad42c Add companion setup docs link for admins 2026-06-26 17:38:58 +02:00
Emilien
f86bddd8b8 Make watch page work without Invidious Companion
- player endpoint now uses direct _post_json when companion is absent
- When player endpoint fails, fall back to /next-only data extraction
- Watch page renders with title, description, comments from /next
- Set reason when companion unavailable for graceful error display
- Handle not-found videos correctly with 404 redirect
- Disabled companion in config for dev testing
2026-06-26 17:32:47 +02:00
Emilien
d4a5593ab9 Fix indentation for crystal format compliance 2026-06-26 17:10:49 +02:00
Emilien
537c7a86ce Fix duplicate error reason display on watch page
- Keep error message only in player container placeholder (like YouTube does)
- Show only error_redirect_helper links below the title, no duplicate text
- Fixes visual duplication reported during review
2026-06-26 17:04:35 +02:00
Emilien
842b12a551 Rebase onto master: graceful fallback to /next endpoint for major watch page data
- Display watch page even when player endpoint fails, using data from /next
- Show error message in player container placeholder (like YouTube does)
- Extract title, description, views, likes, comments etc. from /next
- Handle missing videoDetails gracefully with fallback to renderer data
- Fix is_listed detection from video badges when videoDetails unavailable
- Add subreason display for better error messages
- Add has_unlisted_badge? helper function
- Bump SCHEMA_VERSION to 4
- Integrate embed page with the same error handling
- Guard against empty streams when video has errors
- Fix JSON::Any.new(nil) crash for shortDescription
- Add locale key: error_from_youtube_unplayable

PR TODO status:
[x] Integrate the embed page with the changes
[x] Display the subreason on the watch page when there is an error
[x] Fix description (nil safety)
[ ] Add mocks for a video without videoDetails
2026-06-26 16:58:11 +02:00
Fijxu
08f862292a
fix: fix playlists not showing any videos due to outdated playlist parsing (#5774)
* TODO, CHANGE COMMIT MESSAGE WHEN DONE

* save

* fix: fix playlists videos parsing

* revert text

* do not shadow outer item variable
2026-06-24 23:54:34 -04:00
dependabot[bot]
73a1bacea8
chore(deps): bump alpine from 3.23 to 3.24 in /docker (#5778)
Bumps alpine from 3.23 to 3.24.

---
updated-dependencies:
- dependency-name: alpine
  dependency-version: '3.24'
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-15 22:59:52 +02:00
Fijxu
c435dc1204
fix: fix private invidious playlists on rss feeds from being fetched without authentication (#5776) 2026-06-14 22:31:22 -04:00
Jan Moesen
6dec63a3e5
Use “www.youtube.com” consistently (#5768)
Saves an unnecessary redirect by using `www.youtube.com` on some parts of Invidious where `youtube.com` was used instead. youtube.com will redirect to www.youtube.com anyways.

Co-authored-by: janmoesen <@>
2026-06-09 16:25:27 -04:00
dependabot[bot]
067260a4ab
chore(deps): bump int128/docker-manifest-create-action (#5766)
Bumps [int128/docker-manifest-create-action](https://github.com/int128/docker-manifest-create-action) from 2.21.0 to 2.22.0.
- [Release notes](https://github.com/int128/docker-manifest-create-action/releases)
- [Commits](https://github.com/int128/docker-manifest-create-action/compare/v2.21.0...v2.22.0)

---
updated-dependencies:
- dependency-name: int128/docker-manifest-create-action
  dependency-version: 2.22.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-09 15:29:59 -04:00
Fijxu
6b21daab56 Revert "Fix: Restore whitespace formatting while keeping disable_abusable_api configuration"
This reverts commit 8f279745db982959984e5953044ea4fa5f521ff3.
2026-06-04 20:22:00 -04:00
Fijxu
8f279745db Fix: Restore whitespace formatting while keeping disable_abusable_api configuration 2026-06-04 20:20:14 -04:00
Fijxu
98f4f118b2
Add support for alternative domains for Invidious cookies (#5647)
* Add support for alternative domains for Invidious cookies

* check if @@secure is already true before changing it's value

* Add alternative_domains config option example
2026-06-04 19:59:32 -04:00
Fijxu
85534a988d
Only include '&' if params are present (#5646) 2026-06-03 18:18:57 -04:00
Fijxu
0e0ee40cb6
Dockerfile: Switch to 84codes crystal compiler container image (#5473)
Closes https://github.com/iv-org/invidious/issues/5456

The 84codes Crystal container image builds libgc (bdwgc) with `--enable-large-config`: b321bb4358/alpine/Dockerfile (L13-L22)
2026-05-30 17:58:49 -04:00
Fijxu
e96ad036ca
fix: Do not append query params quality=medium to videos that are about to premiere (#5755)
* fix: Do not append query params `quality=medium` to videos that are about to premiere

Video premieres do not have `audio_streams` and they aren't `video.live_now == true` either,
therefore we skip the checks that are made for older videos (`if audio_streams.empty? && !video.live_now` closure)
if the video is a premiere.

This commit also adds the `microformat` field to the `info` instance
variable of the `Video` struct, since it's needed for the function
`Video#premiere_timestamp : Time?`. This is more like a quick fix than a
proper fix because in `Invidious::Videos::Parser#parse_video_info`,
`premiere_timestamp` is gathered from the `microformat` JSON Object but
is used to set the `published` hash key for the `params` variable.

The parsers and structs really need a rework :/

* Revert "fix: Do not append query params `quality=medium` to videos that are about to premiere"

This reverts commit 5cfc8dace82590ea6a41c849c9c39b1b7ba95fe7.

* chore: build premiere_timestamp using video_type and published time
2026-05-30 15:49:21 -04:00
Fijxu
1a5a71b086
Fix Youtube and Invidious links not rewinding their time when video timestamp is rewinded (#5601)
Revert "Fix Youtube and Invidious links not rewinding their time when video timestamp is rewinded"

This reverts commit c3ee8a5d90df83d6e53b78b6d6e9669729b391aa.
2026-05-29 23:54:08 -04:00
Fijxu
3a35552a66
fix: fix wrong call to I18n.translate() function 2026-05-29 23:51:34 -04:00
Fijxu
8ef5ea03d4
feat: Add support for POST requests on searches for privacy (#5551)
Use already set preferences variable

Use span for description, grammar fix from Copilot
2026-05-29 23:48:11 -04:00
shiny-comic
86c425b43f
Fix disappearing end of the comments with emoji (#5587)
Previous code use UTF-8 to count characters however Emojis are UTF-16 units.
This difference leads to misalignment of index offsets.

Co-authored-by: shiny-comic <shiny-comic@winPC>
2026-05-28 16:51:06 -04:00
Fijxu
4ae227ce91
Encapsulate videos parser and clip functions inside it's own Invidious::Videos::Parser and Invidious::Videos::Clip module (#5745)
Part of https://github.com/iv-org/invidious/issues/5744
2026-05-28 13:11:41 -04:00
Fijxu
8b183caa2a
fix: fix author verification in channels (#5751)
* fix author verification in channels

Fixes https://github.com/iv-org/invidious/issues/5730

Author verification badge is not longer located in
`c4TabbedHeaderRenderer`. It may be deprecated.

* Also detect AUDIO_BADGE for verified author
2026-05-28 13:10:58 -04:00
Fijxu
edb3a0fc36
Add support for /pl_c and /tvfilm_banner paths (thumbnails used in some playlists) (#5742)
* feat: add support for /pl_c/ images

This path can be found on Podcast images.

* add support for /pl_c and /tvfilm_banner paths

* add support for /pl_c and /tvfilm_banner paths 2

* remove leftover comment
2026-05-26 18:13:51 -04:00