コミットグラフ

191 コミット

作成者 SHA1 メッセージ 日付
Samantaz Fox d74873fed1
Clean useless database arguments (4/5) 2022-01-04 17:15:43 +01:00
Samantaz Fox 6704ce3214
Move DB utility functions to the proper module 2022-01-04 17:15:43 +01:00
Samantaz Fox 914cfbd953
Move DB queries related to 'annotations' in a separate module 2022-01-04 17:15:43 +01:00
Samantaz Fox c021b93b5c
Move DB queries related to channels in a separate module 2022-01-04 17:13:52 +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
Samantaz Fox 33780f1995
Also fix 'to_json' in struct Video 2021-10-29 16:26:35 +02:00
syeopite e91421253e
Fix Style/VerboseBlock issues 2021-10-25 01:12:26 -07:00
syeopite c8a985cc77
Merge pull request #2477 from SamantazFox/move-prefs-and-config
Move user preferences and server config
2021-10-18 17:06:07 +00:00
Samantaz Fox e17c8b1f4d
Move 'extract_videos' and 'extract_selected_tab' too 2021-10-18 16:12:18 +02:00
Samantaz Fox f7f0910953
Remove fetch_continuation_token(): dead code 2021-10-18 16:12:17 +02:00
Samantaz Fox bda3a26423
Move server structure to a separate file 2021-10-11 18:33:36 +02:00
Samantaz Fox adc12addfa
Add config option to display source code URL in footer (#2450) 2021-10-07 13:53:12 +02:00
syeopite 30e85b40f9
Fix extract_videos 2021-09-24 21:07:07 -07:00
syeopite a50f64f6e9
Add parser for categories (shelfRenderer)
This commit adds a new parser for YT's shelfRenderers which are
typically used to denote different categories.The code for featured
channels parsing has also been moved to use the new parser but some
additional refactoring are needed there.

The ContinuationExtractor has also been improved and is now capable of
extraction continuation data that is packaged under
"appendContinuationItemsAction"

In additional this commit adds some useful helper functions to extract
the current selected tab the continuation token. This is to mainly
reduce code size and repetition.
--
This cherry-picked commit also removes the code for parsing featured
channels present on the original.

(cherry picked from commit 8000d538dbbf1eb9c78e000b1449926ba3b24da9)
2021-09-24 21:07:06 -07:00
syeopite 1323b94b7a
Rewrite extract_item and extract_items functions
This commit completely rewrites the extract_item and extract_items
function. Before this commit these two function were an unreadable
mess. The extract_item function was a lengthy if-elsif chain
while the extract_items function contained an incomprehensible
mess of .try, else and ||.

With this commit both of these functions have been pulled into a
separate file with the internal logic being moved to a few classes.

This significantly reduces the size of these two methods, enhances
readability and makes adding new extraction/parse rules much simpler.

See diff for details.

--
This cherry-picked commit also removes the code for parsing featured
channels present on the original.

(cherry picked from commit a027fbf7af1f96dc26fe5a610525ae52bcc40c28)
2021-09-24 21:06:46 -07:00
Émilien Devos 12b46bbd41
switch to innertube API for about channels (#2255) 2021-08-12 16:00:26 -07:00
Samantaz Fox 4b46313e19
Fix crystal overrides (#2295)
* Move Crystal stdlib classes overrides to a separate file
* Document known crystal overrides
* Update crystal overrides for HTTP::Client socket
* Update shard.yml to restrict crystal versions
* Fix compilation error in Crystal 1.1.x (See
   https://github.com/crystal-lang/crystal/issues/10965
   for more details about this issue).
2021-08-03 23:44:47 +02:00
Samantaz Fox 84594b0e1e
Remove workaround for decompression of proxied files (#2286)
Was used by `proxy_file` before crystal 0.35.0.
Implemented in: f7dbf2bdd4
orphaned since: d30a972a90
2021-07-28 17:15:51 -07:00
Émilien Devos 0d57a887ea
Mute unbuffered_flush IOError exception (#2235)
Related to #1416, it doesn't really fix the real error, but instead mutes the exception message.

Like explained in #1416, this "exception Error" while flushing the client data doesn't harm the client-server connection. However, this exception message continuously spams the logs and makes debugging and error finding really difficult.
2021-07-14 17:59:33 +02:00
Émilien Devos cf619f24a9
Remove workaround for kemalcr/kemal/issues/575 (#2230)
Full URL of the issue: https://github.com/kemalcr/kemal/issues/575
2021-07-01 16:13:06 +00:00
Mateusz Makowski 90c907710c
Display username in header 2021-06-19 04:58:42 -07:00
syeopite 09f7e38eed
Disable automatic instance redirection by default 2021-06-19 04:17:49 -07:00
syeopite b63bebb519
Allow automatic instance redirect to be turned off
Instead the "switch invidious instance" link would bring users to
redirect.invidious.io
2021-06-19 04:16:18 -07: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
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 608313c1d1
Update regex expressions to handle unexpected '};' 2021-03-29 17:37:12 -07: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
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 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
vhuynh3000 3a2bd4e928 add config to decrypt on demand instead of polling 2021-01-03 20:50:52 +01: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
saltycrys 198dfffaeb Add `popular-enabled` option
This is similar to the removed `top-enabled` option but for the Popular feed.
The instance needs to be restarted if the feed was enabled.

Editing admin options on the preferences page is also fixed.

The handling of the feed pages now only happens in a single place.

Instead of redirecting:
  - The Top feed now displays a message that it was removed from Invidious.
  - The Popular feed now displays a message that it was disabled if it was.
2020-12-27 06:12:43 +01:00
Perflyst eeeecf9763
Merge pull request #1572 from saltycrys/add-dash-quality-preference
Add DASH quality preference
2020-12-23 20:36:13 +01:00
saltycrys b39f01dcdf Improve logging
Everything that gets logged now has a log level associated with it.

The log level can be set with the new `-l` or `--log-level` arguments.

The defaul log level is `debug` for now. There aren't many things that get
logged but if the logs get spammed in the future it can be set down to `info`.
2020-12-21 16:32:34 +01:00
saltycrys eea7ca9b72 Add DASH quality preference
The options are `auto` (the current and default behavior), `best` and `worst`.

The UI is only updated once playback starts.
2020-12-19 18:37:30 +01:00
Théo Gaillard df3f9a2ae8
fix: channel info parsing 2020-11-30 19:35:45 +01:00
Théo Gaillard b41ca72d2b
revert: remove 'JSON.parse("' 2020-11-26 18:22:31 +01:00