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 <@>
* 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
* 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
Revert "Fix Youtube and Invidious links not rewinding their time when video timestamp is rewinded"
This reverts commit c3ee8a5d90df83d6e53b78b6d6e9669729b391aa.
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>
* 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
* 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
* fix: fix channel videos and playlists on searches
Channel videos are now encapsulated in a `lockupViewModel`.
There is 3 types of content that can be inside a `lockupViewModel`:
- LOCKUP_CONTENT_TYPE_VIDEO
- LOCKUP_CONTENT_TYPE_PLAYLIST
- LOCKUP_CONTENT_TYPE_PODCAST
This commit parses `LOCKUP_CONTENT_TYPE_VIDEO`, `LOCKUP_CONTENT_TYPE_PLAYLIST`, `LOCKUP_CONTENT_TYPE_PODCAST` types
to fix videos in channels, playlists in channels, podcast in channels, and other parts of Invidious were playlists and videos are displayed.
* remove unused variable `author_verified`
* fix parsing for podcasts
For some reason, Podcasts contains an empty JSON Object that we have to
skip, therefore we just iterate metadataRows until finding metadataParts
since metadataRows will not always contain a single Object.
* fix length_seconds for channel videos
* fix playlists parsing for playlists without metadataParts
On some channels like MrBeast, metadataParts is absent, missing the
author information, this is intended behaviour by Youtube since there is
no author information attached to them.
Example URL: https://www.youtube.com/channel/UCX6OQ3DkcsbYNE6H8uQQuVA/playlists
* restore author_verified functionality
* more robust metadata_parts parsing
Videos that have two or more authors (in collaborations), have their
author information in JSON Objects inside metadataParts, alongside with
their view count and their published date, therefore, we need to iterate
the metadataParts array and do some filtering based on the content of
each JSON Object to find the view count and published date for some
videos.
Example:
```json
"metadataParts": [
{
"text": {
"content": "Veritasium"
},
"icon": {
"name": "CHECK_CIRCLE_FILLED",
"height": 14,
"width": 14,
"accessibilityLabel": "Verified"
}
},
{
"text": {
"content": "and Linus Tech Tips"
},
"icon": {
"name": "CHECK_CIRCLE_FILLED",
"height": 14,
"width": 14,
"accessibilityLabel": "Verified"
}
},
{
"text": {
"content": "10M"
},
"accessibilityLabel": "10 million views"
},
{
"text": {
"content": "1y ago"
}
}
]
```
* improve playlist metadataRows and metadataParts parsing for channel playlists
* apply ameba suggestion
* Also parse lessons for playlists that are a course
Alpine 3.22 split the libgmp static archive out of gmp-dev into a
separate gmp-static subpackage. Without it, 'crystal build --static'
fails with 'ld: cannot find -lgmp ... have you installed the static
version of the gmp library'. Verified by inspecting the contents of
gmp-dev on crystallang/crystal:1.20.2-alpine (only .so present, no
.a).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
crystallang/crystal:1.20.2-alpine no longer ships libgmp.a, breaking
the static link step (ld: cannot find -lgmp). Adding gmp-dev pulls
in both headers and the static archive needed by Crystal's BigInt
support.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Upstream commit bc64cd9b moved translate / LOCALES into module I18n
(with extend self). The oidc-support branch added new call sites in
login.cr / login.ecr that used the old top-level names; the merge
auto-resolved textually but left the compiler with three undefined
references.
Wrap the new call sites the same way the rest of the codebase already
does: 'I18n.translate(...)' for views and 'I18n::LOCALES' for the
constant.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pushes 'latest' and an immutable UTC timestamp tag to
gitea.alexandru.macocian.me/amacocian/invidious on every push to master.
Uses docker/Dockerfile (the amd64 image; arm64 variant is unused in
the fleet for now).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Build and release container directly from master / release (docker/Dockerfile.arm64, ARM64, ubuntu-24.04-arm, linux/arm64/v8, -arm64) (push) Has been cancelled
* CI: Unify ARM64 and AMD64 Dockerfiles
* chore: remove replacement of Dockerfile in docker-compose.yml for ci.yml build-docker job
* Combine images into manifest list
* fix wrong tag for nightly container release
* forgot this ^^'
When switching between Listen and Watching the timestamp in the url of
the listen of watch button is now updated automatically.
This means if you switch between listening and viewing you keep in sync
with time.