Commit Graph

963 Commits (6d68fbc31d54e2561e00e88ab5006d4ed4da26d7)

Author SHA1 Message Date
syeopite 87f46a7532
Unregister captcha job (#2390) 3 years ago
syeopite a539de4f97
Bump dependencies (#2378)
* Upgrade to Kemal v1.1.0

* Bump postgres driver
3 years ago
syeopite 4fcd0964cd
Extract API routes (#2271)
* Extract API routes from invidious.cr
* Remove deprecated APIs
  - insights
  - top feed
3 years ago
syeopite 5005212bec
Extract feed routes (#2269)
* Extract feed routes from invidious.cr
* Removes the deprecated route for /feed/top
* Deprecate /view_all_playlist & use /feed/playlists
* Move feed views into their own directory

* Add haltf method to halt current route context
* Change status_code + return blocks to use haltf

* Set appropriate response headers for RSS routes
3 years ago
Émilien Devos a279d6f433
Fix livestream parsing URLs (#2356) 3 years ago
syeopite fceb8093f1
Use `athena-negotiation` to detect language through Accept-Language header (#2324)
Detect language through Accept-Language header
3 years ago
syeopite 39b34eece8
Extract API routes from invidious.cr (3/3)
- Auth (excluding notifications*) APIs
- Mixes

*Notifications currently require the "connection_channel" channel
for talking with the notifications job. Unfortunately, we cannot
access that within the route modules yet.
3 years ago
syeopite 6aa65593ef
Extract API routes from invidious.cr (2/?)
- Video playback endpoints
- Search feed api
- Video info api
3 years ago
syeopite cbf3d75087
Extract API routes from invidious.cr (1/?) 3 years ago
syeopite 0b0036813f
Remove deprecated APIs
- insights
- top feed
3 years ago
Émilien Devos 12b46bbd41
switch to innertube API for about channels (#2255) 3 years ago
Émilien Devos 88c5e3b6fa
Use the new youtube api for comments (#2217)
* use the new youtube api for comments
* remove PG_DB & action parameter + allow force region
* support new comments data with onResponseReceivedEndpoints
3 years ago
syeopite 1321c90920
Extract channel routes (#2227)
* Extract primary channel routes from invidious.cr

Also removes timedtext_video stub since all it does is redirect to the
homepage. However, Invidious's 404 handler already does this.

--
As the template for the channel about page doesn't exist yet, the
behavior for the /channel/:ucid/about endpoint has been changed to be
the same as what's currently present on Invidious

(cherry picked from commit 8fad19d805)

* Manually extract brand_redirect from 1b569bbc99

This commit manually extracts the brand_redirect function from the
commit mentioned.

However, the redirect to the  `.../about` endpoint is removed due to the
fact that it doesn't exist yet.

This commit is also mainly just a bridge for the next few cherry picks from
\#2215

* Update brand_redirect to use youtubei resolve_url

(cherry picked from commit 53335fe7cf)

* Add additional channel endpoints to brand_redirect

(cherry picked from commit 8fc6f3add6)

* Add separate handler for /profile endpoint

* Add /channel/:ucid/home route

* Document all channel brand_urls
3 years ago
syeopite 3e5c353298
Merge pull request #2205 from syeopite/fix-age-restricted-videos
Partial (and temporary) fix for age restricted videos
3 years ago
syeopite ae61662f61
Debloat channels.cr into multiple files (#2225)
Cherry picked from ui overhaul branch with a few modifications:
  - channel folder is renamed to channels
  - parsing for channel home and featured channels are removed due to
    lack of infrastructure from other commits

(cherry picked from commit 44d18b8e14)
3 years ago
syeopite 54b19a04bb
Fix caption parsing on age restricted videos 3 years ago
Samantaz Fox 5a8825d016
Fix quoting of 'none' in CSP header
The keyword 'none' must be surrounded by single quotes.
Regression introduced by #2168.
3 years ago
syeopite 31fa3dfd59
Add route to redirect to another instance 3 years ago
TheFrenchGhosty b8f0b4b583
Typo 3 years ago
Samantaz Fox 42d9fd9c88 Rewrite response headers
Fixes #2018 and #2153
3 years ago
syeopite 0a87ba6930
Decode URL encoded preference cookie when parsing 3 years ago
syeopite 065c104f27
Upgrade to crystal 1.0.0 3 years ago
Samantaz Fox cac5f20a28 Move locales definition to i18n.cr 4 years ago
Andrew Zhao 9a8f1a0b0a add option to disable quic 4 years ago
syeopite 877bb5c821
Add aliases for watch route 4 years ago
Svallinn cbdba66ef3
Use the youtubei API over the legacy one 4 years ago
Andrew Zhao 89fd35e02d fix comment replies 4 years ago
Svallinn fa050fb8a8
Fix: functional hl / dark_mode / thin_mode params 4 years ago
TheFrenchGhosty 3cc9114f81
Merge pull request #1829 from SimonPhoenix96/xml-json-yt-sub-import
integrate legacy yt xml subscription import with new json sub import
4 years ago
Perflyst fc8c555519
Merge pull request #1729 from Rjevski/12factor-database-url-restored
Support "Database URL" in addition to existing DB-related parameters
4 years ago
simonphoenix96 84487b2e52 format invidious.cr using crystal cli 4 years ago
Simon Phoenix 9689376de6
fixed line indent typo 4 years ago
simonphoenix96 a2f79a163f integrate legacy yt xml subscription import with new json sub import 4 years ago
Andrew Zhao 2600695927 fix search
Put search page in the super secret proto field
4 years ago
TheFrenchGhosty c451aab150
Enable the Hebrew translation since it's now translated at more than 80% 4 years ago
TheFrenchGhosty 48bff9a5d2
Enable the Indonesian translation since it's now translated at more than 80% 4 years ago
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.
4 years ago
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.
4 years ago
Perflyst 82da5cfd01
Merge pull request #1712 from tenpura-shrimp/bumpvideojs
Bump videojs and fix webworker
4 years ago
Andre Borie 79e99908de Allow providing 12-Factor-style Database URL in config 4 years ago
TheFrenchGhosty bd893cb24c Enable the Finish translation since it's now translated at more than 80% 4 years ago
saltycrys c9a316ad35
Merge pull request #1702 from saltycrys/config
Config improvements
4 years ago
Andrew Zhao 4a0b10984a Bump videojs and fix webworker 4 years ago
saltycrys 70e14f92a4 Only start refresh jobs when necessary
If `channel_threads` or `feed_threads` is set to zero the corresponding job is
now not started.
4 years ago
saltycrys b45f371911 Make config a constant
Instead of passing around `config` there is now the global `CONFIG`.
4 years ago
saltycrys f1a7ee997b Add config environment variables
The config file can now be specified with `INVIDIOUS_CONFIG_FILE`.
A YAML formatted string can still be passed with `INVIDIOUS_CONFIG`, replacing
the config file.

Additionally all options can now be specified as environment variables.
The syntax for variable names is `INVIDIOUS_` followed by the option name in
upper case. The values are parsed as YAML.

These new env vars only update the provided main configuration, but it is
possible to point the config file at the example config and then use env vars
for all config options:
```
INVIDIOUS_CONFIG_FILE=./config/config.example.yml \
INVIDIOUS_CHANNEL_THREADS=10 \
./invidious
```
4 years ago
TheFrenchGhosty 799f97e847 Make invidious use all the translation files 4 years ago
Andrew Zhao b7fe1db89a save host when using dash manifest 4 years ago
saltycrys c81ca187f8 Fix downloads
The `itag` is now converted to a number, matching the `itag` of
`Video.adaptive_fmts` and `Video.fmt_stream`.
4 years ago
saltycrys b0b8ba7000 Respect `use_pubsub_feeds` config
Setting `use_pubsub_feeds: false` now properly disables it.
4 years ago