Commit Graph

429 Commits

Author SHA1 Message Date
Émilien (perso)
70ff463cc6 Add invidious companion support (#4985)
* add support for invidious companion

* redirect latest_version and dash manifest to invidious companion

* fix Shadowing outer local variable `response`

* fixing condition for Content-Security-Policy

* throw error if inv_sig_helper and invidious_companion used same time

* Use sample instead of Random.rand

Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com>

* Remove debug puts functions

Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com>

* modify the description for config.example.yaml about invidious companion

* move config checks for invidious companion

* separate invidious_companion logic + better config.yaml config

* fixing "end" misplacement

* fix linting + use .empty?

* crystal handle decompression already by itself

* fix download function when invidious companion used

* fix linting

* invidious companion always used so always add CSP and redirect latest_version

* apply all the suggestions + rework invidious_companion parameter

* format watch.cr

* fix ameba Redundant use of `Object#to_s` in interpolation

* add ability for invidious companion to check request from invidious

* Better document private_url and public_url

* Better doc for invidious_companion_key

* !empty? to present?

* skip proxy for invidious companion

* fixing format

* missing ,

* add companion pooling http

* fix: don't use http proxy when sending requests to companion

* fix: logic where we want to have the invidious logic if companion is not used

* chore: remove baseurl usage from invidious companion

* chore: change from inv-sig-helper to companion for required playback

* fix: use puts + add warning for inv-sig-helper deprecated

---------

Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com>
2025-03-13 16:44:00 +01:00
syeopite
dbbcacc955 Images: fix typo in thumbnail logic 2025-02-26 14:13:58 -08:00
syeopite
58ad848d56 Channels: Support YouTube's change to from /community to /posts (#5183) 2025-02-26 14:13:22 -08:00
syeopite
9fbe3944b0 Channels: Add Courses to channel page and channel API (#5158)
Closes #5144
2025-02-26 14:08:44 -08:00
syeopite
c5e9447f41 Pick a different instance upon redirect (#5154)
The automatic instance redirection has the potential to pick
the same instance the user is currently on. This is especially
prevalent when the instance list is limited in number like how it is
today.

This PR checks the domain of the instance and ensures that it is not
the same as the current instane before redirecting the user to it.
Otherwise, it just sends the user to rediret.invidious.io
2025-02-26 14:05:21 -08:00
syeopite
3d77635a5c Add API endpoint for fetching transcripts from YouTube (#4788) 2025-02-26 13:56:39 -08:00
syeopite
4ea4878d1a User: Batch notifications together 2025-02-26 13:55:25 -08:00
syeopite
1f0a89fb5f RSS: Channel + Playlist improvements (#4298) 2025-02-26 13:55:01 -08:00
syeopite
d853b9f6dc Typo
Co-authored-by: Samantaz Fox <coding@samantaz.fr>
2025-02-18 14:46:18 -08:00
Fijxu
d70681538a Channels: Fix community tab 2025-02-18 19:20:55 -03:00
epicsam123
a77f083a0a remove ! on reject 2025-01-26 16:42:59 -05:00
ChunkyProgrammer
eaf47385c5 Add Courses to channel page and channel API 2025-01-25 14:43:39 -05:00
epicsam123
0fd480bae2 lint edits, refactor 2025-01-25 03:24:38 -05:00
epicsam123
afb0aad7d3 moved comments 2025-01-24 21:54:10 -05:00
epicsam123
6816ded0fa add missing end statement 2025-01-23 22:17:46 -05:00
epicsam123
0546a73bfa Pick a different instance upon redirect 2025-01-22 17:33:54 -05:00
syeopite
831017f403 Frontend: Carry over audio-only mode in playlist links (#4784) 2025-01-22 11:35:33 -08:00
syeopite
52daafe047 Videos: Fix missing host parameter on playback URLs when local=true (#4992) 2025-01-22 11:34:46 -08:00
syeopite
dca130ca6f Routes: Clean ajax actions handlers (#5036) 2025-01-22 11:33:51 -08:00
syeopite
0d398c9d1a API: Add support for author thumbnails in search api for videos (#5072) 2025-01-22 11:32:21 -08:00
syeopite
d5442d45bc API: Fix video thumbnails in mixes (#5116) 2025-01-22 11:29:12 -08:00
Giuliano Macedo
6e3ec10d76 feat(manifset): improved adaptationset label 2025-01-22 11:01:37 -08:00
GTechAlpha
d95ae7e6a5 Add audio track info to dash manifest, if present
- language id
  - language display name
  - main/default track
Sort audio formats so that main/default is first (for clients not using dash)

* Note: this should be a non-breaking change; if audio track info is not availablle, the behavior does not change from current
2025-01-22 11:01:37 -08:00
Brahim Hadriche
047ead8080 Fix video thumbnails in mixes 2024-12-16 16:54:04 -05:00
ChunkyProgrammer
04b0742293 remove icon element from channel rss feed 2024-11-17 13:14:39 -05:00
ChunkyProgrammer
1838ac4c99 do a sanity check on the provided ucid
Co-Authored-By: absidue <48293849+absidue@users.noreply.github.com>
Co-Authored-By: Samantaz Fox <coding@samantaz.fr>
2024-11-17 13:14:39 -05:00
ChunkyProgrammer
8729f01075 Channel RSS: deprecate author thumbnail, make less requests to youtube 2024-11-17 13:14:39 -05:00
ChunkyProgrammer
6dd89bd401 RSS: return 404 if youtube playlist doesnt exist 2024-11-17 13:14:39 -05:00
Samantaz Fox
3ac8978e96 VideoProxy: Handle 302 redirects in chunked section 2024-11-10 18:15:24 +01:00
Samantaz Fox
e7a93fcc18 API: Replace any URL in HLS manifests 2024-11-10 18:13:30 +01:00
Samantaz Fox
aa33d9b7ec Videos: Fix missing host parameter on playback URLs when local=true 2024-11-10 18:13:30 +01:00
ChunkyProgrammer
5fa87cc27c Add support for author thumbnails in search api for videos 2024-11-09 22:31:41 -05:00
Brahim Hadriche
d2123b4682 Sort channel shorts API 2024-11-09 17:49:06 -05:00
Samantaz Fox
1480e0089f Channels: Fix "Youtube API returned error 400" (#5059)
This PR also adds sort option to the channel "shorts" tab.
Thanks to iBicha for the original fix of the "livestreams" tab.

Closes 4029, 5021 and 5029
2024-11-08 23:40:34 +01:00
Samantaz Fox
4f7a18a630 Fix named arg syntax when passing force_resolve (#4754)
No related issue
2024-11-08 23:27:22 +01:00
Samantaz Fox
42da2547e3 Use make_client instead of calling HTTP::Client (#4709)
No related issue
2024-11-08 23:26:32 +01:00
Samantaz Fox
301aeffa78 Channels: Multiple small fixes
Fix the "newest" link not being bold when 'sort_by' uses the default value
Show 60 videos per page, rather than 30
2024-11-08 14:00:35 +01:00
Samantaz Fox
82248fad02 Channels: Add sort options to shorts 2024-11-07 23:08:36 +01:00
Samantaz Fox
9957da28dc Proxy: Use connection pools for images (#4326)
Theoretically this should improve memory usage and performance by quite a bit
as we aren't creating a new HTTP::Client and in a turn a new connection for
every image we request from YouTube.

Closes issue 4009
2024-10-30 13:55:28 +01:00
Samantaz Fox
dbdf2ad23a Routes: Simplify actions in watch_ajax 2024-10-29 18:27:53 +01:00
Samantaz Fox
dbd96c77e4 Routes: Simplify actions in token_ajax 2024-10-29 18:21:58 +01:00
Samantaz Fox
e453a2a682 Routes: Simplify actions in subscription_ajax 2024-10-29 18:16:52 +01:00
Samantaz Fox
7e4b3b182a Routes: Simplify actions in playlist_ajax 2024-10-29 18:09:50 +01:00
Samantaz Fox
0ac9367322 Parse more metadata badges for SearchVideos (#4863)
This PR makes it possible to display badges in the search results for third
party Invidious applications (ex: FreeTube)

See also: https://github.com/FreeTubeApp/FreeTube/pull/5590

No related issue
2024-10-08 17:59:35 +02:00
Samantaz Fox
82ac9a8609 Preferences: Add option to control preloading of video data (#4122)
This PR adds a configuration option to control the preloading of video data on
page load with the HTML5 'preload'[1] attribute on the `<video>` element.

The option is enabled by default, meaning that the `preload` attribute's value
will be 'auto'. If users want to prevent preloading of video data, they
can disable the option, which will set the attribute value to 'none'.

[1](https://www.w3schools.com/tags/att_video_preload.asp)

Closes issue 4110
2024-10-08 17:38:06 +02:00
Samantaz Fox
7c79ee7cc2 Performance: Improve speed of automatic instance redirection (#4193)
The automatic instance redirection implemented in #1940 fetches a new list of
instances each time someone queries the /redirect endpoint. This is extremely
inefficient...

This PR optimizes all that into a background job that only fetches a single
list every 30 minutes. This should performance quite a bit.

No related issue was opened.
2024-10-08 17:31:20 +02:00
ChunkyProgrammer
1961fc3b11 switch to enum flag instead of adding lots of properties to SearchVideo 2024-09-30 22:02:57 -04:00
ChunkyProgrammer
2e649363d2 Parse more metadata badges for SearchVideos 2024-09-30 22:02:57 -04:00
Samantaz Fox
9d91ac3b88 Use snake case for all variables 2024-08-26 20:17:45 +00:00
Sophie Tauchert
5d0149844f Batch user notifications together 2024-08-26 21:24:27 +02:00