Commit Graph

439 Commits

Author SHA1 Message Date
syeopite
4b2f9ffffc fix: set CSP header after setting preferences of registered users (#5275) 2025-05-17 16:17:43 -07:00
syeopite
d5cb653fd1 Handle parse errors gracefully on timeline items (#5196) 2025-05-17 16:16:20 -07:00
Fijxu
6fe21a7523 Revert "Update src/invidious/routes/before_all.cr"
This reverts commit aab6ff4bb6.
2025-05-10 23:08:48 -04:00
Fijxu
aab6ff4bb6 Update src/invidious/routes/before_all.cr
Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com>
2025-05-10 23:02:34 -04:00
Fijxu
1492453c60 update comment 2025-05-10 16:31:14 -04:00
Fijxu
401bc110d6 fix: set CSP header after setting preferences of registered users
Fixes https://github.com/iv-org/invidious/issues/5142

add reason why extra_media_csp is after reading user preferences from the database and cookies

set media-src after loading database user preferences
2025-05-10 13:26:30 -04:00
absidue
2c1400c41e Fix proxying live DASH streams (#4589) 2025-05-03 20:28:19 +00:00
Alex Maras
8fd0b82c38 feat: route to invidious companion on downloads (#5224) 2025-05-03 01:28:18 +02:00
syeopite
6c063436d4 Fix issues raised by code review
Remove explicit `self.` from #process of parsers

Remove explicit return tuple in get_issue_template

Fix formatting

Move inline issue template style to stylesheet

Use @id in ProblematicTimelineItem xml repr

Fix naming
2025-04-05 12:40:38 -07:00
syeopite
f7810ba007 Use ProblematicTimelineItem as needed in playlists 2025-03-19 23:32:46 -07:00
É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