Commit Graph

20 Commits

Author SHA1 Message Date
Fijxu
5f1944925b remove unused Content-Security-Policy generated on every request to watch end embed 2025-04-01 18:51:13 -03: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
Samantaz Fox
aa33d9b7ec Videos: Fix missing host parameter on playback URLs when local=true 2024-11-10 18:13:30 +01:00
Émilien Devos
98301a2237 Add ability to disable all user notifications (#3473) 2023-01-05 23:08:05 +00:00
Samantaz Fox
d659a451d6 videos: remove unused 'VideoRedirect' exception 2022-10-31 20:09:04 +01:00
Emilien Devos
260bab598e reword error messages 2022-09-02 20:20:43 +02:00
Emilien Devos
ca4c2115ee Message when the video doesn't exist in playlist 2022-08-23 11:45:44 +00:00
Émilien Devos
c201ea53ba Add 404 status code on all possible endpoints 2022-05-27 14:06:38 +00:00
Samantaz Fox
4cd7a3e83f Remove useless 'locale = env.get...' from many routes 2022-01-28 02:19:53 +01:00
Samantaz Fox
5e3c9cf290 Remove useless arguments from playlist-related functions 2022-01-28 02:19:53 +01:00
Samantaz Fox
d74873fed1 Clean useless database arguments (4/5) 2022-01-04 17:15:43 +01:00
Samantaz Fox
40ed4a0506 Clean useless database arguments (3/5) 2022-01-04 17:15:43 +01:00
Samantaz Fox
7691f53520 Move DB queries related to 'users' in a separate module (2/2) 2022-01-04 17:15:43 +01:00
Samantaz Fox
139786b9ef i18n: pass only the ISO code string to 'translate()'
Don't use the whole Hash everywhere.
Also fall back nicely to english string if no translation exists.
2021-11-21 01:50:11 +01:00
syeopite
35d15c7c2b Fix Style/VariableNames issues 2021-10-25 01:12:26 -07:00
syeopite
81b12b8001 Add support to make invidious API-only via flag (#2363) 2021-10-02 20:04:02 +00:00
syeopite
7afa027b95 Switch routing logic to use modules (#2298)
* Switch routing logic to use modules
* Add more macros for adding routes of different HTTP methods
2021-08-11 12:36:25 +02:00
syeopite
54b19a04bb Fix caption parsing on age restricted videos 2021-06-27 08:35:28 -07:00
saltycrys
5f03a583d1 Update code for Crystal 0.36.0
Rename `HTTPClient@socket` to `HTTPClient@io`, see
https://github.com/crystal-lang/crystal/pull/9543.

Rename `URI#full_path` to `URI#request_target`, see
https://github.com/crystal-lang/crystal/pull/10099.
2021-02-02 20:01:02 +01:00
saltycrys
991a04dc2a Adjust routes
Simple routes have been moved into a single `Misc` file.

Embed routes have been moved into a single `Embed` file.

The preferences route has been renamed to be more consistent with other parts
of the codebase.
2021-02-02 06:18:16 +01:00