Commit graph

314 commits

Author SHA1 Message Date
syeopite 5b47438b71
Add helper function to fetch random instance 2021-06-19 04:16:17 -07:00
TheFrenchGhosty c33ee83d87
Merge pull request #2124 from raycheung/master
Fix storyboard when proxied with an external port
2021-06-19 07:45:33 +00:00
TheFrenchGhosty f88e5f09b4
Merge pull request #2152 from syeopite/hooks-and-scripts
Add scripts to ease development
2021-06-19 07:38:33 +00:00
Samantaz Fox a2f5342a83 Multiple search fixes
* Remove percent-encoding of the search query when calling youtube API, as it
  breaks UTF-8
* Empty search redirects to /search, not /
* Show the fullscreen search "home page" (from #1977) at /search
* Allow 'region=' parameter to be passed to /search
* Other minor fixes
2021-06-13 21:52:36 +02:00
syeopite 6c9dd8deb6
Change internal i18n key of sv-SE from sv to sv-SE 2021-06-13 06:23:18 -07:00
syeopite 065c104f27
Upgrade to crystal 1.0.0 2021-06-08 13:10:58 -07:00
Ray Cheung ca5d5668d9 Fix storyboard when proxied with an external port
Say if it's `http://host:port` internally and proxied to
`https://domain:external_port`, the storyboard URL was rendered as
`https://domain:port`.
2021-05-29 11:43:39 +08:00
Samantaz Fox b7fe212a18
Fix youtube API function's documentation 2021-05-24 15:25:00 +02:00
Samantaz Fox cbabf0ae7e
Craft the "context" data in a dedicated function
As the amount of API endpoint function grow, this will
prevent ugly code copy/pasta
2021-05-24 13:44:49 +02:00
Samantaz Fox 344ccf3b03
Use '/youtubei/v1/browse' endpoint for playlists 2021-05-24 13:19:28 +02:00
Samantaz Fox 26a7e1b049
Use '/youtubei/v1/search' endpoint for search queries 2021-05-24 13:19:28 +02:00
Samantaz Fox 43bd331e48
Multiple youtube_api.cr helper fixes
Add documentation
Bump web client version string
Add charset=UTF-8 to the 'content-type' header
Parse JSON and return it as a Hash
Handle API error messages
2021-05-24 13:19:28 +02:00
syeopite 6e6f4d5a37
Allow configurable support of interactive 360 vid 2021-05-23 09:22:37 -07:00
TheFrenchGhosty 6f899d998f
Merge pull request #1968 from syeopite/iss677
Add ability to expand/collapse description.
2021-05-13 10:26:38 +02:00
TheFrenchGhosty 73da8463ca
Merge pull request #1953 from syeopite/fix1673
Update regex expressions to handle unexpected '};'
2021-05-13 10:24:44 +02:00
sh4dowb 533d0a1fd4
Added "Read More" button for video descriptions 2021-05-10 00:24:11 -07:00
Samantaz Fox cac5f20a28 Move locales definition to i18n.cr 2021-04-21 16:10:25 +02:00
TheFrenchGhosty beea32661a
Merge pull request #1975 from tenpura-shrimp/disablequic
add option to disable quic
2021-04-17 17:59:16 +00:00
TheFrenchGhosty b9e57d0283
Merge pull request #1977 from syeopite/add996
Change empty home page to search engine like layout
2021-04-17 17:02:47 +00:00
syeopite 5c0458a887
Move navbar search bar render check to templated 2021-04-17 05:18:58 -07:00
Andrew Zhao 9a8f1a0b0a add option to disable quic 2021-04-14 12:03:31 -04:00
syeopite 428747ab69
Allow default_home config to be empty value 2021-04-04 15:20:08 -07:00
syeopite 20b961c1c8
Preserve original cookies 2021-04-02 17:08:55 -07:00
TheFrenchGhosty b794c5cfcf
Set the request cookie to "YES+" 2021-04-01 15:59:24 +00:00
syeopite e08bea5f51
Fix lint 2021-03-31 15:34:29 -07:00
syeopite 739f610507
Add new YT consent cookie to every request 2021-03-31 14:57:00 -07:00
syeopite 608313c1d1
Update regex expressions to handle unexpected '};' 2021-03-29 17:37:12 -07:00
Samantaz Fox aaefa38602 Make the linter happy 2021-03-21 16:05:50 +01:00
Samantaz Fox f99d62a2bc Create youtube API wrapper fo /youtubei/v1/browse 2021-03-21 15:44:18 +01:00
saltycrys 378c0d049e WIP channels fix 2021-03-03 22:21:29 +01:00
Perflyst fc8c555519
Merge pull request #1729 from Rjevski/12factor-database-url-restored
Support "Database URL" in addition to existing DB-related parameters
2021-03-02 18:41:10 +01:00
saltycrys 2bf445e165 Fix playlists with Various Artists author 2021-02-10 01:04:27 +01: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 909285ea46
Merge pull request #1732 from saltycrys/unrequire-logger
Unrequire `logger`
2021-01-31 03:48:29 +01:00
saltycrys a0bc0641c7 Unrequire logger
Crystal's `Logger` was required but never used in Invidious. Crystal 0.36.0
removed `Logger` in favor of `Log`.
2021-01-31 03:33:38 +01:00
Andre Borie 79e99908de Allow providing 12-Factor-style Database URL in config 2021-01-30 19:33:58 +00:00
saltycrys c9a316ad35
Merge pull request #1702 from saltycrys/config
Config improvements
2021-01-30 14:46:10 +01:00
Andrew Zhao d0dbbd1cb1 remove https from channel thumbnail in search 2021-01-28 00:51:14 -05:00
saltycrys b45f371911 Make config a constant
Instead of passing around `config` there is now the global `CONFIG`.
2021-01-23 19:39:04 +01:00
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
```
2021-01-23 18:58:13 +01:00
HackerNCoder 606dd11b4f
Remove admin_email. Use repos url for captcha ID and reddit header. Add note about not updating changelog 2021-01-07 21:09:24 +01:00
HackerNCoder 4d512d908d
Remove some mentions of omarroth 2021-01-07 19:01:13 +01:00
saltycrys df9e7f284c Adjust log verbosity
The default log level has been changed from `debug` to `info`.
The `debug` log level is now more verbose. `debug` now gives a general overview
of what is happening (where implemented) while `trace` gives all available
details.
2021-01-05 20:51:18 +01:00
saltycrys 6365ee7487 Make logger a constant
Instead of passing around `logger` there is now the global `LOGGER`.
2021-01-05 20:43:19 +01:00
saltycrys 7a8620a570 Add CLI arguments to config file
The log level can now be set with `log_level` (accepts ints and strings).
The log file can now be set with `output` (also accepts `STDOUT`).
2021-01-05 20:35:59 +01:00
Perflyst 2c24bf3222
Merge pull request #1389 from vhuynh3000/decrypt_on_demand
add config to decrypt on demand instead of polling
2021-01-05 19:32:22 +01:00
saltycrys 8b56a038b7 Set content type for HTML error helpers
This fixes `Unexpected char '<' at 1:1` errors caused by content type mismatch.
2021-01-04 05:24:08 +01:00
vhuynh3000 3a2bd4e928 add config to decrypt on demand instead of polling 2021-01-03 20:50:52 +01:00
TheFrenchGhosty 82c8f3b556
Merge pull request #1600 from jksladjflkjsadflkjsadf/closeclients
Close http clients after use
2020-12-30 01:14:31 +00:00
Perflyst b19524d56a
Merge pull request #1609 from saltycrys/add-popular-enabled-option
Add `popular-enabled` option
2020-12-28 11:30:55 +01:00