Compare commits

..

2278 Commits

Author SHA1 Message Date
bb7f7bb4d1 add check video id for android client too 2022-08-25 08:32:40 +00:00
389e49183c throw error if the videoID returned is different 2022-08-23 19:34:54 +00:00
4c1a5f84fa Fix prefs cookies in player (#3276) 2022-08-22 16:16:50 +00:00
b0bb156918 Adapt StaticFileHandler for Crystal 1.6 (#3269) 2022-08-17 21:34:01 +02:00
5565204273 StaticFileHandler: use HTTP::Status rather than integers 2022-08-15 13:22:39 +02:00
d950a0ef5d StaticFileHandler: Adapt for Crystal 1.6
See:
 - https://github.com/crystal-lang/crystal/pull/12310
 - https://github.com/kemalcr/kemal/pull/644
2022-08-15 13:22:27 +02:00
b2c0f7efc3 Fix missing hash key: "toggleButtonRenderer" (issue #3260) 2022-08-15 10:34:52 +02:00
9e58bc19c4 Fix #3265 2022-08-13 20:23:45 +02:00
0d7e2afba4 Merge pull request #3261 from SamantazFox/routing-cleanup 2022-08-13 15:15:15 +02:00
e0d063d306 Merge pull request #3197 from weblate/weblate-invidious-translations 2022-08-13 15:14:18 +02:00
ed0ad587dc Update Indonesian translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: uwu as a service <okayokokay@protonmail.com>
2022-08-11 01:03:47 +02:00
56fe591eee Update Portuguese (Portugal) translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Tmpod <tmpod@pm.me>
2022-08-11 01:03:47 +02:00
7b9693bca4 Update German translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Pixelcode <pixelcode@dismail.de>
2022-08-11 01:03:47 +02:00
fd0417b14c Update Greek translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: THANOS SIOURDAKIS <siourdakisthanos@gmail.com>
2022-08-11 01:03:46 +02:00
89c12f2585 Update Italian translation
Co-authored-by: atilluF <atilluf@outlook.com>
2022-08-11 01:03:46 +02:00
5c71adb137 Update Norwegian Bokmål translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Petter Reinholdtsen <pere-weblate@hungry.com>
2022-08-11 01:03:46 +02:00
4c23062d1e Update Arabic translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Rex_sa <rex.sa@pm.me>
2022-08-11 01:03:46 +02:00
190b45086c Update Russian translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Егор Ермаков <eg.ermakov2016@yandex.ru>
2022-08-11 01:03:46 +02:00
008983c8e3 Update Sinhala translation
Update Sinhala translation

Add Sinhala translation

Co-authored-by: DilshanH <ntpghiran@hotmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2022-08-11 01:03:46 +02:00
cb8a375c5e routing: Directly call Kemal's add_route function 2022-08-10 20:50:49 +02:00
848a60aa9b routes: remove useless 'locale' variable in error 505 handler 2022-08-10 01:01:31 +02:00
88ea794fdb routes: move error 404 logic to its own module 2022-08-10 01:00:44 +02:00
870350fd61 routes: move before_all logic to its own module 2022-08-10 00:55:58 +02:00
1e25894f7e routing: move the remaining routes registration to a wrapper function 2022-08-10 00:48:09 +02:00
223e74569a routing: move feed routes registration to Invidious::Routing 2022-08-10 00:46:35 +02:00
0a4d793556 routing: move search routes registration to Invidious::Routing 2022-08-10 00:31:15 +02:00
5503914abe routing: move playlist routes registration to Invidious::Routing 2022-08-10 00:26:41 +02:00
906466d7fb routing: move watch/embed routes registration to Invidious::Routing 2022-08-10 00:22:40 +02:00
e2532de766 routing: move image proxy routes registration to Invidious::Routing 2022-08-10 00:20:04 +02:00
3ac4390d11 routing: move channel routes registration to Invidious::Routing 2022-08-10 00:14:26 +02:00
389ae7a573 routing: register playback routes with a function, rather than a macro 2022-08-10 00:10:29 +02:00
176247091d routing: register API routes with a function, rather than a macro 2022-08-10 00:07:47 +02:00
e22cc73f32 routing: register user routes with a function, rather than a macro 2022-08-09 23:56:34 +02:00
c23ad25899 routing: remove HEAD from HTTP methods
Kemal automatically creates an associated HEAD route for all GET routes
2022-08-09 23:39:53 +02:00
9cc0418769 Merge pull request #3249 from iv-org/improve-extractor 2022-08-07 21:58:17 +02:00
925a2c8e77 Merge pull request #3253 from amarakon/master 2022-08-07 21:54:40 +02:00
390734d86e Merge pull request #3255 from iv-org/fix-content-not-available 2022-08-07 21:40:57 +02:00
218f7be1a7 For android client send sdk version to youtube 2022-08-07 21:37:11 +02:00
246955b68a if case for sectionListRenderer 2022-08-07 10:31:42 +02:00
d24506baed Add Ytfzf to projects using Invidious 2022-08-06 20:42:08 -04:00
b0be2237fa Merge pull request #3248 from iv-org/fix-cookies 2022-08-07 01:33:11 +02:00
945394fb1a Merge pull request #3252 from SamantazFox/bump-ytapi-clients 2022-08-07 01:15:49 +02:00
19886f71f5 Merge pull request #3250 from iv-org/fix-cookies 2022-08-07 00:52:30 +02:00
23855c09dc Remove 'screen' where not required 2022-08-07 00:37:09 +02:00
618ab01cd7 Add TVHtml5 client 2022-08-07 00:36:22 +02:00
349d90b60e Add IOS clients 2022-08-07 00:32:26 +02:00
9e7c2dcdbb Move the default API key to a constant for clarity 2022-08-06 23:49:36 +02:00
f353589a53 Bump web clients versions 2022-08-06 23:47:16 +02:00
fc97929dee Bump android app version 2022-08-06 23:28:19 +02:00
3d77642a1e Disable decrypt_polling by default + add comment (#3244) 2022-08-06 17:09:10 +00:00
b55c1a35bf Set cookies to Lax 2022-08-06 19:01:57 +02:00
5df700a56e Added image tag to RSS channel for favicon rendering
https://validator.w3.org/feed/docs/rss2.html#ltimagegtSubelementOfLtchannelgt
2022-08-06 17:14:17 +02:00
0c64a86ebe crystal 1.5.0 to CI and update crystal version 2022-08-06 15:12:45 +02:00
644ba46945 Remove mentions that decrypt_polling is broken
And add notice about bandwidth usage, related to https://github.com/iv-org/invidious/issues/3234
2022-08-06 10:09:45 +00:00
4ab54f284c Merge pull request #3214 from SamantazFox/fix-scheduled-streams 2022-08-03 22:44:58 +02:00
210c2a8855 Fix updated sources not returned inside map func
This fix the issue reported in https://github.com/iv-org/invidious/issues/2055#issuecomment-1192894698
2022-07-25 12:38:17 +00:00
0ed4f1a9a4 Add unit tests for scheduled livestreams 2022-07-21 00:33:39 +02:00
7e648840a1 Move InfoException to exceptions.cr 2022-07-19 21:05:49 +02:00
5e090778ae Use alpine 3.16 for crystal 1.4.1
Until crystal 1.5 has been tested.
2022-07-19 09:12:50 +02:00
049ed114fd Separate video data fetching from parsing in videos.cr 2022-07-18 23:35:34 +02:00
88007a08f2 Merge pull request #3205 from iv-org/escape-username 2022-07-15 00:30:10 +02:00
6c4ed282bb HTML escape username 2022-07-14 21:26:58 +00:00
c8765385df Fetch data from next endpoint for scheduled streams 2022-07-14 17:56:53 +02:00
0ed22c0be0 Merge pull request #3140 from AHOHNMYC/css-ie11-fixes 2022-07-14 16:31:03 +02:00
3ffef4b9fb Merge pull request #3133 from AHOHNMYC/widen-settings-name 2022-07-14 16:27:47 +02:00
ceeebceb3a Merge pull request #3199 from AHOHNMYC/fix-js-in-embed 2022-07-14 14:28:08 +02:00
0338b26d5c Include _helpers.js in embedded view 2022-07-14 02:07:19 +03:00
6577cc0c8c Fix a dead link to Docker install documentation (#3198) 2022-07-13 19:55:06 +00:00
586000ca3d add more explanation about checking the player dependencies 2022-07-12 08:38:22 +00:00
abc81ebd08 Merge pull request #3165 from SamantazFox/small-fixes-06-2022 2022-07-11 17:41:58 +02:00
cd6c73e487 Merge pull request #3162 from 138138138/138138138-audio-quality-1 2022-07-11 17:36:28 +02:00
69ad57338f Mention why we use multiple AdaptationSet for audio 2022-07-11 17:29:42 +02:00
cbcf31a4f9 Skip OTF streams in DASH audio
Skip OTF streams, prevent creating empty AdaptationSet in DASH audio
2022-07-10 16:54:56 +08:00
b19beac5b4 Update src/invidious/views/components/player.ecr
better syntax

Co-authored-by: Samantaz Fox <coding@samantaz.fr>
2022-07-10 16:29:50 +08:00
dc6d088e30 Merge pull request #3158 from 138138138/138138138-mobileui-forward-rate 2022-07-07 00:05:25 +02:00
b0ad27af23 Merge pull request #3151 from weblate/weblate-invidious-translations 2022-07-07 00:02:36 +02:00
5f23c6358a Update Czech translation
Update Czech translation

Co-authored-by: Fjuro <fjuro@seznam.cz>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2022-07-06 23:25:13 +02:00
da776c935f Update Indonesian translation
Update Indonesian translation

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: liimee <alt3753.7@gmail.com>
Co-authored-by: uwu as a service <okayokokay@protonmail.com>
2022-07-06 23:25:12 +02:00
0a315783ef Update Portuguese (Portugal) translation
Update Portuguese (Portugal) translation

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Tmpod <tmpod@pm.me>
2022-07-06 23:25:12 +02:00
65061b0514 Update Japanese translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: uwu as a service <okayokokay@protonmail.com>
2022-07-06 23:25:12 +02:00
063e5e359e Update Turkish translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
2022-07-06 23:25:12 +02:00
f460afca35 Update Chinese (Simplified) translation
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2022-07-06 23:25:12 +02:00
66a08ace1d Update Slovenian translation
Co-authored-by: Damjan Gerl <damjan@damjan.net>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2022-07-06 23:25:11 +02:00
68e65e968a Update Portuguese translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: SC <lalocas@protonmail.com>
2022-07-06 23:25:11 +02:00
1ba0ab982b Update Croatian translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Milo Ivir <mail@milotype.de>
2022-07-06 23:25:11 +02:00
8752b8bb3f Update Finnish translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Markus Mikkonen <markus.mikkonen@outlook.com>
2022-07-06 23:25:11 +02:00
168f86ef89 Update Portuguese (Brazil) translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: The Cats <philosoph@snopyta.org>
2022-07-06 23:25:11 +02:00
85927853f9 Update Chinese (Traditional) translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Jeff Huang <s8321414@gmail.com>
2022-07-06 23:25:11 +02:00
57f60bf173 Update Ukrainian translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
2022-07-06 23:25:10 +02:00
d16c3ed40a Update Italian translation
Update Italian translation

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Pietro Cappuccino <p.cappuccino@tiscali.it>
Co-authored-by: ㅤAbsurdUsername <sgso@pm.me>
2022-07-06 23:25:10 +02:00
e90f4a2cbf Update Norwegian Bokmål translation
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2022-07-06 23:25:10 +02:00
d00839ec68 Update Russian translation
Update Russian translation

Update Russian translation

Update Russian translation

Co-authored-by: AHOHNMYC <lqwh2h2cwa@protonmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Егор Ермаков <eg.ermakov2016@yandex.ru>
2022-07-06 23:25:10 +02:00
ea35d92493 Merge pull request #3157 from 138138138/138138138-fix-captions 2022-07-06 23:22:56 +02:00
beb9894c47 Merge pull request #3124 from iv-org/add-404-status-code 2022-07-06 22:05:01 +02:00
5556a996cd Update comment for NotFoundException 2022-07-06 19:59:05 +00:00
f7b1dcc271 Don't treat LIVE_STREAM_OFFLINE playability status as an error (fixes #3155) 2022-07-04 22:24:36 +02:00
eb226e1dcf Remove all backend code related to dislikes 2022-07-04 22:24:23 +02:00
8332ad0f16 Fix syntax errors in shell scripts 2022-07-04 22:24:17 +02:00
06af5a004e Remove useless link in item forms (buttons on thumbnail) 2022-07-04 22:24:11 +02:00
ce32873ef8 Remove item (video/channel/mix) thumbnail from keyboard navigation tree 2022-07-04 22:23:56 +02:00
99bc230fe6 Fix missing hash key: "availableCountries" (Closes #3047) 2022-07-04 22:23:31 +02:00
0e3820b634 Add #to_http_params method to Query (Fixes #3148) 2022-07-04 22:21:27 +02:00
eba84dcd78 Merge pull request #3183 from 11Tuvork28/fix-selected-key-missing 2022-07-04 22:03:38 +02:00
864f27ef72 switched to extract_selected_tab for the community tab 2022-07-03 14:59:33 +02:00
a8b72d8342 Fixed community tab 2022-07-03 14:23:34 +02:00
15d2cfba90 Fix Missing hash key: "selected" (KeyError) 2022-07-03 14:03:42 +02:00
2851d993ad updated comment to represent current structure 2022-07-03 14:03:30 +02:00
3f1d88282e Update some comments 2022-06-25 19:26:14 +08:00
cc9ce916c6 Update MobileUi 2022-06-25 19:24:20 +08:00
c7d468578f Update MobileUi 2022-06-25 19:03:35 +08:00
e0f6988eb5 DASH Default to high quality m4a 2022-06-25 18:52:34 +08:00
09ff370ddc Change player.css order 2022-06-25 17:19:40 +08:00
32ecf30c82 Add audioTrackButton 2022-06-25 17:19:11 +08:00
a62adccd3d change lang to label
lang has to be BCP 47 standard. Using label also can let video.js know there are 2 audio tracks.
2022-06-25 16:33:02 +08:00
c75bf35f59 Update DASH format to serve 2 audio to player
player.audioTracks() can successfully show
tracks_: Array(2)
2022-06-24 17:26:30 +08:00
3013782b7b formatting 2022-06-23 03:03:54 +08:00
81abebd144 Highest quality m4a on audio only mode as default
Audio mode will automatically select highest quality m4a as default.
2022-06-23 02:27:46 +08:00
140b6c1227 DASH playback force highest quality m4a
Since VideoJS is unable to handle adaptive audio quality, the best audo quality is forced for every video quality.
2022-06-23 02:13:22 +08:00
ac685f65e9 Fix captions
textTracks 0 in DASH mode shows debug messages.
Use textTracks 1 in DASH mode, and textTracks 0 in non-DASH mode and audio mode.
2022-06-23 01:01:11 +08:00
f6b1cbd5d0 Player MobileUi fast forward/backward rate
The fast forward/backward seconds will be adjusted according to playback rate (same as YouTube app behavior).
5 seconds is used when the playback rate is 1x. Previously it was 10 seconds. I believe most of the users watch videos at 2x, so the change will not be obvious.
2022-06-22 19:33:02 +08:00
7db6e43e3f Fix captions
Captions should automatically show according to preferences.
2022-06-22 19:10:46 +08:00
6c73614a47 Bump revision for crystal alpine package on Docker 2022-06-13 13:18:37 +02:00
b5c54b4e41 Merge pull request #3137 from SamantazFox/add-hashtags
Add hashtags
2022-06-09 00:35:09 +02:00
8f1c84e6d4 Merge pull request #3119 from GauthierPLM/popular-enabled
Add "Popular Enabled: " string to localisation
2022-06-09 00:34:11 +02:00
d1df4af734 Merge pull request #3118 from weblate/weblate-invidious-translations
Translations update from Hosted Weblate
2022-06-09 00:33:44 +02:00
23cd04fe88 Merge pull request #3116 from DoodlesEpic/fix-reddit-comments-nojs-ytkids
Fix document is empty error on yt kids video when reddit comments are enabled
2022-06-09 00:33:09 +02:00
dbc7c97e0b Merge pull request #3103 from SamantazFox/add-utility-scripts
Add utility scripts
2022-06-09 00:32:44 +02:00
2313ca8f72 Merge pull request #3084 from AHOHNMYC/js-helpers-polyfills
JS refactoring part 2: helper functions, poyfills
2022-06-09 00:30:34 +02:00
9418ba1687 Update Bengali translation
Update Bengali translation

Add Bengali translation

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Oymate <dhruboadittya96@gmail.com>
2022-06-09 00:12:33 +02:00
233491940c Update Indonesian translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: I. Musthafa <i.musthafa66@gmail.com>
2022-06-09 00:12:33 +02:00
7708e7ab08 Update Slovenian translation
Update Slovenian translation

Co-authored-by: Damjan Gerl <damjan@damjan.net>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2022-06-09 00:12:32 +02:00
600bd38630 Update Portuguese translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: SC <lalocas@protonmail.com>
2022-06-09 00:12:32 +02:00
f7290dfcb6 Update Croatian translation
Update Croatian translation

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Milo Ivir <mail@milotype.de>
2022-06-09 00:12:32 +02:00
e22f7583eb Update Ukrainian translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
2022-06-09 00:12:32 +02:00
c0e85f5687 Update Russian translation
Co-authored-by: AHOHNMYC <lqwh2h2cwa@protonmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2022-06-09 00:12:32 +02:00
3593f67eb6 Fix: related videos is a Hash(String, String) 2022-06-08 23:57:16 +02:00
1b251264a6 Pull submodules during CI 2022-06-08 23:57:15 +02:00
93c1a1d42e Add mocks as a submodule 2022-06-08 23:56:40 +02:00
d7f6b6b018 Fix CI: support reloadContinuationItemsCommand containers 2022-06-08 23:56:40 +02:00
fd99f20404 Fix CI: use be_close() with 1s delta for Time comparisons 2022-06-08 23:56:40 +02:00
2b1e1b11a3 Fix CI: support BADGE_STYLE_TYPE_VERIFIED_ARTIST 2022-06-08 23:56:40 +02:00
96ac7f9f35 Add hashtag extractor spec 2022-06-08 23:56:40 +02:00
33da64a669 Add support for hashtags 2022-06-08 23:56:40 +02:00
38eb4ccbc4 CSS. Small IE11 fixes 2022-06-06 21:51:47 +03:00
a57414307e CSS. Small IE11 fixes 2022-06-06 01:10:00 +03:00
7ad111e2f6 Update actions used in GH workflows (#3138) 2022-06-05 22:05:19 +02:00
a402128a7d Move _helpers.js include from various .ecr's into template.ecr head tag 2022-06-05 21:19:59 +03:00
d3ab4a5145 JS. Trailing spaces removed 2022-06-05 20:54:48 +03:00
4ae77bcef9 Remove rating display from the frontend 2022-06-04 15:39:04 +02:00
e84416e56d Remove dislikes icon (#3092) 2022-06-04 12:58:34 +02:00
59ccc9d73e Merge pull request #3134 from lhc-sudo/patch-1
Add TubiTui to Projects Using Invidious section of README.md
2022-06-01 20:21:55 +02:00
777
1533a28817 Add TubiTui to Projects Using Invidious section 2022-06-01 18:48:52 +01:00
7e4840867e CSS. Wider settings name to less word wrap 2022-06-01 17:16:07 +03:00
f2f3f045e5 fix time adding dirung redirection 2022-05-31 12:18:42 +03:00
b12149bafd Save time during redirection on another instance 2022-05-31 11:58:12 +03:00
307c1b0b62 Merge pull request #3128 from arekf/patch-1
Add Yattee to README
2022-05-29 19:56:30 +02:00
b201745988 Markdown enhancement 2022-05-29 19:56:11 +02:00
352266481e Add Yattee to README 2022-05-29 19:46:49 +02:00
c201ea53ba Add 404 status code on all possible endpoints 2022-05-27 14:06:38 +00:00
958867e92b Fix wrong french translation
Co-authored-by: Samantaz Fox <coding@samantaz.fr>
2022-05-25 23:41:12 +02:00
b50de2f2ed Add "Popular Enabled: " string to localisation 2022-05-25 20:58:58 +00:00
ad37db4c82 Fix document is empty error on yt kids video when reddit comments are enabled 2022-05-24 20:34:36 -03:00
c2d91c9544 Merge pull request #3112 from Froggo8311/Change-Badge-Mastodon-Fediverse
Change README.md badge from 'Mastodon' to 'Fediverse'
2022-05-24 13:41:27 +02:00
6eedca6e7e Fix alt text for readme badge (Mastodon -> Fediverse) 2022-05-23 20:55:08 -05:00
0bd1d0bb05 Change from 'Mastodon' to 'Fediverse'
Mastodon is one of multiple softwares that compose the Fediverse ("Federeated Universe"). Some of the most popular softwares include Misskey, Plemora, PeerTube, and Pixelfed, among others. 

As each instance (server) integrates using ActivityPub, any one of these softwares can be used to follow users or reply to posts(/toots/notes) on any instance.

Most people seem to not realize that Mastodon is different from the "umbrella term" Fediverse. :)
2022-05-23 20:51:52 -05:00
1f359f5a13 Print some helpful notice for PostgreSQL configuration 2022-05-21 19:18:01 +02:00
fe53b5503c Add a script to start postgres and create user/DB 2022-05-21 19:06:45 +02:00
d66ef8fe22 Add a script to install dependencies 2022-05-21 19:06:45 +02:00
6ff3a633f7 Merge pull request #2968 from mathiusD/description-link 2022-05-21 18:58:47 +02:00
46891437e9 Add Estonian to i18n.cr 2022-05-21 18:39:49 +02:00
b729597728 comment changed
extra spaces removed
2022-05-21 19:30:51 +03:00
f99d139025 Merge pull request #3058 from weblate/weblate-invidious-translations 2022-05-21 18:24:56 +02:00
b72b917af2 handled invalid values in storage
partial rewrite notifications.js
innerText to textContent
fixed bug with clamping
2022-05-21 13:35:41 +03:00
749869fdca Update translation files
Updated by "Remove blank strings" hook in Weblate.

Update Estonian translation

Add Estonian translation

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Koshkov <jedrikwojcik@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-05-19 23:18:58 +02:00
e56a694878 Update Czech translation
Co-authored-by: Fjuro <fjuro@seznam.cz>
2022-05-19 23:18:58 +02:00
8cb4d1dc28 Update Portuguese (Brazil) translation
Co-authored-by: André Marcelo Alvarenga <andrealvarenga@gmx.net>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2022-05-19 23:18:58 +02:00
68f1351507 Update Arabic translation
Co-authored-by: Light <0f723d5979@catdogmail.live>
2022-05-19 23:18:58 +02:00
66205286e4 Update Hindi translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Saurmandal <saurmandal@protonmail.com>
2022-05-19 23:18:58 +02:00
32be373552 Invert title & video ID in downloaded file name
Fixes a regression of #2922
Issue reported by email
2022-05-19 23:16:51 +02:00
b1128c17f1 Merge pull request #3099 from SamantazFox/fix-3096
Fix for #3096
2022-05-19 23:05:17 +02:00
319bbd2f81 JS code minor formatting
Co-authored-by: Samantaz Fox <coding@samantaz.fr>
2022-05-19 07:15:17 +03:00
d8fb4f0a87 Update text_to_parsed_content for add docs
Follow this comment :
https://github.com/iv-org/invidious/pull/2968#discussion_r851808433
2022-05-18 23:45:47 +02:00
2e195575a6 Rename uriMatch to urlMatch inside comments.cr
This refactor update text_to_parsed_content method
2022-05-18 23:45:47 +02:00
28efeaa4f2 Update management of channel description
Follow this comment :
https://github.com/iv-org/invidious/pull/2968#issuecomment-1066428317
2022-05-18 23:45:28 +02:00
137534f901 Fix for #3096 2022-05-18 23:36:50 +02:00
c9594d46af Add links redirect inside channel description 2022-05-18 23:24:41 +02:00
1097648f0a Fix HTML validation. This is how browser really split tags 2022-05-17 10:09:01 +03:00
17e6213448 Less player reload timeout 2022-05-17 10:03:07 +03:00
2ea423032e Share video regression. Single quotes are required 2022-05-17 09:43:05 +03:00
2dead1a19b JS theme switching simplified 2022-05-16 13:51:28 +03:00
e18b10297b JS fixes: recursion in themes, keys for frame walking, JSON XHR and details-summary in IE11 2022-05-16 13:13:00 +03:00
fd66084388 js code rewrite. Themes rewritten, bugs fixed 2022-05-15 08:38:46 +03:00
ca27e096f3 Merge pull request #3094 from rfwatson/remove-puts-statements
Remove puts statements in config.cr
2022-05-11 17:49:45 +02:00
125997f45f Remove puts statements in config.cr 2022-05-11 10:22:39 +02:00
da8a2c7bbb Merge pull request #3087 from iv-org/fix-captions-download
Fix download of captions
2022-05-07 15:39:23 +02:00
81ca205caa Fix download of captions 2022-05-07 15:34:56 +02:00
f06d5b973b jsdoc type fix 2022-05-06 07:42:15 +03:00
fd890f9c0a fix helpers storage 2022-05-06 07:21:19 +03:00
835237382f fix helpers 2022-05-06 06:16:41 +03:00
7dd699370f js code rewrite. Created _helpers.js with XHR and storage wrapper 2022-05-06 04:46:59 +03:00
ef8c7184de Merge pull request #3083 from iv-org/add-slovenian
Add Slovenian to i18n.cr
2022-05-04 22:40:13 +02:00
92026c1f98 Merge pull request #3082 from weblate/weblate-invidious-translations
Translations update from Hosted Weblate
2022-05-04 22:36:52 +02:00
9bd9dcc41c Add Slovenian to i18n.cr 2022-05-04 22:36:31 +02:00
81b97ba52f Update Slovenian translation
Add Slovenian translation

Co-authored-by: Damjan Gerl <damjan@damjan.net>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2022-05-04 22:30:08 +02:00
ae36777d14 Update Portuguese (Brazil) translation
Co-authored-by: Vinicius <rodriguessv30@gmail.com>
2022-05-04 22:30:07 +02:00
3d7ad82f3e Update Dutch translation
Co-authored-by: Gert-dev <qnyasgjhapqyuhoibr@kiabws.com>
2022-05-04 22:30:07 +02:00
059796c60d Merge pull request #3076 from SamantazFox/fix-3062-3063
Fix regressions of #2936
2022-05-04 22:29:10 +02:00
b0342b7449 Other minor fixes 2022-05-03 22:28:19 +02:00
b867dd82ca Merge pull request #3077 from SamantazFox/verified-checkmark
Merge "Youtube verification badge" again (with fixes)
2022-05-02 23:57:01 +02:00
a122286d48 Add Hindi to i18n.cr 2022-05-02 20:49:12 +02:00
837db800bc Merge pull request #3080 from weblate/weblate-invidious-translations
Translations update from Hosted Weblate
2022-05-02 19:30:21 +02:00
44fe39821a Update Portuguese (Brazil) translation
Co-authored-by: Vinicius <rodriguessv30@gmail.com>
2022-05-02 19:28:57 +02:00
fbc6b14424 Update Russian translation
Co-authored-by: Егор Ермаков <eg.ermakov2016@gmail.com>
2022-05-02 19:28:57 +02:00
9c00140464 Update Hindi translation
Add Hindi translation

Co-authored-by: Creeper <abhijit.naug@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2022-05-02 19:28:57 +02:00
00d8deda0e Merge pull request #3065 from 138138138/master
Fix iOS 3 buttons separated lines
2022-05-02 19:28:38 +02:00
b84ce6a556 Fix "cast from Nil to Bool failed" 2022-05-01 21:11:12 +02:00
f5fb4c6c64 Apply 2859.diff 2022-05-01 21:10:43 +02:00
ac686fefe1 Merge pull request #3075 from SamantazFox/video-api-newpipe-compat-2
Video API: Improve NewPipe compatibility (part 2)
2022-05-01 19:11:59 +02:00
e690e166b0 Fix javascript:void(0) instead of youtu.be links 2022-05-01 18:48:08 +02:00
6a02dd8842 Fix broken hashtag links 2022-05-01 17:42:53 +02:00
66e2c01a3e Merge pull request #3073 from iv-org/SamantazFox-patch-1
Revert html escaping of backtrace
2022-05-01 17:30:20 +02:00
7f2176d7fc Add 'targetDurationSec' and 'maxDvrDurationSec' to videos API 2022-05-01 17:21:10 +02:00
4434889270 Merge pull request #3072 from weblate/weblate-invidious-translations
Translations update from Hosted Weblate
2022-05-01 13:57:07 +02:00
96afc1a45d Revert html escaping of backtrace 2022-05-01 13:40:02 +02:00
dbe49610a1 Update Russian translation
Co-authored-by: AHOHNMYC <lqwh2h2cwa@protonmail.com>
2022-05-01 11:13:03 +02:00
62fadb54ee Update Hungarian translation
Co-authored-by: f3rr31 <5920873@disroot.org>
2022-05-01 11:13:03 +02:00
3832383936 Update English (United States) translation
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
2022-05-01 11:13:03 +02:00
595c3fb833 Revert "Youtube verification badge" (#3070) 2022-04-30 23:42:38 +02:00
1d25c55c0b Merge pull request #2859 from jonas-w/verified-badge
Youtube verification badge
2022-04-30 18:54:38 +02:00
6376e78e0b Merge pull request #3054 from DUOLabs333/patch-1
Widen Youtube player seek bar a little
2022-04-30 18:53:36 +02:00
1f08d2929c Fix iOS 3 buttons separated lines 2022-04-30 16:55:12 +08:00
04953d97ad Merge pull request #3064 from iv-org/crystal1.4.1
bump to crystal 1.4.1
2022-04-29 19:06:55 +02:00
64fe4de3fb bump to crystal 1.4.1 2022-04-29 06:16:54 +00:00
58008445e2 Merge pull request #3060 from SamantazFox/video-api-newpipe-compat
Video API: Improve NewPipe compatibility
2022-04-27 21:58:03 +02:00
b7f0b054b8 It's OTF, not OFT 2022-04-27 21:46:45 +02:00
3bbd709bd6 Merge pull request #3045 from AHOHNMYC/js-lint
Js lint
2022-04-27 18:32:40 +02:00
dbb1e3f5d8 replace tabs to spaces 2022-04-27 15:01:34 +03:00
8144308aee Add extra data to 'adaptiveFormats' in videos API 2022-04-27 00:22:34 +02:00
0503d2a9f3 Fix 'adaptiveFormats' not available for livestreams in videos API 2022-04-27 00:22:10 +02:00
fafd4d9396 new lines in the end of file 2022-04-25 13:14:08 +03:00
3431a1b1de console.warn and info instead of log 2022-04-25 12:54:32 +03:00
026ea52445 optional catchng is not supported by IE11 2022-04-25 12:54:31 +03:00
1e60b9a322 destructing binding is not supported by IE11 2022-04-25 12:54:31 +03:00
7450cb1f21 default parameters 2022-04-25 12:54:30 +03:00
cdd5a9e935 replace huphen-minus to real minus 2022-04-25 12:54:30 +03:00
c4cc50ca39 replace innerHTML to safer textContent where possible 2022-04-25 12:54:30 +03:00
9b09d369d9 add variable declarations 2022-04-25 12:54:25 +03:00
12ab11413f fix double variable declaration 2022-04-25 10:17:15 +03:00
352f3640cf transform template string 2022-04-25 10:17:12 +03:00
7940e91cbe single quotes 2022-04-25 10:15:57 +03:00
577a2356a0 convert arrow functions 2022-04-25 10:14:29 +03:00
38ef0b10e7 eqeqeq 2022-04-25 10:14:24 +03:00
c72d3c4a0e semicolons 2022-04-25 10:13:00 +03:00
eb7e48b059 use strict 2022-04-25 10:12:16 +03:00
ab62fa1c4f Lower margin-bottom some more 2022-04-24 19:51:29 -04:00
a7cf1f6cca Update player.css
Fixed "floating" seek bar
2022-04-24 19:06:28 -04:00
80d89f31fe Widen Youtube player a bit 2022-04-24 18:06:56 -04:00
a0f566fef3 Merge pull request #3052 from weblate/weblate-invidious-translations
Translations update from Hosted Weblate
2022-04-24 23:39:47 +02:00
c93d362dd4 Update Albanian translation
Co-authored-by: Besnik Bleta <besnik@programeshqip.org>
2022-04-24 17:32:14 +02:00
db72f5d011 Update French translation
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
2022-04-24 17:32:13 +02:00
03704384a8 Update Slovak translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Juraj Liso <lisojuraj@gmail.com>
2022-04-24 17:32:13 +02:00
5b17ec0b56 Update Finnish translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Markus Mikkonen <markus.mikkonen@outlook.com>
2022-04-24 17:32:13 +02:00
d4acd03698 Merge pull request #3044 from MathiusD/base-time-code-lost
Fix regression related of timestamp 0:00
2022-04-24 17:32:01 +02:00
2ea986326d Bump videojs to 7.12.1 (#3011) 2022-04-22 22:37:45 +02:00
da53de2097 Fix regression related of timestamp 0:00 2022-04-20 00:42:09 +02:00
cf755dec22 Merge pull request #3027 from weblate/weblate-invidious-translations
Translations update from Hosted Weblate
2022-04-18 15:57:51 +02:00
d25e5e1849 Update Italian translation
Update Italian translation

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:10 +02:00
593648780f Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:10 +02:00
bb04ff5942 Update Dutch translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:10 +02:00
12db276eb8 Update Albanian translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:10 +02:00
596fc3e908 Update Portuguese translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:10 +02:00
9c54b94265 Update Korean translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:09 +02:00
3c1cfce95a Update Vietnamese translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:09 +02:00
2f9f3142e2 Update Lithuanian translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:09 +02:00
92070e502c Update Serbian translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:09 +02:00
48b1154a71 Update Czech translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Fjuro <fjuro@seznam.cz>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:09 +02:00
bcdfb98454 Update Hebrew translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:08 +02:00
f26c1f8095 Update Danish translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:08 +02:00
790a24bdeb Update Croatian translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:08 +02:00
5d2b9392d5 Update Indonesian translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:08 +02:00
6be242fc15 Update Persian translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:08 +02:00
8158c5042b Update Portuguese (Portugal) translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:07 +02:00
c70cdd88c7 Update Swedish translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:07 +02:00
bc6d6b6550 Update Serbian (cyrillic) translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:07 +02:00
9584d8e16d Update Portuguese (Brazil) translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:07 +02:00
4693c678d0 Update Romanian translation
Co-authored-by: Dorian Oszczęda <vxern@wordcollector.co.uk>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2022-04-18 15:56:07 +02:00
2c7d668f81 Update Japanese translation
Update Japanese translation

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:06 +02:00
de2f963717 Update Turkish translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:06 +02:00
e83da76dc7 Update Chinese (Simplified) translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:06 +02:00
643730221d Update Greek translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:06 +02:00
ab63f9ef31 Update Ukrainian translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Denys Nykula <nykula@ukr.net>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:06 +02:00
dc870c4cc4 Update Esperanto translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:05 +02:00
dd709dec18 Update Spanish translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hin Weisner <translatu.godwit@aleeas.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:05 +02:00
cd5b71aedd Update French translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:05 +02:00
d33cc025ee Update Norwegian Bokmål translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:05 +02:00
e7159f2803 Update Arabic translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:05 +02:00
56b8a18820 Update Polish translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:04 +02:00
5832794034 Update German translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:04 +02:00
a26b197687 Update Russian translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:04 +02:00
12dba0955a Update Chinese (Traditional) translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Jeff Huang <s8321414@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:04 +02:00
7bd425bb3d Update Hungarian translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:04 +02:00
845ad17a04 Update Finnish translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-04-18 15:56:03 +02:00
67e8fcaf93 bump to crystal 1.4.0 (#3041) 2022-04-18 09:05:18 +02:00
aa07ee22cf Merge pull request #3039 from iv-org/SamantazFox-patch-1
Fix comment "pings" (#3038)
2022-04-17 23:34:38 +02:00
3702e8c6fe Fix comment "pings" (#3038) 2022-04-17 18:02:47 +02:00
21bd4edee4 Merge pull request #3034 from AHOHNMYC/http-fix
Remove insecure protocol in embedded view
2022-04-17 12:08:54 +02:00
31de39a7a4 Remove insecure protocol in embedded view 2022-04-17 04:32:15 +03:00
d0fc2569ff Merge pull request #2934 from SamantazFox/bump-kemal
Bump kemal dependency to v1.1.2
2022-04-17 00:12:00 +02:00
4fd1631b30 Update crystal version in CI 2022-04-16 22:49:56 +02:00
0a1614a872 Also move the other Kemal class override to src/ext/ 2022-04-16 22:48:24 +02:00
1f66d7ef74 Keep using kilt for rendering
Directly using Crystal's ECR seems to be causing issues, so
don't use kemal's 'render' macro and patch 'content_for' to
have the same behavior as before Kemal v1.1.1
2022-04-16 22:48:24 +02:00
84b6429ca6 Fix error due to templating engine change 2022-04-16 22:48:24 +02:00
212e5ebab5 Also bump 'exception_page', a kemal dependency 2022-04-16 22:48:24 +02:00
a6106077bd Bump kemal to v1.1.2 2022-04-16 22:48:24 +02:00
fa4ce6b4e6 Merge pull request #3033 from SamantazFox/search-fixes
Search fixes
2022-04-16 20:32:41 +02:00
4130136718 Merge pull request #2936 from MathiusD/expand-link
Increase size of links displayed in video description
2022-04-16 20:31:28 +02:00
c7c1b8d4f1 Fix issues in Search::Query 2022-04-16 20:25:25 +02:00
25b60a1b90 Add spec for the Search::Query class 2022-04-16 20:24:50 +02:00
dda4dadfa3 Merge pull request #3031 from AHOHNMYC/fix-filter-checkbox
Fix filter checkbox
2022-04-16 13:21:19 +02:00
570dbc7b47 Fix filter checkbox
Due to different prefixes in id (`filter-features` in `input` and `filter-feature` in `label`) click on `label` didn't affect corresponding checkbox.
2022-04-16 08:58:45 +03:00
6c122248f5 Update regex reduce_uri utils
Follow this comment :
https://github.com/iv-org/invidious/pull/2936#discussion_r850712676
2022-04-14 22:42:21 +02:00
4a369bb3c0 Merge pull request #3023 from AHOHNMYC/improve-filters-visual
Filters visual improvement
2022-04-14 20:36:53 +02:00
95cf57e3bd Merge pull request #3026 from iv-org/revert-2928-bump-dependencies
Revert "Bump dependencies"
2022-04-14 18:35:06 +02:00
0e6f7a4dc1 Revert "Bump dependencies" 2022-04-14 17:59:22 +02:00
6f21834e71 Real minus sign instead of hyphen-minus
Minus sign in comparison with hyphen-minus (symbol that prints your keyboard by default) has horizontal line on same level as plus sign and same width, so one can be toggled to another with perfect visuals.
https://en.wikipedia.org/wiki/Plus_and_minus_signs
https://en.wikipedia.org/wiki/Hyphen-minus
2022-04-13 04:23:10 +03:00
cf6ad254fb Pointer cursor on Filters `summary'
`summary` clickable by design, but by default (at least in Chrome) it has `text` cursor.
2022-04-13 04:15:37 +03:00
fabbecf4c2 Merge pull request #2928 from SamantazFox/bump-dependencies
Bump dependencies
2022-04-09 20:36:09 +02:00
8262aa4138 Merge pull request #2895 from MathiusD/master
Persist player volume/speed
2022-04-09 20:05:28 +02:00
95d86ebf22 Sanity check + comment why we add a leading dot 2022-04-09 20:04:42 +02:00
6aa7db2358 Minor code/comments cleaning 2022-04-09 19:58:49 +02:00
5637c6e651 Merge pull request #3013 from iv-org/rescue-db-errors-get-video
Rescue DB errors in get_video()
2022-04-09 19:35:49 +02:00
Leo
6f705b053a Updates the URL of the var url_faq (#3016) 2022-04-09 08:20:28 +02:00
1f3f2788d4 Merge pull request #3002 from weblate/weblate-invidious-translations
Translations update from Hosted Weblate
2022-04-09 01:59:39 +02:00
ed3c202099 Update Ukrainian translation
Co-authored-by: Denys Nykula <nykula@ukr.net>
2022-04-09 01:58:20 +02:00
0396eec398 Update Norwegian Bokmål translation
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
2022-04-09 01:58:20 +02:00
62dcec49e4 Update German translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Pixelcode <pixelcode@dismail.de>
2022-04-09 01:58:20 +02:00
2f6afb5e86 Update Danish translation
Co-authored-by: Grooty12 <Rasmus@rosendahl-kaa.name>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2022-04-09 01:58:20 +02:00
a3a2b2aafb Replace "Github" by "GitHub" 2022-04-09 01:57:51 +02:00
4900ce24fa Merge pull request #2956 from SamantazFox/search-filters
Overhaul search filters
2022-04-08 23:49:03 +02:00
135aaf56fd Rescue DB errors in get_video() 2022-04-08 22:52:34 +02:00
62d7abdd9e Add a user friendly message for when no results are found 2022-04-08 22:28:43 +02:00
91b079f4df Merge pull request #3007 from iv-org/TheFrenchGhosty-postgres13
Set the Postgres version to 13 as a temporary workaround for #2938
2022-04-04 20:37:10 +00:00
2c6cd74dc1 Set the Postgres version to 13 as a temporary workaround for #2938 2022-04-04 20:36:45 +00:00
68ac18dc98 Remove useless call
Follow this comment :
https://github.com/iv-org/invidious/pull/2936#discussion_r841277735
2022-04-03 23:26:34 +02:00
dbc74164ab Clean up CSS and add light/dark theme support 2022-04-03 22:56:54 +02:00
76c7b2ee9c Normalize translation keys in other locales (3/3) 2022-04-03 22:28:11 +02:00
d6913c1eb9 Normalize translation keys in other locales (2/3) 2022-04-03 22:28:11 +02:00
9aa00b2f0a Normalize translation keys in other locales (1/3) 2022-04-03 22:28:11 +02:00
af02917766 Code cleanup 2022-04-03 22:28:11 +02:00
d93a7b315d Make use of Search::Query/Filters and associated HTML generator 2022-04-03 22:27:52 +02:00
a813955ad3 Add Search::Query class to handle search queries 2022-04-03 20:03:34 +02:00
1e3425fdee Add filters UI HTML generator 2022-04-03 20:01:24 +02:00
a2b326e306 Merge pull request #2993 from weblate/weblate-invidious-translations
Translations update from Hosted Weblate
2022-04-03 15:07:22 +02:00
0fa0e8e3f3 Merge pull request #2990 from 138138138/master
Safari audio double duration fix for iOS 15
2022-04-03 15:01:30 +02:00
dbae7502e5 Update Italian translation
Co-authored-by: Renix <kastletxd@protonmail.com>
2022-03-30 19:52:43 +02:00
f47552c0c4 Update Norwegian Bokmål translation
Co-authored-by: Petter Reinholdtsen <pere-weblate@hungry.com>
2022-03-30 19:52:43 +02:00
74836828c9 Update Finnish translation
Co-authored-by: Markus Mikkonen <markus.mikkonen@outlook.com>
2022-03-30 19:52:43 +02:00
c152243b4d new method for bypassing age restriction (#2996) 2022-03-30 19:52:39 +02:00
2a40c9a595 Merge pull request #2997 from iv-org/TheFrenchGhosty-patch-1
Update the documentation documents links in the README
2022-03-29 20:40:08 +00:00
3cea493d49 Update the documentation documents links in the README 2022-03-29 20:39:59 +00:00
6991d0851f Add a function to generate HTTP::Params from Filters 2022-03-29 20:31:23 +02:00
fb2a331f79 Add a function to parse search filters from invidious URL params 2022-03-29 20:31:23 +02:00
c888524523 Add a function to parse invidious legacy search filters 2022-03-29 20:31:23 +02:00
75c9dbaf6b Add a function to parse youtube search parameters 2022-03-29 20:31:23 +02:00
c01a29fe76 Add a function to build youtube search filters
(it aims at replacing produce_search_params)
2022-03-29 20:31:23 +02:00
80417281c4 Add a struct for search filters 2022-03-29 20:31:23 +02:00
f9b8bc006f Create a search processors module 2022-03-29 20:31:23 +02:00
2c22b0839f Safari audio double duration fix for iOS 15
The previous method breaks Always Loop feature on iOS 15.
The previous player.currentTime(player.duration() + 1) sometimes breaks the entire player.
Now it jumps to (end - 1) seconds when the time goes between over half and (end - 2) seconds.
With Always Loop on, player will jump to the beginning after 1 second.
2022-03-27 18:32:00 +08:00
ec3e67e0d2 Wait that was too much replacing 2022-03-26 20:18:24 +01:00
611e7e9dd8 Changed icon to checkmark and for verified author to checkmark-circle 2022-03-26 20:13:33 +01:00
f4e19ac05c Merge pull request #2983 from llsc12/master
Add WatchTube
2022-03-23 22:18:45 +01:00
70663af190 Add WatchTube 2022-03-22 17:41:15 +00:00
ed265cfdcd Request minified JSON from innertube (#2974) 2022-03-16 09:07:30 +01:00
5b82370bc3 Merge pull request #2961 from weblate/weblate-invidious-translations
Translations update from Hosted Weblate
2022-03-15 07:59:56 +01:00
47690fffc1 Merge pull request #2965 from AHOHNMYC/patch-2
Uppercase some first letters in language selector
2022-03-13 23:14:23 +01:00
aa09bbe23d Done some refactoring 2022-03-13 20:16:30 +01:00
a09fbad8b0 Merge branch 'iv-org:master' into verified-badge 2022-03-13 19:06:52 +01:00
357ba2f4f6 Uppercase some first letters 2022-03-13 08:53:27 +03:00
b32dd746a6 Update Indonesian translation
Co-authored-by: I. Musthafa <i.musthafa66@gmail.com>
2022-03-11 20:51:15 +01:00
b4ea1ccc23 Update Basque translation
Update Basque translation

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Izei <mikelbre@gmail.com>
2022-03-11 20:51:15 +01:00
2aecbfbb67 Update Czech translation
Co-authored-by: Fjuro <fjuro@seznam.cz>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2022-03-11 20:51:15 +01:00
6d3b907307 Update --help to mention that --migrate is still in beta 2022-03-11 20:51:12 +01:00
55da1e3e92 Merge pull request #2878 from matthewmcgarvey/migrations
Add custom migration implementation
2022-03-11 20:49:26 +01:00
f3aa0d6428 Merge pull request #2960 from weblate/weblate-invidious-translations
Translations update from Hosted Weblate
2022-03-10 00:22:10 +01:00
ad89be7523 Update Italian translation
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
2022-03-09 23:54:05 +01:00
49a7c16de5 Update Greek translation
Co-authored-by: THANOS SIOURDAKIS <siourdakisthanos@gmail.com>
2022-03-09 23:54:05 +01:00
e414476c6e Update Spanish translation
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
2022-03-09 23:54:05 +01:00
391690d570 Update Lithuanian translation
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
2022-03-09 23:54:05 +01:00
1be4af733b Update Croatian translation
Co-authored-by: Milo Ivir <mail@milotype.de>
2022-03-09 23:54:04 +01:00
e3222d99ac Update Swedish translation
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
2022-03-09 23:54:04 +01:00
5b19d33387 Update Russian translation
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
2022-03-09 23:54:04 +01:00
272c85c062 Update Czech translation
Co-authored-by: Fjuro <fjuro@seznam.cz>
2022-03-09 23:54:04 +01:00
7101af764a Update German translation
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
2022-03-09 23:54:04 +01:00
e582d25654 Update Arabic translation
Co-authored-by: Rex_sa <rex.sa@pm.me>
2022-03-09 23:54:04 +01:00
9991c4507d Update Japanese translation
Co-authored-by: GnuPGを使うべきだ <dieeeazpnnqbpddh@cock.email>
2022-03-09 23:54:03 +01:00
37b3248202 Update English (United States) translation
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
2022-03-09 23:54:03 +01:00
0585131f78 Update Finnish translation
Co-authored-by: Markus Mikkonen <markus.mikkonen@outlook.com>
2022-03-09 23:54:03 +01:00
7e351b21bc Fix broken links (#2958) 2022-03-09 15:24:32 +01:00
440549fcc5 Merge pull request #2952 from iv-org/SamantazFox-patch-1
API: fix suggestions not workin
2022-03-07 15:52:50 +00:00
f7b557eed1 API: fix suggestions not workin
Closes #2914 
Thanks to @TiA4f8R for the help
2022-03-06 01:12:57 +01:00
bdfe317e20 Fix deprecated helm chart dependency (#2944) 2022-03-03 16:09:13 +01:00
19805b91d9 Patch links related to youtube.com
Related to followings comments :
- https://github.com/iv-org/invidious/pull/2936#discussion_r815253405
2022-02-26 17:53:39 +01:00
420c458b6a Update links related to youtube.com
Following comment at :
- https://github.com/iv-org/invidious/pull/2936#discussion_r814435888
2022-02-25 21:07:12 +01:00
6de449811d Merge branch 'iv-org:master' into verified-badge 2022-02-25 19:29:12 +01:00
081fd541af Merge pull request #2939 from iv-org/dockerfile-fix
Fix the Dockerfile sed command
2022-02-25 18:25:06 +00:00
7dcd5035c0 Fix the Dockerfile sed command (Closes #2938) 2022-02-25 19:01:14 +01:00
0f1bb3fb3b Update reduce_uri signature
Following request_change at :
- https://github.com/iv-org/invidious/pull/2936#discussion_r814436660
2022-02-25 11:47:07 +01:00
78c447829a Increase size of links displayed in video description 2022-02-25 02:11:30 +01:00
7f445f6167 Merge pull request #2915 from MathiusD/RefreshChannelsJob-frenquency
Allow configuration of the time between 2 RefreshChannelsJob
2022-02-25 00:04:48 +01:00
bf599284ed Merge pull request #2935 from weblate/weblate-invidious-translations
Translations update from Hosted Weblate
2022-02-24 22:54:48 +01:00
a21c10e209 Update Chinese (Traditional) translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Jeff Huang <s8321414@gmail.com>
2022-02-24 22:53:10 +01:00
56ee44ee09 Update Chinese (Simplified) translation
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2022-02-24 22:53:10 +01:00
c6df54a103 Update French translation
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
2022-02-24 22:53:10 +01:00
575b039170 Merge pull request #2922 from SamantazFox/download-widget-fix
Download widget fix
2022-02-24 22:53:06 +01:00
7a32269d7f Merge pull request #2925 from matthewmcgarvey/routes-final
Move last remaining routes in main file to new pattern
2022-02-24 22:49:01 +01:00
004e371051 Don't double-encode file title 2022-02-24 22:37:54 +01:00
d5f43bae92 Combine notifications endpoints and move them 2022-02-23 22:45:07 -06:00
e215a20a0a Move live endpoints into Channels route 2022-02-23 22:41:34 -06:00
919413e2b9 Move captcha endpoint into Login route 2022-02-23 22:39:43 -06:00
45839f8d59 Merge pull request #2932 from weblate/weblate-invidious-translations
Translations update from Hosted Weblate
2022-02-24 00:09:11 +01:00
55b62f9fde Update Icelandic translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-02-23 23:57:45 +01:00
4c3529f3d5 Update Turkish translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
2022-02-23 23:57:45 +01:00
ab7580c0da Update Polish translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Tsuki <sech1p@disroot.org>
2022-02-23 23:57:45 +01:00
25c079fded Update Spanish translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
2022-02-23 23:57:45 +01:00
d8bb75be63 Document 'extend_desc' in config.example.yml
Thanks to "Le Jester" on Matrix for noticing that it was missing!
2022-02-23 21:50:30 +01:00
a8021e09a7 Merge pull request #2917 from iv-org/better-compose
Enhance the development compose file
2022-02-23 20:17:35 +00:00
16530ac6de Move back to a Debian-based Postgres image 2022-02-23 21:01:12 +01:00
5d1a1fef0f Merge pull request #2929 from SamantazFox/add-disable-history-option
Make the history recording optional.
2022-02-23 18:43:15 +01:00
6082887070 Add missing '_label' suffix to translation identifier 2022-02-23 16:43:59 +01:00
8da336b7aa Move the "watch history" checkbox under the "user" section 2022-02-23 16:42:34 +01:00
3da0287ede Let 'shards update' sort the shard.lock file 2022-02-23 13:23:17 +01:00
ea3331840d Fix typo in shard.yml 2022-02-23 13:21:52 +01:00
3fc0f72f3a Bump 'spectator' to v0.10.5 2022-02-23 13:21:03 +01:00
ea3abe6069 Bump 'sqlite3' to v0.19.0 and 'pg' to v0.26.0 2022-02-23 13:15:38 +01:00
897f871f99 Make the history recording optional. 2022-02-23 13:03:21 +01:00
2f335b3d2c Use a dedicated endpoind for downloads
This allows us to not pass file name ("title") in the form
data and to enforce some sanity checks
2022-02-23 13:00:30 +01:00
3b1837a99b Move remaining routes to new structure 2022-02-22 23:20:09 -06:00
cc59de0c93 Extract live endpoints to route 2022-02-22 23:04:30 -06:00
997d936e9c Merge pull request #2924 from iv-org/SamantazFox-patch-1
Clean make help
2022-02-23 01:00:08 +00:00
253256bf37 Clean make help
Forgot to mute the echo commands :X
2022-02-23 00:18:48 +01:00
e60a1836fe Lint config.example.yml and config.cr
Follow lint indications :
- https://github.com/iv-org/invidious/pull/2915#discussion_r812396203
- https://github.com/iv-org/invidious/pull/2915#discussion_r812396807
2022-02-22 23:19:59 +01:00
e66b317f02 Reduce regex in player script
Following correction at:
https://github.com/iv-org/invidious/pull/2895#issuecomment-1048245008
2022-02-22 22:53:26 +01:00
b417ea8e3a Merge pull request #2923 from iv-org/SamantazFox-patch-1
Fix captions regex
2022-02-22 20:48:03 +01:00
aa8758dec2 Patch updateCookie for preserve extra args (like domain) 2022-02-22 20:05:22 +01:00
b58b0440d6 Fix captions regex 2022-02-22 19:44:41 +01:00
ad6b29c09f Update cookie domain definition in player script
Related with :
https://github.com/iv-org/invidious/pull/2895#issuecomment-1047762544
2022-02-22 18:58:41 +01:00
09a585c93b Add sameSite policy in cookie management in server side 2022-02-22 18:57:21 +01:00
a9d2d2211a Apply suggestion
Co-authored-by: Samantaz Fox <coding@samantaz.fr>
2022-02-22 17:31:45 +00:00
fe057c7873 Make a function that builds the download widget's HTML 2022-02-22 17:42:41 +01:00
dfcaed93ea Enforce the source of the image (mostly for Podman compatibility) 2022-02-22 15:40:11 +01:00
5e3fcad1fb Remove the enforced container_name following suggestions 2022-02-22 15:36:15 +01:00
8e4959a621 Update cookie declaration for preserve SameSite directive 2022-02-22 13:15:53 +01:00
555bb711c9 Removal of changes to methods now unrelated to the issue
Unrelated to the issue since the change in management of channel_refresh_interval
Cf this remark : https://github.com/iv-org/invidious/pull/2915#discussion_r811373503
2022-02-22 08:17:50 +01:00
afa3eff313 Remove useless config inside docker-compose
Follow lint indications :
https://github.com/iv-org/invidious/pull/2915#discussion_r811501709
2022-02-22 08:07:50 +01:00
9e91fd5241 Enforce a container_name and rename the postgres container 2022-02-22 03:02:14 +01:00
d90d347006 Re-order the configs in the order of the config file + add statistics_enabled 2022-02-22 02:55:42 +01:00
385fe4be22 Move to an Alpine-based Postgres image 2022-02-22 02:43:25 +01:00
7ec88741a6 Fix YAML syntax 2022-02-22 02:24:43 +01:00
86cb68413d Add a comment explaining that it builds an image from source 2022-02-22 02:11:44 +01:00
05c5d293eb Enhance the development compose file 2022-02-22 01:54:36 +01:00
fd0ac3a671 Update management of channel_refresh_interval
Follow indications:
https://github.com/iv-org/invidious/pull/2915#discussion_r811373503
2022-02-22 01:35:35 +01:00
f109d812a1 Move TimeSpanConverter with another Converters
Follow indications :
https://github.com/iv-org/invidious/pull/2915#discussion_r811373953
2022-02-22 01:34:19 +01:00
5d2f2690e2 Lint config properties
Follow lint indications :
https://github.com/iv-org/invidious/pull/2915#discussion_r811375584
2022-02-22 00:59:55 +01:00
505a81d087 Merge pull request #2912 from MathiusD/share-with-timestamp
Add currentTimestamp in shared url by videojs-share
2022-02-22 00:47:02 +01:00
dfab62ce48 Rename new property to channel_refresh_interval
Follow indications :
https://github.com/iv-org/invidious/pull/2915#discussion_r811373503
2022-02-22 00:46:26 +01:00
31699468fc Lint docs of addCurrentTimeToURL in player script
Follow lint indications :
https://github.com/iv-org/invidious/pull/2912#discussion_r811479583
2022-02-22 00:44:36 +01:00
857096ba5f Merge pull request #2910 from MathiusD/expose-version
Expose version by default on api/v1/stats
2022-02-22 00:39:54 +01:00
36c7d4270b Lint conditional deletion of t in addCurrentTimeToURL inside player script
Follow lint indications :
https://github.com/iv-org/invidious/pull/2912#discussion_r811474927
2022-02-22 00:27:00 +01:00
d77586d02d Remove extra space in shareOptions.embedCode of player script
Follow lint indications :
https://github.com/iv-org/invidious/pull/2912#discussion_r811367117
2022-02-22 00:21:47 +01:00
c8fbb74835 Merge pull request #2916 from weblate/weblate-invidious-translations
Translations update from Hosted Weblate
2022-02-22 00:19:11 +01:00
dfee375b98 Update Greek translation
Co-authored-by: THANOS SIOURDAKIS <siourdakisthanos@gmail.com>
2022-02-22 00:17:21 +01:00
9268258773 Update Croatian translation
Co-authored-by: Milo Ivir <mail@milotype.de>
2022-02-22 00:17:21 +01:00
9031ca5c3f Update French translation
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
2022-02-22 00:17:21 +01:00
18d68184a9 Update Albanian translation
Co-authored-by: Besnik Bleta <besnik@programeshqip.org>
2022-02-22 00:17:21 +01:00
3816f92095 Update Russian translation
Co-authored-by: AHOHNMYC <lqwh2h2cwa@protonmail.com>
2022-02-22 00:17:21 +01:00
fd55b08a1d Add albanian to the locales list 2022-02-22 00:17:18 +01:00
d0d8ba0068 Remove useless config inside docker-compose
Follow lint indications :
https://github.com/iv-org/invidious/pull/2910#discussion_r811367959
2022-02-22 00:09:15 +01:00
18197e7e3e Lint description of channel_refresh_time 2022-02-21 11:13:24 +01:00
f75a81c9ee Make configurable time between each RefreshChannelsJob 2022-02-21 10:53:20 +01:00
9979a1b910 Add currentTimestamp in shared url by videojs-share 2022-02-19 17:03:22 +01:00
dbba9d7687 Expose version in /api/v1/stats with statistic disabled 2022-02-18 17:23:16 +01:00
1e3f4ed398 Lint player.js
Follow lint indications :
- https://github.com/iv-org/invidious/pull/2895#discussion_r809461103
- https://github.com/iv-org/invidious/pull/2895#discussion_r809461622
2022-02-17 22:22:04 +01:00
d199b7264e Merge pull request #2907 from iv-org/contact-page
Remove the e-mail section from the README and link to the website
2022-02-16 17:27:34 +00:00
b4c532f062 Remove the e-mail section from the README and link to the website 2022-02-16 17:27:03 +00:00
b24a89f820 Merge pull request #2903 from iv-org/SamantazFox-patch-1
comments: don't error out when video has no comments
2022-02-15 02:24:06 +01:00
7112f35793 comments: don't error out when video has no comments
continuationItems is nil when video has no comments
2022-02-14 21:54:26 +01:00
7048193f00 Move store of modification in Cookie instead of localStorage 2022-02-14 17:22:06 +01:00
17ae2648ed Modify use of module (Only if video settings are default)
Following remark at https://github.com/iv-org/invidious/pull/2895#issuecomment-1037279953
2022-02-14 17:01:10 +01:00
c952754c8c Add videojs-persist plugin 2022-02-14 17:01:10 +01:00
85ba04b715 Merge pull request #2871 from SamantazFox/user-code-cleaning
User code cleaning & fixing
2022-02-14 15:38:05 +01:00
8af202e86b Merge pull request #2892 from matthewmcgarvey/video-playability
Raise error if video not playable, also handle missing related videos
2022-02-14 00:59:07 +01:00
57353fe0c6 Fix Freetube subscriptions import 2022-02-13 22:40:51 +01:00
6c116e34c4 Merge pull request #2894 from weblate/weblate-invidious-translations
Translations update from Hosted Weblate
2022-02-13 01:19:39 +01:00
9ff26ea4d4 Update Chinese (Traditional) translation
Co-authored-by: Jeff Huang <s8321414@gmail.com>
2022-02-13 01:14:58 +01:00
2194bd2812 Update Chinese (Simplified) translation
Co-authored-by: Eric <alchemillatruth@purelymail.com>
2022-02-13 01:14:58 +01:00
1e6cd0b18f Update Turkish translation
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
2022-02-13 01:14:57 +01:00
85d178ff8b Update French translation
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
2022-02-13 01:14:57 +01:00
e0d09c3cda Update Albanian translation
Co-authored-by: Besnik Bleta <besnik@programeshqip.org>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2022-02-13 01:14:57 +01:00
47f529dc09 Update Russian translation
Co-authored-by: AHOHNMYC <lqwh2h2cwa@protonmail.com>
2022-02-13 01:14:57 +01:00
dde850a2e9 Update Arabic translation
Co-authored-by: Mohammed Anas <triallax@tutanota.com>
2022-02-13 01:14:57 +01:00
34e1a465be Update Norwegian Bokmål translation
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
2022-02-13 01:14:56 +01:00
7d756209b1 Update Spanish translation
Co-authored-by: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
2022-02-13 01:14:56 +01:00
60e870b277 Fix OPML import 2022-02-12 17:32:20 +01:00
bf054dfda5 Do not check for pending migrations on app start
This is so that we don't break deploys with this PR.
Instead we only ship the 'invidious --migrate' cli command
and let people test that. Maybe even ship a new migration that wouldn't break
apps that don't run the migrations. Then we roll out the functionality
that requires migrations.
2022-02-12 09:20:43 -06:00
59654289cb Run migrations through CLI instead of when app starts 2022-02-11 22:43:16 -06:00
cf13c11236 Migrations tweaks 2022-02-11 22:29:19 -06:00
ddf1e84f7c Raise exception if playability not ok, also handle missing related videos 2022-02-10 23:43:14 -06:00
ec183e3c9a Merge pull request #2891 from SamantazFox/check-host-param
video_playback: Check "host" parameter validity
2022-02-11 05:16:47 +01:00
01135db80a video_playback: Check "host" parameter validity 2022-02-11 02:04:05 +01:00
955e3de56d Merge pull request #2890 from iv-org/SamantazFox-patch-1
DB: fix inverted arguments in User.update_password()
2022-02-10 22:44:40 +01:00
cdd473e195 DB: fix inverted arguments in User.update_password()
Closes https://github.com/iv-org/invidious/issues/2875
2022-02-10 19:52:45 +01:00
34fe7f04fa Merge pull request #2888 from weblate/weblate-invidious-translations
Translations update from Hosted Weblate
2022-02-10 19:32:38 +01:00
55c280af5d Update Indonesian translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: ʏᴜᴜ <vcyzteen@protonmail.com>
2022-02-10 18:39:03 +01:00
ea5a4f6d6e Update Portuguese translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: SC <lalocas@protonmail.com>
2022-02-10 18:39:03 +01:00
d169f91d64 Update Croatian translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Milo Ivir <mail@milotype.de>
2022-02-10 18:39:03 +01:00
8b29895ef3 Update French translation
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
2022-02-10 18:39:03 +01:00
3cfc5c164d Update Arabic translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Mohammed Anas <6daf084a-8eaf-40fb-86c7-8500077c3b69@anonaddy.me>
2022-02-10 18:39:03 +01:00
4e55d9937c Update Chinese (Traditional) translation
Co-authored-by: Jeff Huang <s8321414@gmail.com>
2022-02-10 18:39:02 +01:00
03fe8d1716 Update Chinese (Simplified) translation
Co-authored-by: Eric <alchemillatruth@purelymail.com>
2022-02-10 18:39:02 +01:00
d6d7d209c1 Update Turkish translation
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
2022-02-10 18:39:02 +01:00
fa044a2971 Update Hungarian translation
Co-authored-by: István Nyitrai <sianis@gmail.com>
2022-02-10 18:39:02 +01:00
72fce387db Update Spanish translation
Co-authored-by: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
2022-02-10 18:39:02 +01:00
da10cdd5ab Merge pull request #2872 from SamantazFox/misaligned-captions
Use a regex to fix badly aligned captions
2022-02-10 18:38:59 +01:00
83de3a51ea Merge pull request #2885 from matthewmcgarvey/data-control
Update wording on data control page for clarity
2022-02-10 18:38:15 +01:00
8faf8b8e57 Update en-US translations instead of translation keys for data control 2022-02-10 11:29:00 -06:00
5a349ae88b Update wording on data control page for clarity 2022-02-09 23:38:24 -06:00
8ec992a8a3 Add custom migration implementation 2022-02-09 00:50:32 -06:00
e2fc64296d Merge pull request #2874 from SamantazFox/small-fixes
Small fixes
2022-02-09 01:42:11 +01:00
ec55b905cb Fix empty error page on BrokenTubeException 2022-02-09 01:36:17 +01:00
492d1144e0 Apply changes from code review 2022-02-08 03:05:49 +01:00
4f4b19a962 embed page: fix typo in videojs-overlay script URL 2022-02-08 02:41:08 +01:00
febd785428 Add missing subtitle languages 2022-02-08 02:13:14 +01:00
8642c66710 Mention that VR videos option require WebGL 2022-02-08 01:54:09 +01:00
76cc8ac66b HTML escape error message 2022-02-08 01:48:44 +01:00
53d349a648 Inline a few JS functions
Helps sending less bytes to the client.
2022-02-08 01:37:57 +01:00
b344e1aadb handlers.js: fix TypeError on document.activeElement.type 2022-02-08 01:26:51 +01:00
3c882cff6e player shortcuts: ignore numpad 2022-02-08 01:26:51 +01:00
f73aef33f0 Add compile option to disable fetching of player dependencies 2022-02-07 22:45:08 +01:00
d12dff9dcf Use a regex to fix badly aligned captions 2022-02-07 22:18:24 +01:00
99d770be64 Move user pages (ECR files) to subfolder 2022-02-07 17:39:15 +01:00
71a8867a4a Move user cookies to their own module 2022-02-07 17:39:15 +01:00
2bbd424fce Move import logic to its own module 2022-02-07 17:38:50 +01:00
ef8dc7272b Put CSV import function under its own module 2022-02-07 17:15:22 +01:00
ad4a06fca5 Move user captcha code to its own module 2022-02-07 17:15:22 +01:00
c04f45d5e3 Move user struct to own file, under Invidious namespace 2022-02-07 17:15:22 +01:00
fb36155022 Move user routes definitions to a macro in routing.cr 2022-02-07 17:15:21 +01:00
7ace3fc989 Move remaining user-related routes out of main file 2022-02-07 17:15:21 +01:00
170e754998 Merge pull request #2868 from SamantazFox/related-channels-items-fix
Related channel may contain a continuation entry
2022-02-07 16:54:44 +01:00
6a75fa08dc Merge pull request #2492 from mastihios/patch-input-html-escape
Change <input value="..."> encoding to HTML.escape
2022-02-07 16:53:43 +01:00
1c5db46a4d Merge pull request #2870 from rex4539/typos
Fix typos
2022-02-07 16:53:28 +01:00
7e4690e43c Fix typos 2022-02-07 14:57:14 +02:00
f8b29674b2 Gave them marks some space and added nil checks 2022-02-07 02:25:34 +01:00
fe55141a7b Crystal format 2022-02-07 02:04:50 +01:00
9205ccc124 Removed dummy values and added checks for items.ecr 2022-02-07 02:00:43 +01:00
698a6f3886 API: handle related channels parsing exceptions 2022-02-07 00:52:18 +01:00
1668e4187e Related channel may contain a continuation entry 2022-02-07 00:37:47 +01:00
00df3e2c40 Refactored code and added badges to Search but many dummies because of the way components/item works 2022-02-04 19:59:07 +01:00
a2578ac6b4 Added Verified Badge to related videos 2022-02-04 17:55:22 +01:00
1fee636afa Added verification badge to video player and error with related_videos 2022-02-03 23:18:50 +01:00
154bca4635 Added Verification Badge to Youtube Comments 2022-02-03 22:32:00 +01:00
c584e31657 Inlined the if statement 2022-02-03 22:14:00 +01:00
66340281e6 Added verification badge for channel view 2022-02-03 21:42:28 +01:00
df599c0fc3 Merge pull request #2855 from weblate/weblate-invidious-translations
Translations update from Hosted Weblate
2022-02-03 21:27:21 +01:00
e98aeaf293 Update Arabic translation
Co-authored-by: Mohammed Anas <6daf084a-8eaf-40fb-86c7-8500077c3b69@anonaddy.me>
2022-02-03 19:23:37 +01:00
5026698ebf Update Norwegian Bokmål translation
Co-authored-by: Petter Reinholdtsen <pere-weblate@hungry.com>
2022-02-03 19:23:37 +01:00
bd221b7b2c Merge pull request #2856 from SamantazFox/fix-related-videos
Fix related videos
2022-02-03 19:23:32 +01:00
ba37259258 Also propagate changes to watch ECR page 2022-02-03 04:24:31 +01:00
eca8d2e7d7 Apply suggestions from code review
Co-authored-by: Matthew McGarvey <matthewmcgarvey14@gmail.com>
2022-02-03 03:55:43 +01:00
cb0f7bf6b0 Change <input value="..."> encoding to HTML.escape 2022-02-03 01:47:18 +01:00
1ec15dc073 Propagate related videos changes to API function 2022-02-03 01:44:11 +01:00
f124e8cf93 Fix parsing of related videos 2022-02-03 01:37:30 +01:00
9621175dc9 extractors: Add helper for short view count text 2022-02-03 01:37:30 +01:00
e6ddd6d6c1 make HelperExtractors non-private 2022-02-03 01:37:30 +01:00
d7ebd763f5 video parsing: add secondary_results root element 2022-02-03 01:37:30 +01:00
99091e919c video parsing: raise if major root element is missing 2022-02-03 01:37:30 +01:00
6ddbccbc95 Add new exception for parsing issues 2022-02-03 01:37:23 +01:00
0ca333715b Merge pull request #2851 from SamantazFox/add-clip-support
Add support for clips
2022-02-02 00:44:59 +01:00
4e44a91d08 Add support for clips 2022-02-02 00:41:02 +01:00
fc5f84a0cd Merge pull request #2827 from SamantazFox/more-code-cleanup
More code cleanup
2022-02-02 00:36:19 +01:00
2289f98c1e Merge pull request #2846 from iv-org/SamantazFox-fix-search-focus-js
Ignore "/" key handling if search box is focused
2022-01-30 23:53:34 +01:00
49edf0ee33 Merge pull request #2849 from weblate/weblate-invidious-translations
Translations update from Hosted Weblate
2022-01-30 23:48:03 +01:00
8532727d54 Update Greek translation
Co-authored-by: THANOS SIOURDAKIS <siourdakisthanos@gmail.com>
2022-01-30 23:45:29 +01:00
336653b02c Update Finnish translation
Co-authored-by: Markus Mikkonen <markus.mikkonen@outlook.com>
2022-01-30 23:45:29 +01:00
d546f1870e Merge pull request #2845 from SamantazFox/more-db-improvements
More db improvements
2022-01-30 23:34:48 +01:00
15c66e2b01 Ignore "/" key handling if search box is focused
Fixes a side effect of https://github.com/iv-org/invidious/pull/2814
See: https://github.com/iv-org/invidious/issues/2791#issuecomment-1018264144
2022-01-30 23:27:42 +01:00
be92bfd4af Merge pull request #2847 from iv-org/hls-to-vhs
rename hls to vhs in the player
2022-01-30 23:22:19 +01:00
f5cb7ba96c Merge pull request #2833 from matthewmcgarvey/get-channel-cleanup
Channel helpers cleanup
2022-01-30 23:16:15 +01:00
f013a6b1d7 rename hls to vhs in the player
hls method is deprecated: https://github.com/videojs/http-streaming#how-to-use
2022-01-30 15:22:31 +00:00
519c227c4f Use short syntax for 'File.open' block 2022-01-29 13:43:26 +01:00
6f4665588f search.cr: use do/end rather than inline {} block 2022-01-28 15:54:38 +01:00
eba311baa9 Merge pull request #2397 from syeopite/dep-manager-for-videojs-stuff
Add dependency manager script for videojs stuff
2022-01-28 15:30:13 +01:00
e92b3779ad Add back in refreshing of channels every 2 days 2022-01-27 20:12:45 -06:00
a82d21ff78 Cleanup channel helpers code 2022-01-27 20:12:42 -06:00
63e1165936 videos.cr: use '.dig?()' where possible 2022-01-28 02:22:48 +01:00
84cc732281 search functions: Don't return result count
This is useless, as the items count can be directly acessed
using the '.size' method, so use that instead when needed.
2022-01-28 02:22:36 +01:00
971b6ec96f Fix 'Lint/UselessAssign' warnings reported by ameba 2022-01-28 02:19:53 +01:00
46f7ca9ffa Remove useless intermediary variable in youtube_api.cr
This fixes an ameba warning
2022-01-28 02:19:53 +01:00
e85bc3e0f6 Remove script for locales propagation
Not required anymore now that weblate takes care of it
2022-01-28 02:19:53 +01:00
dee20f92a7 Avoid infinite loop in ChannelVideo's to_xml/to_json methods 2022-01-28 02:19:53 +01:00
12b818a83c Fix more 'Lint/ShadowingOuterLocalVar' warnings reported by ameba 2022-01-28 02:19:53 +01:00
1c91110464 Fix some 'Lint/ShadowingOuterLocalVar' warnings reported by ameba 2022-01-28 02:19:53 +01:00
4cd7a3e83f Remove useless 'locale = env.get...' from many routes 2022-01-28 02:19:53 +01:00
fa99c9aa85 Use '.dig?()' in playlist parsing 2022-01-28 02:19:53 +01:00
2d949834e9 Make 'additional_fields' optional in JSON error template functions
This allows us to de-duplicate functions
2022-01-28 02:19:53 +01:00
c7b74aa8b4 Remove useless 'locale' argument from error template functions 2022-01-28 02:19:53 +01:00
5e3c9cf290 Remove useless arguments from playlist-related functions 2022-01-28 02:19:53 +01:00
508f137b30 Merge pull request #2666 from matthewmcgarvey/extract-stuff-1
Move more routes to new pattern
2022-01-28 02:12:35 +01:00
67dd2b419a db: use prepared statements rather than crafted argument list 2022-01-26 17:31:01 +01:00
0749baae4b Makefile: Fix 'STATIC' in help message
Fix description (typo) and default value
2022-01-26 13:24:40 +01:00
df9f897ebe Fix code broken when extracting data control route 2022-01-25 19:28:16 -06:00
8ef1e81294 Make certain routes ignored if api only 2022-01-25 19:10:18 -06:00
d755d05f88 Move more routes to new pattern 2022-01-25 19:10:18 -06:00
ce4a52325b db: use now() function instead of passing Time.utc 2022-01-26 01:49:29 +01:00
714a001332 DB: playlists: make that 'insert' never raises 2022-01-25 23:53:00 +01:00
c78f84d5c6 DB: Move integrity check to the base.cr file 2022-01-25 23:53:00 +01:00
a6c9b263da DB: don't pass PG_DB to check_table/check_enum 2022-01-25 23:53:00 +01:00
5ad2fc64b4 DB: Move a forgotten 'UPDATE channels' statement 2022-01-25 23:42:36 +01:00
2ae074a9a4 Merge pull request #2821 from matthewmcgarvey/channel-search
Handle invalid channel id in channel: search
2022-01-25 19:34:43 +01:00
c5967ad572 will -> should
Co-authored-by: Samantaz Fox <coding@samantaz.fr>
2022-01-25 11:35:19 -06:00
5ece07a807 Merge pull request #2841 from iv-org/SamantazFox-remove-note-quic
config: remove note about QUIC disabled at Google
2022-01-25 14:24:36 +01:00
e00f9a869d config: remove note about QUIC disabled at Google
The situation is back to normal.
2022-01-25 13:53:46 +01:00
662cf2f633 Merge pull request #2826 from weblate/weblate-invidious-translations
Translations update from Hosted Weblate
2022-01-25 01:43:14 +01:00
16f1a23c54 Update Portuguese (Brazil) translation
Update Portuguese (Brazil) translation

Co-authored-by: André Marcelo Alvarenga <andrealvarenga@gmx.net>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Kamuri Amorim <myk.gata14@gmail.com>
2022-01-25 01:15:12 +01:00
fb364b532c Update Croatian translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Milo Ivir <mail@milotype.de>
2022-01-25 01:15:12 +01:00
2bebf578c7 Update French translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
2022-01-25 01:15:12 +01:00
a5b9c83256 Update Japanese translation
Co-authored-by: GnuPGを使うべきだ <dieeeazpnnqbpddh@cock.email>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2022-01-25 01:15:12 +01:00
dc0e242a63 Update Polish translation
Co-authored-by: skajmer <skajmer@protonmail.com>
2022-01-25 01:15:12 +01:00
178e317d11 Update Chinese (Traditional) translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Jeff Huang <s8321414@gmail.com>
2022-01-25 01:15:12 +01:00
3aa740d877 Update Chinese (Simplified) translation
Co-authored-by: Eric <alchemillatruth@purelymail.com>
2022-01-25 01:15:12 +01:00
951d7d8339 Update Turkish translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
2022-01-25 01:15:12 +01:00
b5bd1f507e Update Hungarian translation
Co-authored-by: f3rr31 <5920873@disroot.org>
2022-01-25 01:15:12 +01:00
7b9368ae75 Update Spanish translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
2022-01-25 01:15:12 +01:00
b2c3d9fb0a Merge pull request #2828 from SamantazFox/add-ameba-shard
Add Ameba static code analysis tool to dev shards
2022-01-25 01:15:06 +01:00
6bd48ca645 Merge pull request #2832 from tonyfinn/patch-1
Specify the public schema for playlist videos migration
2022-01-24 14:18:08 +01:00
cdc007c83c Specify the public schema for public videos
Unlike the other migrations, this one uses a bare table name to specify the table. This means it looks in the default search path. Unfortunately, the out of box search path is:

1. Schema with the same name as the user
2. Public

Because of this, if a schema exists with the same name as the DB user, the playlist_videos table will get created in _that_ schema, rather than the public schema, and then the grant statement will fail with an error like below if check_table is enabled as it keeps trying to create the table but failing on the grant statement:

```
2022-01-22 02:27:42 UTC [info] check_table: check_table: CREATE TABLE playlist_videos
Unhandled exception: relation "public.playlist_videos" does not exist (PQ::PQError)
  from /usr/share/crystal/src/primitives.cr:266:3 in 'handle_error'
  from lib/pg/src/pq/connection.cr:184:9 in 'handle_async_frames'
  from lib/pg/src/pq/connection.cr:162:7 in 'read'
  from lib/pg/src/pq/query.cr:53:14 in 'exec_all'
  from lib/db/src/db/database.cr:126:9 in '__crystal_main'
  from /usr/share/crystal/src/crystal/main.cr:110:5 in 'main'
  from src/env/__libc_start_main.c:94:2 in 'libc_start_main_stage2'
2022-01-22 02:27:43 UTC [info] check_table: check_table: CREATE TABLE playlist_videos
Unhandled exception: relation "public.playlist_videos" does not exist (PQ::PQError)
  from /usr/share/crystal/src/primitives.cr:266:3 in 'handle_error'
  from lib/pg/src/pq/connection.cr:184:9 in 'handle_async_frames'
  from lib/pg/src/pq/connection.cr:162:7 in 'read'
  from lib/pg/src/pq/query.cr:53:14 in 'exec_all'
  from lib/db/src/db/database.cr:126:9 in '__crystal_main'
  from /usr/share/crystal/src/crystal/main.cr:110:5 in 'main'
  from src/env/__libc_start_main.c:94:2 in 'libc_start_main_stage2'
```
2022-01-22 02:32:13 +00:00
7dbbe27cdd Use --production flag for shards installation on docker 2022-01-20 22:33:34 +01:00
b91874355c Add Ameba static code analysis tool to dev shards 2022-01-20 22:25:01 +01:00
8b0ed8b110 Create FUNDING.yml 2022-01-19 20:43:52 +00:00
574e35a720 HTML escape user input 2022-01-19 09:01:13 -06:00
32ae38b933 Merge pull request #2822 from matthewmcgarvey/reddit-comments
Fix loading reddit comments when there are no threads found
2022-01-19 12:53:20 +01:00
56e505164d 404 error with message and provide example 2022-01-18 18:56:26 -06:00
d4f3139b73 Don't catch and provide better error message instead 2022-01-18 18:37:16 -06:00
97dceb3a5a Custom error on channel search, handle in search 2022-01-18 18:37:16 -06:00
212f6d6bf5 Fix channel search json parse to not raise 2022-01-18 18:37:16 -06:00
36904fa72e Merge pull request #2351 from iv-org/add-faq-link
Add FAQ link to readme
2022-01-18 00:46:49 +01:00
8c2495a399 Apply suggestions from review 2022-01-17 21:47:29 +01:00
2d1f6128be Fix typo in "crash_page_read_the_faq"
Co-authored-by: Matthew McGarvey <matthewmcgarvey14@gmail.com>
2022-01-17 21:27:52 +01:00
9233f71549 Use &.methods where possible instead of curly braces 2022-01-17 13:03:36 -06:00
b2a738cf13 Fix loading reddit comments when there are no threads found 2022-01-17 12:11:47 -06:00
34a79c5f1e Don't show "next steps" message with a stack trace
Usually, next steps are after the error message.
Here, we want the same options to be right above the stack trace,
so users are less likely to report duplicates.
2022-01-16 16:15:23 +01:00
fd30f5775a Add precisions to error message regarding locales 2022-01-16 16:15:23 +01:00
a2600acfa9 Improve crash page messages
* Ask to read the FAQ and search for existing issues on Github
* Include links to FAQ and directly to a new github issue
* Github issue title is automatically based on exception name
* Improved HTML
* Minor languages changes
2022-01-16 16:15:23 +01:00
fa2c8f42b3 Issue template: ask to read the FAQ 2022-01-16 16:14:55 +01:00
db4e36ad9b Add FAQ link to readme 2022-01-16 16:14:55 +01:00
38697ade31 Merge pull request #2817 from weblate/weblate-invidious-translations
Translations update from Hosted Weblate
2022-01-16 16:13:50 +01:00
2cf3c7eb41 Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:46 +01:00
4ea932dc1f Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update Italian translation

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Renix <kastletxd@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:46 +01:00
7b587d8e00 Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:46 +01:00
9612a4d0de Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:46 +01:00
7141a716e7 Update Indonesian translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: I. Musthafa <i.musthafa66@gmail.com>
2022-01-16 15:24:46 +01:00
0d33566bbc Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:46 +01:00
2d341c53f2 Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:45 +01:00
b20443241d Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:45 +01:00
fb28431cdc Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:45 +01:00
2602df8ef7 Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:45 +01:00
9e7ff8f8f5 Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:45 +01:00
5b5473e794 Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:45 +01:00
73c000fd44 Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:44 +01:00
ef51661f5d Update French translation
Update French translation

Co-authored-by: Bundy01 <bundy@posteo.eu>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
2022-01-16 15:24:44 +01:00
6bb9e8442a Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:44 +01:00
9b1721f8ad Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:44 +01:00
15532fdb11 Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:44 +01:00
39e0b3f6c5 Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:44 +01:00
329bf7895e Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:44 +01:00
61feb5a851 Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:43 +01:00
da06560fa9 Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:43 +01:00
fd120ab275 Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:43 +01:00
14a57fd229 Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:43 +01:00
0be2ab582d Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:43 +01:00
d00037d1d4 Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:43 +01:00
e10827bf1c Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:42 +01:00
98a5a7cb4f Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:42 +01:00
748282cff3 Update Norwegian Bokmål translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update Norwegian Bokmål translation

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Petter Reinholdtsen <pere-weblate@hungry.com>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:42 +01:00
f3df1e8d3c Update English (United States) translation
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2022-01-16 15:24:42 +01:00
a93058d385 Update Chinese (Traditional) translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Jeff Huang <s8321414@gmail.com>
2022-01-16 15:24:42 +01:00
89135a9cf5 Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update Turkish translation

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:42 +01:00
47a02e3423 Update Hungarian translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: f3rr31 <5920873@disroot.org>
2022-01-16 15:24:42 +01:00
c9fd8167f5 Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:41 +01:00
c9b9ded518 Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update Spanish translation

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update Spanish translation

Co-authored-by: Hin Weisner <translatu.godwit@aleeas.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2022-01-16 15:24:41 +01:00
250a9191cb Merge pull request #2814 from SamantazFox/fix-search-autofocus
Fix search autofocus
2022-01-16 15:24:27 +01:00
6fab5d0554 Merge pull request #2545 from bbielsa/csv-subscriptions-import
Add CSV Subscriptions Import
2022-01-16 15:11:37 +01:00
461fae4f77 Use contain_exactly() in spec 2022-01-15 12:52:19 +01:00
8aed1e11c3 Add JS to focus search box on '/' 2022-01-13 22:48:31 +01:00
6cf6c56dd1 Autofocus search bar only on search homepage 2022-01-13 22:19:19 +01:00
042ff8da64 Merge pull request #2813 from iv-org/SamantazFox-fix-comments
Fix youtube comments
2022-01-13 20:46:43 +01:00
8b72481b8c Fix comments
"ReplyCount" is actually an Int, not a String.
2022-01-13 20:43:46 +01:00
aa0724f204 Merge pull request #2646 from SamantazFox/support-plurals-in-locales
Better support of plurals in locales
2022-01-13 12:55:55 +01:00
eff8b23f57 Improve youtube import type detection
Code courtesy of bbielsa:
https://gist.github.com/bbielsa/7d131aa2188945f591a8379ec0defc9b
2022-01-12 18:13:15 +01:00
81a2300af8 Prevent import of insanely large files 2022-01-12 01:28:58 +01:00
2a541cb4d5 Add tests 2022-01-12 01:20:45 +01:00
0120f44fd6 i18n: use spectator for i18next plurals spec 2022-01-12 00:49:36 +01:00
b65dced646 Merge pull request #2789 from iv-org/TheFrenchGhosty-email
Add e-mail contact to the README
2022-01-11 01:57:11 +01:00
e7394fe7a1 Merge pull request #2778 from iv-org/unixfox-postgres-improvement
Create videos caching table as UNLOGGED
2022-01-11 01:52:48 +01:00
fb673639f9 Merge pull request #2787 from matthewmcgarvey/related-channels
Update to fetch related channels again
2022-01-11 01:50:48 +01:00
dc62b6ffdb Can fetch related channels using just the channel ucid] 2022-01-10 17:07:52 -06:00
1f2ccac8a0 i18n: Reformat hu-HU.json 2022-01-10 23:01:58 +01:00
46e4d35ccd Rewording 2022-01-10 21:50:50 +00:00
eb7e79fdf7 i18n: Apply code review suggestions + code cleaning 2022-01-10 22:49:07 +01:00
37c953e633 i18n: Use plurals for tokens/replies/unseen notifications 2022-01-10 22:49:07 +01:00
5bb2cb7d71 i18n: Use plurals for video/view/subscriber/subscription counts 2022-01-10 22:49:07 +01:00
692f4e5be2 i18n: Use plurals for year/month/day/etc... 2022-01-10 22:49:07 +01:00
7bb1471207 i18n: Add dedicated function for counts translation 2022-01-10 22:49:07 +01:00
4752e16ad2 i18n: make multiple fixes to i18next plurals 2022-01-10 22:49:07 +01:00
2a156e7313 i18n: Add plural tests (spec) 2022-01-10 22:49:03 +01:00
0314dd44ea Typo 2022-01-10 21:39:33 +00:00
b80a3d5401 Fix the anchor 2022-01-10 21:38:24 +00:00
8c4ef9f955 Apply suggestions 2022-01-10 21:37:44 +00:00
67d2635e41 i18n: Add i18next plural rules and selector 2022-01-10 22:26:45 +01:00
71a1ad307c i18n: Add i18next plural resolver class 2022-01-10 22:26:45 +01:00
9a48fd81a3 i18n: Add i18next plurals base sets 2022-01-10 22:26:45 +01:00
d928b9eaad switch to alpine 3.15 for using crystal 1.2.2 2022-01-09 22:27:22 +01:00
790b7afcca Fix indefinitely growing database 2022-01-09 22:04:10 +01:00
7b9f5d74dc Create videos caching table as UNLOGGED 2022-01-09 16:58:29 +00:00
6eadba784d Typo 2022-01-08 20:01:00 +00:00
3a39045617 Add e-mail contact to the README 2022-01-08 19:52:05 +00:00
67cb8b7107 Merge translations from 'weblate/master'
Conflicts resolutions
2022-01-08 20:10:26 +01:00
4962c00ba8 Update to fetch related channels again 2022-01-08 12:31:16 -06:00
6764185543 Add explicit return keyword 2022-01-08 18:07:07 +01:00
0a66a68db8 Move require statement to the correct file 2022-01-08 18:07:07 +01:00
8d47ec714e Add text/xml as a possible mime type for xml file uploads 2022-01-08 18:07:07 +01:00
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
62057e676a Move parse_subscription_export_csv function to user/imports.cr 2022-01-08 18:07:06 +01:00
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
7cbd79fee5 Add helper function parse_subscription_export_csv() which parses the csv format returned by the subscription exporter 2022-01-08 18:07:06 +01:00
3fba342ed2 Merge pull request #2769 from weblate/weblate-invidious-translations
Translations update from Hosted Weblate
2022-01-08 18:03:07 +01:00
2419c4d8ae Update Italian translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: coronabond <coronabond@airmail.cc>
2022-01-08 16:22:25 +01:00
e37fb09d41 Update Portuguese translation
Co-authored-by: Gil <hello@giloliveira.net>
2022-01-08 16:22:25 +01:00
86b1357a68 Update Hungarian translation
Update Hungarian translation

Update Hungarian translation

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: f3rr31 <5920873@disroot.org>
2022-01-08 16:22:25 +01:00
b782ab5787 Merge pull request #2762 from matthewmcgarvey/spectactor
Switch to using Spectator for specs
2022-01-08 16:22:10 +01:00
6c0486646f Add spectator and switch to Spectator DSL 2022-01-07 09:27:50 -06:00
dffe8fc49e Move helpers_spec.rb into invidious directory 2022-01-07 09:26:13 -06:00
1336ecbef2 Update Italian translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: coronabond <coronabond@airmail.cc>
2022-01-07 15:09:10 +01:00
d00e430f50 Update Hungarian translation
Update Hungarian translation

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: f3rr31 <5920873@disroot.org>
2022-01-07 15:09:10 +01:00
5a728243a2 Merge pull request #2767 from SamantazFox/fix-subscriptions-not-cleared
Fix subscription not being cleared
2022-01-06 14:17:33 +01:00
37f38dbf6c Merge pull request #2771 from matthewmcgarvey/delete-playlists
Fix playlist deletion
2022-01-06 14:17:10 +01:00
2eb7c5c037 PR feedback 2022-01-05 20:15:42 -06:00
ba0bc72d0b delete_by_playlist_id -> delete_by_playlist 2022-01-05 19:03:32 -06:00
e1219cbdef Fix playlist deletion 2022-01-05 18:24:04 -06:00
bf0a48847c DB: fix subscription not being cleared
Fixes https://github.com/iv-org/invidious/issues/2764
2022-01-05 19:58:24 +01:00
3bb7fbb2f1 Merge pull request #2719 from SamantazFox/batch-minor-fixes
Multiple minor fixes
2022-01-05 17:20:57 +01:00
326a362eb8 Merge pull request #2685 from SamantazFox/database-improvments
Database improvements
2022-01-05 09:40:39 +00:00
fdc380e7f7 Merge pull request #2677 from SamantazFox/decompression-fix-2
Temporarily fix for #2612 (round 2)
2022-01-05 09:38:53 +00:00
db04f1556e Remove spec for playlist continuation 2022-01-05 03:42:41 +01:00
444b1c99d0 Show unavailable videos in playlists 2022-01-05 03:32:54 +01:00
3b1a286290 Use dig?() for playlist title 2022-01-05 03:32:54 +01:00
6c8a5a1e7f Fix leading spaces being collapsed in descriptions
Fixes #1954
2022-01-05 03:32:54 +01:00
1769b0fdce Fix "video can't be added to playlist without JS"
Fixes #2686
2022-01-05 03:32:54 +01:00
68cbc11810 Fix the search box
Fix #277 : autoselect search field
Fix #1107: no spell checking/auto-correct on search field
2022-01-05 03:32:44 +01:00
edcc155482 Merge pull request #2744 from tirz/feature-fix_null_ptr_for_localStorage
fix: null ptr while retaining video time
2022-01-05 03:23:22 +01:00
8231216371 Merge pull request #2750 from 11Tuvork28/patch-2
Removes annoying video switching | Fixes #2736
2022-01-04 18:42:59 +01:00
e1215584b4 Merge pull request #2746 from weblate/weblate-invidious-translations
Translations update from Hosted Weblate
2022-01-04 18:38:39 +01:00
a905175e8c Update Danish translation
Co-authored-by: Grooty12 <Rasmus@rosendahl-kaa.name>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2022-01-04 17:53:45 +01:00
e98ed41656 Update Indonesian translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: I. Musthafa <i.musthafa66@gmail.com>
2022-01-04 17:53:45 +01:00
fd139841f4 Update Persian translation
Update Persian translation

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Matin <MatiinBaloochestani@gmail.com>
Co-authored-by: Seyed mohammad ali Hosseinifard <ali_hosseine@yahoo.com>
2022-01-04 17:53:45 +01:00
dac0f42777 Update Dutch translation
Co-authored-by: Gert-dev <qnyasgjhapqyuhoibr@kiabws.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2022-01-04 17:53:45 +01:00
f0788162a4 Add Albanian translation
Co-authored-by: Besnik Bleta <besnik@programeshqip.org>
2022-01-04 17:53:45 +01:00
c963e50cde Update Croatian translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Milo Ivir <mail@milotype.de>
2022-01-04 17:53:45 +01:00
b4a4767fb3 Update French translation
Co-authored-by: Bundy01 <bundy@posteo.eu>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2022-01-04 17:53:45 +01:00
d6918b2976 Update German translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: ThetaDev <t.testboy@gmail.com>
2022-01-04 17:53:45 +01:00
47e273c402 Update Arabic translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Rex_sa <rex.sa@pm.me>
2022-01-04 17:53:45 +01:00
ba25e8e720 Update Chinese (Traditional) translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Jeff Huang <s8321414@gmail.com>
2022-01-04 17:53:45 +01:00
058ae5cc29 Update Turkish translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
2022-01-04 17:53:45 +01:00
f8be5d2559 Update Hungarian translation
Update Hungarian translation

Update Hungarian translation

Update Hungarian translation

Co-authored-by: Benedek Nagy <benedek@bndk.club>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: f3rr31 <5920873@disroot.org>
2022-01-04 17:53:44 +01:00
792d25594c Update Spanish translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
2022-01-04 17:53:44 +01:00
9f9020e422 Double quote variable to prevent sh error (#2754) 2022-01-04 17:53:40 +01:00
302fecbdcb Clean useless database arguments (5/5) 2022-01-04 17:15:43 +01:00
d74873fed1 Clean useless database arguments (4/5) 2022-01-04 17:15:43 +01:00
40ed4a0506 Clean useless database arguments (3/5) 2022-01-04 17:15:43 +01:00
c25d664edc Clean useless database arguments (2/5) 2022-01-04 17:15:43 +01:00
9bad7e2940 Clean useless database arguments (1/5) 2022-01-04 17:15:43 +01:00
6704ce3214 Move DB utility functions to the proper module 2022-01-04 17:15:43 +01:00
914cfbd953 Move DB queries related to 'annotations' in a separate module 2022-01-04 17:15:43 +01:00
85cf27119c Move DB queries related to playlists in a separate module (3/3) 2022-01-04 17:15:43 +01:00
7691f53520 Move DB queries related to 'users' in a separate module (2/2) 2022-01-04 17:15:43 +01:00
094f835642 Move DB queries related to 'users' in a separate module (1/2) 2022-01-04 17:13:52 +01:00
92eea3b18b Move DB queries related to session tokens in a separate module 2022-01-04 17:13:52 +01:00
c021b93b5c Move DB queries related to channels in a separate module 2022-01-04 17:13:52 +01:00
d94d4c2045 Move DB queries related to statistics in a separate module 2022-01-04 17:13:52 +01:00
46d08237c6 Move DB queries related to playlists in a separate module (2/3) 2022-01-04 17:13:52 +01:00
3deafe9f8d Move DB queries related to playlists in a separate module (1/3) 2022-01-04 17:13:51 +01:00
998edba6f0 Move DB queries related to 'videos' in a separate module 2022-01-04 17:13:51 +01:00
4f219362fe Also fix DISABLE_QUIC declaration 2022-01-04 01:47:41 +01:00
c427444946 Flag to disable QUIC should be 'disable_quic' 2022-01-04 01:46:07 +01:00
d59323a601 Add check to avoid saving player pos to the
length of the given video by saving a minimum of 15 at the end
2021-12-31 03:24:08 +01:00
a779cdd463 Merge pull request #2727 from SamantazFox/add-shorts-support
Add support for shorts
2021-12-28 22:13:36 +01:00
73a142fd9b fix: null ptr while loading/switching theme 2021-12-26 13:53:32 +01:00
0453d08eed fix: null ptr while retaining time 2021-12-26 13:45:27 +01:00
a18068aedf Merge pull request #2734 from iv-org/TheFrenchGhosty-patch-1
Add the Invidious's Mastodon account to the README
2021-12-22 00:03:53 +00:00
12fba3bb7a Add the Invidious's Mastodon account to the README 2021-12-22 01:03:09 +01:00
fc2b9031d4 i18n: Add Serbian back 2021-12-22 00:52:08 +01:00
28a6589a1e Merge pull request #2538 from bbielsa/player-remember-position
Retain video time position in video player
2021-12-21 22:05:43 +01:00
cf9c790499 Merge pull request #2730 from weblate/weblate-invidious-translations
Translations update from Hosted Weblate
2021-12-21 22:02:20 +01:00
3d6dceae10 Update Indonesian translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: I. Musthafa <i.musthafa66@gmail.com>
2021-12-21 20:02:23 +01:00
130a14d0d9 Update Chinese (Traditional) translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Jeff Huang <s8321414@gmail.com>
2021-12-21 20:02:23 +01:00
f07b4f8fc4 Update Turkish translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
2021-12-21 20:02:23 +01:00
75f655aafc Update French translation
Update French translation

Co-authored-by: Bundy01 <bundy@posteo.eu>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
2021-12-21 20:02:23 +01:00
a3fd9ccea7 Update Arabic translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Rex_sa <rex.sa@pm.me>
2021-12-21 20:02:22 +01:00
4136ac633a Update Japanese translation
Co-authored-by: GnuPGを使うべきだ <dieeeazpnnqbpddh@cock.email>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2021-12-21 20:02:22 +01:00
2724456882 Update Norwegian Bokmål translation
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2021-12-21 20:02:22 +01:00
b396a2cbfd Update Spanish translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
2021-12-21 20:02:22 +01:00
ddb06b0cac Fix XSS vulnerability in channel playlists
The channel/<ucid>/playlists page was vulnerable to Cross Site Scripting
(XSS), because the different URL parameters were inserted as-is in the URL
meant for instance switching.

This vulnerability could allow an attacker to inject malicious Javascript
in the page by tricking the user to click on a crafted link.

Bug introduced in commit 66e7285108
("Only use /redirect when automatically redirecting").

Thanks to Jack (@testa:cthd.icu on Matrix, @cysea on github) for responsibly
reporting this issue!
2021-12-19 20:51:44 +01:00
f54e247eb4 Extractors: Add support for shorts
Fixes #2708
2021-12-17 16:47:41 +01:00
2ac19eb8fc Merge pull request #2725 from weblate/weblate-invidious-translations
Translations update from Hosted Weblate
2021-12-17 15:02:59 +01:00
6cdaafdc37 Update Norwegian Bokmål translation
Co-authored-by: Petter Reinholdtsen <pere-weblate@hungry.com>
2021-12-16 06:25:54 +01:00
ed6476b5ea Allow the t parameter to override the stored video playback position 2021-12-15 19:38:58 +01:00
b90bceb2dc Fix formatting of preferences.cr and videos.cr 2021-12-15 19:38:58 +01:00
f31bd5ffb9 Use localization for save player position label in the preferences page 2021-12-15 19:38:56 +01:00
5abe7fe123 Rename 'remember_position' to 'save_player_pos' for clarity 2021-12-15 19:37:55 +01:00
b6792cf02e Added default value for get_video_time() which was causing a bug in safari 2021-12-15 19:37:55 +01:00
1261323c66 Remove console.log debugging 2021-12-15 19:37:55 +01:00
2a45b4eba0 Save and load the position for the video using a local storage object, the object is a dictionary, where the key is the video ID, and the value is the time at which the user last left off watching the video. If the user deselected the 'remember video position' checkbox in the preferences this dictionary is cleared 2021-12-15 19:37:55 +01:00
a6a0bbf398 Add remember_position field to the Preferences and VideoPreferences structs, and add a checkbox in the preferences page to toggle it 2021-12-15 19:37:55 +01:00
7f3ef12297 Merge pull request #2692 from weblate/weblate-invidious-translations
Invidious translations update
Merged from the command line due to merge conflicts.
2021-12-12 23:50:14 +01:00
da2f592de6 locales: use "DASH" instead of "dash" in en-US 2021-12-12 22:46:12 +01:00
ee91effb7a Merge pull request #2576 from SamantazFox/fix-locales-handling
Fix locales handling
2021-12-12 22:26:22 +01:00
b13f9c25b3 Update Danish translation
Update Danish translation

Update Danish translation

Update Danish translation

Update Danish translation

Update Danish translation

Co-authored-by: Grooty12 <Rasmus@rosendahl-kaa.name>
Co-authored-by: HackerNCoder <hackerncoder@protonmail.ch>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2021-12-10 23:36:14 +01:00
f85563eb66 Update Indonesian translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: I. Musthafa <i.musthafa66@gmail.com>
2021-12-10 23:36:14 +01:00
7b689a186d Update Dutch translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Issa1553 <fairfull.playing@gmail.com>
2021-12-10 23:36:14 +01:00
092d7df761 Update Chinese (Traditional) translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Jeff Huang <s8321414@gmail.com>
2021-12-10 23:36:14 +01:00
6c444707d7 Update Turkish translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
2021-12-10 23:36:13 +01:00
81c006cc04 Update Chinese (Simplified) translation
Co-authored-by: Eric <spice2wolf@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2021-12-10 23:36:13 +01:00
7cbd1e413f Update Serbian (cyrillic) translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Issa1553 <fairfull.playing@gmail.com>
2021-12-10 23:36:13 +01:00
f34f8ef188 Update Serbian translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Issa1553 <fairfull.playing@gmail.com>
2021-12-10 23:36:13 +01:00
c3eb385cd3 Update Croatian translation
Update Croatian translation

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Issa1553 <fairfull.playing@gmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
2021-12-10 23:36:13 +01:00
be34f03157 Update French translation
Update French translation

Co-authored-by: Bundy01 <bundy@posteo.eu>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
2021-12-10 23:36:13 +01:00
4964785b13 Update German translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Issa1553 <fairfull.playing@gmail.com>
2021-12-10 23:36:12 +01:00
1b7757c14f Update Arabic translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Rex_sa <rex.sa@pm.me>
2021-12-10 23:36:12 +01:00
58c9f20226 Update Norwegian Bokmål translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Petter Reinholdtsen <pere-weblate@hungry.com>
2021-12-10 23:36:12 +01:00
f19be0c3ce Update English (United States) translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
2021-12-10 23:36:12 +01:00
f236a6872b Merge pull request #2659 from SamantazFox/fix-likes-dislikes
Fix likes/dislikes
2021-12-06 03:52:38 +01:00
3e0096f360 Merge pull request #2683 from iv-org/SamantazFox-patch-1
Fix #2682
2021-12-02 15:35:00 +01:00
438b334320 Merge pull request #2671 from matthewmcgarvey/code-removal
Remove dead code
2021-12-01 20:49:23 +01:00
4aa96ecab9 Use 'dig()' in 'find()' statements 2021-12-01 17:32:10 +01:00
e5557b515e Merge pull request #2684 from iv-org/SamantazFox-patch-2
Decode title from download widget
2021-12-01 17:29:04 +01:00
7b9d26d688 Fix #2670
Fixes "Download widget replaces spaces in filename with +"
https://github.com/iv-org/invidious/issues/2670
2021-11-29 23:12:55 +01:00
8d4b4cd14c Remove dead code 2021-11-29 09:11:50 -06:00
342fc202a7 Fix #2682
Fix "Missing param name: "q" (KeyError)"
https://github.com/iv-org/invidious/issues/2682
2021-11-29 14:53:27 +01:00
4436359d07 Use dig to get category contents
Co-authored-by: Matthew McGarvey <matthewmcgarvey14@gmail.com>
2021-11-28 23:44:37 +01:00
91f8395222 Typo: missing '?' when looking for key in dislikes_button
Co-authored-by: Matthew McGarvey <matthewmcgarvey14@gmail.com>
2021-11-28 23:37:27 +01:00
de00e86cd5 Decompress the response body ourselves
Temp fix for #2612
2021-11-28 18:04:12 +01:00
c6e086c6ff Revert "Temporarily fix for #2612" (#2673) 2021-11-28 09:41:16 +01:00
82f3eda82b Merge pull request #2656 from SamantazFox/fix-2549
extract_video_info: Make sure that the Android player response is valid
2021-11-28 02:38:29 +01:00
05f9613e14 Merge pull request #2623 from SamantazFox/temp-decompression-fix
Temporarily fix for #2612
2021-11-28 02:35:39 +01:00
50bb591826 Merge pull request #2658 from weblate/weblate-invidious-translations
Translations update from Hosted Weblate
2021-11-26 19:38:32 +00:00
2ca23c714d Update Indonesian translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: I. Musthafa <i.musthafa66@gmail.com>
2021-11-26 20:28:07 +01:00
b030d822f1 Update Serbian translation
Co-authored-by: Anon Anonimovic <BGteam@live.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2021-11-26 20:28:07 +01:00
65b5183f01 Update Portuguese (Brazil) translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Vinicius <rodriguessv30@gmail.com>
2021-11-26 20:28:07 +01:00
33431844b7 Update French translation
Co-authored-by: Bundy01 <bundy@posteo.eu>
2021-11-26 20:28:07 +01:00
325a67155d Update Catalan translation
Update Catalan translation

Add Catalan translation

Co-authored-by: Alfonso Montero López <amontero@tinet.org>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2021-11-26 20:28:07 +01:00
6876f88f43 Merge pull request #2622 from SamantazFox/add-makefile
Add a makefile
2021-11-26 20:28:03 +01:00
ad9d3f4425 Merge pull request #2555 from iv-org/readme-enhancements
Enhance some stuff in the README
2021-11-26 20:24:31 +01:00
5eca7a8a30 Fix indenting
Co-authored-by: Samantaz Fox <coding@samantaz.fr>
2021-11-26 19:18:12 +00:00
de153ece4e Move the Awesome-Humane-Tech to its own line 2021-11-26 19:52:36 +01:00
2d8964d37d Apply the suggestions 2021-11-26 19:51:55 +01:00
ceb1feb350 likes/dislikes: better fallback management
'.to_i64?' instead of '.to_i64' returns nil rather than raising
an exception when it's done on an empty string.

In some rare cases, rating can be equal to 5. In this case, the
value of player_response[videoDetails][averageRating] is an
Int and not a Float.
2021-11-25 23:16:50 +01:00
2ea0590b03 i18n: return 'key' if 'key' is not in locales files 2021-11-25 19:46:34 +01:00
80a513baa5 Use new techniques to get (dis)likes back 2021-11-24 01:22:09 +01:00
ba48f68fc3 allow multiple, successive content-encodings 2021-11-21 18:16:05 +01:00
319587e2f1 extract_video_info: make sure that the Android player response is valid 2021-11-21 17:34:17 +01:00
bf7952d9c7 i18n: log a warning instead of rising an exception
This is more user-friendly.
TODO: maybe make a compile time flag for testing purposes
2021-11-21 01:54:54 +01:00
f29ab53aff Add other missing translations
* on watch page and video cards (search results, playlists, etc...)
* on /feed/playlists
* in search filters (not normalized in order to avoid collisions with
an existing PR that reworks the search filters)
2021-11-21 01:54:46 +01:00
b5b0c58de7 Add missing translation for quality selectors 2021-11-21 01:50:11 +01:00
a1bb421eec Remove useless 'hl' parameters on captions URL 2021-11-21 01:50:11 +01:00
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
301444563b i18n: Use language full name instead of ISO code
Fixes #851
2021-11-21 01:50:11 +01:00
9966c21c6b i18n: Add list of language names 2021-11-21 01:50:11 +01:00
12c219ee6c Bump Crystal version for CI and Docker to 1.2.2 2021-11-17 20:12:58 +00:00
008f79df61 Merge pull request #2630 from babababag/patch-1
Escape video description in <meta> elements
2021-11-17 13:22:54 +01:00
fd54cf2d05 Escape video description 2021-11-17 12:04:30 +00:00
e0d26f4055 Merge pull request #2625 from weblate/weblate-invidious-translations
Translations update from Hosted Weblate
2021-11-16 23:32:52 +01:00
6c2170960b Update Indonesian translation
Co-authored-by: I. Musthafa <i.musthafa66@gmail.com>
2021-11-16 23:29:10 +01:00
950deaca40 Update Turkish translation
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
2021-11-16 23:29:10 +01:00
2bd286f195 Update Croatian translation
Co-authored-by: Milo Ivir <mail@milotype.de>
2021-11-16 23:29:10 +01:00
75792bfa7b Update Arabic translation
Co-authored-by: Rex_sa <rex.sa@pm.me>
2021-11-16 23:29:10 +01:00
737c49b689 Update Japanese translation
Co-authored-by: 黒にゃんこ <renraku@076.ne.jp>
2021-11-16 23:29:09 +01:00
2c447a42f2 Make sure to only apply fix if QUIC is disabled 2021-11-16 21:40:35 +01:00
dad8f9a0ce Fix typo
Should be checking the returned headers, not the sent ones.
2021-11-16 20:39:26 +01:00
2eac23a0b3 Temporary fix for #2612
Don't rely on the auto compression/decompression provided by the crystal stdlib.
2021-11-16 13:46:28 +01:00
6a204753c0 Fix typo 2021-11-15 23:36:52 +01:00
19bb26a789 Add a makefile 2021-11-15 23:08:48 +01:00
00904ae3f2 Merge pull request #2444 from syeopite/only-use-redirect-endpoint-when-needed
Only use the /redirect endpoint when automatically redirecting to another instance
2021-11-13 20:40:09 +01:00
d214a0b333 remove duplicate lsquic requirement 2021-11-12 23:02:43 +00:00
4940759627 Example config: Change 'use_quic' default value
Related to commit a120f143d7
Also point towards the Github issue.
2021-11-12 18:53:51 +01:00
be1a390b50 Upgrade crystal on ARM64 docker image 2021-11-12 14:17:07 +01:00
f707f990e6 Merge pull request #2364 from syeopite/disable-quic-via-compile-time-flag
Add compile-time flag to remove code for QUIC
2021-11-12 12:58:39 +00:00
a120f143d7 Disable quic by default
See #2577
2021-11-12 04:03:23 -08:00
65fbdbff6a Remove of gzip header w/ use_quic config
Continuation of b0f127d4d8
2021-11-12 03:52:50 -08:00
6ec4dcfafd Fix handling for maxres thumbnail 2021-11-12 03:47:58 -08:00
48191aca6e Fix copy-paste error 2021-11-12 03:47:57 -08:00
83556bace2 Allow thumbnail queries with QUIC disabled 2021-11-12 03:47:57 -08:00
814c9e6c3a Use https for storyboard image requests 2021-11-12 03:47:57 -08:00
547abe17d9 Use https for ggpht requests 2021-11-12 03:47:57 -08:00
6b8450558d Allow storyboard queries with QUIC disabled 2021-11-12 03:47:57 -08:00
c3747c2d49 Allow ggpht queries with QUIC disabled 2021-11-12 03:47:57 -08:00
245122104a Respect use_quic param and fix typos 2021-11-12 03:47:57 -08:00
b0f127d4d8 Fix gzip decompression with HTTP::Client 2021-11-12 03:47:57 -08:00
d379a36c0e Add compile-time flag to remove code for QUIC 2021-11-12 03:47:50 -08:00
a12571e748 Fix minor error in config.example.yml
Update the "note" for `locale`
2021-11-12 02:32:15 +01:00
21879da80d Added -d parameter for dbname to postgres-container healthcheck (#2571)
Co-authored-by: Sebastian <sbeck@darklxserver>
2021-11-08 21:47:00 +00:00
6cabc96f75 Merge pull request #2471 from SamantazFox/extractor-patch-2
Fix infinite recursion caused by `to_json` methods in different data structures
2021-11-07 21:32:02 +01:00
f4f9e75c27 Translations update from Weblate (#2557)
* Update Spanish translation
Co-authored-by: Jorge Maldonado Ventura <jorgesumle@freakspot.net>

* Update Japanese translation
Co-authored-by: The Hatsune Daishi <nao20010128@gmail.com>

* Update Croatian translation
Co-authored-by: Milo Ivir <mail@milotype.de>

* Update Swedish translation
Co-authored-by: Joel A <joeax910@student.liu.se>

* Update Esperanto translation
Co-authored-by: Jorge Maldonado Ventura <jorgesumle@freakspot.net>

* Update Chinese (Simplified) translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>

* Update Turkish translation
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>

* Update Chinese (Traditional) translation
Co-authored-by: Jeff Huang <s8321414@gmail.com>

* Update Lithuanian translation
Co-authored-by: g <muziejusinfo@gmail.com>

* Update Portuguese translation
Co-authored-by: SC <lalocas@protonmail.com>

* Update Indonesian translation
Co-authored-by: Neko Nekowazarashi <i.musthafa66@gmail.com>


Co-authored-by: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
Co-authored-by: The Hatsune Daishi <nao20010128@gmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Joel A <joeax910@student.liu.se>
Co-authored-by: Eric <spice2wolf@gmail.com>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Co-authored-by: Jeff Huang <s8321414@gmail.com>
Co-authored-by: g <muziejusinfo@gmail.com>
Co-authored-by: SC <lalocas@protonmail.com>
Co-authored-by: Neko Nekowazarashi <i.musthafa66@gmail.com>
2021-11-05 02:25:01 +01:00
2f235adadf Enhance some stuff in the README 2021-11-02 18:58:22 +01:00
afb284fa9b Add "preferences_quality_dash_label" to en_US.json
This key never existed before and #2524 just made it obvious.
2021-11-01 15:48:05 +01:00
93252f33ff Translations update from Weblate (#2543)
* Update Spanish translation
* Update Arabic translation
* Update Esperanto translation
* Update Chinese (Simplified) translation
* Update Turkish translation
* Update Chinese (Traditional) translation
* Update Lithuanian translation
* Update Portuguese translation

Co-authored-by: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
Co-authored-by: Rex_sa <rex.sa@pm.me>
Co-authored-by: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
Co-authored-by: Eric <spice2wolf@gmail.com>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Co-authored-by: Jeff Huang <s8321414@gmail.com>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: SC <lalocas@protonmail.com>

* Update translation files

Translation: Invidious/Invidious Translations
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/

Co-authored-by: Anonymous <noreply@weblate.org>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Omer I.S <omeritzicschwartz@gmail.com>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Co-authored-by: 황윤성 <hys@osbusiness.net>
2021-10-31 16:56:56 +01:00
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
86f75758a7 Fix 'to_json' in struct PlaylistVideo 2021-10-29 16:26:42 +02:00
0ec94405ce Add TODO comments to other places 2021-10-29 16:26:42 +02:00
33780f1995 Also fix 'to_json' in struct Video 2021-10-29 16:26:35 +02:00
1cb715ac9f serialized_yt_data: force datatype of 'locale' 2021-10-28 17:48:08 +02:00
f65b628bf3 serialized_yt_data: Remove default nil value in to_json
this will ensure that two parameters are passed and that it
doesn't collide with 'to_json(builder)'
2021-10-28 17:48:07 +02:00
60fa552469 Fix an infinite recursion caused by #2228
Changes in the aforementioned PR lead to change the behavior
of some old code.

The data type of the parameters aren't explicit enough, which
makes the compiler use the wrong method because of type infering.
2021-10-28 17:48:07 +02:00
437bdedb07 Use env.request.resource for instance switch link 2021-10-26 16:12:25 -07:00
a531f4f057 Rebase error 2021-10-26 16:12:25 -07:00
bb396a310e Remove unneeded redirect.invidious.io code in /redirect 2021-10-26 16:12:25 -07:00
66e7285108 Only use /redirect when automatically redirecting 2021-10-26 16:12:16 -07:00
2b81a82620 Merge pull request #2529 from DmitrySandalov/master
Feature Request: Localization for trending iv-org#331
2021-10-26 23:49:56 +02:00
b555df8377 Merge pull request #2428 from syeopite/ameba-fixes
Fix (some) issues detected by Ameba
2021-10-26 23:34:18 +02:00
232730e909 Merge branch 'master' into master 2021-10-26 23:31:48 +02:00
2c1b4b0dd8 Merge pull request #2524 from SamantazFox/preferences-locales-rework
Preferences locales key normalization
2021-10-26 23:23:29 +02:00
1e0712625a Normalize translation key for preferences categories
categories normalized:
 - Miscellanous
 - Player
 - Visual
 - Administrator
 - Data
 - Subscription
2021-10-26 23:17:04 +02:00
88752f32bd Normalize translation key for user prefrerences
preferences normalized:
 - annotations
 - annotations_subscribed
 - automatic_instance_redirect
 - autoplay
 - captions
 - comments
 - continue
 - continue_autoplay
 - dark_mode
 - default_home
 - extend_desc
 - feed_menu
 - listen
 - local
 - locale
 - max_results
 - notifications_only
 - player_style
 - quality
 - quality_dash
 - related_videos
 - show_nick
 - sort
 - speed
 - thin_mode
 - unseen_only
 - video_loop
 - volume
 - vr_mode
2021-10-26 23:15:39 +02:00
7a93d4c7e4 Merge pull request #2523 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-10-26 21:10:07 +02:00
c3c767eed8 Update Indonesian translation
Update Portuguese (Brazil) translation

Update German translation

Update Portuguese translation

Update Croatian translation

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Remove blank strings" hook in Weblate.

Update translation files

Updated by "Remove blank strings" hook in Weblate.

Update translation files

Updated by "Remove blank strings" hook in Weblate.

Update translation files

Updated by "Remove blank strings" hook in Weblate.

Update translation files

Updated by "Remove blank strings" hook in Weblate.

Update translation files

Updated by "Remove blank strings" hook in Weblate.

Update translation files

Updated by "Remove blank strings" hook in Weblate.

Update translation files

Updated by "Remove blank strings" hook in Weblate.

Update translation files

Updated by "Remove blank strings" hook in Weblate.

Co-authored-by: Gabriel Cardoso <g.cardoso@mailfence.com>
Co-authored-by: Gordon Shumway <machine@gordon-shumway.net>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Neko Nekowazarashi <i.musthafa66@gmail.com>
Co-authored-by: SC <lalocas@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2021-10-26 15:31:25 +02:00
6f19a3a21e Delete lock.yml 2021-10-26 15:31:13 +02:00
06be0fb351 Add healthcheck for docker-compose 2021-10-26 10:13:39 +02:00
e2bbc9a6fa Switch to #sort_by! in pull_popular_videos job 2021-10-25 01:14:14 -07:00
17e481c107 Reduce block verbosity further 2021-10-25 01:14:14 -07:00
b8f27a42a7 Optimize assigning of on_response_received_endpoints 2021-10-25 01:14:14 -07:00
575c66efd3 Remove extra dot between [] from ambea copy-pasting. 2021-10-25 01:14:14 -07:00
88ad7c8d8d Update src/invidious/routes/playlists.cr
Co-authored-by: Samantaz Fox <coding@samantaz.fr>
2021-10-25 01:14:09 -07:00
1adcac175e Update src/invidious/routes/channels.cr
Co-authored-by: Samantaz Fox <coding@samantaz.fr>
2021-10-25 01:14:09 -07:00
dd8c412abc Fix Style/IsAFilter issues 2021-10-25 01:14:08 -07:00
e969c1490a Fix Performance/ChainedCallWithNoBang issues 2021-10-25 01:12:26 -07:00
e91421253e Fix Style/VerboseBlock issues 2021-10-25 01:12:26 -07:00
35d15c7c2b Fix Style/VariableNames issues 2021-10-25 01:12:26 -07:00
20cb751ff6 Fix Lint/UnusedArgument issues 2021-10-25 01:12:26 -07:00
0614b52f03 Fix Lint/RedundantStringCoercion issues 2021-10-25 01:12:19 -07:00
a629521c37 Feature Request: Localization for trending (remove region from server config) 2021-10-25 10:57:27 +03:00
5eb83bb39c Bump crystal version for ARM docker container to 1.2.0-r0 (#2527) 2021-10-24 19:26:53 +00:00
0e17d026f2 Feature Request: Localization for trending (fix lint CONTENT_REGIONS end comma) 2021-10-21 23:38:49 +03:00
ea0b1fdf44 Feature Request: Localization for trending (reword region doc) 2021-10-21 22:37:43 +03:00
1d78d67af3 Feature Request: Localization for trending (move TRENDING_REGIONS to i18n.cr as CONTENT_REGIONS) 2021-10-21 22:30:49 +03:00
d9c58c4837 Feature Request: Localization for trending iv-org#331 2021-10-21 14:54:15 +03:00
129779a757 Merge pull request #2433 from iv-org/increase-channel-refresh-delay
Decrease channel refresh frequency (1 min -> 1 h)
2021-10-20 19:12:35 +00:00
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
db7e7aae46 Merge pull request #2478 from SamantazFox/code-cleanup
Code cleanup
2021-10-18 16:52:37 +00:00
cb9b84f940 Move 'extract_text()' to 'extractors_utils.cr' 2021-10-18 16:14:37 +02:00
33d9be0ffb Move 'extractors.cr' to 'yt_backend' folder 2021-10-18 16:12:49 +02:00
2571e420f3 Move 'add_yt_headers()' to 'connection_pool.cr' 2021-10-18 16:12:18 +02:00
e17c8b1f4d Move 'extract_videos' and 'extract_selected_tab' too 2021-10-18 16:12:18 +02:00
8805ee7c8c Add fetch_continuation_token back (required by #2215) 2021-10-18 16:12:18 +02:00
7df2fd0bc8 Add 'require' statement to 'invidious.cr' 2021-10-18 16:12:17 +02:00
f7f0910953 Remove fetch_continuation_token(): dead code 2021-10-18 16:12:17 +02:00
d300797e22 Move the YoutubeConnectionPool code to its own file 2021-10-18 16:12:17 +02:00
56dbe15943 Move proxy & YoutubeAPI code to the yt_backend folder 2021-10-18 16:12:17 +02:00
736d63c08f Translations update from Weblate (#2518)
* Update Arabic translation
* Update Chinese (Simplified) translation
* Update Chinese (Traditional) translation
* Update Esperanto translation
* Update Lithuanian translation
* Update Norwegian Bokmål translation
* Update Spanish translation
* Update Turkish translation

Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Co-authored-by: Eric <spice2wolf@gmail.com>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: Jeff Huang <s8321414@gmail.com>
Co-authored-by: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Co-authored-by: Rex_sa <rex.sa@pm.me>
Co-authored-by: TheFrenchGhosty <TheFrenchGhosty@posteo.is>
2021-10-18 15:50:27 +02:00
5f65e92500 Merge pull request #2508 from syeopite/lazy-load-images
Lazy load (some) images
2021-10-17 18:25:59 +00:00
a65b9b2b53 Merge pull request #2406 from TechnicalSuwako/fix-non-js-player
fix non-JS player #2405
2021-10-17 18:22:08 +00:00
cc10e8ca5d bump version number for crystal alpine linux package 2021-10-17 15:14:00 +00:00
dfe0c738d6 Fix in README: license is AGPLv3, not AGPLv3+ 2021-10-17 15:53:01 +02:00
21b96a3159 Merge pull request #2506 from syeopite/handle-empty-playlist-tabs
Handle YT tabs without content
2021-10-15 22:13:25 +00:00
888c7e2c29 Merge pull request #2491 from syeopite/extract-image-routes
Extract image routes
2021-10-15 22:13:10 +00:00
d6eaeef8a6 Add Crystal 1.2.0 to CI and bump install-crystal (#2517) 2021-10-15 16:01:03 +02:00
961c5740b7 Merge pull request #2512 from iv-org/fix-2510
Fix #2510
2021-10-14 19:01:12 +00:00
22e8f7e287 Fix #2510 2021-10-14 21:00:14 +02:00
c26b383a1b Update English (United States) translation (#2511)
Co-authored-by: TheFrenchGhosty <TheFrenchGhosty@posteo.is>
2021-10-14 20:53:51 +02:00
2cec1fe4bb Merge pull request #2510 from iv-org/donate-page
Link to invidious.io/donate/ in the footer
2021-10-14 18:46:56 +00:00
9da1c6c6de Translations update from Weblate (#2505)
* Update Arabic translation

* Update Spanish translation

* Update Spanish translation

* Update Esperanto translation

* Update Chinese (Simplified) translation

* Update Turkish translation

* Update Chinese (Traditional) translation

* Update Japanese translation

* Update Lithuanian translation

* Update Korean translation

* Update Portuguese translation

Co-authored-by: Rex_sa <rex.sa@pm.me>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Co-authored-by: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
Co-authored-by: Eric <spice2wolf@gmail.com>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Co-authored-by: Jeff Huang <s8321414@gmail.com>
Co-authored-by: 黒にゃんこ <renraku@076.ne.jp>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: 황윤성 <me@hys.pe.kr>
Co-authored-by: SC <lalocas@protonmail.com>
2021-10-14 20:41:54 +02:00
806ddf1aca Change the translation key of the Donate page 2021-10-14 20:40:20 +02:00
0ad2793b68 Link to invidious.io/donate/ in the footer 2021-10-14 20:20:25 +02:00
585e4617e8 Lazy load (some) images 2021-10-14 08:18:44 -07:00
76c6886791 Merge pull request #2507 from fredsterorg/master
Fix typo
2021-10-14 09:27:15 +00:00
91bc6599c6 Fix typo 2021-10-13 21:45:51 -07:00
4d44b2c3a4 Handle YT tabs without any content 2021-10-13 11:38:20 -07:00
b49b5fbda9 Support empty categories 2021-10-13 11:35:31 -07:00
17e6093abb Merge pull request #2497 from Yetangitu/videorendererparser_parse_missing_title
Handle missing title fields in VideoRendererParser.parse (fixes #2495)
2021-10-12 19:04:51 +00:00
3dc980e800 Fix for #2488 - parse contents of search results of type=Category (#2496)
* Fix for #2488 - parse contents of search results of type=Category (returned on first page for universal (type=all) queries instead of returning an error.

* Moved content array walker to Category#to_json

As requested by reviewer this change moves the content array walker from the API endpoint to the Category class.

* Update src/invidious/helpers/serialized_yt_data.cr

Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com>
2021-10-12 18:17:45 +00:00
c44c1003af Handle missing title fields in VideoRendererParser.parse 2021-10-12 14:56:15 +00:00
39c27f0c66 Merge pull request #2257 from diogorac/fix-only-second-vid 2021-10-11 23:55:09 +02:00
678b10dbcf Lookback 50 videos 2021-10-11 23:52:57 +02:00
a1d6411f1f propagate video_id field on getting playlists 2021-10-11 23:51:07 +02:00
c4c8a10507 rename from continuation to video_id on get_playlist_videos 2021-10-11 23:49:08 +02:00
ee94ccdeb0 update to new YoutubeAPI 2021-10-11 23:49:08 +02:00
e3df9f9ead use dig for getting the video index 2021-10-11 23:49:08 +02:00
62dc629337 linting 2021-10-11 23:49:08 +02:00
dccdf38ce7 increase the max videos in a playlist 2021-10-11 23:49:07 +02:00
84124b837d use v1/next instead of searching for the continuation index 2021-10-11 23:49:07 +02:00
6176da3cbb linting 2021-10-11 23:46:23 +02:00
24bc3e2704 no need to normalize the offset 2021-10-11 23:45:22 +02:00
f13fb80b42 scroll the nextVideo into the top 2021-10-11 23:43:41 +02:00
0a9e19646a pass the api/v1/playlists with videos before the offset 2021-10-11 23:43:41 +02:00
65e45c4079 linting 2021-10-11 23:30:49 +02:00
440105976f fix cases when high offset video from playlist has no offset in url 2021-10-11 23:30:49 +02:00
7eba7fbcc7 add index to playlist item 2021-10-11 23:30:49 +02:00
d9bfb3d305 playlist starts at the offset 2021-10-11 23:30:49 +02:00
4246c7a523 Extract image routes 2021-10-11 13:22:11 -07:00
e3054ccdd2 Fix Role "kemal" does not exist (#2490) 2021-10-11 19:34:25 +00:00
df968d1919 variable postgres username and database name (#2451) 2021-10-11 19:16:56 +00:00
7661c3c061 Remove useless 'require' statement in spec 2021-10-11 18:33:36 +02:00
57ed047025 Add mising 'require' statement to 'invidious.cr' 2021-10-11 18:33:36 +02:00
bda3a26423 Move server structure to a separate file 2021-10-11 18:33:36 +02:00
080d9a8dc7 move theme converter function to a separate file 2021-10-11 18:33:36 +02:00
984a4acc7b Move user preferences structure to a separate file 2021-10-11 18:33:36 +02:00
b10f37bea9 Use kemal in production mode (#2455) 2021-10-11 14:42:22 +02:00
0947c26612 Fix URL-encoding in href strings (#2460)
* hrefs: replace HTML.escape w/ URI.encode_www_form

* Fix search_query_encoded
2021-10-11 05:18:20 -07:00
f5e7fe34a5 Added border radius to channel-profile (#2484) 2021-10-11 09:53:37 +02:00
c6f088d6ca Reduce refresh delay, increase backoff start duration 2021-10-08 18:39:02 +02:00
21e29411af Fix extractor bugs (#2454)
* Add debug/trace logging to extract_items
* Handle invalid timestamps for livestreams extraction
* Make use of author_fallback in playlist extractor
* Don't use extract_text for video length extraction

The extract_text function attempts to extract from both the simpleText and
the runs route. This is typically what we'd want for text extraction as
it could appear in both locations. However, while this still holds true,
the thumbnailOverlayTimeStatusRenderer writes a numerical length (when
present on the video) to the simpleText route and uses runs for a
text overlay like "LIVE" or "PREMIERE".

Therefore, when a video has a text overlay instead of a numerical one,
Invidious still passes it onto decode_length_seconds, which obviously
raises since it cannot be converted into integers.

In the future, if more routes requires one text route over the other, we
should go ahead and add an argument to extract_text itself. Though for
now, this is sufficient.

* Handle unsupported "special" categories
2021-10-07 23:39:21 +02:00
f85930700b Add myself (SamantazFox) as codeowner of locale files (#2472) 2021-10-07 06:01:25 -07:00
707ef1d0f7 Translations update from Weblate (#2470)
* Update Russian translation

* Update Arabic translation

* Update Spanish translation

* Update Esperanto translation

* Update Chinese (Simplified) translation

* Update Turkish translation

* Update Chinese (Traditional) translation

* Update Lithuanian translation

* Update Portuguese translation

Co-authored-by: Nikita Epifanov <nikgreens@protonmail.com>
Co-authored-by: Rex_sa <rex.sa@pm.me>
Co-authored-by: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
Co-authored-by: Eric <spice2wolf@gmail.com>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Co-authored-by: Jeff Huang <s8321414@gmail.com>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: SC <lalocas@protonmail.com>
2021-10-07 05:25:54 -07:00
adc12addfa Add config option to display source code URL in footer (#2450) 2021-10-07 13:53:12 +02:00
bfef9d4b6e Update Persian translation (#2463)
Co-authored-by: Mostafa Ahangarha <ahangarha@gmail.com>
2021-10-05 16:18:08 +00:00
fd29cb9023 Add missing filter ui locales (#1912) 2021-10-05 14:46:19 +00:00
d806310665 Revert "Fix typo (#2456)" (#2457)
This reverts commit 4982bff74d.
2021-10-04 19:51:57 +02:00
4982bff74d Fix typo (#2456) 2021-10-04 17:47:57 +00:00
347c189f3f Merge pull request #1678 from Rjevski/idempotent-database-migrations
Make DB migrations idempotent.
2021-10-03 18:53:35 +00:00
81b12b8001 Add support to make invidious API-only via flag (#2363) 2021-10-02 20:04:02 +00:00
3e781b7d13 Merge pull request #2443 from iv-org/syeopite-patch-1
Use make_client when querying instance api
2021-10-02 20:00:37 +00:00
9c44e41a4c Merge pull request #2228 from syeopite/extract-items-overhaul
Overhaul extract_item(s) functions and add infrastructure for parsing YouTube categories
2021-10-02 20:00:16 +00:00
402bb01151 Update container-release.yml 2021-10-02 16:10:23 +00:00
82a1d9dffa Install Crystal in container-release for linter 2021-10-02 16:10:07 +00:00
570541ba49 Run linter in container-release workflow 2021-10-02 16:00:43 +00:00
73eabb6ca2 Actually fix lint 2021-10-02 08:53:58 -07:00
5a52b4fe45 Fix lint 2021-10-02 17:41:25 +02:00
caa08a6379 Disable locales with less than 50% of strings translated 2021-10-02 17:38:06 +02:00
cd02078e26 Add Portuguese (pt) to locales
follow up to #2437
2021-10-02 17:19:28 +02:00
0341faeb13 Translations update from Weblate (#2437)
* Add Portuguese translation
* Update German translation
* Update Basque translation
* Update Spanish translation
* Update Portuguese (Brazil) translation
* Update Portuguese (Portugal) translation
* Update Korean translation

Co-authored-by: SC <lalocas@protonmail.com>
Co-authored-by: Pukima <pukima@pukima.site>
Co-authored-by: Sergio Varela <sergitroll9@gmail.com>
Co-authored-by: Kim Tae Kyeong <kim@taekyeong.me>
2021-10-02 17:17:30 +02:00
77131cff91 Use make_client when querying instance api 2021-10-02 15:16:07 +00:00
0c7726d4e1 Update/create versions.yml after dep installation 2021-10-02 06:17:03 -07:00
1f1e14fba5 Propagate exceptions from fiber 2021-10-02 06:07:48 -07:00
9be8263f26 Use command literal for extraction 2021-10-02 05:52:42 -07:00
7b2aa5f98e add icon-buttons to playlist items (#2442) 2021-10-02 11:59:33 +00:00
26b28cea49 Use break instead of short-circuit return 2021-10-01 05:39:23 -07:00
23049e026f Improve readabltiy of SearchChannel auto-gen detect 2021-09-28 08:55:02 -07:00
9ab242ca2e Optimize routing logic of extract_item(s) funcs 2021-09-28 08:50:23 -07:00
aa59925374 Rename get_browse_endpoint to get_browse_id 2021-09-28 08:39:00 -07:00
43ea8fa706 Convert nil for AuthorFallback to empty strings 2021-09-28 08:25:03 -07:00
6df85718e6 Apply suggestions from code review
Co-authored-by: Samantaz Fox <coding@samantaz.fr>
2021-09-28 15:23:36 +00:00
82e6f6e095 Create CODEOWNERS (#2417)
https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

Allows automatically assigning PRs to teams/users when it modifies a 
specific section of the repo that they "own".
2021-09-28 06:14:42 +00:00
9ba3e1cdb4 Decrease channel refresh frequency (1 min -> 1 h)
This is a temporary fix to reduce load on instances with many channels and avoid IP being flagged by Google.
2021-09-26 23:31:14 +02:00
b20f72b963 Use default timeout (5 seconds) for YT pool (#2430) 2021-09-26 23:03:45 +02:00
092b8a4e52 Add documentation to extractors.cr 2021-09-24 21:07:07 -07:00
e5f07dedbf Typos and tiny styling changes 2021-09-24 21:07:07 -07:00
ca9eb0d539 Bountiful extractor changes
- Add extract_text to simplify extraction of InnerTube texts
- Add helper extractor methods to reduce repetition in parsing InnerTube
- Change [] more than 2 blocks long to use #dig or #dig?
- Remove useless ?.try blocks for items that always exists
- Add (some) documentation to VideoRendererParser
2021-09-24 21:07:07 -07:00
142317c2be Overhaul extractors.cr to use modules 2021-09-24 21:07:07 -07:00
3dea670091 Switch to structs in extractors.cr for performance 2021-09-24 21:07:07 -07:00
8435e79913 Improve documentation for extract_item(s) funcs 2021-09-24 21:07:07 -07:00
30e85b40f9 Fix extract_videos 2021-09-24 21:07:07 -07:00
be1a43a337 Manually extract category refactor from 1b569bbc99207cae7c20aa285f42477ae361dd30
Also fixes some errors caused by cherry-picking
2021-09-24 21:07:07 -07:00
abca8f7a7c Rename invidiousitems.cr 2021-09-24 21:07:07 -07:00
7b60dac526 Add description_html field to Category
(cherry picked from commit aa8f15f795787113e56473f8e8fd606749a14bdd)
2021-09-24 21:07:07 -07:00
ea6434662d Change typing of Category contents to only Array
(cherry picked from commit d3384e17f10d0baca70db7993df14100485be9da)
2021-09-24 21:07:06 -07:00
0b7a108a59 Move continuation_token out of Category struct
(cherry picked from commit 0e96eda28f25171a0344b972af1852a4d6fc3007)
2021-09-24 21:07:06 -07:00
57c63f3598 Rename "items_without_cate_items" to reflect usage 2021-09-24 21:07:06 -07:00
ae30f32c36 Unpack search items that are embedded in categories
This is a squash of a bunch of commits
cherry-picked commits

Fix category parse error on search

(cherry picked from commit cc02fed4e69f0eb5f19e017173632b3a3f20519f)

Fix category items not being extracted in search

(cherry picked from commit 2605b9c609ff217b5a6ae09d22450596dcad90fc)

Make search not include category items for now

(cherry picked from commit ca4afd59f46b595e3c339f31432cad98a5771ee1)

Change behavior of categories in search results

(cherry picked from commit cc1067561051b1c113b490e79c4a71cd346f7b3f)

Fix missing search results in extraction

(cherry picked from commit abda6840d5bfe58f845128bdd1a3f4916dd3bb84)

Fix miscount of search results

(cherry picked from commit 491e33450eb1300d0234bb33df0d0e78a027114f)
2021-09-24 21:07:06 -07:00
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
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
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
d97e128dc0 Translations update from Weblate (#2424)
* Update Russian translation

* Update Indonesian translation

* Update Croatian translation

Co-authored-by: Nikita Epifanov <nikgreens@protonmail.com>
Co-authored-by: Reza Almanda <rezaalmanda27@gmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
2021-09-23 23:49:28 +02:00
86ca568d6d Remove login type button from frontend (#2423) 2021-09-23 08:44:26 +02:00
92b04a30f3 Prevent indexing of Invidious instances (#2420)
Closes #2418
2021-09-22 01:29:51 +02:00
2b0bb69a4f Fix mixes route (#2421) 2021-09-20 22:39:32 -07:00
67b01506c9 Update note on video.js in js dependencies file 2021-09-19 15:06:59 -07:00
b20b802a8d Bump video.js to 7.11.0 2021-09-19 14:56:05 -07:00
87f46a7532 Unregister captcha job (#2390) 2021-09-19 10:30:19 +00:00
45a1407144 Downgrade video.js version
Dash qualties can't be changed on anything higher than 7.10.2. This is
likely something wrong with videojs-http-source-selector.
2021-09-18 19:59:43 -07:00
4a0359c04e Pass success msg from dep script during compile-time 2021-09-18 14:48:57 -07:00
4e629ca858 Use shell command sha1sum for checksum
Crystal doesn't support OpenSSL3, the version Alpine uses. See
https://github.com/iv-org/invidious/pull/2397#issuecomment-922375908
2021-09-18 14:42:41 -07:00
c32cae00d5 Fix phrasing 2021-09-18 13:30:17 -07:00
02431b3f98 Use correct videojs-vtt-thumbnails location in licences.ecr 2021-09-18 13:30:17 -07:00
0323202a03 Revert to iv-org fork of silvermine-videojs-quality-selector
Upstream requires at least two additional sources. Whereas Invidious needs it to be
able to display a single additional source for normal (dashless)
qualites. Aka medium and hd720.
2021-09-18 13:30:17 -07:00
b6670a7e3d Fix minified silvermine-...quality* fetching 2021-09-18 13:30:17 -07:00
62c1991b88 Typo 2021-09-18 13:30:17 -07:00
3a6085ad31 Readd player.css 2021-09-18 13:30:17 -07:00
6e1b62aedf Fix docker
Clone scripts folder to docker container

Copy videojs-dependencies.yml to docker container

Copy assets folder eariler in build process

Copy assets folder from builder
2021-09-18 13:30:17 -07:00
2451497b31 Typo 2021-09-18 13:30:17 -07:00
6699c80357 Preserve videojs directory for dependency script 2021-09-18 13:30:17 -07:00
1af1474d04 Change "VideoJS" in put reports to "Player" 2021-09-18 13:30:17 -07:00
06a1d2ac41 Rename fetch_videojs* to fetch_player* 2021-09-18 13:30:16 -07:00
f47b588b91 Print message when VideoJS deps are satisfied 2021-09-18 13:30:16 -07:00
262131f68e Add script to resolve and fetch VideoJS files 2021-09-18 13:30:15 -07:00
ceae48088e Stop shipping VideoJS files 2021-09-18 13:28:48 -07:00
e655af251c Try not to log search queries (#2362) 2021-09-16 09:36:22 +00:00
3351ad8197 fix non-JS player #2405 2021-09-15 20:23:48 +09:00
5054510d15 Prevent VR from being initialized in listen mode (#2396) 2021-09-15 01:37:23 +02:00
947fe4fbb3 HTML escape video mimetype
Video mimetype may contain code information between double quotes.
If not properly escaped, it breaks the browser's parser. E.g:
```
type="video/mp4; codecs=" avc1.64001f,="" mp4a.40.2""=""
```

Thank Robin for catching this!
2021-09-13 18:20:11 +02:00
50c8afb525 Handle equirectangular projections for VR (#2379) 2021-09-10 07:42:39 +00:00
a539de4f97 Bump dependencies (#2378)
* Upgrade to Kemal v1.1.0

* Bump postgres driver
2021-09-10 07:42:15 +00:00
8d5a867271 Merge pull request #2380 from syeopite/fix-invidious-showing-yt-redirect-links
Fix invidious showing yt redirect links
2021-09-06 11:15:08 +02:00
6a1954f8f7 Translations update from Weblate (#2384)
* Update Arabic translation

* Update Spanish translation

* Update Esperanto translation

* Update Chinese (Simplified) translation

* Update Turkish translation

* Update Chinese (Traditional) translation

* Update Portuguese (Brazil) translation

* Update Lithuanian translation

* Update Japanese translation

Co-authored-by: Rex_sa <rex.sa@pm.me>
Co-authored-by: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
Co-authored-by: Eric <spice2wolf@gmail.com>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Co-authored-by: Jeff Huang <s8321414@gmail.com>
Co-authored-by: André Marcelo Alvarenga <andrealvarenga@gmx.net>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: GnuPGを使うべきだ <dieeeazpnnqbpddh@cock.email>
2021-09-06 10:54:54 +02:00
0044178d49 Merge pull request #2382 from unixfox/fix-comment-replies
fix comment replies
2021-09-06 10:54:03 +02:00
387bddb51b Improve detection and handling of yt redirect links 2021-09-05 13:13:37 -07:00
41ba19b615 fix comment replies 2021-09-04 15:37:16 +02:00
0e37e42abd use crystal 1.1.1 for the ARM docker image 2021-09-03 19:15:04 +02:00
a28945273d Propagate replacing yout.be links to /watch to RSS 2021-09-03 03:33:49 -07:00
fd6f03655e Fix typo causing links to be youtube.com/redirect 2021-09-03 03:30:36 -07:00
8b62c05fe2 remove 3gp only from the player (#2376)
+ video quality precedence on default player when js is not enabled
2021-09-03 09:39:11 +02:00
0e92a63d14 fix image location for helm 2021-09-01 21:21:38 +00:00
a4ff0b62ce Skip container release for insignficant changes (#2367) 2021-09-01 11:28:20 +00:00
dd141daefd Make building in release mode optional (#2368) 2021-09-01 13:24:17 +02:00
a1001ada47 Properly transform youtu.be links to be /watch routes in comments and descriptions (#2365) 2021-09-01 12:59:47 +02:00
f938aa530e Merge pull request #2372 from TheFrenchGhosty/master
Remove the mention of 'Omar Roth' from the footer
2021-09-01 10:34:10 +00:00
8d419da277 Actually translate the new string to French 2021-09-01 12:30:39 +02:00
8e3ff79f22 Remove the mention of 'Omar Roth' from the footer 2021-09-01 12:23:50 +02:00
d0c12caae9 Merge pull request #2371 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-09-01 10:16:22 +00:00
17a99a524b Update Finnish translation 2021-09-01 12:15:45 +02:00
41a757c3be Update German translation 2021-09-01 12:15:44 +02:00
61fc6539c2 Merge pull request #2366 from TheFrenchGhosty/more-cryptocurrencies
Add Ethereum and Litecoin as donation methods
2021-08-31 21:04:27 +00:00
99f04012a7 Add Ethereum and Litecoin as donation methods 2021-08-31 22:58:38 +02:00
891116f13b docker images with --release for more stability
fixes #1652
2021-08-31 21:24:54 +02:00
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
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
a279d6f433 Fix livestream parsing URLs (#2356) 2021-08-26 21:02:26 +00:00
5c74196f60 remove docker cache on the CI test 2021-08-24 23:20:39 +02:00
33724d40a8 moved APKBUILD files to iv-org/lsquic.cr/docker
and remove docker cache
2021-08-24 23:15:41 +02:00
d78e5281fe use pre-compiled lsquic docker image
from https://quay.io/repository/invidious/lsquic-compiled
fixes #2325
2021-08-24 23:12:19 +02:00
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
d984a898d4 Remove usage of haltf in /api/v1/channels/:ucid/comments 2021-08-23 17:07:45 -07:00
52688106e4 Fix /api/v1/search/suggestions route link 2021-08-23 16:38:29 -07:00
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
0db23f9252 Merge pull request #2332 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-08-21 22:59:51 +00:00
23b2abc273 Update Arabic translation 2021-08-21 15:32:33 +02:00
0350d0784a Update Lithuanian translation 2021-08-21 15:32:33 +02:00
83219a499c Update Swedish translation 2021-08-21 15:32:33 +02:00
3f4d5bc85c Update Esperanto translation 2021-08-21 15:32:33 +02:00
83b790950c Update Spanish translation 2021-08-21 15:32:33 +02:00
16b10ec3d7 Update Polish translation 2021-08-21 15:32:33 +02:00
1d4dd4484d Add cache(?) to arm docker build (#2337)
* Add cache(?) to arm docker build

* Update ci.yml
2021-08-21 06:32:28 -07:00
8bd2669d3d Update lock inactive days (#2331) 2021-08-16 10:41:32 -07:00
b5d2eb5c70 fetch with innertube api when video is unavailable (#2329)
+ rename some client type to better names
+ fix thirdParty hack
2021-08-16 10:41:16 -07:00
25362f16a0 Readd paid attribute for videos (#2330) 2021-08-15 10:38:30 +02:00
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
b3426fdc94 Restructure API routes to use more namespaces 2021-08-14 00:18:25 -07:00
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
66becbf46f Restructure API route organisation 2021-08-14 00:18:24 -07:00
cbf3d75087 Extract API routes from invidious.cr (1/?) 2021-08-14 00:18:24 -07:00
0b0036813f Remove deprecated APIs
- insights
- top feed
2021-08-14 00:18:03 -07:00
c06a20e085 Switch to innertube API for videos (#2220)
Commit history:
- Switch to innertube API for videos
- fix hardcoded strings + fix bypass geo-restriction
2021-08-13 20:29:43 +00:00
c60fccd7f6 Update crystal docker image to 1.1.1 2021-08-13 08:44:44 +02:00
46f8b04e40 Revert "bump crystal docker image version +"
This reverts commit f2b69fd812.

Crystal 1.1.0 is not supported by Invidious due to upstream issue. See
crystal-lang/crystal#10972
2021-08-12 16:10:40 -07:00
12b46bbd41 switch to innertube API for about channels (#2255) 2021-08-12 16:00:26 -07:00
f2b69fd812 bump crystal docker image version +
use alpine:edge docker image in order to use crystal 1.1.1
2021-08-12 23:33:28 +02:00
0aae728e33 Fix "fatal role postgres doesn't exist" (#2296)
* Fix "fatal role postgres doesn't exist" 

Fix a frequent error with recent postgres docker images:
`FATAL:  role "postgres" does not exist`

* Use $$VAR so it's expanded by the shell, not docker
2021-08-12 19:55:10 +00:00
cea38de4ad Check for existance of "adaptiveFormats" in videos
Combined from commits:
- Check for existance of "adaptiveFormats" in videos
- Remove usage of ternary conditional
2021-08-12 19:26:50 +00:00
3e4fab7070 Merge pull request #2323 from unixfox/fix-comments
Fix comments - related to #2322
2021-08-12 18:52:19 +00:00
6745ca7775 fix comments using dig 2021-08-12 20:00:14 +02:00
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
2fdb2c7c9a Exempt "blocked" PRs from being marked as stale (#2321) 2021-08-12 08:42:09 -07:00
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
637a5cc14f Add CI for testing arm64 docker (#2315)
* Add CI for testing build of docker-arm64

* Add specs check to dockerfiles
2021-08-09 22:34:52 -07:00
81e77693b2 Merge pull request #2294 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-08-09 03:28:41 -07:00
d49f884f69 Update Indonesian translation 2021-08-06 11:08:48 +02:00
34eeb29436 Update Arabic translation 2021-08-06 11:08:48 +02:00
0495347c64 Update Portuguese (Brazil) translation 2021-08-06 11:08:48 +02:00
023f9b44d3 Update Korean translation 2021-08-06 11:08:48 +02:00
5248814053 Update Spanish translation 2021-08-06 11:08:48 +02:00
7ddab5b8cd Don't run CI on locale only changes (#2306) 2021-08-06 11:08:44 +02:00
a26adb162c Bump Crystal 1.1.0 to 1.1.1 2021-08-06 00:40:54 -07:00
ef5df36a8a Add nightly crystal to CI matrix (#2264)
* Add nightly crystal to a spec matrix

This project is very large and serves as a great test bed for breakages
in nightly builds of crystal

* Order crystal version in CI matrix

* Add daily CI runs
2021-08-06 00:40:32 -07:00
9b74cf3225 Typo 2021-08-03 23:57:48 +02:00
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
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
e9add69e26 Fix #resolve_url by adding ClientConfig argument
The private `_post_json` method of the YoutubeAPI requires a ClientConfig
as the third parameter. This was passed in all Youtube API methods except the
`#resolve_url` method.
2021-08-03 00:48:58 -07:00
5b020e81ca Youtube api improvements (#2277)
* Put youtube API functions under the YoutubeAPI namespace

* Implement the following endpoints:
  - `next`
  - `player`
  - `resolve_url`

* Allow a ClientConfig to be passed to YoutubeAPI endpoint handlers.

* Add constants for many new clients

* Fix documentation of YoutubeAPI.browse(): Comments and search
  result aren't returned by the browse() endpoint but by the next()
  and search() endpoints, respectively.

* Accept gzip compressed data, to help save on bandwidth

* Add debug/trace logging

* Other minor fixes
2021-08-03 02:58:27 +02:00
c76bd7b45b Merge pull request #2288 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-07-31 14:18:29 +00:00
21b7ae3ac3 Update Korean translation 2021-07-29 02:15:57 +02:00
e45da7161f Update Korean translation 2021-07-29 02:15:57 +02:00
7a3c000955 Update Vietnamese translation 2021-07-29 02:15:57 +02:00
f75c5db372 Update Lithuanian translation 2021-07-29 02:15:57 +02:00
7cd1d82d26 Update Danish translation 2021-07-29 02:15:57 +02:00
0085c3b0d8 Update Croatian translation 2021-07-29 02:15:57 +02:00
4251c6cb99 Update Indonesian translation 2021-07-29 02:15:57 +02:00
ac973df8e7 Update Hungarian translation 2021-07-29 02:15:57 +02:00
a76a955a1b Update Portuguese (Portugal) translation 2021-07-29 02:15:57 +02:00
c89b98a1e0 Update Portuguese (Brazil) translation 2021-07-29 02:15:57 +02:00
dda4596c0c Update Japanese translation 2021-07-29 02:15:57 +02:00
4ac863203d Update Japanese translation 2021-07-29 02:15:57 +02:00
be5831d9bd Update Turkish translation 2021-07-29 02:15:57 +02:00
1e2fa27af7 Update Chinese (Simplified) translation 2021-07-29 02:15:57 +02:00
fcbaf2a978 Update Icelandic translation 2021-07-29 02:15:56 +02:00
b5c172974e Update Spanish translation 2021-07-29 02:15:56 +02:00
7bb70924c1 Update Basque translation 2021-07-29 02:15:56 +02:00
a62fb6dcd1 Update French translation 2021-07-29 02:15:56 +02:00
e9c06237f2 Update Norwegian Bokmål translation 2021-07-29 02:15:56 +02:00
bdb1eca741 Update Polish translation 2021-07-29 02:15:56 +02:00
29000a5209 Update German translation 2021-07-29 02:15:56 +02:00
88f0867442 Update Russian translation 2021-07-29 02:15:56 +02:00
3de06174bf Update English (United States) translation 2021-07-29 02:15:56 +02:00
5187894add Update Croatian translation 2021-07-29 02:15:56 +02:00
d58f7bb935 Update English (United States) translation 2021-07-29 02:15:56 +02:00
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
578bbcd181 Fix raw parameter for videos in listen mode (#2270) 2021-07-28 16:28:09 -07:00
0cdf13742a Merge pull request #2283 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-07-28 13:38:52 +00:00
b00d24579d Update Korean translation 2021-07-27 17:28:58 +02:00
5c76cdaad9 Merge pull request #2280 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-07-27 13:51:48 +00:00
5d994d179e Update Korean translation 2021-07-27 09:07:29 +02:00
8930020776 Update Korean translation 2021-07-27 09:07:27 +02:00
0637bf0dcb Merge pull request #2274 from syeopite/svg-logo
Change Invidious logo in README to be a svg.
2021-07-26 20:06:10 +00:00
2abec5b62f Use colorized version of safari-pinned-tab.svg 2021-07-25 16:07:11 -07:00
bc937a6434 Add Korean (ko.json) to loaded locales
Required because of c83113d49b.
2021-07-26 00:15:32 +02:00
3a84e3abcf Remove locales consistency check
This is not required anymore, due to the new weblate config (from now
on, weblate adds strings as they are translated).
2021-07-26 00:12:43 +02:00
e4c223ca59 Merge pull request #2266 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-07-26 00:09:30 +02:00
31de2d304c Change README logo to use vector image 2021-07-24 15:14:58 -07:00
c83113d49b Update Korean translation 2021-07-24 20:48:39 +02:00
d95980b3ba Update Portuguese (Brazil) translation 2021-07-24 20:48:39 +02:00
08a88af965 Update Japanese translation 2021-07-24 20:48:39 +02:00
4d4f61c922 Update Arabic translation 2021-07-24 20:48:39 +02:00
110b77f453 Update Russian translation 2021-07-24 20:48:39 +02:00
ba0d205457 Add Korean translation 2021-07-24 20:48:39 +02:00
1ee4cae802 Rework the README (#2135)
Major README.md cleaning

Additions:
* Add the invidious logo
* Add Quickstart section
* Add relevant links (instance list, documentation, contribute, donate) directly in the header

Badges:
* Add badges for open issues and PRs
* Add "Awesome Humane Tech" badge, as we're listed there
* Move CI passed/translated badges to the top
* Replace the "license feature" with a proper badge

Major section changes:
* Reword titles
* Rewrite features list
* Promote the screenshots sections. People like screenshots!
* Move "donate" to the end, there is a link at the top anyway
* Move section "made with invidious" after all the other invidious related sections + rename it to "Projects using Invidious"

Other fixes:
* Remove useless HTML in the screenshots table
* Remove extra columns in H2 titles
* Remove all useless lines between sections
* Use markdown for git commands + add the staging step
* Promote invidious redirect in "Extensions"
* Update preference screenshots
2021-07-24 20:48:30 +02:00
095c894548 Merge pull request #2201 from pinchese/patch-1
futureproof comment avatars
2021-07-16 21:43:37 -07:00
9f5f5da894 config_example.yaml: document all possible options (#2083)
Fixes https://github.com/iv-org/documentation/issues/46
2021-07-16 20:34:40 +02:00
aa3608f0af Include liblsquic build in dockerfile + add support for ARM64 on Docker (#2147)
Co-authored-by: Emilien Devos <contact@emiliendevos.be>
2021-07-15 21:57:20 +00:00
56ebef4352 Multiple front-end fixes (#2247)
Fixes:
* Sanitize user-provided content in HTML (Fixes #2193)
* Fix encoding of search query in prev/next pages (Fixes #2229)
* Fix some issues introduced with #2196:
   - Fix alignment of all <h3> elements (Move the inline style from the parent to the <h3> element)
   - Add missing comma on 'dir' HTML attribute (Typo introduced by PR #2196)

Code cleaning:
* Remove unnecessary 'each_sclice' + 'each' double loop in ECR files
* Clean the player's <source> list generation code (in player.ecr)
2021-07-15 23:01:36 +02:00
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
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
b5fdd29cd5 Translations update from Weblate (#2251)
* Update Arabic translation
* Update Bengali (Bangladesh) translation
* Update Chinese (Simplified) translation
* Update Chinese (Traditional) translation
* Update Croatian translation
* Update Czech translation
* Update Danish translation
* Update Dutch translation
* Update Esperanto translation
* Update Hebrew translation
* Update Indonesian translation
* Update Lithuanian translation
* Update Norwegian Bokmål translation
* Update Portuguese (Brazil) translation
* Update Serbian (cyrillic) translation
* Update Spanish translation
* Update Turkish translation
* Update Vietnamese translation

Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Co-authored-by: Eric <spice2wolf@gmail.com>
Co-authored-by: Jeff Huang <s8321414@gmail.com>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
2021-07-14 17:54:03 +02:00
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 44d18b8e147b47ad06a54cc6fd08423d9f39074d)
2021-07-14 17:46:12 +02:00
b633f8d207 More locales fixes for consistency checks 2021-07-12 21:58:38 +02:00
c4c813fd0a Fix da.json for consistency checks 2021-07-12 20:45:26 +02:00
f9c4cc274a Fix sr.json for consistency checks 2021-07-12 20:37:51 +02:00
cc45a0ca28 Fix cs.json for consistency checks 2021-07-12 20:34:10 +02:00
9ed1d28f76 Fix sk.json for consistency checks 2021-07-12 20:30:50 +02:00
7ca2acd24e Fix si.json for consistency checks 2021-07-12 20:19:09 +02:00
fdca468049 Update bn_BD.json to pass consistency checks 2021-07-12 20:05:10 +02:00
c0e8feb66e Add new and missing locales to i18n.cr
New locales: lt, vi
Missing: bn_BD, cs, da, eu, hu-HU, si, sk, sr, sr_Cyrl
2021-07-12 19:41:35 +02:00
0dd710c195 Translations update from Weblate (#2219)
* Add Lithuanian translation
* Add Vietnamese translation
* Update Arabic translation
* Update Chinese (Simplified) translation
* Update Chinese (Traditional) translation
* Update Croatian translation
* Update Czech translation
* Update Esperanto translation
* Update French translation
* Update Indonesian translation
* Update Norwegian Bokmål translation
* Update Portuguese (Brazil) translation
* Update Turkish translation

Co-authored-by: GM <muziejusinfo@gmail.com>
Co-authored-by: Petter Reinholdtsen <pere-weblate@hungry.com>
Co-authored-by: phlostically <phlostically@mailinator.com>
Co-authored-by: Eric <spice2wolf@gmail.com>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Co-authored-by: Jeff Huang <s8321414@gmail.com>
Co-authored-by: Vinicius <rodriguessv30@gmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Cao Dũng <dung.cc@hubservices.vn>
Co-authored-by: Rex_sa <rex.sa@pm.me>
Co-authored-by: Ondřej Sedláček <behests_phocaena@aleeas.com>
Co-authored-by: ToldYouThat <itoldyouthat@protonmail.com>
Co-authored-by: Samantaz Fox <translator-weblate@samantaz.fr>
Co-authored-by: Reza Almanda <rezaalmanda27@gmail.com>
2021-07-12 19:10:05 +02:00
39110ad21c Use struct for caption object 2021-07-11 16:17:22 -07:00
57bb8c610a Use embed stream pull as fallback for gated videos 2021-07-02 00:25:00 -07:00
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
fd313f0d66 Fix alignment of "invidious" logo on search page
The alignment was broken by #2196
2021-06-29 23:18:17 +02:00
67a18dcff6 Merge pull request #2196 from ahangarha/patch-1
Add bi-directional text support
2021-06-27 22:39:45 +02:00
54b19a04bb Fix caption parsing on age restricted videos 2021-06-27 08:35:28 -07:00
ca4df29670 Wrap comment 2021-06-25 14:14:41 -07:00
7da0b2fd7f Switch from URI::Params.new to URI::Params.encode 2021-06-25 12:14:21 -07:00
cfcb64c516 Fix layout of video 'card' items
Previous changes broke alignment of text and icons
2021-06-25 20:47:15 +02:00
135ae11c20 Merge pull request #2195 from B0pol/trending
Use youtubei API for trending
2021-06-25 17:53:07 +02:00
ce68d09d26 Pick a random video for bypass captcha
pick a random video from the 1000 first rows of the channel_videos table
in order to bypass the captcha more efficiently
2021-06-25 15:37:37 +00:00
aa55e67389 Fix extraction of age restricted videos 2021-06-25 07:51:51 -07:00
f7992d2d09 futureproof comment avatars
i was injecting custom css into the site that made the avatars round, and noticed comment avatars looked a little odd

i opened dev tools and siffed through the html, and noticed that the image was being padded,
when it would look nicer if the element used margin instead of padding

with padding:
https://imgur.com/c0pB37e

with proposed changes (margin instead of padding):
https://imgur.com/iKmBzEi
2021-06-24 23:50:37 -05:00
eecfc155b8 Right-align the RSS icon in channel playlists 2021-06-25 02:15:49 +02:00
9cef7945c0 Fix RTL text in video titles on Firefox
The behavior was as follow: on Right-To-Left text (e.g Arabic) that is wrapped
(because it's too long to fit on one line), the second row and following rows
may or may not be right aligned (as RTL text should be). Opening the devtools
fixes that alignement, as consistently as closing the devtool breaks it.

This problem seems to arrive only in the following configurations (link nested
in a paragraph, both of which may or may not have the dir= attribute):

* `<p><a href="some_link">RTL_TEXT</a></p>`
* `<p><a href="some_link" dir="auto">RTL_TEXT</a></p>`
* `<p dir="auto"><a href="some_link">RTL_TEXT</a></p>`

with the following CSS:

```
p {
	unicode-bidi: plaintext;
	text-align: start;
}
```

Changing the HTML to the following configuration (a paragraph with the dir=
attribute, nested in a link) seems to fix it:

`<a href="some_link"><p dir="auto">RTL_TEXT</p></a>`
2021-06-25 02:03:09 +02:00
1b1932f787 fix feed alignment on community view 2021-06-24 17:40:02 +04:30
9e4fd193c6 Limit descriptions width to ease mixed LTR/RTL text reading
This will prevent, on large pages, the LTR and RTL text to be
far away, on each side of the page. This could happen on channel
and playlists descriptions, when the page is displayed on a large
screen.
2021-06-24 17:35:44 +04:30
d16a748f37 set alignment for feed link 2021-06-24 17:08:40 +04:30
f616b8e518 Revert "remove unnecessary text-align"
This reverts commit 97b469f59c.
2021-06-24 16:53:16 +04:30
97b469f59c remove unnecessary text-align 2021-06-24 15:58:54 +04:30
7ec93825b6 Change description-box from flex to block
I also make minor changes to the surroundings so that the same layout
and functionality as before is preserved.
2021-06-24 15:12:05 +04:30
4a4867deeb Undo last commit 2021-06-24 13:10:31 +04:30
965a8ea9fd Change display to block
Change display from flex to block so that the direction of content would get properly set
2021-06-24 12:17:49 +04:30
3e8ddabcc1 Add bidi support
Adding these styles is the easiest way to add bidi (bidirectional text) support without or with least side effect. I have tested it by adding it manually on yewtu.be instance and so far it works very well.
2021-06-24 11:56:58 +04:30
50267a6dd6 Use youtubei API for trending 2021-06-24 00:54:06 +02:00
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
e6bdcff0dd Merge pull request #2183 from iv-org/unixfox-patch-1
update video URL for recaptcha detection
2021-06-19 22:02:42 +02:00
4803285e50 update video URL for recaptcha detection 2021-06-19 17:38:49 +00:00
bab263f426 Merge pull request #2179 from syeopite/remove-welcome-from-username-display
Remove unnecessary "Welcome, " on username display
2021-06-19 13:15:54 +00:00
03d5509b44 Merge branch 'master' into remove-welcome-from-username-display 2021-06-19 13:15:36 +00:00
4a5f193e94 Merge pull request #2180 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-06-19 13:14:53 +00:00
fdd66f12f0 Update Chinese (Simplified) translation 2021-06-19 15:13:54 +02:00
349f073b8e Remove unnecessary "Welcome, " on username display 2021-06-19 06:03:50 -07:00
84e271be4b Merge pull request #2178 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-06-19 13:01:30 +00:00
f215fa936b Update Indonesian translation 2021-06-19 14:28:34 +02:00
75d04a92c8 Merge pull request #1043 from makos/display-username
Display username of currently logged in user
2021-06-19 05:28:30 -07:00
90c907710c Display username in header 2021-06-19 04:58:42 -07:00
00425670d7 Merge pull request #1940 from syeopite/instance-redirect-button
Add instance redirects!
2021-06-19 11:35:40 +00:00
cb525af0a2 Connect to api.invidious.io with https 2021-06-19 04:17:49 -07:00
09f7e38eed Disable automatic instance redirection by default 2021-06-19 04:17:49 -07:00
7c49a0ba7a Rephrase auto instance redirect preference 2021-06-19 04:17:49 -07:00
45e57f1ad3 Refactor fetch_random_instance 2021-06-19 04:17:49 -07:00
eb911de928 Handle if inst. api is down for rand inst fetch 2021-06-19 04:17:49 -07:00
b393e31b76 Fix inst. fetching for inst w/ disabled stats/err 2021-06-19 04:17:49 -07:00
4a095eb98e Fix <hr> styling on empty search page 2021-06-19 04:17:49 -07:00
d793d4ba78 Add switch invidious instance btn to all chan tabs 2021-06-19 04:17:49 -07:00
2f54ec4e18 Fix locale consistency for err template redirects 2021-06-19 04:17:46 -07:00
b9cd40fe1e Add redirect buttons to error template 2021-06-19 04:16:18 -07:00
173cd7c15e Fix switch invidious instance btn on videos 2021-06-19 04:16:18 -07:00
950c8f7104 Enhance fetch_random_instance func
Handle cross-inst. redirect w/ broken health stats

Add check for instance version in cross-redirect
2021-06-19 04:16:18 -07:00
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
cf72b34866 Fix locale discrepancy for instance redirect btn 2021-06-19 04:16:18 -07:00
d06cf2a07b Add playlist redirect 2021-06-19 04:16:18 -07:00
10804927bb Add channel redirect 2021-06-19 04:16:18 -07:00
f178297452 Generalize redirect route 2021-06-19 04:16:18 -07:00
311e7684b2 Add instance redirect on empty/broken search 2021-06-19 04:16:18 -07:00
37ff2ac2b9 Overhaul button icon html and styling 2021-06-19 04:16:18 -07:00
4786d586cf Add new icon button for instance redirects 2021-06-19 04:16:17 -07:00
b7aaae4a19 Add 'Switch Invidious Instance' to en locale 2021-06-19 04:16:17 -07:00
008598b56f Change wording of redirect hyperlink 2021-06-19 04:16:17 -07:00
f3bc55e37e Expose instance redirect to frontend 2021-06-19 04:16:17 -07:00
31fa3dfd59 Add route to redirect to another instance 2021-06-19 04:16:17 -07:00
5b47438b71 Add helper function to fetch random instance 2021-06-19 04:16:17 -07:00
c33ee83d87 Merge pull request #2124 from raycheung/master
Fix storyboard when proxied with an external port
2021-06-19 07:45:33 +00:00
835dd1abcc Merge pull request #2177 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-06-19 07:42:11 +00:00
576f5496c0 Update Dutch translation 2021-06-19 09:41:02 +02:00
ff460c7736 Update Arabic translation 2021-06-19 09:41:02 +02:00
22adbe2073 Merge pull request #2168 from SamantazFox/rewrite-response-headers
Rewrite response headers
2021-06-19 07:40:59 +00:00
b8f0b4b583 Typo 2021-06-19 09:40:33 +02:00
f88e5f09b4 Merge pull request #2152 from syeopite/hooks-and-scripts
Add scripts to ease development
2021-06-19 07:38:33 +00:00
2b9c6c95b1 Merge pull request #2155 from SamantazFox/fix-utf8-in-search
Multiple search fixes
2021-06-19 07:36:58 +00:00
3f34db549f Merge pull request #2174 from syeopite/workflow-improvements
Workflow improvements
2021-06-19 07:33:13 +00:00
f4c0ee49a7 Merge pull request #2158 from 808-cowbell/increase-hr-margins
Add 10px margin to top and bottom of hr element
2021-06-18 12:45:22 -07:00
2fc0a6df93 Prevent CI run when src or wrkflows aren't chngd 2021-06-18 11:53:28 -07:00
0a9c804940 Reduce PR stale length
PRs should be active. Anything that hasn't had activity in more than 45 days should be considered abandoned.
2021-06-18 11:10:11 -07:00
96faa9d12b Delete For-Matrix-org-Support.md 2021-06-18 15:52:24 +02:00
42d9fd9c88 Rewrite response headers
Fixes #2018 and #2153
2021-06-17 19:53:39 +02:00
908bc7561b Add 10px margin to top and bottom of hr element 2021-06-14 12:24:01 -06:00
3de92b337d Use if/else instead of return in search route 2021-06-14 17:27:47 +02:00
31466785ad Merge pull request #2157 from MrPaulBlack/master
Disallow /watch path for bots again
2021-06-14 01:47:23 -07:00
e38b602b7d Disallow /watch path for bots again 2021-06-14 10:40:59 +02:00
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
d432732959 Add ability to propagate locale removals 2021-06-13 07:23:45 -07:00
4eb3de7b4e Fix typos 2021-06-13 06:56:17 -07:00
2e6adfb44a Add locale-key-propagater and auto linter hooks 2021-06-13 06:40:04 -07:00
c85c6d0ac5 Add new line at end of locale files 2021-06-13 06:23:41 -07:00
6c9dd8deb6 Change internal i18n key of sv-SE from sv to sv-SE 2021-06-13 06:23:18 -07:00
fe64e6dbf2 Merge pull request #2141 from watchingdogs/patch-1
Update hu-HU.json
2021-06-11 14:05:28 +00:00
4fd51ec880 Merge branch 'master' into patch-1 2021-06-11 14:04:05 +00:00
0323c521be Merge pull request #2145 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-06-11 14:02:23 +00:00
992125febc Update Indonesian translation 2021-06-11 16:01:26 +02:00
f0bd0abc0f Update Hungarian translation 2021-06-11 16:01:26 +02:00
5c0d4c4408 Merge pull request #2144 from iv-org/silence-thread-locker
Silence thread locker
2021-06-11 01:39:33 -07:00
5f8e47a14d Temporarily remove thread locker comments 2021-06-11 01:38:54 -07:00
9407b91060 Fix typo in hu-HU translation
Change requested by the original translator, see https://github.com/iv-org/invidious/pull/2141#pullrequestreview-679868487
2021-06-10 17:22:20 +02:00
a6e38e2ad2 Merge pull request #2115 from syeopite/crystal-1.0.0-2
Upgrade to crystal 1.0.0
2021-06-10 05:03:37 -07:00
8701de64ce Bump lsquic.cr shard version to v2.18.1-2 2021-06-10 04:49:19 -07:00
114cac99e7 Update CI's crystal version 2021-06-09 16:34:54 -07:00
78194599e2 Update hu-HU.json
finished the translation
2021-06-09 17:59:53 +02:00
49d9491fda Create For-Matrix-org-Support.md 2021-06-09 15:41:59 +02:00
392a363d02 Update Dockerfile for crystal 1.0 2021-06-08 13:20:46 -07:00
0a87ba6930 Decode URL encoded preference cookie when parsing 2021-06-08 13:11:04 -07:00
065c104f27 Upgrade to crystal 1.0.0 2021-06-08 13:10:58 -07:00
7f272f1293 Allow issue/pull locker to be manually dispatched 2021-06-08 12:13:58 -07:00
e67f50f157 Merge pull request #2129 from syeopite/lock-stale-closed-issues
Add workflow to lock inactive closed issues
2021-06-08 12:07:33 -07:00
dd13392e36 Change wording of issue/pull locker message 2021-06-08 12:02:48 -07:00
2638c66638 Merge pull request #2132 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-06-08 17:04:48 +00:00
1d40225159 Update Serbian translation 2021-06-07 22:59:36 +02:00
08f11d2f22 Update Czech translation 2021-06-07 22:59:36 +02:00
ee20ab3041 Update Hebrew translation 2021-06-07 22:59:36 +02:00
e0402919e1 Update Danish translation 2021-06-07 22:59:36 +02:00
086e156a02 Update Croatian translation 2021-06-07 22:59:36 +02:00
d0b9292aee Update Indonesian translation 2021-06-07 22:59:36 +02:00
7b0cb69938 Update Slovak translation 2021-06-07 22:59:36 +02:00
479dd684f8 Update Bengali (Bangladesh) translation 2021-06-07 22:59:36 +02:00
573738443c Update Serbian (cyrillic) translation 2021-06-07 22:59:36 +02:00
0268629c3b Update Chinese (Traditional) translation 2021-06-07 22:59:36 +02:00
cf9e6c5d06 Update Turkish translation 2021-06-07 22:59:36 +02:00
ad44c6eeee Update Chinese (Simplified) translation 2021-06-07 22:59:36 +02:00
2b79d76541 Update Esperanto translation 2021-06-07 22:59:36 +02:00
cfaf3180f9 Update Spanish translation 2021-06-07 22:59:36 +02:00
7881efa269 Update French translation 2021-06-07 22:59:36 +02:00
1ac52ce18f Update Norwegian Bokmål translation 2021-06-07 22:59:36 +02:00
bb123ae0df Update Danish translation 2021-06-07 22:59:36 +02:00
4859b67a7b Update Portuguese (Brazil) translation 2021-06-07 22:59:36 +02:00
586e8b1479 Update Chinese (Simplified) translation 2021-06-07 22:59:36 +02:00
5a526e2077 Update Spanish translation 2021-06-07 22:59:36 +02:00
d3452775b3 Update Polish translation 2021-06-07 22:59:36 +02:00
d82734641b Merge pull request #1985 from SamantazFox/improve-youtube-api-helper
Improve youtube api calls
2021-06-07 13:59:26 -07:00
abbc2bad35 Slash inactive days for issue locker by half 2021-06-05 13:51:11 -07:00
b491d69eec Formatting 2021-06-05 07:17:41 -07:00
d93514d327 Add workflow to lock stale closed issues 2021-06-05 07:16:07 -07:00
49ed485145 Merge pull request #2128 from unixfox/patch-1
fix typo in the template file
2021-06-04 21:52:26 -07:00
1a2ca8634d typo in the template file 2021-06-04 18:53:24 +00:00
60cceabaa6 Merge pull request #2127 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-06-03 10:29:05 +00:00
56df6b5e08 Update Indonesian translation 2021-06-03 02:28:17 +02:00
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
4a45d10a8b Merge pull request #2116 from syeopite/extend_desc_fix
Allow user preferences to effect extend_desc
2021-05-26 18:35:34 +00:00
82e1e9f0e5 Merge pull request #2085 from TheFrenchGhosty/protodec-org
Bring protodec to the Invidious organization
2021-05-26 18:32:29 +00:00
2e1b93b857 Merge pull request #2117 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-05-26 18:13:31 +00:00
37e9cefc52 Update Croatian translation 2021-05-26 17:54:06 +02:00
1807b1492e Update Japanese translation 2021-05-26 17:54:05 +02:00
460a6b4e99 Update Chinese (Traditional) translation 2021-05-26 17:54:05 +02:00
96d87a288f Update Turkish translation 2021-05-26 17:54:05 +02:00
a0d00410ca Update Esperanto translation 2021-05-26 17:54:04 +02:00
445ff856fe Allow user preferences to effect extend_desc 2021-05-24 09:16:58 -07:00
b7fe212a18 Fix youtube API function's documentation 2021-05-24 15:25:00 +02:00
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
344ccf3b03 Use '/youtubei/v1/browse' endpoint for playlists 2021-05-24 13:19:28 +02:00
26a7e1b049 Use '/youtubei/v1/search' endpoint for search queries 2021-05-24 13:19:28 +02:00
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
8bbb016fa4 Only ignore the videojs libraries 2021-05-23 17:59:02 +00:00
ea43ba7124 Only ignore the JS libraries 2021-05-23 17:55:47 +00:00
5a59bd9998 Make the Github Linguist ignore JS files 2021-05-23 16:53:16 +00:00
993d731c92 Merge pull request #2010 from syeopite/360videosupport
Add experimental support for 360° videos
2021-05-23 16:27:47 +00:00
f529948d81 Change videojs-vr to the unminified version 2021-05-23 09:24:49 -07:00
4f3f51c583 Add "Interactive 360 degree videos: " to locales 2021-05-23 09:24:48 -07:00
5ba9a1f87d Fix lint 2021-05-23 09:22:37 -07:00
a0fb75efcb Add licence for videojs-vr 2021-05-23 09:22:37 -07:00
6e6f4d5a37 Allow configurable support of interactive 360 vid 2021-05-23 09:22:37 -07:00
f06053b1cf Fix projection settings for VR 2021-05-23 09:22:37 -07:00
df0cd30236 Add support for VR videos through videojs-vr 2021-05-23 09:22:29 -07:00
8806c57c63 Merge pull request #2077 from watchingdogs/patch-2
Update hu-HU.json
2021-05-22 14:10:39 +02:00
f66cfa1299 Merge branch 'master' into patch-2 2021-05-22 14:10:09 +02:00
9e84a4dbab Translations update from Weblate (#2068)
* Update German translation

* Update French translation

* Update Italian translation

* Update Norwegian Bokmål translation

* Update Arabic translation

* Update Spanish translation

* Update Esperanto translation

* Update Turkish translation

* Update Chinese (Traditional) translation

* Update Japanese translation

* Update Croatian translation

* Update Norwegian Bokmål translation

* Update Japanese translation

* Update Portuguese (Brazil) translation

* Update Swedish translation

* Update Czech translation

* Update Czech translation

* Update Czech translation

* Fix some changes made to the french translation

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Deleted User <noreply+31557@weblate.org>
Co-authored-by: zer0-x <zer0_@tutanota.com>
Co-authored-by: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
Co-authored-by: phlostically <phlostically@mailinator.com>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Co-authored-by: Jeff Huang <s8321414@gmail.com>
Co-authored-by: GnuPGを使うべきだ <dieeeazpnnqbpddh@cock.email>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Co-authored-by: Daniel de Souza Melo <jxzk@protonmail.com>
Co-authored-by: Luna Jernberg <droidbittin@gmail.com>
Co-authored-by: paaton <paatzondrej@gmail.com>
Co-authored-by: Jan Myler <weblate@jm24.4wrd.cc>
Co-authored-by: TheFrenchGhosty <47571719+TheFrenchGhosty@users.noreply.github.com>
2021-05-22 14:09:21 +02:00
59ab066518 Merge pull request #2110 from unixfox/fix-likes-comments
Fix the parsing of likes in the comments
2021-05-22 00:11:31 +02:00
960bd2a6be fix likes parsing 2021-05-21 23:16:48 +02:00
2cdaef1371 Merge pull request #2101 from iv-org/remove-freenode
Remove freenode
2021-05-21 18:05:35 +02:00
9b6c5c08d8 Remove freenode
Reasons can be found in https://libera.chat/news/welcome-to-libera-chat
2021-05-20 17:43:59 +02:00
268ce4fefc Update shard.lock with the new URL 2021-05-14 19:57:54 +02:00
bca8dace80 Update shard.yml with the new URL 2021-05-14 19:57:28 +02:00
75e5b49c3a Merge pull request #2008 from syeopite/mobile-ui
Improve player controls for mobile devices
2021-05-13 10:33:47 +02:00
3cf08dc451 Merge pull request #2052 from Myzel394/patch-1
Add autofocus attribute to search input
2021-05-13 10:32:38 +02:00
76c9cf62ff Merge pull request #1995 from syeopite/watch-on-invidious
Add watch on Invidious button to embeds
2021-05-13 10:32:02 +02:00
7a93af1786 Merge pull request #2072 from Maykin-99/revert-2062-patch-1
Revert "Set correct permissions in Dockerfile"
2021-05-13 10:29:45 +02:00
6f899d998f Merge pull request #1968 from syeopite/iss677
Add ability to expand/collapse description.
2021-05-13 10:26:38 +02:00
73da8463ca Merge pull request #1953 from syeopite/fix1673
Update regex expressions to handle unexpected '};'
2021-05-13 10:24:44 +02:00
b38fab9738 Update hu-HU.json
updated the translations so they don't feel like a machine made them
2021-05-13 00:09:53 +02:00
45e4d64b20 Update hu-HU.json
Fixed a typo
2021-05-12 23:53:18 +02:00
e6fba5d802 Fix locale discrepancy for extend desc feature 2021-05-10 00:34:34 -07:00
50ba3c5d5c Remove unused class attr on label 2021-05-10 00:26:43 -07:00
65663fb857 Update code to reflect 'read more' btn name change 2021-05-10 00:26:42 -07:00
8df2f38d34 Change wording of 'read more/less' & add to locale 2021-05-10 00:25:22 -07:00
c5fae84263 Add functionality to read more button 2021-05-10 00:25:20 -07:00
533d0a1fd4 Added "Read More" button for video descriptions 2021-05-10 00:24:11 -07:00
a0fe229c7a make assets, config and locales readable only 2021-05-09 10:29:06 +00:00
f876cd5a6a Revert "Set correct permissions in Dockerfile" 2021-05-09 10:26:08 +00:00
62e9e9a662 Merge pull request #2062 from Maykin-99/patch-1
Set correct permissions in Dockerfile
2021-05-09 11:33:56 +02:00
a51c5c3ae7 Merge pull request #2063 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-05-06 13:32:13 +02:00
26636eda0d Update Hebrew translation 2021-05-05 13:27:35 +02:00
074df7637b Set correct permissions in Dockerfile
When having a `umask` of `xx7` (e.g. `027`) on the host machine then the directories `assets`, `config` and `locales` don't become readable to the `invidious` user inside the Docker container since the `COPY` commands result in files owned by `root` with the same file permissions like on the host (`640` in my case).

By adding `--chown=invidious` to the `COPY` command we ensure the `invidious` user can read these files.
2021-05-05 08:16:11 +00:00
4fc8905ebf Merge pull request #2061 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-05-04 19:38:50 +02:00
8cbb2278a7 Update Danish translation 2021-05-04 15:22:54 +02:00
fe7f8c3c3a Update Indonesian translation 2021-05-04 15:22:53 +02:00
91430738e7 Update French translation 2021-05-04 15:22:51 +02:00
d6585d7583 Overhaul Invidious's "Youtube" player style 2021-05-03 04:22:17 -07:00
1924d75c2b Improve mobile user interface for video player 2021-05-03 03:44:33 -07:00
06b27d932d Move player styling to separate file 2021-05-03 03:44:33 -07:00
ac1ac2cfed Add mobile-ui js to licenses 2021-05-03 03:44:33 -07:00
53cdb04be7 Improve mobile ux with videojs-mobile-ui 2021-05-03 03:44:33 -07:00
c106de02e9 Added autofocus attribute to search input
Since the main action of this form is to search something, the input should automatically be focused.
2021-04-30 15:12:36 +02:00
8bc91ced4f Merge pull request #2048 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-04-29 11:21:38 +00:00
2d0b9597cc Update Croatian translation 2021-04-29 09:42:12 +02:00
b92fbb893b Update Chinese (Traditional) translation 2021-04-29 09:42:11 +02:00
957a40df1f Update Turkish translation 2021-04-29 09:42:11 +02:00
1eea5b350d Update Esperanto translation 2021-04-29 09:42:10 +02:00
c8e7080d1d Update Spanish translation 2021-04-29 09:42:09 +02:00
629d0e441f Update French translation 2021-04-29 09:42:08 +02:00
5cfb878131 Update Russian translation 2021-04-29 09:42:08 +02:00
bfd02ac13d Merge pull request #2033 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-04-21 16:07:58 +00:00
bd50bb1aa4 Update French translation 2021-04-21 17:55:41 +02:00
1045062147 Merge pull request #2030 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-04-21 14:31:17 +00:00
492def3b76 Update Hebrew translation 2021-04-21 16:27:38 +02:00
afde9ac8a3 Update Esperanto translation 2021-04-21 16:27:38 +02:00
d977258c6c Update Spanish translation 2021-04-21 16:27:38 +02:00
62943f8803 Update French translation 2021-04-21 16:27:38 +02:00
22e0859538 Merge pull request #1920 from SamantazFox/test-locales-consistency
Test & fix locales consistency
2021-04-21 14:27:33 +00:00
2c47ef31c0 Add newline at end of file for 'el' and 'zh-TW' 2021-04-21 16:22:20 +02:00
d69b9f9cf8 Minor fixes in locales after synchronization 2021-04-21 16:11:39 +02:00
a52e9be3e8 Add missing fields to locales (part 6)
Updated da.json     (Danish)
Updated de.json     (German)
Updated eo.json     (Esperando)
Updated es.json     (Spanigh)
Updated nb-NO.json  (Norvegian)
Updated nl.json     (Dutch)
Updated pl.json     (Polish)
Updated pt-BR.json  (Portuguese, Brasil)
Updated ro.json     (Romanian)
Updated ru.json     (Russian)
Updated sv-SE.json  (Swedish)
Updated uk.json     (Ukrainian)
Updated zh-CN.json  (Chinese, China)
2021-04-21 16:11:00 +02:00
21f9141500 Add missing fields to locales (part 5)
* Also includes minor fixes when I could (french, italian, icelandic)
* Added a new line at the end of en-US translation.

Updated ar.json     (Arabic)
Updated el.json     (Greek)
Updated fa.json     (Persian)
Updated fr.json     (French)
Updated is.json     (Icelandic)
Updated it.json     (Italian)
Updated tr.json     (Turkish)
Updated zh-TW.json  (Chinese, Taiwan)
2021-04-21 16:11:00 +02:00
0e000e44aa Make the linter happy, again 2021-04-21 16:10:25 +02:00
ad9fe3be09 Add missing fields to locales (part 4)
Updated el.json     (Greek)
Updated fa.json     (Persian)
Updated fi.json     (Finnish)
Updated it.json     (Italian)
Updated pt-PT.json  (Portuguese, Portugal)
Updated zh-TW.json  (Chinese, Taiwan)
2021-04-21 16:10:25 +02:00
3829bdf198 Add missing fields to locales (part 3)
Updated el.json     (Greek)
Updated fa.json     (Persian)
Updated fi.json     (Finnish)
Updated it.json     (Italian)
Updated pt-PT.json  (Portuguese, Portugal)
Updated sv-SE.json  (Swedish)
Updated tr.json     (Turkish)
Updated uk.json     (Ukrainian)
Updated zh-CN.json  (Chinese, China)
Updated zh-TW.json  (Chinese, Taiwan)
2021-04-21 16:10:25 +02:00
6933a049b1 Add missing fields to locales (part 2)
Updated ja.json    (Japanese)
Updated nb-NO.json (Norwegian Bokmål)
Updated nl.json    (Dutch)
Updated pl.json    (Polish)
Updated pt-BR.json (Portuguese, Brazil)
Updated ro.json    (Romanian)
Updated ru.json    (Russian)
2021-04-21 16:10:25 +02:00
e3544bf4bc Add missing fields to locales (part 1)
Updated ar.json (Arabic)
Updated de.json (German)
Updated eo.json (Esperanto)
Updated es.json (Spanish)
Updated fr.json (French)
Updated hr.json (Hungarian)
Updated id.json (Indonesian)
Updated is.json (Icelandic)
2021-04-21 16:10:25 +02:00
d5d0cb6a0c Add spec (test case) for locale files consistency 2021-04-21 16:10:25 +02:00
cac5f20a28 Move locales definition to i18n.cr 2021-04-21 16:10:25 +02:00
beea32661a Merge pull request #1975 from tenpura-shrimp/disablequic
add option to disable quic
2021-04-17 17:59:16 +00:00
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
5c0458a887 Move navbar search bar render check to templated 2021-04-17 05:18:58 -07:00
65942cd46c Rename empty.ecr to search_homepage.ecr 2021-04-17 05:16:35 -07:00
9a8f1a0b0a add option to disable quic 2021-04-14 12:03:31 -04:00
edb37c95e1 Merge pull request #2011 from syeopite/video-alias-url-params
Preserve url params in video route aliases
2021-04-13 18:07:13 +00:00
896882958d Merge pull request #2003 from 138138138/master
Fix iOS 12.5.2 Layout
2021-04-13 18:05:46 +00:00
45d687c4e1 Preserve url params in video aliases 2021-04-11 22:09:46 -07:00
42be1321b2 Merge pull request #2006 from namazso/patch-1
Fix statistics misreporting register allow state
2021-04-10 17:02:17 +00:00
f2cc16009f Fix statistics misreporting register allow state 2021-04-10 18:52:07 +02:00
4336a55c2e Update default.css 2021-04-09 23:29:18 +09:00
bc5c0f65b8 Add watch on Invidious button to embeds 2021-04-08 04:15:15 -07:00
b7eba3bc17 Merge pull request #1961 from SamantazFox/fix-thumbnails-url
Fix API giving ytimg instead of instance URLs for thumbnails
2021-04-08 11:14:36 +02:00
661d715446 Merge pull request #1942 from syeopite/1736
Add multiple video route aliases.
2021-04-08 11:08:25 +02:00
d2c166243b Merge pull request #1991 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-04-08 06:25:14 +00:00
5ed5eabbfe Update Danish translation 2021-04-08 08:24:47 +02:00
18b4b141d9 Merge pull request #1990 from SamantazFox/patch-1
Fix for issue #1989
2021-04-08 06:24:44 +00:00
cd1e478b95 Merge pull request #1976 from syeopite/fixfooter
Fix footer position to bottom of page
2021-04-08 06:23:19 +00:00
cf0ecaaf41 Translate 'Search' page & fix locale discrepancy 2021-04-07 22:32:56 -07:00
5f466eed79 Rename default_home option 'none' to 'Search' 2021-04-07 19:36:40 -07:00
93198438b8 Fix for issue #1989
Fixes #1989
2021-04-07 15:13:41 +02:00
1057d0eaa6 Fix response design on search homepage 2021-04-07 01:44:03 -07:00
73b1284234 Fix search-widget styling for change in #1976 2021-04-07 00:16:14 -07:00
5f2e87f0e3 Fix rendering of hr element 2021-04-07 00:09:38 -07:00
d9528f5cc3 Change positioning of footer to use flexbox 2021-04-06 23:53:38 -07:00
877bb5c821 Add aliases for watch route 2021-04-06 20:36:23 -07:00
ae353cef2e Merge pull request #1974 from syeopite/fix1562
Fix channel info extract for video game channels
2021-04-06 15:49:11 +00:00
909606826d Change footer div into footer element 2021-04-06 04:15:08 -07:00
e6e2d51b58 Improve search widget margins 2021-04-05 20:42:04 -07:00
ea16c01fa2 Fix mobile responsive design for footer 2021-04-05 20:24:02 -07:00
f20d420aa7 Merge pull request #1980 from syeopite/fix1625
Allow default_home config to be an empty string
2021-04-05 14:44:16 +00:00
a8649f286c Handle nil type for default_homepage 2021-04-04 17:19:31 -07:00
fe879e6d94 Fix missing colon in empty.css 2021-04-04 17:17:59 -07:00
94f285695e Add missing closing div element 2021-04-04 16:10:27 -07:00
428747ab69 Allow default_home config to be empty value 2021-04-04 15:20:08 -07:00
049e8e07ef Fix footer position to bottom of page 2021-04-04 02:45:38 -07:00
716a845e92 Fix missing navbar search bar 2021-04-04 02:26:07 -07:00
47dfd4e681 Scale text logo on search engine like homepage 2021-04-04 02:26:01 -07:00
555108c7fd Add styling to search bar on empty home page 2021-04-04 00:48:14 -07:00
e1af3d9bf3 Add html of search bar to empty home page 2021-04-03 23:26:58 -07:00
e864c7541c Hide header search bar when default_home is empty 2021-04-03 21:32:30 -07:00
b4a6cbbd09 Merge info extract functions back to one 2021-04-03 20:54:10 -07:00
fe4eef5855 Fix channel info extract for 'video game' channels 2021-04-03 20:26:38 -07:00
c0997f951c Merge pull request #1929 from Svallinn/channel_playlist_fix
Fix channels' playlists fetching
2021-04-03 21:21:42 +00:00
cb378c1754 Merge pull request #1973 from syeopite/fixcomments
Preserve all original cookies when adding the consent cookie.
2021-04-03 09:40:25 +00:00
20b961c1c8 Preserve original cookies 2021-04-02 17:08:55 -07:00
c4c2e01213 Merge pull request #1922 from Svallinn/search_api_fixes
Fix channels' search API
2021-04-02 05:53:41 +00:00
4b6d0fb517 Merge pull request #1967 from SamantazFox/fix-long-playlists-2
Fix missing last page in playlists
2021-04-01 19:51:33 +00:00
62e46b7a36 Fix missing last page in playlists 2021-04-01 18:46:49 +00:00
052c5c67b8 Merge pull request #1960 from syeopite/fix1959
Add new YT consent cookie to every request
2021-04-01 16:07:07 +00:00
b794c5cfcf Set the request cookie to "YES+" 2021-04-01 15:59:24 +00:00
be8a4013a7 Merge pull request #1945 from syeopite/trending-api-fix
Fix Trending API
2021-04-01 10:22:46 +00:00
87c25f83a4 Fix API giving ytimg instead of instance URLs for thumbnails 2021-04-01 02:36:35 +02:00
e08bea5f51 Fix lint 2021-03-31 15:34:29 -07:00
739f610507 Add new YT consent cookie to every request 2021-03-31 14:57:00 -07:00
608313c1d1 Update regex expressions to handle unexpected '};' 2021-03-29 17:37:12 -07:00
2c1cf42994 Merge pull request #1937 from syeopite/smallfilteruifix
Prevent filtering options from jumping above its drop down menu.
2021-03-28 16:18:27 +00:00
196db1e1d0 Merge pull request #1939 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-03-28 16:17:46 +00:00
a2f5435c48 Update Serbian translation 2021-03-28 18:15:25 +02:00
75ec0b4fcf Add Serbian translation 2021-03-28 18:15:25 +02:00
b4bfe27786 Update Danish translation 2021-03-28 18:15:25 +02:00
7617382114 Update Bengali (Bangladesh) translation 2021-03-28 18:15:25 +02:00
b2f67cb154 Update Serbian (cyrillic) translation 2021-03-28 18:15:25 +02:00
c5107ddd3d Merge pull request #1938 from tenpura-shrimp/fixcommentsextractcursor
remove comments extract cursor
2021-03-28 16:15:20 +00:00
8b75590d3e Remove news trending section from ui 2021-03-28 01:25:04 -07:00
a7624d4724 Fix trending API 2021-03-27 22:48:43 -07:00
b3099001be Fix minor scaling issue in filter drop down.
Basically prevents filter content from jumping above the dropbox when there's
enough space to do
2021-03-26 13:51:22 -07:00
533c6cefee Merge pull request #1927 from syeopite/add-link-to-yt
Add "Watch on Youtube" button next to audio mode Icon.
2021-03-26 17:23:00 +00:00
acfa9e8a55 Parse responses to JSON instead of using regex 2021-03-26 04:17:46 +00:00
8823753b46 Remove commented line 2021-03-26 03:54:10 +00:00
c5ccefe6f7 Parse response to JSON instead of using regex 2021-03-26 03:52:28 +00:00
148071a744 Add 'www' to URL on watch on youtube button 2021-03-25 11:24:02 -07:00
56fab9d178 Add watch on youtube button on each video item 2021-03-24 18:34:06 -07:00
f422a77014 Add translation to Audio Mode icon on vid result 2021-03-24 18:07:18 -07:00
e248e7ebaf Remove unused function and related test 2021-03-24 05:35:26 +00:00
aa4c623a06 Add deprecation note 2021-03-24 05:34:23 +00:00
cbdba66ef3 Use the youtubei API over the legacy one 2021-03-24 05:33:45 +00:00
d652ab9920 Modify spec file 2021-03-24 05:15:30 +00:00
e49aaa0216 Fix channel search API 2021-03-24 05:15:06 +00:00
61d49a1215 remove comments extract cursor 2021-03-24 00:08:58 -04:00
c481ca924b Merge pull request #1911 from SamantazFox/fix-long-playlists
Fix long playlists (100+ videos)
2021-03-23 18:07:01 +00:00
23e5b6ba72 Remove extra 'next page' button at then end of a playlist 2021-03-23 02:25:47 +00:00
3e88b72316 Remove useless parameter 'youtubei_browse' in get_channel_videos_response() 2021-03-22 18:53:17 +01:00
7566243151 Merge pull request #1901 from tenpura-shrimp/commentreplies
fix comment replies
2021-03-22 14:52:51 +00:00
aaefa38602 Make the linter happy 2021-03-21 16:05:50 +01:00
de6db4141f Fix produce_playlist_continuation checks in spec/helpers_spec.cr 2021-03-21 15:57:41 +01:00
a61735e29a Print detailed error message when playlist can't be retrieved 2021-03-21 15:47:51 +01:00
9bdfb0a32b Playlist: Support edge case where 'content' in JSON may be erroneously plural 2021-03-21 15:47:44 +01:00
94ecd29e35 Make use of youtube API helper in src/invidious/channels.cr 2021-03-21 15:47:26 +01:00
980f5f1299 Playlist: Fix video continuation (100+ videos playlists) 2021-03-21 15:47:03 +01:00
f99d62a2bc Create youtube API wrapper fo /youtubei/v1/browse 2021-03-21 15:44:18 +01:00
89be1975ea Playlist: Fix continuation token generation 2021-03-21 15:43:49 +01:00
fec82df451 Fix fetching of large playlist 2021-03-21 00:15:39 +01:00
89fd35e02d fix comment replies 2021-03-20 00:43:12 -04:00
3286328de4 Merge pull request #1837 from syeopite/master
Enhance search filter UI for JS disabled users
2021-03-19 20:32:27 +00:00
977c34c0d7 Remove unused script element in search.ecr 2021-03-19 11:33:27 -07:00
5ec23df460 Merge pull request #1899 from Svallinn/master
Fix: functional hl / dark_mode / thin_mode params
2021-03-19 17:34:46 +00:00
7f307e3bea Merge pull request #1893 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-03-18 23:17:43 +00:00
fa050fb8a8 Fix: functional hl / dark_mode / thin_mode params 2021-03-17 19:09:37 +00:00
d741cbf6fd Update Czech translation 2021-03-17 19:02:11 +01:00
fa09327403 Add Czech translation 2021-03-17 19:02:11 +01:00
e27aaf9ba1 Merge pull request #1897 from iv-org/fix-container-build
Add yaml-static as build dependency
2021-03-17 19:02:07 +01:00
c0063ea09b Add yaml-static as build dependency 2021-03-17 18:59:02 +01:00
e3e07aa3e6 Merge pull request #1881 from SamantazFox/fix-descriptions
Fix video/playlist descriptions
2021-03-17 16:54:05 +00:00
502e8daedd Merge pull request #1889 from unixfox/fix-memory-invalid
Revert "Bump dependencies"
2021-03-13 21:34:49 +00:00
3035f0119f Revert "Bump dependencies"
This reverts commit abe283b38e.
2021-03-13 22:14:27 +01:00
48a3c3a0c1 Add hover state to filter UI 2021-03-13 10:57:27 -08:00
fab9ae64a0 Remove duplicate styling code 2021-03-13 10:55:12 -08:00
b56ebd13b6 Fix indent in search.ecr for filters 2021-03-13 09:14:55 -08:00
3de39698dd Make the build tests happy: remove blank lines 2021-03-11 03:46:17 +00:00
b86476410f playlists: Fix description being simple text (issue #1767) 2021-03-11 00:44:35 +00:00
57ea45ff51 content_to_comment_html: Fix /watch links + make newline replace universal 2021-03-11 00:42:13 +00:00
ec30f7c5d4 Merge pull request #1849 from saltycrys/channels
WIP channels fix
2021-03-06 10:06:20 +01:00
3cc9114f81 Merge pull request #1829 from SimonPhoenix96/xml-json-yt-sub-import
integrate legacy yt xml subscription import with new json sub import
2021-03-05 01:01:32 +01:00
790167e914 Merge pull request #1832 from mark9064/patch-1
Fix engagement
2021-03-05 01:00:42 +01:00
9687d432fd Merge pull request #1848 from saltycrys/lsquic-v2.23.1
Bump dependencies
2021-03-03 23:28:29 +01:00
378c0d049e WIP channels fix 2021-03-03 22:21:29 +01:00
abe283b38e Bump dependencies 2021-03-03 08:34:31 +01:00
3af42079e0 Merge pull request #1830 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-03-02 19:07:17 +01:00
eb4843649c Update Sinhala translation 2021-03-02 18:41:15 +01:00
9432efeba5 Update Norwegian Bokmål translation 2021-03-02 18:41:15 +01:00
4a3ed75ae5 Add Sinhala translation 2021-03-02 18:41:15 +01:00
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
44f30c0e05 Merge pull request #1817 from tenpura-shrimp/master
fix search
2021-03-01 22:02:37 +00:00
83b5fd252e Enhance search filter UI for JS disabled users
Change filters UI box to use <details>.

Stylize detail button for filter ui

Fix localization for 'filter'

Fix CSS

Fix styling
2021-03-01 03:45:07 -08:00
9ae18b0b3b Fix engagement
Engagement was calculated as 0-1 but displayed as a percentage
2021-02-28 11:59:46 +00:00
84487b2e52 format invidious.cr using crystal cli 2021-02-27 21:59:09 +01:00
9689376de6 fixed line indent typo 2021-02-27 19:12:01 +01:00
a2f79a163f integrate legacy yt xml subscription import with new json sub import 2021-02-27 18:58:55 +01:00
489d0151ad Merge pull request #1735 from 138138138/patch-1
iOS audio mode double duration fix
2021-02-26 19:59:23 +01:00
bcb44ab600 Merge branch 'master' into patch-1 2021-02-26 19:59:16 +01:00
1a78bb4b58 Use instances.invidious.io 2021-02-26 14:25:20 +00:00
2600695927 fix search
Put search page in the super secret proto field
2021-02-25 22:19:22 -05:00
705e4fca06 Merge pull request #1797 from B0pol/published_utc
Use UTC for published date
2021-02-25 17:57:02 +01:00
a4ba4cf6ce Merge pull request #1795 from B0pol/comments
Fix comment replies count
2021-02-25 17:56:30 +01:00
0b2109576a Merge pull request #1804 from tenpura-shrimp/captionpreload
do not preload captions
2021-02-25 17:54:28 +01:00
c8cdc50d29 Merge pull request #1808 from tenpura-shrimp/showstreamstart
show how long ago stream started
2021-02-25 17:53:51 +01:00
b29e60a97a Merge pull request #1807 from TheFrenchGhosty/enhance-readme
Massively enhance the README
2021-02-25 12:19:38 +01:00
209a986fe4 Typo
Co-authored-by: Perflyst <mail@perflyst.de>
2021-02-25 12:18:47 +01:00
295e5c9731 show how long ago stream started 2021-02-24 23:08:04 -05:00
08c93e94e4 Remove Lapis-Tube since it's dead, and update the Cloudtube link 2021-02-25 00:57:09 +01:00
ec28e9fb27 Enhance more stuff, again 2021-02-25 00:48:20 +01:00
7081e8a226 Link to docs.invidious.io more 2021-02-25 00:39:07 +01:00
01a2383d7b Enhance more stuff 2021-02-25 00:30:44 +01:00
903b569f6c Massively enhance the README 2021-02-25 00:20:19 +01:00
9b79e35d52 do not preload captions 2021-02-24 01:02:55 -05:00
237100da18 Use UTC for published date 2021-02-21 12:35:21 +01:00
1e33c0c288 Fix comment replies count 2021-02-21 00:09:04 +01:00
cbc7603248 Merge pull request #1793 from iv-org/revert-1790-bump-dependencies
Revert "Bump dependencies"
2021-02-20 19:08:25 +01:00
8d53f3abb8 Revert "Bump dependencies" 2021-02-20 19:08:13 +01:00
2dcfec2639 Merge pull request #1790 from saltycrys/bump-dependencies
Bump dependencies
2021-02-20 03:02:47 +01:00
dacb1a70ee Bump dependencies 2021-02-20 02:58:35 +01:00
93200c00f2 Merge pull request #1781 from 138138138/player-speed-adjustment
Skip duration multiply by playback rate
2021-02-18 12:12:51 +00:00
3b484c362e Skip duration multiply by playback rate
Fast Forward/Backward like YouTube. The skip duration is multiplied by playback rate.
2021-02-17 21:33:26 +08:00
fbee9fe51e Merge pull request #1766 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-02-14 19:38:04 +00:00
c451aab150 Enable the Hebrew translation since it's now translated at more than 80% 2021-02-14 19:37:46 +00:00
48bff9a5d2 Enable the Indonesian translation since it's now translated at more than 80% 2021-02-14 19:35:05 +00:00
db36d80669 Update Indonesian translation 2021-02-14 13:26:07 +01:00
6c8d3232a0 Update Finnish translation 2021-02-14 13:26:07 +01:00
e6418fe79b Merge pull request #1776 from gripped/crystalversion
Update README.md
2021-02-14 13:26:02 +01:00
34a0bb04f7 Update README.md
Ubuntu / Debian instructions installing an old version of Crystal.
2021-02-14 10:23:16 +00:00
28302c82a3 Merge pull request #1759 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-02-11 14:33:37 +00:00
5025c40ab2 Update Hebrew translation 2021-02-11 14:50:24 +01:00
6fdd30d97f Merge pull request #1757 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-02-11 13:45:21 +00:00
b7c000e435 Update Hebrew translation 2021-02-10 13:41:43 +01:00
5ef2bbe5d6 Add Hebrew translation (#1753)
* Add Hebrew translation

* Update he.json

* Update he.json

* Update he.json

* Update he.json

* Update he.json

* Update he.json

* Update he.json

* Update he.json

Co-authored-by: TheFrenchGhosty <47571719+TheFrenchGhosty@users.noreply.github.com>
2021-02-10 00:33:23 +00:00
e1d37c3b98 Merge pull request #1750 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-02-10 00:27:32 +00:00
ec475e5783 Update Finnish translation 2021-02-10 01:12:44 +01:00
c4b67b4cae Add Hebrew translation 2021-02-10 01:12:44 +01:00
b2cfebcce2 Merge pull request #1754 from saltycrys/fix-various-artists-playlist
Fix playlists with `Various Artists` author
2021-02-10 01:12:40 +01:00
2bf445e165 Fix playlists with Various Artists author 2021-02-10 01:04:27 +01:00
121224b1b0 Fix ; () {} 2021-02-10 01:05:29 +08:00
55ce1ce3ec Merge pull request #1724 from iv-org/add-issue-templates
Add issue templates
2021-02-09 12:21:34 +00:00
2b14633047 Split enhancement and feature request, apply suggestions 2021-02-08 16:23:57 +01:00
88042d27ec Merge pull request #1715 from tenpura-shrimp/searchchannelthumbnails
Use large thumbnail for channels in search
2021-02-05 18:34:53 +01:00
148f3002ec use large thumbnail for channels in search 2021-02-04 18:20:49 -05:00
ec82c1f957 Merge pull request #1730 from notpushkin/patch-1
Add link[rel="alternate"] pointing to YouTube version
2021-02-04 07:55:39 +01:00
9919520c28 Merge pull request #1744 from saltycrys/crystal-0.36.1
Bump dependencies and update to Crystal 0.36.1
2021-02-04 05:17:59 +01:00
689795e8bc Update to Crystal 0.36.1 2021-02-04 05:13:29 +01:00
5c8ab35f55 Bump dependencies 2021-02-04 05:11:54 +01:00
ddd7f3f384 Update player.js 2021-02-03 11:50:14 +08:00
c2f74879da Merge pull request #1734 from saltycrys/crystal-0.36.0
Crystal 0.36.0
2021-02-02 21:02:25 +00:00
5311683d43 Update to Crystal 0.36.0
Crystal versions below `0.36.0` are no longer supported.
2021-02-02 20:01:02 +01:00
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
a6970e02f9 Fix double duration on all Apple devices
The fix will be applied when Safari browser is detected.
2021-02-02 21:25:13 +08:00
1f7f013e0a Merge pull request #1738 from saltycrys/adjust-routes
Adjust routes
2021-02-02 06:29:28 +01:00
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
685902adab Update player.js
Fixes audio mode duration doubled in iPhone iOS browsers. The player will stop after reaching the real duration. 
iOS() checks both iOS and iPadOS. 
Only tested on iPhone iOS browsers. Testers needed for behavior of iPadOS and MacOS.
2021-02-01 15:59:27 +08:00
26ce0eb4b9 Merge pull request #1733 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-01-31 20:17:07 +00:00
b30db728cc Add suggestions 2021-01-31 13:17:50 +01:00
5eb098b5aa Update Japanese translation 2021-01-31 12:18:45 +01:00
a2995ea03a Update Japanese translation 2021-01-31 12:18:45 +01:00
82da5cfd01 Merge pull request #1712 from tenpura-shrimp/bumpvideojs
Bump videojs and fix webworker
2021-01-31 12:18:40 +01:00
909285ea46 Merge pull request #1732 from saltycrys/unrequire-logger
Unrequire `logger`
2021-01-31 03:48:29 +01:00
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
e7ada61881 Add link[rel="alternate"] pointing to YouTube version 2021-01-30 23:45:55 +00:00
79e99908de Allow providing 12-Factor-style Database URL in config 2021-01-30 19:33:58 +00:00
f1d7644184 Merge pull request #1727 from TheFrenchGhosty/finish-translation
Enable the Finish translation since it's now translated at more than 80%
2021-01-30 15:45:56 +00:00
5f365927b3 Merge pull request #1721 from weblate/weblate-invidious-translations
Translations update from Weblate
2021-01-30 15:44:05 +00:00
bd893cb24c Enable the Finish translation since it's now translated at more than 80% 2021-01-30 16:42:30 +01:00
e3352c3658 Update Indonesian translation 2021-01-30 14:46:17 +01:00
63d3d6049e Update Finnish translation 2021-01-30 14:46:17 +01:00
668810858d Update Hungarian translation 2021-01-30 14:46:17 +01:00
b7131a5cd5 Update Greek translation 2021-01-30 14:46:17 +01:00
c9a316ad35 Merge pull request #1702 from saltycrys/config
Config improvements
2021-01-30 14:46:10 +01:00
ec8fe21485 Add issue templates 2021-01-30 10:53:25 +01:00
4a0b10984a Bump videojs and fix webworker 2021-01-29 19:08:28 -05:00
69406b00d1 Merge pull request #1714 from tenpura-shrimp/searchchannelthumbnailhttps
Remove HTTPS from channel thumbnail in search
2021-01-29 22:54:27 +00:00
a1f3ae730a Merge pull request #1718 from tenpura-shrimp/cacheshardstest
Fix broken build - install crystal 35.1 in ci
2021-01-29 22:51:39 +00:00
fedaef5d17 install crystal 35.1 in ci 2021-01-29 12:36:19 -05:00
e35345f135 Remove container release on PR 2021-01-28 12:51:34 +01:00
d0dbbd1cb1 remove https from channel thumbnail in search 2021-01-28 00:51:14 -05:00
70e14f92a4 Only start refresh jobs when necessary
If `channel_threads` or `feed_threads` is set to zero the corresponding job is
now not started.
2021-01-23 19:45:42 +01:00
b45f371911 Make config a constant
Instead of passing around `config` there is now the global `CONFIG`.
2021-01-23 19:39:04 +01:00
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
51ebec7c13 Merge pull request #1701 from TheFrenchGhosty/french-translation
Change some stuff done to the french translation in #1696
2021-01-23 17:26:31 +00:00
c3ed1ad040 Change some stuff done to the french translation in #1696 2021-01-23 18:22:05 +01:00
85ebf2e484 Merge pull request #1700 from TheFrenchGhosty/translations
Make invidious use all the translation files if they are translated at more than 80%
2021-01-23 17:12:37 +00:00
1996e6afaa Translations update from Weblate (#1696)
* Update German translation

* Add Bengali (Bangladesh) translation

* Update Bengali (Bangladesh) translation

* Update Portuguese (Portugal) translation

* Update Icelandic translation

* Update Bengali (Bangladesh) translation

* Update Bengali (Bangladesh) translation

* Add Catalan translation

* Update Norwegian Bokmål translation

* Add French (Canada) translation

* Update German translation

* Update Polish translation

* Update Dutch translation

* Update French translation

* Update Italian translation

* Update Greek translation

* Update French (Canada) translation

* Update Turkish translation

* Update Norwegian Bokmål translation

* Update Esperanto translation

* Update Esperanto translation

* Add Slovak translation

* Update Slovak translation

* Update Serbian (cyrillic) translation

* Update Slovak translation

* Update Esperanto translation

* Add Persian translation

* Update Persian translation

* Add Kannada translation

* Update Kannada translation

* Update Bengali (Bangladesh) translation

* Update Spanish translation

* Update Portuguese (Brazil) translation

* Update Chinese (Traditional) translation

* Update Swedish translation

* Update Portuguese (Portugal) translation

* Add Finnish translation

* Update Dutch translation

* Update Finnish translation

* Add Indonesian translation

* Add Portuguese translation

* Update Portuguese (Portugal) translation

* Update Indonesian translation

* Update Portuguese translation

* Update Polish translation

* Update Polish translation

* Update Portuguese (Brazil) translation

* Update Chinese (Simplified) translation

* Add Croatian translation

* Update Croatian translation

* Update Norwegian Bokmål translation

* Update Swedish translation

* Update Croatian translation

* Update Japanese translation

* Update Indonesian translation

* Add Danish translation

* Update Bengali (Bangladesh) translation

* Update Danish translation

* Update Chinese (Simplified) translation

* Update French (Canada) translation

* Add Malayalam translation

* Update Swedish translation

* Update Greek translation

* Update Greek translation

* Update Portuguese (Brazil) translation

* Delete Catalan translation

* Delete Malayalam translation

* Delete Kannada translation

* Delete French (Canada) translation

* Delete Portuguese translation

Co-authored-by: Jeannette L <j.lavoie@net-c.ca>
Co-authored-by: Oymate <dhruboadittya96@gmail.com>
Co-authored-by: Paulo Marinho <paulomarinho@protonmail.com>
Co-authored-by: recette-lemon <854qskawygnrtcdo@protonmail.com>
Co-authored-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Co-authored-by: Attila Farkas <farkasattila@ymail.com>
Co-authored-by: bongo bongo <mombatubongo@gmail.com>
Co-authored-by: nathgit <nathronman+github@gmail.com>
Co-authored-by: Kevin Scruff <KevinScruff@protonmail.com>
Co-authored-by: Yogesh <yogesh@karnatakaeducation.org.in>
Co-authored-by: The Cats <philosoph@snopyta.org>
Co-authored-by: FeiYang <feiyang@fyol.xyz>
Co-authored-by: Luna Jernberg <droidbittin@gmail.com>
Co-authored-by: ssantos <ssantos@web.de>
Co-authored-by: Unihuppio <virancannos@protonmail.com>
Co-authored-by: Joachim Opdenakker <opdenakker.joachim@gmail.com>
Co-authored-by: ziasukmana <ziasukmana@hotmail.com>
Co-authored-by: Atrate <Atrate@protonmail.com>
Co-authored-by: Karol Kosek <krkk@krkk.ct8.pl>
Co-authored-by: André Marcelo Alvarenga <andrealvarenga@gmx.net>
Co-authored-by: Eric <spice2wolf@gmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Petter Reinholdtsen <pere-weblate@hungry.com>
Co-authored-by: Y. Sakamoto <ysakamoto@tutanota.com>
Co-authored-by: Nimityx <c93c81b9-b581-4651-89fc-a416fd69558e@anonaddy.me>
Co-authored-by: HackerNCoder <hackerncoder@protonmail.ch>
Co-authored-by: vachan-maker <vachan2014carmel@gmail.com>
Co-authored-by: fresh <fresh190@protonmail.com>
Co-authored-by: TheFrenchGhosty <TheFrenchGhosty@posteo.is>
2021-01-23 17:10:51 +00:00
799f97e847 Make invidious use all the translation files 2021-01-23 18:07:55 +01:00
dd2a7f91cc Merge pull request #1691 from StuffNoOneCaresAbout/container-sha
Container sha without 2 builds
2021-01-22 12:42:05 +01:00
c86e9dfc8a build image daily at 0:00 GMT 2021-01-22 16:54:49 +05:30
40a2579821 different steps depending on event. 2021-01-22 09:20:17 +05:30
380b64071e Expire sha images after 6 weeks 2021-01-22 00:03:09 +01:00
5ce0b1c18e Remove image digest output
Does not work with two images at the same time
2021-01-21 23:54:31 +01:00
a00453e151 Build latest only on master, add commit sha tag
Close #1688
2021-01-21 23:51:54 +01:00
a1aa40f500 Fix container build 2021-01-21 07:45:43 +01:00
1ad4685bb7 Merge pull request #1629 from tenpura-shrimp/searchui
Add ui for search sort and filter
2021-01-20 12:56:41 +00:00
d8629e61d6 Merge pull request #1674 from iv-org/container-quay
Add container CI release
2021-01-20 12:44:16 +01:00
d4ddd7204d Rename release.yml to container-release.yml 2021-01-20 12:44:01 +01:00
5f18799d8f Merge pull request #1679 from Rjevski/videojs-dash-safari-bug-workaround
Fix DASH playback bug in Safari
2021-01-19 17:07:33 +01:00
15ba3325d9 add ui for searching 2021-01-17 14:33:49 -05:00
3046350cb2 Fix DASH playback bug. 2021-01-17 14:59:18 +00:00
ffa9e5dfab Make migrations (mostly) idempotent. 2021-01-17 14:20:34 +00:00
8584654f11 Add container CI release 2021-01-16 22:18:22 +01:00
c7e65ce795 Merge pull request #1619 from tenpura-shrimp/ignorevideoplayback
do not add local to xhr when in videoplayback
2021-01-13 10:01:03 +01:00
cc3f019b28 Merge pull request #1658 from jksladjflkjsadflkjsadf/dashmanifesthost
save host when using dash manifest
2021-01-12 17:56:52 +00:00
920785631b Merge pull request #1657 from jksladjflkjsadflkjsadf/fixsetinterval
fix incorrect use of setinterval in js
2021-01-12 13:52:53 +00:00
b7fe1db89a save host when using dash manifest 2021-01-10 18:00:45 -05:00
5a08dfa72f fix incorrect use of setinterval in js 2021-01-10 17:05:08 -05:00
c28b1f6fb9 Merge pull request #1654 from saltycrys/fix-downloads
Fix downloads
2021-01-09 21:17:55 +01:00
c81ca187f8 Fix downloads
The `itag` is now converted to a number, matching the `itag` of
`Video.adaptive_fmts` and `Video.fmt_stream`.
2021-01-09 20:40:01 +01:00
ba148d749f Merge pull request #1647 from hackerncoder/removeOmarrothMentions
Remove omarroth mentions
2021-01-08 13:02:03 +00:00
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
e254d2de8e Merge pull request #1645 from saltycrys/fix-pubsub-config
Respect `use_pubsub_feeds` config
2021-01-07 20:55:10 +01:00
b0b8ba7000 Respect use_pubsub_feeds config
Setting `use_pubsub_feeds: false` now properly disables it.
2021-01-07 20:52:32 +01:00
4d512d908d Remove some mentions of omarroth 2021-01-07 19:01:13 +01:00
168376b046 Merge pull request #1636 from saltycrys/rework-logging
Rework logging
2021-01-06 16:09:32 +01:00
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
6365ee7487 Make logger a constant
Instead of passing around `logger` there is now the global `LOGGER`.
2021-01-05 20:43:19 +01:00
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
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
e036d89a86 Merge pull request #1633 from saltycrys/fix-watch_videos
Fix `watch_videos` endpoint
2021-01-04 06:03:22 +01:00
36e9fb9d68 Fix watch_videos endpoint
Playlists created by `watch_videos` do not have an author which caused a crash
previously.
2021-01-04 05:35:59 +01:00
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
d5f0e23e29 Merge pull request #1631 from saltycrys/lsquic-static-alpine
Download liblsquic.a from iv-org/liblsquic-static-alpine
2021-01-03 23:06:00 +00:00
3a2bd4e928 add config to decrypt on demand instead of polling 2021-01-03 20:50:52 +01:00
c5136ca4d6 Download liblsquic.a from iv-org/liblsquic-static-alpine
This only affects Docker installs.
Regular builds still use the binary shipped with `lsquic.cr`.
2021-01-03 19:23:54 +01:00
28dac81a90 Merge pull request #999 from notpushkin/patch-1
Add audio mode link to items
2021-01-03 13:58:23 +01:00
c89632d2a8 Merge pull request #1608 from saltycrys/add-subscription-traces
Add Subscription Traces
2020-12-31 11:30:04 +01:00
82c8f3b556 Merge pull request #1600 from jksladjflkjsadflkjsadf/closeclients
Close http clients after use
2020-12-30 01:14:31 +00:00
29278ff916 Merge pull request #1620 from B0pol/community
fix channel/ID/community endpoint
2020-12-30 01:13:17 +00:00
608b9e66f4 fix channel/ID/community endpoint
fixes https://github.com/iv-org/invidious/issues/1611
2020-12-30 01:09:39 +01:00
ac0ed14eae do not add local to xhr when in videoplayback 2020-12-29 17:58:24 -05:00
a06dfaf82a Merge pull request #1618 from saltycrys/fix-video-mode-button
Fix Video Mode Button
2020-12-29 13:55:19 +00:00
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
b19524d56a Merge pull request #1609 from saltycrys/add-popular-enabled-option
Add `popular-enabled` option
2020-12-28 11:30:55 +01:00
e0d25ff887 Close http clients after using
The crystal http client maintains a keepalive connection to the other
server which stays alive for some time. This should be closed if the
client instance is not used again to avoid hogging resources
2020-12-27 19:40:58 -05:00
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
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
420ceffbb0 Rename threads to fibers
The config and command line options haven't been changed.
2020-12-27 05:14:33 +01:00
eeeecf9763 Merge pull request #1572 from saltycrys/add-dash-quality-preference
Add DASH quality preference
2020-12-23 20:36:13 +01:00
8df591e8d4 Merge pull request #1595 from saltycrys/improve-storyboards
Improve storyboards
2020-12-23 14:30:10 +01:00
702ed5bfa8 Merge pull request #1594 from saltycrys/improve-logging
Improve logging
2020-12-23 14:29:27 +01:00
75c6844b66 Improve storyboards
Instead of limiting the width of storyboards through CSS it is now done in the
VTT directly.
2020-12-21 17:02:36 +01:00
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
dba7dc4e96 Merge pull request #1592 from saltycrys/remove-top-feed-option
Remove "Top" feed option from preferences
2020-12-19 19:56:11 +00:00
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
eed78c960d Improve DASH quality preference
Besides `auto`, `best` and `worst` it is now possible to select a target height.
If the target height is not available the closest lower height is selected.
2020-12-19 18:37:41 +01:00
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
c7c732ebc0 Merge pull request #1584 from matthewmcgarvey/user-preferences
Extract out User Preferences endpoints
2020-12-16 08:08:58 +00:00
fb06482916 Extract out User Preferences endpoints 2020-12-15 18:54:30 -06:00
1bb24efbbc Merge pull request #1580 from saltycrys/css-improvements
Css improvements
2020-12-15 20:32:55 +01:00
13800589a9 Bump dependencies (#1578) 2020-12-14 19:33:31 +01:00
848add1b1b Set channel thumbnail as icon for feeds (#1106) 2020-12-14 19:25:39 +01:00
fc67dd18d0 Increase color contrast of light theme links 2020-12-14 14:20:31 +01:00
b3e9b92344 Fix pure-button hover color on a-tags 2020-12-14 14:15:03 +01:00
a291b29c6f add EXPOSE port command in Dockerfile (#1568)
added EXPOSE (see https://docs.docker.com/engine/reference/builder/#expose) in the Dockerfile. With this the reverse proxy Traefik can detect the port automatically.
2020-12-13 19:49:54 +01:00
b566c4ba1a Untrack config.yml (#1557)
* Untrack config.yml

`config/config.yml` has been untracked and moved to `config/config.example.yml`.

The Dockerfile has been updated to copy all `config/config.*` files and to try
to move `config/config.example.yml` to `config/config.yml`. If a user supplied
`config/config.yml` exists it is not overwritten.

* Update Dockerfile to use `shard.lock`

* Fix tests
2020-12-10 08:18:30 +01:00
2349a6ab0c Actually fix the icons of #1564 but for real this time 2020-12-09 20:21:42 +01:00
70eaf41acb Actually fix the icons of #1564 by using an icon that exist in ionicons v4 2020-12-09 20:14:06 +01:00
912091981e Fix the icons of #1564 and remove a useless line 2020-12-09 20:04:59 +01:00
aca42ff6a5 Update the cryptocurrency addresses and replace the Liberapay link with a link to the documentation (#1564)
* Update the cryptocurrency address with newly created one

* Replace the icon used for the donation address and link

* Replace the word Monero with the word XMR

* Replace the Liberapay placeholder with a link to the documentation
2020-12-09 19:43:45 +01:00
3fd885a188 Merge pull request #1560 from matthewmcgarvey/extract-login-routes
Extract login/signout routes from global file
2020-12-09 15:21:24 +00:00
2dacdf0210 Extract login/signout routes from global file 2020-12-08 20:50:39 -06:00
5e8856e65b Merge pull request #1551 from saltycrys/add-embed-link
Add embed link to watch page
2020-12-08 21:30:13 +00:00
d42539949e Add YT embed link to watch page 2020-12-08 19:10:29 +01:00
28ca5b2b57 Merge pull request #1552 from azhao-squareup/master
do not proxy hls livestrem on supported browser
2020-12-08 18:00:36 +00:00
eea6f5cbfa Merge pull request #1549 from saltycrys/invidious-playlist-continuation
Fix Invidious playlist continuation
2020-12-08 11:55:40 +00:00
b55dcc16ae Merge pull request #1548 from saltycrys/patch-1
Remove unused steps from CI
2020-12-08 11:54:03 +00:00
0cb442d40e do not proxy hls on supported browser 2020-12-08 00:53:48 -05:00
680dc1f962 Shuffle URL params
The `list` and `index` params are the most important and come first now.
2020-12-08 02:30:48 +01:00
30c92ce1b7 Add embed link to watch page 2020-12-08 02:28:44 +01:00
e55a09241e Fix Invidious playlist continuation
Playing a video in a Invidious playlist now correctly redirects to the next
video. The problem was that the offset was updated in the wrong place.
2020-12-07 22:28:27 +01:00
5f02237119 Remove unused steps from CI
There is no way to cache Crystal unfortunately.
See https://github.com/oprypin/install-crystal/issues/2
2020-12-07 19:18:38 +01:00
68552b6d65 Merge pull request #1544 from schwukas/fix-youtube-subscription-import
Fix youtube subscription import
2020-12-07 17:03:57 +00:00
44a4cea3a2 Merge pull request #1546 from schwukas/fix-empty-documents
Fix #1516 Document is empty
2020-12-07 16:23:00 +00:00
77c13e10ec Update link to instructions 2020-12-07 13:34:40 +01:00
0f66ff50a4 Fix #1516 Document is empty 2020-12-07 13:10:00 +01:00
af515856c2 Merge pull request #1543 from schwukas/update-screenshots
Add missing screenshot and update the older ones
2020-12-07 03:19:17 +00:00
62e8c09183 Fix YouTube subscription import parser 2020-12-06 21:47:50 +01:00
cb40a74aaf Add temporary link to subscription export instructions 2020-12-06 21:46:58 +01:00
a2c3ef94ec Add missing screenshot and update the older ones 2020-12-06 17:25:00 +01:00
4184fb3ae7 Increase YouTube request timeout (#1540)
Increase YouTube request timeout
2020-12-06 12:12:02 +00:00
20d2d141e4 Merge pull request #1539 from saltycrys/fix-comments
Fix comments
2020-12-06 04:08:25 +00:00
0cfc3bfb79 Fix comment continuation tests 2020-12-06 04:28:35 +01:00
2de206cb81 Fix comments
The YouTube headers are now always added for requests to YouTube.
Previously they were only added for requests going through QUIC.

The session token is now JSON decoded to unescape escaped Unicode characters.

The comment continuation protobuf has been updated and the request now goes
through the YouTube `pbj` JSON API.
2020-12-06 04:11:41 +01:00
64c6dfd307 Merge pull request #1538 from Sonic-Y3k/master
Fix invidious version for docker image
2020-12-05 22:13:13 +00:00
03d0b296e1 Fix invidious version for docker image
As Alpine-Linux per default uses the busybox date command, the -f option is not available and the build will fail.
2020-12-05 20:06:24 +01:00
ca4408b343 Merge pull request #1519 from saltycrys/github-actions-ci
Switch to GitHub Actions for CI
2020-12-04 20:59:07 +00:00
527f408f6a Merge pull request #1529 from saltycrys/fix-version
Fix invidious version for old git versions
2020-12-04 03:06:47 +00:00
adccca366e Fix invidious version for old git versions
The `%cs` format was only added to git in version 2.25 while `%ci` has been
around forever.
2020-12-04 01:58:27 +01:00
76cad41382 Merge pull request #1525 from saltycrys/fix-video-descriptions
Fix `extract_polymer_config`
2020-12-03 23:31:39 +00:00
501db8f276 Merge pull request #1526 from saltycrys/fix-redirect-channels
Fix redirect channels
2020-12-03 22:46:53 +00:00
cc684ff0b1 Fix redirect channels
Redirect channels may use JS to redirect now, instead of only a response header
as it used to be. This fix reads the channel to redirect to from `ytInitialData`.
2020-12-03 21:02:52 +01:00
7823c07f1a Fix extract_polymer_config
The `ytInitialPlayerResponse` regex can now handle `var` and `window`
assignments.

The video streams can now be extracted from `player_response` and
`initial_data`.

This fixes the descriptions on videos and videos themselves. Videos are
technically broken right now, but work becasue of a fallback that goes through
embeds.
2020-12-03 18:10:41 +01:00
eb6d3d68a9 Run CI on api-only branch, too 2020-12-03 13:06:27 +01:00
c98c7d47db Better message for the Stale action 2020-12-02 17:13:31 +01:00
194694a59b Replace the Stale bot with a Github action because it has been reported as dead 2020-12-02 17:10:57 +01:00
555cee3500 Merge pull request #1520 from matthewmcgarvey/extract-search-endpoints
Extracting search endpoints from global file
2020-12-02 15:12:48 +00:00
f4bb854372 Update the Stale bot config with a 1 month delay between mark and close 2020-12-02 16:00:58 +01:00
d04b8e2fc6 Add the Stale bot config 2020-12-02 15:53:26 +01:00
21c1450e4a Run CI only once per change 2020-12-02 05:33:42 +01:00
2b6b0e62f4 Add shard caching to CI 2020-12-02 04:40:13 +01:00
4fb360b19f Track shard.lock 2020-12-02 04:39:55 +01:00
0fa1567793 Display lint fixes on lint error 2020-12-02 01:32:19 +01:00
d7377015a2 Extracting search endpoints 2020-12-01 18:02:39 -06:00
139017ba7c Switch to GitHub Actions for CI
Travis CI is slow, builds are first queued up forever and then the builds
themselves are slow, too.

GitHub Actions run pretty much immediately and are fast. Also separate jobs run
at the same time unlike on Travis CI.
2020-12-01 21:45:33 +01:00
ff3b53e34a Merge pull request #1513 from saltycrys/improve-error-message-2
Improve error message 2
2020-12-01 16:36:27 +00:00
b409cdece5 Improve error message 2
Electric Boogaloo

The long backtrace has been moved into a `<details>` HTML element, as suggested
by @B0pol. To make the error still visible it has been added to the top under
`Title:`. This also encourages informative issue titles.
2020-12-01 13:41:19 +01:00
2478e67d16 Switch to date based versioning scheme
Since no new tags are created for releases the version has been frozen for some
time, with only the commit hash changing.

Versions based on the latest commit date make it much easier to identify them.
2020-12-01 13:29:30 +01:00
dd35877eda Update the readme with links to the new documentation repository 2020-11-30 21:47:22 +00:00
4acfd2c342 Merge pull request #1506 from tirz/fix-channel_parsing
fix: channel info parsing
2020-11-30 19:16:31 +00:00
df3f9a2ae8 fix: channel info parsing 2020-11-30 19:35:45 +01:00
78ae9ff093 Remove the donation link from the readme 2020-11-30 15:11:18 +00:00
ca781651cb Fix formatting of #1504 2020-11-30 15:56:01 +01:00
417fa3cf3c Merge pull request #1504 from saltycrys/improve-error-message
Improve error message
2020-11-30 14:17:10 +00:00
92bb477f68 Improve error message
The error message has been reworded and the issue template now includes the
date, route, version and backtrace.
2020-11-30 13:02:35 +01:00
0f08cc5aa9 Remove backtrace on YouTube error
YouTube returning an error is not a bug in Invidious, so it should not print
a backtrace.
2020-11-30 12:57:25 +01:00
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
fe73eccb90 Merge pull request #1479 from saltycrys/theme-flash
Apply dark theme immediately
2020-11-28 20:54:45 +00:00
b9544d9534 Update logrotate configuration command (#1500)
Using sudo with `echo ... | tee /path/to/file` doesn't make sense, as the command requiring the superuser privileges is the `tee` command and not the echo.
2020-11-28 21:50:27 +01:00
99ba9874b1 Merge pull request #1490 from tirz/fix-regex_parsing
fix: ytInitialData parsing with regex
2020-11-26 17:28:34 +00:00
b41ca72d2b revert: remove 'JSON.parse("' 2020-11-26 18:22:31 +01:00
1ba17a0e14 feat: centralize ytInitialData parsing 2020-11-26 13:43:53 +01:00
480d31eb5e fix: ytInitialData parsing with regex 2020-11-26 07:22:47 +01:00
1973f93d4a Merge pull request #1482 from matthewmcgarvey/extract-playlist-routes
Extract playlist routes from global file
2020-11-20 21:48:34 +00:00
3a2f4d4def allow to set a custom anti-captcha api url (#1473) 2020-11-20 22:21:26 +01:00
192d2b86b6 Extract playlist routes from global file 2020-11-19 19:21:48 -06:00
6ca948ac3c Merge pull request #1477 from saltycrys/empty-preference-values
Fill empty preference values
2020-11-19 21:45:00 +00:00
5f932e9749 Fix CSS specificity issues 2020-11-18 00:10:32 +01:00
ff46c18164 Move themes into default.css
Now that themes are controlled with a class instead of setting
media="none" on the stylesheet link and both themes already being
duplicated in default.css for the automatic themeing it makes sense
to have all theme related CSS in the same place.

This commit also fixes the missing dark theme on embeds.
2020-11-17 22:53:45 +01:00
de777907f2 Apply dark theme immediately
Themes are now controlled with a class on the body element.

If a preference is set the body element will have either "dark-theme"
or "light-theme" class. If no preference is set or the preference is
empty the class will be "no-theme".

"dark-theme" and "light-theme" are handled by darktheme.css and
lighttheme.css respectively.

"no-theme" is handled by default.css where depending on the value of
"prefers-color-scheme" the styles corresponding to "dark-theme" or
"light-theme" are applied.

Unfortunately this means that both themes are duplicated, once in the
theme .css and once in default.css.
2020-11-16 04:19:41 +01:00
72c4fd868a Fill empty preference values 2020-11-16 01:33:55 +01:00
4bc2cd003d Merge pull request #1476 from unixfox/patch-1
Remove duplicate Referrer-Policy
2020-11-15 18:17:58 +01:00
c9c6c1f769 Remove duplicate Referrer-Policy 2020-11-15 10:02:45 +00:00
bb7d8735cb Merge branch 'master' into patch-1 2020-11-12 17:06:38 +01:00
557b0d76ab Merge pull request #919 from edumoreira1506/feature/add-buttons-top-page
Add Previous/Next page buttons at the top of the page
2020-11-12 17:00:23 +01:00
13073411cc Merge pull request #1465 from saltycrys/storyboards
Update videojs-vtt-thumbnails to latest upstream version and improve storyboard display
2020-11-12 16:54:28 +01:00
0530045536 Remove double empty line 2020-11-12 16:53:31 +01:00
6d29e9c1b7 Fix missing videos tab on some channels (#1462)
* Fix missing videos tab on some channels

* Fixed formatting

Co-authored-by: Linux User <user@localhost.local>
2020-11-12 15:35:12 +00:00
d3e4739745 Improve storyboard display 2020-11-08 22:23:24 +01:00
3379f3ef61 Update videojs-vtt-thumbnails to latest upstream version
Note that the latest version on NPM is over two years old so this was built from source.
2020-11-08 22:02:25 +01:00
9da7919062 Merge pull request #1459 from matthewmcgarvey/embed-routes
Extract embed routes into separate classes
2020-11-08 20:17:07 +01:00
aeed7deb2d Update README.md (#1461)
Update README.md
2020-11-08 13:05:11 +00:00
38b617d848 Formatting 2020-11-07 08:22:44 -06:00
dda02f783f Extract embed routes into separate classes 2020-11-06 16:44:36 -06:00
cda322e311 Merge pull request #1449 from raycheung/master
Fix stale playlist video counting on add/drop (#1448)
2020-11-03 17:39:34 +01:00
934d3178a2 Merge pull request #1453 from matthewmcgarvey/extract-watch-route
Extract /watch route from main file
2020-11-03 17:37:03 +01:00
2cded8dcac Extract /watch route from main file 2020-11-02 18:06:06 -06:00
babe0c31ad Fix stale playlist video counting on add/drop (https://github.com/iv-org/invidious/issues/1448)
The return of `cardinality()` is not affected by the `array_append()`
and `array_remove()` of the same statement.
2020-11-01 12:20:44 +08:00
aa2ae37365 Merge pull request #1440 from saltycrys/master
Fix storyboards
2020-10-26 03:20:45 +00:00
9a8b81fcbe Fix storyboards 2020-10-25 09:35:16 +01:00
138f38aade more polish (#1437) 2020-10-24 03:26:17 +00:00
42914bff6f polish some stuff (#1436) 2020-10-23 22:17:40 +00:00
59acf95bf5 Update README.md (#1433)
Updated "Hosted Weblate" link and added two items about translations, in order to make this kind of information more prominent.
2020-10-23 22:03:08 +00:00
31c1046771 Add liability clause (#1434)
* Add liability clause

* Update README.md
2020-10-23 22:02:34 +00:00
ec4a22687f Update get_about_info for polymer (iv-org/invidious#1423) (#1429)
Update get_about_info for polymer (iv-org/invidious#1423)
2020-10-23 01:40:07 +00:00
22d9d16a7a Update parsing of ytInitialData (#1427)
Update parsing of ytInitialData
2020-10-22 10:02:15 +00:00
0520e67303 [refactor] Finish converting jobs to new job setup (#1420)
[refactor] Finish converting jobs to new job setup
2020-10-17 12:25:57 +00:00
d571573e52 Set preferences before conditional breaks in before_all (#1412) 2020-10-16 10:23:18 +00:00
0f643daac6 Use the new version of lsquic.cr (#1413) 2020-10-16 09:47:12 +00:00
989317e5d3 Extract RefreshChannelsJob (#1403) 2020-10-15 14:22:41 +00:00
cce6db4aeb Replace the riot.im link with a matrix.to link (#1409) 2020-10-10 16:00:33 +00:00
46109abde5 More readme enhancements and fixes (#1408)
* More enhancements and fixes to the readme

* Move liberapay away from the features list
2020-10-10 13:32:54 +00:00
2e16774190 Major readme enhancements and fixes (#1407)
* Major enhancement to the readme
2020-10-10 12:52:41 +00:00
812a21bce6 Merge pull request #1372 from tleydxdy/patch-1
Add exponential backoff to refresh_channels
2020-10-10 14:01:47 +02:00
17e0207120 Merge pull request #1406 from Perflyst/channel-api-v3
Use channel API v3
2020-10-10 11:47:29 +00:00
e02608edf8 Use channel API v3 2020-10-10 12:15:30 +02:00
1a7e160956 Merge pull request #1402 from matthewmcgarvey/feed-menu-overlap
Fix feed menu overlap at iPad screen widths
2020-10-08 08:35:50 +00:00
59d966356e Merge pull request #1399 from matthewmcgarvey/routing-job-patterns
Provide rough draft of better project organization
2020-10-08 10:08:23 +02:00
5937e0289e Fix feed menu overlap at ipad screen widths 2020-10-07 23:01:18 -05:00
85c212aee3 Provide rough draft of better project organization 2020-10-05 23:57:19 -05:00
1978c3d3bd Merge pull request #1379 from Rjevski/patch-1
Remove on-hover tooltip from player
2020-10-05 11:11:25 +00:00
30a2c28d74 Merge pull request #1391 from Perflyst/update-requirements
Add zlib1g-dev as requirement
2020-10-04 08:09:40 +00:00
94a330532d Merge pull request #1394 from Perflyst/fix-ci-test
Fix CI tests
2020-10-04 08:08:55 +00:00
f65e57ee82 Fix formatting 2020-10-03 15:19:12 +02:00
750064c06f Add zlib1g-dev as requirement 2020-09-27 21:17:52 +02:00
651fd79325 Merge pull request #1360 from FlipEnergy/helm_services
[Helm] add service type values and InitContainer to wait for Postgres
2020-09-25 23:10:09 +00:00
b53f988fca Merge pull request #1387 from GauthierPLM/fix-playlist-index
Fix #1382 : Playlists missing first video
2020-09-25 23:04:48 +00:00
1595eaeb74 Fix #1382 : Playlists missing first video
The index was set to index - 1, causing the first video to be shifted in fetch_playlist_videos
(because of its index being -1 lower than it should) and thus not displayed on playlist page.
2020-09-25 14:26:07 +02:00
a54cbe896d Remove on-hover tooltip from player
Using the player on latest Safari, the tooltip appears and stays stuck for long even when switching to fullscreen which is annoying. You need to explicitly click anywhere to dismiss that stuck tooltip.

This doesn't seem to happen in Firefox so I am not sure whether this is a browser bug, but in any case I don't see any value in keeping this tooltip so maybe we can just remove it?
2020-09-15 18:50:17 +01:00
9995a8d53f Allow cookies from anti-captcha to be optional (#1371) 2020-09-09 23:04:08 +00:00
b88872d54b Fix sub refresh (#1370) 2020-09-09 23:03:27 +00:00
f02ac01f7e Add exponential backoff to refresh_channels
In practice with the patch I usually see backoff to 2 hours when blocked, so it should improve recovery time. The lim_thread is to work with multi-threading, not sure if it's the best way to do it.
2020-09-09 11:47:11 -04:00
3ab3a5a236 Merge pull request #713 from leonklingele/keydown-mediakeys-detection
js: add support to detect media keys in keydown handler
2020-09-09 03:15:21 +00:00
fa3eb185ab Remove space 2020-09-06 00:37:43 -07:00
4a56ba34d4 Fix pg_is ready user 2020-09-06 00:37:05 -07:00
b860c69fd7 Add initContainer to check for postgres up 2020-09-05 19:51:58 -07:00
8408ceffe8 also add initial delay 2020-09-05 17:12:21 -07:00
da9133c3c3 add service values 2020-09-05 13:46:51 -07:00
4a6e920d0e Use new youtube API to fetch channel videos (#1355)
* Use new API to fetch videos from channels

This mirrors the process used by subscriptions.gir.st. The old API is
tried first, and if it fails then the new one is used.

* Use the new API whenever getting videos from a channel

I created the get_channel_videos_response function because now instead
of just getting a single url, there are extra steps involved in getting
the API response for channel videos, and these steps don't need to be
repeated throughout the code.

The only remaining exception is the bypass_captcha function, which still
only makes a request to the old API. I don't know whether this code
needs to be updated to use the new API for captcha bypassing to work
correctly.

* Correctly determine video length with new api

* Remove unnecessary line
2020-09-02 20:28:57 +00:00
13f58d602f Replace omarroth with iv-org where applicable (#1353)
Fixes #1353
2020-08-25 16:07:16 +00:00
45fda595c3 Merge pull request #1346 from resttime/fix-docker-init
Use bash in the docker init shebang
2020-08-21 12:52:15 +00:00
1f15ea0bd8 Merge pull request #1197 from iv-org/comradekingu-patch-1
TRANSLATION file for l10n
2020-08-19 19:50:15 +00:00
99eebfa10f Merge pull request #1339 from stephane-r/made-with-invidious-holoplay
Adding HoloPlay application on Made with Invidious README
2020-08-19 19:47:40 +00:00
ccbbe81141 Use bash in the shebang 2020-08-19 13:36:35 -05:00
ad2da5969e Adding HoloPlay application on Made with Invidious README 2020-08-15 16:27:47 +02:00
2ce82f3da5 Merge pull request #1335 from szepeviktor/patch-1
Fix CI badge
2020-08-14 11:59:45 +02:00
6bc9479e00 Update .travis.yml 2020-08-14 11:51:44 +02:00
740e52229f Merge pull request #1336 from GauthierPLM/dependency-update
Update lsquic.cr dependency to use iv-org version
2020-08-14 11:22:22 +02:00
1efd2390e3 Update lsquic.cr dependency to use iv-org version 2020-08-14 11:18:04 +02:00
564328abf9 Fix CI badge 2020-08-13 08:12:40 +02:00
926f819e31 Merge pull request #1218 from SuperSandro2000/patch-1
Add RAM requirement
2020-08-05 20:53:31 +02:00
45f0b9ac45 Update README.md
Co-authored-by: Perflyst <mail@perflyst.de>
2020-08-05 20:16:53 +02:00
9a82e86ce9 Merge pull request #1254 from SuperSandro2000/patch-2
Update database automatically in Docker
2020-08-03 17:11:50 +02:00
0ad974c57b Merge pull request #1211 from SuperSandro2000/improve-postgres
Improve postgres Dockerfile
2020-08-03 17:09:51 +02:00
62f015fc34 Fix playlist export for playlists with more than 100 videos 2020-07-28 17:21:39 -04:00
b508787037 Fix spec 2020-07-26 15:29:03 -04:00
176ef19cca Update mixes link 2020-07-26 11:50:26 -04:00
db83ede73c Add missing default for ConfigPreferences 2020-07-26 11:09:45 -04:00
452d1e8307 Fix warnings with latest version of Crystal 2020-07-26 10:59:31 -04:00
92f337c67e Add playlist import/export 2020-07-26 10:59:31 -04:00
1e4022680a Fix playlists with one video 2020-07-26 10:59:31 -04:00
e16d951da0 Create postgres user to avoid fatal warning 2020-07-25 21:51:58 +02:00
7b2b19b4ba Remove empty Dockerfile 2020-07-25 21:51:58 +02:00
8ebfaed546 Remove no longer needed POSTGRES_HOST_AUTH_METHOD 2020-07-25 21:51:57 +02:00
0b52d52f4a Use inbuilt init script 2020-07-25 21:51:57 +02:00
6901d10d54 Set magic ENV varialbes for user, default DB
instead of doing it ourselves
2020-07-25 21:51:39 +02:00
7caa2ae9bc Merge pull request #1295 from jwilk-forks/readme
README: Fix and update URLs
2020-07-22 22:23:59 +02:00
cc50859912 README: update GitHub repo URLs
Follow the https://github.com/omarroth/invidious ->
https://github.com/iv-org/invidious redirect.
2020-07-22 19:12:39 +02:00
6c16780144 README: fix changelog URL 2020-07-22 19:09:18 +02:00
b5f79444f9 Fix optional value in data extractor 2020-07-21 20:11:13 -04:00
b73c6e94c0 Bump docker dependencies 2020-07-19 22:26:41 -04:00
07616a9d34 Bump lsquic version to v2.18.1 2020-07-19 11:56:28 -04:00
e88ee26e3b Requested README changes made 2020-07-13 13:22:01 +02:00
7422c38e66 README reworked 2020-07-13 10:34:22 +02:00
8ed1c77e47 Skip DASH streams segmented by URL 2020-07-04 14:17:46 -04:00
8c65b8c16f Update playlists to support polymer redesign 2020-06-24 22:19:36 -04:00
1f435522b4 Fix cast from nil in short_description 2020-06-17 19:22:28 -04:00
eb880e8de0 Update database automatically in Docker
Applying the migrations scripts by hand in Docker is not that easy and most people expect this to automatically happen.
2020-06-17 09:59:21 +02:00
83b1d80a5b Fix signature URL regex 2020-06-16 19:21:29 -05:00
529aff3126 Update peertubeify url to new location (#1227)
On the URL specified it says: "Project 'Ealhad/peertubeify' was moved to 'Cha_deL/peertubeify'. Please update any links and bookmarks that may still have the old path."
2020-06-16 18:05:17 -05:00
bf2bd519eb Switch to official crystallang alpine image (#1247)
* Switch to official crystal-lang alpine image
2020-06-16 18:04:41 -05:00
38c7dda00f Fix genreUrl 2020-06-16 17:51:49 -05:00
056e7432bd Update channel playlists to use polymer 2020-06-16 17:51:35 -05:00
074497b0f6 Add migration script for polymer redesign 2020-06-15 18:20:31 -05:00
1eca969cf6 Add support for polymer redesign 2020-06-15 18:18:04 -05:00
c1cbdae5ee Make HOST_URL constant 2020-06-15 18:13:14 -05:00
4d4b6a2fa0 Remove top page 2020-06-15 18:11:36 -05:00
d30a972a90 Support Crystal 0.35.0 2020-06-15 18:11:06 -05:00
24013af3bb Mention SWAP 2020-06-15 19:24:35 +02:00
338dc3223c Merge pull request #1182 from DmitrySandalov/master
Allow user to subscribe to playlist (#17)
2020-06-13 15:10:18 +03:00
c422a6dd4f Add RAM requirement
Closes #1152
2020-06-06 04:12:43 +02:00
8305af8f10 Update docker build 2020-05-29 20:06:43 -05:00
6435c7b921 Fix reCaptcha 2020-05-28 12:21:47 -05:00
af7c57b082 TRANSLATION file for l10n 2020-05-26 18:02:21 +00:00
80941eacbd More consistent HTML IDs for info section (#1156)
* More consistent IDs for info section

More consistent IDs for info section: watch-on-youtube, annotations and download

* Consistent IDs: channel-name

* Consistent IDs: published-date

The term "published" can also be found in the answer for the following YouTube API request: https://developers.google.com/youtube/v3/docs/videos/list
2020-05-26 02:57:10 -05:00
ceb252986e Update captcha job 2020-05-25 12:52:15 -05:00
5d8de5fde2 Allow user to subscribe to playlist (#17) 2020-05-17 14:28:00 +03:00
750ef296c6 Update captcha handler 2020-05-13 16:09:39 -05:00
454ae8656a Cleanup request headers 2020-05-08 09:00:53 -05:00
75450dcdbc Update signature param 2020-05-08 08:59:09 -05:00
bd2c7e3bb9 Verify download, fix invidious file permission (#949)
* Fix docker
2020-04-30 20:35:34 -05:00
9d23cf33fd Consistent IDs for info section (#1133) 2020-04-30 15:01:29 -05:00
97eb01a28d Merge weblate 2020-04-20 16:46:00 -05:00
9a2a636aed Update Portuguese (Brazil) translation 2020-04-20 16:12:20 -05:00
61c8256ef0 Update Turkish translation 2020-04-20 16:12:15 -05:00
8e1791570e Update Ukrainian translation 2020-04-20 16:12:15 -05:00
aa30d1f359 Add Portuguese (Portugal) translation 2020-04-20 16:12:12 -05:00
326f4bd681 Update Basque translation 2020-04-20 16:12:09 -05:00
7690c6c33d Update Russian translation 2020-04-20 16:12:06 -05:00
fece1077f2 Update Swedish translation 2020-04-20 16:12:05 -05:00
75fc7db50d Update Romanian translation 2020-04-20 16:12:05 -05:00
96da04576e Update Italian translation 2020-04-20 16:12:05 -05:00
001ec3663e Add Serbian (cyrillic) translation 2020-04-20 16:12:02 -05:00
21a00b77bd Add Hungarian translation (#1111) 2020-04-20 16:05:28 -05:00
408f3852ec Hide playlist widget when user has no playlists 2020-04-15 16:30:02 -05:00
61150c74d2 Move privacy type into playlists.sql 2020-04-14 18:09:48 -05:00
7bb7003c9d Fix authorThumbnails in /api/v1/channels 2020-04-10 11:49:51 -05:00
920463f2ff Fix playlist_ajax 2020-04-10 11:49:18 -05:00
ca1185d0be Fix warnings in latest version of Crystal 2020-04-09 12:18:09 -05:00
be655ee328 Bump dependencies 2020-04-09 11:14:21 -05:00
02d4186b11 Fix player matching 2020-04-09 10:55:50 -05:00
3f97bebd69 Support adding video to playlist from watch page 2020-04-09 10:55:32 -05:00
2e378da922 Add support for Swedish locale 2020-04-04 15:57:29 -05:00
b37f51bd7f Fix /c/ redirect 2020-04-04 15:31:24 -05:00
eb8b0f72cc Add Swedish translation (#1078)
Co-authored-by: Daniel Lublin <daniel@lublin.se>
2020-04-02 16:26:54 -05:00
d8fe9a4d29 nb-NO: Translate "subscription" correctly (#1089)
Co-authored-by: Oskar Gewalli <gewalli@gmail.com>
2020-04-02 16:16:27 -05:00
c97cdf551e Refactor extract_plid 2020-03-30 14:27:07 -05:00
80fc60b5e2 Add spec for extract_plid 2020-03-30 14:23:51 -05:00
3b2e142542 Fix JSON serialization 2020-03-29 18:04:44 -04:00
0e58d99f4e Fix player mouseover events 2020-03-27 09:47:46 -05:00
92798abb5d Add manifest-src to CSP 2020-03-19 13:41:08 -05:00
bd7950b757 Add toggle_parent to dynamic handlers 2020-03-15 18:52:49 -04:00
59a15ceef6 Remove VarInt class 2020-03-15 17:47:16 -04:00
4011a113cc Strip invalid characters from referer URLs 2020-03-15 17:47:16 -04:00
70cbe91776 Migrate to a good Content Security Policy (#1023)
So attacks such as XSS (see [0]) will no longer be of an issue.

[0]: https://github.com/omarroth/invidious/issues/1022
2020-03-15 16:46:08 -05:00
f92027c44b Escape 'sort_by' 2020-03-10 11:25:32 -04:00
1443335315 Switch textcaptcha to HTTPS 2020-03-10 11:12:11 -04:00
6ff2229a09 Bump dependencies 2020-03-06 13:59:42 -05:00
bb72672dd9 Replace static asset requests with QUIC 2020-03-06 13:53:35 -05:00
d96dee3aa6 Add debug info to videoplayback 2020-03-06 13:50:00 -05:00
bd0aaa343b Prevent storyboards from hanging 2020-03-05 13:49:06 -05:00
3126e1ac94 docker: allow to configure Invidious by env var (#1030)
Invidious gained support to read its configuration from an env var
instead of config file in e3c10d779d.

Unfortunately, Docker doesn't allow newline characters in env var
values (see [0]) which means we can only provide a proper YAML config
by using the inlined configuration in docker-compose.yml which,
unfortunately, is tracked by Git. Once support for multiline env var
values has been added to Docker, we should migrate and read the config
from a .env file instead (which is not tracked by Git).

[0]: https://github.com/docker/compose/issues/3527
2020-03-04 12:33:13 -06:00
a117d87f33 Skip validation checks for videoplayback, ggpht 2020-03-04 13:06:17 -05:00
9dc4f8a1aa Escape item titles in search page 2020-03-04 13:03:14 -05:00
0d536d11e3 Verify token signature in constant time, Run cheap checks first in token validation process (#1032)
* Verify token signature in constant time

To prevent timing side channel attacks

* Run cheap checks first in token validation process

Expensive checks such as the nonce lookup on the database or the
signature check can be run after cheap/fast checks.
2020-03-02 10:04:36 -06:00
72a4962fd0 add lapisTube (#1027) 2020-03-02 09:35:28 -06:00
a3045a3953 Use a MediaQueryListener to toggle on demand. Tested on OSX. (#925)
Closes #867.
2020-03-02 09:33:47 -06:00
c620a22017 Add logfile to logrotate (#892) 2020-03-02 09:19:07 -06:00
e3593fe197 js: add support to detect media keys in keydown handler
See [0] for all the relevant codes.

[0]: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values#Multimedia_keys

Fixes a regression introduced in e6b4e12689.
Fixes https://github.com/omarroth/invidious/issues/712.
2020-03-01 17:43:19 +01:00
856ec03cc7 Revert "Add HOST_AUTH_METHOD=trust to docker compose (see docker-library/postgres#681)"
This reverts commit ef70668a77.
2020-03-01 11:07:37 -05:00
c80c5631f0 docker: do not require password for PostgreSQL superuser, docker,kubernetes: create "privacy" type before using it, travis: do not run "docker-compose up" in detached mode (#1042)
* docker: do not require password for PostgreSQL superuser

A password is now required by the postgres Docker image which makes
initial setup (and our CI build) fail with the following error:

    postgres_1   | Error: Database is uninitialized and superuser password is not specified.
    postgres_1   |        You must specify POSTGRES_PASSWORD for the superuser. Use
    postgres_1   |        "-e POSTGRES_PASSWORD=password" to set it in "docker run".
    postgres_1   |
    postgres_1   |        You may also use POSTGRES_HOST_AUTH_METHOD=trust to allow all connections
    postgres_1   |        without a password. This is *not* recommended. See PostgreSQL
    postgres_1   |        documentation about "trust":
    postgres_1   |        https://www.postgresql.org/docs/current/auth-trust.html

See https://github.com/docker-library/postgres/issues/681.

* docker,kubernetes: create PostgreSQL "privacy" type before using it

Fixes the following error when setting up the database:

    postgres_1   | 2020-02-21 01:01:22.371 UTC [172] ERROR:  type "privacy" does not exist at character 200
    postgres_1   | 2020-02-21 01:01:22.371 UTC [172] STATEMENT:  CREATE TABLE public.playlists
    postgres_1   | 	(
    postgres_1   | 	    title text,
    postgres_1   | 	    id text primary key,
    postgres_1   | 	    author text,
    postgres_1   | 	    description text,
    postgres_1   | 	    video_count integer,
    postgres_1   | 	    created timestamptz,
    postgres_1   | 	    updated timestamptz,
    postgres_1   | 	    privacy privacy,
    postgres_1   | 	    index int8[]
    postgres_1   | 	);
    postgres_1   | ERROR:  type "privacy" does not exist
    postgres_1   | LINE 10:     privacy privacy,

* travis: do not run "docker-compose up" in detached mode

Rather, allow database to finish its setup procedure and grant
Invidious time to launch.
2020-03-01 10:06:45 -06:00
ef70668a77 Add HOST_AUTH_METHOD=trust to docker compose (see docker-library/postgres#681) 2020-03-01 10:51:17 -05:00
ebd4691462 Update Polish translation 2020-03-01 16:31:32 +01:00
28554235be Update Ukrainian translation 2020-03-01 16:31:32 +01:00
efbbb6fd20 Update German translation 2020-03-01 16:31:32 +01:00
9de57021a3 Update postgres setup 2020-03-01 10:30:55 -05:00
e21f770485 Fix status check for channel page 2020-02-28 15:57:45 -05:00
697c00dccf Sanitize PLID 2020-02-28 14:10:01 -05:00
1caf6a3298 Fix deadlock when updating notifications 2020-02-28 13:13:48 -05:00
02fd02d482 Remove DB array concatenation 2020-02-28 12:14:29 -05:00
239fb0db94 Remove duplicated Github logo on footer (#986)
* Remove duplicated Github logo on footer
2020-02-20 18:50:54 -05:00
fe1d73c3e5 Merge pull request #1015 from leonklingele/add-kubernetes
Add support to run on Kubernetes, add Helm chart
2020-02-20 18:45:25 -05:00
43da06a354 Remove temp fix for crystal/crystal-lang#7383 2020-02-20 18:30:46 -05:00
fea6b67067 Remove 'type' attribute from community embed 2020-02-20 18:30:46 -05:00
f065ae54d5 Merge pull request #1031 from leonklingele/crystal-0.33.0-format
Update code formatting for Crystal 0.33.0
2020-02-20 18:10:56 -05:00
3cf417766d Merge pull request #1033 from leanderseidlitz/master
readme.md: fix missing playlist relation in postgresql
2020-02-20 18:10:26 -05:00
0fb41b10e9 readme.md: fix missing playlist relation in postgresql 2020-02-15 20:58:52 +01:00
bc9dc3bf1e Update code formatting for Crystal 0.33.0
Crystal 0.33.0 introduced some changes to to the code formatter.
Run "crystal tool format" so CI doesn't fail anymore.
2020-02-15 19:52:28 +01:00
3cde5e28a8 Add support to run on Kubernetes, add Helm chart
See relevant README.md for more details.
2020-02-07 13:46:12 +01:00
cb8e7181c4 Merge pull request #1016 from leonklingele/config-env
Add support to read config from environment variable
2020-02-06 20:13:34 -05:00
9a3becdecc Merge pull request #1011 from jorgesumle/master
Remove invalid and useless HTML from embed player
2020-02-06 20:12:17 -05:00
e3c10d779d Add support to read config from environment variable
Try to read app config from the "INVIDIOUS_CONFIG" environment variable.
If the variable is undefined, read config from config.yml file as before.

Required by https://github.com/omarroth/invidious/pull/1015 et al.
2020-02-04 15:53:46 +01:00
dd9f1024f4 Remove invalid HTML from embed player 2020-02-01 19:25:03 +01:00
9841f74adc Add handling for comments with no content 2020-02-01 12:14:37 -05:00
b56e493d92 Remove frameborder from community embeds 2020-02-01 11:23:12 -05:00
a2c5211b20 Check /browse_ajax for channel blocks 2020-02-01 11:23:12 -05:00
b7a7abed48 Merge pull request #1004 from outloudvi/zhcn-l10n
Update zh-CN translation
2020-02-01 11:13:03 -05:00
72bfdfd925 Merge pull request #975 from jorgesumle/embed
Change embed code
2020-02-01 11:11:12 -05:00
b80d34612a Update zh-CN translation 2020-01-27 13:01:53 +08:00
648cc0f006 Refactor signature extraction 2020-01-24 17:02:28 -05:00
1fc9506442 Add audio mode link to items 2020-01-21 15:36:56 +03:00
830692dd60 Update Chinese (Simplified) translation 2020-01-17 22:50:16 -05:00
95a6759381 Update Polish translation 2020-01-17 22:50:16 -05:00
960b37b1c2 Update Spanish translation 2020-01-17 22:50:16 -05:00
b1d17dea4f Update Esperanto translation 2020-01-17 22:50:16 -05:00
6b06471953 Update Chinese (Traditional) translation 2020-01-17 22:50:16 -05:00
4ca957d3eb Update Russian translation 2020-01-17 22:50:16 -05:00
eb9b63477c Update Turkish translation 2020-01-17 22:50:16 -05:00
80c01b055c Update Norwegian Bokmål translation 2020-01-17 22:50:16 -05:00
50aec67069 Merge pull request #984 from rreuvekamp/202001_improve-dutch-locale
Improve Dutch locale
2020-01-17 22:26:46 -05:00
7baced75e5 Fix channel redirect 2020-01-14 08:21:17 -05:00
99743a94fb Improve Dutch locale 2020-01-12 19:00:10 +01:00
9bdfd6025b Add base-devel to Arch dependencies 2020-01-08 21:06:22 -05:00
91400d2ce0 Merge pull request #959 from frajibe/wip/frajibe/frenchTs
Small fixes for the french translation
2020-01-08 20:29:26 -05:00
7b88d0efe3 Minor refactor 2020-01-08 20:27:21 -05:00
4aada65dae Fix channel playlists for genre channels 2020-01-08 20:26:47 -05:00
0560d2cfb7 Bump video.js 2020-01-08 20:19:47 -05:00
58c1a68ad9 Change embed code 2020-01-04 15:27:45 +01:00
588fc6df85 Bump dependencies 2019-12-14 16:10:46 -05:00
2c9e4ded40 Fix the french translation 2019-12-14 18:20:26 +01:00
88a538e71b Minor refactor for channel playlists 2019-12-05 15:47:35 -05:00
513363504f Add better error message for fetch_channel 2019-12-05 15:46:21 -05:00
0e844edacb Add support for pt-BR 2019-12-05 15:26:35 -05:00
5751bb2481 Add Brazilian Portuguese locale (#915)
* adding Brazilian Portuguese locale
2019-12-05 15:24:53 -05:00
28669d940a Remove --release from dockerfile 2019-12-05 14:49:44 -05:00
3d87bdb6b4 Merge pull request #938 from tleydxdy/patch-2
Proper fix for docker build
2019-12-05 14:49:14 -05:00
1499ce43bf Add support for Romanian locale 2019-12-03 19:41:58 -05:00
4d22b43d65 Merge pull request #942 from vcvlad/master
Invidious translated into Romanian
2019-12-03 19:41:26 -05:00
823603650f Add support for /sorry/index CAPTCHA 2019-12-03 19:14:11 -05:00
062867a38d Strip domain from caption URLs 2019-12-01 17:52:39 -05:00
f3e0c5d653 Update ro.json
Invidious translated from English into Romanian.
2019-11-28 17:16:46 +00:00
fc7f48b7db Create ro.json 2019-11-28 15:09:41 +00:00
04d56420d1 Run 'crystal tool format' 2019-11-28 08:20:44 -06:00
a017574f74 Add support for force_resolve to QUIC client 2019-11-28 08:19:28 -06:00
ae24360c02 Proper fix for docker build
return to static linking
2019-11-26 18:20:23 -05:00
3fea1976c8 Update dependencies 2019-11-24 15:26:19 -05:00
cf97dd9fcd Bump dependencies 2019-11-24 14:00:53 -05:00
0e3a48ff76 Update QUICPool 2019-11-24 13:41:47 -05:00
48cbe45a9d Add Previous/Next page buttons at the top of the page 2019-11-20 15:59:07 -03:00
276bf09238 Skip preferences for assets 2019-11-20 12:04:53 -05:00
05988c1c49 Bump version 2019-11-18 20:41:42 -05:00
d46b26e3bc Use QUIC for connections to YouTube 2019-11-18 17:28:32 -05:00
236c172c6f Merge pull request #896 from sh4dowb/master
Fixed double quotes in meta description
2019-11-14 10:38:38 -05:00
59fcb56972 Merge pull request #907 from tleydxdy/patch-2
Fix docker build for now
2019-11-14 10:38:12 -05:00
c07cd3a856 Fix typo in playlist url 2019-11-14 10:11:33 -05:00
37766347a5 Fix docker build for now 2019-11-13 08:57:12 -05:00
79da61782b Fixed double quotes in meta description 2019-11-11 19:00:23 +03:00
8af87f1a8b Fix updating of cookies 2019-11-10 10:02:02 -05:00
494c954cbb Add etag to /api/v1/annotations 2019-11-09 22:05:17 -05:00
71bc9eea28 Add support for Anti-Captcha 2019-11-09 14:22:39 -05:00
e3b2bcfd06 Fix ID for search duration 2019-11-08 09:29:33 -05:00
142d974641 Use force_resolve for search suggestions 2019-11-07 12:25:34 -05:00
e56129111a Update CHANGELOG and bump version 2019-11-05 23:38:49 -05:00
0e1d6aa85c Update error messages for video extractor 2019-11-05 19:39:11 -05:00
bcdb8cd770 Fix default fo dark_mode 2019-11-04 17:08:13 -05:00
7b2ca55089 Fix escaping in email query 2019-11-04 12:26:05 -05:00
f6ef0b684a Fix word-break for links in channel RSS 2019-11-03 08:53:16 -05:00
02e1cdf210 Add support for '/yts/img' endpoint 2019-11-01 12:02:38 -04:00
b58950c574 Fix decoding for channel playlists extractor 2019-11-01 12:00:59 -04:00
833a60f29c Update pubsub to use client pool 2019-11-01 07:34:36 -04:00
f776d67c03 Update sed replace in Dockerfile 2019-10-28 12:49:03 -04:00
13e7cca1a4 Bump read timeout 2019-10-28 12:34:50 -04:00
0f3c477ff3 Remove dependency on ImageMagick (replace with rsvg-convert) 2019-10-28 10:49:05 -04:00
039cc30c07 Fix host replace in Dockerfile 2019-10-28 10:45:22 -04:00
25c8cd9246 Fix escaping for search params 2019-10-28 06:17:39 -04:00
c58841100a Fix extractor for channel community cursor 2019-10-27 21:44:17 -04:00
03e24cccd0 Add support for configurable administrator email 2019-10-27 14:18:07 -04:00
35f011758d Merge pull request #850 from XVnNzb2kFEhV9Tjm/master
Add Japanese translations
2019-10-27 14:09:31 -04:00
2ebfaf76f2 Refactor continuation token handling 2019-10-27 13:50:42 -04:00
0cf187dee7 Add support for image captcha in Google login 2019-10-27 00:19:05 -04:00
bdeb325bad Fix monkeypatch for HTTP::Client 2019-10-26 11:51:23 -04:00
a1225b6d0d Sanitize input to decode_length_seconds 2019-10-26 10:17:25 -04:00
f0368b02c4 Add Japanese translations 2019-10-26 18:34:25 +09:00
202de1436d Fix broken connections in pool 2019-10-25 23:06:08 -04:00
7f8746fcd4 Remove invalid connections from pool 2019-10-25 22:40:53 -04:00
e05a25d701 Vary user-agent 2019-10-25 18:02:33 -04:00
6930570fa2 Add HTTPClient pool 2019-10-25 12:58:16 -04:00
aba2c5b938 Remove code for /api/v1/insights 2019-10-25 12:25:57 -04:00
d82f86dcd9 Update entrypoint.postgres.sh (#843)
* Update entrypoint.postgres.sh
2019-10-22 07:37:26 -04:00
159b4f9734 Format source 2019-10-21 21:40:03 -04:00
46a737c7a1 Skip deleted videos in playlist 2019-10-21 19:00:56 -04:00
a731486ab7 Fix typo in locale regex 2019-10-21 11:11:29 -04:00
c3e57f1fdd Fix typo in footer 2019-10-20 23:02:16 -04:00
a9af484412 Merge pull request #839 from TheFrenchGhosty/crypto
Add protocol to the cryptocurrencies
2019-10-20 22:39:24 -04:00
007646774e Fix typo in English locale 2019-10-20 21:01:27 -04:00
2d78e35e16 Fix typo in syncing user preferences 2019-10-20 20:58:50 -04:00
7524b5e349 Move feed_menu and default_home into user preferences 2019-10-20 20:43:33 -04:00
2a04a48b89 Fix redirect for livestreams 2019-10-20 12:48:55 -04:00
3cbdaab81e Add protocol to the cryptocurrencies 2019-10-19 20:23:27 +02:00
8c858a5953 Merge pull request #829 from l10n-tw/translation
Update zh_TW translations.
2019-10-19 13:14:33 -04:00
1812958106 French Translation updated, custom playlists update, enhancements and corrections (#830)
* French Translation updated, custom playlists update and corrections
2019-10-19 13:13:49 -04:00
4e5324916c Merge pull request #836 from EsmailELBoBDev2/master
Update ar.json
2019-10-19 13:12:58 -04:00
1a77becc6a Update ar.json 2019-10-18 17:22:45 +00:00
23ccaea2ff Fix comment event listener 2019-10-18 12:44:11 -04:00
2a4b252a9d Only force resolve for www.youtube.com 2019-10-18 12:41:03 -04:00
9ae4edfee5 Update zh_TW translations. 2019-10-17 08:48:34 +08:00
bf48809b61 Allow unlisted playlists to be viewed from /api/v1/playlists/ 2019-10-16 08:21:26 -04:00
57a80a3c10 Add missing text to locales 2019-10-15 22:52:11 -04:00
3f3e52d7ae Fix indexId for created playlist video 2019-10-15 22:09:01 -04:00
5c69110658 Merge pull request #673 from omarroth/add-playlists
Add initial support for custom playlists
2019-10-15 21:29:34 -04:00
be055d9dcb Add support for custom playlists 2019-10-15 21:17:14 -04:00
1e34a61911 Fix white-space for RSS feeds 2019-10-14 21:07:07 -04:00
97bd1da2a2 Remove SSL redirect 2019-10-14 21:07:07 -04:00
330ffb803f Remove invalid source map directive for videojs-quality-selector 2019-10-14 21:07:07 -04:00
7b77f200be Merge pull request #817 from TheFrenchGhosty/master
French Translation updated - Rewording and corrections
2019-10-13 17:34:45 -05:00
15a3c8408f Assume feed means subscriptions feed 2019-10-12 23:15:53 +02:00
bc1784ed2b French Translation updated, rewording and corrections 2019-10-12 23:11:40 +02:00
55f0a82249 Remove Patreon links 2019-10-12 10:07:18 -04:00
7aada3f328 Avoid override for X-Client headers 2019-10-10 23:45:46 -04:00
dad885c051 Add YouTube-Client headers to HTTP requests 2019-10-10 22:03:39 -04:00
f5c7bbfda8 Add support for zh-TW translation 2019-10-09 10:23:26 -04:00
f832743009 Update Arabic translation 2019-10-09 16:22:39 +02:00
7551de6439 Merge pull request #791 from l10n-tw/translation
Add zh-TW translations.
2019-10-09 10:22:34 -04:00
e03b4b7505 Hide scrollbar for player menus 2019-10-05 11:51:31 -04:00
2d59fdd178 Fix default value for empty description 2019-10-04 17:04:43 -04:00
e61c8046f4 Fix z-index, scrollbar in player 2019-10-04 12:50:44 -04:00
c0796ac3d6 Add description to RSS body 2019-10-04 12:50:22 -04:00
68be24ffc6 Refactor process_video_params 2019-10-04 12:23:28 -04:00
9dcc87c705 Refactor storyboard generation 2019-10-04 10:26:02 -04:00
d36c536107 Merge pull request #792 from delightfulagony/master
Fixed bug that made the whole 'Invidious' home link div clickable. Solves #691
2019-10-04 10:25:10 -04:00
affeeb39de Fixed bug that made the whole 'Invidious' div clickable. Solves #691 2019-10-02 14:05:58 +02:00
f5d8a952f2 Add zh-TW translations. 2019-10-02 16:28:25 +08:00
da07f99d3d Bump supported Crystal version 2019-09-30 15:36:54 -04:00
eef66de68c Merge pull request #743 from girst/rssparams
Forward query string parameters from Atom feeds
2019-09-30 15:36:35 -04:00
4aa1180fce Forward parameters given in &params= from Atom feeds
Any parameters given in &params=... are appended to /watch URLs.  This
allows e.g. passing &raw=1&listen=1 to a playlist of music and use an
rss reader like newsboat as a media player, like so:

    https://invidio.us/feed/playlist/XXX?params=%26raw%3D1%listen%3D1

All three feeds--channels, playlists, subscriptions--are supported.
2019-09-30 17:48:13 +02:00
553d52a45e Update silvermine quality selector 2019-09-26 17:11:10 -04:00
347b153884 Merge pull request #765 from leonklingele/docker-travis-warnings
docker,travis: fail build on any warning
2019-09-24 20:51:12 -04:00
1e7c176481 Merge pull request #766 from leonklingele/travis-shallow-clone
travis: unshallowly clone Git repo
2019-09-24 20:50:48 -04:00
e390405d0c Update privacy policy 2019-09-24 20:47:49 -04:00
7378a84c96 travis: unshallowly clone Git repo
This fixes a compilation error if too many commits were made after the
most recent tag:

    fatal: No names found, cannot describe anything.
    In src/invidious.cr:60:19
      60 | CURRENT_VERSION = {{ "#{`git describe --tags --abbrev=0`.strip}" }}
    Error: expanding macro

See https://travis-ci.org/leonklingele/invidious/jobs/588672881#L275-L290.
2019-09-25 01:23:12 +02:00
b25013c4a2 docker,travis: fail build on any warning 2019-09-25 01:22:51 +02:00
6942916f13 Merge remote-tracking branch 'weblate/master' 2019-09-24 13:48:49 -04:00
f69f0b97f5 Add fix for index out of bounds during high load 2019-09-24 13:38:50 -04:00
4361ea9686 Update DB calls for 0.31.0 2019-09-24 13:38:50 -04:00
be2ee33273 Fix overflow for player controls 2019-09-24 13:38:50 -04:00
8c2ddb0255 Add config options for host binding and port 2019-09-24 13:38:50 -04:00
466a5a932b Add support for Turkish translation 2019-09-24 13:38:50 -04:00
8a3c6382e9 Add Turkish translation 2019-09-24 13:38:46 -04:00
a2b45120c5 Update Turkish translation 2019-09-24 19:31:37 +02:00
546ad52e11 Add Turkish translation 2019-09-24 19:31:37 +02:00
1aefc5b540 Update to Crystal 0.31.0, resolve compiler deprecation warnings, update dependencies (#764)
* shard: update to crystal 0.31.0

Additionally, no longer use the Crystal "markdown" library which has
been removed from the Crystal stdlib in version 0.31.0.
See https://github.com/crystal-lang/crystal/pull/8115.

Also fix some deprecation warnings using the following commands:

    find . \( -type d -name .git -prune \) -o -type f -exec sed -i 's/URI\.escape/URI\.encode_www_form/g' "{}" \;
    find . \( -type d -name .git -prune \) -o -type f -exec sed -i 's/URI\.unescape/URI\.decode_www_form/g' "{}" \;
    sed -i 's/while \%pull\.kind \!\= \:end_object/until \%pull\.kind\.end_object\?/g' src/invidious/helpers/patch_mapping.cr
2019-09-24 13:31:33 -04:00
1085ca4a2d Fix typo in Google login 2019-09-22 09:54:54 -04:00
9766322e99 Update videojs-quality-selector 2019-09-21 22:22:20 -04:00
cfb68e3bff Add additional handling for unplayable videos 2019-09-21 20:06:08 -04:00
a006963fb8 Update Google login 2019-09-21 20:06:08 -04:00
24c95c27c3 Merge pull request #752 from gnomus/master
[Fix][Docker] Update Package Repository for Install
2019-09-14 10:05:35 -04:00
3c40c0be6b Update Package Repository for Install 2019-09-13 15:06:44 +02:00
b1fc80b79a Update sub_count extractor 2019-09-12 21:09:23 -04:00
50d793e49b Hide video count for auto-generated channels 2019-09-12 13:11:21 -04:00
34c43b8349 Add support for abbreviated sub count in search 2019-09-12 13:06:27 -04:00
7002a316fd Filter movies from recommended videos 2019-09-12 13:06:10 -04:00
1f37faad42 Fix plurilzation regex 2019-09-09 18:09:21 -04:00
68cf24d100 Add support for channel redirects 2019-09-08 12:08:59 -04:00
86491da253 Fix map for recommended videos 2019-09-07 21:56:33 -04:00
90249cdafa Fix extractor for short_view_count_text 2019-09-07 20:09:08 -04:00
7c75111c41 Refactor error handling for API endpoints 2019-09-05 14:12:14 -04:00
7b53b6bfef Shrink continuation cursor for YouTube comments 2019-09-04 15:47:27 -04:00
fded5fd900 Update Spanish translation 2019-09-03 21:10:49 -04:00
950965bd4a Update French translation 2019-09-03 21:10:49 -04:00
3a359319fa Update German translation 2019-09-03 21:10:49 -04:00
d3dd82c699 Update Norwegian Bokmål translation 2019-09-03 21:10:49 -04:00
81f192bccb Update Esperanto translation 2019-09-03 21:10:49 -04:00
60a23febed Update Arabic translation 2019-09-03 21:10:48 -04:00
d0e280cbac Update ar.json (#728)
* Update ar.json
2019-09-03 21:04:04 -04:00
ecb62c8659 Italian translation update (#724)
* Italian translation update
2019-09-03 21:02:53 -04:00
12669df92b Merge pull request #729 from Infinisil/migrate
Provide db user in migrate-db-3646395.sh
2019-09-01 17:30:22 -04:00
44b2afeffa Merge pull request #675 from Dragnucs/patch-1
Add Postgres health check
2019-09-01 09:53:04 -04:00
70f435e909 Fix nillable for recommendedVideos 2019-08-31 16:24:13 -04:00
512d82071e Fix invalid viewCountText in related videos 2019-08-31 15:58:38 -04:00
3896230199 Fix type cast for viewCount 2019-08-31 01:11:45 -04:00
b902880a05 fix docker build (#734) 2019-08-31 01:11:25 -04:00
418526af16 Provide db user in migrate-db-3646395.sh 2019-08-29 02:25:15 +02:00
45ad212459 Handle redirects in /videoplayback 2019-08-27 09:53:44 -05:00
0f49d424d3 Refactor search params 2019-08-27 09:35:15 -05:00
01e42c8d6f Flatten viewCountText 2019-08-27 08:52:22 -05:00
26107bd6c3 Minor refactor 2019-08-27 08:08:26 -05:00
7d3ecd2297 Bump JS/CSS dependencies 2019-08-27 08:01:33 -05:00
16056661dd Update recommended videos extractor 2019-08-27 08:00:04 -05:00
059f50dad4 Add 'playlistThumbnail' to playlist objects 2019-08-21 19:08:11 -05:00
4c9975a7d9 Use accurate sub count when available 2019-08-21 18:35:54 -05:00
9f9cc1ffb5 Refactor search extractor 2019-08-21 18:23:20 -05:00
e768e1e277 Fix allowed_regions for globally blocked videos 2019-08-19 10:16:11 -05:00
acaf7b969a js: add support to detect alt, meta and control key in keydown handler (#704)
This fixes a quite severe user experience issue where pressing the
'alt', 'meta' and/or 'ctrl' key along with one of the supported keys
(e.g. 'f' to enter video fullscreen mode) would overwrite the default
browser behavior. In the case of 'f+meta' we would enter fullscreen
mode, and not open the browser search panel as one might expect.

This change is required to stay consistent with the way YouTube
handles keydown events.
2019-08-18 23:22:39 -05:00
2b94975345 Fix playlist_thumbnail extractor 2019-08-16 20:06:21 -05:00
e6b4e12689 js: add support for keydown events (#678)
* js: add support for keydown events

This will modify the player behavior even if the player element is unfocused.

Based on the YouTube key bindings, allow to

- toggle playback with space and 'k' key
- increase and decrease player volume with up / down arrow key
- mute and unmute player with 'm' key
- jump forwards and backwards by 5 seconds with right / left arrow key
- jump forwards and backwards by 10 seconds with 'l' / 'j'  key
- set video progress with number keys 0–9
- toggle captions with 'c' key
- toggle fullscreen mode with 'f' key
- play next video with 'N' key
- increase and decrease playback speed with '>' / '<' key

* js: remove unused dependency 'videojs.hotkeys.min.js'

Support for controlling the player volume by scrolling over it is
still retained by copying over the relevant code part from the
aforementioned library.
2019-08-16 16:01:14 -05:00
7eaac995bd Change font family to better native selection (#679) 2019-08-16 15:59:05 -05:00
a19cdb5e72 Fix season playlists 2019-08-16 15:46:59 -05:00
f54fbd057e Add prefers-color-scheme support (#601)
* Add prefers-color-scheme support

This should fix <https://github.com/omarroth/invidious/issues/559>.
The cookie storage format has been changed from boolean
("true"/"false") to tri-state ("dark"/"light"/""), so that users
without a cookie set will get dark mode if they have enabled the dark
theme in their operating system. The code for handling the cookie
state, along with the user's operating system theme, has been factored
out into a new function `update_mode`, which is called both at window
load and at the "storage" event listener, because the "storage" event
listener is only trigerred when a change is made to the localStorage
from another tab/window (for more info - see
<https://stackoverflow.com/a/4679754>).
2019-08-15 11:29:55 -05:00
19eceb4ecc Merge pull request #694 from 2secslater/player-preferences-typo-fix
Fix annoying typo in Preferences view for the player view
2019-08-14 19:17:29 -05:00
dcff1ec25f Merge pull request #698 from leonklingele/docker-build-on-alpine-edge
docker: use alpine:edge base image for building
2019-08-14 18:50:15 -05:00
567cda4cd3 docker: use alpine:edge base image for building
This fixes currently failing Docker builds.
kemalcr/kemal in version 0.26.0 requires Crystal 0.30.0 which is not
yet available on Alpine 3.10 (previously used as the Docker base image).
2019-08-15 01:37:25 +02:00
900d8790b3 Refactor geo-bypass 2019-08-14 18:09:07 -05:00
cad284519f Merge pull request #696 from leonklingele/shard-update-dependencies-and-crystal-version
shard: update dependencies and Crystal version
2019-08-14 18:07:26 -05:00
0727acf458 Merge pull request #695 from leonklingele/crystalfmt
Format Crystal files
2019-08-14 18:06:37 -05:00
d8813179be Merge pull request #682 from leonklingele/ci-travis-test-docker-stages
travis: also test Docker build
2019-08-14 17:59:53 -05:00
10d690c8fb shard: update to crystal 0.30.1 2019-08-14 23:44:27 +02:00
52f71cdda0 shard: update dependencies
This updates will/crystal-pg to 0.18.1 and kemalcr/kemal tp 0.26.0.
2019-08-14 23:44:03 +02:00
2a9a348164 Format Crystal files
Crystal 0.30.1 apparently introduced some breaking changes to their
code formatter which made CI fail.

The code was automatically formatted by running

    crystal tool format
2019-08-14 23:31:07 +02:00
00346781bb Fix annoying typo in Preferences view 2019-08-14 20:12:37 +00:00
4c6e92eea1 travis: also test Docker build 2019-08-10 17:00:50 +02:00
b63f469110 Fix typo in ConfigPreferences 2019-08-09 14:09:24 -05:00
f6f176afc1 Merge pull request #680 from leonklingele/add-player-styles
Add support for player styles
2019-08-09 13:49:51 -05:00
3de37a61c5 Update videojs-http-source-selector 2019-08-09 10:36:41 -05:00
2d955dae48 Force redirect for videos without audio 2019-08-09 10:36:22 -05:00
46577fb128 Add support for player styles
This currently includes the following styles:

- Invidious, the default
- YouTube, using a centered play button and always visible video control bar

Implements https://github.com/omarroth/invidious/issues/670.
Supersedes https://github.com/omarroth/invidious/pull/661.
2019-08-09 02:04:36 +02:00
37dba6ebfd Add Postgres health check 2019-08-07 08:07:36 +00:00
66b949bed1 Format history.ecr 2019-08-05 18:57:32 -05:00
c9a05187fb Update icon for unlisted videos 2019-08-05 18:57:32 -05:00
cc956583fb Fix detection of unavailable videos 2019-08-05 18:57:32 -05:00
14206efb09 Merge pull request #671 from leonklingele/shard-upgrade-dependencies
shard: update dependencies
2019-08-04 22:37:36 -05:00
5e6d7f5d16 shard: update dependencies 2019-08-05 04:19:09 +02:00
7a33831d14 Fix detection of premium content 2019-08-04 20:57:34 -05:00
4f120e19fd Fix overflow for channel description 2019-08-04 09:46:26 -05:00
37d064d836 Bump Crystal version 2019-08-04 09:16:29 -05:00
824150f89b Add Travis CI and pin dependencies (#655) 2019-08-04 09:10:32 -05:00
f7dc4cca2c Merge pull request #665 from leonklingele/improve-dockerfile
docker: various improvements to Dockerfile
2019-08-04 08:07:16 -05:00
ea39bb4334 docker: various improvements to Dockerfile
This includes the following changes:

- Use multi-stage build to run application in an optimized environment, see
  https://docs.docker.com/develop/develop-images/multistage-build/
- Run application on alpine instead of archlinux to further reduce image size
- Build Crystal application with --release for improved runtime performance
- Run application as non-root user for better security, see
  https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#user
- Only rebuild Docker layers when required
2019-08-04 11:21:32 +02:00
5680d5a7be Sort dash representations by framerate 2019-08-02 15:24:38 -05:00
004246124b Merge pull request #664 from leonklingele/css-fix-jumpy-page-on-search-field-focus
Fix jumpy page on search field focus
2019-08-01 12:50:08 -05:00
c41beae99a Add fix for channels with empty descriptions 2019-08-01 07:49:33 -05:00
fe2cffb25b Fix jumpy page on search field focus 2019-08-01 09:35:57 +02:00
f71d5c429d Add description to channel pages 2019-07-31 19:29:16 -05:00
dce5816b18 Fix image url extractor 2019-07-31 19:16:09 -05:00
f99a7b2a8c Fix engagement for zero-view videos (#654)
Division by zero resulted in 'NaN'.

Fixes https://github.com/omarroth/invidious/issues/653.
2019-07-31 09:48:45 -05:00
ec36c69984 Update German translation 2019-07-31 09:37:43 -05:00
2458db03de Update Icelandic translation 2019-07-31 09:36:55 -05:00
7528b7bc1a Update german translation (#650) 2019-07-31 09:32:16 -05:00
8af33084ed French translation updated - New words, consistency (#643)
* New words translated, more consistency
2019-07-31 08:52:41 -05:00
f643175156 Fix typo in video extractor 2019-07-30 10:12:41 -05:00
0321dda1d7 Fix handling for video content warnings 2019-07-29 20:39:12 -05:00
ff5d79e3ee Update video extractor 2019-07-29 19:41:45 -05:00
4ee3ec09df Autofill search for playlists and communities page 2019-07-27 08:51:10 -05:00
cfe9d47fa0 Add support for '/embed/?list' 2019-07-25 10:36:35 -05:00
607d6125fc Add support for '/embed/live_stream' 2019-07-24 19:18:26 -05:00
6215259565 Add support for Google login verification 2019-07-22 13:28:36 -05:00
d034fecc89 Remove default arguments from function definitions 2019-07-20 20:33:44 -05:00
f18d8229c0 Refactor continuation protocol buffers 2019-07-20 20:18:08 -05:00
e736626953 Fix continuation for last page of playlists 2019-07-20 11:38:20 -05:00
c2c438637a Merge remote-tracking branch 'weblate/master' 2019-07-18 21:58:51 -05:00
94638fe42c Update translations 2019-07-18 21:52:25 -05:00
55ecfda39a Update Icelandic translation 2019-07-18 21:52:25 -05:00
d97a272aa5 Fix check for 2-step verification 2019-07-18 21:52:24 -05:00
80a1944b9d Update Icelandic translation 2019-07-19 01:52:11 +02:00
138cf943a9 Update Icelandic translation 2019-07-19 01:52:11 +02:00
c7e672e533 Update Icelandic translation 2019-07-19 01:52:11 +02:00
1b74a04efd Add 'force_resolve' to fix issues with rate limiting 2019-07-18 18:51:10 -05:00
290c7e6009 Disable autoplay in community tabs 2019-07-14 10:13:40 -05:00
e8a56e0fea Add '1.75' playback speed 2019-07-14 10:13:40 -05:00
1ae7b646b3 Merge pull request #633 from EsmailELBoBDev2/patch-4
Update ar.json
2019-07-14 10:13:04 -05:00
42e2d73ce2 Update ar.json 2019-07-14 06:07:02 +00:00
322 changed files with 38820 additions and 14358 deletions

88
.ameba.yml Normal file
View File

@ -0,0 +1,88 @@
#
# Lint
#
# Exclude assigns for ECR files
Lint/UselessAssign:
Excluded:
- src/invidious.cr
- src/invidious/helpers/errors.cr
- src/invidious/routes/**/*.cr
# Ignore false negative (if !db.query_one?...)
Lint/UnreachableCode:
Excluded:
- src/invidious/database/base.cr
# Ignore shadowed variable `key` (it works for now, and that's
# a sensitive part of the code)
Lint/ShadowingOuterLocalVar:
Excluded:
- src/invidious/helpers/tokens.cr
#
# Style
#
Style/RedundantBegin:
Enabled: false
Style/RedundantReturn:
Enabled: false
#
# Metrics
#
# Ignore function complexity (number of if/else & case/when branches)
# For some functions that can hardly be simplified for now
Metrics/CyclomaticComplexity:
Excluded:
# get_about_info(ucid, locale) => [17/10]
- src/invidious/channels/about.cr
# fetch_channel_community(ucid, continuation, ...) => [34/10]
- src/invidious/channels/community.cr
# create_notification_stream(env, topics, connection_channel) => [14/10]
- src/invidious/helpers/helpers.cr:84:5
# get_index(plural_form, count) => [25/10]
- src/invidious/helpers/i18next.cr
# call(context) => [18/10]
- src/invidious/helpers/static_file_handler.cr
# show(env) => [38/10]
- src/invidious/routes/embed.cr
# get_video_playback(env) => [45/10]
- src/invidious/routes/video_playback.cr
# handle(env) => [40/10]
- src/invidious/routes/watch.cr
# playlist_ajax(env) => [24/10]
- src/invidious/routes/playlists.cr
# fetch_youtube_comments(id, cursor, ....) => [40/10]
# template_youtube_comments(comments, locale, ...) => [16/10]
# content_to_comment_html(content) => [14/10]
- src/invidious/comments.cr
# to_json(locale, json) => [21/10]
# extract_video_info(video_id, ...) => [44/10]
# process_video_params(query, preferences) => [20/10]
- src/invidious/videos.cr
#src/invidious/playlists.cr:327:5
#[C] Metrics/CyclomaticComplexity: Cyclomatic complexity too high [19/10]
# fetch_playlist(plid : String)
#src/invidious/playlists.cr:436:5
#[C] Metrics/CyclomaticComplexity: Cyclomatic complexity too high [11/10]
# extract_playlist_videos(initial_data : Hash(String, JSON::Any))

3
.gitattributes vendored Normal file
View File

@ -0,0 +1,3 @@
# https://github.community/t/how-to-change-the-category/2261/3
videojs-*.js linguist-detectable=false
video.min.js linguist-detectable=false

18
.github/CODEOWNERS vendored Normal file
View File

@ -0,0 +1,18 @@
# Default and lowest precedence. If none of the below matches, @iv-org/developers would be requested for review.
* @iv-org/developers
docker-compose.yml @unixfox
docker/ @unixfox
kubernetes/ @unixfox
README.md @thefrenchghosty
config/config.example.yml @thefrenchghosty @SamantazFox @unixfox
scripts/ @syeopite
shards.lock @syeopite
shards.yml @syeopite
locales/ @SamantazFox
src/invidious/helpers/i18n.cr @SamantazFox
src/invidious/helpers/youtube_api.cr @SamantazFox

1
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1 @@
custom: https://invidious.io/donate/

42
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,42 @@
---
name: Bug report
about: Create a bug report to help us improve Invidious
title: '[Bug] '
labels: bug
assignees: ''
---
<!--
BEFORE TRYING TO REPORT A BUG:
* Read the FAQ!
* Use the search function to check if there is already an issue open for your problem!
If you want to suggest a new feature please use "Feature request" instead
If you want to suggest an enhancement to an existing feature please use "Enhancement" instead
-->
**Describe the bug**
<!-- A clear and concise description of what the bug is. -->
**Steps to Reproduce**
<!-- Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
-->
**Logs**
<!-- If applicable, copy the log that appear in the browser page where the error is reported. -->
**Screenshots**
<!-- If applicable, add screenshots to help explain your problem. -->
**Additional context**
<!-- Add any other context about the problem here.
- Browser (if applicable):
- OS (if applicable):
-->

24
.github/ISSUE_TEMPLATE/enhancement.md vendored Normal file
View File

@ -0,0 +1,24 @@
---
name: Enhancement
about: Suggest an enhancement for an existing feature
title: '[Enhancement] '
labels: enhancement
assignees: ''
---
<!-- Please use the search function to check if the desired function has already been requested by someone else -->
<!-- If you want to suggest a new feature please use "Feature request" instead -->
<!-- If you want to report a bug, please use "Bug report" instead -->
**Is your enhancement request related to a problem? Please describe.**
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
**Describe the solution you'd like**
<!-- A clear and concise description of what you want to happen. -->
**Describe alternatives you've considered**
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
**Additional context**
<!-- Add any other context or screenshots about the enhancement here. -->

View File

@ -0,0 +1,24 @@
---
name: Feature request
about: Suggest an idea for this project
title: '[Feature request] '
labels: feature-request
assignees: ''
---
<!-- Please use the search function to check if the desired function has already been requested by someone else -->
<!-- If you want to suggest an enhancement to an existing feature please use "Enhancement" instead -->
<!-- If you want to report a bug, please use "Bug report" instead -->
**Is your feature request related to a problem? Please describe.**
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
**Describe the solution you'd like**
<!-- A clear and concise description of what you want to happen. -->
**Describe alternatives you've considered**
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
**Additional context**
<!-- Add any other context or screenshots about the feature request here. -->

127
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,127 @@
name: Invidious CI
on:
schedule:
- cron: "0 0 * * *" # Every day at 00:00
push:
branches:
- "master"
- "api-only"
pull_request:
branches: "*"
paths-ignore:
- "*.md"
- LICENCE
- TRANSLATION
- invidious.service
- .git*
- .editorconfig
- screenshots/*
- assets/**
- locales/*
- config/**
- .github/ISSUE_TEMPLATE/*
- kubernetes/**
jobs:
build:
runs-on: ubuntu-latest
name: "build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }}"
continue-on-error: ${{ !matrix.stable }}
strategy:
fail-fast: false
matrix:
stable: [true]
crystal:
- 1.2.2
- 1.3.2
- 1.4.0
- 1.5.0
include:
- crystal: nightly
stable: false
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install Crystal
uses: crystal-lang/install-crystal@v1.6.0
with:
crystal: ${{ matrix.crystal }}
- name: Cache Shards
uses: actions/cache@v3
with:
path: ./lib
key: shards-${{ hashFiles('shard.lock') }}
- name: Install Shards
run: |
if ! shards check; then
shards install
fi
- name: Run tests
run: crystal spec
- name: Run lint
run: |
if ! crystal tool format --check; then
crystal tool format
git diff
exit 1
fi
- name: Build
run: crystal build --warnings all --error-on-warnings --error-trace src/invidious.cr
build-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build Docker
run: docker-compose build --build-arg release=0
- name: Run Docker
run: docker-compose up -d
- name: Test Docker
run: while curl -Isf http://localhost:3000; do sleep 1; done
build-docker-arm64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Docker ARM64 image
uses: docker/build-push-action@v3
with:
context: .
file: docker/Dockerfile.arm64
platforms: linux/arm64/v8
build-args: release=0
- name: Test Docker
run: while curl -Isf http://localhost:3000; do sleep 1; done

77
.github/workflows/container-release.yml vendored Normal file
View File

@ -0,0 +1,77 @@
name: Build and release container
on:
push:
branches:
- "master"
paths-ignore:
- "*.md"
- LICENCE
- TRANSLATION
- invidious.service
- .git*
- .editorconfig
- screenshots/*
- .github/ISSUE_TEMPLATE/*
- kubernetes/**
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Crystal
uses: crystal-lang/install-crystal@v1.6.0
with:
crystal: 1.5.0
- name: Run lint
run: |
if ! crystal tool format --check; then
crystal tool format
git diff
exit 1
fi
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to registry
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Build and push Docker AMD64 image for Push Event
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v3
with:
context: .
file: docker/Dockerfile
platforms: linux/amd64
labels: quay.expires-after=12w
push: true
tags: quay.io/invidious/invidious:${{ github.sha }},quay.io/invidious/invidious:latest
build-args: release=1
- name: Build and push Docker ARM64 image for Push Event
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v3
with:
context: .
file: docker/Dockerfile.arm64
platforms: linux/arm64/v8
labels: quay.expires-after=12w
push: true
tags: quay.io/invidious/invidious:${{ github.sha }}-arm64,quay.io/invidious/invidious:latest-arm64
build-args: release=1

24
.github/workflows/stale.yml vendored Normal file
View File

@ -0,0 +1,24 @@
# Documentation: https://github.com/marketplace/actions/close-stale-issues
name: "Stale issue handler"
on:
workflow_dispatch:
schedule:
- cron: "0 */12 * * *"
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 365
days-before-pr-stale: 45 # PRs should be active. Anything that hasn't had activity in more than 45 days should be considered abandoned.
days-before-close: 30
exempt-pr-labels: blocked
stale-issue-message: 'This issue has been automatically marked as stale and will be closed in 30 days because it has not had recent activity and is much likely outdated. If you think this issue is still relevant and applicable, you just have to post a comment and it will be unmarked.'
stale-pr-message: 'This pull request has been automatically marked as stale and will be closed in 30 days because it has not had recent activity and is much likely abandoned or outdated. If you think this pull request is still relevant and applicable, you just have to post a comment and it will be unmarked.'
stale-issue-label: "stale"
stale-pr-label: "stale"
ascending: true

2
.gitignore vendored
View File

@ -6,4 +6,4 @@
/.vscode/
/invidious
/sentry
shard.lock
/config/config.yml

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "mocks"]
path = mocks
url = ../mocks

View File

@ -1,3 +1,140 @@
# Note: This is no longer updated and links to omarroths repo, which doesn't exist anymore.
# 0.20.0 (2019-011-06)
# Version 0.20.0: Custom Playlists
It's been quite a while since the last release! There've been [198 commits](https://github.com/omarroth/invidious/compare/0.19.0..0.20.0) from 27 contributors.
A couple smaller features have since been added. Channel pages and playlists in particular have received a bit of a face-lift, with both now displaying their descriptions as expected, and playlists providing video count and published information. Channels will also now provide video descriptions in their RSS feed.
Turkish (tr), Chinese (zh-TW, in addition to zh-CN), and Japanese (jp) are all now supported languages. Thank you as always to the hard work done by translators that makes this possible.
The feed menu and default home page are both now configurable for registered and unregistered users, and is quite a bit of an improvement for users looking to reduce distractions for their daily use.
## For Administrators
`feed_menu` and `default_home` are now configurable by the user, and have therefore been moved into `default_user_preferences`:
```yaml
feed_menu: ["Popular", "Top"]
default_home: Top
# becomes:
default_user_preferences:
feed_menu: ["Popular", "Top"]
default_home: Top
```
Several new options have also been added, including the ability to set a support email for the instance using `admin_email: EMAIL`, and forcing the use of a specific connection in the case of rate-limiting using `force_resolve` (see below).
## For Developers
Authenticated endpoints are now [properly documented](https://github.com/omarroth/invidious/wiki/Authenticated-Endpoints), as well how to generate and use API tokens. My hope is that this makes some of the more [interesting](https://github.com/omarroth/invidious/wiki/Authenticated-Endpoints#get-apiv1authnotifications) endpoints more accessible for developers to use in their own applications.
API endpoints for interacting with custom playlists have also been added with documentation available [here](https://github.com/omarroth/invidious/wiki/Authenticated-Endpoints#get-apiv1authplaylists).
## Custom playlists
This is probably the feature that has been the longest in the pipe and that I'm quite pleased is now implemented. It is now possible to create custom playlists, which can be played and edited through Invidious. API endpoints have also been added (documentation [here](https://github.com/omarroth/invidious/wiki/Authenticated-Endpoints#get-apiv1authplaylists)).
Overall I'm quite pleased with how smoothly it has been rolled out and with the experience so far, and I'm exctited for how it can be extended and improved in future.
## [instances.invidio.us](https://instances.invidio.us)
It is now possible to view a list of public instances (as provided in the [wiki](https://github.com/omarroth/invidious/wiki/Invidious-Instances)) through an API or a pretty new interface [here](https://instances.invidio.us). It combines uptime information, statistics from each instance and basic information already provided in the wiki. I expect it should be much more user-friendly than compiling the information yourself, and is already used by [Invidition](https://codeberg.org/Booteille/Invidition) to provide a list of instances for users to choose from.
The site itself is licensed under the AGPLv3 and the source is available [here](https://github.com/omarroth/instances.invidio.us).
## Video unavailable [#811](https://github.com/omarroth/invidious/issues/811)
Many users have likely noticed this error message if using Invidious directly or through another service, such as FreeTube. This issue is caused by rate-limiting by Google, and is not a new issuee for projects like Invidious (notably [youtube-dl](https://github.com/ytdl-org/youtube-dl#http-error-429-too-many-requests-or-402-payment-required)) and appears to be affecting smaller, private instances as well.
There is not a permanent fix for administrators currently, however there is some information available [here](https://github.com/omarroth/invidious/issues/811#issuecomment-540017772) that may provide a temporary solution. Unfortanately, in most cases the best option is to wait for the instance to be unbanned or to move the instance to a different IP. A more informative error message is also now provided, which should help an administrator more quickly diagnose the problem.
For those interested, I would recommend following [#811](https://github.com/omarroth/invidious/issues/811) for any future progress on the issue.
## BAT verified publisher
I'm quite late to this announcement, however I'm pleased to mention that Invidious is now a BAT verified publisher! I would recommend looking [here](https://basicattentiontoken.org/about/) or [here](https://www.reddit.com/r/BATProject/comments/7cr7yc/new_to_bat_read_this_introduction_to_basic/) for learning more about what it is and how it works. Overall I think it makes an interesting substitute for services like Liberapay, and a (hopefully) much less-intrusive alternative to direct advertising.
BAT is combined under other cryptocurrencies below. Currently there's a fairly significant delay in payout, which is the reason for the large fluctuation in crypto donations between September and October (and also the reason for the late announcement).
## Release schedule
Currently I'm quite pleased with the current state of the project. There's plenty of things I'd still like to add, however at this point I expect the rate of most new additions will slow down a bit, with more focus on stabililty and any long-standing bugs.
Because of this, I'm planning on releasing a new version quarterly, with any necessary hotfixes being pushed as a new patch release as necessary. As always it will be possible to run Invidious directly from [master](https://github.com/omarroth/invidious/wiki/Updating) if you'd still like to have the lastest version.
I'll plan on providing finances each release, with a similar monthly breakdown as below.
## Finances for September 2019
### Donations
- [Patreon](https://www.patreon.com/omarroth) : \$64.37
- [Liberapay](https://liberapay.com/omarroth) : \$76.04
- Crypto : ~\$99.89 (converted from BAT, BCH, BTC)
- Total : \$240.30
### Expenses
- invidious-lb1 (nyc1) : \$10.00 (load balancer)
- invidious-update1 (s-1vcpu-1gb) : \$5.00 (updates feeds)
- invidious-node1 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node2 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node3 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node4 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node5 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node6 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node7 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node8 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node9 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node10 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node11 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node12 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node13 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node14 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node15 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node16 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-db1 (s-4vcpu-8gb) : \$40.00 (database)
- Total : \$135.00
## Finances for October 2019
- [Liberapay](https://liberapay.com/omarroth) : \$134.40
- Crypto : ~\$8.29 (converted from BAT, BCH, BTC)
- Total : \$142.69
### Expenses
- invidious-lb1 (nyc1) : \$5.00 (load balancer)
- invidious-lb2 (nyc1) : \$5.00 (load balancer)
- invidious-lb3 (nyc1) : \$5.00 (load balancer)
- invidious-lb4 (nyc1) : \$5.00 (load balancer)
- invidious-update1 (s-1vcpu-1gb) : \$5.00 (updates feeds)
- invidious-node1 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node2 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node3 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node4 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node5 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node6 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node7 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node8 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node9 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node10 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node11 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node12 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node13 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node14 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node15 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node16 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node17 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node18 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-db1 (s-4vcpu-8gb) : \$40.00 (database)
- Total : \$155.00
# 0.19.0 (2019-07-13)
# Version 0.19.0: Communities
@ -265,7 +402,7 @@ An `/api/v1/stats` endpoint has been added with [#356](https://github.com/omarro
## For Developers
`/api/v1/channels/:ucid` now provides an `autoGenerated` tag, which returns true for [topic channels](https://www.youtube.com/channel/UCE80FOXpJydkkMo-BYoJdEg), and larger [genre channels](https://www.youtube.com/channel/UC-9-kyTW8ZkZNDHQJ6FgpwQ) generated by YouTube. These channels don't have any videos of their own, so `latestVideos` will be empty. It is recommended instead to display a list of playlists generated by YouTube.
`/api/v1/channels/:ucid` now provides an `autoGenerated` tag, which returns true for topic channels, and larger genre channels generated by YouTube. These channels don't have any videos of their own, so `latestVideos` will be empty. It is recommended instead to display a list of playlists generated by YouTube.
You can now pull a list of playlists from a channel with `/api/v1/channels/playlists/:ucid`. Supported options are documented in the [wiki](https://github.com/omarroth/invidious/wiki/API#get-apiv1channelsplaylistsucid-apiv1channelsucidplaylists). Pagination is handled with a `continuation` token, which is generated on each call. Of note is that auto-generated channels currently have one page of results, and subsequent calls will be empty.

119
Makefile Normal file
View File

@ -0,0 +1,119 @@
# -----------------------
# Compilation options
# -----------------------
RELEASE := 1
STATIC := 0
DISABLE_QUIC := 0
NO_DBG_SYMBOLS := 0
FLAGS ?=
ifeq ($(RELEASE), 1)
FLAGS += --release
endif
ifeq ($(STATIC), 1)
FLAGS += --static
endif
ifeq ($(NO_DBG_SYMBOLS), 1)
FLAGS += --no-debug
else
FLAGS += --debug
endif
ifeq ($(DISABLE_QUIC), 1)
FLAGS += -Ddisable_quic
endif
# -----------------------
# Main
# -----------------------
all: invidious
get-libs:
shards install --production
# TODO: add support for ARM64 via cross-compilation
invidious: get-libs
crystal build src/invidious.cr $(FLAGS) --progress --stats --error-trace
run: invidious
./invidious
# -----------------------
# Development
# -----------------------
format:
crystal tool format
test:
crystal spec
verify:
crystal build src/invidious.cr -Dskip_videojs_download \
--no-codegen --progress --stats --error-trace
# -----------------------
# (Un)Install
# -----------------------
# TODO
# -----------------------
# Cleaning
# -----------------------
clean:
rm invidious
distclean: clean
rm -rf libs
# -----------------------
# Help page
# -----------------------
help:
@echo "Targets available in this Makefile:"
@echo ""
@echo " get-libs Fetch Crystal libraries"
@echo " invidious Build Invidious"
@echo " run Launch Invidious"
@echo ""
@echo " format Run the Crystal formatter"
@echo " test Run tests"
@echo " verify Just make sure that the code compiles, but without"
@echo " generating any binaries. Useful to search for errors"
@echo ""
@echo " clean Remove build artifacts"
@echo " distclean Remove build artifacts and libraries"
@echo ""
@echo ""
@echo "Build options available for this Makefile:"
@echo ""
@echo " RELEASE Make a release build (Default: 1)"
@echo " STATIC Link libraries statically (Default: 0)"
@echo ""
@echo " DISABLE_QUIC Disable support for QUIC (Default: 0)"
@echo " NO_DBG_SYMBOLS Strip debug symbols (Default: 0)"
# No targets generates an output named after themselves
.PHONY: all get-libs build amd64 run
.PHONY: format test verify clean distclean help

341
README.md
View File

@ -1,234 +1,179 @@
# Invidious
<div align="center">
<img src="assets/invidious-colored-vector.svg" width="192" height="192" alt="Invidious logo">
<h1>Invidious</h1>
## Invidious is an alternative front-end to YouTube
<a href="https://www.gnu.org/licenses/agpl-3.0.en.html">
<img alt="License: AGPLv3" src="https://shields.io/badge/License-AGPL%20v3-blue.svg">
</a>
<a href="https://github.com/iv-org/invidious/actions">
<img alt="Build Status" src="https://github.com/iv-org/invidious/workflows/Invidious%20CI/badge.svg">
</a>
<a href="https://github.com/iv-org/invidious/commits/master">
<img alt="GitHub commits" src="https://img.shields.io/github/commit-activity/y/iv-org/invidious?color=red&label=commits">
</a>
<a href="https://github.com/iv-org/invidious/issues">
<img alt="GitHub issues" src="https://img.shields.io/github/issues/iv-org/invidious?color=important">
</a>
<a href="https://github.com/iv-org/invidious/pulls">
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/iv-org/invidious?color=blueviolet">
</a>
<a href="https://hosted.weblate.org/engage/invidious/">
<img alt="Translation Status" src="https://hosted.weblate.org/widgets/invidious/-/translations/svg-badge.svg">
</a>
- Audio-only mode (and no need to keep window open on mobile)
- [Free software](https://github.com/omarroth/invidious) (AGPLv3 licensed)
- No ads
- No need to create a Google account to save subscriptions
- Lightweight (homepage is ~4 KB compressed)
- Tools for managing subscriptions:
- Only show unseen videos
- Only show latest (or latest unseen) video from each channel
- Delivers notifications from all subscribed channels
- Automatically redirect homepage to feed
- Import subscriptions from YouTube
- Dark mode
- Embed support
- Set default player options (speed, quality, autoplay, loop)
- Does not require JS to play videos
- Support for Reddit comments in place of YT comments
- Import/Export subscriptions, watch history, preferences
- Does not use any of the official YouTube APIs
- Developer [API](https://github.com/omarroth/invidious/wiki/API)
<a href="https://github.com/humanetech-community/awesome-humane-tech">
<img alt="Awesome Humane Tech" src="https://raw.githubusercontent.com/humanetech-community/awesome-humane-tech/main/humane-tech-badge.svg?sanitize=true">
</a>
Liberapay: https://liberapay.com/omarroth
Patreon: https://patreon.com/omarroth
BTC: 356DpZyMXu6rYd55Yqzjs29n79kGKWcYrY
BCH: qq4ptclkzej5eza6a50et5ggc58hxsq5aylqut2npk
<h3>An open source alternative front-end to YouTube</h3>
## Invidious Instances
<a href="https://invidious.io/">Website</a>
&nbsp;&nbsp;
<a href="https://instances.invidious.io/">Instances list</a>
&nbsp;&nbsp;
<a href="https://docs.invidious.io/faq/">FAQ</a>
&nbsp;&nbsp;
<a href="https://docs.invidious.io/">Documentation</a>
&nbsp;&nbsp;
<a href="#contribute">Contribute</a>
&nbsp;&nbsp;
<a href="https://invidious.io/donate/">Donate</a>
See [Invidious Instances](https://github.com/omarroth/invidious/wiki/Invidious-Instances) for a full list of publicly available instances.
<h5>Chat with us:</h5>
<a href="https://matrix.to/#/#invidious:matrix.org">
<img alt="Matrix" src="https://img.shields.io/matrix/invidious:matrix.org?label=Matrix&color=darkgreen">
</a>
<a href="https://web.libera.chat/?channel=#invidious">
<img alt="Libera.chat (IRC)" src="https://img.shields.io/badge/IRC%20%28Libera.chat%29-%23invidious-darkgreen">
</a>
<br>
<a rel="me" href="https://social.tchncs.de/@invidious">
<img alt="Fediverse: @invidious@social.tchncs.de" src="https://img.shields.io/badge/Fediverse-%40invidious%40social.tchncs.de-darkgreen">
</a>
<br>
<a href="https://invidious.io/contact/">
<img alt="E-mail" src="https://img.shields.io/badge/E%2d%2dmail-darkgreen">
</a>
</div>
### Official Instances
- [invidio.us](https://invidio.us) 🇺🇸
Issuer: Let's Encrypt, [SSLLabs Verification](https://www.ssllabs.com/ssltest/analyze.html?d=invidio.us)
- [kgg2m7yk5aybusll.onion](http://kgg2m7yk5aybusll.onion)
- [axqzx4s6s54s32yentfqojs3x5i7faxza6xo3ehd4bzzsg2ii4fv2iid.onion](http://axqzx4s6s54s32yentfqojs3x5i7faxza6xo3ehd4bzzsg2ii4fv2iid.onion)
## Screenshots
| Player | Preferences | Subscriptions |
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| [<img src="screenshots/01_player.png?raw=true" height="140" width="280">](screenshots/01_player.png?raw=true) | [<img src="screenshots/02_preferences.png?raw=true" height="140" width="280">](screenshots/02_preferences.png?raw=true) | [<img src="screenshots/03_subscriptions.png?raw=true" height="140" width="280">](screenshots/03_subscriptions.png?raw=true) |
| [<img src="screenshots/04_description.png?raw=true" height="140" width="280">](screenshots/04_description.png?raw=true) | [<img src="screenshots/05_preferences.png?raw=true" height="140" width="280">](screenshots/05_preferences.png?raw=true) | [<img src="screenshots/06_subscriptions.png?raw=true" height="140" width="280">](screenshots/06_subscriptions.png?raw=true) |
| Player | Preferences | Subscriptions |
|-------------------------------------|-------------------------------------|---------------------------------------|
| ![](screenshots/01_player.png) | ![](screenshots/02_preferences.png) | ![](screenshots/03_subscriptions.png) |
| ![](screenshots/04_description.png) | ![](screenshots/05_preferences.png) | ![](screenshots/06_subscriptions.png) |
## Installation
See [Invidious-Updater](https://github.com/tmiland/Invidious-Updater) for a self-contained script that can automatically install and update Invidious.
## Features
### Docker:
**User features**
- Lightweight
- No ads
- No tracking
- No JavaScript required
- Light/Dark themes
- Customizable homepage
- Subscriptions independent from Google
- Notifications for all subscribed channels
- Audio-only mode (with background play on mobile)
- Support for Reddit comments
- [Available in many languages](locales/), thanks to [our translators](#contribute)
#### Build and start cluster:
**Data import/export**
- Import subscriptions from YouTube, NewPipe and Freetube
- Import watch history from NewPipe
- Export subscriptions to NewPipe and Freetube
- Import/Export Invidious user data
```bash
$ docker-compose up
```
**Technical features**
- Embedded video support
- [Developer API](https://docs.invidious.io/api/)
- Does not use official YouTube APIs
- No Contributor License Agreement (CLA)
And visit `localhost:3000` in your browser.
#### Rebuild cluster:
## Quick start
```bash
$ docker-compose build
```
**Using invidious:**
#### Delete data and rebuild:
- [Select a public instance from the list](https://instances.invidious.io) and start watching videos right now!
```bash
$ docker volume rm invidious_postgresdata
$ docker-compose build
```
**Hosting invidious:**
### Linux:
- [Follow the installation instructions](https://docs.invidious.io/installation/)
#### Install dependencies
```bash
# Arch Linux
$ sudo pacman -S shards crystal imagemagick librsvg postgresql
# Ubuntu or Debian
# First you have to add the repository to your APT configuration. For easy setup just run in your command line:
$ curl -sSL https://dist.crystal-lang.org/apt/setup.sh | sudo bash
# That will add the signing key and the repository configuration. If you prefer to do it manually, execute the following commands:
$ curl -sL "https://keybase.io/crystal/pgp_keys.asc" | sudo apt-key add -
$ echo "deb https://dist.crystal-lang.org/apt crystal main" | sudo tee /etc/apt/sources.list.d/crystal.list
$ sudo apt-get update
$ sudo apt install crystal libssl-dev libxml2-dev libyaml-dev libgmp-dev libreadline-dev librsvg2-dev postgresql imagemagick libsqlite3-dev
```
#### Add invidious user and clone repository
```bash
$ useradd -m invidious
$ sudo -i -u invidious
$ git clone https://github.com/omarroth/invidious
$ exit
```
#### Setup PostgresSQL
```bash
$ sudo systemctl enable postgresql
$ sudo systemctl start postgresql
$ sudo -i -u postgres
$ psql -c "CREATE USER kemal WITH PASSWORD 'kemal';" # Change 'kemal' here to a stronger password, and update `password` in config/config.yml
$ createdb -O kemal invidious
$ psql invidious kemal < /home/invidious/invidious/config/sql/channels.sql
$ psql invidious kemal < /home/invidious/invidious/config/sql/videos.sql
$ psql invidious kemal < /home/invidious/invidious/config/sql/channel_videos.sql
$ psql invidious kemal < /home/invidious/invidious/config/sql/users.sql
$ psql invidious kemal < /home/invidious/invidious/config/sql/session_ids.sql
$ psql invidious kemal < /home/invidious/invidious/config/sql/nonces.sql
$ psql invidious kemal < /home/invidious/invidious/config/sql/annotations.sql
$ exit
```
#### Setup Invidious
```bash
$ sudo -i -u invidious
$ cd invidious
$ shards update && shards install
$ crystal build src/invidious.cr --release
# test compiled binary
$ ./invidious # stop with ctrl c
$ exit
```
#### systemd service
```bash
$ sudo cp /home/invidious/invidious/invidious.service /etc/systemd/system/invidious.service
$ sudo systemctl enable invidious.service
$ sudo systemctl start invidious.service
```
### OSX:
```bash
# Install dependencies
$ brew update
$ brew install shards crystal-lang postgres imagemagick librsvg
# Clone repository and setup postgres database
$ git clone https://github.com/omarroth/invidious
$ cd invidious
$ brew services start postgresql
$ psql -c "CREATE ROLE kemal WITH PASSWORD 'kemal';" # Change 'kemal' here to a stronger password, and update `password` in config/config.yml
$ createdb -O kemal invidious
$ psql invidious kemal < config/sql/channels.sql
$ psql invidious kemal < config/sql/videos.sql
$ psql invidious kemal < config/sql/channel_videos.sql
$ psql invidious kemal < config/sql/users.sql
$ psql invidious kemal < config/sql/session_ids.sql
$ psql invidious kemal < config/sql/nonces.sql
$ psql invidious kemal < config/sql/annotations.sql
# Setup Invidious
$ shards update && shards install
$ crystal build src/invidious.cr --release
```
## Update Invidious
You can see how to update Invidious [here](https://github.com/omarroth/invidious/wiki/Updating).
## Usage:
```bash
$ ./invidious -h
Usage: invidious [arguments]
-b HOST, --bind HOST Host to bind (defaults to 0.0.0.0)
-p PORT, --port PORT Port to listen for connections (defaults to 3000)
-s, --ssl Enables SSL
--ssl-key-file FILE SSL key file
--ssl-cert-file FILE SSL certificate file
-h, --help Shows this help
-c THREADS, --channel-threads=THREADS
Number of threads for refreshing channels (default: 1)
-f THREADS, --feed-threads=THREADS
Number of threads for refreshing feeds (default: 1)
-o OUTPUT, --output=OUTPUT Redirect output (default: STDOUT)
-v, --version Print version
```
Or for development:
```bash
$ curl -fsSLo- https://raw.githubusercontent.com/samueleaton/sentry/master/install.cr | crystal eval
$ ./sentry
🤖 Your SentryBot is vigilant. beep-boop...
```
## Documentation
[Documentation](https://github.com/omarroth/invidious/wiki) can be found in the wiki.
The full documentation can be accessed online at https://docs.invidious.io/
## Extensions
The documentation's source code is available in this repository:
https://github.com/iv-org/documentation
[Extensions](https://github.com/omarroth/invidious/wiki/Extensions) can be found in the wiki, as well as documentation for integrating it into other projects.
### Extensions
## Made with Invidious
We highly recommend the use of [Privacy Redirect](https://github.com/SimonBrazell/privacy-redirect#get),
a browser extension that automatically redirects Youtube URLs to any Invidious instance and replaces
embedded youtube videos on other websites with invidious.
- [FreeTube](https://github.com/FreeTubeApp/FreeTube): An Open Source YouTube app for privacy.
- [CloudTube](https://cadence.moe/cloudtube/subscriptions): A JS-rich alternate YouTube player
- [PeerTubeify](https://gitlab.com/Ealhad/peertubeify): On YouTube, displays a link to the same video on PeerTube, if it exists.
- [MusicPiped](https://github.com/deep-gaurav/MusicPiped): A materialistic music player that streams music from YouTube.
The documentation contains a list of browser extensions that we recommended to use along with Invidious.
## Contributing
You can read more here: https://docs.invidious.io/applications/
1. Fork it ( https://github.com/omarroth/invidious/fork )
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin my-new-feature)
5. Create a new Pull Request
## Contact
## Contribute
Feel free to send an email to omarroth@protonmail.com or join our [Matrix Server](https://riot.im/app/#/room/#invidious:matrix.org), or #invidious on Freenode.
### Code
You can also view release notes on the [releases](https://github.com/omarroth/invidious/releases) page or in the CHANGELOG.md included in the repository.
1. Fork it ( https://github.com/iv-org/invidious/fork ).
1. Create your feature branch (`git checkout -b my-new-feature`).
1. Stage your files (`git add .`).
1. Commit your changes (`git commit -am 'Add some feature'`).
1. Push to the branch (`git push origin my-new-feature`).
1. Create a new pull request ( https://github.com/iv-org/invidious/compare ).
## License
### Translations
[![GNU AGPLv3 Image](https://www.gnu.org/graphics/agplv3-155x51.png)](http://www.gnu.org/licenses/agpl-3.0.en.html)
We use [Weblate](https://weblate.org) to manage Invidious translations.
Invidious is Free Software: You can use, study share and improve it at your
will. Specifically you can redistribute and/or modify it under the terms of the
[GNU Affero General Public License](https://www.gnu.org/licenses/agpl.html) as
published by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
You can suggest new translations and/or correction here: https://hosted.weblate.org/engage/invidious/.
Creating an account is not required, but recommended, especially if you want to contribute regularly.
Weblate also allows you to log-in with major SSO providers like Github, Gitlab, BitBucket, Google, ...
## Projects using Invidious
- [FreeTube](https://github.com/FreeTubeApp/FreeTube): A libre software YouTube app for privacy.
- [CloudTube](https://sr.ht/~cadence/tube/): A JavaScript-rich alternate YouTube player.
- [PeerTubeify](https://gitlab.com/Cha_deL/peertubeify): On YouTube, displays a link to the same video on PeerTube, if it exists.
- [MusicPiped](https://github.com/deep-gaurav/MusicPiped): A material design music player that streams music from YouTube.
- [HoloPlay](https://github.com/stephane-r/HoloPlay): Funny Android application connecting on Invidious API's with search, playlists and favorites.
- [WatchTube](https://github.com/WatchTubeTeam/WatchTube): Powerful YouTube client for Apple Watch.
- [Yattee](https://github.com/yattee/yattee): Alternative YouTube frontend for iPhone, iPad, Mac and Apple TV.
- [TubiTui](https://codeberg.org/777/TubiTui): A lightweight, libre, TUI-based YouTube client.
- [Ytfzf](https://github.com/pystardust/ytfzf): A posix script to find and watch youtube videos from the terminal. (Without API)
## Liability
We take no responsibility for the use of our tool, or external instances
provided by third parties. We strongly recommend you abide by the valid
official regulations in your country. Furthermore, we refuse liability
for any inappropriate use of Invidious, such as illegal downloading.
This tool is provided to you in the spirit of free, open software.
You may view the LICENSE in which this software is provided to you [here](./LICENSE).
> 16. Limitation of Liability.
>
> IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

1
TRANSLATION Normal file
View File

@ -0,0 +1 @@
https://hosted.weblate.org/projects/invidious/

View File

@ -1,38 +0,0 @@
a:hover,
a:active {
color: rgb(0, 182, 240);
}
a {
color: #a0a0a0;
text-decoration: none;
}
body {
background-color: rgba(35, 35, 35, 1);
color: #f0f0f0;
}
.pure-form legend {
color: #f0f0f0;
}
.pure-menu-heading {
color: #f0f0f0;
}
.pure-form > fieldset > input,
.pure-control-group > input,
.pure-form > fieldset > select,
.pure-control-group > select {
color: rgba(35, 35, 35, 1);
}
.pure-form input[type="file"] {
color: #f0f0f0;
}
.navbar > .searchbar input {
background-color: inherit;
color: inherit;
}

View File

@ -1,11 +1,30 @@
html,
body {
font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", Roboto, Oxygen,
Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Helvetica,
Arial, sans-serif;
}
#contents {
display: flex;
flex-direction: column;
min-height: 100vh;
}
.deleted {
background-color: rgb(255, 0, 0, 0.5);
}
.underlined {
border-bottom: 1px solid;
margin-bottom: 20px;
}
.channel-profile > * {
font-size: 1.17em;
font-weight: bold;
vertical-align: middle;
border-radius: 50%;
}
.channel-profile > img {
@ -13,7 +32,7 @@
height: auto;
}
.channel-owner {
body a.channel-owner {
background-color: #008bec;
color: #fff;
border-radius: 9px;
@ -53,6 +72,22 @@
color: rgb(255, 0, 0);
}
.feed-menu {
display: flex;
justify-content: center;
flex-wrap: wrap;
}
.feed-menu-item {
text-align: center;
}
@media screen and (max-width: 640px) {
.feed-menu-item {
flex: 0 0 40%;
}
}
.h-box {
padding-left: 1em;
padding-right: 1em;
@ -78,15 +113,19 @@ div {
padding-right: 10px;
}
body a.pure-button {
color: rgba(0,0,0,.8);
}
button.pure-button-primary,
a.pure-button-primary,
body a.pure-button-primary,
.channel-owner:hover {
background-color: #a0a0a0;
color: rgba(35, 35, 35, 1);
}
button.pure-button-primary:hover,
a.pure-button-primary:hover {
body a.pure-button-primary:hover {
background-color: rgba(0, 182, 240, 1);
color: #fff;
}
@ -103,6 +142,7 @@ img.thumbnail {
height: 100%;
left: 0;
top: 0;
object-fit: cover;
}
.length {
@ -113,7 +153,6 @@ img.thumbnail {
border-radius: 2px;
padding: 2px;
font-size: 16px;
font-family: sans-serif;
right: 0.25em;
bottom: -0.75em;
}
@ -126,7 +165,6 @@ img.thumbnail {
border-radius: 2px;
padding: 4px 8px 4px 8px;
font-size: 16px;
font-family: sans-serif;
left: 0.2em;
top: -0.7em;
}
@ -146,7 +184,7 @@ img.thumbnail {
flex: 1;
}
.navbar > .searchbar {
.searchbar {
flex-grow: 2; /* take double the space of the other items */
}
@ -156,21 +194,29 @@ img.thumbnail {
.navbar .index-link {
font-weight: bold;
display: inline;
}
.navbar > .searchbar .pure-form input[type="search"] {
border-top: 0;
border-left: 0;
border-right: 0;
border-bottom: 1px solid #ccc;
border-radius: 0;
.searchbar .pure-form fieldset { padding: 0; }
padding: initial 0;
.searchbar input[type="search"] {
width: 100%;
margin: 1px;
box-shadow: none;
border: 1px solid;
border-color: rgba(0,0,0,0);
border-bottom-color: #CCC;
border-radius: 0;
transition: 0.1s border-bottom;
-webkit-appearance: none;
box-shadow: none;
-webkit-appearance: none;
}
.searchbar input[type="search"]:focus {
margin: 0 0 0.5px 0;
border: 2px solid;
border-color: rgba(0,0,0,0);
border-bottom-color: #FED;
}
/* https://stackoverflow.com/a/55170420 */
@ -182,15 +228,6 @@ input[type="search"]::-webkit-search-cancel-button {
background-size: 14px;
}
.navbar > .searchbar .pure-form fieldset {
padding: 0;
}
/* attract focus to the searchbar by adding a subtle transition */
.navbar > .searchbar .pure-form input[type="search"]:focus {
border-bottom: 2px solid #aaa;
}
.user-field {
display: flex;
flex-direction: row;
@ -199,7 +236,7 @@ input[type="search"]::-webkit-search-cancel-button {
}
.user-field div {
width: initial;
width: auto;
}
.user-field div:not(:last-child) {
@ -247,21 +284,43 @@ input[type="search"]::-webkit-search-cancel-button {
}
}
/*
* Video "cards" (results/playlist/channel videos)
*/
.video-card-row { margin: 15px 0; }
.flexible { display: flex; }
.flex-left { flex: 1 1 100%; flex-wrap: wrap; }
.flex-right { flex: 1 0 auto; flex-wrap: nowrap; }
p.channel-name { margin: 0; }
p.video-data { margin: 0; font-weight: bold; font-size: 80%; }
/*
* Footer
*/
.footer {
color: #666666;
margin: 2em 0;
footer {
color: #919191;
margin-top: auto;
padding: 1.5em 0;
text-align: center;
max-height: 30vh;
}
.footer a {
color: inherit;
footer a {
color: #919191 !important;
text-decoration: underline;
}
footer span {
margin: 4px 0;
display: block;
}
/* keyframes */
@keyframes spin {
@ -273,157 +332,206 @@ input[type="search"]::-webkit-search-cancel-button {
}
}
/* Control Bar */
@media screen and (max-width: 480px) {
.video-js .vjs-control-bar,
.vjs-menu-button-popup .vjs-menu .vjs-menu-content {
overflow: -webkit-paged-x;
}
}
.vjs-user-inactive {
cursor: none;
}
.video-js .vjs-text-track-display > div > div > div {
background-color: rgba(0, 0, 0, 0.75) !important;
border-radius: 9px !important;
padding: 5px !important;
}
.vjs-play-control,
.vjs-volume-panel,
.vjs-current-time,
.vjs-time-control,
.vjs-duration,
.vjs-progress-control,
.vjs-remaining-time {
order: 1;
}
.vjs-captions-button {
order: 2;
}
.vjs-quality-selector,
.video-js .vjs-http-source-selector {
order: 3;
}
.vjs-playback-rate {
order: 4;
}
.vjs-share-control {
order: 5;
}
.vjs-fullscreen-control {
order: 6;
}
.vjs-control-bar {
display: flex;
flex-direction: row;
}
.video-js .vjs-icon-cog {
font-size: 18px;
}
.video-js .vjs-control-bar,
.vjs-menu-button-popup .vjs-menu .vjs-menu-content {
background-color: rgba(35, 35, 35, 0.75);
}
.vjs-menu li.vjs-menu-item:focus,
.vjs-menu li.vjs-menu-item:hover {
background-color: rgba(255, 255, 255, 0.75);
color: rgba(49, 49, 51, 0.75);
}
.vjs-menu li.vjs-selected,
.vjs-menu li.vjs-selected:focus,
.vjs-menu li.vjs-selected:hover {
background-color: rgba(0, 182, 240, 0.75);
}
/* Progress Bar */
.video-js .vjs-slider {
background-color: rgba(15, 15, 15, 0.5);
}
fieldset > select,
span > select {
color: rgba(49, 49, 51, 1);
}
.video-js .vjs-load-progress,
.video-js .vjs-load-progress div {
background: rgba(87, 87, 88, 1);
}
.video-js .vjs-slider:hover,
.video-js button:hover {
color: rgba(0, 182, 240, 1);
}
.video-js .vjs-play-progress {
background-color: rgba(0, 182, 240, 1);
}
/* Overlay */
.video-js .vjs-overlay {
background-color: rgba(35, 35, 35, 0.75);
color: rgba(255, 255, 255, 1);
}
/* ProgressBar marker */
.vjs-marker {
background-color: rgba(255, 255, 255, 1);
}
/* Big "Play" Button */
.video-js .vjs-big-play-button {
background-color: rgba(35, 35, 35, 0.5);
}
.video-js:hover .vjs-big-play-button {
background-color: rgba(35, 35, 35, 0.75);
}
.video-js .vjs-current-time,
.video-js .vjs-time-divider,
.video-js .vjs-duration {
display: block;
}
.video-js .vjs-time-divider {
min-width: 0px;
padding-left: 0px;
padding-right: 0px;
}
.video-js .vjs-poster {
background-size: cover;
object-fit: cover;
}
.player-dimensions.vjs-fluid {
padding-top: 82vh;
}
video.video-js {
position: absolute;
height: 100%;
}
#player-container {
position: relative;
padding-bottom: 82vh;
height: 0;
}
.pure-control-group label {
word-wrap: normal;
}
/*
* Light theme
*/
.light-theme a:hover,
.light-theme a:active,
.light-theme summary:hover {
color: #075A9E !important;
}
.light-theme a.pure-button-primary:hover {
color: #fff !important;
}
.light-theme a {
color: #335d7a;
text-decoration: none;
}
/* All links that do not fit with the default color goes here */
.light-theme a:not([data-id]) > .icon,
.light-theme .pure-u-lg-1-5 > .h-box > a[href^="/watch?"],
.light-theme .playlist-restricted > ol > li > a {
color: #303030;
}
.light-theme .pure-menu-heading {
color: #565d64;
}
@media (prefers-color-scheme: light) {
.no-theme a:hover,
.no-theme a:active,
.no-theme summary:hover {
color: #075A9E !important;
}
.no-theme a.pure-button-primary:hover {
color: #fff !important;
}
.no-theme a {
color: #335d7a;
text-decoration: none;
}
/* All links that do not fit with the default color goes here */
.no-theme a:not([data-id]) > .icon,
.no-theme .pure-u-lg-1-5 > .h-box > a[href^="/watch?"],
.no-theme .playlist-restricted > ol > li > a {
color: #303030;
}
.light-theme .pure-menu-heading {
color: #565d64;
}
}
/*
* Dark theme
*/
.dark-theme a:hover,
.dark-theme a:active,
.dark-theme summary:hover {
color: rgb(0, 182, 240);
}
.dark-theme a {
color: #a0a0a0;
text-decoration: none;
}
body.dark-theme {
background-color: rgba(35, 35, 35, 1);
color: #f0f0f0;
}
.dark-theme .pure-form legend {
color: #f0f0f0;
}
.dark-theme .pure-menu-heading {
color: #f0f0f0;
}
.dark-theme input,
.dark-theme select,
.dark-theme textarea {
color: rgba(35, 35, 35, 1);
}
.dark-theme .pure-form input[type="file"] {
color: #f0f0f0;
}
.dark-theme .searchbar input {
background-color: inherit;
color: inherit;
}
@media (prefers-color-scheme: dark) {
.no-theme a:hover,
.no-theme a:active {
color: rgb(0, 182, 240);
}
.no-theme a {
color: #a0a0a0;
text-decoration: none;
}
body.no-theme {
background-color: rgba(35, 35, 35, 1);
color: #f0f0f0;
}
.no-theme .pure-form legend {
color: #f0f0f0;
}
.no-theme .pure-menu-heading {
color: #f0f0f0;
}
.no-theme input,
.no-theme select,
.no-theme textarea {
color: rgba(35, 35, 35, 1);
}
.no-theme .pure-form input[type="file"] {
color: #f0f0f0;
}
.no-theme .searchbar input {
background-color: inherit;
color: inherit;
}
}
/*With commit d9528f5 all contents of the page is now within a flexbox. However,
the hr element is rendered improperly within one.
See https://stackoverflow.com/a/34372979 for more info */
hr {
margin: 10px 0 10px 0;
}
/* Description Expansion Styling*/
#descexpansionbutton {
display: none
}
#descexpansionbutton ~ div {
overflow: hidden;
height: 8.3em;
}
#descexpansionbutton:checked ~ div {
overflow: unset;
height: 100%;
}
#descexpansionbutton ~ label {
order: 1;
margin-top: 20px;
}
/* Bidi (bidirectional text) support */
h1,
h2,
h3,
h4,
h5,
p,
#descriptionWrapper,
#description-box {
unicode-bidi: plaintext;
text-align: start;
}
#descriptionWrapper {
max-width: 600px;
white-space: pre-wrap;
}
/* Center the "invidious" logo on the search page */
#logo > h1 { text-align: center; }
/* IE11 fixes */
:-ms-input-placeholder { color: #888; }
/* Wider settings name to less word wrap */
.pure-form-aligned .pure-control-group label { width: 19em; }

26
assets/css/embed.css Normal file
View File

@ -0,0 +1,26 @@
#player {
position: fixed;
right: 0;
bottom: 0;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
z-index: -100;
}
.watch-on-invidious {
font-size: 1.3em !important;
font-weight: bold;
white-space: nowrap;
margin: 0 1em 0 1em !important;
order: 3;
}
.watch-on-invidious > a {
color: white;
}
.watch-on-invidious > a:hover {
color: rgba(0, 182, 240, 1);;
}

16
assets/css/empty.css Normal file
View File

@ -0,0 +1,16 @@
#search-widget {
text-align: center;
margin: 20vh 0 50px 0;
}
#logo > h1 {
font-size: 3.5em;
margin: 0;
padding: 0;
}
@media screen and (max-width: 1500px) and (max-height: 1000px) {
#logo > h1 {
font-size: 10vmin;
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,16 +0,0 @@
a:hover,
a:active {
color: #167ac6 !important;
}
a {
color: #61809b;
text-decoration: none;
}
/* All links that do not fit with the default color goes here */
a:not([data-id]) > .icon,
.pure-u-lg-1-5 > .h-box > a[href^="/watch?"],
.playlist-restricted > ol > li > a {
color: #303030;
}

261
assets/css/player.css Normal file
View File

@ -0,0 +1,261 @@
/* Youtube player style */
.video-js.player-style-youtube .vjs-progress-control {
height: 0;
}
.video-js.player-style-youtube .vjs-progress-control .vjs-progress-holder, .video-js.player-style-youtube .vjs-progress-control {
position: absolute;
right: 0;
left: 0;
width: 100%;
margin: 0;
}
.video-js.player-style-youtube .vjs-control-bar {
background: linear-gradient(rgba(0,0,0,0.1), rgba(0, 0, 0,0.5));
}
.video-js.player-style-youtube .vjs-slider {
background-color: rgba(255,255,255,0.2);
}
.video-js.player-style-youtube .vjs-load-progress > div {
background-color: rgba(255,255,255,0.5);
}
.video-js.player-style-youtube .vjs-play-progress {
background-color: red;
}
.video-js.player-style-youtube .vjs-progress-control:hover .vjs-progress-holder {
font-size: 15px;
}
.video-js.player-style-youtube .vjs-control-bar > .vjs-spacer {
flex: 1;
order: 2;
}
.video-js.player-style-youtube .vjs-play-progress .vjs-time-tooltip {
display: none;
}
.video-js.player-style-youtube .vjs-play-progress::before {
color: red;
font-size: 0.85em;
display: none;
}
.video-js.player-style-youtube .vjs-progress-holder:hover .vjs-play-progress::before {
display: unset;
}
.video-js.player-style-youtube .vjs-control-bar {
display: flex;
flex-direction: row;
}
.video-js.player-style-youtube .vjs-big-play-button {
/*
Styles copied from video-js.min.css, definition of
.vjs-big-play-centered .vjs-big-play-button
*/
top: 50%;
left: 50%;
margin-top: -0.81666em;
margin-left: -1.5em;
}
.video-js.player-style-youtube .vjs-menu-button-popup .vjs-menu {
margin-bottom: 2em;
}
.video-js.player-style-youtube .vjs-progress-control .vjs-progress-holder, .video-js.player-style-youtube .vjs-progress-control {height: 5px;
margin-bottom: 10px;}
ul.vjs-menu-content::-webkit-scrollbar {
display: none;
}
.vjs-user-inactive {
cursor: none;
}
.video-js .vjs-text-track-display > div > div > div {
background-color: rgba(0, 0, 0, 0.75) !important;
border-radius: 9px !important;
padding: 5px !important;
}
.vjs-play-control,
.vjs-volume-panel,
.vjs-current-time,
.vjs-time-control,
.vjs-duration,
.vjs-progress-control,
.vjs-remaining-time {
order: 1;
}
.vjs-captions-button {
order: 2;
}
.vjs-audio-button {
order: 3;
}
.vjs-quality-selector,
.video-js .vjs-http-source-selector {
order: 4;
}
.vjs-playback-rate {
order: 5;
}
.vjs-share-control {
order: 6;
}
.vjs-fullscreen-control {
order: 7;
}
.vjs-playback-rate > .vjs-menu {
width: 50px;
}
.vjs-control-bar {
display: flex;
flex-direction: row;
scrollbar-width: none;
}
.vjs-control-bar::-webkit-scrollbar {
display: none;
}
.video-js .vjs-icon-cog {
font-size: 18px;
}
.video-js .vjs-control-bar,
.vjs-menu-button-popup .vjs-menu .vjs-menu-content {
background-color: rgba(35, 35, 35, 0.75);
}
.vjs-menu li.vjs-menu-item:focus,
.vjs-menu li.vjs-menu-item:hover {
background-color: rgba(255, 255, 255, 0.75);
color: rgba(49, 49, 51, 0.75);
}
.vjs-menu li.vjs-selected,
.vjs-menu li.vjs-selected:focus,
.vjs-menu li.vjs-selected:hover {
background-color: rgba(0, 182, 240, 0.75);
}
/* Progress Bar */
.video-js .vjs-slider {
background-color: rgba(15, 15, 15, 0.5);
}
.video-js .vjs-load-progress,
.video-js .vjs-load-progress div {
background: rgba(87, 87, 88, 1);
}
.video-js .vjs-slider:hover,
.video-js button:hover {
color: rgba(0, 182, 240, 1);
}
.video-js.player-style-invidious .vjs-play-progress {
background-color: rgba(0, 182, 240, 1);
}
vjs-menu-content
/* Overlay */
.video-js .vjs-overlay {
background-color: rgba(35, 35, 35, 0.75);
color: rgba(255, 255, 255, 1);
}
/* ProgressBar marker */
.vjs-marker {
background-color: rgba(255, 255, 255, 1);
z-index: 0;
}
/* Big "Play" Button */
.video-js .vjs-big-play-button {
background-color: rgba(35, 35, 35, 0.5);
}
.video-js:hover .vjs-big-play-button {
background-color: rgba(35, 35, 35, 0.75);
}
.video-js .vjs-current-time,
.video-js .vjs-time-divider,
.video-js .vjs-duration {
display: block;
}
.video-js .vjs-time-divider {
min-width: 0px;
padding-left: 0px;
padding-right: 0px;
}
.video-js .vjs-poster {
background-size: cover;
object-fit: cover;
}
.player-dimensions.vjs-fluid {
padding-top: 82vh;
}
video.video-js {
position: absolute;
height: 100%;
}
#player-container {
position: relative;
padding-left: 0;
padding-right: 0;
margin-left: 1em;
margin-right: 1em;
padding-bottom: 82vh;
height: 0;
}
.mobile-operations-bar {
display: flex;
position: absolute;
top: 0;
right: 1px !important;
left: initial !important;
width: initial !important;
}
.mobile-operations-bar ul {
position: absolute !important;
bottom: unset !important;
top: 1.5em;
}
@media screen and (max-width: 700px) {
.video-js .vjs-share {
justify-content: unset;
}
}
@media screen and (max-width: 650px) {
.vjs-modal-dialog-content {
overflow-x: hidden;
}
}

File diff suppressed because one or more lines are too long

121
assets/css/search.css Normal file
View File

@ -0,0 +1,121 @@
summary {
/* This should hide the marker */
display: block;
font-size: 1.17em;
font-weight: bold;
margin: 0 auto 10px auto;
cursor: pointer;
}
summary::-webkit-details-marker,
summary::marker { display: none; }
summary:before {
border-radius: 5px;
content: "[ + ]";
margin: -2px 10px 0 10px;
padding: 1px 0 3px 0;
text-align: center;
width: 40px;
}
details[open] > summary:before { content: "[ ]"; }
#filters-box {
padding: 10px 20px 20px 10px;
margin: 10px 15px;
}
#filters-flex {
display: flex;
flex-wrap: wrap;
flex-direction: row;
align-items: flex-start;
align-content: flex-start;
justify-content: flex-start;
}
fieldset, legend {
display: contents !important;
border: none !important;
margin: 0 !important;
padding: 0 !important;
}
.filter-column {
display: inline-block;
display: inline-flex;
width: max-content;
min-width: max-content;
max-width: 16em;
margin: 15px;
flex-grow: 2;
flex-basis: auto;
flex-direction: column;
}
.filter-name, .filter-options {
display: block;
padding: 5px 10px;
margin: 0;
text-align: start;
}
.filter-options div { margin: 6px 0; }
.filter-options div * { vertical-align: middle; }
.filter-options label { margin: 0 10px; }
#filters-apply {
text-align: right; /* IE11 only */
text-align: end; /* Override for compatible browsers */
}
/* Error message */
.no-results-error {
text-align: center;
line-height: 180%;
font-size: 110%;
padding: 15px 15px 125px 15px;
}
/* Responsive rules */
@media only screen and (max-width: 800px) {
summary { font-size: 1.30em; }
#filters-box {
margin: 10px 0 0 0;
padding: 0;
}
#filters-apply {
text-align: center;
padding: 15px;
}
}
/* Light theme */
.light-theme #filters-box {
background: #dfdfdf;
}
@media (prefers-color-scheme: light) {
.no-theme #filters-box {
background: #dfdfdf;
}
}
/* Dark theme */
.dark-theme #filters-box {
background: #373737;
}
@media (prefers-color-scheme: dark) {
.no-theme #filters-box {
background: #373737;
}
}

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
/**
* videojs-http-source-selector
* @version 1.1.5
* @copyright 2019 Justin Fujita <Justin@pivotshare.com>
* @license MIT
*/
.video-js.vjs-http-source-selector{display:block}

View File

@ -1 +0,0 @@
.video-js .vjs-overlay{color:#fff;position:absolute;text-align:center}.video-js .vjs-overlay-no-background{max-width:33%}.video-js .vjs-overlay-background{background-color:#646464;background-color:rgba(255,255,255,0.4);border-radius:3px;padding:10px;width:33%}.video-js .vjs-overlay-top-left{top:5px;left:5px}.video-js .vjs-overlay-top{left:50%;margin-left:-16.5%;top:5px}.video-js .vjs-overlay-top-right{right:5px;top:5px}.video-js .vjs-overlay-right{right:5px;top:50%;transform:translateY(-50%)}.video-js .vjs-overlay-bottom-right{bottom:3.5em;right:5px}.video-js .vjs-overlay-bottom{bottom:3.5em;left:50%;margin-left:-16.5%}.video-js .vjs-overlay-bottom-left{bottom:3.5em;left:5px}.video-js .vjs-overlay-left{left:5px;top:50%;transform:translateY(-50%)}.video-js .vjs-overlay-center{left:50%;margin-left:-16.5%;top:50%;transform:translateY(-50%)}.video-js .vjs-no-flex .vjs-overlay-left,.video-js .vjs-no-flex .vjs-overlay-center,.video-js .vjs-no-flex .vjs-overlay-right{margin-top:-15px}

View File

@ -1,7 +0,0 @@
/**
* videojs-share
* @version 3.0.0
* @copyright 2019 Mikhail Khazov <mkhazov.work@gmail.com>
* @license MIT
*/
.video-js.vjs-videojs-share_open .vjs-modal-dialog .vjs-modal-dialog-content{display:flex;align-items:center;padding:0;background-image:linear-gradient(to bottom, rgba(0,0,0,0.77), rgba(0,0,0,0.75))}.video-js.vjs-videojs-share_open .vjs-modal-dialog .vjs-close-button{position:absolute;right:0;top:5px;width:30px;height:30px;color:#fff;cursor:pointer;opacity:0.9;transition:opacity 0.25s ease-out}.video-js.vjs-videojs-share_open .vjs-modal-dialog .vjs-close-button:before{content:'×';font-size:20px;line-height:15px}.video-js.vjs-videojs-share_open .vjs-modal-dialog .vjs-close-button:hover{opacity:1}.video-js .vjs-share{display:flex;flex-direction:column;justify-content:space-around;align-items:center;width:100%;height:100%;max-height:400px}.video-js .vjs-share__top,.video-js .vjs-share__middle,.video-js .vjs-share__bottom{display:flex}.video-js .vjs-share__top,.video-js .vjs-share__middle{flex-direction:column;justify-content:space-between}.video-js .vjs-share__middle{padding:0 25px}.video-js .vjs-share__title{align-self:center;font-size:22px;color:#fff}.video-js .vjs-share__subtitle{width:100%;margin:0 auto 12px;font-size:16px;color:#fff;opacity:0.7}.video-js .vjs-share__short-link-wrapper{position:relative;display:block;width:100%;height:40px;margin:0 auto;margin-bottom:15px;border:0;color:rgba(255,255,255,0.65);background-color:#363636;outline:none;overflow:hidden;flex-shrink:0}.video-js .vjs-share__short-link{display:block;width:100%;height:100%;padding:0 40px 0 15px;border:0;color:rgba(255,255,255,0.65);background-color:#363636;outline:none}.video-js .vjs-share__btn{position:absolute;right:0;bottom:0;height:40px;width:40px;display:flex;align-items:center;padding:0 11px;border:0;color:#fff;background-color:#2e2e2e;background-size:18px 19px;background-position:center;background-repeat:no-repeat;cursor:pointer;outline:none;transition:width 0.3s ease-out, padding 0.3s ease-out}.video-js .vjs-share__btn svg{flex-shrink:0}.video-js .vjs-share__btn span{position:relative;padding-left:10px;opacity:0;transition:opacity 0.3s ease-out}.video-js .vjs-share__btn:hover{justify-content:center;width:100%;padding:0 40px;background-image:none}.video-js .vjs-share__btn:hover span{opacity:1}.video-js .vjs-share__socials{display:flex;flex-wrap:wrap;justify-content:center;align-content:flex-start;transition:width 0.3s ease-out, height 0.3s ease-out}.video-js .vjs-share__social{display:flex;justify-content:center;align-items:center;flex-shrink:0;width:32px;height:32px;margin-right:6px;margin-bottom:6px;cursor:pointer;font-size:8px;transition:transform 0.3s ease-out, filter 0.2s ease-out;border:none;outline:none}.video-js .vjs-share__social:hover{filter:brightness(115%)}.video-js .vjs-share__social svg{overflow:visible;max-height:24px}.video-js .vjs-share__social_vk{background-color:#5d7294}.video-js .vjs-share__social_ok{background-color:#ed7c20}.video-js .vjs-share__social_mail,.video-js .vjs-share__social_email{background-color:#134785}.video-js .vjs-share__social_tw{background-color:#76aaeb}.video-js .vjs-share__social_reddit{background-color:#ff4500}.video-js .vjs-share__social_fbFeed{background-color:#475995}.video-js .vjs-share__social_messenger{background-color:#0084ff}.video-js .vjs-share__social_gp{background-color:#d53f35}.video-js .vjs-share__social_linkedin{background-color:#0077b5}.video-js .vjs-share__social_viber{background-color:#766db5}.video-js .vjs-share__social_telegram{background-color:#4bb0e2}.video-js .vjs-share__social_whatsapp{background-color:#78c870}.video-js .vjs-share__bottom{justify-content:center}@media (max-height: 220px){.video-js .vjs-share .hidden-xs{display:none}}@media (max-height: 350px){.video-js .vjs-share .hidden-sm{display:none}}@media (min-height: 400px){.video-js .vjs-share__title{margin-bottom:15px}.video-js .vjs-share__short-link-wrapper{margin-bottom:30px}}@media (min-width: 320px){.video-js.vjs-videojs-share_open .vjs-modal-dialog .vjs-close-button{right:5px;top:10px}}@media (min-width: 660px){.video-js.vjs-videojs-share_open .vjs-modal-dialog .vjs-close-button{right:20px;top:20px}.video-js .vjs-share__social{width:40px;height:40px}}

View File

@ -1,7 +0,0 @@
/**
* videojs-vtt-thumbnails
* @version 0.0.13
* @copyright 2019 Chris Boustead <chris@forgemotion.com>
* @license MIT
*/
.video-js.vjs-vtt-thumbnails{display:block}.video-js .vjs-vtt-thumbnail-display{position:absolute;bottom:85%;pointer-events:none;box-shadow:0 0 7px rgba(0,0,0,0.6)}

View File

@ -1 +0,0 @@
.vjs-marker{position:absolute;left:0;bottom:0;opacity:1;height:100%;transition:opacity .2s ease;-webkit-transition:opacity .2s ease;-moz-transition:opacity .2s ease;z-index:100}.vjs-marker:hover{cursor:pointer;-webkit-transform:scale(1.3,1.3);-moz-transform:scale(1.3,1.3);-o-transform:scale(1.3,1.3);-ms-transform:scale(1.3,1.3);transform:scale(1.3,1.3)}.vjs-tip{visibility:hidden;display:block;opacity:.8;padding:5px;font-size:10px;position:absolute;bottom:14px;z-index:100000}.vjs-tip .vjs-tip-arrow{background:url(data:image/gif;base64,R0lGODlhCQAJAIABAAAAAAAAACH5BAEAAAEALAAAAAAJAAkAAAIRjAOnwIrcDJxvwkplPtchVQAAOw==) no-repeat top left;bottom:0;left:50%;margin-left:-4px;background-position:bottom left;position:absolute;width:9px;height:5px}.vjs-tip .vjs-tip-inner{border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;padding:5px 8px 4px 8px;background-color:#000;color:#fff;max-width:200px;text-align:center}.vjs-break-overlay{visibility:hidden;position:absolute;z-index:100000;top:0}.vjs-break-overlay .vjs-break-overlay-text{padding:9px;text-align:center}

Binary file not shown.

View File

@ -1,13 +1,13 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<!--
2018-6-14: Created with FontForge (http://fontforge.org)
2019-5-24: Created with FontForge (http://fontforge.org)
-->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
<metadata>
Created by FontForge 20160407 at Thu Jun 14 08:50:34 2018
Created by FontForge 20160407 at Fri May 24 15:45:40 2019
By Adam Bradley
Copyright (c) 2018, Adam Bradley
Copyright (c) 2019, Adam Bradley
</metadata>
<defs>
<font id="Ionicons" horiz-adv-x="416" >

Before

Width:  |  Height:  |  Size: 305 KiB

After

Width:  |  Height:  |  Size: 305 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="512pt" height="512pt" version="1.0" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><g><rect x="-.0072516" y=".00056299" width="512.01" height="512.02" fill="#575757" stroke-width=".063019"/><path d="m247.17 455.95c-19.792-0.78921-38.719-4.2564-57.154-10.47-60.968-20.55-108.68-68.579-127-127.86-7.8955-25.538-10.062-53.943-6.2586-82.067 3.7105-27.439 13.603-53.515 29.342-77.344 12.069-18.273 29.138-36.277 47.228-49.816 36.891-27.61 85.944-42.49 132.38-40.157 25.88 1.3001 49.939 6.765 73.106 16.606 8.1948 3.481 20.024 9.6845 27.696 14.525 14.15 8.9272 22.367 15.498 34.482 27.573 13.254 13.211 22.128 24.276 30.398 37.906 7.2081 11.879 14.099 27.15 18.229 40.397 1.5996 5.1305 4.442 16.456 5.6852 22.653 2.3908 11.917 2.6998 15.722 2.7049 33.312 6e-3 18.515-0.46256 24.413-2.9166 36.758-9.3274 46.92-35.58 88.167-74.872 117.64-22.814 17.112-50.027 29.535-78.547 35.858-16.714 3.7059-35.421 5.2453-54.498 4.4846zm-35.1-78.786c-5.3e-4 -0.52647-0.0741-2.0564-0.16311-3.3999l-0.16178-2.4427-4.7018-0.26271c-4.0477-0.22614-4.7968-0.33363-5.3847-0.77253-2.0235-1.5108-1.4679-6.0695 2.2494-18.457 0.8637-2.8781 3.3371-11.321 5.4966-18.762 2.1594-7.4409 5.2002-17.836 6.7573-23.101 1.5571-5.2648 4.1948-14.282 5.8615-20.038 1.6667-5.7562 3.6145-12.4 4.3284-14.764 0.71391-2.3641 3.2583-11.037 5.6542-19.272 4.9475-17.007 8.1626-27.723 8.9438-29.811 0.51852-1.3858 0.54785-1.4139 0.99761-0.95317 0.25486 0.26106 3.8462 7.3667 7.9807 15.79 4.1345 8.4236 13.089 26.573 19.898 40.331 17.188 34.73 37.849 76.578 43.261 87.622l4.5356 9.257 11.359-0.0895c6.2475-0.0492 11.615-0.19623 11.929-0.32672 0.5614-0.23385 0.54167-0.2959-1.3723-4.3176-1.068-2.2442-8.1436-16.601-15.724-31.904-48.687-98.293-61.22-123.86-67.889-138.48-4.7022-10.309-6.9031-14.807-7.7139-15.762-0.82931-0.97742-1.6319-1.0638-2.3704-0.25525-1.1993 1.313-4.1046 10.063-9.3869 28.27-2.0569 7.0899-6.5372 22.425-9.9562 34.077-6.6396 22.629-8.5182 29.037-14.33 48.883-2.0354 6.9495-4.7977 16.369-6.1385 20.931-1.3408 4.5628-4.033 13.81-5.9826 20.549-4.304 14.877-6.136 20.889-7.3886 24.25-2.1371 5.7334-2.5723 6.3292-4.9216 6.7384-0.88855 0.15472-2.4102 0.28196-3.3815 0.28275-2.1993 3e-3 -3.5494 0.36339-4.0558 1.0863-0.42176 0.60215-0.56421 4.8802-0.18251 5.4812 0.20573 0.32388 2.4672 0.37414 23.34 0.51873l8.6151 0.0597-7e-4 -0.95723zm36.751-205.59c4.3282-0.92335 8.4607-4.943 9.4374-9.1796 0.36569-1.5862 0.32543-4.9758-0.077-6.4799-0.85108-3.1813-3.2688-6.291-6.039-7.7675-3.8111-2.0313-9.456-2.0295-13.272 5e-3 -5.9828 3.1888-8.1556 11.089-4.7878 17.408 2.6995 5.0648 8.3611 7.3754 14.738 6.015z" fill="#f0f0f0" stroke-width=".025526"/></g><g transform="matrix(.069892 0 0 -.069892 44.236 474.48)"><path d="m2787 4669c-124-65-123-255 3-319 86-44 196-16 247 62 58 87 26 211-67 258-51 26-132 26-183-1z" fill="#00b6f0" stroke="#00b6f0" stroke-width="4.25"/><path d="m2882 4108c-12-16-63-166-102-303-30-104-101-350-165-565-20-69-58-199-85-290-26-91-64-221-85-290-20-69-58-199-85-290-26-91-64-221-85-290-20-69-57-195-81-280-59-207-93-299-115-310-10-6-35-10-56-10-73 0-84-8-81-54l3-41 228-3 228-2-3 47-3 48-73 3c-66 3-74 5-84 27-13 28 0 104 37 225 13 41 47 156 75 255s66 230 85 290c18 61 56 191 85 290 28 99 66 230 85 290 18 61 56 191 85 290 85 297 123 419 131 429 5 5 17-11 28-35 10-24 192-393 403-819s447-902 523-1058l139-282h168c92 0 168 4 168 8s-75 158-166 342c-588 1183-969 1958-1033 2100-29 63-69 151-89 195-44 95-58 110-80 83z" fill="#575757"/></g></svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

249
assets/js/_helpers.js Normal file
View File

@ -0,0 +1,249 @@
'use strict';
// Contains only auxiliary methods
// May be included and executed unlimited number of times without any consequences
// Polyfills for IE11
Array.prototype.find = Array.prototype.find || function (condition) {
return this.filter(condition)[0];
};
Array.from = Array.from || function (source) {
return Array.prototype.slice.call(source);
};
NodeList.prototype.forEach = NodeList.prototype.forEach || function (callback) {
Array.from(this).forEach(callback);
};
String.prototype.includes = String.prototype.includes || function (searchString) {
return this.indexOf(searchString) >= 0;
};
String.prototype.startsWith = String.prototype.startsWith || function (prefix) {
return this.substr(0, prefix.length) === prefix;
};
Math.sign = Math.sign || function(x) {
x = +x;
if (!x) return x; // 0 and NaN
return x > 0 ? 1 : -1;
};
if (!window.hasOwnProperty('HTMLDetailsElement') && !window.hasOwnProperty('mockHTMLDetailsElement')) {
window.mockHTMLDetailsElement = true;
const style = 'details:not([open]) > :not(summary) {display: none}';
document.head.appendChild(document.createElement('style')).textContent = style;
addEventListener('click', function (e) {
if (e.target.nodeName !== 'SUMMARY') return;
const details = e.target.parentElement;
if (details.hasAttribute('open'))
details.removeAttribute('open');
else
details.setAttribute('open', '');
});
}
// Monstrous global variable for handy code
// Includes: clamp, xhr, storage.{get,set,remove}
window.helpers = window.helpers || {
/**
* https://en.wikipedia.org/wiki/Clamping_(graphics)
* @param {Number} num Source number
* @param {Number} min Low border
* @param {Number} max High border
* @returns {Number} Clamped value
*/
clamp: function (num, min, max) {
if (max < min) {
var t = max; max = min; min = t; // swap max and min
}
if (max < num)
return max;
if (min > num)
return min;
return num;
},
/** @private */
_xhr: function (method, url, options, callbacks) {
const xhr = new XMLHttpRequest();
xhr.open(method, url);
// Default options
xhr.responseType = 'json';
xhr.timeout = 10000;
// Default options redefining
if (options.responseType)
xhr.responseType = options.responseType;
if (options.timeout)
xhr.timeout = options.timeout;
if (method === 'POST')
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
// better than onreadystatechange because of 404 codes https://stackoverflow.com/a/36182963
xhr.onloadend = function () {
if (xhr.status === 200) {
if (callbacks.on200) {
// fix for IE11. It doesn't convert response to JSON
if (xhr.responseType === '' && typeof(xhr.response) === 'string')
callbacks.on200(JSON.parse(xhr.response));
else
callbacks.on200(xhr.response);
}
} else {
// handled by onerror
if (xhr.status === 0) return;
if (callbacks.onNon200)
callbacks.onNon200(xhr);
}
};
xhr.ontimeout = function () {
if (callbacks.onTimeout)
callbacks.onTimeout(xhr);
};
xhr.onerror = function () {
if (callbacks.onError)
callbacks.onError(xhr);
};
if (options.payload)
xhr.send(options.payload);
else
xhr.send();
},
/** @private */
_xhrRetry: function(method, url, options, callbacks) {
if (options.retries <= 0) {
console.warn('Failed to pull', options.entity_name);
if (callbacks.onTotalFail)
callbacks.onTotalFail();
return;
}
helpers._xhr(method, url, options, callbacks);
},
/**
* @callback callbackXhrOn200
* @param {Object} response - xhr.response
*/
/**
* @callback callbackXhrError
* @param {XMLHttpRequest} xhr
*/
/**
* @param {'GET'|'POST'} method - 'GET' or 'POST'
* @param {String} url - URL to send request to
* @param {Object} options - other XHR options
* @param {XMLHttpRequestBodyInit} [options.payload=null] - payload for POST-requests
* @param {'arraybuffer'|'blob'|'document'|'json'|'text'} [options.responseType=json]
* @param {Number} [options.timeout=10000]
* @param {Number} [options.retries=1]
* @param {String} [options.entity_name='unknown'] - string to log
* @param {Number} [options.retry_timeout=1000]
* @param {Object} callbacks - functions to execute on events fired
* @param {callbackXhrOn200} [callbacks.on200]
* @param {callbackXhrError} [callbacks.onNon200]
* @param {callbackXhrError} [callbacks.onTimeout]
* @param {callbackXhrError} [callbacks.onError]
* @param {callbackXhrError} [callbacks.onTotalFail] - if failed after all retries
*/
xhr: function(method, url, options, callbacks) {
if (!options.retries || options.retries <= 1) {
helpers._xhr(method, url, options, callbacks);
return;
}
if (!options.entity_name) options.entity_name = 'unknown';
if (!options.retry_timeout) options.retry_timeout = 1000;
const retries_total = options.retries;
let currentTry = 1;
const retry = function () {
console.warn('Pulling ' + options.entity_name + ' failed... ' + (currentTry++) + '/' + retries_total);
setTimeout(function () {
options.retries--;
helpers._xhrRetry(method, url, options, callbacks);
}, options.retry_timeout);
};
// Pack retry() call into error handlers
callbacks._onError = callbacks.onError;
callbacks.onError = function (xhr) {
if (callbacks._onError)
callbacks._onError(xhr);
retry();
};
callbacks._onTimeout = callbacks.onTimeout;
callbacks.onTimeout = function (xhr) {
if (callbacks._onTimeout)
callbacks._onTimeout(xhr);
retry();
};
helpers._xhrRetry(method, url, options, callbacks);
},
/**
* @typedef {Object} invidiousStorage
* @property {(key:String) => Object} get
* @property {(key:String, value:Object)} set
* @property {(key:String)} remove
*/
/**
* Universal storage, stores and returns JS objects. Uses inside localStorage or cookies
* @type {invidiousStorage}
*/
storage: (function () {
// access to localStorage throws exception in Tor Browser, so try is needed
let localStorageIsUsable = false;
try{localStorageIsUsable = !!localStorage.setItem;}catch(e){}
if (localStorageIsUsable) {
return {
get: function (key) {
if (!localStorage[key]) return;
try {
return JSON.parse(decodeURIComponent(localStorage[key]));
} catch(e) {
// Erase non parsable value
helpers.storage.remove(key);
}
},
set: function (key, value) { localStorage[key] = encodeURIComponent(JSON.stringify(value)); },
remove: function (key) { localStorage.removeItem(key); }
};
}
// TODO: fire 'storage' event for cookies
console.info('Storage: localStorage is disabled or unaccessible. Cookies used as fallback');
return {
get: function (key) {
const cookiePrefix = key + '=';
function findCallback(cookie) {return cookie.startsWith(cookiePrefix);}
const matchedCookie = document.cookie.split('; ').find(findCallback);
if (matchedCookie) {
const cookieBody = matchedCookie.replace(cookiePrefix, '');
if (cookieBody.length === 0) return;
try {
return JSON.parse(decodeURIComponent(cookieBody));
} catch(e) {
// Erase non parsable value
helpers.storage.remove(key);
}
}
},
set: function (key, value) {
const cookie_data = encodeURIComponent(JSON.stringify(value));
// Set expiration in 2 year
const date = new Date();
date.setFullYear(date.getFullYear()+2);
document.cookie = key + '=' + cookie_data + '; expires=' + date.toGMTString();
},
remove: function (key) {
document.cookie = key + '=; Max-Age=0';
}
};
})()
};

View File

@ -1,17 +1,13 @@
String.prototype.supplant = function (o) {
return this.replace(/{([^{}]*)}/g, function (a, b) {
var r = o[b];
return typeof r === 'string' || typeof r === 'number' ? r : a;
});
}
'use strict';
var community_data = JSON.parse(document.getElementById('community_data').textContent);
function hide_youtube_replies(event) {
var target = event.target;
sub_text = target.getAttribute('data-inner-text');
inner_text = target.getAttribute('data-sub-text');
var sub_text = target.getAttribute('data-inner-text');
var inner_text = target.getAttribute('data-sub-text');
body = target.parentNode.parentNode.children[1];
var body = target.parentNode.parentNode.children[1];
body.style.display = 'none';
target.innerHTML = sub_text;
@ -23,10 +19,10 @@ function hide_youtube_replies(event) {
function show_youtube_replies(event) {
var target = event.target;
sub_text = target.getAttribute('data-inner-text');
inner_text = target.getAttribute('data-sub-text');
var sub_text = target.getAttribute('data-inner-text');
var inner_text = target.getAttribute('data-sub-text');
body = target.parentNode.parentNode.children[1];
var body = target.parentNode.parentNode.children[1];
body.style.display = '';
target.innerHTML = sub_text;
@ -35,13 +31,6 @@ function show_youtube_replies(event) {
target.setAttribute('data-sub-text', sub_text);
}
function number_with_separator(val) {
while (/(\d+)(\d{3})/.test(val.toString())) {
val = val.toString().replace(/(\d+)(\d{3})/, '$1' + ',' + '$2');
}
return val;
}
function get_youtube_replies(target, load_more) {
var continuation = target.getAttribute('data-continuation');
@ -55,47 +44,39 @@ function get_youtube_replies(target, load_more) {
'&hl=' + community_data.preferences.locale +
'&thin_mode=' + community_data.preferences.thin_mode +
'&continuation=' + continuation;
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 10000;
xhr.open('GET', url, true);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
if (load_more) {
body = body.parentNode.parentNode;
body.removeChild(body.lastElementChild);
body.innerHTML += xhr.response.contentHtml;
} else {
body.removeChild(body.lastElementChild);
var p = document.createElement('p');
var a = document.createElement('a');
p.appendChild(a);
a.href = 'javascript:void(0)';
a.onclick = hide_youtube_replies;
a.setAttribute('data-sub-text', community_data.hide_replies_text);
a.setAttribute('data-inner-text', community_data.show_replies_text);
a.innerText = community_data.hide_replies_text;
var div = document.createElement('div');
div.innerHTML = xhr.response.contentHtml;
body.appendChild(p);
body.appendChild(div);
}
helpers.xhr('GET', url, {}, {
on200: function (response) {
if (load_more) {
body = body.parentNode.parentNode;
body.removeChild(body.lastElementChild);
body.innerHTML += response.contentHtml;
} else {
body.innerHTML = fallback;
body.removeChild(body.lastElementChild);
var p = document.createElement('p');
var a = document.createElement('a');
p.appendChild(a);
a.href = 'javascript:void(0)';
a.onclick = hide_youtube_replies;
a.setAttribute('data-sub-text', community_data.hide_replies_text);
a.setAttribute('data-inner-text', community_data.show_replies_text);
a.textContent = community_data.hide_replies_text;
var div = document.createElement('div');
div.innerHTML = response.contentHtml;
body.appendChild(p);
body.appendChild(div);
}
},
onNon200: function (xhr) {
body.innerHTML = fallback;
},
onTimeout: function (xhr) {
console.warn('Pulling comments failed');
body.innerHTML = fallback;
}
}
xhr.ontimeout = function () {
console.log('Pulling comments failed.');
body.innerHTML = fallback;
}
xhr.send();
});
}

View File

@ -1,94 +1,64 @@
function get_playlist(plid, retries = 5) {
if (retries <= 0) {
console.log('Failed to pull playlist');
return;
}
'use strict';
var video_data = JSON.parse(document.getElementById('video_data').textContent);
function get_playlist(plid) {
var plid_url;
if (plid.startsWith('RD')) {
var plid_url = '/api/v1/mixes/' + plid +
plid_url = '/api/v1/mixes/' + plid +
'?continuation=' + video_data.id +
'&format=html&hl=' + video_data.preferences.locale;
} else {
var plid_url = '/api/v1/playlists/' + plid +
'?continuation=' + video_data.id +
plid_url = '/api/v1/playlists/' + plid +
'?index=' + video_data.index +
'&continuation' + video_data.id +
'&format=html&hl=' + video_data.preferences.locale;
}
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 10000;
xhr.open('GET', plid_url, true);
helpers.xhr('GET', plid_url, {retries: 5, entity_name: 'playlist'}, {
on200: function (response) {
if (!response.nextVideo)
return;
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
if (xhr.response.nextVideo) {
player.on('ended', function () {
var url = new URL('https://example.com/embed/' + xhr.response.nextVideo);
player.on('ended', function () {
var url = new URL('https://example.com/embed/' + response.nextVideo);
if (video_data.params.autoplay || video_data.params.continue_autoplay) {
url.searchParams.set('autoplay', '1');
}
url.searchParams.set('list', plid);
if (!plid.startsWith('RD'))
url.searchParams.set('index', response.index);
if (video_data.params.autoplay || video_data.params.continue_autoplay)
url.searchParams.set('autoplay', '1');
if (video_data.params.listen !== video_data.preferences.listen)
url.searchParams.set('listen', video_data.params.listen);
if (video_data.params.speed !== video_data.preferences.speed)
url.searchParams.set('speed', video_data.params.speed);
if (video_data.params.local !== video_data.preferences.local)
url.searchParams.set('local', video_data.params.local);
if (video_data.params.listen !== video_data.preferences.listen) {
url.searchParams.set('listen', video_data.params.listen);
}
if (video_data.params.speed !== video_data.preferences.speed) {
url.searchParams.set('speed', video_data.params.speed);
}
if (video_data.params.local !== video_data.preferences.local) {
url.searchParams.set('local', video_data.params.local);
}
url.searchParams.set('list', plid);
location.assign(url.pathname + url.search);
});
}
}
location.assign(url.pathname + url.search);
});
}
}
xhr.onerror = function () {
console.log('Pulling playlist failed... ' + retries + '/5');
setTimeout(function () { get_playlist(plid, retries - 1) }, 1000);
}
xhr.ontimeout = function () {
console.log('Pulling playlist failed... ' + retries + '/5');
get_playlist(plid, retries - 1);
}
xhr.send();
}
if (video_data.plid) {
get_playlist(video_data.plid);
} else if (video_data.video_series) {
player.on('ended', function () {
var url = new URL('https://example.com/embed/' + video_data.video_series.shift());
if (video_data.params.autoplay || video_data.params.continue_autoplay) {
url.searchParams.set('autoplay', '1');
}
if (video_data.params.listen !== video_data.preferences.listen) {
url.searchParams.set('listen', video_data.params.listen);
}
if (video_data.params.speed !== video_data.preferences.speed) {
url.searchParams.set('speed', video_data.params.speed);
}
if (video_data.params.local !== video_data.preferences.local) {
url.searchParams.set('local', video_data.params.local);
}
if (video_data.video_series.length !== 0) {
url.searchParams.set('playlist', video_data.video_series.join(','))
}
location.assign(url.pathname + url.search);
});
}
addEventListener('load', function (e) {
if (video_data.plid) {
get_playlist(video_data.plid);
} else if (video_data.video_series) {
player.on('ended', function () {
var url = new URL('https://example.com/embed/' + video_data.video_series.shift());
if (video_data.params.autoplay || video_data.params.continue_autoplay)
url.searchParams.set('autoplay', '1');
if (video_data.params.listen !== video_data.preferences.listen)
url.searchParams.set('listen', video_data.params.listen);
if (video_data.params.speed !== video_data.preferences.speed)
url.searchParams.set('speed', video_data.params.speed);
if (video_data.params.local !== video_data.preferences.local)
url.searchParams.set('local', video_data.params.local);
if (video_data.video_series.length !== 0)
url.searchParams.set('playlist', video_data.video_series.join(','));
location.assign(url.pathname + url.search);
});
}
});

149
assets/js/handlers.js Normal file
View File

@ -0,0 +1,149 @@
'use strict';
(function () {
var video_player = document.getElementById('player_html5_api');
if (video_player) {
video_player.onmouseenter = function () { video_player['data-title'] = video_player['title']; video_player['title'] = ''; };
video_player.onmouseleave = function () { video_player['title'] = video_player['data-title']; video_player['data-title'] = ''; };
video_player.oncontextmenu = function () { video_player['title'] = video_player['data-title']; };
}
// For dynamically inserted elements
addEventListener('click', function (e) {
if (!e || !e.target) return;
var t = e.target;
var handler_name = t.getAttribute('data-onclick');
switch (handler_name) {
case 'jump_to_time':
e.preventDefault();
var time = t.getAttribute('data-jump-time');
player.currentTime(time);
break;
case 'get_youtube_replies':
var load_more = t.getAttribute('data-load-more') !== null;
var load_replies = t.getAttribute('data-load-replies') !== null;
get_youtube_replies(t, load_more, load_replies);
break;
case 'toggle_parent':
e.preventDefault();
toggle_parent(t);
break;
default:
break;
}
});
document.querySelectorAll('[data-mouse="switch_classes"]').forEach(function (el) {
var classes = el.getAttribute('data-switch-classes').split(',');
var classOnEnter = classes[0];
var classOnLeave = classes[1];
function toggle_classes(toAdd, toRemove) {
el.classList.add(toAdd);
el.classList.remove(toRemove);
}
el.onmouseenter = function () { toggle_classes(classOnEnter, classOnLeave); };
el.onmouseleave = function () { toggle_classes(classOnLeave, classOnEnter); };
});
document.querySelectorAll('[data-onsubmit="return_false"]').forEach(function (el) {
el.onsubmit = function () { return false; };
});
document.querySelectorAll('[data-onclick="mark_watched"]').forEach(function (el) {
el.onclick = function () { mark_watched(el); };
});
document.querySelectorAll('[data-onclick="mark_unwatched"]').forEach(function (el) {
el.onclick = function () { mark_unwatched(el); };
});
document.querySelectorAll('[data-onclick="add_playlist_video"]').forEach(function (el) {
el.onclick = function () { add_playlist_video(el); };
});
document.querySelectorAll('[data-onclick="add_playlist_item"]').forEach(function (el) {
el.onclick = function () { add_playlist_item(el); };
});
document.querySelectorAll('[data-onclick="remove_playlist_item"]').forEach(function (el) {
el.onclick = function () { remove_playlist_item(el); };
});
document.querySelectorAll('[data-onclick="revoke_token"]').forEach(function (el) {
el.onclick = function () { revoke_token(el); };
});
document.querySelectorAll('[data-onclick="remove_subscription"]').forEach(function (el) {
el.onclick = function () { remove_subscription(el); };
});
document.querySelectorAll('[data-onclick="notification_requestPermission"]').forEach(function (el) {
el.onclick = function () { Notification.requestPermission(); };
});
document.querySelectorAll('[data-onrange="update_volume_value"]').forEach(function (el) {
function update_volume_value() {
document.getElementById('volume-value').textContent = el.value;
}
el.oninput = update_volume_value;
el.onchange = update_volume_value;
});
function revoke_token(target) {
var row = target.parentNode.parentNode.parentNode.parentNode.parentNode;
row.style.display = 'none';
var count = document.getElementById('count');
count.textContent--;
var url = '/token_ajax?action_revoke_token=1&redirect=false' +
'&referer=' + encodeURIComponent(location.href) +
'&session=' + target.getAttribute('data-session');
var payload = 'csrf_token=' + target.parentNode.querySelector('input[name="csrf_token"]').value;
helpers.xhr('POST', url, {payload: payload}, {
onNon200: function (xhr) {
count.textContent++;
row.style.display = '';
}
});
}
function remove_subscription(target) {
var row = target.parentNode.parentNode.parentNode.parentNode.parentNode;
row.style.display = 'none';
var count = document.getElementById('count');
count.textContent--;
var url = '/subscription_ajax?action_remove_subscriptions=1&redirect=false' +
'&referer=' + encodeURIComponent(location.href) +
'&c=' + target.getAttribute('data-ucid');
var payload = 'csrf_token=' + target.parentNode.querySelector('input[name="csrf_token"]').value;
helpers.xhr('POST', url, {payload: payload}, {
onNon200: function (xhr) {
count.textContent++;
row.style.display = '';
}
});
}
// Handle keypresses
addEventListener('keydown', function (event) {
// Ignore modifier keys
if (event.ctrlKey || event.metaKey) return;
// Ignore shortcuts if any text input is focused
let focused_tag = document.activeElement.tagName.toLowerCase();
const allowed = /^(button|checkbox|file|radio|submit)$/;
if (focused_tag === 'textarea') return;
if (focused_tag === 'input') {
let focused_type = document.activeElement.type.toLowerCase();
if (!focused_type.match(allowed)) return;
}
// Focus search bar on '/'
if (event.key === '/') {
document.getElementById('searchbox').focus();
event.preventDefault();
}
});
})();

View File

@ -1,42 +1,30 @@
'use strict';
var notification_data = JSON.parse(document.getElementById('notification_data').textContent);
/** Boolean meaning 'some tab have stream' */
const STORAGE_KEY_STREAM = 'stream';
/** Number of notifications. May be increased or reset */
const STORAGE_KEY_NOTIF_COUNT = 'notification_count';
var notifications, delivered;
var notifications_mock = { close: function () { } };
function get_subscriptions(callback, retries = 5) {
if (retries <= 0) {
return;
}
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 10000;
xhr.open('GET', '/api/v1/auth/subscriptions?fields=authorId', true);
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
subscriptions = xhr.response;
callback(subscriptions);
}
}
}
xhr.onerror = function () {
console.log('Pulling subscriptions failed... ' + retries + '/5');
setTimeout(function () { get_subscriptions(callback, retries - 1) }, 1000);
}
xhr.ontimeout = function () {
console.log('Pulling subscriptions failed... ' + retries + '/5');
get_subscriptions(callback, retries - 1);
}
xhr.send();
function get_subscriptions() {
helpers.xhr('GET', '/api/v1/auth/subscriptions?fields=authorId', {
retries: 5,
entity_name: 'subscriptions'
}, {
on200: create_notification_stream
});
}
function create_notification_stream(subscriptions) {
// sse.js can't be replaced to EventSource in place as it lack support of payload and headers
// see https://developer.mozilla.org/en-US/docs/Web/API/EventSource/EventSource
notifications = new SSE(
'/api/v1/auth/notifications?fields=videoId,title,author,authorId,publishedText,published,authorThumbnails,liveNow', {
withCredentials: true,
payload: 'topics=' + subscriptions.map(function (subscription) { return subscription.authorId }).join(','),
payload: 'topics=' + subscriptions.map(function (subscription) { return subscription.authorId; }).join(','),
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
});
delivered = [];
@ -44,96 +32,100 @@ function create_notification_stream(subscriptions) {
var start_time = Math.round(new Date() / 1000);
notifications.onmessage = function (event) {
if (!event.id) {
return;
}
if (!event.id) return;
var notification = JSON.parse(event.data);
console.log('Got notification:', notification);
console.info('Got notification:', notification);
if (start_time < notification.published && !delivered.includes(notification.videoId)) {
if (Notification.permission === 'granted') {
var system_notification =
new Notification((notification.liveNow ? notification_data.live_now_text : notification_data.upload_text).replace('`x`', notification.author), {
body: notification.title,
icon: '/ggpht' + new URL(notification.authorThumbnails[2].url).pathname,
img: '/ggpht' + new URL(notification.authorThumbnails[4].url).pathname,
tag: notification.videoId
});
// Ignore not actual and delivered notifications
if (start_time > notification.published || delivered.includes(notification.videoId)) return;
system_notification.onclick = function (event) {
window.open('/watch?v=' + event.currentTarget.tag, '_blank');
}
}
delivered.push(notification.videoId);
delivered.push(notification.videoId);
localStorage.setItem('notification_count', parseInt(localStorage.getItem('notification_count') || '0') + 1);
var notification_ticker = document.getElementById('notification_ticker');
let notification_count = helpers.storage.get(STORAGE_KEY_NOTIF_COUNT) || 0;
notification_count++;
helpers.storage.set(STORAGE_KEY_NOTIF_COUNT, notification_count);
if (parseInt(localStorage.getItem('notification_count')) > 0) {
notification_ticker.innerHTML =
'<span id="notification_count">' + localStorage.getItem('notification_count') + '</span> <i class="icon ion-ios-notifications"></i>';
} else {
notification_ticker.innerHTML =
'<i class="icon ion-ios-notifications-outline"></i>';
}
update_ticker_count();
// permission for notifications handled on settings page. JS handler is in handlers.js
if (window.Notification && Notification.permission === 'granted') {
var notification_text = notification.liveNow ? notification_data.live_now_text : notification_data.upload_text;
notification_text = notification_text.replace('`x`', notification.author);
var system_notification = new Notification(notification_text, {
body: notification.title,
icon: '/ggpht' + new URL(notification.authorThumbnails[2].url).pathname,
img: '/ggpht' + new URL(notification.authorThumbnails[4].url).pathname
});
system_notification.onclick = function (e) {
open('/watch?v=' + notification.videoId, '_blank');
};
}
}
};
notifications.addEventListener('error', function (e) {
console.warn('Something went wrong with notifications, trying to reconnect...');
notifications = notifications_mock;
setTimeout(get_subscriptions, 1000);
});
notifications.addEventListener('error', handle_notification_error);
notifications.stream();
}
function handle_notification_error(event) {
console.log('Something went wrong with notifications, trying to reconnect...');
notifications = { close: function () { } };
setTimeout(function () { get_subscriptions(create_notification_stream) }, 1000);
function update_ticker_count() {
var notification_ticker = document.getElementById('notification_ticker');
const notification_count = helpers.storage.get(STORAGE_KEY_STREAM);
if (notification_count > 0) {
notification_ticker.innerHTML =
'<span id="notification_count">' + notification_count + '</span> <i class="icon ion-ios-notifications"></i>';
} else {
notification_ticker.innerHTML =
'<i class="icon ion-ios-notifications-outline"></i>';
}
}
window.addEventListener('load', function (e) {
localStorage.setItem('notification_count', document.getElementById('notification_count') ? document.getElementById('notification_count').innerText : '0');
if (localStorage.getItem('stream')) {
localStorage.removeItem('stream');
} else {
setTimeout(function () {
if (!localStorage.getItem('stream')) {
notifications = { close: function () { } };
localStorage.setItem('stream', true);
get_subscriptions(create_notification_stream);
}
}, Math.random() * 1000 + 50);
}
window.addEventListener('storage', function (e) {
if (e.key === 'stream' && !e.newValue) {
if (notifications) {
localStorage.setItem('stream', true);
} else {
setTimeout(function () {
if (!localStorage.getItem('stream')) {
notifications = { close: function () { } };
localStorage.setItem('stream', true);
get_subscriptions(create_notification_stream);
}
}, Math.random() * 1000 + 50);
}
} else if (e.key === 'notification_count') {
var notification_ticker = document.getElementById('notification_ticker');
if (parseInt(e.newValue) > 0) {
notification_ticker.innerHTML =
'<span id="notification_count">' + e.newValue + '</span> <i class="icon ion-ios-notifications"></i>';
} else {
notification_ticker.innerHTML =
'<i class="icon ion-ios-notifications-outline"></i>';
}
function start_stream_if_needed() {
// random wait for other tabs set 'stream' flag
setTimeout(function () {
if (!helpers.storage.get(STORAGE_KEY_STREAM)) {
// if no one set 'stream', set it by yourself and start stream
helpers.storage.set(STORAGE_KEY_STREAM, true);
notifications = notifications_mock;
get_subscriptions();
}
});
});
}, Math.random() * 1000 + 50); // [0.050 .. 1.050) second
}
window.addEventListener('unload', function (e) {
if (notifications) {
localStorage.removeItem('stream');
addEventListener('storage', function (e) {
if (e.key === STORAGE_KEY_NOTIF_COUNT)
update_ticker_count();
// if 'stream' key was removed
if (e.key === STORAGE_KEY_STREAM && !helpers.storage.get(STORAGE_KEY_STREAM)) {
if (notifications) {
// restore it if we have active stream
helpers.storage.set(STORAGE_KEY_STREAM, true);
} else {
start_stream_if_needed();
}
}
});
addEventListener('load', function () {
var notification_count_el = document.getElementById('notification_count');
var notification_count = notification_count_el ? parseInt(notification_count_el.textContent) : 0;
helpers.storage.set(STORAGE_KEY_NOTIF_COUNT, notification_count);
if (helpers.storage.get(STORAGE_KEY_STREAM))
helpers.storage.remove(STORAGE_KEY_STREAM);
start_stream_if_needed();
});
addEventListener('unload', function () {
// let chance to other tabs to be a streamer via firing 'storage' event
if (notifications) helpers.storage.remove(STORAGE_KEY_STREAM);
});

View File

@ -1,7 +1,11 @@
'use strict';
var player_data = JSON.parse(document.getElementById('player_data').textContent);
var video_data = JSON.parse(document.getElementById('video_data').textContent);
var options = {
preload: 'auto',
liveui: true,
playbackRates: [0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 2.0],
playbackRates: [0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0],
controlBar: {
children: [
'playToggle',
@ -11,13 +15,21 @@ var options = {
'durationDisplay',
'progressControl',
'remainingTimeDisplay',
'Spacer',
'captionsButton',
'audioTrackButton',
'qualitySelector',
'playbackRateMenuButton',
'fullscreenToggle'
]
},
html5: {
preloadTextTracks: false,
vhs: {
overrideNative: true
}
}
}
};
if (player_data.aspect_ratio) {
options.aspectRatio = player_data.aspect_ratio;
@ -25,124 +37,166 @@ if (player_data.aspect_ratio) {
var embed_url = new URL(location);
embed_url.searchParams.delete('v');
short_url = location.origin + '/' + video_data.id + embed_url.search;
var short_url = location.origin + '/' + video_data.id + embed_url.search;
embed_url = location.origin + '/embed/' + video_data.id + embed_url.search;
var shareOptions = {
socials: ['fbFeed', 'tw', 'reddit', 'email'],
var save_player_pos_key = 'save_player_pos';
url: short_url,
title: player_data.title,
description: player_data.description,
image: player_data.thumbnail,
embedCode: "<iframe id='ivplayer' type='text/html' width='640' height='360' src='" + embed_url + "' frameborder='0'></iframe>"
}
videojs.Vhs.xhr.beforeRequest = function(options) {
// set local if requested not videoplayback
if (!options.uri.includes('videoplayback')) {
if (!options.uri.includes('local=true'))
options.uri += '?local=true';
}
return options;
};
var player = videojs('player', options, function () {
this.hotkeys({
volumeStep: 0.1,
seekStep: 5,
enableModifiersForNumbers: false,
enableHoverScroll: true,
customKeys: {
// Toggle play with K Key
play: {
key: function (e) {
return e.which === 75;
},
handler: function (player, options, e) {
if (player.paused()) {
player.play();
} else {
player.pause();
}
}
},
// Go backward 10 seconds
backward: {
key: function (e) {
return e.which === 74;
},
handler: function (player, options, e) {
player.currentTime(player.currentTime() - 10);
}
},
// Go forward 10 seconds
forward: {
key: function (e) {
return e.which === 76;
},
handler: function (player, options, e) {
player.currentTime(player.currentTime() + 10);
}
},
// Increase speed
increase_speed: {
key: function (e) {
return (e.which === 190 && e.shiftKey);
},
handler: function (player, _, e) {
size = options.playbackRates.length;
index = options.playbackRates.indexOf(player.playbackRate());
player.playbackRate(options.playbackRates[(index + 1) % size]);
}
},
// Decrease speed
decrease_speed: {
key: function (e) {
return (e.which === 188 && e.shiftKey);
},
handler: function (player, _, e) {
size = options.playbackRates.length;
index = options.playbackRates.indexOf(player.playbackRate());
player.playbackRate(options.playbackRates[(size + index - 1) % size]);
}
}
}
});
});
var player = videojs('player', options);
if (location.pathname.startsWith('/embed/')) {
player.overlay({
overlays: [{
start: 'loadstart',
content: '<h1><a rel="noopener" target="_blank" href="' + location.origin + '/watch?v=' + video_data.id + '">' + player_data.title + '</a></h1>',
end: 'playing',
align: 'top'
}, {
start: 'pause',
content: '<h1><a rel="noopener" target="_blank" href="' + location.origin + '/watch?v=' + video_data.id + '">' + player_data.title + '</a></h1>',
end: 'playing',
align: 'top'
}]
});
}
player.on('error', function () {
if (video_data.params.quality === 'dash') return;
player.on('error', function (event) {
if (player.error().code === 2 || player.error().code === 4) {
setInterval(setTimeout(function (event) {
console.log('An error occured in the player, reloading...');
var localNotDisabled = (
!player.currentSrc().includes('local=true') && !video_data.local_disabled
);
var reloadMakesSense = (
player.error().code === MediaError.MEDIA_ERR_NETWORK ||
player.error().code === MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED
);
if (localNotDisabled) {
// add local=true to all current sources
player.src(player.currentSources().map(function (source) {
source.src += '&local=true';
return source;
}));
} else if (reloadMakesSense) {
setTimeout(function () {
console.warn('An error occurred in the player, reloading...');
// After load() all parameters are reset. Save them
var currentTime = player.currentTime();
var playbackRate = player.playbackRate();
var paused = player.paused();
player.load();
if (currentTime > 0.5) {
currentTime -= 0.5;
}
if (currentTime > 0.5) currentTime -= 0.5;
player.currentTime(currentTime);
player.playbackRate(playbackRate);
if (!paused) {
player.play();
}
}, 5000), 5000);
if (!paused) player.play();
}, 5000);
}
});
if (video_data.params.quality === 'dash') {
player.reloadSourceOnError({
errorInterval: 10
});
}
/**
* Function for add time argument to url
* @param {String} url
* @returns {URL} urlWithTimeArg
*/
function addCurrentTimeToURL(url) {
var urlUsed = new URL(url);
urlUsed.searchParams.delete('start');
var currentTime = Math.ceil(player.currentTime());
if (currentTime > 0)
urlUsed.searchParams.set('t', currentTime);
else if (urlUsed.searchParams.has('t'))
urlUsed.searchParams.delete('t');
return urlUsed;
}
var shareOptions = {
socials: ['fbFeed', 'tw', 'reddit', 'email'],
get url() {
return addCurrentTimeToURL(short_url);
},
title: player_data.title,
description: player_data.description,
image: player_data.thumbnail,
get embedCode() {
// Single quotes inside here required. HTML inserted as is into value attribute of input
return "<iframe id='ivplayer' width='640' height='360' src='" +
addCurrentTimeToURL(embed_url) + "' style='border:none;'></iframe>";
}
};
if (location.pathname.startsWith('/embed/')) {
var overlay_content = '<h1><a rel="noopener" target="_blank" href="' + location.origin + '/watch?v=' + video_data.id + '">' + player_data.title + '</a></h1>';
player.overlay({
overlays: [
{ start: 'loadstart', content: overlay_content, end: 'playing', align: 'top'},
{ start: 'pause', content: overlay_content, end: 'playing', align: 'top'}
]
});
}
// Detect mobile users and initialize mobileUi for better UX
// Detection code taken from https://stackoverflow.com/a/20293441
function isMobile() {
try{ document.createEvent('TouchEvent'); return true; }
catch(e){ return false; }
}
if (isMobile()) {
player.mobileUi({ touchControls: { seekSeconds: 5 * player.playbackRate() } });
var buttons = ['playToggle', 'volumePanel', 'captionsButton'];
if (!video_data.params.listen && video_data.params.quality === 'dash') buttons.push('audioTrackButton');
if (video_data.params.listen || video_data.params.quality !== 'dash') buttons.push('qualitySelector');
// Create new control bar object for operation buttons
const ControlBar = videojs.getComponent('controlBar');
let operations_bar = new ControlBar(player, {
children: [],
playbackRates: [0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0]
});
buttons.slice(1).forEach(function (child) {operations_bar.addChild(child);});
// Remove operation buttons from primary control bar
var primary_control_bar = player.getChild('controlBar');
buttons.forEach(function (child) {primary_control_bar.removeChild(child);});
var operations_bar_element = operations_bar.el();
operations_bar_element.classList.add('mobile-operations-bar');
player.addChild(operations_bar);
// Playback menu doesn't work when it's initialized outside of the primary control bar
var playback_element = document.getElementsByClassName('vjs-playback-rate')[0];
operations_bar_element.append(playback_element);
// The share and http source selector element can't be fetched till the players ready.
player.one('playing', function () {
var share_element = document.getElementsByClassName('vjs-share-control')[0];
operations_bar_element.append(share_element);
if (!video_data.params.listen && video_data.params.quality === 'dash') {
var http_source_selector = document.getElementsByClassName('vjs-http-source-selector vjs-menu-button')[0];
operations_bar_element.append(http_source_selector);
}
});
}
// Enable VR video support
if (!video_data.params.listen && video_data.vr && video_data.params.vr_mode) {
player.crossOrigin('anonymous');
switch (video_data.projection_type) {
case 'EQUIRECTANGULAR':
player.vr({projection: 'equirectangular'});
default: // Should only be 'MESH' but we'll use this as a fallback.
player.vr({projection: 'EAC'});
}
}
// Add markers
if (video_data.params.video_start > 0 || video_data.params.video_end > 0) {
var markers = [{ time: video_data.params.video_start, text: 'Start' }];
@ -155,13 +209,8 @@ if (video_data.params.video_start > 0 || video_data.params.video_end > 0) {
player.markers({
onMarkerReached: function (marker) {
if (marker.text === 'End') {
if (player.loop()) {
player.markers.prev('Start');
} else {
player.pause();
}
}
if (marker.text === 'End')
player.loop() ? player.markers.prev('Start') : player.pause();
},
markers: markers
});
@ -172,9 +221,76 @@ if (video_data.params.video_start > 0 || video_data.params.video_end > 0) {
player.volume(video_data.params.volume / 100);
player.playbackRate(video_data.params.speed);
/**
* Method for getting the contents of a cookie
*
* @param {String} name Name of cookie
* @returns {String|null} cookieValue
*/
function getCookieValue(name) {
var cookiePrefix = name + '=';
var matchedCookie = document.cookie.split(';').find(function (item) {return item.includes(cookiePrefix);});
if (matchedCookie)
return matchedCookie.replace(cookiePrefix, '');
return null;
}
/**
* Method for updating the 'PREFS' cookie (or creating it if missing)
*
* @param {number} newVolume New volume defined (null if unchanged)
* @param {number} newSpeed New speed defined (null if unchanged)
*/
function updateCookie(newVolume, newSpeed) {
var volumeValue = newVolume !== null ? newVolume : video_data.params.volume;
var speedValue = newSpeed !== null ? newSpeed : video_data.params.speed;
var cookieValue = getCookieValue('PREFS');
var cookieData;
if (cookieValue !== null) {
var cookieJson = JSON.parse(decodeURIComponent(cookieValue));
cookieJson.volume = volumeValue;
cookieJson.speed = speedValue;
cookieData = encodeURIComponent(JSON.stringify(cookieJson));
} else {
cookieData = encodeURIComponent(JSON.stringify({ 'volume': volumeValue, 'speed': speedValue }));
}
// Set expiration in 2 year
var date = new Date();
date.setFullYear(date.getFullYear() + 2);
var ipRegex = /^((\d+\.){3}\d+|[A-Fa-f0-9]*:[A-Fa-f0-9:]*:[A-Fa-f0-9:]+)$/;
var domainUsed = location.hostname;
// Fix for a bug in FF where the leading dot in the FQDN is not ignored
if (domainUsed.charAt(0) !== '.' && !ipRegex.test(domainUsed) && domainUsed !== 'localhost')
domainUsed = '.' + location.hostname;
var secure = location.protocol.startsWith("https") ? " Secure;" : "";
document.cookie = 'PREFS=' + cookieData + '; SameSite=Lax; path=/; domain=' +
domainUsed + '; expires=' + date.toGMTString() + ';' + secure;
video_data.params.volume = volumeValue;
video_data.params.speed = speedValue;
}
player.on('ratechange', function () {
updateCookie(null, player.playbackRate());
if (isMobile()) {
player.mobileUi({ touchControls: { seekSeconds: 5 * player.playbackRate() } });
}
});
player.on('volumechange', function () {
updateCookie(Math.ceil(player.volume() * 100), null);
});
player.on('waiting', function () {
if (player.playbackRate() > 1 && player.liveTracker.isLive() && player.liveTracker.atLiveEdge()) {
console.log('Player has caught up to source, resetting playbackRate.')
console.info('Player has caught up to source, resetting playbackRate');
player.playbackRate(1);
}
});
@ -183,19 +299,39 @@ if (video_data.premiere_timestamp && Math.round(new Date() / 1000) < video_data.
player.getChild('bigPlayButton').hide();
}
if (video_data.params.save_player_pos) {
const url = new URL(location);
const hasTimeParam = url.searchParams.has('t');
const rememberedTime = get_video_time();
let lastUpdated = 0;
if(!hasTimeParam) set_seconds_after_start(rememberedTime);
player.on('timeupdate', function () {
const raw = player.currentTime();
const time = Math.floor(raw);
if(lastUpdated !== time && raw <= video_data.length_seconds - 15) {
save_video_time(time);
lastUpdated = time;
}
});
}
else remove_all_video_times();
if (video_data.params.autoplay) {
var bpb = player.getChild('bigPlayButton');
bpb.hide();
player.ready(function () {
new Promise(function (resolve, reject) {
setTimeout(() => resolve(1), 1);
setTimeout(function () {resolve(1);}, 1);
}).then(function (result) {
var promise = player.play();
if (promise !== undefined) {
promise.then(_ => {
}).catch(error => {
promise.then(function () {
}).catch(function (error) {
bpb.show();
});
}
@ -205,54 +341,387 @@ if (video_data.params.autoplay) {
if (!video_data.params.listen && video_data.params.quality === 'dash') {
player.httpSourceSelector();
if (video_data.params.quality_dash !== 'auto') {
player.ready(function () {
player.on('loadedmetadata', function () {
const qualityLevels = Array.from(player.qualityLevels()).sort(function (a, b) {return a.height - b.height;});
let targetQualityLevel;
switch (video_data.params.quality_dash) {
case 'best':
targetQualityLevel = qualityLevels.length - 1;
break;
case 'worst':
targetQualityLevel = 0;
break;
default:
const targetHeight = parseInt(video_data.params.quality_dash);
for (let i = 0; i < qualityLevels.length; i++) {
if (qualityLevels[i].height <= targetHeight)
targetQualityLevel = i;
else
break;
}
}
qualityLevels.forEach(function (level, index) {
level.enabled = (index === targetQualityLevel);
});
});
});
}
}
player.vttThumbnails({
src: location.origin + '/api/v1/storyboards/' + video_data.id + '?height=90'
src: '/api/v1/storyboards/' + video_data.id + '?height=90',
showTimestamp: true
});
// Enable annotations
if (!video_data.params.listen && video_data.params.annotations) {
var video_container = document.getElementById('player');
let xhr = new XMLHttpRequest();
xhr.responseType = 'text';
xhr.timeout = 60000;
xhr.open('GET', '/api/v1/annotations/' + video_data.id, true);
addEventListener('load', function (e) {
addEventListener('__ar_annotation_click', function (e) {
const url = e.detail.url,
target = e.detail.target,
seconds = e.detail.seconds;
var path = new URL(url);
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
if (path.href.startsWith('https://www.youtube.com/watch?') && seconds) {
path.search += '&t=' + seconds;
}
path = path.pathname + path.search;
if (target === 'current') {
location.href = path;
} else if (target === 'new') {
open(path, '_blank');
}
});
helpers.xhr('GET', '/api/v1/annotations/' + video_data.id, {
responseType: 'text',
timeout: 60000
}, {
on200: function (response) {
var video_container = document.getElementById('player');
videojs.registerPlugin('youtubeAnnotationsPlugin', youtubeAnnotationsPlugin);
if (!player.paused()) {
player.youtubeAnnotationsPlugin({ annotationXml: xhr.response, videoContainer: video_container });
} else {
if (player.paused()) {
player.one('play', function (event) {
player.youtubeAnnotationsPlugin({ annotationXml: xhr.response, videoContainer: video_container });
player.youtubeAnnotationsPlugin({ annotationXml: response, videoContainer: video_container });
});
} else {
player.youtubeAnnotationsPlugin({ annotationXml: response, videoContainer: video_container });
}
}
}
}
});
window.addEventListener('__ar_annotation_click', e => {
const { url, target, seconds } = e.detail;
var path = new URL(url);
if (path.href.startsWith('https://www.youtube.com/watch?') && seconds) {
path.search += '&t=' + seconds;
}
path = path.pathname + path.search;
if (target === 'current') {
window.location.href = path;
} else if (target === 'new') {
window.open(path, '_blank');
}
});
xhr.send();
}
function change_volume(delta) {
const curVolume = player.volume();
let newVolume = curVolume + delta;
newVolume = helpers.clamp(newVolume, 0, 1);
player.volume(newVolume);
}
function toggle_muted() {
player.muted(!player.muted());
}
function skip_seconds(delta) {
const duration = player.duration();
const curTime = player.currentTime();
let newTime = curTime + delta;
newTime = helpers.clamp(newTime, 0, duration);
player.currentTime(newTime);
}
function set_seconds_after_start(delta) {
const start = video_data.params.video_start;
player.currentTime(start + delta);
}
function save_video_time(seconds) {
const all_video_times = get_all_video_times();
all_video_times[video_data.id] = seconds;
helpers.storage.set(save_player_pos_key, all_video_times);
}
function get_video_time() {
return get_all_video_times()[video_data.id] || 0;
}
function get_all_video_times() {
return helpers.storage.get(save_player_pos_key) || {};
}
function remove_all_video_times() {
helpers.storage.remove(save_player_pos_key);
}
function set_time_percent(percent) {
const duration = player.duration();
const newTime = duration * (percent / 100);
player.currentTime(newTime);
}
function play() { player.play(); }
function pause() { player.pause(); }
function stop() { player.pause(); player.currentTime(0); }
function toggle_play() { player.paused() ? play() : pause(); }
const toggle_captions = (function () {
let toggledTrack = null;
function bindChange(onOrOff) {
player.textTracks()[onOrOff]('change', function (e) {
toggledTrack = null;
});
}
// Wrapper function to ignore our own emitted events and only listen
// to events emitted by Video.js on click on the captions menu items.
function setMode(track, mode) {
bindChange('off');
track.mode = mode;
setTimeout(function () {
bindChange('on');
}, 0);
}
bindChange('on');
return function () {
if (toggledTrack !== null) {
if (toggledTrack.mode !== 'showing') {
setMode(toggledTrack, 'showing');
} else {
setMode(toggledTrack, 'disabled');
}
toggledTrack = null;
return;
}
// Used as a fallback if no captions are currently active.
// TODO: Make this more intelligent by e.g. relying on browser language.
let fallbackCaptionsTrack = null;
const tracks = player.textTracks();
for (let i = 0; i < tracks.length; i++) {
const track = tracks[i];
if (track.kind !== 'captions') continue;
if (fallbackCaptionsTrack === null) {
fallbackCaptionsTrack = track;
}
if (track.mode === 'showing') {
setMode(track, 'disabled');
toggledTrack = track;
return;
}
}
// Fallback if no captions are currently active.
if (fallbackCaptionsTrack !== null) {
setMode(fallbackCaptionsTrack, 'showing');
toggledTrack = fallbackCaptionsTrack;
}
};
})();
function toggle_fullscreen() {
player.isFullscreen() ? player.exitFullscreen() : player.requestFullscreen();
}
function increase_playback_rate(steps) {
const maxIndex = options.playbackRates.length - 1;
const curIndex = options.playbackRates.indexOf(player.playbackRate());
let newIndex = curIndex + steps;
newIndex = helpers.clamp(newIndex, 0, maxIndex);
player.playbackRate(options.playbackRates[newIndex]);
}
addEventListener('keydown', function (e) {
if (e.target.tagName.toLowerCase() === 'input') {
// Ignore input when focus is on certain elements, e.g. form fields.
return;
}
// See https://github.com/ctd1500/videojs-hotkeys/blob/bb4a158b2e214ccab87c2e7b95f42bc45c6bfd87/videojs.hotkeys.js#L310-L313
const isPlayerFocused = false
|| e.target === document.querySelector('.video-js')
|| e.target === document.querySelector('.vjs-tech')
|| e.target === document.querySelector('.iframeblocker')
|| e.target === document.querySelector('.vjs-control-bar')
;
let action = null;
const code = e.keyCode;
const decoratedKey =
e.key
+ (e.altKey ? '+alt' : '')
+ (e.ctrlKey ? '+ctrl' : '')
+ (e.metaKey ? '+meta' : '')
;
switch (decoratedKey) {
case ' ':
case 'k':
case 'MediaPlayPause':
action = toggle_play;
break;
case 'MediaPlay': action = play; break;
case 'MediaPause': action = pause; break;
case 'MediaStop': action = stop; break;
case 'ArrowUp':
if (isPlayerFocused) action = change_volume.bind(this, 0.1);
break;
case 'ArrowDown':
if (isPlayerFocused) action = change_volume.bind(this, -0.1);
break;
case 'm':
action = toggle_muted;
break;
case 'ArrowRight':
case 'MediaFastForward':
action = skip_seconds.bind(this, 5 * player.playbackRate());
break;
case 'ArrowLeft':
case 'MediaTrackPrevious':
action = skip_seconds.bind(this, -5 * player.playbackRate());
break;
case 'l':
action = skip_seconds.bind(this, 10 * player.playbackRate());
break;
case 'j':
action = skip_seconds.bind(this, -10 * player.playbackRate());
break;
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
// Ignore numpad numbers
if (code > 57) break;
const percent = (code - 48) * 10;
action = set_time_percent.bind(this, percent);
break;
case 'c': action = toggle_captions; break;
case 'f': action = toggle_fullscreen; break;
case 'N':
case 'MediaTrackNext':
action = next_video;
break;
case 'P':
case 'MediaTrackPrevious':
// TODO: Add support to play back previous video.
break;
// TODO: More precise step. Now FPS is taken equal to 29.97
// Common FPS: https://forum.videohelp.com/threads/81868#post323588
// Possible solution is new HTMLVideoElement.requestVideoFrameCallback() https://wicg.github.io/video-rvfc/
case ',': action = function () { pause(); skip_seconds(-1/29.97); }; break;
case '.': action = function () { pause(); skip_seconds( 1/29.97); }; break;
case '>': action = increase_playback_rate.bind(this, 1); break;
case '<': action = increase_playback_rate.bind(this, -1); break;
default:
console.info('Unhandled key down event: %s:', decoratedKey, e);
break;
}
if (action) {
e.preventDefault();
action();
}
}, false);
// Add support for controlling the player volume by scrolling over it. Adapted from
// https://github.com/ctd1500/videojs-hotkeys/blob/bb4a158b2e214ccab87c2e7b95f42bc45c6bfd87/videojs.hotkeys.js#L292-L328
(function () {
const pEl = document.getElementById('player');
var volumeHover = false;
var volumeSelector = pEl.querySelector('.vjs-volume-menu-button') || pEl.querySelector('.vjs-volume-panel');
if (volumeSelector !== null) {
volumeSelector.onmouseover = function () { volumeHover = true; };
volumeSelector.onmouseout = function () { volumeHover = false; };
}
function mouseScroll(event) {
// When controls are disabled, hotkeys will be disabled as well
if (!player.controls() || !volumeHover) return;
event.preventDefault();
var wheelMove = event.wheelDelta || -event.detail;
var volumeSign = Math.sign(wheelMove);
change_volume(volumeSign * 0.05); // decrease/increase by 5%
}
player.on('mousewheel', mouseScroll);
player.on('DOMMouseScroll', mouseScroll);
}());
// Since videojs-share can sometimes be blocked, we defer it until last
player.share(shareOptions);
if (player.share) player.share(shareOptions);
// show the preferred caption by default
if (player_data.preferred_caption_found) {
player.ready(function () {
if (!video_data.params.listen && video_data.params.quality === 'dash') {
// play.textTracks()[0] on DASH mode is showing some debug messages
player.textTracks()[1].mode = 'showing';
} else {
player.textTracks()[0].mode = 'showing';
}
});
}
// Safari audio double duration fix
if (navigator.vendor === 'Apple Computer, Inc.' && video_data.params.listen) {
player.on('loadedmetadata', function () {
player.on('timeupdate', function () {
if (player.remainingTime() < player.duration() / 2 && player.remainingTime() >= 2) {
player.currentTime(player.duration() - 1);
}
});
});
}
// Watch on Invidious link
if (location.pathname.startsWith('/embed/')) {
const Button = videojs.getComponent('Button');
let watch_on_invidious_button = new Button(player);
// Create hyperlink for current instance
var redirect_element = document.createElement('a');
redirect_element.setAttribute('href', location.pathname.replace('/embed/', '/watch?v='));
redirect_element.appendChild(document.createTextNode('Invidious'));
watch_on_invidious_button.el().appendChild(redirect_element);
watch_on_invidious_button.addClass('watch-on-invidious');
var cb = player.getChild('ControlBar');
cb.addChild(watch_on_invidious_button);
}
addEventListener('DOMContentLoaded', function () {
// Save time during redirection on another instance
const changeInstanceLink = document.querySelector('#watch-on-another-invidious-instance > a');
if (changeInstanceLink) changeInstanceLink.addEventListener('click', function () {
changeInstanceLink.href = addCurrentTimeToURL(changeInstanceLink.href);
});
});

View File

@ -0,0 +1,48 @@
'use strict';
var playlist_data = JSON.parse(document.getElementById('playlist_data').textContent);
var payload = 'csrf_token=' + playlist_data.csrf_token;
function add_playlist_video(target) {
var select = target.parentNode.children[0].children[1];
var option = select.children[select.selectedIndex];
var url = '/playlist_ajax?action_add_video=1&redirect=false' +
'&video_id=' + target.getAttribute('data-id') +
'&playlist_id=' + option.getAttribute('data-plid');
helpers.xhr('POST', url, {payload: payload}, {
on200: function (response) {
option.textContent = '✓' + option.textContent;
}
});
}
function add_playlist_item(target) {
var tile = target.parentNode.parentNode.parentNode.parentNode.parentNode;
tile.style.display = 'none';
var url = '/playlist_ajax?action_add_video=1&redirect=false' +
'&video_id=' + target.getAttribute('data-id') +
'&playlist_id=' + target.getAttribute('data-plid');
helpers.xhr('POST', url, {payload: payload}, {
onNon200: function (xhr) {
tile.style.display = '';
}
});
}
function remove_playlist_item(target) {
var tile = target.parentNode.parentNode.parentNode.parentNode.parentNode;
tile.style.display = 'none';
var url = '/playlist_ajax?action_remove_video=1&redirect=false' +
'&set_video_id=' + target.getAttribute('data-index') +
'&playlist_id=' + target.getAttribute('data-plid');
helpers.xhr('POST', url, {payload: payload}, {
onNon200: function (xhr) {
tile.style.display = '';
}
});
}

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,9 @@
'use strict';
var subscribe_data = JSON.parse(document.getElementById('subscribe_data').textContent);
var payload = 'csrf_token=' + subscribe_data.csrf_token;
var subscribe_button = document.getElementById('subscribe');
subscribe_button.parentNode['action'] = 'javascript:void(0)';
subscribe_button.parentNode.action = 'javascript:void(0)';
if (subscribe_button.getAttribute('data-type') === 'subscribe') {
subscribe_button.onclick = subscribe;
@ -7,82 +11,34 @@ if (subscribe_button.getAttribute('data-type') === 'subscribe') {
subscribe_button.onclick = unsubscribe;
}
function subscribe(retries = 5) {
if (retries <= 0) {
console.log('Failed to subscribe.');
return;
}
var url = '/subscription_ajax?action_create_subscription_to_channel=1&redirect=false' +
'&c=' + subscribe_data.ucid;
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 10000;
xhr.open('POST', url, true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
function subscribe() {
var fallback = subscribe_button.innerHTML;
subscribe_button.onclick = unsubscribe;
subscribe_button.innerHTML = '<b>' + subscribe_data.unsubscribe_text + ' | ' + subscribe_data.sub_count_text + '</b>';
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
if (xhr.status != 200) {
subscribe_button.onclick = subscribe;
subscribe_button.innerHTML = fallback;
}
var url = '/subscription_ajax?action_create_subscription_to_channel=1&redirect=false' +
'&c=' + subscribe_data.ucid;
helpers.xhr('POST', url, {payload: payload, retries: 5, entity_name: 'subscribe request'}, {
onNon200: function (xhr) {
subscribe_button.onclick = subscribe;
subscribe_button.innerHTML = fallback;
}
}
xhr.onerror = function () {
console.log('Subscribing failed... ' + retries + '/5');
setTimeout(function () { subscribe(retries - 1) }, 1000);
}
xhr.ontimeout = function () {
console.log('Subscribing failed... ' + retries + '/5');
subscribe(retries - 1);
}
xhr.send('csrf_token=' + subscribe_data.csrf_token);
});
}
function unsubscribe(retries = 5) {
if (retries <= 0) {
console.log('Failed to subscribe');
return;
}
var url = '/subscription_ajax?action_remove_subscriptions=1&redirect=false' +
'&c=' + subscribe_data.ucid;
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 10000;
xhr.open('POST', url, true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
function unsubscribe() {
var fallback = subscribe_button.innerHTML;
subscribe_button.onclick = subscribe;
subscribe_button.innerHTML = '<b>' + subscribe_data.subscribe_text + ' | ' + subscribe_data.sub_count_text + '</b>';
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
if (xhr.status != 200) {
subscribe_button.onclick = unsubscribe;
subscribe_button.innerHTML = fallback;
}
var url = '/subscription_ajax?action_remove_subscriptions=1&redirect=false' +
'&c=' + subscribe_data.ucid;
helpers.xhr('POST', url, {payload: payload, retries: 5, entity_name: 'unsubscribe request'}, {
onNon200: function (xhr) {
subscribe_button.onclick = unsubscribe;
subscribe_button.innerHTML = fallback;
}
}
xhr.onerror = function () {
console.log('Unsubscribing failed... ' + retries + '/5');
setTimeout(function () { unsubscribe(retries - 1) }, 1000);
}
xhr.ontimeout = function () {
console.log('Unsubscribing failed... ' + retries + '/5');
unsubscribe(retries - 1);
}
xhr.send('csrf_token=' + subscribe_data.csrf_token);
});
}

View File

@ -1,35 +1,44 @@
var toggle_theme = document.getElementById('toggle_theme')
toggle_theme.href = 'javascript:void(0);';
'use strict';
var toggle_theme = document.getElementById('toggle_theme');
toggle_theme.href = 'javascript:void(0)';
const STORAGE_KEY_THEME = 'dark_mode';
const THEME_DARK = 'dark';
const THEME_LIGHT = 'light';
// TODO: theme state controlled by system
toggle_theme.addEventListener('click', function () {
var dark_mode = document.getElementById('dark_theme').media == 'none';
var url = '/toggle_theme?redirect=false';
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 10000;
xhr.open('GET', url, true);
set_mode(dark_mode);
localStorage.setItem('dark_mode', dark_mode);
xhr.send();
const isDarkTheme = helpers.storage.get(STORAGE_KEY_THEME) === THEME_DARK;
const newTheme = isDarkTheme ? THEME_LIGHT : THEME_DARK;
setTheme(newTheme);
helpers.storage.set(STORAGE_KEY_THEME, newTheme);
helpers.xhr('GET', '/toggle_theme?redirect=false', {}, {});
});
window.addEventListener('storage', function (e) {
if (e.key == 'dark_mode') {
var dark_mode = e.newValue === 'true';
set_mode(dark_mode);
}
});
function set_mode(bool) {
document.getElementById('dark_theme').media = !bool ? 'none' : '';
document.getElementById('light_theme').media = bool ? 'none' : '';
if (bool) {
toggle_theme.children[0].setAttribute('class', 'icon ion-ios-sunny');
/** @param {THEME_DARK|THEME_LIGHT} theme */
function setTheme(theme) {
// By default body element has .no-theme class that uses OS theme via CSS @media rules
// It rewrites using hard className below
if (theme === THEME_DARK) {
toggle_theme.children[0].className = 'icon ion-ios-sunny';
document.body.className = 'dark-theme';
} else {
toggle_theme.children[0].setAttribute('class', 'icon ion-ios-moon');
toggle_theme.children[0].className = 'icon ion-ios-moon';
document.body.className = 'light-theme';
}
}
// Handles theme change event caused by other tab
addEventListener('storage', function (e) {
if (e.key === STORAGE_KEY_THEME)
setTheme(helpers.storage.get(STORAGE_KEY_THEME));
});
// Set theme from preferences on page load
addEventListener('DOMContentLoaded', function () {
const prefTheme = document.getElementById('dark_mode_pref').textContent;
if (prefTheme) {
setTheme(prefTheme);
helpers.storage.set(STORAGE_KEY_THEME, prefTheme);
}
});

File diff suppressed because one or more lines are too long

View File

@ -1,2 +0,0 @@
/*! @name videojs-contrib-quality-levels @version 2.0.9 @license Apache-2.0 */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("video.js"),require("global/document")):"function"==typeof define&&define.amd?define(["video.js","global/document"],t):e.videojsContribQualityLevels=t(e.videojs,e.document)}(this,function(e,t){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t;var r=function(r){var i,l;function o(){var i,l=n(n(i=r.call(this)||this));if(e.browser.IS_IE8)for(var s in l=t.createElement("custom"),o.prototype)"constructor"!==s&&(l[s]=o.prototype[s]);return l.levels_=[],l.selectedIndex_=-1,Object.defineProperty(l,"selectedIndex",{get:function(){return l.selectedIndex_}}),Object.defineProperty(l,"length",{get:function(){return l.levels_.length}}),l||n(i)}l=r,(i=o).prototype=Object.create(l.prototype),i.prototype.constructor=i,i.__proto__=l;var s=o.prototype;return s.addQualityLevel=function(n){var r=this.getQualityLevelById(n.id);if(r)return r;var i=this.levels_.length;return r=new function n(r){var i=this;if(e.browser.IS_IE8)for(var l in i=t.createElement("custom"),n.prototype)"constructor"!==l&&(i[l]=n.prototype[l]);return i.id=r.id,i.label=i.id,i.width=r.width,i.height=r.height,i.bitrate=r.bandwidth,i.enabled_=r.enabled,Object.defineProperty(i,"enabled",{get:function(){return i.enabled_()},set:function(e){i.enabled_(e)}}),i}(n),""+i in this||Object.defineProperty(this,i,{get:function(){return this.levels_[i]}}),this.levels_.push(r),this.trigger({qualityLevel:r,type:"addqualitylevel"}),r},s.removeQualityLevel=function(e){for(var t=null,n=0,r=this.length;n<r;n++)if(this[n]===e){t=this.levels_.splice(n,1)[0],this.selectedIndex_===n?this.selectedIndex_=-1:this.selectedIndex_>n&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t},s.getQualityLevelById=function(e){for(var t=0,n=this.length;t<n;t++){var r=this[t];if(r.id===e)return r}return null},s.dispose=function(){this.selectedIndex_=-1,this.levels_.length=0},o}(e.EventTarget);for(var i in r.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"},r.prototype.allowedEvents_)r.prototype["on"+i]=null;var l=function(t){return n=this,e.mergeOptions({},t),i=n.qualityLevels,l=new r,n.on("dispose",function e(){l.dispose(),n.qualityLevels=i,n.off("dispose",e)}),n.qualityLevels=function(){return l},n.qualityLevels.VERSION="2.0.9",l;var n,i,l};return(e.registerPlugin||e.plugin)("qualityLevels",l),l.VERSION="2.0.9",l});

View File

@ -1,7 +0,0 @@
/**
* videojs-http-source-selector
* @version 1.1.5
* @copyright 2019 Justin Fujita <Justin@pivotshare.com>
* @license MIT
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("video.js")):"function"==typeof define&&define.amd?define(["video.js"],t):(e=e||self)["videojs-http-source-selector"]=t(e.videojs)}(this,function(i){"use strict";function o(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}var a=function(n){function e(e,t){var o;return o=n.call(this,e,t)||this,t.selectable=!0,o}o(e,n);var t=e.prototype;return t.handleClick=function(){var e=this.options_;console.log("Changing quality to:",e.label),this.selected_=!0,this.selected(!0);for(var t=this.player().qualityLevels(),o=0;o<t.length;o++)e.index==t.length?t[o].enabled=!0:e.index==o?t[o].enabled=!0:t[o].enabled=!1},t.update=function(){var e=this.player().qualityLevels().selectedIndex;this.selected(this.options_.index==e),this.selected_=this.options_.index===e},e}((i=i&&i.hasOwnProperty("default")?i.default:i).getComponent("MenuItem")),r=i.getComponent("MenuButton"),n=function(l){function e(e,t){var o;o=l.call(this,e,t)||this,r.apply(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(o),arguments);var n=o.player().qualityLevels();if(t&&t.default)if("low"==t.default)for(var i=0;i<n.length;i++)n[i].enabled=0==i;else if(t.default="high")for(i=0;i<n.length;i++)n[i].enabled=i==n.length-1;return o}o(e,l);var t=e.prototype;return t.createEl=function(){return i.dom.createEl("div",{className:"vjs-http-source-selector vjs-menu-button vjs-menu-button-popup vjs-control vjs-button"})},t.buildCSSClass=function(){return r.prototype.buildCSSClass.call(this)+" vjs-icon-cog"},t.update=function(){return r.prototype.update.call(this)},t.createItems=function(){for(var e=[],t=this.player().qualityLevels(),o=[],n=0;n<t.length;n++){var i=t.length-(n+1),l=i===t.selectedIndex,r=""+i,s=i;t[i].height?(r=t[i].height+"p",s=parseInt(t[i].height,10)):t[i].bitrate&&(r=Math.floor(t[i].bitrate/1e3)+" kbps",s=parseInt(t[i].bitrate,10)),0<=o.indexOf(r)||(o.push(r),e.push(new a(this.player_,{label:r,index:i,selected:l,sortVal:s})))}return 1<t.length&&e.push(new a(this.player_,{label:"Auto",index:t.length,selected:!1,sortVal:99999})),e.sort(function(e,t){return e.options_.sortVal<t.options_.sortVal?1:e.options_.sortVal>t.options_.sortVal?-1:0}),e},e}(r),l={},e=i.registerPlugin||i.plugin,t=function(e){var t=this;this.ready(function(){!function(n,e){if(n.addClass("vjs-http-source-selector"),console.log("videojs-http-source-selector initialized!"),console.log("player.techName_:"+n.techName_),"Html5"!=n.techName_)return;n.on(["loadedmetadata"],function(e){if(n.qualityLevels(),i.log("loadmetadata event"),"undefined"==n.videojs_http_source_selector_initialized||1==n.videojs_http_source_selector_initialized)console.log("player.videojs_http_source_selector_initialized == true");else{console.log("player.videojs_http_source_selector_initialized == false"),n.videojs_http_source_selector_initialized=!0;var t=n.controlBar,o=t.getChild("fullscreenToggle").el();t.el().insertBefore(t.addChild("SourceMenuButton").el(),o)}})}(t,i.mergeOptions(l,e))}),i.registerComponent("SourceMenuButton",n),i.registerComponent("SourceMenuItem",a)};return e("httpSourceSelector",t),t.VERSION="1.1.5",t});

File diff suppressed because one or more lines are too long

View File

@ -1,2 +0,0 @@
/*! @name videojs-overlay @version 2.1.4 @license Apache-2.0 */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("video.js"),require("global/window")):"function"==typeof define&&define.amd?define(["video.js","global/window"],e):t.videojsOverlay=e(t.videojs,t.window)}(this,function(t,e){"use strict";function n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}t=t&&t.hasOwnProperty("default")?t.default:t,e=e&&e.hasOwnProperty("default")?e.default:e;var r={align:"top-left",class:"",content:"This overlay will show up while the video is playing",debug:!1,showBackground:!0,attachToControlBar:!1,overlays:[{start:"playing",end:"paused"}]},i=t.getComponent("Component"),o=t.dom||t,s=t.registerPlugin||t.plugin,a=function(t){return"number"==typeof t&&t==t},h=function(t){return"string"==typeof t&&/^\S+$/.test(t)},d=function(r){var i,s;function d(t,e){var i;return i=r.call(this,t,e)||this,["start","end"].forEach(function(t){var e=i.options_[t];if(a(e))i[t+"Event_"]="timeupdate";else if(h(e))i[t+"Event_"]=e;else if("start"===t)throw new Error('invalid "start" option; expected number or string')}),["endListener_","rewindListener_","startListener_"].forEach(function(t){i[t]=function(e){return d.prototype[t].call(n(n(i)),e)}}),"timeupdate"===i.startEvent_&&i.on(t,"timeupdate",i.rewindListener_),i.debug('created, listening to "'+i.startEvent_+'" for "start" and "'+(i.endEvent_||"nothing")+'" for "end"'),i.hide(),i}s=r,(i=d).prototype=Object.create(s.prototype),i.prototype.constructor=i,i.__proto__=s;var l=d.prototype;return l.createEl=function(){var t=this.options_,n=t.content,r=t.showBackground?"vjs-overlay-background":"vjs-overlay-no-background",i=o.createEl("div",{className:"\n vjs-overlay\n vjs-overlay-"+t.align+"\n "+t.class+"\n "+r+"\n vjs-hidden\n "});return"string"==typeof n?i.innerHTML=n:n instanceof e.DocumentFragment?i.appendChild(n):o.appendContent(i,n),i},l.debug=function(){if(this.options_.debug){for(var e=t.log,n=e,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];e.hasOwnProperty(i[0])&&"function"==typeof e[i[0]]&&(n=e[i.shift()]),n.apply(void 0,["overlay#"+this.id()+": "].concat(i))}},l.hide=function(){return r.prototype.hide.call(this),this.debug("hidden"),this.debug('bound `startListener_` to "'+this.startEvent_+'"'),this.endEvent_&&(this.debug('unbound `endListener_` from "'+this.endEvent_+'"'),this.off(this.player(),this.endEvent_,this.endListener_)),this.on(this.player(),this.startEvent_,this.startListener_),this},l.shouldHide_=function(t,e){var n=this.options_.end;return a(n)?t>=n:n===e},l.show=function(){return r.prototype.show.call(this),this.off(this.player(),this.startEvent_,this.startListener_),this.debug("shown"),this.debug('unbound `startListener_` from "'+this.startEvent_+'"'),this.endEvent_&&(this.debug('bound `endListener_` to "'+this.endEvent_+'"'),this.on(this.player(),this.endEvent_,this.endListener_)),this},l.shouldShow_=function(t,e){var n=this.options_.start,r=this.options_.end;return a(n)?a(r)?t>=n&&t<r:this.hasShownSinceSeek_?Math.floor(t)===n:(this.hasShownSinceSeek_=!0,t>=n):n===e},l.startListener_=function(t){var e=this.player().currentTime();this.shouldShow_(e,t.type)&&this.show()},l.endListener_=function(t){var e=this.player().currentTime();this.shouldHide_(e,t.type)&&this.hide()},l.rewindListener_=function(t){var e=this.player().currentTime(),n=this.previousTime_,r=this.options_.start,i=this.options_.end;e<n&&(this.debug("rewind detected"),a(i)&&!this.shouldShow_(e)?(this.debug("hiding; "+i+" is an integer and overlay should not show at this time"),this.hasShownSinceSeek_=!1,this.hide()):h(i)&&e<r&&(this.debug("hiding; show point ("+r+") is before now ("+e+") and end point ("+i+") is an event"),this.hasShownSinceSeek_=!1,this.hide())),this.previousTime_=e},d}(i);t.registerComponent("Overlay",d);var l=function(e){var n=this,i=t.mergeOptions(r,e);Array.isArray(this.overlays_)&&this.overlays_.forEach(function(t){n.removeChild(t),n.controlBar&&n.controlBar.removeChild(t),t.dispose()});var o=i.overlays;delete i.overlays,this.overlays_=o.map(function(e){var r=t.mergeOptions(i,e),o="string"==typeof r.attachToControlBar||!0===r.attachToControlBar;if(!n.controls()||!n.controlBar)return n.addChild("overlay",r);if(o&&-1!==r.align.indexOf("bottom")){var s=n.controlBar.children()[0];if(void 0!==n.controlBar.getChild(r.attachToControlBar)&&(s=n.controlBar.getChild(r.attachToControlBar)),s){var a=n.controlBar.addChild("overlay",r);return n.controlBar.el().insertBefore(a.el(),s.el()),a}}var h=n.addChild("overlay",r);return n.el().insertBefore(h.el(),n.controlBar.el()),h})};return l.VERSION="2.1.4",s("overlay",l),l});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,2 +0,0 @@
/* videojs-hotkeys v0.2.25 - https://github.com/ctd1500/videojs-hotkeys */
!function(e,n){"undefined"!=typeof window&&window.videojs?n(window.videojs):"function"==typeof define&&define.amd?define("videojs-hotkeys",["video.js"],function(e){return n(e.default||e)}):"undefined"!=typeof module&&module.exports&&(module.exports=n(require("video.js")))}(0,function(e){"use strict";"undefined"!=typeof window&&(window.videojs_hotkeys={version:"0.2.25"});(e.registerPlugin||e.plugin)("hotkeys",function(n){function t(e){return"function"==typeof s?s(e):s}function r(e){null!=e&&"function"==typeof e.then&&e.then(null,function(e){})}var o=this,u=o.el(),l=document,i={volumeStep:.1,seekStep:5,enableMute:!0,enableVolumeScroll:!0,enableHoverScroll:!1,enableFullscreen:!0,enableNumbers:!0,enableJogStyle:!1,alwaysCaptureHotkeys:!1,enableModifiersForNumbers:!0,enableInactiveFocus:!0,skipInitialFocus:!1,playPauseKey:function(e){return 32===e.which||179===e.which},rewindKey:function(e){return 37===e.which||177===e.which},forwardKey:function(e){return 39===e.which||176===e.which},volumeUpKey:function(e){return 38===e.which},volumeDownKey:function(e){return 40===e.which},muteKey:function(e){return 77===e.which},fullscreenKey:function(e){return 70===e.which},customKeys:{}},c=e.mergeOptions||e.util.mergeOptions,a=(n=c(i,n||{})).volumeStep,s=n.seekStep,m=n.enableMute,f=n.enableVolumeScroll,y=n.enableHoverScroll,v=n.enableFullscreen,d=n.enableNumbers,p=n.enableJogStyle,b=n.alwaysCaptureHotkeys,h=n.enableModifiersForNumbers,w=n.enableInactiveFocus,k=n.skipInitialFocus,S=e.VERSION;u.hasAttribute("tabIndex")||u.setAttribute("tabIndex","-1"),u.style.outline="none",!b&&o.autoplay()||k||o.one("play",function(){u.focus()}),w&&o.on("userinactive",function(){var e=function(){clearTimeout(n)},n=setTimeout(function(){o.off("useractive",e);var n=l.activeElement,t=u.querySelector(".vjs-control-bar");n&&n.parentElement==t&&u.focus()},10);o.one("useractive",e)}),o.on("play",function(){var e=u.querySelector(".iframeblocker");e&&""===e.style.display&&(e.style.display="block",e.style.bottom="39px")});var K=!1,q=u.querySelector(".vjs-volume-menu-button")||u.querySelector(".vjs-volume-panel");null!=q&&(q.onmouseover=function(){K=!0},q.onmouseout=function(){K=!1});var j=function(e){if(y)n=0;else var n=l.activeElement;if(o.controls()&&(b||n==u||n==u.querySelector(".vjs-tech")||n==u.querySelector(".iframeblocker")||n==u.querySelector(".vjs-control-bar")||K)&&f){e=window.event||e;var t=Math.max(-1,Math.min(1,e.wheelDelta||-e.detail));e.preventDefault(),1==t?o.volume(o.volume()+a):-1==t&&o.volume(o.volume()-a)}},F=function(e,t){return n.playPauseKey(e,t)?1:n.rewindKey(e,t)?2:n.forwardKey(e,t)?3:n.volumeUpKey(e,t)?4:n.volumeDownKey(e,t)?5:n.muteKey(e,t)?6:n.fullscreenKey(e,t)?7:void 0};return o.on("keydown",function(e){var i,c,s=e.which,f=e.preventDefault,y=o.duration();if(o.controls()){var w=l.activeElement;if(b||w==u||w==u.querySelector(".vjs-tech")||w==u.querySelector(".vjs-control-bar")||w==u.querySelector(".iframeblocker"))switch(F(e,o)){case 1:f(),b&&e.stopPropagation(),o.paused()?r(o.play()):o.pause();break;case 2:i=!o.paused(),f(),i&&o.pause(),(c=o.currentTime()-t(e))<=0&&(c=0),o.currentTime(c),i&&r(o.play());break;case 3:i=!o.paused(),f(),i&&o.pause(),(c=o.currentTime()+t(e))>=y&&(c=i?y-.001:y),o.currentTime(c),i&&r(o.play());break;case 5:f(),p?(c=o.currentTime()-1,o.currentTime()<=1&&(c=0),o.currentTime(c)):o.volume(o.volume()-a);break;case 4:f(),p?((c=o.currentTime()+1)>=y&&(c=y),o.currentTime(c)):o.volume(o.volume()+a);break;case 6:m&&o.muted(!o.muted());break;case 7:v&&(o.isFullscreen()?o.exitFullscreen():o.requestFullscreen());break;default:if((s>47&&s<59||s>95&&s<106)&&(h||!(e.metaKey||e.ctrlKey||e.altKey))&&d){var k=48;s>95&&(k=96);var S=s-k;f(),o.currentTime(o.duration()*S*.1)}for(var K in n.customKeys){var q=n.customKeys[K];q&&q.key&&q.handler&&q.key(e)&&(f(),q.handler(o,n,e))}}}}),o.on("dblclick",function(e){if(null!=S&&S<="7.1.0"&&o.controls()){var n=e.relatedTarget||e.toElement||l.activeElement;n!=u&&n!=u.querySelector(".vjs-tech")&&n!=u.querySelector(".iframeblocker")||v&&(o.isFullscreen()?o.exitFullscreen():o.requestFullscreen())}}),o.on("mousewheel",j),o.on("DOMMouseScroll",j),this})});

View File

@ -1,30 +1,35 @@
'use strict';
var video_data = JSON.parse(document.getElementById('video_data').textContent);
var spinnerHTML = '<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3>';
var spinnerHTMLwithHR = spinnerHTML + '<hr>';
String.prototype.supplant = function (o) {
return this.replace(/{([^{}]*)}/g, function (a, b) {
var r = o[b];
return typeof r === 'string' || typeof r === 'number' ? r : a;
});
}
};
function toggle_parent(target) {
body = target.parentNode.parentNode.children[1];
if (body.style.display === null || body.style.display === '') {
target.innerHTML = '[ + ]';
body.style.display = 'none';
} else {
target.innerHTML = '[ - ]';
var body = target.parentNode.parentNode.children[1];
if (body.style.display === 'none') {
target.textContent = '[ ]';
body.style.display = '';
} else {
target.textContent = '[ + ]';
body.style.display = 'none';
}
}
function toggle_comments(event) {
var target = event.target;
body = target.parentNode.parentNode.parentNode.children[1];
if (body.style.display === null || body.style.display === '') {
target.innerHTML = '[ + ]';
body.style.display = 'none';
} else {
target.innerHTML = '[ - ]';
var body = target.parentNode.parentNode.parentNode.children[1];
if (body.style.display === 'none') {
target.textContent = '[ ]';
body.style.display = '';
} else {
target.textContent = '[ + ]';
body.style.display = 'none';
}
}
@ -41,13 +46,13 @@ function swap_comments(event) {
function hide_youtube_replies(event) {
var target = event.target;
sub_text = target.getAttribute('data-inner-text');
inner_text = target.getAttribute('data-sub-text');
var sub_text = target.getAttribute('data-inner-text');
var inner_text = target.getAttribute('data-sub-text');
body = target.parentNode.parentNode.children[1];
var body = target.parentNode.parentNode.children[1];
body.style.display = 'none';
target.innerHTML = sub_text;
target.textContent = sub_text;
target.onclick = show_youtube_replies;
target.setAttribute('data-inner-text', inner_text);
target.setAttribute('data-sub-text', sub_text);
@ -56,13 +61,13 @@ function hide_youtube_replies(event) {
function show_youtube_replies(event) {
var target = event.target;
sub_text = target.getAttribute('data-inner-text');
inner_text = target.getAttribute('data-sub-text');
var sub_text = target.getAttribute('data-inner-text');
var inner_text = target.getAttribute('data-sub-text');
body = target.parentNode.parentNode.children[1];
var body = target.parentNode.parentNode.children[1];
body.style.display = '';
target.innerHTML = sub_text;
target.textContent = sub_text;
target.onclick = hide_youtube_replies;
target.setAttribute('data-inner-text', inner_text);
target.setAttribute('data-sub-text', sub_text);
@ -73,374 +78,273 @@ if (continue_button) {
continue_button.onclick = continue_autoplay;
}
function next_video() {
var url = new URL('https://example.com/watch?v=' + video_data.next_video);
if (video_data.params.autoplay || video_data.params.continue_autoplay)
url.searchParams.set('autoplay', '1');
if (video_data.params.listen !== video_data.preferences.listen)
url.searchParams.set('listen', video_data.params.listen);
if (video_data.params.speed !== video_data.preferences.speed)
url.searchParams.set('speed', video_data.params.speed);
if (video_data.params.local !== video_data.preferences.local)
url.searchParams.set('local', video_data.params.local);
url.searchParams.set('continue', '1');
location.assign(url.pathname + url.search);
}
function continue_autoplay(event) {
if (event.target.checked) {
player.on('ended', function () {
var url = new URL('https://example.com/watch?v=' + video_data.next_video);
if (video_data.params.autoplay || video_data.params.continue_autoplay) {
url.searchParams.set('autoplay', '1');
}
if (video_data.params.listen !== video_data.preferences.listen) {
url.searchParams.set('listen', video_data.params.listen);
}
if (video_data.params.speed !== video_data.preferences.speed) {
url.searchParams.set('speed', video_data.params.speed);
}
if (video_data.params.local !== video_data.preferences.local) {
url.searchParams.set('local', video_data.params.local);
}
url.searchParams.set('continue', '1');
location.assign(url.pathname + url.search);
});
player.on('ended', next_video);
} else {
player.off('ended');
}
}
function number_with_separator(val) {
while (/(\d+)(\d{3})/.test(val.toString())) {
val = val.toString().replace(/(\d+)(\d{3})/, '$1' + ',' + '$2');
}
return val;
}
function get_playlist(plid) {
var playlist = document.getElementById('playlist');
function get_playlist(plid, retries = 5) {
playlist = document.getElementById('playlist');
if (retries <= 0) {
console.log('Failed to pull playlist');
playlist.innerHTML = '';
return;
}
playlist.innerHTML = ' \
<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3> \
<hr>'
playlist.innerHTML = spinnerHTMLwithHR;
var plid_url;
if (plid.startsWith('RD')) {
var plid_url = '/api/v1/mixes/' + plid +
plid_url = '/api/v1/mixes/' + plid +
'?continuation=' + video_data.id +
'&format=html&hl=' + video_data.preferences.locale;
} else {
var plid_url = '/api/v1/playlists/' + plid +
'?continuation=' + video_data.id +
plid_url = '/api/v1/playlists/' + plid +
'?index=' + video_data.index +
'&continuation=' + video_data.id +
'&format=html&hl=' + video_data.preferences.locale;
}
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 10000;
xhr.open('GET', plid_url, true);
helpers.xhr('GET', plid_url, {retries: 5, entity_name: 'playlist'}, {
on200: function (response) {
playlist.innerHTML = response.playlistHtml;
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
playlist.innerHTML = xhr.response.playlistHtml;
if (!response.nextVideo) return;
if (xhr.response.nextVideo) {
player.on('ended', function () {
var url = new URL('https://example.com/watch?v=' + xhr.response.nextVideo);
var nextVideo = document.getElementById(response.nextVideo);
nextVideo.parentNode.parentNode.scrollTop = nextVideo.offsetTop;
if (video_data.params.autoplay || video_data.params.continue_autoplay) {
url.searchParams.set('autoplay', '1');
}
player.on('ended', function () {
var url = new URL('https://example.com/watch?v=' + response.nextVideo);
if (video_data.params.listen !== video_data.preferences.listen) {
url.searchParams.set('listen', video_data.params.listen);
}
url.searchParams.set('list', plid);
if (!plid.startsWith('RD'))
url.searchParams.set('index', response.index);
if (video_data.params.autoplay || video_data.params.continue_autoplay)
url.searchParams.set('autoplay', '1');
if (video_data.params.listen !== video_data.preferences.listen)
url.searchParams.set('listen', video_data.params.listen);
if (video_data.params.speed !== video_data.preferences.speed)
url.searchParams.set('speed', video_data.params.speed);
if (video_data.params.local !== video_data.preferences.local)
url.searchParams.set('local', video_data.params.local);
if (video_data.params.speed !== video_data.preferences.speed) {
url.searchParams.set('speed', video_data.params.speed);
}
if (video_data.params.local !== video_data.preferences.local) {
url.searchParams.set('local', video_data.params.local);
}
url.searchParams.set('list', plid);
location.assign(url.pathname + url.search);
});
}
} else {
playlist.innerHTML = '';
document.getElementById('continue').style.display = '';
}
location.assign(url.pathname + url.search);
});
},
onNon200: function (xhr) {
playlist.innerHTML = '';
document.getElementById('continue').style.display = '';
},
onError: function (xhr) {
playlist.innerHTML = spinnerHTMLwithHR;
},
onTimeout: function (xhr) {
playlist.innerHTML = spinnerHTMLwithHR;
}
}
xhr.onerror = function () {
playlist = document.getElementById('playlist');
playlist.innerHTML =
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3><hr>';
console.log('Pulling playlist timed out... ' + retries + '/5');
setTimeout(function () { get_playlist(plid, retries - 1) }, 1000);
}
xhr.ontimeout = function () {
playlist = document.getElementById('playlist');
playlist.innerHTML =
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3><hr>';
console.log('Pulling playlist timed out... ' + retries + '/5');
get_playlist(plid, retries - 1);
}
xhr.send();
});
}
function get_reddit_comments(retries = 5) {
comments = document.getElementById('comments');
if (retries <= 0) {
console.log('Failed to pull comments');
comments.innerHTML = '';
return;
}
function get_reddit_comments() {
var comments = document.getElementById('comments');
var fallback = comments.innerHTML;
comments.innerHTML =
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3>';
comments.innerHTML = spinnerHTML;
var url = '/api/v1/comments/' + video_data.id +
'?source=reddit&format=html' +
'&hl=' + video_data.preferences.locale;
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 10000;
xhr.open('GET', url, true);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
comments.innerHTML = ' \
<div> \
<h3> \
<a href="javascript:void(0)">[ - ]</a> \
{title} \
</h3> \
<p> \
<b> \
<a href="javascript:void(0)" data-comments="youtube"> \
{youtubeCommentsText} \
</a> \
</b> \
</p> \
var onNon200 = function (xhr) { comments.innerHTML = fallback; };
if (video_data.params.comments[1] === 'youtube')
onNon200 = function (xhr) {};
helpers.xhr('GET', url, {retries: 5, entity_name: ''}, {
on200: function (response) {
comments.innerHTML = ' \
<div> \
<h3> \
<a href="javascript:void(0)">[ ]</a> \
{title} \
</h3> \
<p> \
<b> \
<a rel="noopener" target="_blank" href="https://reddit.com{permalink}">{redditPermalinkText}</a> \
<a href="javascript:void(0)" data-comments="youtube"> \
{youtubeCommentsText} \
</a> \
</b> \
</div> \
<div>{contentHtml}</div> \
<hr>'.supplant({
title: xhr.response.title,
youtubeCommentsText: video_data.youtube_comments_text,
redditPermalinkText: video_data.reddit_permalink_text,
permalink: xhr.response.permalink,
contentHtml: xhr.response.contentHtml
});
</p> \
<b> \
<a rel="noopener" target="_blank" href="https://reddit.com{permalink}">{redditPermalinkText}</a> \
</b> \
</div> \
<div>{contentHtml}</div> \
<hr>'.supplant({
title: response.title,
youtubeCommentsText: video_data.youtube_comments_text,
redditPermalinkText: video_data.reddit_permalink_text,
permalink: response.permalink,
contentHtml: response.contentHtml
});
comments.children[0].children[0].children[0].onclick = toggle_comments;
comments.children[0].children[1].children[0].onclick = swap_comments;
} else {
if (video_data.params.comments[1] === 'youtube') {
console.log('Pulling comments failed... ' + retries + '/5');
setTimeout(function () { get_youtube_comments(retries - 1) }, 1000);
} else {
comments.innerHTML = fallback;
}
}
}
}
xhr.onerror = function () {
console.log('Pulling comments failed... ' + retries + '/5');
setInterval(function () { get_reddit_comments(retries - 1) }, 1000);
}
xhr.ontimeout = function () {
console.log('Pulling comments failed... ' + retries + '/5');
get_reddit_comments(retries - 1);
}
xhr.send();
comments.children[0].children[0].children[0].onclick = toggle_comments;
comments.children[0].children[1].children[0].onclick = swap_comments;
},
onNon200: onNon200, // declared above
});
}
function get_youtube_comments(retries = 5) {
comments = document.getElementById('comments');
if (retries <= 0) {
console.log('Failed to pull comments');
comments.innerHTML = '';
return;
}
function get_youtube_comments() {
var comments = document.getElementById('comments');
var fallback = comments.innerHTML;
comments.innerHTML =
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3>';
comments.innerHTML = spinnerHTML;
var url = '/api/v1/comments/' + video_data.id +
'?format=html' +
'&hl=' + video_data.preferences.locale +
'&thin_mode=' + video_data.preferences.thin_mode;
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 10000;
xhr.open('GET', url, true);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
comments.innerHTML = ' \
<div> \
<h3> \
<a href="javascript:void(0)">[ - ]</a> \
{commentsText} \
</h3> \
<b> \
<a href="javascript:void(0)" data-comments="reddit"> \
{redditComments} \
</a> \
</b> \
</div> \
<div>{contentHtml}</div> \
<hr>'.supplant({
contentHtml: xhr.response.contentHtml,
redditComments: video_data.reddit_comments_text,
commentsText: video_data.comments_text.supplant(
{ commentCount: number_with_separator(xhr.response.commentCount) }
)
});
var onNon200 = function (xhr) { comments.innerHTML = fallback; };
if (video_data.params.comments[1] === 'youtube')
onNon200 = function (xhr) {};
comments.children[0].children[0].children[0].onclick = toggle_comments;
comments.children[0].children[1].children[0].onclick = swap_comments;
} else {
if (video_data.params.comments[1] === 'youtube') {
setTimeout(function () { get_youtube_comments(retries - 1) }, 1000);
} else {
comments.innerHTML = '';
}
}
helpers.xhr('GET', url, {retries: 5, entity_name: 'comments'}, {
on200: function (response) {
comments.innerHTML = ' \
<div> \
<h3> \
<a href="javascript:void(0)">[ ]</a> \
{commentsText} \
</h3> \
<b> \
<a href="javascript:void(0)" data-comments="reddit"> \
{redditComments} \
</a> \
</b> \
</div> \
<div>{contentHtml}</div> \
<hr>'.supplant({
contentHtml: response.contentHtml,
redditComments: video_data.reddit_comments_text,
commentsText: video_data.comments_text.supplant({
// toLocaleString correctly splits number with local thousands separator. e.g.:
// '1,234,567.89' for user with English locale
// '1 234 567,89' for user with Russian locale
// '1.234.567,89' for user with Portuguese locale
commentCount: response.commentCount.toLocaleString()
})
});
comments.children[0].children[0].children[0].onclick = toggle_comments;
comments.children[0].children[1].children[0].onclick = swap_comments;
},
onNon200: onNon200, // declared above
onError: function (xhr) {
comments.innerHTML = spinnerHTML;
},
onTimeout: function (xhr) {
comments.innerHTML = spinnerHTML;
}
}
xhr.onerror = function () {
comments.innerHTML =
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3>';
console.log('Pulling comments failed... ' + retries + '/5');
setInterval(function () { get_youtube_comments(retries - 1) }, 1000);
}
xhr.ontimeout = function () {
comments.innerHTML =
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3>';
console.log('Pulling comments failed... ' + retries + '/5');
get_youtube_comments(retries - 1);
}
xhr.send();
});
}
function get_youtube_replies(target, load_more) {
function get_youtube_replies(target, load_more, load_replies) {
var continuation = target.getAttribute('data-continuation');
var body = target.parentNode.parentNode;
var fallback = body.innerHTML;
body.innerHTML =
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3>';
body.innerHTML = spinnerHTML;
var url = '/api/v1/comments/' + video_data.id +
'?format=html' +
'&hl=' + video_data.preferences.locale +
'&thin_mode=' + video_data.preferences.thin_mode +
'&continuation=' + continuation;
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 10000;
xhr.open('GET', url, true);
if (load_replies) url += '&action=action_get_comment_replies';
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
if (load_more) {
body = body.parentNode.parentNode;
body.removeChild(body.lastElementChild);
body.innerHTML += xhr.response.contentHtml;
} else {
body.removeChild(body.lastElementChild);
var p = document.createElement('p');
var a = document.createElement('a');
p.appendChild(a);
a.href = 'javascript:void(0)';
a.onclick = hide_youtube_replies;
a.setAttribute('data-sub-text', video_data.hide_replies_text);
a.setAttribute('data-inner-text', video_data.show_replies_text);
a.innerText = video_data.hide_replies_text;
var div = document.createElement('div');
div.innerHTML = xhr.response.contentHtml;
body.appendChild(p);
body.appendChild(div);
}
helpers.xhr('GET', url, {}, {
on200: function (response) {
if (load_more) {
body = body.parentNode.parentNode;
body.removeChild(body.lastElementChild);
body.innerHTML += response.contentHtml;
} else {
body.innerHTML = fallback;
body.removeChild(body.lastElementChild);
var p = document.createElement('p');
var a = document.createElement('a');
p.appendChild(a);
a.href = 'javascript:void(0)';
a.onclick = hide_youtube_replies;
a.setAttribute('data-sub-text', video_data.hide_replies_text);
a.setAttribute('data-inner-text', video_data.show_replies_text);
a.textContent = video_data.hide_replies_text;
var div = document.createElement('div');
div.innerHTML = response.contentHtml;
body.appendChild(p);
body.appendChild(div);
}
},
onNon200: function (xhr) {
body.innerHTML = fallback;
},
onTimeout: function (xhr) {
console.warn('Pulling comments failed');
body.innerHTML = fallback;
}
}
xhr.ontimeout = function () {
console.log('Pulling comments failed.');
body.innerHTML = fallback;
}
xhr.send();
});
}
if (video_data.play_next) {
player.on('ended', function () {
var url = new URL('https://example.com/watch?v=' + video_data.next_video);
if (video_data.params.autoplay || video_data.params.continue_autoplay) {
if (video_data.params.autoplay || video_data.params.continue_autoplay)
url.searchParams.set('autoplay', '1');
}
if (video_data.params.listen !== video_data.preferences.listen) {
if (video_data.params.listen !== video_data.preferences.listen)
url.searchParams.set('listen', video_data.params.listen);
}
if (video_data.params.speed !== video_data.preferences.speed) {
if (video_data.params.speed !== video_data.preferences.speed)
url.searchParams.set('speed', video_data.params.speed);
}
if (video_data.params.local !== video_data.preferences.local) {
if (video_data.params.local !== video_data.preferences.local)
url.searchParams.set('local', video_data.params.local);
}
url.searchParams.set('continue', '1');
location.assign(url.pathname + url.search);
});
}
if (video_data.plid) {
get_playlist(video_data.plid);
}
addEventListener('load', function (e) {
if (video_data.plid)
get_playlist(video_data.plid);
if (video_data.params.comments[0] === 'youtube') {
get_youtube_comments();
} else if (video_data.params.comments[0] === 'reddit') {
get_reddit_comments();
} else if (video_data.params.comments[1] === 'youtube') {
get_youtube_comments();
} else if (video_data.params.comments[1] === 'reddit') {
get_reddit_comments();
} else {
comments = document.getElementById('comments');
comments.innerHTML = '';
}
if (video_data.params.comments[0] === 'youtube') {
get_youtube_comments();
} else if (video_data.params.comments[0] === 'reddit') {
get_reddit_comments();
} else if (video_data.params.comments[1] === 'youtube') {
get_youtube_comments();
} else if (video_data.params.comments[1] === 'reddit') {
get_reddit_comments();
} else {
var comments = document.getElementById('comments');
comments.innerHTML = '';
}
});

View File

@ -1,48 +1,34 @@
'use strict';
var watched_data = JSON.parse(document.getElementById('watched_data').textContent);
var payload = 'csrf_token=' + watched_data.csrf_token;
function mark_watched(target) {
var tile = target.parentNode.parentNode.parentNode.parentNode.parentNode;
tile.style.display = 'none';
var url = '/watch_ajax?action_mark_watched=1&redirect=false' +
'&id=' + target.getAttribute('data-id');
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 10000;
xhr.open('POST', url, true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
if (xhr.status != 200) {
tile.style.display = '';
}
helpers.xhr('POST', url, {payload: payload}, {
onNon200: function (xhr) {
tile.style.display = '';
}
}
xhr.send('csrf_token=' + watched_data.csrf_token);
});
}
function mark_unwatched(target) {
var tile = target.parentNode.parentNode.parentNode.parentNode.parentNode;
tile.style.display = 'none';
var count = document.getElementById('count')
count.innerText = count.innerText - 1;
var count = document.getElementById('count');
count.textContent--;
var url = '/watch_ajax?action_mark_unwatched=1&redirect=false' +
'&id=' + target.getAttribute('data-id');
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 10000;
xhr.open('POST', url, true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
if (xhr.status != 200) {
count.innerText = count.innerText - 1 + 2;
tile.style.display = '';
}
helpers.xhr('POST', url, {payload: payload}, {
onNon200: function (xhr) {
count.textContent++;
tile.style.display = '';
}
}
xhr.send('csrf_token=' + watched_data.csrf_token);
}
});
}

View File

@ -1,3 +1,2 @@
User-agent: *
Disallow: /search
Disallow: /login
Disallow: /

4
assets/videojs/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

871
config/config.example.yml Normal file
View File

@ -0,0 +1,871 @@
#########################################
#
# Database configuration
#
#########################################
##
## Database configuration with separate parameters.
## This setting is MANDATORY, unless 'database_url' is used.
##
db:
user: kemal
password: kemal
host: localhost
port: 5432
dbname: invidious
##
## Database configuration using a single URI. This is an
## alternative to the 'db' parameter above. If both forms
## are used, then only database_url is used.
## This setting is MANDATORY, unless 'db' is used.
##
## Note: The 'database_url' setting allows the use of UNIX
## sockets. To do so, remove the IP address (or FQDN) and port
## and append the 'host' parameter. E.g:
## postgres://kemal:kemal@/invidious?host=/var/run/postgresql
##
## Accepted values: a postgres:// URI
## Default: postgres://kemal:kemal@localhost:5432/invidious
##
#database_url: postgres://kemal:kemal@localhost:5432/invidious
##
## Enable automatic table integrity check. This will create
## the required tables and columns if anything is missing.
##
## Accepted values: true, false
## Default: false
##
#check_tables: false
#########################################
#
# Server config
#
#########################################
# -----------------------------
# Network (inbound)
# -----------------------------
##
## Port to listen on for incoming connections.
##
## Note: Ports lower than 1024 requires either root privileges
## (not recommended) or the "CAP_NET_BIND_SERVICE" capability
## (See https://stackoverflow.com/a/414258 and `man capabilities`)
##
## Accepted values: 1-65535
## Default: 3000
##
#port: 3000
##
## When the invidious instance is behind a proxy, and the proxy
## listens on a different port than the instance does, this lets
## invidious know about it. This is used to craft absolute URLs
## to the instance (e.g in the API).
##
## Note: This setting is MANDATORY if invidious is behind a
## reverse proxy.
##
## Accepted values: 1-65535
## Default: <none>
##
#external_port:
##
## Interface address to listen on for incoming connections.
##
## Accepted values: a valid IPv4 or IPv6 address.
## default: 0.0.0.0 (listen on all interfaces)
##
#host_binding: 0.0.0.0
##
## Domain name under which this instance is hosted. This is
## used to craft absolute URLs to the instance (e.g in the API).
## The domain MUST be defined if your instance is accessed from
## a domain name (like 'example.com').
##
## Accepted values: a fully qualified domain name (FQDN)
## Default: <none>
##
domain:
##
## Tell Invidious that it is behind a proxy that provides only
## HTTPS, so all links must use the https:// scheme. This
## setting MUST be set to true if invidious is behind a
## reverse proxy serving HTTPs.
##
## Accepted values: true, false
## Default: false
##
https_only: false
##
## Enable/Disable 'Strict-Transport-Security'. Make sure that
## the domain specified under 'domain' is served securely.
##
## Accepted values: true, false
## Default: true
##
#hsts: true
# -----------------------------
# Network (outbound)
# -----------------------------
##
## Disable proxying server-wide. Can be disable as a whole, or
## only for a single function.
##
## Accepted values: true, false, dash, livestreams, downloads, local
## Default: false
##
#disable_proxy: false
##
## Size of the HTTP pool used to connect to youtube. Each
## domain ('youtube.com', 'ytimg.com', ...) has its own pool.
##
## Accepted values: a positive integer
## Default: 100
##
#pool_size: 100
##
## Enable/Disable the use of QUIC (HTTP/3) when connecting
## to the youtube API and websites ('youtube.com', 'ytimg.com').
## QUIC's main advantages are its lower latency and lower bandwidth
## use, compared to its predecessors. However, the current version
## of QUIC used in invidious is still based on the IETF draft 31,
## meaning that the underlying library may still not be fully
## optimized. You can read more about QUIC at the link below:
## https://datatracker.ietf.org/doc/html/draft-ietf-quic-transport-31
##
## Note: you should try both options and see what is the best for your
## instance. In general QUIC is recommended for public instances. Your
## mileage may vary.
##
## Note 2: Using QUIC prevents some captcha challenges from appearing.
## See: https://github.com/iv-org/invidious/issues/957#issuecomment-576424042
##
## Accepted values: true, false
## Default: false
##
#use_quic: false
##
## Additional cookies to be sent when requesting the youtube API.
##
## Accepted values: a string in the format "name1=value1; name2=value2..."
## Default: <none>
##
#cookies:
##
## Force connection to youtube over a specific IP family.
##
## Note: This may sometimes resolve issues involving rate-limiting.
## See https://github.com/ytdl-org/youtube-dl/issues/21729.
##
## Accepted values: ipv4, ipv6
## Default: <none>
##
#force_resolve:
# -----------------------------
# Logging
# -----------------------------
##
## Path to log file. Can be absolute or relative to the invidious
## binary. This is overridden if "-o OUTPUT" or "--output=OUTPUT"
## are passed on the command line.
##
## Accepted values: a filesystem path or 'STDOUT'
## Default: STDOUT
##
#output: STDOUT
##
## Logging Verbosity. This is overridden if "-l LEVEL" or
## "--log-level=LEVEL" are passed on the command line.
##
## Accepted values: All, Trace, Debug, Info, Warn, Error, Fatal, Off
## Default: Info
##
#log_level: Info
# -----------------------------
# Features
# -----------------------------
##
## Enable/Disable the "Popular" tab on the main page.
##
## Accepted values: true, false
## Default: true
##
#popular_enabled: true
##
## Enable/Disable statstics (available at /api/v1/stats).
## The following data is available:
## - Software name ("invidious") and version+branch (same data as
## displayed in the footer, e.g: "2021.05.13-75e5b49" / "master")
## - The value of the 'registration_enabled' config (true/false)
## - Number of currently registered users
## - Number of registered users who connected in the last month
## - Number of registered users who connected in the last 6 months
## - Timestamp of the last server restart
## - Timestamp of the last "Channel Refresh" job execution
##
## Warning: This setting MUST be set to true if you plan to run
## a public instance. It is used by api.invidious.io to refresh
## your instance's status.
##
## Accepted values: true, false
## Default: false
##
#statistics_enabled: false
# -----------------------------
# Users and accounts
# -----------------------------
##
## Allow/Forbid Invidious (local) account creation. Invidious
## accounts allow users to subscribe to channels and to create
## playlists without a Google account.
##
## Accepted values: true, false
## Default: true
##
#registration_enabled: true
##
## Allow/Forbid users to log-in. This setting affects the ability
## to connect with BOTH Google and Invidious (local) accounts.
##
## Accepted values: true, false
## Default: true
##
#login_enabled: true
##
## Enable/Disable the captcha challenge on the login page.
##
## Note: this is a basic captcha challenge that doesn't
## depend on any third parties.
##
## Accepted values: true, false
## Default: true
##
#captcha_enabled: true
##
## List of usernames that will be granted administrator rights.
## A user with administrator rights will be able to change the
## server configuration options listed below in /preferences,
## in addition to the usual user preferences.
##
## Server-wide settings:
## - popular_enabled
## - captcha_enabled
## - login_enabled
## - registration_enabled
## - statistics_enabled
## Default user preferences:
## - default_home
## - feed_menu
##
## Accepted values: an array of strings
## Default: [""]
##
#admins: [""]
# -----------------------------
# Background jobs
# -----------------------------
##
## Number of threads to use when crawling channel videos (during
## subscriptions update).
##
## Notes:
## - Setting this to 0 will disable the channel videos crawl job.
## - This setting is overridden if "-c THREADS" or
## "--channel-threads=THREADS" are passed on the command line.
##
## Accepted values: a positive integer
## Default: 1
##
channel_threads: 1
##
## Time interval between two executions of the job that crawls
## channel videos (subscriptions update).
##
## Accepted values: a valid time interval (like 1h30m or 90m)
## Default: 30m
##
#channel_refresh_interval: 30m
##
## Forcefully dump and re-download the entire list of uploaded
## videos when crawling channel (during subscriptions update).
##
## Accepted values: true, false
## Default: false
##
full_refresh: false
##
## Number of threads to use when updating RSS feeds.
##
## Notes:
## - Setting this to 0 will disable the channel videos crawl job.
## - This setting is overridden if "-f THREADS" or
## "--feed-threads=THREADS" are passed on the command line.
##
## Accepted values: a positive integer
## Default: 1
##
feed_threads: 1
##
## Enable/Disable the polling job that keeps the decryption
## function (for "secured" videos) up to date.
##
## Note: This part of the code generate a small amount of data every minute.
## This may not be desired if you have bandwidth limits set by your ISP.
##
## Note 2: This part of the code is currently broken, so changing
## this setting has no impact.
##
## Accepted values: true, false
## Default: false
##
#decrypt_polling: false
# -----------------------------
# Captcha API
# -----------------------------
##
## URL of the captcha solving service.
##
## Accepted values: any URL
## Default: https://api.anti-captcha.com
##
#captcha_api_url: https://api.anti-captcha.com
##
## API key for the captcha solving service.
##
## Accepted values: a string
## Default: <none>
##
#captcha_key:
# -----------------------------
# Miscellaneous
# -----------------------------
##
## custom banner displayed at the top of every page. This can
## used for instance announcements, e.g.
##
## Accepted values: any string. HTML is accepted.
## Default: <none>
##
#banner:
##
## Subscribe to channels using PubSubHub (Google PubSubHubbub service).
## PubSubHub allows Invidious to be instantly notified when a new video
## is published on any subscribed channels. When PubSubHub is not used,
## Invidious will check for new videos every minute.
##
## Note: This setting is recommended for public instances.
##
## Note 2:
## - Requires a public instance (it uses /feed/webhook/v1)
## - Requires 'domain' and 'hmac_key' to be set.
## - Setting this parameter to any number greater than zero will
## enable channel subscriptions via PubSubHub, but will limit the
## amount of concurrent subscriptions.
##
## Accepted values: true, false, a positive integer
## Default: false
##
#use_pubsub_feeds: false
##
## HMAC signing key used for CSRF tokens and pubsub
## subscriptions verification.
##
## Accepted values: a string
## Default: <none>
##
#hmac_key:
##
## List of video IDs where the "download" widget must be
## disabled, in order to comply with DMCA requests.
##
## Accepted values: an array of string
## Default: <none>
##
#dmca_content:
##
## Cache video annotations in the database.
##
## Warning: empty annotations or annotations that only contain
## cards won't be cached.
##
## Accepted values: true, false
## Default: false
##
#cache_annotations: false
##
## Source code URL. If your instance is running a modified source
## code, you MUST publish it somewhere and set this option.
##
## Accepted values: a string
## Default: <none>
##
#modified_source_code_url: ""
#########################################
#
# Default user preferences
#
#########################################
##
## NOTE: All the settings below define the default user
## preferences. They will apply to ALL users connecting
## without a preferences cookie (so either on the first
## connection to the instance or after clearing the
## browser's cookies).
##
default_user_preferences:
# -----------------------------
# Internationalization
# -----------------------------
##
## Default user interface language (locale).
##
## Note: When hosting a public instance, overriding the
## default (english) is not recommended, as it may
## people using other languages.
##
## Accepted values:
## ar (Arabic)
## da (Danish)
## de (German)
## en-US (english, US)
## el (Greek)
## eo (Esperanto)
## es (Spanish)
## fa (Persian)
## fi (Finnish)
## fr (French)
## he (Hebrew)
## hr (Hungarian)
## id (Indonesian)
## is (Icelandic)
## it (Italian)
## ja (Japanese)
## nb-NO (Norwegian, Bokmål)
## nl (Dutch)
## pl (Polish)
## pt-BR (Portuguese, Brazil)
## pt-PT (Portuguese, Portugal)
## ro (Romanian)
## ru (Russian)
## sv (Swedish)
## tr (Turkish)
## uk (Ukrainian)
## zh-CN (Chinese, China) (a.k.a "Simplified Chinese")
## zh-TW (Chinese, Taiwan) (a.k.a "Traditional Chinese")
##
## Default: en-US
##
#locale: en-US
##
## Default geographical location for content.
##
## Accepted values:
## AE, AR, AT, AU, AZ, BA, BD, BE, BG, BH, BO, BR, BY, CA, CH, CL, CO, CR,
## CY, CZ, DE, DK, DO, DZ, EC, EE, EG, ES, FI, FR, GB, GE, GH, GR, GT, HK,
## HN, HR, HU, ID, IE, IL, IN, IQ, IS, IT, JM, JO, JP, KE, KR, KW, KZ, LB,
## LI, LK, LT, LU, LV, LY, MA, ME, MK, MT, MX, MY, NG, NI, NL, NO, NP, NZ,
## OM, PA, PE, PG, PH, PK, PL, PR, PT, PY, QA, RO, RS, RU, SA, SE, SG, SI,
## SK, SN, SV, TH, TN, TR, TW, TZ, UA, UG, US, UY, VE, VN, YE, ZA, ZW
##
## Default: US
##
#region: US
##
## Top 3 preferred languages for video captions.
##
## Note: overriding the default (no preferred
## caption language) is not recommended, in order
## to not penalize people using other languages.
##
## Accepted values: a three-entries array.
## Each entry can be one of:
## "English", "English (auto-generated)",
## "Afrikaans", "Albanian", "Amharic", "Arabic",
## "Armenian", "Azerbaijani", "Bangla", "Basque",
## "Belarusian", "Bosnian", "Bulgarian", "Burmese",
## "Catalan", "Cebuano", "Chinese (Simplified)",
## "Chinese (Traditional)", "Corsican", "Croatian",
## "Czech", "Danish", "Dutch", "Esperanto", "Estonian",
## "Filipino", "Finnish", "French", "Galician", "Georgian",
## "German", "Greek", "Gujarati", "Haitian Creole", "Hausa",
## "Hawaiian", "Hebrew", "Hindi", "Hmong", "Hungarian",
## "Icelandic", "Igbo", "Indonesian", "Irish", "Italian",
## "Japanese", "Javanese", "Kannada", "Kazakh", "Khmer",
## "Korean", "Kurdish", "Kyrgyz", "Lao", "Latin", "Latvian",
## "Lithuanian", "Luxembourgish", "Macedonian",
## "Malagasy", "Malay", "Malayalam", "Maltese", "Maori",
## "Marathi", "Mongolian", "Nepali", "Norwegian Bokmål",
## "Nyanja", "Pashto", "Persian", "Polish", "Portuguese",
## "Punjabi", "Romanian", "Russian", "Samoan",
## "Scottish Gaelic", "Serbian", "Shona", "Sindhi",
## "Sinhala", "Slovak", "Slovenian", "Somali",
## "Southern Sotho", "Spanish", "Spanish (Latin America)",
## "Sundanese", "Swahili", "Swedish", "Tajik", "Tamil",
## "Telugu", "Thai", "Turkish", "Ukrainian", "Urdu",
## "Uzbek", "Vietnamese", "Welsh", "Western Frisian",
## "Xhosa", "Yiddish", "Yoruba", "Zulu"
##
## Default: ["", "", ""]
##
#captions: ["", "", ""]
# -----------------------------
# Interface
# -----------------------------
##
## Enable/Disable dark mode.
##
## Accepted values: true, false
## Default: <none>
##
#dark_mode:
##
## Enable/Disable thin mode (no video thumbnails).
##
## Accepted values: true, false
## Default: false
##
#thin_mode: false
##
## List of feeds available on the home page.
##
## Note: "Subscriptions" and "Playlists" are only visible
## when the user is logged in.
##
## Accepted values: A list of strings
## Each entry can be one of: "Popular", "Trending",
## "Subscriptions", "Playlists"
##
## Default: ["Popular", "Trending", "Subscriptions", "Playlists"] (show all feeds)
##
#feed_menu: ["Popular", "Trending", "Subscriptions", "Playlists"]
##
## Default feed to display on the home page.
##
## Note: setting this option to "Popular" has no
## effect when 'popular_enabled' is set to false.
##
## Accepted values: Popular, Trending, Subscriptions, Playlists, <none>
## Default: Popular
##
#default_home: Popular
##
## Default number of results to display per page.
##
## Note: this affects invidious-generated pages only, such
## as watch history and subscription feeds. Playlists, search
## results and channel videos depend on the data returned by
## the Youtube API.
##
## Accepted values: any positive integer
## Default: 40
##
#max_results: 40
##
## Show/hide annotations.
##
## Accepted values: true, false
## Default: false
##
#annotations: false
##
## Show/hide annotation.
##
## Accepted values: true, false
## Default: false
##
#annotations_subscribed: false
##
## Type of comments to display below video.
##
## Accepted values: a two-entries array.
## Each entry can be one of: "youtube", "reddit", ""
##
## Default: ["youtube", ""]
##
#comments: ["youtube", ""]
##
## Default player style.
##
## Accepted values: invidious, youtube
## Default: invidious
##
#player_style: invidious
##
## Show/Hide the "related videos" sidebar when
## watching a video.
##
## Accepted values: true, false
## Default: true
##
#related_videos: true
# -----------------------------
# Video player behavior
# -----------------------------
##
## Automatically play videos on page load.
##
## Accepted values: true, false
## Default: false
##
#autoplay: false
##
## Automatically load the "next" video (either next in
## playlist or proposed) when the current video ends.
##
## Accepted values: true, false
## Default: false
##
#continue: false
##
## Autoplay next video by default.
##
## Note: Only effective if 'continue' is set to true.
##
## Accepted values: true, false
## Default: true
##
#continue_autoplay: true
##
## Play videos in Audio-only mode by default.
##
## Accepted values: true, false
## Default: false
##
#listen: false
##
## Loop videos automatically.
##
## Accepted values: true, false
## Default: false
##
#video_loop: false
# -----------------------------
# Video playback settings
# -----------------------------
##
## Default video quality.
##
## Accepted values: dash, hd720, medium, small
## Default: hd720
##
#quality: hd720
##
## Default dash video quality.
##
## Note: this setting only takes effet if the
## 'quality' parameter is set to "dash".
##
## Accepted values:
## auto, best, 4320p, 2160p, 1440p, 1080p,
## 720p, 480p, 360p, 240p, 144p, worst
## Default: auto
##
#quality_dash: auto
##
## Default video playback speed.
##
## Accepted values: 0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0
## Default: 1.0
##
#speed: 1.0
##
## Default volume.
##
## Accepted values: 0-100
## Default: 100
##
#volume: 100
##
## Allow 360° videos to be played.
##
## Note: This feature requires a WebGL-enabled browser.
##
## Accepted values: true, false
## Default: true
##
#vr_mode: true
# -----------------------------
# Subscription feed
# -----------------------------
##
## In the "Subscription" feed, only show the latest video
## of each channel the user is subscribed to.
##
## Note: when combined with 'unseen_only', the latest unseen
## video of each channel will be displayed instead of the
## latest by date.
##
## Accepted values: true, false
## Default: false
##
#latest_only: false
##
## Enable/Disable user subscriptions desktop notifications.
##
## Accepted values: true, false
## Default: false
##
#notifications_only: false
##
## In the "Subscription" feed, Only show the videos that the
## user haven't watched yet (i.e which are not in their watch
## history).
##
## Accepted values: true, false
## Default: false
##
#unseen_only: false
##
## Default sorting parameter for subscription feeds.
##
## Accepted values:
## 'alphabetically'
## 'alphabetically - reverse'
## 'channel name'
## 'channel name - reverse'
## 'published'
## 'published - reverse'
##
## Default: published
##
#sort: published
# -----------------------------
# Miscellaneous
# -----------------------------
##
## Proxy videos through instance by default.
##
## Warning: As most users won't change this setting in their
## preferences, defaulting to true will significantly
## increase the instance's network usage, so make sure that
## your server's connection can handle it.
##
## Accepted values: true, false
## Default: false
##
#local: false
##
## Show the connected user's nick at the top right.
##
## Accepted values: true, false
## Default: true
##
#show_nick: true
##
## Automatically redirect to a random instance when the user uses
## any "switch invidious instance" link (For videos, it's the plane
## icon, next to "watch on youtube" and "listen"). When set to false,
## the user is sent to https://redirect.invidious.io instead, where
## they can manually select an instance.
##
## Accepted values: true, false
## Default: false
##
#automatic_instance_redirect: false
##
## Show the entire video description by default (when set to 'false',
## only the first few lines of the description are shown and a
## "show more" button allows to expand it).
##
## Accepted values: true, false
## Default: false
##
#extend_desc: false

View File

@ -1,11 +0,0 @@
channel_threads: 1
feed_threads: 1
db:
user: kemal
password: kemal
host: localhost
port: 5432
dbname: invidious
full_refresh: false
https_only: false
domain:

View File

@ -1,4 +1,7 @@
#!/bin/sh
psql invidious kemal -c "ALTER TABLE channels ADD COLUMN subscribed bool;"
psql invidious kemal -c "UPDATE channels SET subscribed = false;"
[ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal
[ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channels ADD COLUMN subscribed bool;"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "UPDATE channels SET subscribed = false;"

View File

@ -1,7 +1,10 @@
#!/bin/sh
psql invidious kemal -c "ALTER TABLE channel_videos DROP COLUMN live_now CASCADE"
psql invidious kemal -c "ALTER TABLE channel_videos DROP COLUMN premiere_timestamp CASCADE"
[ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal
[ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious
psql invidious kemal -c "ALTER TABLE channel_videos ADD COLUMN live_now bool"
psql invidious kemal -c "ALTER TABLE channel_videos ADD COLUMN premiere_timestamp timestamptz"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channel_videos DROP COLUMN live_now CASCADE"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channel_videos DROP COLUMN premiere_timestamp CASCADE"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channel_videos ADD COLUMN live_now bool"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channel_videos ADD COLUMN premiere_timestamp timestamptz"

View File

@ -0,0 +1,22 @@
#!/bin/sh
[ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal
[ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN title CASCADE"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN views CASCADE"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN likes CASCADE"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN dislikes CASCADE"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN wilson_score CASCADE"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN published CASCADE"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN description CASCADE"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN language CASCADE"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN author CASCADE"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN ucid CASCADE"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN allowed_regions CASCADE"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN is_family_friendly CASCADE"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN genre CASCADE"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN genre_url CASCADE"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN license CASCADE"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN sub_count_text CASCADE"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN author_thumbnail CASCADE"

View File

@ -1,4 +1,7 @@
#!/bin/sh
psql invidious kemal -c "ALTER TABLE channels ADD COLUMN deleted bool;"
psql invidious kemal -c "UPDATE channels SET deleted = false;"
[ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal
[ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channels ADD COLUMN deleted bool;"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "UPDATE channels SET deleted = false;"

View File

@ -1,5 +1,8 @@
#!/bin/sh
psql invidious < config/sql/session_ids.sql
psql invidious kemal -c "INSERT INTO session_ids (SELECT unnest(id), email, CURRENT_TIMESTAMP FROM users) ON CONFLICT (id) DO NOTHING"
psql invidious kemal -c "ALTER TABLE users DROP COLUMN id"
[ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal
[ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious
psql "$POSTGRES_DB" "$POSTGRES_USER" < config/sql/session_ids.sql
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "INSERT INTO session_ids (SELECT unnest(id), email, CURRENT_TIMESTAMP FROM users) ON CONFLICT (id) DO NOTHING"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE users DROP COLUMN id"

View File

@ -1,3 +1,6 @@
#!/bin/sh
psql invidious kemal < config/sql/annotations.sql
[ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal
[ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious
psql "$POSTGRES_DB" "$POSTGRES_USER" < config/sql/annotations.sql

View File

@ -1,3 +1,6 @@
#!/bin/sh
psql invidious kemal -c "ALTER TABLE channel_videos ADD COLUMN views bigint;"
[ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal
[ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channel_videos ADD COLUMN views bigint;"

View File

@ -1,4 +1,7 @@
#!/bin/sh
psql invidious kemal -c "ALTER TABLE channel_videos ADD COLUMN live_now bool;"
psql invidious kemal -c "UPDATE channel_videos SET live_now = false;"
[ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal
[ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channel_videos ADD COLUMN live_now bool;"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "UPDATE channel_videos SET live_now = false;"

View File

@ -1,3 +1,6 @@
#!/bin/sh
psql invidious kemal -c "ALTER TABLE users ADD COLUMN feed_needs_update boolean"
[ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal
[ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE users ADD COLUMN feed_needs_update boolean"

View File

@ -1,3 +1,6 @@
#!/bin/sh
psql invidious kemal -c "ALTER TABLE channel_videos ADD COLUMN premiere_timestamp timestamptz;"
[ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal
[ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channel_videos ADD COLUMN premiere_timestamp timestamptz;"

View File

@ -1,5 +1,8 @@
#!/bin/sh
psql invidious kemal -c "ALTER TABLE channels DROP COLUMN subscribed"
psql invidious kemal -c "ALTER TABLE channels ADD COLUMN subscribed timestamptz"
psql invidious kemal -c "UPDATE channels SET subscribed = '2019-01-01 00:00:00+00'"
[ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal
[ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channels DROP COLUMN subscribed"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channels ADD COLUMN subscribed timestamptz"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "UPDATE channels SET subscribed = '2019-01-01 00:00:00+00'"

View File

@ -2,11 +2,11 @@
-- DROP TABLE public.annotations;
CREATE TABLE public.annotations
CREATE TABLE IF NOT EXISTS public.annotations
(
id text NOT NULL,
annotations xml,
CONSTRAINT annotations_id_key UNIQUE (id)
);
GRANT ALL ON TABLE public.annotations TO kemal;
GRANT ALL ON TABLE public.annotations TO current_user;

View File

@ -2,7 +2,7 @@
-- DROP TABLE public.channel_videos;
CREATE TABLE public.channel_videos
CREATE TABLE IF NOT EXISTS public.channel_videos
(
id text NOT NULL,
title text,
@ -17,13 +17,13 @@ CREATE TABLE public.channel_videos
CONSTRAINT channel_videos_id_key UNIQUE (id)
);
GRANT ALL ON TABLE public.channel_videos TO kemal;
GRANT ALL ON TABLE public.channel_videos TO current_user;
-- Index: public.channel_videos_ucid_idx
-- DROP INDEX public.channel_videos_ucid_idx;
CREATE INDEX channel_videos_ucid_idx
CREATE INDEX IF NOT EXISTS channel_videos_ucid_idx
ON public.channel_videos
USING btree
(ucid COLLATE pg_catalog."default");

View File

@ -2,7 +2,7 @@
-- DROP TABLE public.channels;
CREATE TABLE public.channels
CREATE TABLE IF NOT EXISTS public.channels
(
id text NOT NULL,
author text,
@ -12,13 +12,13 @@ CREATE TABLE public.channels
CONSTRAINT channels_id_key UNIQUE (id)
);
GRANT ALL ON TABLE public.channels TO kemal;
GRANT ALL ON TABLE public.channels TO current_user;
-- Index: public.channels_id_idx
-- DROP INDEX public.channels_id_idx;
CREATE INDEX channels_id_idx
CREATE INDEX IF NOT EXISTS channels_id_idx
ON public.channels
USING btree
(id COLLATE pg_catalog."default");

View File

@ -2,20 +2,20 @@
-- DROP TABLE public.nonces;
CREATE TABLE public.nonces
CREATE TABLE IF NOT EXISTS public.nonces
(
nonce text,
expire timestamp with time zone,
CONSTRAINT nonces_id_key UNIQUE (nonce)
);
GRANT ALL ON TABLE public.nonces TO kemal;
GRANT ALL ON TABLE public.nonces TO current_user;
-- Index: public.nonces_nonce_idx
-- DROP INDEX public.nonces_nonce_idx;
CREATE INDEX nonces_nonce_idx
CREATE INDEX IF NOT EXISTS nonces_nonce_idx
ON public.nonces
USING btree
(nonce COLLATE pg_catalog."default");

View File

@ -0,0 +1,19 @@
-- Table: public.playlist_videos
-- DROP TABLE public.playlist_videos;
CREATE TABLE IF NOT EXISTS public.playlist_videos
(
title text,
id text,
author text,
ucid text,
length_seconds integer,
published timestamptz,
plid text references playlists(id),
index int8,
live_now boolean,
PRIMARY KEY (index,plid)
);
GRANT ALL ON TABLE public.playlist_videos TO current_user;

29
config/sql/playlists.sql Normal file
View File

@ -0,0 +1,29 @@
-- Type: public.privacy
-- DROP TYPE public.privacy;
CREATE TYPE public.privacy AS ENUM
(
'Public',
'Unlisted',
'Private'
);
-- Table: public.playlists
-- DROP TABLE public.playlists;
CREATE TABLE IF NOT EXISTS public.playlists
(
title text,
id text primary key,
author text,
description text,
video_count integer,
created timestamptz,
updated timestamptz,
privacy privacy,
index int8[]
);
GRANT ALL ON public.playlists TO current_user;

View File

@ -2,7 +2,7 @@
-- DROP TABLE public.session_ids;
CREATE TABLE public.session_ids
CREATE TABLE IF NOT EXISTS public.session_ids
(
id text NOT NULL,
email text,
@ -10,13 +10,13 @@ CREATE TABLE public.session_ids
CONSTRAINT session_ids_pkey PRIMARY KEY (id)
);
GRANT ALL ON TABLE public.session_ids TO kemal;
GRANT ALL ON TABLE public.session_ids TO current_user;
-- Index: public.session_ids_id_idx
-- DROP INDEX public.session_ids_id_idx;
CREATE INDEX session_ids_id_idx
CREATE INDEX IF NOT EXISTS session_ids_id_idx
ON public.session_ids
USING btree
(id COLLATE pg_catalog."default");

View File

@ -2,7 +2,7 @@
-- DROP TABLE public.users;
CREATE TABLE public.users
CREATE TABLE IF NOT EXISTS public.users
(
updated timestamp with time zone,
notifications text[],
@ -16,13 +16,13 @@ CREATE TABLE public.users
CONSTRAINT users_email_key UNIQUE (email)
);
GRANT ALL ON TABLE public.users TO kemal;
GRANT ALL ON TABLE public.users TO current_user;
-- Index: public.email_unique_idx
-- DROP INDEX public.email_unique_idx;
CREATE UNIQUE INDEX email_unique_idx
CREATE UNIQUE INDEX IF NOT EXISTS email_unique_idx
ON public.users
USING btree
(lower(email) COLLATE pg_catalog."default");

View File

@ -2,38 +2,21 @@
-- DROP TABLE public.videos;
CREATE TABLE public.videos
CREATE UNLOGGED TABLE IF NOT EXISTS public.videos
(
id text NOT NULL,
info text,
updated timestamp with time zone,
title text,
views bigint,
likes integer,
dislikes integer,
wilson_score double precision,
published timestamp with time zone,
description text,
language text,
author text,
ucid text,
allowed_regions text[],
is_family_friendly boolean,
genre text,
genre_url text,
license text,
sub_count_text text,
author_thumbnail text,
CONSTRAINT videos_pkey PRIMARY KEY (id)
);
GRANT ALL ON TABLE public.videos TO kemal;
GRANT ALL ON TABLE public.videos TO current_user;
-- Index: public.id_idx
-- DROP INDEX public.id_idx;
CREATE UNIQUE INDEX id_idx
CREATE UNIQUE INDEX IF NOT EXISTS id_idx
ON public.videos
USING btree
(id COLLATE pg_catalog."default");

View File

@ -1,12 +1,12 @@
version: '3'
# Warning: This docker-compose file is made for development purposes.
# Using it will build an image from the locally cloned repository.
#
# If you want to use Invidious in production, see the docker-compose.yml file provided
# in the installation documentation: https://docs.invidious.io/installation/
version: "3"
services:
postgres:
build:
context: .
dockerfile: docker/Dockerfile.postgres
restart: unless-stopped
volumes:
- postgresdata:/var/lib/postgresql/data
invidious:
build:
context: .
@ -14,8 +14,43 @@ services:
restart: unless-stopped
ports:
- "127.0.0.1:3000:3000"
environment:
# Please read the following file for a comprehensive list of all available
# configuration options and their associated syntax:
# https://github.com/iv-org/invidious/blob/master/config/config.example.yml
INVIDIOUS_CONFIG: |
db:
dbname: invidious
user: kemal
password: kemal
host: invidious-db
port: 5432
check_tables: true
# external_port:
# domain:
# https_only: false
# statistics_enabled: false
healthcheck:
test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/comments/jNQXAC9IVRw || exit 1
interval: 30s
timeout: 5s
retries: 2
depends_on:
- postgres
- invidious-db
invidious-db:
image: docker.io/library/postgres:13
restart: unless-stopped
volumes:
- postgresdata:/var/lib/postgresql/data
- ./config/sql:/config/sql
- ./docker/init-invidious-db.sh:/docker-entrypoint-initdb.d/init-invidious-db.sh
environment:
POSTGRES_DB: invidious
POSTGRES_USER: kemal
POSTGRES_PASSWORD: kemal
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
volumes:
postgresdata:

View File

@ -1,15 +1,54 @@
FROM archlinux/base
FROM crystallang/crystal:1.4.1-alpine AS builder
RUN apk add --no-cache sqlite-static yaml-static
RUN pacman -Sy --noconfirm shards crystal imagemagick librsvg \
which pkgconf gcc ttf-liberation glibc
# base-devel contains many other basic packages, that are normally assumed to already exist on a clean arch system
ADD . /invidious
ARG release
WORKDIR /invidious
COPY ./shard.yml ./shard.yml
COPY ./shard.lock ./shard.lock
RUN shards install --production
RUN sed -i 's/host: localhost/host: postgres/' config/config.yml && \
shards update && shards install && \
crystal build src/invidious.cr
COPY --from=quay.io/invidious/lsquic-compiled /root/liblsquic.a ./lib/lsquic/src/lsquic/ext/liblsquic.a
COPY ./src/ ./src/
# TODO: .git folder is required for building this is destructive.
# See definition of CURRENT_BRANCH, CURRENT_COMMIT and CURRENT_VERSION.
COPY ./.git/ ./.git/
# Required for fetching player dependencies
COPY ./scripts/ ./scripts/
COPY ./assets/ ./assets/
COPY ./videojs-dependencies.yml ./videojs-dependencies.yml
RUN crystal spec --warnings all \
--link-flags "-lxml2 -llzma"
RUN if [ "${release}" == 1 ] ; then \
crystal build ./src/invidious.cr \
--release \
--static --warnings all \
--link-flags "-lxml2 -llzma"; \
else \
crystal build ./src/invidious.cr \
--static --warnings all \
--link-flags "-lxml2 -llzma"; \
fi
FROM alpine:latest
RUN apk add --no-cache librsvg ttf-opensans
WORKDIR /invidious
RUN addgroup -g 1000 -S invidious && \
adduser -u 1000 -S invidious -G invidious
COPY --chown=invidious ./config/config.* ./config/
RUN mv -n config/config.example.yml config/config.yml
RUN sed -i 's/host: \(127.0.0.1\|localhost\)/host: invidious-db/' config/config.yml
COPY ./config/sql/ ./config/sql/
COPY ./locales/ ./locales/
COPY --from=builder /invidious/assets ./assets/
COPY --from=builder /invidious/invidious .
RUN chmod o+rX -R ./assets ./config ./locales
EXPOSE 3000
USER invidious
CMD [ "/invidious/invidious" ]

53
docker/Dockerfile.arm64 Normal file
View File

@ -0,0 +1,53 @@
FROM alpine:3.16 AS builder
RUN apk add --no-cache 'crystal=1.4.1-r0' shards sqlite-static yaml-static yaml-dev libxml2-dev zlib-static openssl-libs-static openssl-dev musl-dev
ARG release
WORKDIR /invidious
COPY ./shard.yml ./shard.yml
COPY ./shard.lock ./shard.lock
RUN shards install --production
COPY --from=quay.io/invidious/lsquic-compiled /root/liblsquic.a ./lib/lsquic/src/lsquic/ext/liblsquic.a
COPY ./src/ ./src/
# TODO: .git folder is required for building this is destructive.
# See definition of CURRENT_BRANCH, CURRENT_COMMIT and CURRENT_VERSION.
COPY ./.git/ ./.git/
# Required for fetching player dependencies
COPY ./scripts/ ./scripts/
COPY ./assets/ ./assets/
COPY ./videojs-dependencies.yml ./videojs-dependencies.yml
RUN crystal spec --warnings all \
--link-flags "-lxml2 -llzma"
RUN if [ ${release} == 1 ] ; then \
crystal build ./src/invidious.cr \
--release \
--static --warnings all \
--link-flags "-lxml2 -llzma"; \
else \
crystal build ./src/invidious.cr \
--static --warnings all \
--link-flags "-lxml2 -llzma"; \
fi
FROM alpine:3.16
RUN apk add --no-cache librsvg ttf-opensans
WORKDIR /invidious
RUN addgroup -g 1000 -S invidious && \
adduser -u 1000 -S invidious -G invidious
COPY --chown=invidious ./config/config.* ./config/
RUN mv -n config/config.example.yml config/config.yml
RUN sed -i 's/host: \(127.0.0.1\|localhost\)/host: invidious-db/' config/config.yml
COPY ./config/sql/ ./config/sql/
COPY ./locales/ ./locales/
COPY --from=builder /invidious/assets ./assets/
COPY --from=builder /invidious/invidious .
RUN chmod o+rX -R ./assets ./config ./locales
EXPOSE 3000
USER invidious
CMD [ "/invidious/invidious" ]

View File

@ -1,9 +0,0 @@
FROM postgres:10
ENV POSTGRES_USER postgres
ADD ./config/sql /config/sql
ADD ./docker/entrypoint.postgres.sh /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]
CMD [ "postgres" ]

View File

@ -1,28 +0,0 @@
#!/usr/bin/env bash
CMD="$@"
if [ ! -f /var/lib/postgresql/data/setupFinished ]; then
echo "### first run - setting up invidious database"
/usr/local/bin/docker-entrypoint.sh postgres &
sleep 10
until runuser -l postgres -c 'pg_isready' 2>/dev/null; do
>&2 echo "### Postgres is unavailable - waiting"
sleep 5
done
>&2 echo "### importing table schemas"
su postgres -c 'createdb invidious'
su postgres -c 'psql -c "CREATE USER kemal WITH PASSWORD '"'kemal'"'"'
su postgres -c 'psql invidious kemal < config/sql/channels.sql'
su postgres -c 'psql invidious kemal < config/sql/videos.sql'
su postgres -c 'psql invidious kemal < config/sql/channel_videos.sql'
su postgres -c 'psql invidious kemal < config/sql/users.sql'
su postgres -c 'psql invidious kemal < config/sql/session_ids.sql'
su postgres -c 'psql invidious kemal < config/sql/nonces.sql'
su postgres -c 'psql invidious kemal < config/sql/annotations.sql'
touch /var/lib/postgresql/data/setupFinished
echo "### invidious database setup finished"
exit
fi
echo "running postgres /usr/local/bin/docker-entrypoint.sh $CMD"
exec /usr/local/bin/docker-entrypoint.sh $CMD

12
docker/init-invidious-db.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
set -eou pipefail
psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/channels.sql
psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/videos.sql
psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/channel_videos.sql
psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/users.sql
psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/session_ids.sql
psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/nonces.sql
psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/annotations.sql
psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/playlists.sql
psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/playlist_videos.sql

1
kubernetes/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/charts/*.tgz

6
kubernetes/Chart.lock Normal file
View File

@ -0,0 +1,6 @@
dependencies:
- name: postgresql
repository: https://charts.bitnami.com/bitnami/
version: 11.1.3
digest: sha256:79061645472b6fb342d45e8e5b3aacd018ef5067193e46a060bccdc99fe7f6e1
generated: "2022-03-02T05:57:20.081432389+13:00"

22
kubernetes/Chart.yaml Normal file
View File

@ -0,0 +1,22 @@
apiVersion: v2
name: invidious
description: Invidious is an alternative front-end to YouTube
version: 1.1.1
appVersion: 0.20.1
keywords:
- youtube
- proxy
- video
- privacy
home: https://invidio.us/
icon: https://raw.githubusercontent.com/iv-org/invidious/05988c1c49851b7d0094fca16aeaf6382a7f64ab/assets/favicon-32x32.png
sources:
- https://github.com/iv-org/invidious
maintainers:
- name: Leon Klingele
email: mail@leonklingele.de
dependencies:
- name: postgresql
version: ~11.1.3
repository: "https://charts.bitnami.com/bitnami/"
engine: gotpl

41
kubernetes/README.md Normal file
View File

@ -0,0 +1,41 @@
# Invidious Helm chart
Easily deploy Invidious to Kubernetes.
## Installing Helm chart
```sh
# Build Helm dependencies
$ helm dep build
# Add PostgreSQL init scripts
$ kubectl create configmap invidious-postgresql-init \
--from-file=../config/sql/channels.sql \
--from-file=../config/sql/videos.sql \
--from-file=../config/sql/channel_videos.sql \
--from-file=../config/sql/users.sql \
--from-file=../config/sql/session_ids.sql \
--from-file=../config/sql/nonces.sql \
--from-file=../config/sql/annotations.sql \
--from-file=../config/sql/playlists.sql \
--from-file=../config/sql/playlist_videos.sql
# Install Helm app to your Kubernetes cluster
$ helm install invidious ./
```
## Upgrading
```sh
# Upgrading is easy, too!
$ helm upgrade invidious ./
```
## Uninstall
```sh
# Get rid of everything (except database)
$ helm delete invidious
# To also delete the database, remove all invidious-postgresql PVCs
```

View File

@ -0,0 +1,16 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "invidious.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "invidious.fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}

View File

@ -0,0 +1,11 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "invidious.fullname" . }}
labels:
app: {{ template "invidious.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: {{ .Release.Name }}
data:
INVIDIOUS_CONFIG: |
{{ toYaml .Values.config | indent 4 }}

View File

@ -0,0 +1,61 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "invidious.fullname" . }}
labels:
app: {{ template "invidious.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: {{ .Release.Name }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "invidious.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "invidious.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: {{ .Release.Name }}
spec:
securityContext:
runAsUser: {{ .Values.securityContext.runAsUser }}
runAsGroup: {{ .Values.securityContext.runAsGroup }}
fsGroup: {{ .Values.securityContext.fsGroup }}
initContainers:
- name: wait-for-postgresql
image: postgres
args:
- /bin/sh
- -c
- until pg_isready -h {{ .Values.config.db.host }} -p {{ .Values.config.db.port }} -U {{ .Values.config.db.user }}; do echo waiting for database; sleep 2; done;
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: 3000
env:
- name: INVIDIOUS_CONFIG
valueFrom:
configMapKeyRef:
key: INVIDIOUS_CONFIG
name: {{ template "invidious.fullname" . }}
securityContext:
allowPrivilegeEscalation: {{ .Values.securityContext.allowPrivilegeEscalation }}
capabilities:
drop:
- ALL
resources:
{{ toYaml .Values.resources | indent 10 }}
readinessProbe:
httpGet:
port: 3000
path: /
livenessProbe:
httpGet:
port: 3000
path: /
initialDelaySeconds: 15
restartPolicy: Always

View File

@ -0,0 +1,18 @@
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "invidious.fullname" . }}
labels:
app: {{ template "invidious.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: {{ .Release.Name }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ template "invidious.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
targetCPUUtilizationPercentage: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}

View File

@ -0,0 +1,20 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "invidious.fullname" . }}
labels:
app: {{ template "invidious.name" . }}
chart: {{ .Chart.Name }}
release: {{ .Release.Name }}
spec:
type: {{ .Values.service.type }}
ports:
- name: http
port: {{ .Values.service.port }}
targetPort: 3000
selector:
app: {{ template "invidious.name" . }}
release: {{ .Release.Name }}
{{- if .Values.service.loadBalancerIP }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }}

61
kubernetes/values.yaml Normal file
View File

@ -0,0 +1,61 @@
name: invidious
image:
repository: quay.io/invidious/invidious
tag: latest
pullPolicy: Always
replicaCount: 1
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 16
targetCPUUtilizationPercentage: 50
service:
type: ClusterIP
port: 3000
#loadBalancerIP:
resources: {}
#requests:
# cpu: 100m
# memory: 64Mi
#limits:
# cpu: 800m
# memory: 512Mi
securityContext:
allowPrivilegeEscalation: false
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
# See https://github.com/bitnami/charts/tree/master/bitnami/postgresql
postgresql:
image:
registry: quay.io
auth:
username: kemal
password: kemal
database: invidious
primary:
initdb:
username: kemal
password: kemal
scriptsConfigMap: invidious-postgresql-init
# Adapted from ../config/config.yml
config:
channel_threads: 1
feed_threads: 1
db:
user: kemal
password: kemal
host: invidious-postgresql
port: 5432
dbname: invidious
full_refresh: false
https_only: false
domain:

View File

@ -1,195 +1,212 @@
{
"`x` subscribers": "`x` المشتركين",
"`x` videos": "`x` الفيديوهات",
"LIVE": "مباشر",
"Shared `x` ago": "تم رفع الفيديو منذ `x`",
"Unsubscribe": "إلغاء الإشتراك",
"Subscribe": "إشتراك",
"LIVE": "مُباشِر",
"Shared `x` ago": "تمَّ رفع المقطع المرئيّ مُنذ `x`",
"Unsubscribe": "إلغاء الاشتراك",
"Subscribe": "الإشتراك",
"View channel on YouTube": "زيارة القناة على موقع يوتيوب",
"View playlist on YouTube": "عرض قائمة التشغيل على اليوتيوب",
"newest": "الأجدد",
"oldest": "الأقدم",
"popular": "الاكثر شعبية",
"last": "اخر قوائم التشغيل المعدلة",
"Next page": "الصفحة الثانية",
"popular": "الأكثر شعبية",
"last": "الأخيرة",
"Next page": "الصفحة التالية",
"Previous page": "الصفحة السابقة",
"Clear watch history?": "مسح السجل ؟",
"New password": "الرقم السرى الجديد",
"New passwords must match": "الأرقام السرية يجب ان تكون متطابقة",
"Cannot change password for Google accounts": "لا يستطيع تغيير الرقم السرى لحساب جوجل",
"Authorize token?": "رمز الإذن ؟",
"Authorize token for `x`?": "رمز الإذن لـ `x` ?",
"Clear watch history?": "هل تريد محو سجل المشاهدة؟",
"New password": "كلمة مرور جديدة",
"New passwords must match": "يَجبُ أن تكون كلمتا المرور متطابقتين",
"Cannot change password for Google accounts": "لا يُمكن تغيير كلمة المرور لِحسابات جوجل",
"Authorize token?": "رمز التفويض؟",
"Authorize token for `x`?": "السماح بالرمز المميز ل 'x'؟",
"Yes": "نعم",
"No": "لا",
"Import and Export Data": "استخراج و إضافة البيانات",
"Import": "إضافة",
"Import Invidious data": "إضافة بيانات Invidious",
"Import YouTube subscriptions": "إضافةالإشتراكات من موقع يوتيوب",
"Import FreeTube subscriptions (.db)": "إضافةالمشتركين من FreeTube (.db)",
"Import NewPipe subscriptions (.json)": "إضافة المشتركين من NewPipe (.json)",
"Import NewPipe data (.zip)": "إضافة بيانات NewPipe (.zip)",
"Export": "استخراج",
"Export subscriptions as OPML": "استخراج المشتركين كـ OPML",
"Export subscriptions as OPML (for NewPipe & FreeTube)": "استخراج المشتركين كـ OPML (لـ NewPipe و FreeTube)",
"Export data as JSON": "استخراج البيانات كـ JSON",
"Delete account?": "حذف الحساب ؟",
"History": "السجل",
"An alternative front-end to YouTube": "البديل الكامل لموقع يوتيوب",
"JavaScript license information": "معلومات ترخيص JavaScript",
"Import and Export Data": "اِستيراد البيانات وتصديرها",
"Import": "استيراد",
"Import Invidious data": "استيراد بيانات JSON Invidious",
"Import YouTube subscriptions": "استيراد اشتراكات YouTube/OPML",
"Import FreeTube subscriptions (.db)": "استيراد اشتراكات فريتيوب (.db)",
"Import NewPipe subscriptions (.json)": "استيراد اشتراكات نيو بايب (.json)",
"Import NewPipe data (.zip)": "استيراد بيانات نيو بايب (.zip)",
"Export": "تصدير",
"Export subscriptions as OPML": "تصدير الاشتراكات كـOPML",
"Export subscriptions as OPML (for NewPipe & FreeTube)": "تصدير الاشتراكات كـOPML (لِنيو بايب و فريتيوب)",
"Export data as JSON": "تصدير بيانات Invidious كـ JSON",
"Delete account?": "حذف الحساب؟",
"History": "السِّجل",
"An alternative front-end to YouTube": "واجهة أمامية بديلة لموقع يوتيوب",
"JavaScript license information": "معلومات ترخيص جافا سكربت",
"source": "المصدر",
"Log in": "تسجيل الدخول",
"Log in/register": "تسجيل الدخول\\إنشاء حساب",
"Log in with Google": "تسجيل الدخول بإستخدام جوجل",
"User ID": "إسم المستخدم",
"Password": "الرقم السرى",
"Time (h:mm:ss):": "(يجب ان يكتب مثل هذا التنسيق) الوقت (h(ساعات):mm(دقائق):ss(ثوانى)):",
"Text CAPTCHA": "CAPTCHA كلامية",
"Image CAPTCHA": "CAPTCHA صورية",
"Log in/register": "تسجيل الدخول \\ إنشاء حساب",
"Log in with Google": "تسجيل الدخول باستخدام جوجل",
"User ID": ُعرِّف المُستخدم",
"Password": "كلمة المرور",
"Time (h:mm:ss):": "الوقت (h:mm:ss):",
"Text CAPTCHA": "نص الكابتشا",
"Image CAPTCHA": "صورة الكابتشا",
"Sign In": "تسجيل الدخول",
"Register": "انشاء الحساب",
"E-mail": "الإيميل",
"Register": "التسجيل",
"E-mail": "البريد الإلكتروني",
"Google verification code": "رمز تحقق جوجل",
"Preferences": "التفضيلات",
"Player preferences": "التفضيلات المشغل",
"Always loop: ": "كرر الفيديو دائما: ",
"Autoplay: ": "تشغيل تلقائى: ",
"Play next by default: ": "شغل الفيديو التالى تلقائيا",
"Autoplay next video: ": " شغل الفيديو التالى تلقائيا (فى قوائم التشغيل)",
"Listen by default: ": "تشغيل النسخة السمعية تلقائى: ",
"Proxy videos? ": "عرض الفيديوهات عن طريق الوكيل(proxy) ؟",
"Default speed: ": "السرعة الإفتراضية: ",
"Preferred video quality: ": "الجودة المفضلة للفيديوهات: ",
"Player volume: ": "صوت المشغل: ",
"Default comments: ": "إضهار التعليقات الإفتراضية لـ: ",
"Preferences": "الإعدادات",
"preferences_category_player": "إعدادات المُشغِّل",
"preferences_video_loop_label": "كرر المقطع المرئيّ دائما: ",
"preferences_autoplay_label": "تشغيل تلقائي: ",
"preferences_continue_label": "شغل المقطع التالي تلقائيًا: ",
"preferences_continue_autoplay_label": "شغل المقطع التالي تلقائيًا: ",
"preferences_listen_label": "تشغيل النسخة السمعية تلقائيًا: ",
"preferences_local_label": "بروكسي المقاطع المرئيّة؟ ",
"preferences_speed_label": "السرعة الافتراضية: ",
"preferences_quality_label": "الجودة المفضلة للمقاطع: ",
"preferences_volume_label": "صوت المشغل: ",
"preferences_comments_label": "التعليقات الافتراضية: ",
"youtube": "يوتيوب",
"reddit": "Reddit",
"Default captions: ": "الترجمات الإفتراضية: ",
"Fallback captions: ": "الترجمات المصاحبة: ",
"Show related videos? ": "عرض مقاطع الفيديو ذات الصلة؟",
"Show annotations by default? ": "عرض الملاحظات فى الفيديو تلقائيا ؟",
"Visual preferences": "التفضيلات المرئية",
"Dark mode: ": "الوضع الليلى: ",
"Thin mode: ": "الوضع الخفيف: ",
"Subscription preferences": "تفضيلات الإشتراك",
"Show annotations by default for subscribed channels? ": "عرض الملاحظات فى الفيديوهات تلقائيا فى القنوات المشترك بها فقط ؟",
"reddit": "ريديت",
"preferences_captions_label": "التسميات التوضيحية الإفتراضية: ",
"Fallback captions: ": "التسميات التوضيحية الاحتياطيَّة: ",
"preferences_related_videos_label": "اعرض الفيديوهات ذات الصلة: ",
"preferences_annotations_label": "اعرض الملاحظات في الفيديو تلقائيا: ",
"preferences_extend_desc_label": "توسيع وصف الفيديو تلقائيا: ",
"preferences_vr_mode_label": "مقاطع فيديو تفاعلية بزاوية 360 درجة (تتطلب WebGL): ",
"preferences_category_visual": "التفضيلات المرئية",
"preferences_player_style_label": "شكل مشغل الفيديوهات: ",
"Dark mode: ": "الوضع الليلي: ",
"preferences_dark_mode_label": "المظهر: ",
"dark": "غامق (اسود)",
"light": "فاتح (ابيض)",
"preferences_thin_mode_label": "الوضع الخفيف: ",
"preferences_category_misc": "تفضيلات متنوعة",
"preferences_automatic_instance_redirect_label": "إعادة توجيه المثيل التلقائي (إعادة التوجيه إلى redirect.invidious.io): ",
"preferences_category_subscription": "تفضيلات الاشتراك",
"preferences_annotations_subscribed_label": "عرض الملاحظات في الفيديوهات تلقائيا في القنوات المشترك بها فقط: ",
"Redirect homepage to feed: ": "إعادة التوجية من الصفحة الرئيسية لصفحة المشتركين (لرؤية اخر فيديوهات المشتركين): ",
"Number of videos shown in feed: ": "عدد الفيديوهات التى ستظهر فى صفحة المشتركين: ",
"Sort videos by: ": "ترتيب الفيديو بـ: ",
"published": "احدث فيديو",
"published - reverse": "احدث فيديو - عكسى",
"alphabetically": "ترتيب ابجدى",
"alphabetically - reverse": "ابجدى - عكسى",
"channel name": إسم القناة",
"channel name - reverse": إسم القناة - عكسى",
"Only show latest video from channel: ": "فقط إظهر اخر فيديو من القناة: ",
"Only show latest unwatched video from channel: ": "فقط اظهر اخر فيديو لم يتم رؤيتة من القناة: ",
"Only show unwatched: ": "فقط اظهر الذى لم يتم رؤيتة: ",
"Only show notifications (if there are any): ": "إظهار الإشعارات فقط (إذا كان هناك أي): ",
"preferences_max_results_label": "عدد الفيديوهات التى ستظهر فى صفحة المشتركين: ",
"preferences_sort_label": "ترتيب الفيديوهات بـ: ",
"published": "أحدث فيديو",
"published - reverse": "أحدث فيديو - عكسي",
"alphabetically": "ترتيب أبجدي",
"alphabetically - reverse": "أبجدي - عكسي",
"channel name": اسم القناة",
"channel name - reverse": اسم القناة - عكسى",
"Only show latest video from channel: ": "فقط أظهر آخر فيديو من القناة: ",
"Only show latest unwatched video from channel: ": "فقط أظهر آخر فيديو لم يتم رؤيته من القناة: ",
"preferences_unseen_only_label": "فقط أظهر الذي لم يتم رؤيته: ",
"preferences_notifications_only_label": "إظهار الإشعارات فقط (إذا كان هناك أي): ",
"Enable web notifications": "تفعيل إشعارات المتصفح",
"`x` uploaded a video": "`x` رفع فيديو",
"`x` is live": "`x` فى بث مباشر",
"Data preferences": "إعدادات التفضيلات",
"`x` is live": "`x` في بث مباشر",
"preferences_category_data": "إعدادات التفضيلات",
"Clear watch history": "حذف سجل المشاهدة",
"Import/export data": "إضافة\\إستخراج البيانات",
"Change password": "غير الرقم السرى",
"Manage subscriptions": "إدارة المشتركين",
"Import/export data": "إضافة\\استخراج البيانات",
"Change password": "غير كلمة السر",
"Manage subscriptions": "إدارة الاشتراكات",
"Manage tokens": "إدارة الرموز",
"Watch history": "سجل المشاهدة",
"Delete account": "حذف الحساب",
"Administrator preferences": "إعدادات المدير",
"Default homepage: ": "الصفحة الرئيسية الافتراضية ",
"Feed menu: ": "قائمة التغذية",
"Top enabled? ": "تفعيل 'الأفضل' ؟ ",
"CAPTCHA enabled? ": "تفعيل الكابتشا ؟",
"Login enabled? ": "تفعيل تسجيل الدخول ؟",
"Registration enabled? ": فعيل التسجيل ؟",
"Report statistics? ": "إبلاغ الإحصائيات",
"Save preferences": "حفظ التفضيلات",
"Subscription manager": "مدير الإشتراكات",
"preferences_category_admin": "إعدادات المدير",
"preferences_default_home_label": "الصفحة الرئيسية الافتراضية: ",
"preferences_feed_menu_label": "قائمة التدفقات: ",
"preferences_show_nick_label": "إظهار اللقب في الأعلى: ",
"Top enabled: ": "تفعيل 'الأفضل' ؟ ",
"CAPTCHA enabled: ": "تفعيل الكابتشا: ",
"Login enabled: ": مكين تسجيل الدخول: ",
"Registration enabled: ": "تفعيل التسجيل: ",
"Report statistics: ": "تقرير الإحصائيات: ",
"Save preferences": "حفظ الإعدادات",
"Subscription manager": "مدير الاشتراكات",
"Token manager": "إداره الرمز",
"Token": "الرمز",
"`x` subscriptions": "`x` مشتركين",
"`x` tokens": "`x` رموز",
"Import/export": "إضافة\\إستخراج",
"unsubscribe": "إلغاء الإشتراك",
"Import/export": "استيراد/تصدير",
"unsubscribe": "إلغاء الاشتراك",
"revoke": "مسح",
"Subscriptions": "الإشتراكات",
"`x` unseen notifications": "`x` إشعارات لم تشاهدها بعد ",
"Subscriptions": "الاشتراكات",
"search": "بحث",
"Log out": "تسجيل الخروج",
"Released under the AGPLv3 by Omar Roth.": "تم الإنشاء تحت AGPLv3 بواسطة عمر روث.",
"Released under the AGPLv3 on Github.": "صدر تحت AGPLv3 على GitHub.",
"Source available here.": "الأكواد متوفرة هنا.",
"View JavaScript license information.": "مشاهدة معلومات حول تراخيص الجافاسكريبت.",
"View privacy policy.": "عرض سياسة الخصوصية",
"View privacy policy.": "عرض سياسة الخصوصية.",
"Trending": "الشائع",
"Public": "عام",
"Unlisted": "غير مصنف",
"Private": "خاص",
"View all playlists": "عرض جميع قوائم التشغيل",
"Updated `x` ago": "تم تحديثه منذ `x`",
"Delete playlist `x`?": "حذف قائمة التشغيل `x`؟",
"Delete playlist": "حذف قائمة التغشيل",
"Create playlist": "إنشاء قائمة تشغيل",
"Title": "العنوان",
"Playlist privacy": "إعدادات الخصوصية",
"Editing playlist `x`": "تعديل قائمة التشغيل `x`",
"Show more": "إظهار المزيد",
"Show less": "عرض اقل",
"Watch on YouTube": "مشاهدة الفيديو على اليوتيوب",
"Hide annotations": "إخفاء الملاحظات فى الفيديو",
"Show annotations": "عرض الملاحظات فى الفيديو",
"Switch Invidious Instance": "تبديل المثيل Invidious",
"Hide annotations": "إخفاء الملاحظات في الفيديو",
"Show annotations": "عرض الملاحظات في الفيديو",
"Genre: ": "النوع: ",
"License: ": "التراخيص: ",
"Family friendly? ": "محتوى عائلى? ",
"Family friendly? ": "محتوى عائلي؟ ",
"Wilson score: ": "درجة ويلسون: ",
"Engagement: ": "نسبة المشاركة (عدد المشاهدات\\عدد الإعجابات): ",
"Engagement: ": "نسبة المشاركة: ",
"Whitelisted regions: ": "الدول المسموح فيها هذا الفيديو: ",
"Blacklisted regions: ": "الدول الحظور فيها هذا الفيديو: ",
"Blacklisted regions: ": "الدول المحظور فيها هذا الفيديو: ",
"Shared `x`": "شارك منذ `x`",
"`x` views": "`x` مشاهدون",
"Premieres in `x`": "يعرض فى `x`",
"Premieres `x`": "",
"Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.": "اهلا! يبدو ان الجافاسكريبت معطلة. اضغط هنا لعرض التعليقات, ضع فى إعتبارك انها ستأخذ وقت اطول للعرض.",
"Premieres `x`": "يعرض `x`",
"Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.": "أهلًا! يبدو أن جافاسكريبت معطلٌ لديك. اضغط هنا لعرض التعليقات، وَضَع في اعتبارك أنها ستأخذ وقتًا أطول للتحميل.",
"View YouTube comments": "عرض تعليقات اليوتيوب",
"View more comments on Reddit": "عرض المزيد من التعليقات على\\من موقع Reddit",
"View `x` comments": "عرض `x` تعليقات",
"View `x` comments": {
"([^.,0-9]|^)1([^.,0-9]|$)": "عرض `x` تعليقات",
"": "عرض `x` تعليقات"
},
"View Reddit comments": "عرض تعليقات ريدإت Reddit",
"Hide replies": "إخفاء الردود",
"Show replies": "عرض الردود",
"Incorrect password": "الرقم السرى غير صحيح",
"Quota exceeded, try again in a few hours": "تم تجاوز عدد المرات المسموح بها, حاول مرة اخرى بعد عدة ساعات",
"Unable to log in, make sure two-factor authentication (Authenticator or SMS) is turned on.": "غير قادر على تسجيل الدخول, تأكد من تشغيل المصادقة الثنائية 2FA.",
"Incorrect password": "كلمة السر غير صحيحة",
"Quota exceeded, try again in a few hours": "تم تجاوز عدد المرات المسموح بها، حاول مجددًا بعد بضع ساعات",
"Unable to log in, make sure two-factor authentication (Authenticator or SMS) is turned on.": "غير قادر على تسجيل الدخول، تأكد من تشغيل المصادقة الثنائية 2FA.",
"Invalid TFA code": "كود مصادقة ثنائية 2FA غير صحيح",
"Login failed. This may be because two-factor authentication is not turned on for your account.": م يتم تسجيل الدخول. هذا ربما بسبب ان المصادقة الثنائية 2FA معطلة فى حسابك.",
"Login failed. This may be because two-factor authentication is not turned on for your account.": "فشل تسجيل الدخول. قد يكون هذا بسبب أن المصادقة الثنائية 2FA معطلة في حسابك.",
"Wrong answer": "إجابة خاطئة",
"Erroneous CAPTCHA": "الكابتشا CAPTCHA غير صاحلة",
"CAPTCHA is a required field": "مكان الكابتشا CAPTCHA مطلوب",
"User ID is a required field": "مكان إسم المستخدم مطلوب",
"Password is a required field": "مكان الرقم السرى مطلوب",
"Wrong username or password": "إسم المستخدم او الرقم السرى غير صحيح",
"Please sign in using 'Log in with Google'": "الرجاء تسجيل الدخول 'تسجيل الدخول بواسطة جوجل'",
"Password cannot be empty": "الرقم السرى لايمكن ان يكون فارغ",
"Password cannot be longer than 55 characters": "الرقم السرى لا يتعدى 55 حرف",
"User ID is a required field": "مكان اسم المستخدم مطلوب",
"Password is a required field": "مكان كلمة السر مطلوب",
"Wrong username or password": "اسم المستخدم او كلمة السر غير صحيح",
"Please sign in using 'Log in with Google'": "الرجاء تسجيل الدخول باستخدام \"تسجيل الدخول باستخدام Google\"",
"Password cannot be empty": "لا يمكن أن تكون كلمة السر فارغة",
"Password cannot be longer than 55 characters": "يجب أن لا تتعدى كلمة السر 55 حرفًا",
"Please log in": "الرجاء تسجيل الدخول",
"Invidious Private Feed for `x`": "صفحة Invidious للمشتركين الخاصة\\مخفية لـ `x`",
"Invidious Private Feed for `x`": "تغذية Invidious خاصة ل 'x'",
"channel:`x`": "قناة:`x`",
"Deleted or invalid channel": "قناة ممسوحة او غير صالحة",
"This channel does not exist.": "القناة غير موجودة.",
"This channel does not exist.": "هذه القناة غير موجودة.",
"Could not get channel info.": "لم يستطع الحصول على معلومات القناة.",
"Could not fetch comments": "لم يتمكن من إحضار التعليقات",
"View `x` replies": "عرض `x` ردود",
"`x` ago": "`x` منذ",
"Load more": "عرض المزيد",
"`x` points": "`x` نقاط",
"Could not create mix.": "لم يستطع عمل خلط.",
"Could not create mix.": "تعذر إنشاء مزيج.",
"Empty playlist": "قائمة التشغيل فارغة",
"Not a playlist.": "قائمة التشغيل غير صالحة.",
"Playlist does not exist.": "قائمة التشغيل غير موجودة.",
"Could not pull trending pages.": "لم يستطع عرض الصفحات الراجئة.",
"Hidden field \"challenge\" is a required field": "مكان مخفى \"تحدى\" مكان مطلوب",
"Hidden field \"token\" is a required field": "مكان مخفى \"رمز\" مكان مطلوب",
"Erroneous challenge": "تحدى غير صالح",
"Erroneous token": وز غير صالح",
"Hidden field \"challenge\" is a required field": "مكان مخفي \"تحدي\" مكان مطلوب",
"Hidden field \"token\" is a required field": "مكان مخفي \"رمز\" مكان مطلوب",
"Erroneous challenge": "تحدي غير صالح",
"Erroneous token": مز مميز خاطئ",
"No such user": "مستخدم غير صالح",
"Token is expired, please try again": "الرمز منتهى الصلاحية , الرجاء المحاولة مرة اخرى",
"English": "إنجليزى",
"English (auto-generated)": "إنجليزى (تم إنشائة تلقائى)",
"Token is expired, please try again": "الرمز منتهى الصلاحية، الرجاء المحاولة مرة اخرى",
"English": "إنجليزي",
"English (auto-generated)": "إنجليزي (تم إنشائه تلقائيًا)",
"Afrikaans": "الأفريكانية",
"Albanian": "الألبانية",
"Amharic": "الأمهرية",
"Arabic": "العربية",
"Armenian": "الأرميني",
"Azerbaijani": "أذربيجان",
"Armenian": "الأرمينية",
"Azerbaijani": "أذربيجانية",
"Bangla": "البنغالية",
"Basque": "الباسكي",
"Basque": "الباسكية",
"Belarusian": "البيلاروسية",
"Bosnian": "البوسنية",
"Bulgarian": "البلغارية",
@ -286,36 +303,237 @@
"Yiddish": "اليديشية",
"Yoruba": "اليوروبا",
"Zulu": "الزولو",
"`x` years": "`x` سنوات",
"`x` months": "`x` شهور",
"`x` weeks": "`x` اسابيع",
"`x` days": "`x` ايام",
"`x` hours": "`x` ساعات",
"`x` minutes": "`x` دقائق",
"`x` seconds": "`x` ثوانى",
"Fallback comments: ": "التعليقات المصاحبة",
"Popular": "لاكثر شعبية",
"Fallback comments: ": "التعليقات البديلة: ",
"Popular": "الأكثر شعبية",
"Search": "بحث",
"Top": "الأفضل",
"About": "حول",
"Rating: ": "التقييم",
"Language: ": "اللغة",
"Rating: ": "التقييم: ",
"preferences_locale_label": "اللغة: ",
"View as playlist": "عرض كا قائمة التشغيل",
"Default": "الكل",
"Music": "الاغانى",
"Gaming": "الألعاب",
"News": "الأخبار",
"Movies": "الأفلام",
"Download": "تحميل كـ",
"Download as: ": "تحميل",
"%A %B %-d, %Y": "",
"(edited)": "(تم تعديلة)",
"Download": "نزّل",
"Download as: ": "نزله كـ: ",
"%A %B %-d, %Y": "%A %-d %B %Y",
"(edited)": "(معدّل)",
"YouTube comment permalink": "رابط التعليق على اليوتيوب",
"permalink": "",
"`x` marked it with a ❤": "`x` اعجب بهذا",
"Audio mode": "الوضع الصوتى",
"permalink": "الرابط",
"`x` marked it with a ❤": "`x` أعجب بهذا",
"Audio mode": "الوضع الصوتي",
"Video mode": "وضع الفيديو",
"Videos": "الفيديوهات",
"Playlists": "قوائم التشغيل",
"Community": "",
"Current version: ": "الإصدار الحالى"
}
"Community": "المجتمع",
"search_filters_sort_option_relevance": "ملاؤم",
"search_filters_sort_option_rating": "تقييم",
"search_filters_sort_option_date": "التاريخ",
"search_filters_sort_option_views": "مشاهدات",
"search_filters_type_label": "نوع المحتوى",
"search_filters_duration_label": "المدة الزمنية",
"search_filters_features_label": "الميزات",
"search_filters_sort_label": "فرز",
"search_filters_date_option_hour": "آخر ساعة",
"search_filters_date_option_today": "اليوم",
"search_filters_date_option_week": "هذا الأسبوع",
"search_filters_date_option_month": "هذا الشهر",
"search_filters_date_option_year": "هذه السنة",
"search_filters_type_option_video": "فيديو",
"search_filters_type_option_channel": "قناة",
"search_filters_type_option_playlist": "قائمة التشغيل",
"search_filters_type_option_movie": "فيلم",
"search_filters_type_option_show": "عرض",
"search_filters_features_option_hd": "عالية الدقة",
"search_filters_features_option_subtitles": "ترجمات",
"search_filters_features_option_c_commons": "المشاع الإبداعي",
"search_filters_features_option_three_d": "ثلاثي الأبعاد",
"search_filters_features_option_live": "مباشر",
"search_filters_features_option_four_k": "4k",
"search_filters_features_option_location": "الأماكن",
"search_filters_features_option_hdr": "وضع التباين العالي",
"Current version: ": "الإصدار الحالي: ",
"next_steps_error_message": "بعد ذلك يجب أن تحاول: ",
"next_steps_error_message_refresh": "تحديث",
"next_steps_error_message_go_to_youtube": "انتقل إلى يوتيوب",
"search_filters_duration_option_short": "قصير (< 4 دقائق)",
"search_filters_duration_option_long": "طويل (> 20 دقيقة)",
"footer_source_code": "شفرة المصدر",
"footer_original_source_code": "كود المصدر الأصلي",
"footer_modfied_source_code": "شفرة المصدر المعدلة",
"adminprefs_modified_source_code_url_label": "URL إلى مستودع التعليمات البرمجية المصدرية المعدلة",
"footer_documentation": "التوثيق",
"footer_donate_page": "تبرّع",
"preferences_region_label": "بلد المحتوى: ",
"preferences_quality_dash_label": "جودة فيديو DASH المفضلة: ",
"preferences_quality_option_dash": "DASH (الجودة التلقائية)",
"preferences_quality_option_hd720": "HD720",
"preferences_quality_option_medium": "متوسطة",
"preferences_quality_option_small": "صغيرة",
"preferences_quality_dash_option_auto": "تلقائي",
"preferences_quality_dash_option_best": "الأفضل",
"preferences_quality_dash_option_worst": "أسوأ",
"preferences_quality_dash_option_4320p": "4320p",
"preferences_quality_dash_option_2160p": "2160p",
"preferences_quality_dash_option_1440p": "1440p",
"preferences_quality_dash_option_1080p": "1080p",
"preferences_quality_dash_option_720p": "720p",
"preferences_quality_dash_option_480p": "480p",
"preferences_quality_dash_option_360p": "360p",
"preferences_quality_dash_option_240p": "240p",
"preferences_quality_dash_option_144p": "144p",
"search_filters_features_option_purchased": "تم شراؤها",
"none": "لاشيء",
"videoinfo_started_streaming_x_ago": "بدأ البث منذ `x`",
"videoinfo_watch_on_youTube": "مشاهدة على يوتيوب",
"videoinfo_youTube_embed_link": "مضمن",
"videoinfo_invidious_embed_link": "رابط مضمن",
"user_created_playlists": "'x' إنشاء قوائم التشغيل",
"user_saved_playlists": "قوائم التشغيل المحفوظة 'x'",
"Video unavailable": "الفيديو غير متوفر",
"search_filters_features_option_three_sixty": "360°",
"download_subtitles": "ترجمات - 'x' (.vtt)",
"invidious": "الخيالي",
"preferences_save_player_pos_label": "حفظ موضع التشغيل: ",
"crash_page_you_found_a_bug": "يبدو أنك قد وجدت خطأً برمجيًّا في Invidious!",
"generic_videos_count_0": "لا فيديوهات",
"generic_videos_count_1": "فيديو واحد",
"generic_videos_count_2": "فيديوهين",
"generic_videos_count_3": "{{count}} فيديوهات",
"generic_videos_count_4": "{{count}} فيديو",
"generic_videos_count_5": "{{count}} فيديو",
"generic_subscribers_count_0": "لا مشتركين",
"generic_subscribers_count_1": "مشترك واحد",
"generic_subscribers_count_2": "مشتركان",
"generic_subscribers_count_3": "{{count}} مشتركين",
"generic_subscribers_count_4": "{{count}} مشترك",
"generic_subscribers_count_5": "{{count}} مشترك",
"generic_views_count_0": "لا مشاهدات",
"generic_views_count_1": "مشاهدة واحدة",
"generic_views_count_2": "مشاهدتان",
"generic_views_count_3": "{{count}} مشاهدات",
"generic_views_count_4": "{{count}} مشاهدة",
"generic_views_count_5": "{{count}} مشاهدة",
"generic_subscriptions_count_0": "لا اشتراكات",
"generic_subscriptions_count_1": "اشتراك واحد",
"generic_subscriptions_count_2": "اشتراكان",
"generic_subscriptions_count_3": "{{count}} اشتراكات",
"generic_subscriptions_count_4": "{{count}} اشتراك",
"generic_subscriptions_count_5": "{{count}} اشتراك",
"generic_playlists_count_0": "لا قوائم تشغيل",
"generic_playlists_count_1": "قائمة تشغيل واحدة",
"generic_playlists_count_2": "قائمتا تشغيل",
"generic_playlists_count_3": "{{count}} قوائم تشغيل",
"generic_playlists_count_4": "{{count}} قائمة تشغيل",
"generic_playlists_count_5": "{{count}} قائمة تشغيل",
"English (United States)": "الإنجليزية (الولايات المتحدة)",
"Indonesian (auto-generated)": "إندونيسي (مُنشأ تلقائيًا)",
"Interlingue": "إنترلينغوي",
"Italian (auto-generated)": "الإيطالية (مُنشأة تلقائيًا)",
"Spanish (auto-generated)": "الأسبانية (تم إنشاؤه تلقائيًا)",
"crash_page_before_reporting": "قبل الإبلاغ عن خطأ، تأكد من وجود:",
"French (auto-generated)": "الفرنسية (مُنشأة تلقائيًا)",
"Portuguese (auto-generated)": "البرتغالية (تم إنشاؤه تلقائيًا)",
"Turkish (auto-generated)": "التركية (تم إنشاؤها تلقائيًا)",
"crash_page_refresh": "حاول <a href=\"`x`\"> تحديث الصفحة </a>",
"crash_page_switch_instance": "حاول <a href=\"`x`\"> استخدام مثيل آخر </a>",
"Korean (auto-generated)": "كوري (تم إنشاؤه تلقائيًا)",
"Spanish (Mexico)": "الإسبانية (المكسيك)",
"Vietnamese (auto-generated)": "فيتنامي (تم إنشاؤه تلقائيًا)",
"crash_page_report_issue": "إذا لم يساعد أي مما سبق، يرجى فتح <a href=\"`x`\"> مشكلة جديدة على GitHub </a> (ويفضل أن يكون باللغة الإنجليزية) وتضمين النص التالي في رسالتك (لا تترجم هذا النص):",
"crash_page_read_the_faq": "قراءة <a href=\"`x`\"> الأسئلة المتكررة (الأسئلة الشائعة) </a>",
"preferences_watch_history_label": "تمكين سجل المشاهدة: ",
"English (United Kingdom)": "الإنجليزية (المملكة المتحدة)",
"Cantonese (Hong Kong)": "الكانتونية (هونغ كونغ)",
"Chinese": "الصينية",
"Chinese (China)": "الصينية (الصين)",
"Chinese (Hong Kong)": "الصينية (هونج كونج)",
"Chinese (Taiwan)": "الصينية (تايوان)",
"Dutch (auto-generated)": "هولندي (تم إنشاؤه تلقائيًا)",
"German (auto-generated)": "ألماني (تم إنشاؤه تلقائيًا)",
"Japanese (auto-generated)": "اليابانية (مُنشأة تلقائيًا)",
"Portuguese (Brazil)": "البرتغالية (البرازيل)",
"Russian (auto-generated)": "الروسية (منشأة تلقائيا)",
"Spanish (Spain)": "الإسبانية (إسبانيا)",
"crash_page_search_issue": "بحثت عن <a href=\"`x`\"> المشكلات الموجودة على GitHub </a>",
"search_filters_title": "معامل الفرز",
"search_message_no_results": "لا توجد نتائج.",
"search_message_change_filters_or_query": "حاول توسيع استعلام البحث و / أو تغيير عوامل التصفية.",
"search_filters_date_label": "تاريخ الرفع",
"generic_count_weeks_0": "{{count}} أسبوع",
"generic_count_weeks_1": "{{count}} أسبوع",
"generic_count_weeks_2": "{{count}} أسبوع",
"generic_count_weeks_3": "{{count}} أسبوع",
"generic_count_weeks_4": "{{count}} أسابيع",
"generic_count_weeks_5": "{{count}} أسبوع",
"Popular enabled: ": "تم تمكين الشعبية: ",
"search_filters_duration_option_medium": "متوسط (4-20 دقيقة)",
"search_filters_date_option_none": "أي تاريخ",
"search_filters_type_option_all": "أي نوع",
"search_filters_features_option_vr180": "VR180",
"generic_count_minutes_0": "{{count}} دقيقة",
"generic_count_minutes_1": "{{count}} دقيقة",
"generic_count_minutes_2": "{{count}} دقيقة",
"generic_count_minutes_3": "{{count}} دقيقة",
"generic_count_minutes_4": "{{count}} دقائق",
"generic_count_minutes_5": "{{count}} دقيقة",
"generic_count_hours_0": "{{count}} ساعة",
"generic_count_hours_1": "{{count}} ساعة",
"generic_count_hours_2": "{{count}} ساعة",
"generic_count_hours_3": "{{count}} ساعة",
"generic_count_hours_4": "{{count}} ساعات",
"generic_count_hours_5": "{{count}} ساعة",
"comments_view_x_replies_0": "عرض رد {{count}}",
"comments_view_x_replies_1": "عرض رد {{count}}",
"comments_view_x_replies_2": "عرض رد {{count}}",
"comments_view_x_replies_3": "عرض رد {{count}}",
"comments_view_x_replies_4": "عرض الردود {{count}}",
"comments_view_x_replies_5": "عرض رد {{count}}",
"search_message_use_another_instance": " يمكنك أيضًا البحث عن <a href=\"`x`\"> في مثيل آخر </a>.",
"comments_points_count_0": "{{count}} نقطة",
"comments_points_count_1": "{{count}} نقطة",
"comments_points_count_2": "{{count}} نقطة",
"comments_points_count_3": "{{count}} نقطة",
"comments_points_count_4": "{{count}} نقاط",
"comments_points_count_5": "{{count}} نقطة",
"generic_count_years_0": "{{count}} السنة",
"generic_count_years_1": "{{count}} السنة",
"generic_count_years_2": "{{count}} السنة",
"generic_count_years_3": "{{count}} السنة",
"generic_count_years_4": "{{count}} سنوات",
"generic_count_years_5": "{{count}} السنة",
"tokens_count_0": "الرمز المميز {{count}}",
"tokens_count_1": "الرمز المميز {{count}}",
"tokens_count_2": "الرمز المميز {{count}}",
"tokens_count_3": "الرمز المميز {{count}}",
"tokens_count_4": "الرموز المميزة {{count}}",
"tokens_count_5": "الرمز المميز {{count}}",
"search_filters_apply_button": "تطبيق الفلاتر المحددة",
"search_filters_duration_option_none": "أي مدة",
"subscriptions_unseen_notifs_count_0": "{{count}} إشعار غير مرئي",
"subscriptions_unseen_notifs_count_1": "{{count}} إشعار غير مرئي",
"subscriptions_unseen_notifs_count_2": "{{count}} إشعار غير مرئي",
"subscriptions_unseen_notifs_count_3": "{{count}} إشعار غير مرئي",
"subscriptions_unseen_notifs_count_4": "{{count}} إشعارات غير مرئية",
"subscriptions_unseen_notifs_count_5": "{{count}} إشعار غير مرئي",
"generic_count_days_0": "{{count}} يوم",
"generic_count_days_1": "{{count}} يوم",
"generic_count_days_2": "{{count}} يوم",
"generic_count_days_3": "{{count}} يوم",
"generic_count_days_4": "{{count}} أيام",
"generic_count_days_5": "{{count}} يوم",
"generic_count_months_0": "{{count}} شهر",
"generic_count_months_1": "{{count}} شهر",
"generic_count_months_2": "{{count}} شهر",
"generic_count_months_3": "{{count}} شهر",
"generic_count_months_4": "{{count}} شهور",
"generic_count_months_5": "{{count}} شهر",
"generic_count_seconds_0": "{{count}} ثانية",
"generic_count_seconds_1": "{{count}} ثانية",
"generic_count_seconds_2": "{{count}} ثانية",
"generic_count_seconds_3": "{{count}} ثانية",
"generic_count_seconds_4": "{{count}} ثوانٍ",
"generic_count_seconds_5": "{{count}} ثانية"
}

97
locales/bn.json Normal file
View File

@ -0,0 +1,97 @@
{
"Subscribe": "সাবস্ক্রাইব",
"View channel on YouTube": "ইউটিউবে চ্যানেল দেখুন",
"View playlist on YouTube": "ইউটিউবে প্লেলিস্ট দেখুন",
"newest": "সর্ব-নতুন",
"oldest": "পুরানতম",
"popular": "জনপ্রিয়",
"last": "শেষটা",
"Next page": "পরের পৃষ্ঠা",
"Previous page": "আগের পৃষ্ঠা",
"Clear watch history?": "দেখার ইতিহাস সাফ করবেন?",
"New password": "নতুন পাসওয়ার্ড",
"New passwords must match": "নতুন পাসওয়ার্ড অবশ্যই মিলতে হবে",
"Cannot change password for Google accounts": "গুগল অ্যাকাউন্টগুলোর জন্য পাসওয়ার্ড পরিবর্তন করা যায় না",
"Authorize token?": "টোকেন অনুমোদন করবেন?",
"Authorize token for `x`?": "`x` -এর জন্য টোকেন অনুমোদন?",
"Yes": "হ্যাঁ",
"No": "না",
"Import and Export Data": "তথ্য আমদানি ও রপ্তানি",
"Import": "আমদানি",
"Import Invidious data": "ইনভিডিয়াস তথ্য আমদানি",
"Import YouTube subscriptions": "ইউটিউব সাবস্ক্রিপশন আনুন",
"Import FreeTube subscriptions (.db)": "ফ্রিটিউব সাবস্ক্রিপশন (.db) আনুন",
"Import NewPipe subscriptions (.json)": "নতুন পাইপ সাবস্ক্রিপশন আনুন (.json)",
"Import NewPipe data (.zip)": "নিউপাইপ তথ্য আনুন (.zip)",
"Export": "তথ্য বের করুন",
"Export subscriptions as OPML": "সাবস্ক্রিপশন OPML হিসাবে আনুন",
"Export subscriptions as OPML (for NewPipe & FreeTube)": "OPML-এ সাবস্ক্রিপশন বের করুন(নিউ পাইপ এবং ফ্রিউটিউব এর জন্য)",
"Export data as JSON": "JSON হিসাবে তথ্য বের করুন",
"Delete account?": "অ্যাকাউন্ট মুছে ফেলবেন?",
"History": "ইতিহাস",
"An alternative front-end to YouTube": "ইউটিউবের একটি বিকল্পস্বরূপ সম্মুখ-প্রান্ত",
"JavaScript license information": "জাভাস্ক্রিপ্ট লাইসেন্সের তথ্য",
"source": "সূত্র",
"Log in": "লগ ইন",
"Log in/register": "লগ ইন/রেজিস্টার",
"Log in with Google": "গুগল দিয়ে লগ ইন করুন",
"User ID": "ইউজার আইডি",
"Password": "পাসওয়ার্ড",
"Time (h:mm:ss):": "সময় (ঘণ্টা:মিনিট:সেকেন্ড):",
"Text CAPTCHA": "টেক্সট ক্যাপচা",
"Image CAPTCHA": "চিত্র ক্যাপচা",
"Sign In": "সাইন ইন",
"Register": "নিবন্ধন",
"E-mail": "ই-মেইল",
"Google verification code": "গুগল যাচাইকরণ কোড",
"Preferences": "পছন্দসমূহ",
"preferences_category_player": "প্লেয়ারের পছন্দসমূহ",
"preferences_video_loop_label": "সর্বদা লুপ: ",
"preferences_autoplay_label": "স্বয়ংক্রিয় চালু: ",
"preferences_continue_label": "ডিফল্টভাবে পরবর্তী চালাও: ",
"preferences_continue_autoplay_label": "পরবর্তী ভিডিও স্বয়ংক্রিয়ভাবে চালাও: ",
"preferences_listen_label": "সহজাতভাবে শোনো: ",
"preferences_local_label": "ভিডিও প্রক্সি করো: ",
"preferences_speed_label": "সহজাত গতি: ",
"preferences_quality_label": "পছন্দের ভিডিও মান: ",
"preferences_volume_label": "প্লেয়ার শব্দের মাত্রা: ",
"LIVE": "লাইভ",
"Shared `x` ago": "`x` আগে শেয়ার করা হয়েছে",
"Unsubscribe": "আনসাবস্ক্রাইব",
"generic_views_count": "{{count}}জন দেখেছে",
"generic_views_count_plural": "{{count}}জন দেখেছে",
"generic_videos_count": "{{count}}টি ভিডিও",
"generic_videos_count_plural": "{{count}}টি ভিডিও",
"generic_subscribers_count": "{{count}}জন অনুসরণকারী",
"generic_subscribers_count_plural": "{{count}}জন অনুসরণকারী",
"preferences_watch_history_label": "দেখার ইতিহাস চালু করো: ",
"preferences_quality_option_dash": "ড্যাশ (সময়োপযোগী মান)",
"preferences_quality_dash_option_auto": "স্বয়ংক্রিয়",
"preferences_quality_dash_option_best": "সেরা",
"preferences_quality_dash_option_worst": "মন্দতম",
"preferences_quality_dash_option_4320p": "৪৩২০পি",
"preferences_quality_dash_option_2160p": "২১৬০পি",
"preferences_quality_dash_option_1440p": "১৪৪০পি",
"preferences_quality_dash_option_480p": "৪৮০পি",
"preferences_quality_dash_option_360p": "৩৬০পি",
"preferences_quality_dash_option_240p": "২৪০পি",
"preferences_quality_dash_option_144p": "১৪৪পি",
"preferences_comments_label": "সহজাত মন্তব্য: ",
"youtube": "ইউটিউব",
"Fallback captions: ": "বিকল্প উপাখ্যান: ",
"preferences_related_videos_label": "সম্পর্কিত ভিডিও দেখাও: ",
"preferences_annotations_label": "সহজাতভাবে টীকা দেখাও ",
"preferences_quality_option_hd720": "উচ্চ৭২০",
"preferences_quality_dash_label": "পছন্দের ড্যাশ ভিডিও মান: ",
"preferences_captions_label": "সহজাত উপাখ্যান: ",
"generic_playlists_count": "{{count}}টি চালুতালিকা",
"generic_playlists_count_plural": "{{count}}টি চালুতালিকা",
"reddit": "রেডিট",
"invidious": "ইনভিডিয়াস",
"generic_subscriptions_count": "{{count}}টি অনুসরণ",
"generic_subscriptions_count_plural": "{{count}}টি অনুসরণ",
"preferences_quality_option_medium": "মধ্যম",
"preferences_quality_option_small": "ছোট",
"preferences_quality_dash_option_1080p": "১০৮০পি",
"preferences_quality_dash_option_720p": "৭২০পি"
}

Some files were not shown because too many files have changed in this diff Show More