Commit graph

992 commits

Author SHA1 Message Date
Samantaz Fox
a6c9b263da
DB: don't pass PG_DB to check_table/check_enum 2022-01-25 23:53:00 +01:00
Samantaz Fox
eff8b23f57
Improve youtube import type detection
Code courtesy of bbielsa:
https://gist.github.com/bbielsa/7d131aa2188945f591a8379ec0defc9b
2022-01-12 18:13:15 +01:00
bbielsa
8d47ec714e
Add text/xml as a possible mime type for xml file uploads 2022-01-08 18:07:07 +01:00
bbielsa
9607fe03af
Detect the type of subscription import format based on the content type of the file uploaded 2022-01-08 18:07:06 +01:00
bbielsa
43ff3be751
Test if body content is likely JSON, if so parse the json format of subscriptions export. If the content is anything else, assume it is CSV and parse 2022-01-08 18:07:06 +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
c25d664edc
Clean useless database arguments (2/5) 2022-01-04 17:15:43 +01:00
Samantaz Fox
9bad7e2940
Clean useless database arguments (1/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
85cf27119c
Move DB queries related to playlists in a separate module (3/3) 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
094f835642
Move DB queries related to 'users' in a separate module (1/2) 2022-01-04 17:13:52 +01:00
Samantaz Fox
92eea3b18b
Move DB queries related to session tokens in a separate module 2022-01-04 17:13:52 +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
46d08237c6
Move DB queries related to playlists in a separate module (2/3) 2022-01-04 17:13:52 +01:00
Samantaz Fox
3deafe9f8d
Move DB queries related to playlists in a separate module (1/3) 2022-01-04 17:13:51 +01:00
Samantaz Fox
998edba6f0
Move DB queries related to 'videos' in a separate module 2022-01-04 17:13:51 +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
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
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
7df2fd0bc8
Add 'require' statement to 'invidious.cr' 2021-10-18 16:12:17 +02:00
syeopite
4246c7a523
Extract image routes 2021-10-11 13:22:11 -07:00
Samantaz Fox
57ed047025
Add mising 'require' statement to 'invidious.cr' 2021-10-11 18:33:36 +02:00
syeopite
b10f37bea9
Use kemal in production mode (#2455) 2021-10-11 14:42:22 +02:00
syeopite
81b12b8001
Add support to make invidious API-only via flag (#2363) 2021-10-02 20:04:02 +00:00
syeopite
b20f72b963
Use default timeout (5 seconds) for YT pool (#2430) 2021-09-26 23:03:45 +02:00
syeopite
87f46a7532
Unregister captcha job (#2390) 2021-09-19 10:30:19 +00:00
syeopite
a539de4f97
Bump dependencies (#2378)
* Upgrade to Kemal v1.1.0

* Bump postgres driver
2021-09-10 07:42:15 +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
Émilien Devos
a279d6f433
Fix livestream parsing URLs (#2356) 2021-08-26 21:02:26 +00: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
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
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
cbf3d75087
Extract API routes from invidious.cr (1/?) 2021-08-14 00:18:24 -07:00
syeopite
0b0036813f
Remove deprecated APIs
- insights
- top feed
2021-08-14 00:18:03 -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
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
2021-08-03 23:46:15 +02:00
syeopite
3e5c353298
Merge pull request #2205 from syeopite/fix-age-restricted-videos
Partial (and temporary) fix for age restricted videos
2021-07-14 10:11:03 -07:00
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)
2021-07-14 17:46:12 +02:00
syeopite
54b19a04bb
Fix caption parsing on age restricted videos 2021-06-27 08:35:28 -07:00
Samantaz Fox
5a8825d016
Fix quoting of 'none' in CSP header
The keyword 'none' must be surrounded by single quotes.
Regression introduced by #2168.
2021-06-20 18:43:00 +02:00
syeopite
31fa3dfd59
Add route to redirect to another instance 2021-06-19 04:16:17 -07:00
TheFrenchGhosty
b8f0b4b583
Typo 2021-06-19 09:40:33 +02:00
Samantaz Fox
42d9fd9c88 Rewrite response headers
Fixes #2018 and #2153
2021-06-17 19:53:39 +02:00
syeopite
0a87ba6930
Decode URL encoded preference cookie when parsing 2021-06-08 13:11:04 -07:00