コミットグラフ

291 コミット

作成者 SHA1 メッセージ 日付
syeopite 83556bace2
Allow thumbnail queries with QUIC disabled 2021-11-12 03:47:57 -08:00
syeopite 814c9e6c3a
Use https for storyboard image requests 2021-11-12 03:47:57 -08:00
syeopite 547abe17d9
Use https for ggpht requests 2021-11-12 03:47:57 -08:00
syeopite 6b8450558d
Allow storyboard queries with QUIC disabled 2021-11-12 03:47:57 -08:00
syeopite c3747c2d49
Allow ggpht queries with QUIC disabled 2021-11-12 03:47:57 -08:00
syeopite 245122104a
Respect use_quic param and fix typos 2021-11-12 03:47:57 -08:00
syeopite d379a36c0e
Add compile-time flag to remove code for QUIC 2021-11-12 03:47:50 -08:00
Samantaz Fox 6cf0ff6b49
Remove useless auto_generated param from PlaylistVideo#to_xml
given the variables available in this function's context, 'author' and 'ucid'
provide the same data 'self.author' and 'self.ucid', respectively.

Given that fact, the variable `auto_generated` has no impact on the logic of
this function, and hence can be safely removed. this greatly simplifies the
code and makes it perfectly compatible with crystal's calling convention for
'#to_xml' methods.
2021-10-29 16:26:42 +02:00
Samantaz Fox 86f75758a7
Fix 'to_json' in struct PlaylistVideo 2021-10-29 16:26:42 +02:00
Samantaz Fox 33780f1995
Also fix 'to_json' in struct Video 2021-10-29 16:26:35 +02:00
syeopite bb396a310e
Remove unneeded redirect.invidious.io code in /redirect 2021-10-26 16:12:25 -07:00
syeopite 66e7285108
Only use /redirect when automatically redirecting 2021-10-26 16:12:16 -07:00
Samantaz Fox 2b81a82620
Merge pull request #2529 from DmitrySandalov/master
Feature Request: Localization for trending iv-org#331
2021-10-26 23:49:56 +02:00
syeopite 17e481c107
Reduce block verbosity further 2021-10-25 01:14:14 -07:00
syeopite 88ad7c8d8d
Update src/invidious/routes/playlists.cr
Co-authored-by: Samantaz Fox <coding@samantaz.fr>
2021-10-25 01:14:09 -07:00
syeopite 1adcac175e
Update src/invidious/routes/channels.cr
Co-authored-by: Samantaz Fox <coding@samantaz.fr>
2021-10-25 01:14:09 -07:00
syeopite dd8c412abc
Fix Style/IsAFilter issues 2021-10-25 01:14:08 -07:00
syeopite e969c1490a
Fix Performance/ChainedCallWithNoBang issues 2021-10-25 01:12:26 -07:00
syeopite e91421253e
Fix Style/VerboseBlock issues 2021-10-25 01:12:26 -07:00
syeopite 35d15c7c2b
Fix Style/VariableNames issues 2021-10-25 01:12:26 -07:00
syeopite 20cb751ff6
Fix Lint/UnusedArgument issues 2021-10-25 01:12:26 -07:00
syeopite 0614b52f03
Fix Lint/RedundantStringCoercion issues 2021-10-25 01:12:19 -07:00
Dmitry Sandalov d9c58c4837
Feature Request: Localization for trending iv-org#331 2021-10-21 14:54:15 +03:00
syeopite 888c7e2c29
Merge pull request #2491 from syeopite/extract-image-routes
Extract image routes
2021-10-15 22:13:10 +00:00
Samantaz Fox 678b10dbcf
Lookback 50 videos 2021-10-11 23:52:57 +02:00
diogo a1d6411f1f
propagate video_id field on getting playlists 2021-10-11 23:51:07 +02:00
diogo 0a9e19646a
pass the api/v1/playlists with videos before the offset 2021-10-11 23:43:41 +02:00
syeopite 4246c7a523
Extract image routes 2021-10-11 13:22:11 -07:00
Samantaz Fox adc12addfa
Add config option to display source code URL in footer (#2450) 2021-10-07 13:53:12 +02:00
syeopite 81b12b8001
Add support to make invidious API-only via flag (#2363) 2021-10-02 20:04:02 +00:00
syeopite 6d68fbc31d
Fix livestream regex regression caused by #2271
Closes #2352

Special thanks to @WaywardHeart for finding this issue!
2021-09-25 02:47:52 +00:00
syeopite 4fcd0964cd
Extract API routes (#2271)
* Extract API routes from invidious.cr
* Remove deprecated APIs
  - insights
  - top feed
2021-08-30 18:27:47 +02:00
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
2021-08-30 16:58:24 +02:00
syeopite fceb8093f1
Use `athena-negotiation` to detect language through Accept-Language header (#2324)
Detect language through Accept-Language header
2021-08-24 19:59:27 +00:00
syeopite d984a898d4
Remove usage of haltf in /api/v1/channels/:ucid/comments 2021-08-23 17:07:45 -07:00
syeopite 66b45a8fe2
Bountiful changes
- Use haltf in more locations
 - Fix wrong URL params
 - Rename API modules
 - Remove API routing file and move everything to general iv routing
   file
2021-08-23 16:28:30 -07:00
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.
2021-08-14 00:18:25 -07:00
syeopite b3426fdc94
Restructure API routes to use more namespaces 2021-08-14 00:18:25 -07:00
syeopite 6aa65593ef
Extract API routes from invidious.cr (2/?)
- Video playback endpoints
- Search feed api
- Video info api
2021-08-14 00:18:24 -07:00
syeopite 66becbf46f
Restructure API route organisation 2021-08-14 00:18:24 -07:00
syeopite cbf3d75087
Extract API routes from invidious.cr (1/?) 2021-08-14 00:18:24 -07:00
Émilien Devos 12b46bbd41
switch to innertube API for about channels (#2255) 2021-08-12 16:00:26 -07:00
É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
2021-08-12 19:14:30 +02: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 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 8fad19d8057d7d22e3de27ebbc88a9978c1df27b)

* Manually extract brand_redirect from 1b569bbc99207cae7c20aa285f42477ae361dd30

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 53335fe7cfdfac392365b7cac447bc7cc6478134)

* Add additional channel endpoints to brand_redirect

(cherry picked from commit 8fc6f3add637dabb09b2034f4d82fc3d039ba15c)

* Add separate handler for /profile endpoint

* Add /channel/:ucid/home route

* Document all channel brand_urls
2021-08-03 23:46:15 +02:00
syeopite 578bbcd181
Fix raw parameter for videos in listen mode (#2270) 2021-07-28 16:28:09 -07:00
syeopite 54b19a04bb
Fix caption parsing on age restricted videos 2021-06-27 08:35:28 -07:00
Mateusz Makowski 90c907710c
Display username in header 2021-06-19 04:58:42 -07:00
syeopite 4a095eb98e
Fix <hr> styling on empty search page 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 f178297452
Generalize redirect route 2021-06-19 04:16:18 -07:00
syeopite 311e7684b2
Add instance redirect on empty/broken search 2021-06-19 04:16:18 -07:00
syeopite 31fa3dfd59
Add route to redirect to another instance 2021-06-19 04:16:17 -07:00
Samantaz Fox 3de92b337d Use if/else instead of return in search route 2021-06-14 17:27:47 +02: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 065c104f27
Upgrade to crystal 1.0.0 2021-06-08 13:10:58 -07:00
syeopite 445ff856fe
Allow user preferences to effect extend_desc 2021-05-24 09:16:58 -07:00
syeopite 5ba9a1f87d
Fix lint 2021-05-23 09:22:37 -07:00
syeopite 6e6f4d5a37
Allow configurable support of interactive 360 vid 2021-05-23 09:22:37 -07: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
syeopite 65942cd46c
Rename empty.ecr to search_homepage.ecr 2021-04-17 05:16:35 -07:00
syeopite 45d687c4e1
Preserve url params in video aliases 2021-04-11 22:09:46 -07:00
syeopite 877bb5c821
Add aliases for watch route 2021-04-06 20:36:23 -07:00
Samantaz Fox 62e46b7a36 Fix missing last page in playlists 2021-04-01 18:46:49 +00:00
Samantaz Fox 23e5b6ba72 Remove extra 'next page' button at then end of a playlist 2021-03-23 02:25:47 +00:00
Samantaz Fox a61735e29a Print detailed error message when playlist can't be retrieved 2021-03-21 15:47:51 +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 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
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
Andrew Zhao 15ba3325d9 add ui for searching 2021-01-17 14:33:49 -05: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
Perflyst c89632d2a8
Merge pull request #1608 from saltycrys/add-subscription-traces
Add Subscription Traces
2020-12-31 11:30:04 +01:00
saltycrys dfd5e30015 Fix Video Mode Button
The query params that get edited for `embed_params` are now deep copied instead
of shallow copied, preventing the originals from being changed.
2020-12-29 01:22:56 +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
saltycrys c4ef055248 Add RefreshChannelsJob traces
Traces can be enabled with `-l trace`.

The problem with subscriptions is that sometimes requests to YouTube never
finish. As soon as that happens `channel-threads` times subscriptions stop
being refreshed. This is most likely a problem with the lsquick bindings.
2020-12-27 05:20:33 +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 ef96a50cea Remove "Top" feed option from preferences
The Top feed used to be a feed based on YouTube ratings. Once YouTube removed
publicly available ratings the Top feed was removed from Invidious but the
option to display a link to it remained.
2020-12-19 19:30:42 +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
Matthew McGarvey fb06482916 Extract out User Preferences endpoints 2020-12-15 18:54:30 -06:00
Matthew McGarvey 2dacdf0210 Extract login/signout routes from global file 2020-12-08 20:50:39 -06:00
saltycrys 30c92ce1b7 Add embed link to watch page 2020-12-08 02:28:44 +01:00
Matthew McGarvey d7377015a2 Extracting search endpoints 2020-12-01 18:02:39 -06:00
saltycrys 3dac33ffba
Add backtraces to errors (#1498)
Error handling has been reworked to always go through the new `error_template`,
`error_json` and `error_atom` macros.
They all accept a status code followed by a string message or an exception
object. `error_json` accepts a hash with additional fields as third argument.

If the second argument is an exception a backtrace will be printed, if it is a
string only the string is printed. Since up till now only the exception message
was printed a new `InfoException` class was added for situations where no
backtrace is intended but a string cannot be used.

`error_template` with a string message automatically localizes the message.
Missing error translations have been collected in https://github.com/iv-org/invidious/issues/1497
`error_json` with a string message does not localize the message. This is the
same as previous behavior. If translations are desired for `error_json` they
can be added easily but those error messages have not been collected yet.

Uncaught exceptions previously only printed a generic message ("Looks like
you've found a bug in Invidious. [...]"). They still print that message
but now also include a backtrace.
2020-11-30 10:59:21 +01:00
Matthew McGarvey 192d2b86b6 Extract playlist routes from global file 2020-11-19 19:21:48 -06:00
Matthew McGarvey 38b617d848 Formatting 2020-11-07 08:22:44 -06:00
Matthew McGarvey dda02f783f Extract embed routes into separate classes 2020-11-06 16:44:36 -06:00
Matthew McGarvey 2cded8dcac Extract /watch route from main file 2020-11-02 18:06:06 -06:00
Matthew McGarvey 85c212aee3 Provide rough draft of better project organization 2020-10-05 23:57:19 -05:00