210 Commits

Author SHA1 Message Date
Omar Roth
05988c1c49 Bump version 2019-11-18 20:41:42 -05:00
Omar Roth
d46b26e3bc Use QUIC for connections to YouTube 2019-11-18 17:28:32 -05:00
Omar Roth
236c172c6f Merge pull request #896 from sh4dowb/master
Fixed double quotes in meta description
2019-11-14 10:38:38 -05:00
Omar Roth
59fcb56972 Merge pull request #907 from tleydxdy/patch-2
Fix docker build for now
2019-11-14 10:38:12 -05:00
Omar Roth
c07cd3a856 Fix typo in playlist url 2019-11-14 10:11:33 -05:00
tleydxdy
37766347a5 Fix docker build for now 2019-11-13 08:57:12 -05:00
sh4dowb
79da61782b Fixed double quotes in meta description 2019-11-11 19:00:23 +03:00
Omar Roth
8af87f1a8b Fix updating of cookies 2019-11-10 10:02:02 -05:00
Omar Roth
494c954cbb Add etag to /api/v1/annotations 2019-11-09 22:05:17 -05:00
Omar Roth
71bc9eea28 Add support for Anti-Captcha 2019-11-09 14:22:39 -05:00
Omar Roth
e3b2bcfd06 Fix ID for search duration 2019-11-08 09:29:33 -05:00
Omar Roth
142d974641 Use force_resolve for search suggestions 2019-11-07 12:25:34 -05:00
Omar Roth
e56129111a Update CHANGELOG and bump version 2019-11-05 23:38:49 -05:00
Omar Roth
0e1d6aa85c Update error messages for video extractor 2019-11-05 19:39:11 -05:00
Omar Roth
bcdb8cd770 Fix default fo dark_mode 2019-11-04 17:08:13 -05:00
Omar Roth
7b2ca55089 Fix escaping in email query 2019-11-04 12:26:05 -05:00
Omar Roth
f6ef0b684a Fix word-break for links in channel RSS 2019-11-03 08:53:16 -05:00
Omar Roth
02e1cdf210 Add support for '/yts/img' endpoint 2019-11-01 12:02:38 -04:00
Omar Roth
b58950c574 Fix decoding for channel playlists extractor 2019-11-01 12:00:59 -04:00
Omar Roth
833a60f29c Update pubsub to use client pool 2019-11-01 07:34:36 -04:00
Omar Roth
f776d67c03 Update sed replace in Dockerfile 2019-10-28 12:49:03 -04:00
Omar Roth
13e7cca1a4 Bump read timeout 2019-10-28 12:34:50 -04:00
Omar Roth
0f3c477ff3 Remove dependency on ImageMagick (replace with rsvg-convert) 2019-10-28 10:49:05 -04:00
Omar Roth
039cc30c07 Fix host replace in Dockerfile 2019-10-28 10:45:22 -04:00
Omar Roth
25c8cd9246 Fix escaping for search params 2019-10-28 06:17:39 -04:00
Omar Roth
c58841100a Fix extractor for channel community cursor 2019-10-27 21:44:17 -04:00
Omar Roth
03e24cccd0 Add support for configurable administrator email 2019-10-27 14:18:07 -04:00
Omar Roth
35f011758d Merge pull request #850 from XVnNzb2kFEhV9Tjm/master
Add Japanese translations
2019-10-27 14:09:31 -04:00
Omar Roth
2ebfaf76f2 Refactor continuation token handling 2019-10-27 13:50:42 -04:00
Omar Roth
0cf187dee7 Add support for image captcha in Google login 2019-10-27 00:19:05 -04:00
Omar Roth
bdeb325bad Fix monkeypatch for HTTP::Client 2019-10-26 11:51:23 -04:00
Omar Roth
a1225b6d0d Sanitize input to decode_length_seconds 2019-10-26 10:17:25 -04:00
XVnNzb2kFEhV9Tjm
f0368b02c4 Add Japanese translations 2019-10-26 18:34:25 +09:00
Omar Roth
202de1436d Fix broken connections in pool 2019-10-25 23:06:08 -04:00
Omar Roth
7f8746fcd4 Remove invalid connections from pool 2019-10-25 22:40:53 -04:00
Omar Roth
e05a25d701 Vary user-agent 2019-10-25 18:02:33 -04:00
Omar Roth
6930570fa2 Add HTTPClient pool 2019-10-25 12:58:16 -04:00
Omar Roth
aba2c5b938 Remove code for /api/v1/insights 2019-10-25 12:25:57 -04:00
Tommy
d82f86dcd9 Update entrypoint.postgres.sh (#843)
* Update entrypoint.postgres.sh
2019-10-22 07:37:26 -04:00
Omar Roth
159b4f9734 Format source 2019-10-21 21:40:03 -04:00
Omar Roth
46a737c7a1 Skip deleted videos in playlist 2019-10-21 19:00:56 -04:00
Omar Roth
a731486ab7 Fix typo in locale regex 2019-10-21 11:11:29 -04:00
Omar Roth
c3e57f1fdd Fix typo in footer 2019-10-20 23:02:16 -04:00
Omar Roth
a9af484412 Merge pull request #839 from TheFrenchGhosty/crypto
Add protocol to the cryptocurrencies
2019-10-20 22:39:24 -04:00
Omar Roth
007646774e Fix typo in English locale 2019-10-20 21:01:27 -04:00
Omar Roth
2d78e35e16 Fix typo in syncing user preferences 2019-10-20 20:58:50 -04:00
Omar Roth
7524b5e349 Move feed_menu and default_home into user preferences 2019-10-20 20:43:33 -04:00
Omar Roth
2a04a48b89 Fix redirect for livestreams 2019-10-20 12:48:55 -04:00
TheFrenchGhosty
3cbdaab81e Add protocol to the cryptocurrencies 2019-10-19 20:23:27 +02:00
Omar Roth
8c858a5953 Merge pull request #829 from l10n-tw/translation
Update zh_TW translations.
2019-10-19 13:14:33 -04:00
TheFrenchGhosty
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
Omar Roth
4e5324916c Merge pull request #836 from EsmailELBoBDev2/master
Update ar.json
2019-10-19 13:12:58 -04:00
Esmail EL BoB
1a77becc6a Update ar.json 2019-10-18 17:22:45 +00:00
Omar Roth
23ccaea2ff Fix comment event listener 2019-10-18 12:44:11 -04:00
Omar Roth
2a4b252a9d Only force resolve for www.youtube.com 2019-10-18 12:41:03 -04:00
Jeff Huang
9ae4edfee5 Update zh_TW translations. 2019-10-17 08:48:34 +08:00
Omar Roth
bf48809b61 Allow unlisted playlists to be viewed from /api/v1/playlists/ 2019-10-16 08:21:26 -04:00
Omar Roth
57a80a3c10 Add missing text to locales 2019-10-15 22:52:11 -04:00
Omar Roth
3f3e52d7ae Fix indexId for created playlist video 2019-10-15 22:09:01 -04:00
Omar Roth
5c69110658 Merge pull request #673 from omarroth/add-playlists
Add initial support for custom playlists
2019-10-15 21:29:34 -04:00
Omar Roth
be055d9dcb Add support for custom playlists 2019-10-15 21:17:14 -04:00
Omar Roth
1e34a61911 Fix white-space for RSS feeds 2019-10-14 21:07:07 -04:00
Omar Roth
97bd1da2a2 Remove SSL redirect 2019-10-14 21:07:07 -04:00
Omar Roth
330ffb803f Remove invalid source map directive for videojs-quality-selector 2019-10-14 21:07:07 -04:00
Omar Roth
7b77f200be Merge pull request #817 from TheFrenchGhosty/master
French Translation updated - Rewording and corrections
2019-10-13 17:34:45 -05:00
TheFrenchGhosty
15a3c8408f Assume feed means subscriptions feed 2019-10-12 23:15:53 +02:00
TheFrenchGhosty
bc1784ed2b French Translation updated, rewording and corrections 2019-10-12 23:11:40 +02:00
Omar Roth
55f0a82249 Remove Patreon links 2019-10-12 10:07:18 -04:00
Omar Roth
7aada3f328 Avoid override for X-Client headers 2019-10-10 23:45:46 -04:00
Omar Roth
dad885c051 Add YouTube-Client headers to HTTP requests 2019-10-10 22:03:39 -04:00
Omar Roth
f5c7bbfda8 Add support for zh-TW translation 2019-10-09 10:23:26 -04:00
ButterflyOfFire
f832743009 Update Arabic translation 2019-10-09 16:22:39 +02:00
Omar Roth
7551de6439 Merge pull request #791 from l10n-tw/translation
Add zh-TW translations.
2019-10-09 10:22:34 -04:00
Omar Roth
e03b4b7505 Hide scrollbar for player menus 2019-10-05 11:51:31 -04:00
Omar Roth
2d59fdd178 Fix default value for empty description 2019-10-04 17:04:43 -04:00
Omar Roth
e61c8046f4 Fix z-index, scrollbar in player 2019-10-04 12:50:44 -04:00
Omar Roth
c0796ac3d6 Add description to RSS body 2019-10-04 12:50:22 -04:00
Omar Roth
68be24ffc6 Refactor process_video_params 2019-10-04 12:23:28 -04:00
Omar Roth
9dcc87c705 Refactor storyboard generation 2019-10-04 10:26:02 -04:00
Omar Roth
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
agony
affeeb39de Fixed bug that made the whole 'Invidious' div clickable. Solves #691 2019-10-02 14:05:58 +02:00
Jeff Huang
f5d8a952f2 Add zh-TW translations. 2019-10-02 16:28:25 +08:00
Omar Roth
da07f99d3d Bump supported Crystal version 2019-09-30 15:36:54 -04:00
Omar Roth
eef66de68c Merge pull request #743 from girst/rssparams
Forward query string parameters from Atom feeds
2019-09-30 15:36:35 -04:00
girst
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
Omar Roth
553d52a45e Update silvermine quality selector 2019-09-26 17:11:10 -04:00
Omar Roth
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
Omar Roth
1e7c176481 Merge pull request #766 from leonklingele/travis-shallow-clone
travis: unshallowly clone Git repo
2019-09-24 20:50:48 -04:00
Omar Roth
e390405d0c Update privacy policy 2019-09-24 20:47:49 -04:00
Leon Klingele
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
Leon Klingele
b25013c4a2 docker,travis: fail build on any warning 2019-09-25 01:22:51 +02:00
Omar Roth
6942916f13 Merge remote-tracking branch 'weblate/master' 2019-09-24 13:48:49 -04:00
Omar Roth
f69f0b97f5 Add fix for index out of bounds during high load 2019-09-24 13:38:50 -04:00
Omar Roth
4361ea9686 Update DB calls for 0.31.0 2019-09-24 13:38:50 -04:00
Omar Roth
be2ee33273 Fix overflow for player controls 2019-09-24 13:38:50 -04:00
Omar Roth
8c2ddb0255 Add config options for host binding and port 2019-09-24 13:38:50 -04:00
Omar Roth
466a5a932b Add support for Turkish translation 2019-09-24 13:38:50 -04:00
Oguz Ersen
8a3c6382e9 Add Turkish translation 2019-09-24 13:38:46 -04:00
Oguz Ersen
a2b45120c5 Update Turkish translation 2019-09-24 19:31:37 +02:00
Oguz Ersen
546ad52e11 Add Turkish translation 2019-09-24 19:31:37 +02:00
leonklingele
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
Omar Roth
1085ca4a2d Fix typo in Google login 2019-09-22 09:54:54 -04:00
Omar Roth
9766322e99 Update videojs-quality-selector 2019-09-21 22:22:20 -04:00
Omar Roth
cfb68e3bff Add additional handling for unplayable videos 2019-09-21 20:06:08 -04:00
Omar Roth
a006963fb8 Update Google login 2019-09-21 20:06:08 -04:00
Omar Roth
24c95c27c3 Merge pull request #752 from gnomus/master
[Fix][Docker] Update Package Repository for Install
2019-09-14 10:05:35 -04:00
gnomus
3c40c0be6b Update Package Repository for Install 2019-09-13 15:06:44 +02:00
Omar Roth
b1fc80b79a Update sub_count extractor 2019-09-12 21:09:23 -04:00
Omar Roth
50d793e49b Hide video count for auto-generated channels 2019-09-12 13:11:21 -04:00
Omar Roth
34c43b8349 Add support for abbreviated sub count in search 2019-09-12 13:06:27 -04:00
Omar Roth
7002a316fd Filter movies from recommended videos 2019-09-12 13:06:10 -04:00
Omar Roth
1f37faad42 Fix plurilzation regex 2019-09-09 18:09:21 -04:00
Omar Roth
68cf24d100 Add support for channel redirects 2019-09-08 12:08:59 -04:00
Omar Roth
86491da253 Fix map for recommended videos 2019-09-07 21:56:33 -04:00
Omar Roth
90249cdafa Fix extractor for short_view_count_text 2019-09-07 20:09:08 -04:00
Omar Roth
7c75111c41 Refactor error handling for API endpoints 2019-09-05 14:12:14 -04:00
Omar Roth
7b53b6bfef Shrink continuation cursor for YouTube comments 2019-09-04 15:47:27 -04:00
Jorge Maldonado Ventura
fded5fd900 Update Spanish translation 2019-09-03 21:10:49 -04:00
Swann Martinet
950965bd4a Update French translation 2019-09-03 21:10:49 -04:00
Swann Martinet
3a359319fa Update German translation 2019-09-03 21:10:49 -04:00
Allan Nordhøy
d3dd82c699 Update Norwegian Bokmål translation 2019-09-03 21:10:49 -04:00
Jorge Maldonado Ventura
81f192bccb Update Esperanto translation 2019-09-03 21:10:49 -04:00
ButterflyOfFire
60a23febed Update Arabic translation 2019-09-03 21:10:48 -04:00
Esmail EL BoB
d0e280cbac Update ar.json (#728)
* Update ar.json
2019-09-03 21:04:04 -04:00
unbranched
ecb62c8659 Italian translation update (#724)
* Italian translation update
2019-09-03 21:02:53 -04:00
Omar Roth
12669df92b Merge pull request #729 from Infinisil/migrate
Provide db user in migrate-db-3646395.sh
2019-09-01 17:30:22 -04:00
Omar Roth
44b2afeffa Merge pull request #675 from Dragnucs/patch-1
Add Postgres health check
2019-09-01 09:53:04 -04:00
Omar Roth
70f435e909 Fix nillable for recommendedVideos 2019-08-31 16:24:13 -04:00
Omar Roth
512d82071e Fix invalid viewCountText in related videos 2019-08-31 15:58:38 -04:00
Omar Roth
3896230199 Fix type cast for viewCount 2019-08-31 01:11:45 -04:00
tleydxdy
b902880a05 fix docker build (#734) 2019-08-31 01:11:25 -04:00
Silvan Mosberger
418526af16 Provide db user in migrate-db-3646395.sh 2019-08-29 02:25:15 +02:00
Omar Roth
45ad212459 Handle redirects in /videoplayback 2019-08-27 09:53:44 -05:00
Omar Roth
0f49d424d3 Refactor search params 2019-08-27 09:35:15 -05:00
Omar Roth
01e42c8d6f Flatten viewCountText 2019-08-27 08:52:22 -05:00
Omar Roth
26107bd6c3 Minor refactor 2019-08-27 08:08:26 -05:00
Omar Roth
7d3ecd2297 Bump JS/CSS dependencies 2019-08-27 08:01:33 -05:00
Omar Roth
16056661dd Update recommended videos extractor 2019-08-27 08:00:04 -05:00
Omar Roth
059f50dad4 Add 'playlistThumbnail' to playlist objects 2019-08-21 19:08:11 -05:00
Omar Roth
4c9975a7d9 Use accurate sub count when available 2019-08-21 18:35:54 -05:00
Omar Roth
9f9cc1ffb5 Refactor search extractor 2019-08-21 18:23:20 -05:00
Omar Roth
e768e1e277 Fix allowed_regions for globally blocked videos 2019-08-19 10:16:11 -05:00
leonklingele
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
Omar Roth
2b94975345 Fix playlist_thumbnail extractor 2019-08-16 20:06:21 -05:00
leonklingele
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
Dragnucs
7eaac995bd Change font family to better native selection (#679) 2019-08-16 15:59:05 -05:00
Omar Roth
a19cdb5e72 Fix season playlists 2019-08-16 15:46:59 -05:00
psvenk
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
Omar Roth
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
Omar Roth
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
Leon Klingele
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
Omar Roth
900d8790b3 Refactor geo-bypass 2019-08-14 18:09:07 -05:00
Omar Roth
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
Omar Roth
0727acf458 Merge pull request #695 from leonklingele/crystalfmt
Format Crystal files
2019-08-14 18:06:37 -05:00
Omar Roth
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
Leon Klingele
10d690c8fb shard: update to crystal 0.30.1 2019-08-14 23:44:27 +02:00
Leon Klingele
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
Leon Klingele
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
Andrew
00346781bb Fix annoying typo in Preferences view 2019-08-14 20:12:37 +00:00
Leon Klingele
4c6e92eea1 travis: also test Docker build 2019-08-10 17:00:50 +02:00
Omar Roth
b63f469110 Fix typo in ConfigPreferences 2019-08-09 14:09:24 -05:00
Omar Roth
f6f176afc1 Merge pull request #680 from leonklingele/add-player-styles
Add support for player styles
2019-08-09 13:49:51 -05:00
Omar Roth
3de37a61c5 Update videojs-http-source-selector 2019-08-09 10:36:41 -05:00
Omar Roth
2d955dae48 Force redirect for videos without audio 2019-08-09 10:36:22 -05:00
Leon Klingele
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
Dragnucs
37dba6ebfd Add Postgres health check 2019-08-07 08:07:36 +00:00
Omar Roth
66b949bed1 Format history.ecr 2019-08-05 18:57:32 -05:00
Omar Roth
c9a05187fb Update icon for unlisted videos 2019-08-05 18:57:32 -05:00
Omar Roth
cc956583fb Fix detection of unavailable videos 2019-08-05 18:57:32 -05:00
Omar Roth
14206efb09 Merge pull request #671 from leonklingele/shard-upgrade-dependencies
shard: update dependencies
2019-08-04 22:37:36 -05:00
Leon Klingele
5e6d7f5d16 shard: update dependencies 2019-08-05 04:19:09 +02:00
Omar Roth
7a33831d14 Fix detection of premium content 2019-08-04 20:57:34 -05:00
Omar Roth
4f120e19fd Fix overflow for channel description 2019-08-04 09:46:26 -05:00
Omar Roth
37d064d836 Bump Crystal version 2019-08-04 09:16:29 -05:00
leonklingele
824150f89b Add Travis CI and pin dependencies (#655) 2019-08-04 09:10:32 -05:00
Omar Roth
f7dc4cca2c Merge pull request #665 from leonklingele/improve-dockerfile
docker: various improvements to Dockerfile
2019-08-04 08:07:16 -05:00
Leon Klingele
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
Omar Roth
5680d5a7be Sort dash representations by framerate 2019-08-02 15:24:38 -05:00
Omar Roth
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
Omar Roth
c41beae99a Add fix for channels with empty descriptions 2019-08-01 07:49:33 -05:00
Leon Klingele
fe2cffb25b Fix jumpy page on search field focus 2019-08-01 09:35:57 +02:00
Omar Roth
f71d5c429d Add description to channel pages 2019-07-31 19:29:16 -05:00
Omar Roth
dce5816b18 Fix image url extractor 2019-07-31 19:16:09 -05:00
leonklingele
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
mondstern
ec36c69984 Update German translation 2019-07-31 09:37:43 -05:00
recette-lemon
2458db03de Update Icelandic translation 2019-07-31 09:36:55 -05:00
Brn9hrd7
7528b7bc1a Update german translation (#650) 2019-07-31 09:32:16 -05:00
TheFrenchGhosty
8af33084ed French translation updated - New words, consistency (#643)
* New words translated, more consistency
2019-07-31 08:52:41 -05:00
Omar Roth
f643175156 Fix typo in video extractor 2019-07-30 10:12:41 -05:00
Omar Roth
0321dda1d7 Fix handling for video content warnings 2019-07-29 20:39:12 -05:00
Omar Roth
ff5d79e3ee Update video extractor 2019-07-29 19:41:45 -05:00
Omar Roth
4ee3ec09df Autofill search for playlists and communities page 2019-07-27 08:51:10 -05:00
Omar Roth
cfe9d47fa0 Add support for '/embed/?list' 2019-07-25 10:36:35 -05:00
Omar Roth
607d6125fc Add support for '/embed/live_stream' 2019-07-24 19:18:26 -05:00
Omar Roth
6215259565 Add support for Google login verification 2019-07-22 13:28:36 -05:00
Omar Roth
d034fecc89 Remove default arguments from function definitions 2019-07-20 20:33:44 -05:00
Omar Roth
f18d8229c0 Refactor continuation protocol buffers 2019-07-20 20:18:08 -05:00
Omar Roth
e736626953 Fix continuation for last page of playlists 2019-07-20 11:38:20 -05:00
Omar Roth
c2c438637a Merge remote-tracking branch 'weblate/master' 2019-07-18 21:58:51 -05:00
Omar Roth
94638fe42c Update translations 2019-07-18 21:52:25 -05:00
recette-lemon
55ecfda39a Update Icelandic translation 2019-07-18 21:52:25 -05:00
Omar Roth
d97a272aa5 Fix check for 2-step verification 2019-07-18 21:52:24 -05:00
W2hJ3MOmIRovEpTeahe80jC
80a1944b9d Update Icelandic translation 2019-07-19 01:52:11 +02:00
recette-lemon
138cf943a9 Update Icelandic translation 2019-07-19 01:52:11 +02:00
recette-lemon
c7e672e533 Update Icelandic translation 2019-07-19 01:52:11 +02:00
Omar Roth
1b74a04efd Add 'force_resolve' to fix issues with rate limiting 2019-07-18 18:51:10 -05:00
Omar Roth
290c7e6009 Disable autoplay in community tabs 2019-07-14 10:13:40 -05:00
Omar Roth
e8a56e0fea Add '1.75' playback speed 2019-07-14 10:13:40 -05:00
Omar Roth
1ae7b646b3 Merge pull request #633 from EsmailELBoBDev2/patch-4
Update ar.json
2019-07-14 10:13:04 -05:00
Esmail EL BoB
42e2d73ce2 Update ar.json 2019-07-14 06:07:02 +00:00
107 changed files with 6330 additions and 2665 deletions

34
.travis.yml Normal file
View File

@@ -0,0 +1,34 @@
dist: bionic
jobs:
include:
- stage: build
# TODO: Shallowly clone again once the .git folder is no longer required for building
git:
depth: false
language: crystal
crystal: latest
before_install:
- shards update
- shards install
install:
- crystal build --warnings all --error-on-warnings src/invidious.cr
script:
- crystal tool format --check
- crystal spec
- stage: build_docker
# TODO: Shallowly clone again once the .git folder is no longer required for building
git:
depth: false
language: minimal
services:
- docker
install:
- docker-compose build
script:
- docker-compose up -d
- sleep 15 # Wait for cluster to become ready, TODO: do not sleep
- HEADERS="$(curl -I -s http://localhost:3000/)"
- STATUS="$(echo $HEADERS | head -n1)"
- if [[ "$STATUS" != *"200 OK"* ]]; then echo "$HEADERS"; exit 1; fi

View File

@@ -1,3 +1,138 @@
# 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) # 0.19.0 (2019-07-13)
# Version 0.19.0: Communities # Version 0.19.0: Communities

View File

@@ -1,5 +1,7 @@
# Invidious # Invidious
[![Build Status](https://travis-ci.org/omarroth/invidious.svg?branch=master)](https://travis-ci.org/omarroth/invidious)
## Invidious is an alternative front-end to YouTube ## Invidious is an alternative front-end to YouTube
- Audio-only mode (and no need to keep window open on mobile) - Audio-only mode (and no need to keep window open on mobile)
@@ -23,7 +25,6 @@
- Developer [API](https://github.com/omarroth/invidious/wiki/API) - Developer [API](https://github.com/omarroth/invidious/wiki/API)
Liberapay: https://liberapay.com/omarroth Liberapay: https://liberapay.com/omarroth
Patreon: https://patreon.com/omarroth
BTC: 356DpZyMXu6rYd55Yqzjs29n79kGKWcYrY BTC: 356DpZyMXu6rYd55Yqzjs29n79kGKWcYrY
BCH: qq4ptclkzej5eza6a50et5ggc58hxsq5aylqut2npk BCH: qq4ptclkzej5eza6a50et5ggc58hxsq5aylqut2npk
@@ -78,7 +79,7 @@ $ docker-compose build
```bash ```bash
# Arch Linux # Arch Linux
$ sudo pacman -S shards crystal imagemagick librsvg postgresql $ sudo pacman -S shards crystal librsvg postgresql
# Ubuntu or Debian # Ubuntu or Debian
# First you have to add the repository to your APT configuration. For easy setup just run in your command line: # First you have to add the repository to your APT configuration. For easy setup just run in your command line:
@@ -87,7 +88,7 @@ $ curl -sSL https://dist.crystal-lang.org/apt/setup.sh | sudo bash
$ curl -sL "https://keybase.io/crystal/pgp_keys.asc" | sudo apt-key add - $ 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 $ 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-get update
$ sudo apt install crystal libssl-dev libxml2-dev libyaml-dev libgmp-dev libreadline-dev librsvg2-dev postgresql imagemagick libsqlite3-dev $ sudo apt install crystal libssl-dev libxml2-dev libyaml-dev libgmp-dev libreadline-dev postgresql librsvg2-bin libsqlite3-dev
``` ```
#### Add invidious user and clone repository #### Add invidious user and clone repository
@@ -142,7 +143,7 @@ $ sudo systemctl start invidious.service
```bash ```bash
# Install dependencies # Install dependencies
$ brew update $ brew update
$ brew install shards crystal-lang postgres imagemagick librsvg $ brew install shards crystal postgres imagemagick librsvg
# Clone repository and setup postgres database # Clone repository and setup postgres database
$ git clone https://github.com/omarroth/invidious $ git clone https://github.com/omarroth/invidious

View File

@@ -21,10 +21,9 @@ body {
color: #f0f0f0; color: #f0f0f0;
} }
.pure-form > fieldset > input, input,
.pure-control-group > input, select,
.pure-form > fieldset > select, textarea {
.pure-control-group > select {
color: rgba(35, 35, 35, 1); color: rgba(35, 35, 35, 1);
} }

View File

@@ -1,3 +1,10 @@
html,
body {
font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", Roboto, Oxygen,
Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Helvetica,
Arial, sans-serif;
}
.deleted { .deleted {
background-color: rgb(255, 0, 0, 0.5); background-color: rgb(255, 0, 0, 0.5);
} }
@@ -103,6 +110,7 @@ img.thumbnail {
height: 100%; height: 100%;
left: 0; left: 0;
top: 0; top: 0;
object-fit: cover;
} }
.length { .length {
@@ -113,7 +121,6 @@ img.thumbnail {
border-radius: 2px; border-radius: 2px;
padding: 2px; padding: 2px;
font-size: 16px; font-size: 16px;
font-family: sans-serif;
right: 0.25em; right: 0.25em;
bottom: -0.75em; bottom: -0.75em;
} }
@@ -126,7 +133,6 @@ img.thumbnail {
border-radius: 2px; border-radius: 2px;
padding: 4px 8px 4px 8px; padding: 4px 8px 4px 8px;
font-size: 16px; font-size: 16px;
font-family: sans-serif;
left: 0.2em; left: 0.2em;
top: -0.7em; top: -0.7em;
} }
@@ -156,9 +162,12 @@ img.thumbnail {
.navbar .index-link { .navbar .index-link {
font-weight: bold; font-weight: bold;
display: inline;
} }
.navbar > .searchbar .pure-form input[type="search"] { .navbar > .searchbar .pure-form input[type="search"] {
margin-bottom: 1px;
border-top: 0; border-top: 0;
border-left: 0; border-left: 0;
border-right: 0; border-right: 0;
@@ -169,7 +178,6 @@ img.thumbnail {
box-shadow: none; box-shadow: none;
transition: 0.1s border-bottom;
-webkit-appearance: none; -webkit-appearance: none;
} }
@@ -188,6 +196,7 @@ input[type="search"]::-webkit-search-cancel-button {
/* attract focus to the searchbar by adding a subtle transition */ /* attract focus to the searchbar by adding a subtle transition */
.navbar > .searchbar .pure-form input[type="search"]:focus { .navbar > .searchbar .pure-form input[type="search"]:focus {
margin-bottom: 0px;
border-bottom: 2px solid #aaa; border-bottom: 2px solid #aaa;
} }
@@ -274,13 +283,17 @@ input[type="search"]::-webkit-search-cancel-button {
} }
/* Control Bar */ /* Control Bar */
@media screen and (max-width: 480px) { @media screen and (max-width: 640px) {
.video-js .vjs-control-bar, .video-js .vjs-control-bar,
.vjs-menu-button-popup .vjs-menu .vjs-menu-content { .vjs-menu-button-popup .vjs-menu .vjs-menu-content {
overflow: -webkit-paged-x; overflow-x: scroll;
} }
} }
ul.vjs-menu-content::-webkit-scrollbar {
display: none;
}
.vjs-user-inactive { .vjs-user-inactive {
cursor: none; cursor: none;
} }
@@ -322,9 +335,18 @@ input[type="search"]::-webkit-search-cancel-button {
order: 6; order: 6;
} }
.vjs-playback-rate > .vjs-menu {
width: 50px;
}
.vjs-control-bar { .vjs-control-bar {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
scrollbar-width: none;
}
.vjs-control-bar::-webkit-scrollbar {
display: none;
} }
.video-js .vjs-icon-cog { .video-js .vjs-icon-cog {
@@ -381,6 +403,7 @@ span > select {
/* ProgressBar marker */ /* ProgressBar marker */
.vjs-marker { .vjs-marker {
background-color: rgba(255, 255, 255, 1); background-color: rgba(255, 255, 255, 1);
z-index: 0;
} }
/* Big "Play" Button */ /* Big "Play" Button */
@@ -427,3 +450,22 @@ video.video-js {
.pure-control-group label { .pure-control-group label {
word-wrap: normal; word-wrap: normal;
} }
.video-js.player-style-invidious {
/* This is already the default */
}
.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;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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,6 +1,6 @@
/** /**
* videojs-http-source-selector * videojs-http-source-selector
* @version 1.1.5 * @version 1.1.6
* @copyright 2019 Justin Fujita <Justin@pivotshare.com> * @copyright 2019 Justin Fujita <Justin@pivotshare.com>
* @license MIT * @license MIT
*/ */

View File

@@ -1,6 +1,6 @@
/** /**
* videojs-share * videojs-share
* @version 3.0.0 * @version 3.2.1
* @copyright 2019 Mikhail Khazov <mkhazov.work@gmail.com> * @copyright 2019 Mikhail Khazov <mkhazov.work@gmail.com>
* @license MIT * @license MIT
*/ */

Binary file not shown.

View File

@@ -1,13 +1,13 @@
<?xml version="1.0" standalone="no"?> <?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" > <!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"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
<metadata> <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 By Adam Bradley
Copyright (c) 2018, Adam Bradley Copyright (c) 2019, Adam Bradley
</metadata> </metadata>
<defs> <defs>
<font id="Ionicons" horiz-adv-x="416" > <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

@@ -1,4 +1,6 @@
function get_playlist(plid, retries = 5) { function get_playlist(plid, retries) {
if (retries == undefined) retries = 5;
if (retries <= 0) { if (retries <= 0) {
console.log('Failed to pull playlist'); console.log('Failed to pull playlist');
return; return;
@@ -10,7 +12,8 @@ function get_playlist(plid, retries = 5) {
'&format=html&hl=' + video_data.preferences.locale; '&format=html&hl=' + video_data.preferences.locale;
} else { } else {
var plid_url = '/api/v1/playlists/' + plid + var plid_url = '/api/v1/playlists/' + plid +
'?continuation=' + video_data.id + '?index=' + video_data.index +
'&continuation' + video_data.id +
'&format=html&hl=' + video_data.preferences.locale; '&format=html&hl=' + video_data.preferences.locale;
} }
@@ -43,6 +46,9 @@ function get_playlist(plid, retries = 5) {
} }
url.searchParams.set('list', plid); url.searchParams.set('list', plid);
if (!plid.startsWith('RD')) {
url.searchParams.set('index', xhr.response.index);
}
location.assign(url.pathname + url.search); location.assign(url.pathname + url.search);
}); });
} }
@@ -63,32 +69,34 @@ function get_playlist(plid, retries = 5) {
xhr.send(); xhr.send();
} }
if (video_data.plid) { window.addEventListener('load', function (e) {
get_playlist(video_data.plid); if (video_data.plid) {
} else if (video_data.video_series) { get_playlist(video_data.plid);
player.on('ended', function () { } else if (video_data.video_series) {
var url = new URL('https://example.com/embed/' + video_data.video_series.shift()); 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) { if (video_data.params.autoplay || video_data.params.continue_autoplay) {
url.searchParams.set('autoplay', '1'); 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); 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); 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('local', video_data.params.local);
} }
if (video_data.video_series.length !== 0) { if (video_data.video_series.length !== 0) {
url.searchParams.set('playlist', video_data.video_series.join(',')) url.searchParams.set('playlist', video_data.video_series.join(','))
} }
location.assign(url.pathname + url.search); location.assign(url.pathname + url.search);
}); });
} }
});

View File

@@ -1,6 +1,8 @@
var notifications, delivered; var notifications, delivered;
function get_subscriptions(callback, retries = 5) { function get_subscriptions(callback, retries) {
if (retries == undefined) retries = 5;
if (retries <= 0) { if (retries <= 0) {
return; return;
} }

View File

@@ -1,7 +1,7 @@
var options = { var options = {
preload: 'auto', preload: 'auto',
liveui: true, 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: { controlBar: {
children: [ children: [
'playToggle', 'playToggle',
@@ -38,69 +38,7 @@ var shareOptions = {
embedCode: "<iframe id='ivplayer' type='text/html' width='640' height='360' src='" + embed_url + "' frameborder='0'></iframe>" embedCode: "<iframe id='ivplayer' type='text/html' width='640' height='360' src='" + embed_url + "' frameborder='0'></iframe>"
} }
var player = videojs('player', options, function () { var player = videojs('player', options);
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]);
}
}
}
});
});
if (location.pathname.startsWith('/embed/')) { if (location.pathname.startsWith('/embed/')) {
player.overlay({ player.overlay({
@@ -213,46 +151,321 @@ player.vttThumbnails({
// Enable annotations // Enable annotations
if (!video_data.params.listen && video_data.params.annotations) { if (!video_data.params.listen && video_data.params.annotations) {
var video_container = document.getElementById('player'); window.addEventListener('load', function (e) {
let xhr = new XMLHttpRequest(); var video_container = document.getElementById('player');
xhr.responseType = 'text'; let xhr = new XMLHttpRequest();
xhr.timeout = 60000; xhr.responseType = 'text';
xhr.open('GET', '/api/v1/annotations/' + video_data.id, true); xhr.timeout = 60000;
xhr.open('GET', '/api/v1/annotations/' + video_data.id, true);
xhr.onreadystatechange = function () { xhr.onreadystatechange = function () {
if (xhr.readyState === 4) { if (xhr.readyState === 4) {
if (xhr.status === 200) { if (xhr.status === 200) {
videojs.registerPlugin('youtubeAnnotationsPlugin', youtubeAnnotationsPlugin); videojs.registerPlugin('youtubeAnnotationsPlugin', youtubeAnnotationsPlugin);
if (!player.paused()) { if (!player.paused()) {
player.youtubeAnnotationsPlugin({ annotationXml: xhr.response, videoContainer: video_container });
} else {
player.one('play', function (event) {
player.youtubeAnnotationsPlugin({ annotationXml: xhr.response, videoContainer: video_container }); player.youtubeAnnotationsPlugin({ annotationXml: xhr.response, videoContainer: video_container });
}); } else {
player.one('play', function (event) {
player.youtubeAnnotationsPlugin({ annotationXml: xhr.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 increase_volume(delta) {
const curVolume = player.volume();
let newVolume = curVolume + delta;
if (newVolume > 1) {
newVolume = 1;
} else if (newVolume < 0) {
newVolume = 0;
}
player.volume(newVolume);
}
function toggle_muted() {
const isMuted = player.muted();
player.muted(!isMuted);
}
function skip_seconds(delta) {
const duration = player.duration();
const curTime = player.currentTime();
let newTime = curTime + delta;
if (newTime > duration) {
newTime = duration;
} else if (newTime < 0) {
newTime = 0;
}
player.currentTime(newTime);
}
function set_time_percent(percent) {
const duration = player.duration();
const newTime = duration * (percent / 100);
player.currentTime(newTime);
}
function toggle_play() {
if (player.paused()) {
player.play();
} else {
player.pause();
}
}
const toggle_captions = (function () {
let toggledTrack = null;
const onChange = function (e) {
toggledTrack = null;
};
const bindChange = function (onOrOff) {
player.textTracks()[onOrOff]('change', onChange);
};
// Wrapper function to ignore our own emitted events and only listen
// to events emitted by Video.js on click on the captions menu items.
const setMode = function (track, mode) {
bindChange('off');
track.mode = mode;
window.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() {
if (player.isFullscreen()) {
player.exitFullscreen();
} else {
player.requestFullscreen();
}
}
function increase_playback_rate(steps) {
const maxIndex = options.playbackRates.length - 1;
const curIndex = options.playbackRates.indexOf(player.playbackRate());
let newIndex = curIndex + steps;
if (newIndex > maxIndex) {
newIndex = maxIndex;
} else if (newIndex < 0) {
newIndex = 0;
}
player.playbackRate(options.playbackRates[newIndex]);
}
window.addEventListener('keydown', 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':
action = toggle_play;
break;
case 'ArrowUp':
if (isPlayerFocused) {
action = increase_volume.bind(this, 0.1);
}
break;
case 'ArrowDown':
if (isPlayerFocused) {
action = increase_volume.bind(this, -0.1);
}
break;
case 'm':
action = toggle_muted;
break;
case 'ArrowRight':
action = skip_seconds.bind(this, 5);
break;
case 'ArrowLeft':
action = skip_seconds.bind(this, -5);
break;
case 'l':
action = skip_seconds.bind(this, 10);
break;
case 'j':
action = skip_seconds.bind(this, -10);
break;
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
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':
action = next_video;
break;
case 'P':
// TODO: Add support to play back previous video.
break;
case '.':
// TODO: Add support for next-frame-stepping.
break;
case ',':
// TODO: Add support for previous-frame-stepping.
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;
} }
window.addEventListener('__ar_annotation_click', e => { if (action) {
const { url, target, seconds } = e.detail; e.preventDefault();
var path = new URL(url); action();
}
}, false);
if (path.href.startsWith('https://www.youtube.com/watch?') && seconds) { // Add support for controlling the player volume by scrolling over it. Adapted from
path.search += '&t=' + seconds; // https://github.com/ctd1500/videojs-hotkeys/blob/bb4a158b2e214ccab87c2e7b95f42bc45c6bfd87/videojs.hotkeys.js#L292-L328
(function () {
const volumeStep = 0.05;
const enableVolumeScroll = true;
const enableHoverScroll = true;
const doc = document;
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; };
}
var mouseScroll = function mouseScroll(event) {
var activeEl = doc.activeElement;
if (enableHoverScroll) {
// If we leave this undefined then it can match non-existent elements below
activeEl = 0;
} }
path = path.pathname + path.search; // When controls are disabled, hotkeys will be disabled as well
if (player.controls()) {
if (volumeHover) {
if (enableVolumeScroll) {
event = window.event || event;
var delta = Math.max(-1, Math.min(1, (event.wheelDelta || -event.detail)));
event.preventDefault();
if (target === 'current') { if (delta == 1) {
window.location.href = path; increase_volume(volumeStep);
} else if (target === 'new') { } else if (delta == -1) {
window.open(path, '_blank'); increase_volume(-volumeStep);
}
}
}
} }
}); };
xhr.send(); player.on('mousewheel', mouseScroll);
} player.on("DOMMouseScroll", mouseScroll);
}());
// Since videojs-share can sometimes be blocked, we defer it until last // Since videojs-share can sometimes be blocked, we defer it until last
player.share(shareOptions); player.share(shareOptions);

View File

@@ -0,0 +1,47 @@
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');
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 = '';
}
}
}
xhr.send('csrf_token=' + playlist_data.csrf_token);
}
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');
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 = '';
}
}
}
xhr.send('csrf_token=' + playlist_data.csrf_token);
}

File diff suppressed because one or more lines are too long

View File

@@ -1,8 +1,8 @@
var toggle_theme = document.getElementById('toggle_theme') var toggle_theme = document.getElementById('toggle_theme');
toggle_theme.href = 'javascript:void(0);'; toggle_theme.href = 'javascript:void(0);';
toggle_theme.addEventListener('click', function () { toggle_theme.addEventListener('click', function () {
var dark_mode = document.getElementById('dark_theme').media == 'none'; var dark_mode = document.getElementById('dark_theme').media === 'none';
var url = '/toggle_theme?redirect=false'; var url = '/toggle_theme?redirect=false';
var xhr = new XMLHttpRequest(); var xhr = new XMLHttpRequest();
@@ -11,19 +11,24 @@ toggle_theme.addEventListener('click', function () {
xhr.open('GET', url, true); xhr.open('GET', url, true);
set_mode(dark_mode); set_mode(dark_mode);
localStorage.setItem('dark_mode', dark_mode); window.localStorage.setItem('dark_mode', dark_mode ? 'dark' : 'light');
xhr.send(); xhr.send();
}); });
window.addEventListener('storage', function (e) { window.addEventListener('storage', function (e) {
if (e.key == 'dark_mode') { if (e.key === 'dark_mode') {
var dark_mode = e.newValue === 'true'; update_mode(e.newValue);
set_mode(dark_mode);
} }
}); });
function set_mode(bool) { window.addEventListener('load', function () {
window.localStorage.setItem('dark_mode', document.getElementById('dark_mode_pref').textContent);
// Update localStorage if dark mode preference changed on preferences page
update_mode(window.localStorage.dark_mode);
});
function set_mode (bool) {
document.getElementById('dark_theme').media = !bool ? 'none' : ''; document.getElementById('dark_theme').media = !bool ? 'none' : '';
document.getElementById('light_theme').media = bool ? 'none' : ''; document.getElementById('light_theme').media = bool ? 'none' : '';
@@ -33,3 +38,21 @@ function set_mode(bool) {
toggle_theme.children[0].setAttribute('class', 'icon ion-ios-moon'); toggle_theme.children[0].setAttribute('class', 'icon ion-ios-moon');
} }
} }
function update_mode (mode) {
if (mode === 'true' /* for backwards compatibility */ || mode === 'dark') {
// If preference for dark mode indicated
set_mode(true);
}
else if (mode === 'false' /* for backwards compaibility */ || mode === 'light') {
// If preference for light mode indicated
set_mode(false);
}
else if (document.getElementById('dark_mode_pref').textContent === '' && window.matchMedia('(prefers-color-scheme: dark)').matches) {
// If no preference indicated here and no preference indicated on the preferences page (backend), but the browser tells us that the operating system has a dark theme
set_mode(true);
}
// else do nothing, falling back to the mode defined by the `dark_mode` preference on the preferences page (backend)
}

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,7 @@
/** /**
* videojs-http-source-selector * videojs-http-source-selector
* @version 1.1.5 * @version 1.1.6
* @copyright 2019 Justin Fujita <Justin@pivotshare.com> * @copyright 2019 Justin Fujita <Justin@pivotshare.com>
* @license MIT * @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}); !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(r){"use strict";function o(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var e=(r=r&&r.hasOwnProperty("default")?r.default:r).getComponent("MenuItem"),t=r.getComponent("Component"),a=function(n){function e(e,t){return t.selectable=!0,t.multiSelectable=!1,n.call(this,e,t)||this}o(e,n);var t=e.prototype;return t.handleClick=function(){var e=this.options_;console.log("Changing quality to:",e.label),n.prototype.handleClick.call(this);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)},e}(e);t.registerComponent("SourceMenuItem",a);var u=r.getComponent("MenuButton"),n=function(i){function e(e,t){var o;o=i.call(this,e,t)||this,u.apply(s(o),arguments);var n=o.player().qualityLevels();if(t&&t.default)if("low"==t.default)for(var l=0;l<n.length;l++)n[l].enabled=0==l;else if(t.default="high")for(l=0;l<n.length;l++)n[l].enabled=l==n.length-1;return o.player().qualityLevels().on(["change","addqualitylevel"],r.bind(s(o),o.update)),o}o(e,i);var t=e.prototype;return t.createEl=function(){return r.dom.createEl("div",{className:"vjs-http-source-selector vjs-menu-button vjs-menu-button-popup vjs-control vjs-button"})},t.buildCSSClass=function(){return u.prototype.buildCSSClass.call(this)+" vjs-icon-cog"},t.update=function(){return u.prototype.update.call(this)},t.createItems=function(){for(var e=[],t=this.player().qualityLevels(),o=[],n=0;n<t.length;n++){var l=t.length-(n+1),i=l===t.selectedIndex,r=""+l,s=l;t[l].height?(r=t[l].height+"p",s=parseInt(t[l].height,10)):t[l].bitrate&&(r=Math.floor(t[l].bitrate/1e3)+" kbps",s=parseInt(t[l].bitrate,10)),0<=o.indexOf(r)||(o.push(r),e.push(new a(this.player_,{label:r,index:l,selected:i,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}(u),l={},i=r.registerPlugin||r.plugin,c=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(),r.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,r.mergeOptions(l,e))}),r.registerComponent("SourceMenuButton",n),r.registerComponent("SourceMenuItem",a)};return i("httpSourceSelector",c),c.VERSION="1.1.6",c});

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

@@ -73,29 +73,33 @@ if (continue_button) {
continue_button.onclick = continue_autoplay; 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) { function continue_autoplay(event) {
if (event.target.checked) { if (event.target.checked) {
player.on('ended', function () { player.on('ended', function () {
var url = new URL('https://example.com/watch?v=' + video_data.next_video); 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);
}); });
} else { } else {
player.off('ended'); player.off('ended');
@@ -109,7 +113,8 @@ function number_with_separator(val) {
return val; return val;
} }
function get_playlist(plid, retries = 5) { function get_playlist(plid, retries) {
if (retries == undefined) retries = 5;
playlist = document.getElementById('playlist'); playlist = document.getElementById('playlist');
if (retries <= 0) { if (retries <= 0) {
@@ -128,7 +133,8 @@ function get_playlist(plid, retries = 5) {
'&format=html&hl=' + video_data.preferences.locale; '&format=html&hl=' + video_data.preferences.locale;
} else { } else {
var plid_url = '/api/v1/playlists/' + plid + var plid_url = '/api/v1/playlists/' + plid +
'?continuation=' + video_data.id + '?index=' + video_data.index +
'&continuation=' + video_data.id +
'&format=html&hl=' + video_data.preferences.locale; '&format=html&hl=' + video_data.preferences.locale;
} }
@@ -163,6 +169,9 @@ function get_playlist(plid, retries = 5) {
} }
url.searchParams.set('list', plid); url.searchParams.set('list', plid);
if (!plid.startsWith('RD')) {
url.searchParams.set('index', xhr.response.index);
}
location.assign(url.pathname + url.search); location.assign(url.pathname + url.search);
}); });
} }
@@ -194,7 +203,8 @@ function get_playlist(plid, retries = 5) {
xhr.send(); xhr.send();
} }
function get_reddit_comments(retries = 5) { function get_reddit_comments(retries) {
if (retries == undefined) retries = 5;
comments = document.getElementById('comments'); comments = document.getElementById('comments');
if (retries <= 0) { if (retries <= 0) {
@@ -270,7 +280,8 @@ function get_reddit_comments(retries = 5) {
xhr.send(); xhr.send();
} }
function get_youtube_comments(retries = 5) { function get_youtube_comments(retries) {
if (retries == undefined) retries = 5;
comments = document.getElementById('comments'); comments = document.getElementById('comments');
if (retries <= 0) { if (retries <= 0) {
@@ -428,19 +439,21 @@ if (video_data.play_next) {
}); });
} }
if (video_data.plid) { window.addEventListener('load', function (e) {
get_playlist(video_data.plid); if (video_data.plid) {
} get_playlist(video_data.plid);
}
if (video_data.params.comments[0] === 'youtube') { if (video_data.params.comments[0] === 'youtube') {
get_youtube_comments(); get_youtube_comments();
} else if (video_data.params.comments[0] === 'reddit') { } else if (video_data.params.comments[0] === 'reddit') {
get_reddit_comments(); get_reddit_comments();
} else if (video_data.params.comments[1] === 'youtube') { } else if (video_data.params.comments[1] === 'youtube') {
get_youtube_comments(); get_youtube_comments();
} else if (video_data.params.comments[1] === 'reddit') { } else if (video_data.params.comments[1] === 'reddit') {
get_reddit_comments(); get_reddit_comments();
} else { } else {
comments = document.getElementById('comments'); comments = document.getElementById('comments');
comments.innerHTML = ''; comments.innerHTML = '';
} }
});

View File

@@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
psql invidious < config/sql/session_ids.sql psql invidious kemal < 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 "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" psql invidious kemal -c "ALTER TABLE users DROP COLUMN id"

View File

@@ -0,0 +1,19 @@
-- Table: public.playlist_videos
-- DROP TABLE public.playlist_videos;
CREATE TABLE 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 kemal;

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

@@ -0,0 +1,18 @@
-- Table: public.playlists
-- DROP TABLE public.playlists;
CREATE TABLE 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 kemal;

10
config/sql/privacy.sql Normal file
View File

@@ -0,0 +1,10 @@
-- Type: public.privacy
-- DROP TYPE public.privacy;
CREATE TYPE public.privacy AS ENUM
(
'Public',
'Unlisted',
'Private'
);

View File

@@ -7,6 +7,8 @@ services:
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- postgresdata:/var/lib/postgresql/data - postgresdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
invidious: invidious:
build: build:
context: . context: .

View File

@@ -1,15 +1,34 @@
FROM archlinux/base FROM alpine:edge
RUN apk add --no-cache crystal shards libc-dev \
RUN pacman -Sy --noconfirm shards crystal imagemagick librsvg \ yaml-dev libxml2-dev sqlite-dev zlib-dev curl && \
which pkgconf gcc ttf-liberation glibc curl -Lo /etc/apk/keys/omarroth.rsa.pub https://github.com/omarroth/boringssl-alpine/releases/download/1.1.0-r0/omarroth.rsa.pub && \
# base-devel contains many other basic packages, that are normally assumed to already exist on a clean arch system curl -Lo boringssl-dev.apk https://github.com/omarroth/boringssl-alpine/releases/download/1.1.0-r0/boringssl-dev-1.1.0-r0.apk && \
curl -Lo lsquic.apk https://github.com/omarroth/lsquic-alpine/releases/download/2.6.3-r0/lsquic-2.6.3-r0.apk && \
ADD . /invidious apk update && \
apk add boringssl-dev.apk lsquic.apk && \
rm -rf /var/cache/apk/* boringssl-dev.apk lsquic.apk
WORKDIR /invidious WORKDIR /invidious
COPY ./shard.yml ./shard.yml
RUN shards update && shards install
RUN cp /usr/lib/libcrypto.a ./lib/lsquic/src/lsquic/ext/libcrypto.a && \
cp /usr/lib/libssl.a ./lib/lsquic/src/lsquic/ext/libssl.a && \
cp /usr/lib/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/
RUN crystal build --release --warnings all --error-on-warnings \
# TODO: Remove next line, see https://github.com/crystal-lang/crystal/issues/7946
-Dmusl \
./src/invidious.cr
RUN sed -i 's/host: localhost/host: postgres/' config/config.yml && \ RUN apk add --no-cache librsvg ttf-opensans
shards update && shards install && \ RUN addgroup -g 1000 -S invidious && \
crystal build src/invidious.cr adduser -u 1000 -S invidious -G invidious
COPY ./assets/ ./assets/
COPY ./config/config.yml ./config/config.yml
COPY ./config/sql/ ./config/sql/
COPY ./locales/ ./locales/
RUN sed -i 's/host: \(127.0.0.1\|localhost\)/host: postgres/' config/config.yml
USER invidious
CMD [ "/invidious/invidious" ] CMD [ "/invidious/invidious" ]

View File

@@ -19,6 +19,9 @@ if [ ! -f /var/lib/postgresql/data/setupFinished ]; then
su postgres -c 'psql invidious kemal < config/sql/session_ids.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/nonces.sql'
su postgres -c 'psql invidious kemal < config/sql/annotations.sql' su postgres -c 'psql invidious kemal < config/sql/annotations.sql'
su postgres -c 'psql invidious kemal < config/sql/playlists.sql'
su postgres -c 'psql invidious kemal < config/sql/playlist_videos.sql'
su postgres -c 'psql invidious kemal < config/sql/privacy.sql'
touch /var/lib/postgresql/data/setupFinished touch /var/lib/postgresql/data/setupFinished
echo "### invidious database setup finished" echo "### invidious database setup finished"
exit exit

View File

@@ -1,6 +1,7 @@
{ {
"`x` subscribers": "`x` المشتركين", "`x` subscribers": "`x` المشتركين",
"`x` videos": "`x` الفيديوهات", "`x` videos": "`x` الفيديوهات",
"`x` playlists": "`x` قوائم التشغيل",
"LIVE": "مباشر", "LIVE": "مباشر",
"Shared `x` ago": "تم رفع الفيديو منذ `x`", "Shared `x` ago": "تم رفع الفيديو منذ `x`",
"Unsubscribe": "إلغاء الإشتراك", "Unsubscribe": "إلغاء الإشتراك",
@@ -9,7 +10,7 @@
"View playlist on YouTube": "عرض قائمة التشغيل على اليوتيوب", "View playlist on YouTube": "عرض قائمة التشغيل على اليوتيوب",
"newest": "الأجدد", "newest": "الأجدد",
"oldest": "الأقدم", "oldest": "الأقدم",
"popular": "الاكثر شعبية", "popular": "الأكثر شعبية",
"last": "اخر قوائم التشغيل المعدلة", "last": "اخر قوائم التشغيل المعدلة",
"Next page": "الصفحة الثانية", "Next page": "الصفحة الثانية",
"Previous page": "الصفحة السابقة", "Previous page": "الصفحة السابقة",
@@ -18,7 +19,7 @@
"New passwords must match": "الأرقام السرية يجب ان تكون متطابقة", "New passwords must match": "الأرقام السرية يجب ان تكون متطابقة",
"Cannot change password for Google accounts": "لا يستطيع تغيير الرقم السرى لحساب جوجل", "Cannot change password for Google accounts": "لا يستطيع تغيير الرقم السرى لحساب جوجل",
"Authorize token?": "رمز الإذن ؟", "Authorize token?": "رمز الإذن ؟",
"Authorize token for `x`?": "رمز الإذن لـ `x` ?", "Authorize token for `x`?": "تصريح الرمز لـ `x` ؟",
"Yes": "نعم", "Yes": "نعم",
"No": "لا", "No": "لا",
"Import and Export Data": "استخراج و إضافة البيانات", "Import and Export Data": "استخراج و إضافة البيانات",
@@ -53,10 +54,10 @@
"Player preferences": "التفضيلات المشغل", "Player preferences": "التفضيلات المشغل",
"Always loop: ": "كرر الفيديو دائما: ", "Always loop: ": "كرر الفيديو دائما: ",
"Autoplay: ": "تشغيل تلقائى: ", "Autoplay: ": "تشغيل تلقائى: ",
"Play next by default: ": "شغل الفيديو التالى تلقائيا", "Play next by default: ": "شغل الفيديو التالي تلقائيا: ",
"Autoplay next video: ": " شغل الفيديو التالى تلقائيا (فى قوائم التشغيل)", "Autoplay next video: ": "شغل الفيديو التالي تلقائيا (في قوائم التشغيل) ",
"Listen by default: ": "تشغيل النسخة السمعية تلقائى: ", "Listen by default: ": "تشغيل النسخة السمعية تلقائى: ",
"Proxy videos? ": "عرض الفيديوهات عن طريق الوكيل(proxy) ؟", "Proxy videos: ": "عرض الفيديوهات عن طريق البروكسي؟ ",
"Default speed: ": "السرعة الإفتراضية: ", "Default speed: ": "السرعة الإفتراضية: ",
"Preferred video quality: ": "الجودة المفضلة للفيديوهات: ", "Preferred video quality: ": "الجودة المفضلة للفيديوهات: ",
"Player volume: ": "صوت المشغل: ", "Player volume: ": "صوت المشغل: ",
@@ -65,13 +66,17 @@
"reddit": "Reddit", "reddit": "Reddit",
"Default captions: ": "الترجمات الإفتراضية: ", "Default captions: ": "الترجمات الإفتراضية: ",
"Fallback captions: ": "الترجمات المصاحبة: ", "Fallback captions: ": "الترجمات المصاحبة: ",
"Show related videos? ": "عرض مقاطع الفيديو ذات الصلة؟", "Show related videos: ": "اعرض الفيديوهات ذات الصلة: ",
"Show annotations by default? ": "عرض الملاحظات فى الفيديو تلقائيا ؟", "Show annotations by default: ": "اعرض الملاحظات في الفيديو تلقائيا: ",
"Visual preferences": "التفضيلات المرئية", "Visual preferences": "التفضيلات المرئية",
"Player style: ": "شكل مشغل الفيديوهات: ",
"Dark mode: ": "الوضع الليلى: ", "Dark mode: ": "الوضع الليلى: ",
"Theme: ": "المظهر: ",
"dark": "غامق (اسود)",
"light": "فاتح (ابيض)",
"Thin mode: ": "الوضع الخفيف: ", "Thin mode: ": "الوضع الخفيف: ",
"Subscription preferences": "تفضيلات الإشتراك", "Subscription preferences": "تفضيلات الإشتراك",
"Show annotations by default for subscribed channels? ": "عرض الملاحظات فى الفيديوهات تلقائيا فى القنوات المشترك بها فقط ؟", "Show annotations by default for subscribed channels: ": "عرض الملاحظات في الفيديوهات تلقائيا في القنوات المشترك بها فقط: ",
"Redirect homepage to feed: ": "إعادة التوجية من الصفحة الرئيسية لصفحة المشتركين (لرؤية اخر فيديوهات المشتركين): ", "Redirect homepage to feed: ": "إعادة التوجية من الصفحة الرئيسية لصفحة المشتركين (لرؤية اخر فيديوهات المشتركين): ",
"Number of videos shown in feed: ": "عدد الفيديوهات التى ستظهر فى صفحة المشتركين: ", "Number of videos shown in feed: ": "عدد الفيديوهات التى ستظهر فى صفحة المشتركين: ",
"Sort videos by: ": "ترتيب الفيديو بـ: ", "Sort videos by: ": "ترتيب الفيديو بـ: ",
@@ -98,12 +103,12 @@
"Delete account": "حذف الحساب", "Delete account": "حذف الحساب",
"Administrator preferences": "إعدادات المدير", "Administrator preferences": "إعدادات المدير",
"Default homepage: ": "الصفحة الرئيسية الافتراضية ", "Default homepage: ": "الصفحة الرئيسية الافتراضية ",
"Feed menu: ": "قائمة التغذية", "Feed menu: ": "قائمة التدفقات: ",
"Top enabled? ": "تفعيل 'الأفضل' ؟ ", "Top enabled: ": "تفعيل 'الأفضل' ؟ ",
"CAPTCHA enabled? ": "تفعيل الكابتشا ؟", "CAPTCHA enabled: ": "تفعيل الكابتشا: ",
"Login enabled? ": "تفعيل تسجيل الدخول ؟", "Login enabled: ": "تفعيل الولوج: ",
"Registration enabled? ": "تفعيل التسجيل ؟", "Registration enabled: ": "تفعيل التسجيل: ",
"Report statistics? ": "إبلاغ الإحصائيات", "Report statistics: ": "الإبلاغ عن الإحصائيات: ",
"Save preferences": "حفظ التفضيلات", "Save preferences": "حفظ التفضيلات",
"Subscription manager": "مدير الإشتراكات", "Subscription manager": "مدير الإشتراكات",
"Token manager": "إداره الرمز", "Token manager": "إداره الرمز",
@@ -114,15 +119,25 @@
"unsubscribe": "إلغاء الإشتراك", "unsubscribe": "إلغاء الإشتراك",
"revoke": "مسح", "revoke": "مسح",
"Subscriptions": "الإشتراكات", "Subscriptions": "الإشتراكات",
"`x` unseen notifications": "`x` إشعارات لم تشاهدها بعد ", "`x` unseen notifications": "`x` إشعارات لم تشاهدها بعد",
"search": "بحث", "search": "بحث",
"Log out": "تسجيل الخروج", "Log out": "تسجيل الخروج",
"Released under the AGPLv3 by Omar Roth.": "تم الإنشاء تحت AGPLv3 بواسطة عمر روث.", "Released under the AGPLv3 by Omar Roth.": "تم الإنشاء تحت AGPLv3 بواسطة عمر روث.",
"Source available here.": "الأكواد متوفرة هنا.", "Source available here.": "الأكواد متوفرة هنا.",
"View JavaScript license information.": "مشاهدة معلومات حول تراخيص الجافاسكريبت.", "View JavaScript license information.": "مشاهدة معلومات حول تراخيص الجافاسكريبت.",
"View privacy policy.": "عرض سياسة الخصوصية", "View privacy policy.": "عرض سياسة الخصوصية.",
"Trending": "الشائع", "Trending": "الشائع",
"Public": "عام",
"Unlisted": "غير مصنف", "Unlisted": "غير مصنف",
"Private": "خاص",
"View all playlists": "عرض جميع قوائم التشغيل",
"Updated `x` ago": "تم تحديثه منذ `x`",
"Delete playlist `x`?": "حذف قائمه التشغيل `x` ?",
"Delete playlist": "حذف قائمه التغشيل",
"Create playlist": "إنشاء قائمه تشغيل",
"Title": "العنوان",
"Playlist privacy": "إعدادات الخصوصيه",
"Editing playlist `x`": "تعديل قائمه التشفيل `x`",
"Watch on YouTube": "مشاهدة الفيديو على اليوتيوب", "Watch on YouTube": "مشاهدة الفيديو على اليوتيوب",
"Hide annotations": "إخفاء الملاحظات فى الفيديو", "Hide annotations": "إخفاء الملاحظات فى الفيديو",
"Show annotations": "عرض الملاحظات فى الفيديو", "Show annotations": "عرض الملاحظات فى الفيديو",
@@ -134,9 +149,9 @@
"Whitelisted regions: ": "الدول المسموح فيها هذا الفيديو: ", "Whitelisted regions: ": "الدول المسموح فيها هذا الفيديو: ",
"Blacklisted regions: ": "الدول الحظور فيها هذا الفيديو: ", "Blacklisted regions: ": "الدول الحظور فيها هذا الفيديو: ",
"Shared `x`": "شارك منذ `x`", "Shared `x`": "شارك منذ `x`",
"`x` views": "`x` مشاهدون", "`x` views": "`x` مشاهدات",
"Premieres in `x`": "يعرض فى `x`", "Premieres in `x`": "يعرض فى `x`",
"Premieres `x`": "", "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.": "اهلا! يبدو ان الجافاسكريبت معطلة. اضغط هنا لعرض التعليقات, ضع فى إعتبارك انها ستأخذ وقت اطول للعرض.", "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 YouTube comments": "عرض تعليقات اليوتيوب",
"View more comments on Reddit": "عرض المزيد من التعليقات على\\من موقع Reddit", "View more comments on Reddit": "عرض المزيد من التعليقات على\\من موقع Reddit",
@@ -293,29 +308,29 @@
"`x` hours": "`x` ساعات", "`x` hours": "`x` ساعات",
"`x` minutes": "`x` دقائق", "`x` minutes": "`x` دقائق",
"`x` seconds": "`x` ثوانى", "`x` seconds": "`x` ثوانى",
"Fallback comments: ": "التعليقات المصاحبة", "Fallback comments: ": "التعليقات البديلة: ",
"Popular": "لاكثر شعبية", "Popular": "الأكثر شعبية",
"Top": "الأفضل", "Top": "الأفضل",
"About": "حول", "About": "حول",
"Rating: ": "التقييم", "Rating: ": "التقييم: ",
"Language: ": "اللغة", "Language: ": "اللغة: ",
"View as playlist": "عرض كا قائمة التشغيل", "View as playlist": "عرض كا قائمة التشغيل",
"Default": "الكل", "Default": "الكل",
"Music": "الاغانى", "Music": "الاغانى",
"Gaming": "الألعاب", "Gaming": "الألعاب",
"News": "الأخبار", "News": "الأخبار",
"Movies": "الأفلام", "Movies": "الأفلام",
"Download": "تحميل كـ", "Download": "نزّل",
"Download as: ": "تحميل", "Download as: ": "نزّله كـ: ",
"%A %B %-d, %Y": "", "%A %B %-d, %Y": "%A %-d %B %Y",
"(edited)": "(تم تعديلة)", "(edited)": "(تم تعديلة)",
"YouTube comment permalink": "رابط التعليق على اليوتيوب", "YouTube comment permalink": "رابط التعليق على اليوتيوب",
"permalink": "", "permalink": "الرابط",
"`x` marked it with a ❤": "`x` اعجب بهذا", "`x` marked it with a ❤": "`x` اعجب بهذا",
"Audio mode": "الوضع الصوتى", "Audio mode": "الوضع الصوتى",
"Video mode": "وضع الفيديو", "Video mode": "وضع الفيديو",
"Videos": "الفيديوهات", "Videos": "الفيديوهات",
"Playlists": "قوائم التشغيل", "Playlists": "قوائم التشغيل",
"Community": "", "Community": "المجتمع",
"Current version: ": "الإصدار الحالى" "Current version: ": "الإصدار الحالي: "
} }

View File

@@ -1,6 +1,7 @@
{ {
"`x` subscribers": "`x` Abonnenten", "`x` subscribers": "`x` Abonnenten",
"`x` videos": "`x` Videos", "`x` videos": "`x` Videos",
"`x` playlists": "",
"LIVE": "LIVE", "LIVE": "LIVE",
"Shared `x` ago": "Vor `x` geteilt", "Shared `x` ago": "Vor `x` geteilt",
"Unsubscribe": "Abbestellen", "Unsubscribe": "Abbestellen",
@@ -15,13 +16,13 @@
"Previous page": "Vorherige Seite", "Previous page": "Vorherige Seite",
"Clear watch history?": "Verlauf löschen?", "Clear watch history?": "Verlauf löschen?",
"New password": "Neues Passwort", "New password": "Neues Passwort",
"New passwords must match": "Neue Passwörter müssen übereinstimmen", "New passwords must match": "Neue Passwörter müssen gleich sein",
"Cannot change password for Google accounts": "Das Passwort für Google -Konten kann nicht geändert werden", "Cannot change password for Google accounts": "Ich kann das Passwort deines Google Kontos nicht ändern",
"Authorize token?": "Token autorisieren?", "Authorize token?": "Token autorisieren?",
"Authorize token for `x`?": "Token für `x` autorisieren?", "Authorize token for `x`?": "Token für `x` autorisieren?",
"Yes": "Ja", "Yes": "Ja",
"No": "Nein", "No": "Nein",
"Import and Export Data": "Import und Export Daten", "Import and Export Data": "Daten importieren und exportieren",
"Import": "Importieren", "Import": "Importieren",
"Import Invidious data": "Invidious Daten importieren", "Import Invidious data": "Invidious Daten importieren",
"Import YouTube subscriptions": "YouTube Abonnements importieren", "Import YouTube subscriptions": "YouTube Abonnements importieren",
@@ -39,39 +40,43 @@
"source": "Quelle", "source": "Quelle",
"Log in": "Einloggen", "Log in": "Einloggen",
"Log in/register": "Einloggen/Registrieren", "Log in/register": "Einloggen/Registrieren",
"Log in with Google": "In Google einloggen", "Log in with Google": "Mit Google einloggen",
"User ID": "Benutzer ID", "User ID": "Benutzer ID",
"Password": "Passwort", "Password": "Passwort",
"Time (h:mm:ss):": "Zeit (h:mm:ss):", "Time (h:mm:ss):": "Zeit (h:mm:ss):",
"Text CAPTCHA": "Text CAPTCHA", "Text CAPTCHA": "Text CAPTCHA",
"Image CAPTCHA": "Image CAPTCHA", "Image CAPTCHA": "Bild CAPTCHA",
"Sign In": "Einloggen", "Sign In": "Anmelden",
"Register": "Registrieren", "Register": "Registrieren",
"E-mail": "Email", "E-mail": "E-Mail",
"Google verification code": "Google Bestätigungscode", "Google verification code": "Google-Bestätigungscode",
"Preferences": "Einstellungen", "Preferences": "Einstellungen",
"Player preferences": "Playereinstellungen", "Player preferences": "Wiedergabeeinstellungen",
"Always loop: ": "Immer wiederholen: ", "Always loop: ": "Immer wiederholen: ",
"Autoplay: ": "Automatisch abspielen: ", "Autoplay: ": "Automatisch abspielen: ",
"Play next by default: ": "Standardmäßig als nächstes abspielen: ", "Play next by default: ": "Immer automatisch nächstes Video spielen: ",
"Autoplay next video: ": "nächstes Video automatisch abspielen: ", "Autoplay next video: ": "nächstes Video automatisch abspielen: ",
"Listen by default: ": "Nur Ton als Standard: ", "Listen by default: ": "Nur Ton als Standard: ",
"Proxy videos? ": "Proxy-Videos? ", "Proxy videos: ": "Proxy-Videos: ",
"Default speed: ": "Standardgeschwindigkeit: ", "Default speed: ": "Standardgeschwindigkeit: ",
"Preferred video quality: ": "Bevorzugte Videoqualität: ", "Preferred video quality: ": "Bevorzugte Videoqualität: ",
"Player volume: ": "Playerlautstärke: ", "Player volume: ": "Wiedergabelautstärke: ",
"Default comments: ": "Standardkommentare: ", "Default comments: ": "Standardkommentare: ",
"youtube": "youtube", "youtube": "youtube",
"reddit": "reddit", "reddit": "reddit",
"Default captions: ": "Standarduntertitel: ", "Default captions: ": "Standarduntertitel: ",
"Fallback captions: ": "Ersatzuntertitel: ", "Fallback captions: ": "Ersatzuntertitel: ",
"Show related videos? ": "Ähnliche Videos anzeigen? ", "Show related videos: ": "Ähnliche Videos anzeigen? ",
"Show annotations by default? ": "Standardmäßig Anmerkungen anzeigen? ", "Show annotations by default: ": "Standardmäßig Anmerkungen anzeigen? ",
"Visual preferences": "Anzeigeeinstellungen", "Visual preferences": "Anzeigeeinstellungen",
"Player style: ": "Abspielgeräterstil: ",
"Dark mode: ": "Nachtmodus: ", "Dark mode: ": "Nachtmodus: ",
"Theme: ": "Modus: ",
"dark": "Nachtmodus",
"light": "klarer Modus",
"Thin mode: ": "Schlanker Modus: ", "Thin mode: ": "Schlanker Modus: ",
"Subscription preferences": "Abonnementeinstellungen", "Subscription preferences": "Abonnementeinstellungen",
"Show annotations by default for subscribed channels? ": "Anmerkungen für abonnierte Kanäle standardmäßig anzeigen? ", "Show annotations by default for subscribed channels: ": "Anmerkungen für abonnierte Kanäle standardmäßig anzeigen? ",
"Redirect homepage to feed: ": "Startseite zu Feed umleiten: ", "Redirect homepage to feed: ": "Startseite zu Feed umleiten: ",
"Number of videos shown in feed: ": "Anzahl von Videos die im Feed angezeigt werden: ", "Number of videos shown in feed: ": "Anzahl von Videos die im Feed angezeigt werden: ",
"Sort videos by: ": "Videos sortieren nach: ", "Sort videos by: ": "Videos sortieren nach: ",
@@ -90,23 +95,23 @@
"`x` is live": "`x` ist live", "`x` is live": "`x` ist live",
"Data preferences": "Dateneinstellungen", "Data preferences": "Dateneinstellungen",
"Clear watch history": "Verlauf löschen", "Clear watch history": "Verlauf löschen",
"Import/export data": "Daten im- exportieren", "Import/export data": "Daten im-/exportieren",
"Change password": "Passwort ändern", "Change password": "Passwort ändern",
"Manage subscriptions": "Abonnements verwalten", "Manage subscriptions": "Abonnements verwalten",
"Manage tokens": "Token verwalten", "Manage tokens": "Tokens verwalten",
"Watch history": "Verlauf", "Watch history": "Verlauf",
"Delete account": "Account löschen", "Delete account": "Account löschen",
"Administrator preferences": "Administratoreinstellungen", "Administrator preferences": "Administrator-Einstellungen",
"Default homepage: ": "Standard-Homepage: ", "Default homepage: ": "Standard-Startseite: ",
"Feed menu: ": "Feed-Menü: ", "Feed menu: ": "Feed-Menü: ",
"Top enabled? ": "Top aktiviert? ", "Top enabled: ": "Top aktiviert? ",
"CAPTCHA enabled? ": "CAPTCHA aktiviert? ", "CAPTCHA enabled: ": "CAPTCHA aktiviert? ",
"Login enabled? ": "Login aktiviert? ", "Login enabled: ": "Login aktiviert? ",
"Registration enabled? ": "Registrierung aktiviert? ", "Registration enabled: ": "Registrierung aktiviert? ",
"Report statistics? ": "Statistiken berichten? ", "Report statistics: ": "Statistiken berichten? ",
"Save preferences": "Einstellungen speichern", "Save preferences": "Einstellungen speichern",
"Subscription manager": "Abonnementverwaltung", "Subscription manager": "Abonnementverwaltung",
"Token manager": "Token-Manager", "Token manager": "Tokenverwalter",
"Token": "Token", "Token": "Token",
"`x` subscriptions": "`x` Abonnements", "`x` subscriptions": "`x` Abonnements",
"`x` tokens": "`x` Tokens", "`x` tokens": "`x` Tokens",
@@ -122,7 +127,17 @@
"View JavaScript license information.": "Javascript Lizenzinformationen anzeigen.", "View JavaScript license information.": "Javascript Lizenzinformationen anzeigen.",
"View privacy policy.": "Datenschutzerklärung einsehen.", "View privacy policy.": "Datenschutzerklärung einsehen.",
"Trending": "Trending", "Trending": "Trending",
"Public": "",
"Unlisted": "Nicht aufgeführt", "Unlisted": "Nicht aufgeführt",
"Private": "",
"View all playlists": "",
"Updated `x` ago": "",
"Delete playlist `x`?": "",
"Delete playlist": "",
"Create playlist": "",
"Title": "",
"Playlist privacy": "",
"Editing playlist `x`": "",
"Watch on YouTube": "Video auf YouTube ansehen", "Watch on YouTube": "Video auf YouTube ansehen",
"Hide annotations": "Anmerkungen ausblenden", "Hide annotations": "Anmerkungen ausblenden",
"Show annotations": "Anmerkungen anzeigen", "Show annotations": "Anmerkungen anzeigen",
@@ -134,9 +149,9 @@
"Whitelisted regions: ": "Erlaubte Regionen: ", "Whitelisted regions: ": "Erlaubte Regionen: ",
"Blacklisted regions: ": "Unerlaubte Regionen: ", "Blacklisted regions: ": "Unerlaubte Regionen: ",
"Shared `x`": "Geteilt `x`", "Shared `x`": "Geteilt `x`",
"`x` views": "`x` Ansichten", "`x` views": "`x` Aufrufe",
"Premieres in `x`": "Premieren in `x`", "Premieres in `x`": "Zuerst gesehen in `x`",
"Premieres `x`": "", "Premieres `x`": "Erster Start `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.": "Hallo! Anscheinend haben Sie JavaScript deaktiviert. Klicken Sie hier um Kommentare anzuzeigen, beachten sie dass es etwas länger dauern kann um sie zu laden.", "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.": "Hallo! Anscheinend haben Sie JavaScript deaktiviert. Klicken Sie hier um Kommentare anzuzeigen, beachten sie dass es etwas länger dauern kann um sie zu laden.",
"View YouTube comments": "YouTube Kommentare anzeigen", "View YouTube comments": "YouTube Kommentare anzeigen",
"View more comments on Reddit": "Mehr Kommentare auf Reddit anzeigen", "View more comments on Reddit": "Mehr Kommentare auf Reddit anzeigen",
@@ -177,9 +192,9 @@
"Hidden field \"challenge\" is a required field": "Verstecktes Feld \"challenge\" ist eine erforderliche Eingabe", "Hidden field \"challenge\" is a required field": "Verstecktes Feld \"challenge\" ist eine erforderliche Eingabe",
"Hidden field \"token\" is a required field": "Verstecktes Feld \"token\" ist eine erforderliche Eingabe", "Hidden field \"token\" is a required field": "Verstecktes Feld \"token\" ist eine erforderliche Eingabe",
"Erroneous challenge": "Ungültiger Test", "Erroneous challenge": "Ungültiger Test",
"Erroneous token": "Ungöltige Marke", "Erroneous token": "Ungültiger Token",
"No such user": "Ungültiger Benutzer", "No such user": "Ungültiger Benutzer",
"Token is expired, please try again": "Marke ist abgelaufen, bitte erneut versuchen", "Token is expired, please try again": "Token ist abgelaufen, bitte erneut versuchen",
"English": "Englisch", "English": "Englisch",
"English (auto-generated)": "Englisch (automatisch erzeugt)", "English (auto-generated)": "Englisch (automatisch erzeugt)",
"Afrikaans": "Afrikaans", "Afrikaans": "Afrikaans",
@@ -310,12 +325,12 @@
"%A %B %-d, %Y": "%A %B %-d, %Y", "%A %B %-d, %Y": "%A %B %-d, %Y",
"(edited)": "(editiert)", "(edited)": "(editiert)",
"YouTube comment permalink": "YouTube-Kommentar Permalink", "YouTube comment permalink": "YouTube-Kommentar Permalink",
"permalink": "", "permalink": "Permalink",
"`x` marked it with a ❤": "`x` markierte es mit einem ❤", "`x` marked it with a ❤": "`x` markierte es mit einem ❤",
"Audio mode": "Audiomodus", "Audio mode": "Audiomodus",
"Video mode": "Videomodus", "Video mode": "Videomodus",
"Videos": "Videos", "Videos": "Videos",
"Playlists": "Wiedergabelisten", "Playlists": "Wiedergabelisten",
"Community": "", "Community": "Gemeinschaft",
"Current version: ": "Aktuelle Version: " "Current version: ": "Aktuelle Version: "
} }

View File

@@ -1,12 +1,13 @@
{ {
"`x` subscribers": { "`x` subscribers": {
"(\\D|^)1(\\D|$)": "`x` συνδρομητής", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` συνδρομητής",
"": "`x` συνδρομητές" "": "`x` συνδρομητές"
}, },
"`x` videos": { "`x` videos": {
"(\\D|^)1(\\D|$)": "`x` βίντεο", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` βίντεο",
"": "`x` βίντεο" "": "`x` βίντεο"
}, },
"`x` playlists": "",
"LIVE": "ΖΩΝΤΑΝΑ", "LIVE": "ΖΩΝΤΑΝΑ",
"Shared `x` ago": "Μοιράστηκε πριν `x`", "Shared `x` ago": "Μοιράστηκε πριν `x`",
"Unsubscribe": "Απεγγραφή", "Unsubscribe": "Απεγγραφή",
@@ -62,7 +63,7 @@
"Play next by default: ": "Αναπαραγωγή επόμενου: ", "Play next by default: ": "Αναπαραγωγή επόμενου: ",
"Autoplay next video: ": "Αυτόματη αναπαραγωγή επόμενου: ", "Autoplay next video: ": "Αυτόματη αναπαραγωγή επόμενου: ",
"Listen by default: ": "Φόρτωση μόνο ήχου: ", "Listen by default: ": "Φόρτωση μόνο ήχου: ",
"Proxy videos? ": "Αναπαραγωγή με διακομιστή μεσολάβησης (proxy): ", "Proxy videos: ": "Αναπαραγωγή με διακομιστή μεσολάβησης (proxy): ",
"Default speed: ": "Προεπιλεγμένη ταχύτητα: ", "Default speed: ": "Προεπιλεγμένη ταχύτητα: ",
"Preferred video quality: ": "Προτιμώμενη ανάλυση: ", "Preferred video quality: ": "Προτιμώμενη ανάλυση: ",
"Player volume: ": "Ένταση αναπαραγωγής: ", "Player volume: ": "Ένταση αναπαραγωγής: ",
@@ -71,13 +72,17 @@
"reddit": "reddit", "reddit": "reddit",
"Default captions: ": "Προεπιλεγμένοι υπότιτλοι: ", "Default captions: ": "Προεπιλεγμένοι υπότιτλοι: ",
"Fallback captions: ": "Εναλλακτικοί υπότιτλοι: ", "Fallback captions: ": "Εναλλακτικοί υπότιτλοι: ",
"Show related videos? ": "Προβολή σχετικών βίντεο; ", "Show related videos: ": "Προβολή σχετικών βίντεο; ",
"Show annotations by default? ": "Αυτόματη προβολή σημειώσεων; :", "Show annotations by default: ": "Αυτόματη προβολή σημειώσεων; :",
"Visual preferences": "Προτιμήσεις εμφάνισης", "Visual preferences": "Προτιμήσεις εμφάνισης",
"Player style: ": "",
"Dark mode: ": "Σκοτεινή λειτουργία: ", "Dark mode: ": "Σκοτεινή λειτουργία: ",
"Theme: ": "",
"dark": "",
"light": "",
"Thin mode: ": "Ελαφριά λειτουργία: ", "Thin mode: ": "Ελαφριά λειτουργία: ",
"Subscription preferences": "Προτιμήσεις συνδρομών", "Subscription preferences": "Προτιμήσεις συνδρομών",
"Show annotations by default for subscribed channels? ": "Προβολή σημειώσεων μόνο για κανάλια στα οποία είστε συνδρομητής; ", "Show annotations by default for subscribed channels: ": "Προβολή σημειώσεων μόνο για κανάλια στα οποία είστε συνδρομητής; ",
"Redirect homepage to feed: ": "Ανακατεύθυνση αρχικής στη ροή συνδρομών: ", "Redirect homepage to feed: ": "Ανακατεύθυνση αρχικής στη ροή συνδρομών: ",
"Number of videos shown in feed: ": "Αριθμός βίντεο ανά σελίδα ροής συνδρομών: ", "Number of videos shown in feed: ": "Αριθμός βίντεο ανά σελίδα ροής συνδρομών: ",
"Sort videos by: ": "Ταξινόμηση ανά: ", "Sort videos by: ": "Ταξινόμηση ανά: ",
@@ -105,21 +110,21 @@
"Administrator preferences": "Προτιμήσεις διαχειριστή", "Administrator preferences": "Προτιμήσεις διαχειριστή",
"Default homepage: ": "Προεπιλεγμένη αρχική: ", "Default homepage: ": "Προεπιλεγμένη αρχική: ",
"Feed menu: ": "Μενού ροής συνδρομών: ", "Feed menu: ": "Μενού ροής συνδρομών: ",
"Top enabled? ": "Ενεργοποίηση κορυφαίων; ", "Top enabled: ": "Ενεργοποίηση κορυφαίων; ",
"CAPTCHA enabled? ": "Ενεργοποίηση CAPTCHA; ", "CAPTCHA enabled: ": "Ενεργοποίηση CAPTCHA; ",
"Login enabled? ": "Ενεργοποίηση σύνδεσης; ", "Login enabled: ": "Ενεργοποίηση σύνδεσης; ",
"Registration enabled? ": "Ενεργοποίηση εγγραφής; ", "Registration enabled: ": "Ενεργοποίηση εγγραφής; ",
"Report statistics? ": "Αναφορά στατιστικών; ", "Report statistics: ": "Αναφορά στατιστικών; ",
"Save preferences": "Αποθήκευση προτιμήσεων", "Save preferences": "Αποθήκευση προτιμήσεων",
"Subscription manager": "Διαχειριστής συνδρομών", "Subscription manager": "Διαχειριστής συνδρομών",
"Token manager": "Διαχειριστής διασυνδέσεων", "Token manager": "Διαχειριστής διασυνδέσεων",
"Token": "Διασύνδεση", "Token": "Διασύνδεση",
"`x` subscriptions": { "`x` subscriptions": {
"(\\D|^)1(\\D|$)": "`x` συνδρομή", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` συνδρομή",
"": "`x` συνδρομές" "": "`x` συνδρομές"
}, },
"`x` tokens": { "`x` tokens": {
"(\\D|^)1(\\D|$)": "`x` διασύνδεση", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` διασύνδεση",
"": "`x` διασυνδέσεις" "": "`x` διασυνδέσεις"
}, },
"Import/export": "Εισαγωγή/εξαγωγή", "Import/export": "Εισαγωγή/εξαγωγή",
@@ -127,7 +132,7 @@
"revoke": "ανάκληση", "revoke": "ανάκληση",
"Subscriptions": "Συνδρομές", "Subscriptions": "Συνδρομές",
"`x` unseen notifications": { "`x` unseen notifications": {
"(\\D|^)1(\\D|$)": "`x` καινούρια ειδοποίηση", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` καινούρια ειδοποίηση",
"": "`x` καινούριες ειδοποιήσεις" "": "`x` καινούριες ειδοποιήσεις"
}, },
"search": "αναζήτηση", "search": "αναζήτηση",
@@ -137,7 +142,17 @@
"View JavaScript license information.": "Προβολή πληροφοριών άδειας JavaScript.", "View JavaScript license information.": "Προβολή πληροφοριών άδειας JavaScript.",
"View privacy policy.": "Προβολή πολιτικής απορρήτου.", "View privacy policy.": "Προβολή πολιτικής απορρήτου.",
"Trending": "Τάσεις", "Trending": "Τάσεις",
"Public": "",
"Unlisted": "Κρυφό", "Unlisted": "Κρυφό",
"Private": "",
"View all playlists": "",
"Updated `x` ago": "",
"Delete playlist `x`?": "",
"Delete playlist": "",
"Create playlist": "",
"Title": "",
"Playlist privacy": "",
"Editing playlist `x`": "",
"Watch on YouTube": "Προβολή στο YouTube", "Watch on YouTube": "Προβολή στο YouTube",
"Hide annotations": "Απόκρυψη σημειώσεων", "Hide annotations": "Απόκρυψη σημειώσεων",
"Show annotations": "Προβολή σημειώσεων", "Show annotations": "Προβολή σημειώσεων",
@@ -150,7 +165,7 @@
"Blacklisted regions: ": "Μη-επιτρεπτές περιοχές: ", "Blacklisted regions: ": "Μη-επιτρεπτές περιοχές: ",
"Shared `x`": "Μοιράστηκε το `x`", "Shared `x`": "Μοιράστηκε το `x`",
"`x` views": { "`x` views": {
"(\\D|^)1(\\D|$)": "`x` προβολή", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` προβολή",
"": "`x` προβολές" "": "`x` προβολές"
}, },
"Premieres in `x`": "Πρώτη προβολή σε `x`", "Premieres in `x`": "Πρώτη προβολή σε `x`",
@@ -184,13 +199,13 @@
"Could not get channel info.": "Αδύναμια εύρεσης πληροφοριών καναλιού.", "Could not get channel info.": "Αδύναμια εύρεσης πληροφοριών καναλιού.",
"Could not fetch comments": "Αδυναμία λήψης σχολίων", "Could not fetch comments": "Αδυναμία λήψης σχολίων",
"View `x` replies": { "View `x` replies": {
"(\\D|^)1(\\D|$)": "Προβολή `x` απάντησης", "([^.,0-9]|^)1([^.,0-9]|$)": "Προβολή `x` απάντησης",
"": "Προβολή `x` απαντήσεων" "": "Προβολή `x` απαντήσεων"
}, },
"`x` ago": "Πριν `x`", "`x` ago": "Πριν `x`",
"Load more": "Φόρτωση περισσότερων", "Load more": "Φόρτωση περισσότερων",
"`x` points": { "`x` points": {
"(\\D|^)1(\\D|$)": "`x` βαθμός", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` βαθμός",
"": "`x` βαθμοί" "": "`x` βαθμοί"
}, },
"Could not create mix.": "Αδυναμία δημιουργίας μίξης.", "Could not create mix.": "Αδυναμία δημιουργίας μίξης.",
@@ -311,31 +326,31 @@
"Yoruba": "Γιορούμπα", "Yoruba": "Γιορούμπα",
"Zulu": "Ζουλού", "Zulu": "Ζουλού",
"`x` years": { "`x` years": {
"(\\D|^)1(\\D|$)": "`x` χρόνο", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` χρόνο",
"": "`x` χρόνια" "": "`x` χρόνια"
}, },
"`x` months": { "`x` months": {
"(\\D|^)1(\\D|$)": "`x` μήνα", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` μήνα",
"": "`x` μήνες" "": "`x` μήνες"
}, },
"`x` weeks": { "`x` weeks": {
"(\\D|^)1(\\D|$)": "`x` εβδομάδα", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` εβδομάδα",
"": "`x` εβδομάδες" "": "`x` εβδομάδες"
}, },
"`x` days": { "`x` days": {
"(\\D|^)1(\\D|$)": "`x` ημέρα", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` ημέρα",
"": "`x` ημέρες" "": "`x` ημέρες"
}, },
"`x` hours": { "`x` hours": {
"(\\D|^)1(\\D|$)": "`x` ώρα", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` ώρα",
"": "`x` ώρες" "": "`x` ώρες"
}, },
"`x` minutes": { "`x` minutes": {
"(\\D|^)1(\\D|$)": "`x` λεπτό", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` λεπτό",
"": "`x` λεπτά" "": "`x` λεπτά"
}, },
"`x` seconds": { "`x` seconds": {
"(\\D|^)1(\\D|$)": "`x` δευτερόλεπτο", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` δευτερόλεπτο",
"": "`x` δευτερόλεπτα" "": "`x` δευτερόλεπτα"
}, },
"Fallback comments: ": "Εναλλακτικά σχόλια: ", "Fallback comments: ": "Εναλλακτικά σχόλια: ",

View File

@@ -1,12 +1,16 @@
{ {
"`x` subscribers": { "`x` subscribers": {
"(\\D|^)1(\\D|$)": "`x` subscriber", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` subscriber",
"": "`x` subscribers" "": "`x` subscribers"
}, },
"`x` videos": { "`x` videos": {
"(\\D|^)1(\\D|$)": "`x` video", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` video",
"": "`x` videos" "": "`x` videos"
}, },
"`x` playlists": {
"(\\D|^)1(\\D|$)": "`x` playlist",
"": "`x` playlists"
},
"LIVE": "LIVE", "LIVE": "LIVE",
"Shared `x` ago": "Shared `x` ago", "Shared `x` ago": "Shared `x` ago",
"Unsubscribe": "Unsubscribe", "Unsubscribe": "Unsubscribe",
@@ -62,7 +66,7 @@
"Play next by default: ": "Play next by default: ", "Play next by default: ": "Play next by default: ",
"Autoplay next video: ": "Autoplay next video: ", "Autoplay next video: ": "Autoplay next video: ",
"Listen by default: ": "Listen by default: ", "Listen by default: ": "Listen by default: ",
"Proxy videos? ": "Proxy videos? ", "Proxy videos: ": "Proxy videos: ",
"Default speed: ": "Default speed: ", "Default speed: ": "Default speed: ",
"Preferred video quality: ": "Preferred video quality: ", "Preferred video quality: ": "Preferred video quality: ",
"Player volume: ": "Player volume: ", "Player volume: ": "Player volume: ",
@@ -71,13 +75,17 @@
"reddit": "reddit", "reddit": "reddit",
"Default captions: ": "Default captions: ", "Default captions: ": "Default captions: ",
"Fallback captions: ": "Fallback captions: ", "Fallback captions: ": "Fallback captions: ",
"Show related videos? ": "Show related videos? ", "Show related videos: ": "Show related videos: ",
"Show annotations by default? ": "Show annotations by default? ", "Show annotations by default: ": "Show annotations by default: ",
"Visual preferences": "Visual preferences", "Visual preferences": "Visual preferences",
"Player style: ": "Player style: ",
"Dark mode: ": "Dark mode: ", "Dark mode: ": "Dark mode: ",
"Theme: ": "Theme: ",
"dark": "dark",
"light": "light",
"Thin mode: ": "Thin mode: ", "Thin mode: ": "Thin mode: ",
"Subscription preferences": "Subscription preferences", "Subscription preferences": "Subscription preferences",
"Show annotations by default for subscribed channels? ": "Show annotations by default for subscribed channels? ", "Show annotations by default for subscribed channels: ": "Show annotations by default for subscribed channels? ",
"Redirect homepage to feed: ": "Redirect homepage to feed: ", "Redirect homepage to feed: ": "Redirect homepage to feed: ",
"Number of videos shown in feed: ": "Number of videos shown in feed: ", "Number of videos shown in feed: ": "Number of videos shown in feed: ",
"Sort videos by: ": "Sort videos by: ", "Sort videos by: ": "Sort videos by: ",
@@ -105,21 +113,21 @@
"Administrator preferences": "Administrator preferences", "Administrator preferences": "Administrator preferences",
"Default homepage: ": "Default homepage: ", "Default homepage: ": "Default homepage: ",
"Feed menu: ": "Feed menu: ", "Feed menu: ": "Feed menu: ",
"Top enabled? ": "Top enabled? ", "Top enabled: ": "Top enabled: ",
"CAPTCHA enabled? ": "CAPTCHA enabled? ", "CAPTCHA enabled: ": "CAPTCHA enabled: ",
"Login enabled? ": "Login enabled? ", "Login enabled: ": "Login enabled: ",
"Registration enabled? ": "Registration enabled? ", "Registration enabled: ": "Registration enabled: ",
"Report statistics? ": "Report statistics? ", "Report statistics: ": "Report statistics: ",
"Save preferences": "Save preferences", "Save preferences": "Save preferences",
"Subscription manager": "Subscription manager", "Subscription manager": "Subscription manager",
"Token manager": "Token manager", "Token manager": "Token manager",
"Token": "Token", "Token": "Token",
"`x` subscriptions": { "`x` subscriptions": {
"(\\D|^)1(\\D|$)": "`x` subscription", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` subscription",
"": "`x` subscriptions" "": "`x` subscriptions"
}, },
"`x` tokens": { "`x` tokens": {
"(\\D|^)1(\\D|$)": "`x` token", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` token",
"": "`x` tokens" "": "`x` tokens"
}, },
"Import/export": "Import/export", "Import/export": "Import/export",
@@ -127,7 +135,7 @@
"revoke": "revoke", "revoke": "revoke",
"Subscriptions": "Subscriptions", "Subscriptions": "Subscriptions",
"`x` unseen notifications": { "`x` unseen notifications": {
"(\\D|^)1(\\D|$)": "`x` unseen notification", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` unseen notification",
"": "`x` unseen notifications" "": "`x` unseen notifications"
}, },
"search": "search", "search": "search",
@@ -137,7 +145,17 @@
"View JavaScript license information.": "View JavaScript license information.", "View JavaScript license information.": "View JavaScript license information.",
"View privacy policy.": "View privacy policy.", "View privacy policy.": "View privacy policy.",
"Trending": "Trending", "Trending": "Trending",
"Public": "Public",
"Unlisted": "Unlisted", "Unlisted": "Unlisted",
"Private": "Private",
"View all playlists": "View all playlists",
"Updated `x` ago": "Updated `x` ago",
"Delete playlist `x`?": "Delete playlist `x`?",
"Delete playlist": "Delete playlist",
"Create playlist": "Create playlist",
"Title": "Title",
"Playlist privacy": "Playlist privacy",
"Editing playlist `x`": "Editing playlist `x`",
"Watch on YouTube": "Watch on YouTube", "Watch on YouTube": "Watch on YouTube",
"Hide annotations": "Hide annotations", "Hide annotations": "Hide annotations",
"Show annotations": "Show annotations", "Show annotations": "Show annotations",
@@ -150,7 +168,7 @@
"Blacklisted regions: ": "Blacklisted regions: ", "Blacklisted regions: ": "Blacklisted regions: ",
"Shared `x`": "Shared `x`", "Shared `x`": "Shared `x`",
"`x` views": { "`x` views": {
"(\\D|^)1(\\D|$)": "`x` views", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` view",
"": "`x` views" "": "`x` views"
}, },
"Premieres in `x`": "Premieres in `x`", "Premieres in `x`": "Premieres in `x`",
@@ -158,7 +176,10 @@
"Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.": "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.", "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.": "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 YouTube comments", "View YouTube comments": "View YouTube comments",
"View more comments on Reddit": "View more comments on Reddit", "View more comments on Reddit": "View more comments on Reddit",
"View `x` comments": "View `x` comments", "View `x` comments": {
"(\\D|^)1(\\D|$)": "View `x` comment",
"": "View `x` comments"
},
"View Reddit comments": "View Reddit comments", "View Reddit comments": "View Reddit comments",
"Hide replies": "Hide replies", "Hide replies": "Hide replies",
"Show replies": "Show replies", "Show replies": "Show replies",
@@ -184,13 +205,13 @@
"Could not get channel info.": "Could not get channel info.", "Could not get channel info.": "Could not get channel info.",
"Could not fetch comments": "Could not fetch comments", "Could not fetch comments": "Could not fetch comments",
"View `x` replies": { "View `x` replies": {
"(\\D|^)1(\\D|$)": "View `x` reply", "([^.,0-9]|^)1([^.,0-9]|$)": "View `x` reply",
"": "View `x` replies" "": "View `x` replies"
}, },
"`x` ago": "`x` ago", "`x` ago": "`x` ago",
"Load more": "Load more", "Load more": "Load more",
"`x` points": { "`x` points": {
"(\\D|^)1(\\D|$)": "`x` point", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` point",
"": "`x` points" "": "`x` points"
}, },
"Could not create mix.": "Could not create mix.", "Could not create mix.": "Could not create mix.",
@@ -311,31 +332,31 @@
"Yoruba": "Yoruba", "Yoruba": "Yoruba",
"Zulu": "Zulu", "Zulu": "Zulu",
"`x` years": { "`x` years": {
"(\\D|^)1(\\D|$)": "`x` year", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` year",
"": "`x` years" "": "`x` years"
}, },
"`x` months": { "`x` months": {
"(\\D|^)1(\\D|$)": "`x` month", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` month",
"": "`x` months" "": "`x` months"
}, },
"`x` weeks": { "`x` weeks": {
"(\\D|^)1(\\D|$)": "`x` week", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` week",
"": "`x` weeks" "": "`x` weeks"
}, },
"`x` days": { "`x` days": {
"(\\D|^)1(\\D|$)": "`x` day", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` day",
"": "`x` days" "": "`x` days"
}, },
"`x` hours": { "`x` hours": {
"(\\D|^)1(\\D|$)": "`x` hour", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` hour",
"": "`x` hours" "": "`x` hours"
}, },
"`x` minutes": { "`x` minutes": {
"(\\D|^)1(\\D|$)": "`x` minute", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` minute",
"": "`x` minutes" "": "`x` minutes"
}, },
"`x` seconds": { "`x` seconds": {
"(\\D|^)1(\\D|$)": "`x` second", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` second",
"": "`x` seconds" "": "`x` seconds"
}, },
"Fallback comments: ": "Fallback comments: ", "Fallback comments: ": "Fallback comments: ",
@@ -355,7 +376,7 @@
"%A %B %-d, %Y": "%A %B %-d, %Y", "%A %B %-d, %Y": "%A %B %-d, %Y",
"(edited)": "(edited)", "(edited)": "(edited)",
"YouTube comment permalink": "YouTube comment permalink", "YouTube comment permalink": "YouTube comment permalink",
"permalink": "", "permalink": "permalink",
"`x` marked it with a ❤": "`x` marked it with a ❤", "`x` marked it with a ❤": "`x` marked it with a ❤",
"Audio mode": "Audio mode", "Audio mode": "Audio mode",
"Video mode": "Video mode", "Video mode": "Video mode",

View File

@@ -1,6 +1,7 @@
{ {
"`x` subscribers": "`x` abonantoj", "`x` subscribers": "`x` abonantoj",
"`x` videos": "`x` videoj", "`x` videos": "`x` videoj",
"`x` playlists": "",
"LIVE": "NUNA", "LIVE": "NUNA",
"Shared `x` ago": "Konigita antaŭ `x`", "Shared `x` ago": "Konigita antaŭ `x`",
"Unsubscribe": "Malaboni", "Unsubscribe": "Malaboni",
@@ -56,7 +57,7 @@
"Play next by default: ": "Ludi sekvan defaŭlte: ", "Play next by default: ": "Ludi sekvan defaŭlte: ",
"Autoplay next video: ": "Aŭtomate ludi sekvan videon: ", "Autoplay next video: ": "Aŭtomate ludi sekvan videon: ",
"Listen by default: ": "Aŭskulti defaŭlte: ", "Listen by default: ": "Aŭskulti defaŭlte: ",
"Proxy videos? ": "Ĉu uzi prokuran servilon por videoj? ", "Proxy videos: ": "Ĉu uzi prokuran servilon por videoj? ",
"Default speed: ": "Defaŭlta rapido: ", "Default speed: ": "Defaŭlta rapido: ",
"Preferred video quality: ": "Preferita videkvalito: ", "Preferred video quality: ": "Preferita videkvalito: ",
"Player volume: ": "Ludila sonforteco: ", "Player volume: ": "Ludila sonforteco: ",
@@ -65,13 +66,17 @@
"reddit": "reddit", "reddit": "reddit",
"Default captions: ": "Defaŭltaj subtekstoj: ", "Default captions: ": "Defaŭltaj subtekstoj: ",
"Fallback captions: ": "Retrodefaŭltaj subtekstoj: ", "Fallback captions: ": "Retrodefaŭltaj subtekstoj: ",
"Show related videos? ": "Ĉu montri rilatajn videojn? ", "Show related videos: ": "Ĉu montri rilatajn videojn? ",
"Show annotations by default? ": "Ĉu montri prinotojn defaŭlte? ", "Show annotations by default: ": "Ĉu montri prinotojn defaŭlte? ",
"Visual preferences": "Vidaj preferoj", "Visual preferences": "Vidaj preferoj",
"Player style: ": "Ludila stilo: ",
"Dark mode: ": "Malhela reĝimo: ", "Dark mode: ": "Malhela reĝimo: ",
"Theme: ": "Etoso: ",
"dark": "malhela",
"light": "hela",
"Thin mode: ": "Maldika reĝimo: ", "Thin mode: ": "Maldika reĝimo: ",
"Subscription preferences": "Abonaj agordoj", "Subscription preferences": "Abonaj agordoj",
"Show annotations by default for subscribed channels? ": "Ĉu montri prinotojn defaŭlte por abonitaj kanaloj? ", "Show annotations by default for subscribed channels: ": "Ĉu montri prinotojn defaŭlte por abonitaj kanaloj? ",
"Redirect homepage to feed: ": "Alidirekti hejmpâgon al fluo: ", "Redirect homepage to feed: ": "Alidirekti hejmpâgon al fluo: ",
"Number of videos shown in feed: ": "Nombro da videoj montritaj en fluo: ", "Number of videos shown in feed: ": "Nombro da videoj montritaj en fluo: ",
"Sort videos by: ": "Ordi videojn laŭ: ", "Sort videos by: ": "Ordi videojn laŭ: ",
@@ -99,11 +104,11 @@
"Administrator preferences": "Agordoj de administranto", "Administrator preferences": "Agordoj de administranto",
"Default homepage: ": "Defaŭlta hejmpaĝo: ", "Default homepage: ": "Defaŭlta hejmpaĝo: ",
"Feed menu: ": "Flua menuo: ", "Feed menu: ": "Flua menuo: ",
"Top enabled? ": "Ĉu pli bonaj ŝaltitaj? ", "Top enabled: ": "Ĉu pli bonaj ŝaltitaj? ",
"CAPTCHA enabled? ": "Ĉu CAPTCHA ŝaltita? ", "CAPTCHA enabled: ": "Ĉu CAPTCHA ŝaltita? ",
"Login enabled? ": "Ĉu ensaluto aktivita? ", "Login enabled: ": "Ĉu ensaluto aktivita? ",
"Registration enabled? ": "Ĉu registriĝo aktivita? ", "Registration enabled: ": "Ĉu registriĝo aktivita? ",
"Report statistics? ": "Ĉu raporti statistikojn? ", "Report statistics: ": "Ĉu raporti statistikojn? ",
"Save preferences": "Konservi agordojn", "Save preferences": "Konservi agordojn",
"Subscription manager": "Administrilo de abonoj", "Subscription manager": "Administrilo de abonoj",
"Token manager": "Ĵetona administrilo", "Token manager": "Ĵetona administrilo",
@@ -122,7 +127,17 @@
"View JavaScript license information.": "Vidi Ĝavoskriptan licencan informon.", "View JavaScript license information.": "Vidi Ĝavoskriptan licencan informon.",
"View privacy policy.": "Vidi regularon pri privateco.", "View privacy policy.": "Vidi regularon pri privateco.",
"Trending": "Tendencoj", "Trending": "Tendencoj",
"Public": "",
"Unlisted": "Ne listigita", "Unlisted": "Ne listigita",
"Private": "",
"View all playlists": "",
"Updated `x` ago": "",
"Delete playlist `x`?": "",
"Delete playlist": "",
"Create playlist": "",
"Title": "",
"Playlist privacy": "",
"Editing playlist `x`": "",
"Watch on YouTube": "Vidi videon en Youtube", "Watch on YouTube": "Vidi videon en Youtube",
"Hide annotations": "Kaŝi prinotojn", "Hide annotations": "Kaŝi prinotojn",
"Show annotations": "Montri prinotojn", "Show annotations": "Montri prinotojn",
@@ -318,4 +333,4 @@
"Playlists": "Ludlistoj", "Playlists": "Ludlistoj",
"Community": "Komunumo", "Community": "Komunumo",
"Current version: ": "Nuna versio: " "Current version: ": "Nuna versio: "
} }

View File

@@ -1,12 +1,13 @@
{ {
"`x` subscribers": "`x` suscriptores", "`x` subscribers": "`x` suscriptores",
"`x` videos": "`x` vídeos", "`x` videos": "`x` vídeos",
"`x` playlists": "",
"LIVE": "DIRECTO", "LIVE": "DIRECTO",
"Shared `x` ago": "Compartido hace `x`", "Shared `x` ago": "Compartido hace `x`",
"Unsubscribe": "Desuscribirse", "Unsubscribe": "Desuscribirse",
"Subscribe": "Suscribirse", "Subscribe": "Suscribirse",
"View channel on YouTube": "Ver el canal en YouTube", "View channel on YouTube": "Ver el canal en YouTube",
"View playlist on YouTube": "", "View playlist on YouTube": "Ver lista de reproducción en YouTube",
"newest": "más nuevos", "newest": "más nuevos",
"oldest": "más viejos", "oldest": "más viejos",
"popular": "populares", "popular": "populares",
@@ -56,7 +57,7 @@
"Play next by default: ": "Reproducir siguiente por defecto: ", "Play next by default: ": "Reproducir siguiente por defecto: ",
"Autoplay next video: ": "Reproducir automáticamente el vídeo siguiente: ", "Autoplay next video: ": "Reproducir automáticamente el vídeo siguiente: ",
"Listen by default: ": "Activar el sonido por defecto: ", "Listen by default: ": "Activar el sonido por defecto: ",
"Proxy videos? ": "¿Usar un proxy para los vídeos? ", "Proxy videos: ": "¿Usar un proxy para los vídeos? ",
"Default speed: ": "Velocidad por defecto: ", "Default speed: ": "Velocidad por defecto: ",
"Preferred video quality: ": "Calidad de vídeo preferida: ", "Preferred video quality: ": "Calidad de vídeo preferida: ",
"Player volume: ": "Volumen del reproductor: ", "Player volume: ": "Volumen del reproductor: ",
@@ -65,13 +66,17 @@
"reddit": "Reddit", "reddit": "Reddit",
"Default captions: ": "Subtítulos por defecto: ", "Default captions: ": "Subtítulos por defecto: ",
"Fallback captions: ": "Subtítulos alternativos: ", "Fallback captions: ": "Subtítulos alternativos: ",
"Show related videos? ": "¿Mostrar vídeos relacionados? ", "Show related videos: ": "¿Mostrar vídeos relacionados? ",
"Show annotations by default? ": "¿Mostrar anotaciones por defecto? ", "Show annotations by default: ": "¿Mostrar anotaciones por defecto? ",
"Visual preferences": "Preferencias visuales", "Visual preferences": "Preferencias visuales",
"Player style: ": "",
"Dark mode: ": "Modo oscuro: ", "Dark mode: ": "Modo oscuro: ",
"Theme: ": "",
"dark": "",
"light": "",
"Thin mode: ": "Modo compacto: ", "Thin mode: ": "Modo compacto: ",
"Subscription preferences": "Preferencias de la suscripción", "Subscription preferences": "Preferencias de la suscripción",
"Show annotations by default for subscribed channels? ": "¿Mostrar anotaciones por defecto para los canales suscritos? ", "Show annotations by default for subscribed channels: ": "¿Mostrar anotaciones por defecto para los canales suscritos? ",
"Redirect homepage to feed: ": "Redirigir la página de inicio a la fuente: ", "Redirect homepage to feed: ": "Redirigir la página de inicio a la fuente: ",
"Number of videos shown in feed: ": "Número de vídeos mostrados en la fuente: ", "Number of videos shown in feed: ": "Número de vídeos mostrados en la fuente: ",
"Sort videos by: ": "Ordenar los vídeos por: ", "Sort videos by: ": "Ordenar los vídeos por: ",
@@ -99,11 +104,11 @@
"Administrator preferences": "Preferencias de administrador", "Administrator preferences": "Preferencias de administrador",
"Default homepage: ": "Página de inicio por defecto: ", "Default homepage: ": "Página de inicio por defecto: ",
"Feed menu: ": "Menú de fuentes: ", "Feed menu: ": "Menú de fuentes: ",
"Top enabled? ": "¿Habilitar los destacados? ", "Top enabled: ": "¿Habilitar los destacados? ",
"CAPTCHA enabled? ": "¿Habilitar los CAPTCHA? ", "CAPTCHA enabled: ": "¿Habilitar los CAPTCHA? ",
"Login enabled? ": "¿Habilitar el inicio de sesión? ", "Login enabled: ": "¿Habilitar el inicio de sesión? ",
"Registration enabled? ": "¿Habilitar el registro? ", "Registration enabled: ": "¿Habilitar el registro? ",
"Report statistics? ": "¿Enviar estadísticas? ", "Report statistics: ": "¿Enviar estadísticas? ",
"Save preferences": "Guardar las preferencias", "Save preferences": "Guardar las preferencias",
"Subscription manager": "Gestor de suscripciones", "Subscription manager": "Gestor de suscripciones",
"Token manager": "Gestor de tokens", "Token manager": "Gestor de tokens",
@@ -122,7 +127,17 @@
"View JavaScript license information.": "Ver información de licencia de JavaScript.", "View JavaScript license information.": "Ver información de licencia de JavaScript.",
"View privacy policy.": "Ver la política de privacidad.", "View privacy policy.": "Ver la política de privacidad.",
"Trending": "Tendencias", "Trending": "Tendencias",
"Public": "",
"Unlisted": "No listado", "Unlisted": "No listado",
"Private": "",
"View all playlists": "",
"Updated `x` ago": "",
"Delete playlist `x`?": "",
"Delete playlist": "",
"Create playlist": "",
"Title": "",
"Playlist privacy": "",
"Editing playlist `x`": "",
"Watch on YouTube": "Ver el vídeo en Youtube", "Watch on YouTube": "Ver el vídeo en Youtube",
"Hide annotations": "Ocultar anotaciones", "Hide annotations": "Ocultar anotaciones",
"Show annotations": "Mostrar anotaciones", "Show annotations": "Mostrar anotaciones",

View File

@@ -1,6 +1,7 @@
{ {
"`x` subscribers": "`x` harpidedun", "`x` subscribers": "`x` harpidedun",
"`x` videos": "`x` bideo", "`x` videos": "`x` bideo",
"`x` playlists": "",
"LIVE": "ZUZENEAN", "LIVE": "ZUZENEAN",
"Shared `x` ago": "Duela `x` partekatua", "Shared `x` ago": "Duela `x` partekatua",
"Unsubscribe": "Harpidetza kendu", "Unsubscribe": "Harpidetza kendu",
@@ -56,7 +57,7 @@
"Play next by default: ": "", "Play next by default: ": "",
"Autoplay next video: ": "", "Autoplay next video: ": "",
"Listen by default: ": "", "Listen by default: ": "",
"Proxy videos? ": "", "Proxy videos: ": "",
"Default speed: ": "", "Default speed: ": "",
"Preferred video quality: ": "", "Preferred video quality: ": "",
"Player volume: ": "", "Player volume: ": "",
@@ -65,13 +66,17 @@
"reddit": "", "reddit": "",
"Default captions: ": "", "Default captions: ": "",
"Fallback captions: ": "", "Fallback captions: ": "",
"Show related videos? ": "", "Show related videos: ": "",
"Show annotations by default? ": "", "Show annotations by default: ": "",
"Visual preferences": "", "Visual preferences": "",
"Player style: ": "",
"Dark mode: ": "", "Dark mode: ": "",
"Theme: ": "",
"dark": "",
"light": "",
"Thin mode: ": "", "Thin mode: ": "",
"Subscription preferences": "", "Subscription preferences": "",
"Show annotations by default for subscribed channels? ": "", "Show annotations by default for subscribed channels: ": "",
"Redirect homepage to feed: ": "", "Redirect homepage to feed: ": "",
"Number of videos shown in feed: ": "", "Number of videos shown in feed: ": "",
"Sort videos by: ": "", "Sort videos by: ": "",
@@ -99,11 +104,11 @@
"Administrator preferences": "", "Administrator preferences": "",
"Default homepage: ": "", "Default homepage: ": "",
"Feed menu: ": "", "Feed menu: ": "",
"Top enabled? ": "", "Top enabled: ": "",
"CAPTCHA enabled? ": "", "CAPTCHA enabled: ": "",
"Login enabled? ": "", "Login enabled: ": "",
"Registration enabled? ": "", "Registration enabled: ": "",
"Report statistics? ": "", "Report statistics: ": "",
"Save preferences": "", "Save preferences": "",
"Subscription manager": "", "Subscription manager": "",
"Token manager": "", "Token manager": "",
@@ -122,7 +127,17 @@
"View JavaScript license information.": "", "View JavaScript license information.": "",
"View privacy policy.": "", "View privacy policy.": "",
"Trending": "", "Trending": "",
"Public": "",
"Unlisted": "", "Unlisted": "",
"Private": "",
"View all playlists": "",
"Updated `x` ago": "",
"Delete playlist `x`?": "",
"Delete playlist": "",
"Create playlist": "",
"Title": "",
"Playlist privacy": "",
"Editing playlist `x`": "",
"Watch on YouTube": "", "Watch on YouTube": "",
"Hide annotations": "", "Hide annotations": "",
"Show annotations": "", "Show annotations": "",
@@ -136,6 +151,7 @@
"Shared `x`": "", "Shared `x`": "",
"`x` views": "", "`x` views": "",
"Premieres in `x`": "", "Premieres in `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.": "", "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 YouTube comments": "",
"View more comments on Reddit": "", "View more comments on Reddit": "",
@@ -313,5 +329,8 @@
"`x` marked it with a ❤": "", "`x` marked it with a ❤": "",
"Audio mode": "", "Audio mode": "",
"Video mode": "", "Video mode": "",
"Videos": "" "Videos": "",
"Playlists": "",
"Community": "",
"Current version: ": ""
} }

View File

@@ -1,12 +1,13 @@
{ {
"`x` subscribers": "`x` abonnés", "`x` subscribers": "`x` abonnés",
"`x` videos": "`x` vidéos", "`x` videos": "`x` vidéos",
"`x` playlists": "`x` listes de lecture",
"LIVE": "EN DIRECT", "LIVE": "EN DIRECT",
"Shared `x` ago": "Ajoutée il y a `x`", "Shared `x` ago": "Ajoutée il y a `x`",
"Unsubscribe": "Se désabonner", "Unsubscribe": "Se désabonner",
"Subscribe": "S'abonner", "Subscribe": "S'abonner",
"View channel on YouTube": "Voir la chaîne sur YouTube", "View channel on YouTube": "Voir la chaîne sur YouTube",
"View playlist on YouTube": "", "View playlist on YouTube": "Voir la liste de lecture sur YouTube",
"newest": "Date d'ajout (la plus récente)", "newest": "Date d'ajout (la plus récente)",
"oldest": "Date d'ajout (la plus ancienne)", "oldest": "Date d'ajout (la plus ancienne)",
"popular": "Les plus populaires", "popular": "Les plus populaires",
@@ -15,8 +16,8 @@
"Previous page": "Page précédente", "Previous page": "Page précédente",
"Clear watch history?": "Êtes-vous sûr de vouloir supprimer l'historique des vidéos regardées ?", "Clear watch history?": "Êtes-vous sûr de vouloir supprimer l'historique des vidéos regardées ?",
"New password": "Nouveau mot de passe", "New password": "Nouveau mot de passe",
"New passwords must match": "Les nouveaux mots de passe doivent être identiques", "New passwords must match": "Les champs \"Nouveau mot de passe\" doivent être identiques",
"Cannot change password for Google accounts": "Le mot de passe d'un compte Google ne peut pas être changé", "Cannot change password for Google accounts": "Le mot de passe d'un compte Google ne peut pas être changé depuis Invidious",
"Authorize token?": "Autoriser le token ?", "Authorize token?": "Autoriser le token ?",
"Authorize token for `x`?": "Autoriser le token pour `x` ?", "Authorize token for `x`?": "Autoriser le token pour `x` ?",
"Yes": "Oui", "Yes": "Oui",
@@ -29,8 +30,8 @@
"Import NewPipe subscriptions (.json)": "Importer des abonnements NewPipe (.json)", "Import NewPipe subscriptions (.json)": "Importer des abonnements NewPipe (.json)",
"Import NewPipe data (.zip)": "Importer des données NewPipe (.zip)", "Import NewPipe data (.zip)": "Importer des données NewPipe (.zip)",
"Export": "Exporter", "Export": "Exporter",
"Export subscriptions as OPML": "Exporter les abonnements en OPML", "Export subscriptions as OPML": "Exporter les abonnements au format OPML",
"Export subscriptions as OPML (for NewPipe & FreeTube)": "Exporter les abonnements en OPML (pour NewPipe & FreeTube)", "Export subscriptions as OPML (for NewPipe & FreeTube)": "Exporter les abonnements au format OPML (pour NewPipe & FreeTube)",
"Export data as JSON": "Exporter les données au format JSON", "Export data as JSON": "Exporter les données au format JSON",
"Delete account?": "Êtes-vous sûr de vouloir supprimer votre compte ?", "Delete account?": "Êtes-vous sûr de vouloir supprimer votre compte ?",
"History": "Historique", "History": "Historique",
@@ -52,11 +53,11 @@
"Preferences": "Préférences", "Preferences": "Préférences",
"Player preferences": "Préférences du lecteur", "Player preferences": "Préférences du lecteur",
"Always loop: ": "Lire en boucle : ", "Always loop: ": "Lire en boucle : ",
"Autoplay: ": "Lire automatiquement : ", "Autoplay: ": "Lancer la lecture automatiquement : ",
"Play next by default: ": "Jouer suirvante par défaut : ", "Play next by default: ": "Lire les vidéos suivantes par défaut : ",
"Autoplay next video: ": "Lire automatiquement la vidéo suivante : ", "Autoplay next video: ": "Lancer la lecture automatiquement pour la vidéo suivant la vidéo regardée : ",
"Listen by default: ": "Audio uniquement : ", "Listen by default: ": "Audio uniquement : ",
"Proxy videos? ": "Charger les vidéos à travers un proxy ? ", "Proxy videos: ": "Charger les vidéos à travers un proxy : ",
"Default speed: ": "Vitesse par défaut : ", "Default speed: ": "Vitesse par défaut : ",
"Preferred video quality: ": "Qualité vidéo souhaitée : ", "Preferred video quality: ": "Qualité vidéo souhaitée : ",
"Player volume: ": "Volume du lecteur : ", "Player volume: ": "Volume du lecteur : ",
@@ -64,16 +65,20 @@
"youtube": "YouTube", "youtube": "YouTube",
"reddit": "Reddit", "reddit": "Reddit",
"Default captions: ": "Sous-titres par défaut : ", "Default captions: ": "Sous-titres par défaut : ",
"Fallback captions: ": "Sous-titres de repli : ", "Fallback captions: ": "Sous-titres alternatifs : ",
"Show related videos? ": "Voir les vidéos liées ? ", "Show related videos: ": "Voir les vidéos liées : ",
"Show annotations by default? ": "Voir les annotations par défaut ? ", "Show annotations by default: ": "Afficher les annotations par défaut : ",
"Visual preferences": "Préférences du site", "Visual preferences": "Préférences du site",
"Dark mode: ": "Mode Sombre : ", "Player style: ": "Style du lecteur : ",
"Thin mode: ": "Mode Simplifié : ", "Dark mode: ": "Mode sombre : ",
"Theme: ": "Thème : ",
"dark": "sombre",
"light": "clair",
"Thin mode: ": "Mode léger : ",
"Subscription preferences": "Préférences de la page d'abonnements", "Subscription preferences": "Préférences de la page d'abonnements",
"Show annotations by default for subscribed channels? ": "Voir les annotations par défaut sur les chaînes suivies ? ", "Show annotations by default for subscribed channels: ": "Afficher les annotations par défaut sur les chaînes auxquelles vous êtes abonnés : ",
"Redirect homepage to feed: ": "Rediriger la page d'accueil vers la page d'abonnements : ", "Redirect homepage to feed: ": "Rediriger la page d'accueil vers la page d'abonnements : ",
"Number of videos shown in feed: ": "Nombre de vidéos montrées dans la page d'abonnements : ", "Number of videos shown in feed: ": "Nombre de vidéos affichées dans la page d'abonnements : ",
"Sort videos by: ": "Trier les vidéos par : ", "Sort videos by: ": "Trier les vidéos par : ",
"published": "date de publication", "published": "date de publication",
"published - reverse": "date de publication - inversé", "published - reverse": "date de publication - inversé",
@@ -81,13 +86,13 @@
"alphabetically - reverse": "alphabétiquement - inversé", "alphabetically - reverse": "alphabétiquement - inversé",
"channel name": "nom de la chaîne", "channel name": "nom de la chaîne",
"channel name - reverse": "nom de la chaîne - inversé", "channel name - reverse": "nom de la chaîne - inversé",
"Only show latest video from channel: ": "Afficher uniquement la dernière vidéo de la chaîne : ", "Only show latest video from channel: ": "Afficher uniquement la dernière vidéo des chaînes auxquelles vous êtes abonnés : ",
"Only show latest unwatched video from channel: ": "Afficher uniquement la dernière vidéo de la chaîne non regardée : ", "Only show latest unwatched video from channel: ": "Afficher uniquement la dernière vidéo des chaînes auxquelles vous êtes abonnés qui n'a pas était regardée : ",
"Only show unwatched: ": "Afficher uniquement les vidéos non regardées : ", "Only show unwatched: ": "Afficher uniquement les vidéos qui n'ont pas étaient regardées : ",
"Only show notifications (if there are any): ": "Afficher uniquement les notifications (s'il y en a) : ", "Only show notifications (if there are any): ": "Afficher uniquement les notifications (s'il y en a) : ",
"Enable web notifications": "", "Enable web notifications": "Activer les notifications web",
"`x` uploaded a video": "", "`x` uploaded a video": "`x` a partagé(e) une vidéo",
"`x` is live": "", "`x` is live": "`x` est en direct",
"Data preferences": "Préférences liées aux données", "Data preferences": "Préférences liées aux données",
"Clear watch history": "Supprimer l'historique des vidéos regardées", "Clear watch history": "Supprimer l'historique des vidéos regardées",
"Import/export data": "Importer/exporter les données", "Import/export data": "Importer/exporter les données",
@@ -96,14 +101,14 @@
"Manage tokens": "Gérer les tokens", "Manage tokens": "Gérer les tokens",
"Watch history": "Historique de visionnage", "Watch history": "Historique de visionnage",
"Delete account": "Supprimer votre compte", "Delete account": "Supprimer votre compte",
"Administrator preferences": "Préferences d'Administrateur", "Administrator preferences": "Préferences d'Administration",
"Default homepage: ": "Page d'accueil par défaut : ", "Default homepage: ": "Page d'accueil par défaut : ",
"Feed menu: ": "Menu des Flux : ", "Feed menu: ": "Préferences des abonnements : ",
"Top enabled? ": "Top activé ? ", "Top enabled: ": "Top activé : ",
"CAPTCHA enabled? ": "CAPTCHA activé ? ", "CAPTCHA enabled: ": "CAPTCHA activé : ",
"Login enabled? ": "Connexion activé ? ", "Login enabled: ": "Connexion activé : ",
"Registration enabled? ": "Inscription activée ? ", "Registration enabled: ": "Inscription activée : ",
"Report statistics? ": "Télémétrie activé ? ", "Report statistics: ": "Télémétrie activé : ",
"Save preferences": "Enregistrer les préférences", "Save preferences": "Enregistrer les préférences",
"Subscription manager": "Gestionnaire d'abonnement", "Subscription manager": "Gestionnaire d'abonnement",
"Token manager": "Gestionnaire de tokens", "Token manager": "Gestionnaire de tokens",
@@ -112,31 +117,41 @@
"`x` tokens": "`x` tokens", "`x` tokens": "`x` tokens",
"Import/export": "Importer/Exporter", "Import/export": "Importer/Exporter",
"unsubscribe": "se désabonner", "unsubscribe": "se désabonner",
"revoke": "annuler", "revoke": "révoquer",
"Subscriptions": "Abonnements", "Subscriptions": "Abonnements",
"`x` unseen notifications": "`x` notifications non vues", "`x` unseen notifications": "`x` notifications non vues",
"search": "Rechercher", "search": "rechercher",
"Log out": "Déconnexion", "Log out": "Déconnexion",
"Released under the AGPLv3 by Omar Roth.": "Publié sous licence AGPLv3 par Omar Roth.", "Released under the AGPLv3 by Omar Roth.": "Publié sous licence AGPLv3 par Omar Roth.",
"Source available here.": "Code Source.", "Source available here.": "Code source disponible ici.",
"View JavaScript license information.": "Voir les informations des licences JavaScript.", "View JavaScript license information.": "Informations des licences JavaScript.",
"View privacy policy.": "Voir la politique de confidentialité.", "View privacy policy.": "Politique de confidentialité.",
"Trending": "Tendances", "Trending": "Tendances",
"Public": "Publique",
"Unlisted": "Non répertoriée", "Unlisted": "Non répertoriée",
"Private": "Privée",
"View all playlists": "Voir toutes vos playlists",
"Updated `x` ago": "Dernière mise à jour il y a `x`",
"Delete playlist `x`?": "Êtes-vous sûr de vouloir supprimer la liste de lecture ?",
"Delete playlist": "Supprimer la liste de lecture",
"Create playlist": "Créer une liste de lecture",
"Title": "Titre",
"Playlist privacy": "Paramètres de confidentialité de la liste de lecture",
"Editing playlist `x`": "Liste de lecture modifier le `x`",
"Watch on YouTube": "Voir la vidéo sur Youtube", "Watch on YouTube": "Voir la vidéo sur Youtube",
"Hide annotations": "Masquer les annotations", "Hide annotations": "Masquer les annotations",
"Show annotations": "Afficher les annotations", "Show annotations": "Afficher les annotations",
"Genre: ": "Genre : ", "Genre: ": "Genre : ",
"License: ": "Licence : ", "License: ": "Licence : ",
"Family friendly? ": "Tout Public ? ", "Family friendly? ": "Vidéo tout public ? ",
"Wilson score: ": "Score de Wilson : ", "Wilson score: ": "Score de Wilson : ",
"Engagement: ": "Poucentage de spectateur aillant aimé Like ou Dislike la vidéo : ", "Engagement: ": "Pourcentage de spectateur aillant appuyé sur \"J'aime\" ou \"J'aime Pas\" : ",
"Whitelisted regions: ": "Régions en liste blanche : ", "Whitelisted regions: ": "Régions sur liste blanche : ",
"Blacklisted regions: ": "Régions sur liste noire : ", "Blacklisted regions: ": "Régions sur liste noire : ",
"Shared `x`": "Ajoutée le `x`", "Shared `x`": "Ajoutée le `x`",
"`x` views": "`x` vues", "`x` views": "`x` vues",
"Premieres in `x`": "Première dans `x`", "Premieres in `x`": "Première dans `x`",
"Premieres `x`": "", "Premieres `x`": "Première le `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.": "Il semblerait que JavaScript soit désactivé. Cliquez ici pour voir les commentaires sans. Gardez à l'esprit que le chargement peut prendre plus de temps.", "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.": "Il semblerait que JavaScript soit désactivé. Cliquez ici pour voir les commentaires sans. Gardez à l'esprit que le chargement peut prendre plus de temps.",
"View YouTube comments": "Voir les commentaires YouTube", "View YouTube comments": "Voir les commentaires YouTube",
"View more comments on Reddit": "Voir plus de commentaires sur Reddit", "View more comments on Reddit": "Voir plus de commentaires sur Reddit",
@@ -145,8 +160,8 @@
"Hide replies": "Masquer les réponses", "Hide replies": "Masquer les réponses",
"Show replies": "Afficher les réponses", "Show replies": "Afficher les réponses",
"Incorrect password": "Mot de passe incorrect", "Incorrect password": "Mot de passe incorrect",
"Quota exceeded, try again in a few hours": "Nombre de tentative de connexion dépassé, réessayez dans quelques heures", "Quota exceeded, try again in a few hours": "Nombre de tentative de connexion dépassée, réessayez dans quelques heures",
"Unable to log in, make sure two-factor authentication (Authenticator or SMS) is turned on.": "Si vous ne parvenez pas à vous connecter, assurez-vous que l'authentification à deux facteurs (Authenticator ou SMS) est activée.", "Unable to log in, make sure two-factor authentication (Authenticator or SMS) is turned on.": "Impossible de se connecter, si après plusieurs tentative vous ne parvenez toujours pas à vous connecter, assurez-vous que l'authentification à deux facteurs (Authenticator ou SMS) est activée.",
"Invalid TFA code": "Code d'authentification à deux facteurs invalide", "Invalid TFA code": "Code d'authentification à deux facteurs invalide",
"Login failed. This may be because two-factor authentication is not turned on for your account.": "La connexion a échoué. Cela peut être dû au fait que l'authentification à deux facteurs n'est pas activée sur votre compte.", "Login failed. This may be because two-factor authentication is not turned on for your account.": "La connexion a échoué. Cela peut être dû au fait que l'authentification à deux facteurs n'est pas activée sur votre compte.",
"Wrong answer": "Réponse invalide", "Wrong answer": "Réponse invalide",
@@ -167,19 +182,19 @@
"Could not fetch comments": "Impossible de charger les commentaires", "Could not fetch comments": "Impossible de charger les commentaires",
"View `x` replies": "Voir `x` réponses", "View `x` replies": "Voir `x` réponses",
"`x` ago": "il y a `x`", "`x` ago": "il y a `x`",
"Load more": "Charger plus", "Load more": "Voir plus",
"`x` points": "`x` points", "`x` points": "`x` points",
"Could not create mix.": "Impossible de charger cette liste de lecture.", "Could not create mix.": "Impossible de charger cette liste de lecture.",
"Empty playlist": "La liste de lecture est vide", "Empty playlist": "La liste de lecture est vide",
"Not a playlist.": "Liste de lecture invalide.", "Not a playlist.": "La liste de lecture est invalide.",
"Playlist does not exist.": "La liste de lecture n'existe pas.", "Playlist does not exist.": "La liste de lecture n'existe pas.",
"Could not pull trending pages.": "Impossible de charger les pages de tendances.", "Could not pull trending pages.": "Impossible de charger les pages de tendances.",
"Hidden field \"challenge\" is a required field": "Hidden field \"challenge\" is a required field", "Hidden field \"challenge\" is a required field": "Le champ masqué \"challenge\" est un champ obligatoire",
"Hidden field \"token\" is a required field": "Hidden field \"token\" is a required field", "Hidden field \"token\" is a required field": "Le champ caché \"token\" est requis",
"Erroneous challenge": "Erroneous challenge", "Erroneous challenge": "Challenge invalide",
"Erroneous token": "Erroneous token", "Erroneous token": "Token invalide",
"No such user": "No such user", "No such user": "Cet utilisateur n'existe pas",
"Token is expired, please try again": "Token is expired, please try again", "Token is expired, please try again": "Le token est expiré, veuillez réessayer",
"English": "Anglais", "English": "Anglais",
"English (auto-generated)": "Anglais (générés automatiquement)", "English (auto-generated)": "Anglais (générés automatiquement)",
"Afrikaans": "Afrikaans", "Afrikaans": "Afrikaans",
@@ -293,7 +308,7 @@
"`x` hours": "`x` heures", "`x` hours": "`x` heures",
"`x` minutes": "`x` minutes", "`x` minutes": "`x` minutes",
"`x` seconds": "`x` secondes", "`x` seconds": "`x` secondes",
"Fallback comments: ": "Fallback comments: ", "Fallback comments: ": "Commentaires alternatifs : ",
"Popular": "Populaire", "Popular": "Populaire",
"Top": "Top", "Top": "Top",
"About": "À propos", "About": "À propos",
@@ -309,13 +324,13 @@
"Download as: ": "Télécharger en : ", "Download as: ": "Télécharger en : ",
"%A %B %-d, %Y": "%A %-d %B %Y", "%A %B %-d, %Y": "%A %-d %B %Y",
"(edited)": "(modifié)", "(edited)": "(modifié)",
"YouTube comment permalink": "Lien YouTube permanent vers le commentaire", "YouTube comment permalink": "Lien permanent vers le commentaire sur YouTube",
"permalink": "", "permalink": "Lien permanent",
"`x` marked it with a ❤": "`x` l'a marqué d'un ❤", "`x` marked it with a ❤": "`x` l'a marqué d'un ❤",
"Audio mode": "Mode Audio", "Audio mode": "Mode audio",
"Video mode": "Mode Vidéo", "Video mode": "Mode vidéo",
"Videos": "Vidéos", "Videos": "Vidéos",
"Playlists": "Liste de lecture", "Playlists": "Listes de lecture",
"Community": "", "Community": "Communauté",
"Current version: ": "Version actuelle : " "Current version: ": "Version actuelle : "
} }

View File

@@ -1,15 +1,18 @@
{ {
"`x` subscribers": "",
"`x` videos": "",
"`x` playlists": "",
"`x` subscribers.": "`x` áskrifandar.", "`x` subscribers.": "`x` áskrifandar.",
"`x` videos.": "`x` myndbönd.", "`x` videos.": "`x` myndbönd.",
"LIVE": "BEINT", "LIVE": "BEINT",
"Shared `x` ago": "Deilt `x` síðan", "Shared `x` ago": "Deilt `x` síðan",
"Unsubscribe": "Afskrá", "Unsubscribe": "Afskrá",
"Subscribe": "Gerast áskrifandi", "Subscribe": "Áskrifa",
"View channel on YouTube": "Skoða rás á YouTube", "View channel on YouTube": "Skoða rás á YouTube",
"View playlist on YouTube": "Skoða spilunarlisti á YouTube", "View playlist on YouTube": "Skoða spilunarlisti á YouTube",
"newest": "nýjasta", "newest": "nýjasta",
"oldest": "elsta", "oldest": "elsta",
"popular": "vinsællt", "popular": "vinsælt",
"last": "síðast", "last": "síðast",
"Next page": "Næsta síða", "Next page": "Næsta síða",
"Previous page": "Fyrri síða", "Previous page": "Fyrri síða",
@@ -56,24 +59,28 @@
"Play next by default: ": "Spila næst sjálfgefið: ", "Play next by default: ": "Spila næst sjálfgefið: ",
"Autoplay next video: ": "Spila næst sjálfkrafa: ", "Autoplay next video: ": "Spila næst sjálfkrafa: ",
"Listen by default: ": "Hlusta sjálfgefið: ", "Listen by default: ": "Hlusta sjálfgefið: ",
"Proxy videos? ": "", "Proxy videos: ": "Proxy myndbönd? ",
"Default speed: ": "Sjálfgefinn hraði: ", "Default speed: ": "Sjálfgefinn hraði: ",
"Preferred video quality: ": "Æskilegt myndbands gæði: ", "Preferred video quality: ": "Æskilegt myndbands gæði: ",
"Player volume: ": "Spilara bindi: ", "Player volume: ": "Spilara hljóðstyrkur: ",
"Default comments: ": "Sjálfgefin ummæli: ", "Default comments: ": "Sjálfgefin ummæli: ",
"youtube": "youtube", "youtube": "youtube",
"reddit": "reddit", "reddit": "reddit",
"Default captions: ": "Sjálfgefin texti: ", "Default captions: ": "Sjálfgefin texti: ",
"Fallback captions: ": "Varatextar: ", "Fallback captions: ": "Varatextar: ",
"Show related videos? ": "Sýna tengd myndbönd? ", "Show related videos: ": "Sýna tengd myndbönd? ",
"Show annotations by default? ": "", "Show annotations by default: ": "Á að sýna glósur sjálfgefið? ",
"Visual preferences": "Sjónrænar stillingar", "Visual preferences": "Sjónrænar stillingar",
"Player style: ": "",
"Dark mode: ": "Myrkur ham: ", "Dark mode: ": "Myrkur ham: ",
"Theme: ": "",
"dark": "",
"light": "",
"Thin mode: ": "Þunnt ham: ", "Thin mode: ": "Þunnt ham: ",
"Subscription preferences": "Áskriftarstillingar", "Subscription preferences": "Áskriftarstillingar",
"Show annotations by default for subscribed channels? ": "", "Show annotations by default for subscribed channels: ": "Á að sýna glósur sjálfgefið fyrir áskriftarrásir? ",
"Redirect homepage to feed: ": "", "Redirect homepage to feed: ": "Endurbeina heimasíðu að straumi: ",
"Number of videos shown in feed: ": "", "Number of videos shown in feed: ": "Fjöldi myndbanda sem sýndir eru í straumi: ",
"Sort videos by: ": "Raða myndbönd eftir: ", "Sort videos by: ": "Raða myndbönd eftir: ",
"published": "birt", "published": "birt",
"published - reverse": "birt - afturábak", "published - reverse": "birt - afturábak",
@@ -86,234 +93,259 @@
"Only show unwatched: ": "Sýna aðeins óséð: ", "Only show unwatched: ": "Sýna aðeins óséð: ",
"Only show notifications (if there are any): ": "Sýna aðeins tilkynningar (ef einhverjar eru): ", "Only show notifications (if there are any): ": "Sýna aðeins tilkynningar (ef einhverjar eru): ",
"Enable web notifications": "Virkja veftilkynningar", "Enable web notifications": "Virkja veftilkynningar",
"`x` uploaded a video": "' x ' hlóð upp myndband", "`x` uploaded a video": "`x` hlóð upp myndband",
"`x` is live": "' x ' er í beinni", "`x` is live": "`x` er í beinni",
"Data preferences": "Gagnastillingar", "Data preferences": "Gagnastillingar",
"Clear watch history": "Hreinsa áhorfssögu", "Clear watch history": "Hreinsa áhorfssögu",
"Import/export data": "Flytja inn/út gögn", "Import/export data": "Flytja inn/út gögn",
"Change password": "Breyta lykilorði", "Change password": "Breyta lykilorði",
"Manage subscriptions": "Stjórna áskriftum", "Manage subscriptions": "Stjórna áskriftum",
"Manage tokens": "", "Manage tokens": "Stjórna tákn",
"Watch history": "", "Watch history": "Áhorfssögu",
"Delete account": "", "Delete account": "Eyða reikningi",
"Administrator preferences": "", "Administrator preferences": "Kjörstillingar stjórnanda",
"Default homepage: ": "", "Default homepage: ": "Sjálfgefin heimasíða: ",
"Feed menu: ": "", "Feed menu: ": "Straum valmynd: ",
"Top enabled? ": "", "Top enabled: ": "Toppur virkur? ",
"CAPTCHA enabled? ": "", "CAPTCHA enabled: ": "CAPTCHA virk? ",
"Login enabled? ": "", "Login enabled: ": "Innskráning virk? ",
"Registration enabled? ": "", "Registration enabled: ": "Nýskráning virkjuð? ",
"Report statistics? ": "", "Report statistics: ": "Skrá talnagögn? ",
"Save preferences": "", "Save preferences": "Vista stillingar",
"Subscription manager": "", "Subscription manager": "Áskriftarstjóri",
"Token manager": "", "`x` subscriptions": "",
"Token": "", "`x` tokens": "",
"`x` subscriptions.": "", "Token manager": "Táknstjóri",
"`x` tokens.": "", "Token": "Tákn",
"Import/export": "", "`x` subscriptions.": "`x` áskriftir.",
"unsubscribe": "", "`x` tokens.": "`x` tákn.",
"revoke": "", "`x` unseen notifications": "",
"Subscriptions": "", "Import/export": "Flytja inn/út",
"`x` unseen notifications.": "", "unsubscribe": "afskrá",
"search": "", "revoke": "afturkalla",
"Log out": "", "Subscriptions": "Áskriftir",
"Released under the AGPLv3 by Omar Roth.": "", "`x` unseen notifications.": "`x` óséðar tilkynningar.",
"Source available here.": "", "search": "leita",
"View JavaScript license information.": "", "Log out": "Útskrá",
"View privacy policy.": "", "Released under the AGPLv3 by Omar Roth.": "Útgefið undir AGPLv3 eftir Omar Roth.",
"Trending": "", "Source available here.": "Frumkóði aðgengilegur hér.",
"Unlisted": "", "View JavaScript license information.": "Skoða JavaScript leyfisupplýsingar.",
"Watch on YouTube": "", "View privacy policy.": "Skoða meðferð persónuupplýsinga.",
"Hide annotations": "", "Trending": "Vinsælt",
"Show annotations": "", "Public": "",
"Genre: ": "", "Unlisted": "Óskráð",
"License: ": "", "Private": "",
"Family friendly? ": "", "View all playlists": "",
"Wilson score: ": "", "Updated `x` ago": "",
"Engagement: ": "", "Delete playlist `x`?": "",
"Whitelisted regions: ": "", "Delete playlist": "",
"Blacklisted regions: ": "", "Create playlist": "",
"Shared `x`": "", "Title": "",
"`x` views.": "", "Playlist privacy": "",
"Premieres in `x`": "", "Editing playlist `x`": "",
"Premieres `x`": "", "Watch on YouTube": "Horfa á YouTube",
"Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.": "", "Hide annotations": "Fela glósur",
"View YouTube comments": "", "Show annotations": "Sýna glósur",
"View more comments on Reddit": "", "Genre: ": "Tegund: ",
"View `x` comments": "", "License: ": "Notkunarleyfi: ",
"View Reddit comments": "", "Family friendly? ": "Fjölskylduvænt? ",
"Hide replies": "", "`x` views": "",
"Show replies": "", "Wilson score: ": "Wilson stig: ",
"Incorrect password": "", "Engagement: ": "Þátttöku: ",
"Quota exceeded, try again in a few hours": "", "Whitelisted regions: ": "Svæði á hvítum lista: ",
"Unable to log in, make sure two-factor authentication (Authenticator or SMS) is turned on.": "", "Blacklisted regions: ": "Svæði á svörtum lista: ",
"Invalid TFA code": "", "Shared `x`": "Deilt `x`",
"Login failed. This may be because two-factor authentication is not turned on for your account.": "", "`x` views.": "`x` áhorf.",
"Wrong answer": "", "Premieres in `x`": "Frumflutt eftir `x`",
"Erroneous CAPTCHA": "", "Premieres `x`": "Frumflutt `x`",
"CAPTCHA is a required field": "", "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.": "Hæ! Lítur út eins og þú hafir slökkt á JavaScript. Smelltu hér til að skoða ummæli, hafðu í huga að þær geta tekið aðeins lengri tíma að hlaða.",
"User ID is a required field": "", "View YouTube comments": "Skoða YouTube ummæli",
"Password is a required field": "", "View more comments on Reddit": "Skoða fleiri ummæli á Reddit",
"Wrong username or password": "", "View `x` comments": "Skoða `x` ummæli",
"Please sign in using 'Log in with Google'": "", "View Reddit comments": "Skoða Reddit ummæli",
"Password cannot be empty": "", "Hide replies": "Fela svör",
"Password cannot be longer than 55 characters": "", "Show replies": "Sýna svör",
"Please log in": "", "Incorrect password": "Rangt lykilorð",
"Invidious Private Feed for `x`": "", "Quota exceeded, try again in a few hours": "Kvóti fór yfir, reyndu aftur eftir nokkrar klukkustundir",
"channel:`x`": "", "Unable to log in, make sure two-factor authentication (Authenticator or SMS) is turned on.": "Ekki er hægt að skrá þig inn, vertu viss um að tvíþætt staðfesting (Authenticator eða SMS) sé kveikt á.",
"Deleted or invalid channel": "", "Invalid TFA code": "Ógildur TFA kóði",
"This channel does not exist.": "", "Login failed. This may be because two-factor authentication is not turned on for your account.": "Innskráning mistókst. Þetta gæti verið vegna þess að tvíþátta staðfesting er ekki kveikt á reikningnum þínum.",
"Could not get channel info.": "", "Wrong answer": "Rangt svar",
"Could not fetch comments": "", "Erroneous CAPTCHA": "Rangt CAPTCHA",
"View `x` replies.": "", "CAPTCHA is a required field": "CAPTCHA er nauðsynlegur reitur",
"`x` ago": "", "User ID is a required field": "Notandakenni er nauðsynlegur reitur",
"Load more": "", "Password is a required field": "Lykilorð er nauðsynlegur reitur",
"`x` points.": "", "Wrong username or password": "Rangt notandanafn eða lykilorð",
"Could not create mix.": "", "Please sign in using 'Log in with Google'": "Vinsamlegast skráðu þig inn með því að nota 'Innskráning með Google'",
"Empty playlist": "", "Password cannot be empty": "Lykilorð má ekki vera autt",
"Not a playlist.": "", "Password cannot be longer than 55 characters": "Lykilorð má ekki vera lengra en 55 stafir",
"Playlist does not exist.": "", "Please log in": "Vinsamlegast skráðu þig inn",
"Could not pull trending pages.": "", "View `x` replies": "",
"Hidden field \"challenge\" is a required field": "", "Invidious Private Feed for `x`": "Invidious Persónulegur Straumur fyrir `x`",
"Hidden field \"token\" is a required field": "", "channel:`x`": "rás:`x`",
"Erroneous challenge": "", "`x` points": "",
"Erroneous token": "", "Deleted or invalid channel": "Eytt eða ógild rás",
"No such user": "", "This channel does not exist.": "Þessi rás er ekki til.",
"Token is expired, please try again": "", "Could not get channel info.": "Ekki tókst að fá rásarupplýsingar.",
"English": "", "Could not fetch comments": "Ekki tókst að sækja ummæli",
"English (auto-generated)": "", "View `x` replies.": "Skoða `x` svör.",
"Afrikaans": "", "`x` ago": "`x` síðan",
"Albanian": "", "Load more": "Hlaða meira",
"Amharic": "", "`x` points.": "`x` stig.",
"Arabic": "", "Could not create mix.": "Ekki tókst að búa til blöndu.",
"Armenian": "", "Empty playlist": "Tómur spilunarlisti",
"Azerbaijani": "", "Not a playlist.": "Ekki spilunarlisti.",
"Bangla": "", "Playlist does not exist.": "Spilunarlisti er ekki til.",
"Basque": "", "Could not pull trending pages.": "Ekki tókst að draga vinsælar síður.",
"Belarusian": "", "Hidden field \"challenge\" is a required field": "Falinn reitur \"áskorun\" er nauðsynlegur reitur",
"Bosnian": "", "Hidden field \"token\" is a required field": "Falinn reitur \"tákn\" er nauðsynlegur reitur",
"Bulgarian": "", "Erroneous challenge": "Röng áskorun",
"Burmese": "", "Erroneous token": "Rangt tákn",
"Catalan": "", "No such user": "Enginn slíkur notandi",
"Cebuano": "", "Token is expired, please try again": "Tákn er útrunnið, vinsamlegast reyndu aftur",
"Chinese (Simplified)": "", "English": "Enska",
"Chinese (Traditional)": "", "English (auto-generated)": "Enska (sjálfkrafa)",
"Corsican": "", "Afrikaans": "Afríkanska",
"Croatian": "", "Albanian": "Albanska",
"Czech": "", "Amharic": "Amharíska",
"Danish": "", "Arabic": "Arabíska",
"Dutch": "", "Armenian": "Armenska",
"Esperanto": "", "Azerbaijani": "Aserbaídsjanska",
"Estonian": "", "Bangla": "Bangla",
"Filipino": "", "Basque": "Baskneska",
"Finnish": "", "Belarusian": "Hvítrússneska",
"French": "", "Bosnian": "Bosníska",
"Galician": "", "Bulgarian": "Búlgarska",
"Georgian": "", "Burmese": "Búrmíska",
"German": "", "Catalan": "Katalónska",
"Greek": "", "Cebuano": "Cebúanó",
"Gujarati": "", "Chinese (Simplified)": "Kínverska (Einfölduð)",
"Haitian Creole": "", "Chinese (Traditional)": "Kínverska (Hefðbundin)",
"Hausa": "", "Corsican": "Korsíska",
"Hawaiian": "", "Croatian": "Króatíska",
"Hebrew": "", "Czech": "Tékkneska",
"Hindi": "", "Danish": "Danska",
"Hmong": "", "Dutch": "Hollenska",
"Hungarian": "", "Esperanto": "Esperantó",
"Icelandic": "", "Estonian": "Eistneska",
"Igbo": "", "Filipino": "Filippínska",
"Indonesian": "", "Finnish": "Finnska",
"Irish": "", "French": "Franska",
"Italian": "", "Galician": "Galisíska",
"Japanese": "", "Georgian": "Georgíska",
"Javanese": "", "German": "Þýska",
"Kannada": "", "Greek": "Gríska",
"Kazakh": "", "Gujarati": "Gújaratí",
"Khmer": "", "Haitian Creole": "Haítískt Kreólamál",
"Korean": "", "Hausa": "Hausa",
"Kurdish": "", "Hawaiian": "Havaíska",
"Kyrgyz": "", "Hebrew": "Hebreska",
"Lao": "", "Hindi": "Hindí",
"Latin": "", "Hmong": "Hmong",
"Latvian": "", "Hungarian": "Ungverska",
"Lithuanian": "", "Icelandic": "Íslenska",
"Luxembourgish": "", "Igbo": "Igbo",
"Macedonian": "", "Indonesian": "Indónesíska",
"Malagasy": "", "Irish": "Írska",
"Malay": "", "Italian": "Ítalska",
"Malayalam": "", "Japanese": "Japanska",
"Maltese": "", "Javanese": "Javanska",
"Maori": "", "Kannada": "Kanaríska",
"Marathi": "", "Kazakh": "Kasakíska",
"Mongolian": "", "Khmer": "Khmeríska",
"Nepali": "", "Korean": "Kóreska",
"Norwegian Bokmål": "", "Kurdish": "Kúrdíska",
"Nyanja": "", "Kyrgyz": "Kirgisíska",
"Pashto": "", "Lao": "Laó",
"Persian": "", "Latin": "Latína",
"Polish": "", "Latvian": "Lettneska",
"Portuguese": "", "Lithuanian": "Litháíska",
"Punjabi": "", "Luxembourgish": "Lúxemborgíska",
"Romanian": "", "Macedonian": "Makedóníska",
"Russian": "", "Malagasy": "Malagasíska",
"Samoan": "", "Malay": "Malaíska",
"Scottish Gaelic": "", "Malayalam": "Malaíalam",
"Serbian": "", "Maltese": "Maltneska",
"Shona": "", "Maori": "Maórí",
"Sindhi": "", "Marathi": "Marathi",
"Sinhala": "", "Mongolian": "Mongólska",
"Slovak": "", "Nepali": "Nepalska",
"Slovenian": "", "Norwegian Bokmål": "Norskt bókmál",
"Somali": "", "Nyanja": "Nyanja",
"Southern Sotho": "", "Pashto": "Pashto",
"Spanish": "", "Persian": "Persneska",
"Spanish (Latin America)": "", "Polish": "Pólska",
"Sundanese": "", "Portuguese": "Portúgalska",
"Swahili": "", "Punjabi": "Punjabi",
"Swedish": "", "Romanian": "Rúmenska",
"Tajik": "", "Russian": "Rússneska",
"Tamil": "", "Samoan": "Samóíska",
"Telugu": "", "Scottish Gaelic": "Skosk Gelíska",
"Thai": "", "Serbian": "Serbneska",
"Turkish": "", "Shona": "Shona",
"Ukrainian": "", "Sindhi": "Sindí",
"Urdu": "", "Sinhala": "Sinhala",
"Uzbek": "", "Slovak": "Slóvakíska",
"Vietnamese": "", "Slovenian": "Slóvenska",
"Welsh": "", "Somali": "Sómalska",
"Western Frisian": "", "Southern Sotho": "Suður Sótó",
"Xhosa": "", "Spanish": "Spænska",
"Yiddish": "", "Spanish (Latin America)": "Spænska (Rómönsku Ameríka)",
"Yoruba": "", "Sundanese": "Sundaneska",
"Zulu": "", "Swahili": "Svahílí",
"`x` years.": "", "Swedish": "Sænska",
"`x` months.": "", "Tajik": "Tadsikíska",
"`x` weeks.": "", "Tamil": "Tamílska",
"`x` days.": "", "Telugu": "Telúgú",
"`x` hours.": "", "Thai": "Taílenska",
"`x` minutes.": "", "Turkish": "Tyrkneska",
"`x` seconds.": "", "Ukrainian": "Úkraníska",
"Fallback comments: ": "", "Urdu": "Úrdú",
"Popular": "", "`x` years": "",
"Top": "", "`x` months": "",
"About": "", "`x` weeks": "",
"Rating: ": "", "`x` days": "",
"Language: ": "", "`x` hours": "",
"View as playlist": "", "`x` minutes": "",
"Default": "", "`x` seconds": "",
"Music": "", "Uzbek": "Úsbekíska",
"Gaming": "", "Vietnamese": "Víetnamska",
"News": "", "Welsh": "Velska",
"Movies": "", "Western Frisian": "Vestur Frísneska",
"Download": "", "Xhosa": "Xhosa",
"Download as: ": "", "Yiddish": "Jiddíska",
"%A %B %-d, %Y": "", "Yoruba": "Jórúba",
"(edited)": "", "Zulu": "Zúlú",
"YouTube comment permalink": "", "`x` years.": "`x` ár.",
"`x` marked it with a ❤": "", "`x` months.": "`x` mánuði.",
"Audio mode": "", "`x` weeks.": "`x` vikur.",
"Video mode": "", "`x` days.": "`x` dagar.",
"Videos": "", "`x` hours.": "`x` klukkustundir.",
"Playlists": "", "`x` minutes.": "`x` mínútur.",
"Current version: ": "" "`x` seconds.": "`x` sekúndur.",
"Fallback comments: ": "Vara ummæli: ",
"Popular": "Vinsælt",
"permalink": "",
"Top": "Topp",
"About": "Um",
"Rating: ": "Einkunn: ",
"Language: ": "Tungumál: ",
"View as playlist": "Skoða sem spilunarlista",
"Community": "",
"Default": "Sjálfgefið",
"Music": "Tónlist",
"Gaming": "Tólvuleikja",
"News": "Fréttir",
"Movies": "Kvikmyndir",
"Download": "Niðurhal",
"Download as: ": "Niðurhala sem: ",
"%A %B %-d, %Y": "%A %B %-d, %Y",
"(edited)": "(breytt)",
"YouTube comment permalink": "YouTube ummæli varanlegur tengill",
"`x` marked it with a ❤": "`x` merkti það með ❤",
"Audio mode": "Hljóð ham",
"Video mode": "Myndband ham",
"Videos": "Myndbönd",
"Playlists": "Spilunarlistar",
"Current version: ": "Núverandi útgáfa: "
} }

View File

@@ -1,25 +1,32 @@
{ {
"`x` subscribers": "`x` iscritti", "`x` subscribers": {
"`x` videos": "`x` video", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` iscritto",
"": "`x` iscritti"
},
"`x` videos": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` video",
"": "`x` video"
},
"`x` playlists": "",
"LIVE": "IN DIRETTA", "LIVE": "IN DIRETTA",
"Shared `x` ago": "Condiviso `x` fa", "Shared `x` ago": "Condiviso `x` fa",
"Unsubscribe": "Disiscriviti", "Unsubscribe": "Disiscriviti",
"Subscribe": "Iscriviti", "Subscribe": "Iscriviti",
"View channel on YouTube": "Vedi canale su YouTube", "View channel on YouTube": "Vedi canale su YouTube",
"View playlist on YouTube": "", "View playlist on YouTube": "Vedi playlist su YouTube",
"newest": "Data di aggiunta (più recente)", "newest": "più recente",
"oldest": "Data di aggiunta (più vecchia)", "oldest": "più vecchio",
"popular": "Tendenze", "popular": "Tendenze",
"last": "durare", "last": "durare",
"Next page": "Pagina successiva", "Next page": "Pagina successiva",
"Previous page": "Pagina precedente", "Previous page": "Pagina precedente",
"Clear watch history?": "Sei sicuro di voler cancellare la cronologia dei video guardati?", "Clear watch history?": "Eliminare la cronologia dei video guardati?",
"New password": "Nuova password", "New password": "Nuova password",
"New passwords must match": "Le nuove password devono corrispondere", "New passwords must match": "Le nuove password devono corrispondere",
"Cannot change password for Google accounts": "Non è possibile modificare la password per gli account Google", "Cannot change password for Google accounts": "Non è possibile modificare la password per gli account Google",
"Authorize token?": "Autorizzare gettone?", "Authorize token?": "Autorizzare gettone?",
"Authorize token for `x`?": "", "Authorize token for `x`?": "Autorizzare gettone per `x`?",
"Yes": "Si", "Yes": "Sì",
"No": "No", "No": "No",
"Import and Export Data": "Importazione ed esportazione dati", "Import and Export Data": "Importazione ed esportazione dati",
"Import": "Importa", "Import": "Importa",
@@ -32,20 +39,20 @@
"Export subscriptions as OPML": "Esporta gli abbonamenti come OPML", "Export subscriptions as OPML": "Esporta gli abbonamenti come OPML",
"Export subscriptions as OPML (for NewPipe & FreeTube)": "Esporta gli abbonamenti come OPML (per NewPipe e FreeTube)", "Export subscriptions as OPML (for NewPipe & FreeTube)": "Esporta gli abbonamenti come OPML (per NewPipe e FreeTube)",
"Export data as JSON": "Esporta i dati in formato JSON", "Export data as JSON": "Esporta i dati in formato JSON",
"Delete account?": "Sei sicuro di voler cancellare l'account?", "Delete account?": "Eliminare l'account?",
"History": "Cronologia", "History": "Cronologia",
"An alternative front-end to YouTube": "Un'interfaccia alternativa per YouTube", "An alternative front-end to YouTube": "Un'interfaccia alternativa per YouTube",
"JavaScript license information": "Info licenze JavaScript", "JavaScript license information": "Info licenze JavaScript",
"source": "sorgente", "source": "sorgente",
"Log in": "Entra", "Log in": "Accedi",
"Log in/register": "Entra/Registrati", "Log in/register": "Accedi/Registrati",
"Log in with Google": "Entra con Google", "Log in with Google": "Accedi con Google",
"User ID": "ID utente", "User ID": "ID utente",
"Password": "Password", "Password": "Password",
"Time (h:mm:ss):": "Orario (h:mm:ss):", "Time (h:mm:ss):": "Orario (h:mm:ss):",
"Text CAPTCHA": "Testo del CAPTCHA", "Text CAPTCHA": "Testo del CAPTCHA",
"Image CAPTCHA": "Immagine CAPTCHA", "Image CAPTCHA": "Immagine CAPTCHA",
"Sign In": "Entra", "Sign In": "Accedi",
"Register": "Registrati", "Register": "Registrati",
"E-mail": "Email", "E-mail": "Email",
"Google verification code": "Codice di verifica Google", "Google verification code": "Codice di verifica Google",
@@ -53,28 +60,32 @@
"Player preferences": "Preferenze del riproduttore", "Player preferences": "Preferenze del riproduttore",
"Always loop: ": "Ripeti sempre: ", "Always loop: ": "Ripeti sempre: ",
"Autoplay: ": "Riproduzione automatica: ", "Autoplay: ": "Riproduzione automatica: ",
"Play next by default: ": "Riproduzione successiva per impostazione predefinita: ", "Play next by default: ": "Riproduzione successiva predefinita: ",
"Autoplay next video: ": "Riproduci automaticamente il prossimo video: ", "Autoplay next video: ": "Riproduci automaticamente il video successivo: ",
"Listen by default: ": "Modalità solo audio come predefinita: ", "Listen by default: ": "Modalità solo audio predefinita: ",
"Proxy videos? ": "", "Proxy videos: ": "Proxy per i video: ",
"Default speed: ": "Velocità di riproduzione predefinita: ", "Default speed: ": "Velocità predefinita: ",
"Preferred video quality: ": "Preferenza sulla qualità video: ", "Preferred video quality: ": "Qualità video preferita: ",
"Player volume: ": "Volume di riproduzione: ", "Player volume: ": "Volume di riproduzione: ",
"Default comments: ": "Origine dei commenti: ", "Default comments: ": "Origine dei commenti: ",
"youtube": "", "youtube": "YouTube",
"reddit": "", "reddit": "Reddit",
"Default captions: ": "Sottotitoli predefiniti: ", "Default captions: ": "Sottotitoli predefiniti: ",
"Fallback captions: ": "Sottotitoli alternativi: ", "Fallback captions: ": "Sottotitoli alternativi: ",
"Show related videos? ": "Mostra video correlati? ", "Show related videos: ": "Mostra video correlati: ",
"Show annotations by default? ": "Mostra le annotazioni per impostazione predefinita? ", "Show annotations by default: ": "Mostra le annotazioni in modo predefinito: ",
"Visual preferences": "Preferenze grafiche", "Visual preferences": "Preferenze grafiche",
"Player style: ": "Stile riproduttore",
"Dark mode: ": "Tema scuro: ", "Dark mode: ": "Tema scuro: ",
"Theme: ": "Tema",
"dark": "scuro",
"light": "chiaro",
"Thin mode: ": "Modalità per connessioni lente: ", "Thin mode: ": "Modalità per connessioni lente: ",
"Subscription preferences": "Preferenze iscrizioni", "Subscription preferences": "Preferenze iscrizioni",
"Show annotations by default for subscribed channels? ": "", "Show annotations by default for subscribed channels: ": "Mostrare annotazioni in modo predefinito per i canali sottoscritti: ",
"Redirect homepage to feed: ": "Reindirizza la pagina principale a quella delle iscrizioni: ", "Redirect homepage to feed: ": "Reindirizza la pagina principale a quella delle iscrizioni: ",
"Number of videos shown in feed: ": "Numero di video da mostrare nelle iscrizioni: ", "Number of videos shown in feed: ": "Numero di video da mostrare nelle iscrizioni: ",
"Sort videos by: ": "Ordinare i video per: ", "Sort videos by: ": "Ordina i video per: ",
"published": "data di pubblicazione", "published": "data di pubblicazione",
"published - reverse": "data di pubblicazione - decrescente", "published - reverse": "data di pubblicazione - decrescente",
"alphabetically": "ordine alfabetico", "alphabetically": "ordine alfabetico",
@@ -85,57 +96,80 @@
"Only show latest unwatched video from channel: ": "Mostra solo il video più recente non guardato del canale: ", "Only show latest unwatched video from channel: ": "Mostra solo il video più recente non guardato del canale: ",
"Only show unwatched: ": "Mostra solo i video non guardati: ", "Only show unwatched: ": "Mostra solo i video non guardati: ",
"Only show notifications (if there are any): ": "Mostra solo le notifiche (se presenti): ", "Only show notifications (if there are any): ": "Mostra solo le notifiche (se presenti): ",
"Enable web notifications": "", "Enable web notifications": "Attiva le notifiche web",
"`x` uploaded a video": "", "`x` uploaded a video": "`x` ha caricato un video",
"`x` is live": "", "`x` is live": "`x` è in diretta",
"Data preferences": "Preferenze dati", "Data preferences": "Preferenze dati",
"Clear watch history": "Cancella la cronologia dei video guardati", "Clear watch history": "Cancella la cronologia dei video guardati",
"Import/export data": "Importazione/esportazione dati", "Import/export data": "Importazione/esportazione dati",
"Change password": "", "Change password": "Modifica password",
"Manage subscriptions": "Gestisci le iscrizioni", "Manage subscriptions": "Gestisci le iscrizioni",
"Manage tokens": "", "Manage tokens": "Gestisci i gettoni",
"Watch history": "Cronologia dei video", "Watch history": "Cronologia dei video",
"Delete account": "Elimina l'account", "Delete account": "Elimina l'account",
"Administrator preferences": "", "Administrator preferences": "Preferenze amministratore",
"Default homepage: ": "", "Default homepage: ": "Pagina principale predefinita: ",
"Feed menu: ": "", "Feed menu: ": "Menu iscrizioni: ",
"Top enabled? ": "", "Top enabled: ": "",
"CAPTCHA enabled? ": "", "CAPTCHA enabled: ": "CAPTCHA attivati: ",
"Login enabled? ": "", "Login enabled: ": "Accesso attivato: ",
"Registration enabled? ": "", "Registration enabled: ": "Registrazione attivata: ",
"Report statistics? ": "", "Report statistics: ": "Resoconto delle statistiche: ",
"Save preferences": "Salva le preferenze", "Save preferences": "Salva le preferenze",
"Subscription manager": "Gestisci le iscrizioni", "Subscription manager": "Gestione delle iscrizioni",
"Token manager": "", "Token manager": "Gestione dei gettoni",
"Token": "", "Token": "Gettone",
"`x` subscriptions": "`x` iscrizioni", "`x` subscriptions": {
"`x` tokens": "", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` iscrizione",
"": "`x` iscrizioni"
},
"`x` tokens": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` gettone",
"": "`x` gettoni"
},
"Import/export": "Importa/esporta", "Import/export": "Importa/esporta",
"unsubscribe": "disiscriviti", "unsubscribe": "disiscriviti",
"revoke": "", "revoke": "revoca",
"Subscriptions": "Iscrizioni", "Subscriptions": "Iscrizioni",
"`x` unseen notifications": "`x` notifiche non visualizzate", "`x` unseen notifications": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` notifica non visualizzata",
"": "`x` notifiche non visualizzate"
},
"search": "Cerca", "search": "Cerca",
"Log out": "Esci", "Log out": "Esci",
"Released under the AGPLv3 by Omar Roth.": "Pubblicato con licenza AGPLv3 da Omar Roth.", "Released under the AGPLv3 by Omar Roth.": "Pubblicato con licenza AGPLv3 da Omar Roth.",
"Source available here.": "Codice sorgente.", "Source available here.": "Codice sorgente.",
"View JavaScript license information.": "Guarda le informazioni di licenza del codice JavaScript.", "View JavaScript license information.": "Guarda le informazioni di licenza del codice JavaScript.",
"View privacy policy.": "", "View privacy policy.": "Vedi la politica sulla privacy",
"Trending": "Tendenze", "Trending": "Tendenze",
"Unlisted": "", "Public": "",
"Watch on YouTube": "Guarda il video su YouTube", "Unlisted": "Non elencati",
"Hide annotations": "", "Private": "",
"Show annotations": "", "View all playlists": "",
"Updated `x` ago": "",
"Delete playlist `x`?": "",
"Delete playlist": "",
"Create playlist": "",
"Title": "",
"Playlist privacy": "",
"Editing playlist `x`": "",
"Watch on YouTube": "Guarda su YouTube",
"Hide annotations": "Nascondi annotazioni",
"Show annotations": "Mostra annotazioni",
"Genre: ": "Genere: ", "Genre: ": "Genere: ",
"License: ": "Licenza: ", "License: ": "Licenza: ",
"Family friendly? ": "Per tutti? ", "Family friendly? ": "Per tutti? ",
"Wilson score: ": "Punteggio di Wilson: ", "Wilson score: ": "Punteggio di Wilson: ",
"Engagement: ": "Tasso di coinvolgimento: ", "Engagement: ": "Tasso di coinvolgimento: ",
"Whitelisted regions: ": "Regioni nella lista bianca: ", "Whitelisted regions: ": "Regioni in lista bianca: ",
"Blacklisted regions: ": "Regioni nella lista nera: ", "Blacklisted regions: ": "Regioni in lista nera: ",
"Shared `x`": "Condiviso `x`", "Shared `x`": "Condiviso `x`",
"`x` views": "", "`x` views": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` visualizzazione",
"": "`x` visualizzazioni"
},
"Premieres in `x`": "", "Premieres in `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.": "Ciao! Sembra che tu abbia disattivato JavaScript. Clicca qui per visualizzare i commenti. Considera che potrebbe volerci più tempo.", "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.": "Ciao! Sembra che tu abbia disattivato JavaScript. Clicca qui per visualizzare i commenti. Considera che potrebbe volerci più tempo.",
"View YouTube comments": "Visualizza i commenti da YouTube", "View YouTube comments": "Visualizza i commenti da YouTube",
"View more comments on Reddit": "Visualizza più commenti su Reddit", "View more comments on Reddit": "Visualizza più commenti su Reddit",
@@ -157,28 +191,34 @@
"Please sign in using 'Log in with Google'": "Per favore accedi con \"Entra con Google\"", "Please sign in using 'Log in with Google'": "Per favore accedi con \"Entra con Google\"",
"Password cannot be empty": "La password non può essere vuota", "Password cannot be empty": "La password non può essere vuota",
"Password cannot be longer than 55 characters": "La password non può contenere più di 55 caratteri", "Password cannot be longer than 55 characters": "La password non può contenere più di 55 caratteri",
"Please log in": "Per favore, entra", "Please log in": "Per favore, accedi",
"Invidious Private Feed for `x`": "Feed privato Invidious per `x`", "Invidious Private Feed for `x`": "Feed privato Invidious per `x`",
"channel:`x`": "canale:`x`", "channel:`x`": "canale:`x`",
"Deleted or invalid channel": "Canale cancellato o invalido", "Deleted or invalid channel": "Canale eliminato o non valido",
"This channel does not exist.": "Canale inesistente.", "This channel does not exist.": "Questo canale non esiste.",
"Could not get channel info.": "Impossibile ottenere le informazioni del canale.", "Could not get channel info.": "Impossibile ottenere le informazioni del canale.",
"Could not fetch comments": "Impossibile recuperare i commenti", "Could not fetch comments": "Impossibile recuperare i commenti",
"View `x` replies": "Visualizza `x` risposte", "View `x` replies": {
"([^.,0-9]|^)1([^.,0-9]|$)": "Visualizza `x` risposta",
"": "Visualizza `x` risposte"
},
"`x` ago": "`x` fa", "`x` ago": "`x` fa",
"Load more": "Carica altro", "Load more": "Carica altro",
"`x` points": "`x` punti", "`x` points": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` punto",
"": "`x` punti"
},
"Could not create mix.": "Impossibile creare il mix.", "Could not create mix.": "Impossibile creare il mix.",
"Empty playlist": "Playlist vuota", "Empty playlist": "Playlist vuota",
"Not a playlist.": "Playlist invalida.", "Not a playlist.": "Non è una playlist.",
"Playlist does not exist.": "Playlist inesistente.", "Playlist does not exist.": "La playlist non esiste.",
"Could not pull trending pages.": "Impossibile recuperare le tendenze.", "Could not pull trending pages.": "Impossibile recuperare le tendenze.",
"Hidden field \"challenge\" is a required field": "Il campo nascosto \"challenge\" è obbligatorio", "Hidden field \"challenge\" is a required field": "Il campo nascosto \"challenge\" è obbligatorio",
"Hidden field \"token\" is a required field": "Il campo nascosto \"token\" è obbligatorio", "Hidden field \"token\" is a required field": "Il campo nascosto \"token\" è obbligatorio",
"Erroneous challenge": "Campo \"challenge\" invalido", "Erroneous challenge": "Campo \"challenge\" non valido",
"Erroneous token": "Campo \"token\" invalido", "Erroneous token": "Campo \"token\" non valido",
"No such user": "Utente invalido", "No such user": "Utente non valido",
"Token is expired, please try again": "Token scaduto, riprova", "Token is expired, please try again": "Gettone scaduto, riprova",
"English": "Inglese", "English": "Inglese",
"English (auto-generated)": "Inglese (generati automaticamente)", "English (auto-generated)": "Inglese (generati automaticamente)",
"Afrikaans": "Afrikaans", "Afrikaans": "Afrikaans",
@@ -285,20 +325,41 @@
"Yiddish": "Yiddish", "Yiddish": "Yiddish",
"Yoruba": "Yoruba", "Yoruba": "Yoruba",
"Zulu": "Zulu", "Zulu": "Zulu",
"`x` years": "`x` anni", "`x` years": {
"`x` months": "`x` mesi", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` anno",
"`x` weeks": "`x` settimane", "": "`x` anni"
"`x` days": "`x` giorni", },
"`x` hours": "`x` ore", "`x` months": {
"`x` minutes": "`x` minuti", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` mese",
"`x` seconds": "`x` secondi", "": "`x` mesi"
},
"`x` weeks": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` settimana",
"": "`x` settimane"
},
"`x` days": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` giorno",
"": "`x` giorni"
},
"`x` hours": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` ora",
"": "`x` ore"
},
"`x` minutes": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` minuto",
"": "`x` minuti"
},
"`x` seconds": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` secondo",
"": "`x` secondi"
},
"Fallback comments: ": "Commenti alternativi: ", "Fallback comments: ": "Commenti alternativi: ",
"Popular": "Popolare", "Popular": "Popolare",
"Top": "Top", "Top": "Top",
"About": "A proposito", "About": "Al riguardo",
"Rating: ": "Punteggio: ", "Rating: ": "Punteggio: ",
"Language: ": "Lingua: ", "Language: ": "Lingua: ",
"View as playlist": "", "View as playlist": "Vedi come playlist",
"Default": "Predefinito", "Default": "Predefinito",
"Music": "Musica", "Music": "Musica",
"Gaming": "Videogiochi", "Gaming": "Videogiochi",
@@ -313,8 +374,8 @@
"`x` marked it with a ❤": "`x` l'ha contrassegnato con un ❤", "`x` marked it with a ❤": "`x` l'ha contrassegnato con un ❤",
"Audio mode": "Modalità audio", "Audio mode": "Modalità audio",
"Video mode": "Modalità video", "Video mode": "Modalità video",
"Videos": "", "Videos": "Video",
"Playlists": "", "Playlists": "Playlist",
"Community": "", "Community": "Comunità",
"Current version: ": "" "Current version: ": "Versione attuale: "
} }

387
locales/ja.json Normal file
View File

@@ -0,0 +1,387 @@
{
"`x` subscribers": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` 人の登録者",
"": "`x` 人の登録者"
},
"`x` videos": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` 個の動画",
"": "`x` 個の動画"
},
"`x` playlists": {
"(\\D|^)1(\\D|$)": "`x` 個の再生リスト",
"": "`x` 個の再生リスト"
},
"LIVE": "ライブ",
"Shared `x` ago": "`x`前に共有",
"Unsubscribe": "登録解除",
"Subscribe": "登録",
"View channel on YouTube": "YouTube でチャンネルを見る",
"View playlist on YouTube": "YouTube で再生リストを見る",
"newest": "新しい順",
"oldest": "古い順",
"popular": "人気順",
"last": "追加順",
"Next page": "次のページ",
"Previous page": "前のページ",
"Clear watch history?": "再生履歴を削除しますか?",
"New password": "新しいパスワード",
"New passwords must match": "新しいパスワードが一致していません",
"Cannot change password for Google accounts": "Google アカウントのパスワードは変更できません",
"Authorize token?": "トークンを認証しますか?",
"Authorize token for `x`?": "トークン `x` を認証しますか?",
"Yes": "はい",
"No": "いいえ",
"Import and Export Data": "データのインポートとエクスポート",
"Import": "インポート",
"Import Invidious data": "Invidious データをインポート",
"Import YouTube subscriptions": "YouTube 登録チャンネルをインポート",
"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": "YouTube の代わりとなる新しいフロントエンド",
"JavaScript license information": "JavaScript ライセンス情報",
"source": "ソース",
"Log in": "ログイン",
"Log in/register": "ログイン/登録",
"Log in with Google": "Google でログイン",
"User ID": "ユーザー ID",
"Password": "パスワード",
"Time (h:mm:ss):": "時間 (時:分分:秒秒):",
"Text CAPTCHA": "テキスト CAPTCHA",
"Image CAPTCHA": "画像 CAPTCHA",
"Sign In": "サインイン",
"Register": "登録",
"E-mail": "メールアドレス",
"Google verification code": "Google 認証コード",
"Preferences": "設定",
"Player preferences": "プレイヤー設定",
"Always loop: ": "常にループ: ",
"Autoplay: ": "自動再生: ",
"Play next by default: ": "デフォルトで次を再生: ",
"Autoplay next video: ": "次の動画を自動再生: ",
"Listen by default: ": "デフォルトでオーディオモードを使用: ",
"Proxy videos: ": "動画をプロキシーに通す: ",
"Default speed: ": "デフォルトの再生速度: ",
"Preferred video quality: ": "優先する画質: ",
"Player volume: ": "プレイヤーの音量: ",
"Default comments: ": "デフォルトのコメント: ",
"youtube": "youtube",
"reddit": "reddit",
"Default captions: ": "デフォルトの字幕: ",
"Fallback captions: ": "フォールバック時の字幕: ",
"Show related videos: ": "関連動画を表示: ",
"Show annotations by default: ": "デフォルトでアノテーションを表示: ",
"Visual preferences": "外観設定",
"Player style: ": "プレイヤースタイル: ",
"Dark mode: ": "ダークモード: ",
"Theme: ": "テーマ: ",
"dark": "ダーク",
"light": "ライト",
"Thin mode: ": "最小モード: ",
"Subscription preferences": "登録チャンネル設定",
"Show annotations by default for subscribed channels: ": "デフォルトで登録チャンネルのアノテーションを表示しますか? ",
"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): ": "通知のみを表示 (ある場合): ",
"Enable web notifications": "ウェブ通知を有効化",
"`x` uploaded a video": "`x` が動画を投稿しました",
"`x` is live": "`x` がライブ中です",
"Data preferences": "データ設定",
"Clear watch history": "再生履歴の削除",
"Import/export data": "データのインポート/エクスポート",
"Change password": "パスワードを変更",
"Manage subscriptions": "登録チャンネルを管理",
"Manage tokens": "トークンを管理",
"Watch history": "再生履歴",
"Delete account": "アカウントを削除",
"Administrator preferences": "管理者設定",
"Default homepage: ": "デフォルトのホーム: ",
"Feed menu: ": "フィードメニュー: ",
"Top enabled: ": "Top enabled: ",
"CAPTCHA enabled: ": "CAPTCHA を有効化: ",
"Login enabled: ": "ログインを有効化: ",
"Registration enabled: ": "登録を有効化: ",
"Report statistics: ": "統計を報告: ",
"Save preferences": "設定を保存",
"Subscription manager": "登録チャンネルマネージャー",
"Token manager": "トークンマネージャー",
"Token": "トークン",
"`x` subscriptions": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` 個の登録チャンネル",
"": "`x` 個の登録チャンネル"
},
"`x` tokens": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` 個のトークン",
"": "`x` 個のトークン"
},
"Import/export": "インポート/エクスポート",
"unsubscribe": "登録解除",
"revoke": "revoke",
"Subscriptions": "登録チャンネル",
"`x` unseen notifications": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` 個の未読通知",
"": "`x` 個の未読通知"
},
"search": "検索",
"Log out": "ログアウト",
"Released under the AGPLv3 by Omar Roth.": "Omar Roth によって AGPLv3 でリリースされています。",
"Source available here.": "ソースはここで閲覧可能です。",
"View JavaScript license information.": "JavaScript ライセンス情報を見る。",
"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` を編集中",
"Watch on YouTube": "YouTube で視聴",
"Hide annotations": "アノテーションを隠す",
"Show annotations": "アノテーションを表示",
"Genre: ": "ジャンル: ",
"License: ": "ライセンス: ",
"Family friendly? ": "家族向け? ",
"Wilson score: ": "ウィルソンスコア: ",
"Engagement: ": "エンゲージメント: ",
"Whitelisted regions: ": "ホワイトリストの地域: ",
"Blacklisted regions: ": "ブラックリストの地域: ",
"Shared `x`": "`x`に共有",
"`x` views": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` 回視聴",
"": "`x` 回視聴"
},
"Premieres in `x`": "Premieres in `x`",
"Premieres `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.": "やあ!君は JavaScript を無効にしているのかな?ここをクリックしてコメントを見れるけど、読み込みには少し時間がかかることがあるのを覚えておいてね。",
"View YouTube comments": "YouTube のコメントを見る",
"View more comments on Reddit": "Reddit でコメントをもっと見る",
"View `x` comments": {
"(\\D|^)1(\\D|$)": "`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.": "ログインできませんでした。2段階認証 (認証アプリまたは SMS) が有効になっていることを確認してください。",
"Invalid TFA code": "TFA (2段階認証) コードが無効です",
"Login failed. This may be because two-factor authentication is not turned on for your account.": "ログインに失敗しました。あなたのアカウントで2段階認証が有効になっていない可能性があります。",
"Wrong answer": "回答が間違っています",
"Erroneous CAPTCHA": "CAPTCHA が間違っています",
"CAPTCHA is a required field": "CAPTCHA は必須項目です",
"User ID is a required field": "ユーザー ID は必須項目です",
"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`": "`x` の Invidious プライベートフィード",
"channel:`x`": "チャンネル:`x`",
"Deleted or invalid channel": "削除済みまたは無効なチャンネルです",
"This channel does not exist.": "このチャンネルは存在していません",
"Could not get channel info.": "チャンネル情報を取得できませんでした。",
"Could not fetch comments": "コメントを取得できませんでした",
"View `x` replies": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` 件の返信を見る",
"": "`x` 件の返信を見る"
},
"`x` ago": "`x`前",
"Load more": "もっと読み込む",
"`x` points": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` ポイント",
"": "`x` ポイント"
},
"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": "非表示項目 \"challenge\" は必須項目です",
"Hidden field \"token\" is a required field": "非表示項目 \"token\" は必須項目です",
"Erroneous challenge": "チャレンジが間違っています",
"Erroneous token": "トークンが間違っています",
"No such user": "ユーザーが存在しません",
"Token is expired, please try again": "トークンが期限切れです。再度試してください",
"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": "ズール語",
"`x` years": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x`年",
"": "`x`年"
},
"`x` months": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x`月",
"": "`x`月"
},
"`x` weeks": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x`週",
"": "`x`週"
},
"`x` days": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x`日",
"": "`x`日"
},
"`x` hours": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x`時間",
"": "`x`時間"
},
"`x` minutes": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x`分",
"": "`x`分"
},
"`x` seconds": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x`秒",
"": "`x`秒"
},
"Fallback comments: ": "フォールバック時のコメント: ",
"Popular": "人気",
"Top": "トップ",
"About": "このサービスについて",
"Rating: ": "評価: ",
"Language: ": "言語: ",
"View as playlist": "再生リストで見る",
"Default": "デフォルト",
"Music": "音楽",
"Gaming": "ゲーム",
"News": "ニュース",
"Movies": "映画",
"Download": "ダウンロード",
"Download as: ": "ダウンロード: ",
"%A %B %-d, %Y": "%Y %B %-d %A",
"(edited)": "(編集済み)",
"YouTube comment permalink": "YouTube コメントのパーマリンク",
"permalink": "パーマリンク",
"`x` marked it with a ❤": "`x` が❤を込めてマークしました",
"Audio mode": "オーディオモード",
"Video mode": "ビデオモード",
"Videos": "動画",
"Playlists": "プレイリスト",
"Community": "コミュニティ",
"Current version: ": "現在のバージョン: "
}

View File

@@ -1,6 +1,7 @@
{ {
"`x` subscribers": "`x` abonnenter", "`x` subscribers": "`x` abonnenter",
"`x` videos": "`x` videoer", "`x` videos": "`x` videoer",
"`x` playlists": "",
"LIVE": "SANNTIDSVISNING", "LIVE": "SANNTIDSVISNING",
"Shared `x` ago": "Delt for `x` siden", "Shared `x` ago": "Delt for `x` siden",
"Unsubscribe": "Opphev abonnement", "Unsubscribe": "Opphev abonnement",
@@ -56,7 +57,7 @@
"Play next by default: ": "Spill neste som forvalg: ", "Play next by default: ": "Spill neste som forvalg: ",
"Autoplay next video: ": "Autospill neste video: ", "Autoplay next video: ": "Autospill neste video: ",
"Listen by default: ": "Lytt som forvalg: ", "Listen by default: ": "Lytt som forvalg: ",
"Proxy videos? ": "Mellomtjen videoer? ", "Proxy videos: ": "Mellomtjen videoer? ",
"Default speed: ": "Forvalgt hastighet: ", "Default speed: ": "Forvalgt hastighet: ",
"Preferred video quality: ": "Foretrukket videokvalitet: ", "Preferred video quality: ": "Foretrukket videokvalitet: ",
"Player volume: ": "Avspillerlydstyrke: ", "Player volume: ": "Avspillerlydstyrke: ",
@@ -65,13 +66,17 @@
"reddit": "Reddit", "reddit": "Reddit",
"Default captions: ": "Forvalgte undertitler: ", "Default captions: ": "Forvalgte undertitler: ",
"Fallback captions: ": "Tilbakefallsundertitler: ", "Fallback captions: ": "Tilbakefallsundertitler: ",
"Show related videos? ": "Vis relaterte videoer? ", "Show related videos: ": "Vis relaterte videoer? ",
"Show annotations by default? ": "Vis merknader som forvalg? ", "Show annotations by default: ": "Vis merknader som forvalg? ",
"Visual preferences": "Visuelle innstillinger", "Visual preferences": "Visuelle innstillinger",
"Player style: ": "Avspillerstil: ",
"Dark mode: ": "Mørk drakt: ", "Dark mode: ": "Mørk drakt: ",
"Theme: ": "Drakt: ",
"dark": "Mørk",
"light": "Lys",
"Thin mode: ": "Tynt modus: ", "Thin mode: ": "Tynt modus: ",
"Subscription preferences": "Abonnementsinnstillinger", "Subscription preferences": "Abonnementsinnstillinger",
"Show annotations by default for subscribed channels? ": "Vis merknader som forvalg for kanaler det abonneres på? ", "Show annotations by default for subscribed channels: ": "Vis merknader som forvalg for kanaler det abonneres på? ",
"Redirect homepage to feed: ": "Videresend hjemmeside til flyt: ", "Redirect homepage to feed: ": "Videresend hjemmeside til flyt: ",
"Number of videos shown in feed: ": "Antall videoer å vise i flyt: ", "Number of videos shown in feed: ": "Antall videoer å vise i flyt: ",
"Sort videos by: ": "Sorter videoer etter: ", "Sort videos by: ": "Sorter videoer etter: ",
@@ -99,11 +104,11 @@
"Administrator preferences": "Administratorinnstillinger", "Administrator preferences": "Administratorinnstillinger",
"Default homepage: ": "Forvalgt hjemmeside: ", "Default homepage: ": "Forvalgt hjemmeside: ",
"Feed menu: ": "Flyt-meny: ", "Feed menu: ": "Flyt-meny: ",
"Top enabled? ": "Topp påskrudd? ", "Top enabled: ": "Topp påskrudd? ",
"CAPTCHA enabled? ": "CAPTCHA påskrudd? ", "CAPTCHA enabled: ": "CAPTCHA påskrudd? ",
"Login enabled? ": "Innlogging påskrudd? ", "Login enabled: ": "Innlogging påskrudd? ",
"Registration enabled? ": "Registrering påskrudd? ", "Registration enabled: ": "Registrering påskrudd? ",
"Report statistics? ": "Innrapporter statistikk? ", "Report statistics: ": "Innrapporter statistikk? ",
"Save preferences": "Lagre innstillinger", "Save preferences": "Lagre innstillinger",
"Subscription manager": "Abonnementsbehandler", "Subscription manager": "Abonnementsbehandler",
"Token manager": "Symbolbehandler", "Token manager": "Symbolbehandler",
@@ -122,7 +127,17 @@
"View JavaScript license information.": "Vis JavaScript-lisensinfo.", "View JavaScript license information.": "Vis JavaScript-lisensinfo.",
"View privacy policy.": "Vis personvernspraksis.", "View privacy policy.": "Vis personvernspraksis.",
"Trending": "Trendsettende", "Trending": "Trendsettende",
"Public": "",
"Unlisted": "Ulistet", "Unlisted": "Ulistet",
"Private": "",
"View all playlists": "",
"Updated `x` ago": "",
"Delete playlist `x`?": "",
"Delete playlist": "",
"Create playlist": "",
"Title": "",
"Playlist privacy": "",
"Editing playlist `x`": "",
"Watch on YouTube": "Vis video på YouTube", "Watch on YouTube": "Vis video på YouTube",
"Hide annotations": "Skjul merknader", "Hide annotations": "Skjul merknader",
"Show annotations": "Vis merknader", "Show annotations": "Vis merknader",
@@ -136,7 +151,7 @@
"Shared `x`": "Delt `x`", "Shared `x`": "Delt `x`",
"`x` views": "`x` visninger", "`x` views": "`x` visninger",
"Premieres in `x`": "Premiere om `x`", "Premieres in `x`": "Premiere om `x`",
"Premieres `x`": "", "Premieres `x`": "Première `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.": "Hei. Det ser ut til at du har JavaScript avslått. Klikk her for å vise kommentarer, ha i minnet at innlasting tar lengre tid.", "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.": "Hei. Det ser ut til at du har JavaScript avslått. Klikk her for å vise kommentarer, ha i minnet at innlasting tar lengre tid.",
"View YouTube comments": "Vis YouTube-kommentarer", "View YouTube comments": "Vis YouTube-kommentarer",
"View more comments on Reddit": "Vis flere kommenterer på Reddit", "View more comments on Reddit": "Vis flere kommenterer på Reddit",
@@ -316,6 +331,6 @@
"Video mode": "Video-modus", "Video mode": "Video-modus",
"Videos": "Videoer", "Videos": "Videoer",
"Playlists": "Spillelister", "Playlists": "Spillelister",
"Community": "", "Community": "Gemenskap",
"Current version: ": "Nåværende versjon: " "Current version: ": "Nåværende versjon: "
} }

View File

@@ -1,6 +1,7 @@
{ {
"`x` subscribers": "`x` abonnees", "`x` subscribers": "`x` abonnees",
"`x` videos": "`x` video's", "`x` videos": "`x` video's",
"`x` playlists": "",
"LIVE": "LIVE", "LIVE": "LIVE",
"Shared `x` ago": "Gedeeld: `x` geleden", "Shared `x` ago": "Gedeeld: `x` geleden",
"Unsubscribe": "Deabonneren", "Unsubscribe": "Deabonneren",
@@ -56,7 +57,7 @@
"Play next by default: ": "Standaard volgende video afspelen: ", "Play next by default: ": "Standaard volgende video afspelen: ",
"Autoplay next video: ": "Volgende video automatisch afspelen: ", "Autoplay next video: ": "Volgende video automatisch afspelen: ",
"Listen by default: ": "Standaard luisteren: ", "Listen by default: ": "Standaard luisteren: ",
"Proxy videos? ": "Video's afspelen via proxy? ", "Proxy videos: ": "Video's afspelen via proxy? ",
"Default speed: ": "Standaard afspeelsnelheid: ", "Default speed: ": "Standaard afspeelsnelheid: ",
"Preferred video quality: ": "Voorkeurskwaliteit: ", "Preferred video quality: ": "Voorkeurskwaliteit: ",
"Player volume: ": "Spelervolume: ", "Player volume: ": "Spelervolume: ",
@@ -65,13 +66,17 @@
"reddit": "Reddit", "reddit": "Reddit",
"Default captions: ": "Standaard ondertiteling: ", "Default captions: ": "Standaard ondertiteling: ",
"Fallback captions: ": "Alternatieve ondertiteling: ", "Fallback captions: ": "Alternatieve ondertiteling: ",
"Show related videos? ": "Gerelateerde video's tonen? ", "Show related videos: ": "Gerelateerde video's tonen? ",
"Show annotations by default? ": "Standaard annotaties tonen? ", "Show annotations by default: ": "Standaard annotaties tonen? ",
"Visual preferences": "Visuele instellingen", "Visual preferences": "Visuele instellingen",
"Player style: ": "",
"Dark mode: ": "Donkere modus: ", "Dark mode: ": "Donkere modus: ",
"Theme: ": "",
"dark": "",
"light": "",
"Thin mode: ": "Smalle modus: ", "Thin mode: ": "Smalle modus: ",
"Subscription preferences": "Abonnementsinstellingen", "Subscription preferences": "Abonnementsinstellingen",
"Show annotations by default for subscribed channels? ": "Standaard annotaties tonen voor geabonneerde kanalen? ", "Show annotations by default for subscribed channels: ": "Standaard annotaties tonen voor geabonneerde kanalen? ",
"Redirect homepage to feed: ": "Startpagina omleiden naar feed: ", "Redirect homepage to feed: ": "Startpagina omleiden naar feed: ",
"Number of videos shown in feed: ": "Aantal te tonen video's in feed: ", "Number of videos shown in feed: ": "Aantal te tonen video's in feed: ",
"Sort videos by: ": "Video's sorteren op: ", "Sort videos by: ": "Video's sorteren op: ",
@@ -99,11 +104,11 @@
"Administrator preferences": "Beheerdersinstellingen", "Administrator preferences": "Beheerdersinstellingen",
"Default homepage: ": "Standaard startpagina: ", "Default homepage: ": "Standaard startpagina: ",
"Feed menu: ": "Feedmenu:", "Feed menu: ": "Feedmenu:",
"Top enabled? ": "Bovenkant inschakelen? ", "Top enabled: ": "Bovenkant inschakelen? ",
"CAPTCHA enabled? ": "CAPTCHA gebruiken? ", "CAPTCHA enabled: ": "CAPTCHA gebruiken? ",
"Login enabled? ": "Inloggen toestaan? ", "Login enabled: ": "Inloggen toestaan? ",
"Registration enabled? ": "Registratie toestaan? ", "Registration enabled: ": "Registratie toestaan? ",
"Report statistics? ": "Statistieken bijhouden? ", "Report statistics: ": "Statistieken bijhouden? ",
"Save preferences": "Instellingen opslaan", "Save preferences": "Instellingen opslaan",
"Subscription manager": "Abonnementen beheren", "Subscription manager": "Abonnementen beheren",
"Token manager": "Toegangssleutels beheren", "Token manager": "Toegangssleutels beheren",
@@ -122,7 +127,17 @@
"View JavaScript license information.": "JavaScript-licentieinformatie tonen.", "View JavaScript license information.": "JavaScript-licentieinformatie tonen.",
"View privacy policy.": "Privacybeleid tonen", "View privacy policy.": "Privacybeleid tonen",
"Trending": "Uitgelicht", "Trending": "Uitgelicht",
"Public": "",
"Unlisted": "Verborgen", "Unlisted": "Verborgen",
"Private": "",
"View all playlists": "",
"Updated `x` ago": "",
"Delete playlist `x`?": "",
"Delete playlist": "",
"Create playlist": "",
"Title": "",
"Playlist privacy": "",
"Editing playlist `x`": "",
"Watch on YouTube": "Video bekijken op YouTube", "Watch on YouTube": "Video bekijken op YouTube",
"Hide annotations": "Annotaties verbergen", "Hide annotations": "Annotaties verbergen",
"Show annotations": "Annotaties tonen", "Show annotations": "Annotaties tonen",

View File

@@ -1,6 +1,7 @@
{ {
"`x` subscribers": "`x` subskrybcji", "`x` subscribers": "`x` subskrybcji",
"`x` videos": "`x` filmów", "`x` videos": "`x` filmów",
"`x` playlists": "",
"LIVE": "NA ŻYWO", "LIVE": "NA ŻYWO",
"Shared `x` ago": "Udostępniono `x` temu", "Shared `x` ago": "Udostępniono `x` temu",
"Unsubscribe": "Odsubskrybuj", "Unsubscribe": "Odsubskrybuj",
@@ -56,7 +57,7 @@
"Play next by default: ": "", "Play next by default: ": "",
"Autoplay next video: ": "Odtwórz następny film: ", "Autoplay next video: ": "Odtwórz następny film: ",
"Listen by default: ": "Tryb dźwiękowy: ", "Listen by default: ": "Tryb dźwiękowy: ",
"Proxy videos? ": "Filmy przez proxy? ", "Proxy videos: ": "Filmy przez proxy? ",
"Default speed: ": "Domyślna prędkość: ", "Default speed: ": "Domyślna prędkość: ",
"Preferred video quality: ": "Preferowana jakość filmów: ", "Preferred video quality: ": "Preferowana jakość filmów: ",
"Player volume: ": "Głośność odtwarzacza: ", "Player volume: ": "Głośność odtwarzacza: ",
@@ -65,13 +66,17 @@
"reddit": "", "reddit": "",
"Default captions: ": "Domyślne napisy: ", "Default captions: ": "Domyślne napisy: ",
"Fallback captions: ": "Zastępcze napisy: ", "Fallback captions: ": "Zastępcze napisy: ",
"Show related videos? ": "Pokaż powiązane filmy? ", "Show related videos: ": "Pokaż powiązane filmy? ",
"Show annotations by default? ": "", "Show annotations by default: ": "",
"Visual preferences": "Preferencje Wizualne", "Visual preferences": "Preferencje Wizualne",
"Player style: ": "",
"Dark mode: ": "Ciemny motyw: ", "Dark mode: ": "Ciemny motyw: ",
"Theme: ": "",
"dark": "",
"light": "",
"Thin mode: ": "Tryb minimalny: ", "Thin mode: ": "Tryb minimalny: ",
"Subscription preferences": "Preferencje subskrybcji", "Subscription preferences": "Preferencje subskrybcji",
"Show annotations by default for subscribed channels? ": "", "Show annotations by default for subscribed channels: ": "",
"Redirect homepage to feed: ": "Przekieruj stronę główną do subskrybcji: ", "Redirect homepage to feed: ": "Przekieruj stronę główną do subskrybcji: ",
"Number of videos shown in feed: ": "Liczba filmów widoczna na stronie subskrybcji: ", "Number of videos shown in feed: ": "Liczba filmów widoczna na stronie subskrybcji: ",
"Sort videos by: ": "Sortuj filmy: ", "Sort videos by: ": "Sortuj filmy: ",
@@ -99,11 +104,11 @@
"Administrator preferences": "Preferencje administratora", "Administrator preferences": "Preferencje administratora",
"Default homepage: ": "Domyślna strona główna: ", "Default homepage: ": "Domyślna strona główna: ",
"Feed menu: ": "", "Feed menu: ": "",
"Top enabled? ": "", "Top enabled: ": "",
"CAPTCHA enabled? ": "CAPTCHA aktywna? ", "CAPTCHA enabled: ": "CAPTCHA aktywna? ",
"Login enabled? ": "Logowanie włączone? ", "Login enabled: ": "Logowanie włączone? ",
"Registration enabled? ": "Rejestracja włączona? ", "Registration enabled: ": "Rejestracja włączona? ",
"Report statistics? ": "Raportować statystyki? ", "Report statistics: ": "Raportować statystyki? ",
"Save preferences": "Zapisz preferencje", "Save preferences": "Zapisz preferencje",
"Subscription manager": "Manager subskrybcji", "Subscription manager": "Manager subskrybcji",
"Token manager": "", "Token manager": "",
@@ -122,7 +127,17 @@
"View JavaScript license information.": "Wyświetl informację o licencji JavaScript.", "View JavaScript license information.": "Wyświetl informację o licencji JavaScript.",
"View privacy policy.": "Polityka prywatności.", "View privacy policy.": "Polityka prywatności.",
"Trending": "Na czasie", "Trending": "Na czasie",
"Public": "",
"Unlisted": "", "Unlisted": "",
"Private": "",
"View all playlists": "",
"Updated `x` ago": "",
"Delete playlist `x`?": "",
"Delete playlist": "",
"Create playlist": "",
"Title": "",
"Playlist privacy": "",
"Editing playlist `x`": "",
"Watch on YouTube": "Zobacz film na YouTube", "Watch on YouTube": "Zobacz film na YouTube",
"Hide annotations": "", "Hide annotations": "",
"Show annotations": "", "Show annotations": "",

View File

@@ -1,6 +1,7 @@
{ {
"`x` subscribers": "`x` подписчиков", "`x` subscribers": "`x` подписчиков",
"`x` videos": "`x` видео", "`x` videos": "`x` видео",
"`x` playlists": "",
"LIVE": "ПРЯМОЙ ЭФИР", "LIVE": "ПРЯМОЙ ЭФИР",
"Shared `x` ago": "Опубликовано `x` назад", "Shared `x` ago": "Опубликовано `x` назад",
"Unsubscribe": "Отписаться", "Unsubscribe": "Отписаться",
@@ -56,7 +57,7 @@
"Play next by default: ": "Всегда включать следующее видео? ", "Play next by default: ": "Всегда включать следующее видео? ",
"Autoplay next video: ": "Автопроигрывание следующего видео: ", "Autoplay next video: ": "Автопроигрывание следующего видео: ",
"Listen by default: ": "Режим «только аудио» по умолчанию: ", "Listen by default: ": "Режим «только аудио» по умолчанию: ",
"Proxy videos? ": "Проигрывать видео через прокси? ", "Proxy videos: ": "Проигрывать видео через прокси? ",
"Default speed: ": "Скорость видео по умолчанию: ", "Default speed: ": "Скорость видео по умолчанию: ",
"Preferred video quality: ": "Предпочтительное качество видео: ", "Preferred video quality: ": "Предпочтительное качество видео: ",
"Player volume: ": "Громкость видео: ", "Player volume: ": "Громкость видео: ",
@@ -65,13 +66,17 @@
"reddit": "Reddit", "reddit": "Reddit",
"Default captions: ": "Основной язык субтитров: ", "Default captions: ": "Основной язык субтитров: ",
"Fallback captions: ": "Дополнительный язык субтитров: ", "Fallback captions: ": "Дополнительный язык субтитров: ",
"Show related videos? ": "Показывать похожие видео? ", "Show related videos: ": "Показывать похожие видео? ",
"Show annotations by default? ": "Всегда показывать аннотации? ", "Show annotations by default: ": "Всегда показывать аннотации? ",
"Visual preferences": "Настройки сайта", "Visual preferences": "Настройки сайта",
"Player style: ": "",
"Dark mode: ": "Тёмное оформление: ", "Dark mode: ": "Тёмное оформление: ",
"Theme: ": "",
"dark": "",
"light": "",
"Thin mode: ": "Облегчённое оформление: ", "Thin mode: ": "Облегчённое оформление: ",
"Subscription preferences": "Настройки подписок", "Subscription preferences": "Настройки подписок",
"Show annotations by default for subscribed channels? ": "Всегда показывать аннотации в видео каналов, на которые вы подписаны? ", "Show annotations by default for subscribed channels: ": "Всегда показывать аннотации в видео каналов, на которые вы подписаны? ",
"Redirect homepage to feed: ": "Отображать видео с каналов, на которые вы подписаны, как главную страницу: ", "Redirect homepage to feed: ": "Отображать видео с каналов, на которые вы подписаны, как главную страницу: ",
"Number of videos shown in feed: ": "Число видео, на которые вы подписаны, в ленте: ", "Number of videos shown in feed: ": "Число видео, на которые вы подписаны, в ленте: ",
"Sort videos by: ": "Сортировать видео: ", "Sort videos by: ": "Сортировать видео: ",
@@ -99,11 +104,11 @@
"Administrator preferences": "Администраторские настройки", "Administrator preferences": "Администраторские настройки",
"Default homepage: ": "Главная страница по умолчанию: ", "Default homepage: ": "Главная страница по умолчанию: ",
"Feed menu: ": "Меню ленты видео: ", "Feed menu: ": "Меню ленты видео: ",
"Top enabled? ": "Включить топ видео? ", "Top enabled: ": "Включить топ видео? ",
"CAPTCHA enabled? ": "Включить капчу? ", "CAPTCHA enabled: ": "Включить капчу? ",
"Login enabled? ": "Включить авторизацию? ", "Login enabled: ": "Включить авторизацию? ",
"Registration enabled? ": "Включить регистрацию? ", "Registration enabled: ": "Включить регистрацию? ",
"Report statistics? ": "Сообщать статистику? ", "Report statistics: ": "Сообщать статистику? ",
"Save preferences": "Сохранить настройки", "Save preferences": "Сохранить настройки",
"Subscription manager": "Менеджер подписок", "Subscription manager": "Менеджер подписок",
"Token manager": "Менеджер токенов", "Token manager": "Менеджер токенов",
@@ -122,7 +127,17 @@
"View JavaScript license information.": "Посмотреть информацию по лицензии JavaScript.", "View JavaScript license information.": "Посмотреть информацию по лицензии JavaScript.",
"View privacy policy.": "Посмотреть политику конфиденциальности.", "View privacy policy.": "Посмотреть политику конфиденциальности.",
"Trending": "В тренде", "Trending": "В тренде",
"Public": "",
"Unlisted": "Нет в списке", "Unlisted": "Нет в списке",
"Private": "",
"View all playlists": "",
"Updated `x` ago": "",
"Delete playlist `x`?": "",
"Delete playlist": "",
"Create playlist": "",
"Title": "",
"Playlist privacy": "",
"Editing playlist `x`": "",
"Watch on YouTube": "Смотреть на YouTube", "Watch on YouTube": "Смотреть на YouTube",
"Hide annotations": "Скрыть аннотации", "Hide annotations": "Скрыть аннотации",
"Show annotations": "Показать аннотации", "Show annotations": "Показать аннотации",

344
locales/tr.json Normal file
View File

@@ -0,0 +1,344 @@
{
"`x` subscribers": "",
"`x` videos": "",
"`x` playlists": "",
"`x` subscribers.": "`x` abone.",
"`x` videos.": "`x` video.",
"LIVE": "CANLI",
"Shared `x` ago": "`x` önce paylaşıldı",
"Unsubscribe": "Abonelikten çık",
"Subscribe": "Abone ol",
"View channel on YouTube": "Kanalı YouTube'da görüntüle",
"View playlist on YouTube": "Çalma listesini YouTube'da görüntüle",
"newest": "en yeni",
"oldest": "en eski",
"popular": "popüler",
"last": "son",
"Next page": "Sonraki sayfa",
"Previous page": "Önceki sayfa",
"Clear watch history?": "İzleme geçmisini temizle?",
"New password": "Yeni parola",
"New passwords must match": "Yeni parolalar eşleşmek zorunda",
"Cannot change password for Google accounts": "Google hesapları için parola değiştirilemez",
"Authorize token?": "Jetonu yetkilendir?",
"Authorize token for `x`?": "`x` için jetonu yetkilendir?",
"Yes": "Evet",
"No": "Hayır",
"Import and Export Data": "Verileri İçe ve Dışa Aktar",
"Import": "İçe aktar",
"Import Invidious data": "İnvidious verilerini içe aktar",
"Import YouTube subscriptions": "YouTube aboneliklerini içe aktar",
"Import FreeTube subscriptions (.db)": "FreeTube aboneliklerini içe aktar (.db)",
"Import NewPipe subscriptions (.json)": "NewPipe aboneliklerini içe aktar (.json)",
"Import NewPipe data (.zip)": "NewPipe verilerini içe aktar (.zip)",
"Export": "Dışa aktar",
"Export subscriptions as OPML": "Abonelikleri OPML olarak dışa aktar",
"Export subscriptions as OPML (for NewPipe & FreeTube)": "Abonelikleri OPML olarak dışa aktar (NewPipe ve FreeTube için)",
"Export data as JSON": "Verileri JSON olarak dışa aktar",
"Delete account?": "Hesabı sil?",
"History": "Geçmiş",
"An alternative front-end to YouTube": "YouTube için alternatif bir ön-yüz",
"JavaScript license information": "JavaScript lisans bilgileri",
"source": "kaynak",
"Log in": "Oturum aç",
"Log in/register": "Oturum aç/kayıt ol",
"Log in with Google": "Google ile oturum aç",
"User ID": "Kullanıcı kimliği",
"Password": "Parola",
"Time (h:mm:ss):": "Zaman (h:mm:ss):",
"Text CAPTCHA": "Metin CAPTCHA",
"Image CAPTCHA": "Resim CAPTCHA",
"Sign In": "Oturum Aç",
"Register": "Kayıt Ol",
"E-mail": "E-posta",
"Google verification code": "Google doğrulama kodu",
"Preferences": "Tercihler",
"Player preferences": "Oynatıcı tercihleri",
"Always loop: ": "Sürekli döngü: ",
"Autoplay: ": "Otomatik oynat: ",
"Play next by default: ": "Varsayılan olarak sonrakini oynat: ",
"Autoplay next video: ": "Sonraki videoyu otomatik oynat: ",
"Listen by default: ": "Varsayılan olarak dinle: ",
"Proxy videos: ": "Videoları proxy'le: ",
"Default speed: ": "Varsayılan hız: ",
"Preferred video quality: ": "Tercih edilen video kalitesi: ",
"Player volume: ": "Oynatıcı ses seviyesi: ",
"Default comments: ": "Varsayılan yorumlar: ",
"youtube": "youtube",
"reddit": "reddit",
"Default captions: ": "Varsayılan altyazılar: ",
"Fallback captions: ": "Yedek altyazılar: ",
"Show related videos: ": "İlgili videoları göster: ",
"Show annotations by default: ": "Varsayılan olarak ek açıklamaları göster: ",
"Visual preferences": "Görsel tercihler",
"Player style: ": "Oynatıcı biçimi: ",
"Dark mode: ": "Karanlık mod: ",
"Theme: ": "Tema: ",
"dark": "karanlık",
"light": "aydınlık",
"Thin mode: ": "İnce mod: ",
"Subscription preferences": "Abonelik tercihleri",
"Show annotations by default for subscribed channels: ": "Abone olunan kanallar için ek açıklamaları varsayılan olarak göster: ",
"Redirect homepage to feed: ": "Ana sayfayı akışa yönlendir: ",
"Number of videos shown in feed: ": "Akışta gösterilen video sayısı: ",
"Sort videos by: ": "Videoları sıralama kriteri: ",
"published": "yayınlandı",
"published - reverse": "yayınlandı - ters",
"alphabetically": "alfabetik olarak",
"alphabetically - reverse": "alfabetik olarak - ters",
"channel name": "kanal adı",
"channel name - reverse": "kanal adı - ters",
"Only show latest video from channel: ": "Sadece kanaldaki en son videoyu göster: ",
"Only show latest unwatched video from channel: ": "Sadece kanaldaki en son izlenmemiş videoyu göster: ",
"Only show unwatched: ": "Sadece izlenmemişleri göster: ",
"Only show notifications (if there are any): ": "Sadece bildirimleri göster (eğer varsa): ",
"Enable web notifications": "Ağ bildirimlerini etkinleştir",
"`x` uploaded a video": "`x` bir video yükledi",
"`x` is live": "`x` canlı yayında",
"Data preferences": "Veri tercihleri",
"Clear watch history": "İzleme geçmişini temizle",
"Import/export data": "Verileri içe/dışa aktar",
"Change password": "Parolayı değiştir",
"Manage subscriptions": "Abonelikleri yönet",
"Manage tokens": "Jetonları yönet",
"Watch history": "İzleme geçmişi",
"Delete account": "Hesap silme",
"Administrator preferences": "Yönetici tercihleri",
"Default homepage: ": "Varsayılan ana sayfa: ",
"Feed menu: ": "Akış menüsü: ",
"Top enabled: ": "Top etkin: ",
"CAPTCHA enabled: ": "CAPTCHA etkin: ",
"Login enabled: ": "Oturum açma etkin: ",
"Registration enabled: ": "Kayıt olma etkin: ",
"Report statistics: ": "Rapor istatistikleri: ",
"Save preferences": "Tercihleri kaydet",
"Subscription manager": "Abonelik yöneticisi",
"`x` subscriptions": "",
"`x` tokens": "",
"Token manager": "Jeton yöneticisi",
"Token": "Jeton",
"`x` subscriptions.": "`x` abonelik.",
"`x` tokens.": "`x` jeton.",
"`x` unseen notifications": "",
"Import/export": "İçe/dışa aktar",
"unsubscribe": "abonelikten çık",
"revoke": "geri al",
"Subscriptions": "Abonelikler",
"`x` unseen notifications.": "`x` okunmamış bildirim.",
"search": "ara",
"Log out": ıkış yap",
"Public": "",
"Released under the AGPLv3 by Omar Roth.": "Omar Roth tarafından AGPLv3 altında yayımlandı.",
"Private": "",
"View all playlists": "",
"Updated `x` ago": "",
"Delete playlist `x`?": "",
"Delete playlist": "",
"Create playlist": "",
"Title": "",
"Playlist privacy": "",
"Editing playlist `x`": "",
"Source available here.": "Kaynak kodu burada mevcut.",
"View JavaScript license information.": "JavaScript lisans bilgilerini görüntüle.",
"View privacy policy.": "Gizlilik politikasını görüntüle.",
"Trending": "Trendler",
"Unlisted": "Listelenmemiş",
"Watch on YouTube": "YouTube'da izle",
"Hide annotations": "Ek açıklamaları gizle",
"Show annotations": "Ek açıklamaları göster",
"Genre: ": "Tür: ",
"License: ": "Lisans: ",
"Family friendly? ": "Aile için uygun? ",
"`x` views": "",
"Wilson score: ": "Wilson puanı: ",
"Engagement: ": "İzleyenlerin oy verme oranı: ",
"Whitelisted regions: ": "Beyaz listeye alınan bölgeler: ",
"Blacklisted regions: ": "Kara listeye alınan bölgeler: ",
"Shared `x`": "`x` paylaşıldı",
"`x` views.": "`x` izlenme.",
"Premieres in `x`": "`x`içinde ilk gösterim",
"Premieres `x`": "`x` ilk gösterim",
"Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.": "Merhaba! JavaScript'i kapatmış gibi görünüyorsun. Yorumları görüntülemek için buraya tıkla, yüklenmelerinin biraz uzun sürebileceğini unutma.",
"View YouTube comments": "YouTube yorumlarını görüntüle",
"View more comments on Reddit": "Reddit'te daha fazla yorum görüntüle",
"View `x` comments": "`x` yorum görüntüle",
"View Reddit comments": "Reddit yorumlarını görüntüle",
"Hide replies": "Cevapları gizle",
"Show replies": "Cevapları göster",
"Incorrect password": "Yanlış parola",
"Quota exceeded, try again in a few hours": "Kota aşıldı, birkaç saat içinde tekrar deneyin",
"Unable to log in, make sure two-factor authentication (Authenticator or SMS) is turned on.": "Oturum açılamadı, iki faktörlü kimlik doğrulamanın (Authenticator ya da SMS) açık olduğundan emin olun.",
"Invalid TFA code": "Geçersiz TFA kodu",
"Login failed. This may be because two-factor authentication is not turned on for your account.": "Giriş başarısız. Bunun nedeni, hesabınız için iki faktörlü kimlik doğrulamanın açık olmaması olabilir.",
"Wrong answer": "Yanlış cevap",
"Erroneous CAPTCHA": "Hatalı CAPTCHA",
"CAPTCHA is a required field": "CAPTCHA zorunlu bir alandır",
"User ID is a required field": "Kullanıcı kimliği zorunlu bir alandır",
"Password is a required field": "Parola zorunlu bir alandır",
"Wrong username or password": "Yanlış kullanıcı adı ya da parola",
"Please sign in using 'Log in with Google'": "Lütfen 'Google ile giriş yap' seçeneğini kullanarak oturum açın",
"Password cannot be empty": "Parola boş olamaz",
"Password cannot be longer than 55 characters": "Parola 55 karakterden uzun olamaz",
"Please log in": "Lütfen oturum açın",
"View `x` replies": "",
"Invidious Private Feed for `x`": "`x` için İnvidious Özel Akışı",
"channel:`x`": "kanal:`x`",
"`x` points": "",
"Deleted or invalid channel": "Silinmiş ya da geçersiz kanal",
"This channel does not exist.": "Bu kanal mevcut değil.",
"Could not get channel info.": "Kanal bilgisi alınamadı.",
"Could not fetch comments": "Yorumlar alınamadı",
"View `x` replies.": "`x` yanıtı görüntüle.",
"`x` ago": "`x` önce",
"Load more": "Daha fazla yükle",
"`x` points.": "`x` puan.",
"Could not create mix.": "Mix oluşturulamadı.",
"Empty playlist": "Boş oynatma listesi",
"Not a playlist.": "Oynatma listesi değil.",
"Playlist does not exist.": "Oynatma listesi mevcut değil.",
"Could not pull trending pages.": "Trend sayfaları alınamıyor.",
"Hidden field \"challenge\" is a required field": "Gizli alan \"challenge\" zorunlu bir alandır",
"Hidden field \"token\" is a required field": "Gizli alan \"jeton\" zorunlu bir alandır",
"Erroneous challenge": "Hatalı challenge",
"Erroneous token": "Hatalı jeton",
"No such user": "Böyle bir kullanıcı yok",
"Token is expired, please try again": "Jetonun süresi doldu, lütfen tekrar deneyin",
"English": "İngilizce",
"English (auto-generated)": "İngilizce (otomatik oluşturuldu)",
"Afrikaans": "Afrikanca",
"Albanian": "Arnavutça",
"Amharic": "Amharca",
"Arabic": "Arapça",
"Armenian": "Ermenice",
"Azerbaijani": "Azerice",
"Bangla": "Bengalce",
"Basque": "Baskça",
"Belarusian": "Belarusça",
"Bosnian": "Boşnakça",
"Bulgarian": "Bulgarca",
"Burmese": "Birmanca",
"Catalan": "Katalanca",
"Cebuano": "Sebuanca",
"Chinese (Simplified)": "Çince (Basitleştirilmiş)",
"Chinese (Traditional)": "Çince (Geleneksel)",
"Corsican": "Korsikaca",
"Croatian": "Hırvatça",
"Czech": "Çekçe",
"Danish": "Danca",
"Dutch": "Flemenkçe",
"Esperanto": "Esperanto",
"Estonian": "Estonca",
"Filipino": "Filipince",
"Finnish": "Fince",
"French": "Fransızca",
"Galician": "Galiçyaca",
"Georgian": "Gürcüce",
"German": "Almanca",
"Greek": "Yunanca",
"Gujarati": "Guceratça",
"Haitian Creole": "Haiti Creole dili",
"Hausa": "Hausaca",
"Hawaiian": "Hawaii dili",
"Hebrew": "İbranice",
"Hindi": "Hintçe",
"Hmong": "Hmong",
"Hungarian": "Macarca",
"Icelandic": "İzlandaca",
"Igbo": "İgbo",
"Indonesian": "Endonezce",
"Irish": "İrlandaca",
"Italian": "İtalyanca",
"Japanese": "Japonca",
"Javanese": "Cava dili",
"Kannada": "Kannada dili",
"Kazakh": "Kazakça",
"Khmer": "Kmerce",
"Korean": "Korece",
"Kurdish": "Kürtçe",
"Kyrgyz": "Kırgızca",
"Lao": "Laoca",
"Latin": "Latince",
"Latvian": "Letonca",
"Lithuanian": "Litvanyaca",
"Luxembourgish": "Lüksemburgca",
"Macedonian": "Makedonca",
"Malagasy": "Malgaşça",
"Malay": "Malayca",
"Malayalam": "Malayalam dili",
"Maltese": "Maltaca",
"Maori": "Maori dili",
"Marathi": "Marati dili",
"Mongolian": "Moğolca",
"Nepali": "Nepalce",
"Norwegian Bokmål": "Norveççe Bokmål",
"Nyanja": "Çevaca",
"Pashto": "Peştuca",
"Persian": "Farsça",
"Polish": "Lehçe",
"Portuguese": "Portekizce",
"Punjabi": "Pencap dili",
"Romanian": "Rumence",
"Russian": "Rusça",
"Samoan": "Samoa dili",
"Scottish Gaelic": "İskoç Galcesi",
"Serbian": "Sırpça",
"Shona": "Şona dili",
"Sindhi": "Sintçe",
"Sinhala": "Seylanca",
"Slovak": "Slovakça",
"Slovenian": "Slovence",
"Somali": "Somalice",
"Southern Sotho": "Güney Sotho dili",
"Spanish": "İspanyolca",
"Spanish (Latin America)": "İspanyolca (Latin Amerika)",
"Sundanese": "Sundaca",
"Swahili": "Svahili dili",
"Swedish": "İsveççe",
"Tajik": "Tacikçe",
"Tamil": "Tamilce",
"Telugu": "Telugu dili",
"Thai": "Tayca",
"Turkish": "Türkçe",
"Ukrainian": "Ukraynaca",
"Urdu": "Urduca",
"Uzbek": "Özbekçe",
"Vietnamese": "Vietnamca",
"Welsh": "Galce",
"Western Frisian": "Batı Frizcesi",
"Xhosa": "Xhosa dili",
"Yiddish": "Yiddiş",
"Yoruba": "Yoruba dili",
"Zulu": "Zuluca",
"`x` years": "`x` yıl",
"`x` months": "`x` ay",
"`x` weeks": "`x` hafta",
"`x` days": "`x` gün",
"`x` hours": "`x` saat",
"`x` minutes": "`x` dakika",
"`x` seconds": "`x` saniye",
"Fallback comments: ": "Yedek yorumlar: ",
"Popular": "Popüler",
"Top": "Enler",
"About": "Hakkında",
"Rating: ": "Değerlendirme: ",
"Language: ": "Dil: ",
"View as playlist": "Oynatma listesi olarak görüntüle",
"Default": "Varsayılan",
"Music": "Müzik",
"Gaming": "Oyun",
"News": "Haberler",
"Movies": "Filmler",
"Download": "İndir",
"Download as: ": "Şu şekilde indir: ",
"%A %B %-d, %Y": "%A %B %-d, %Y",
"(edited)": "(düzenlendi)",
"YouTube comment permalink": "YouTube yorumu kalıcı linki",
"permalink": "kalıcı link",
"`x` marked it with a ❤": "`x` ❤ ile işaretlendi",
"Audio mode": "Ses modu",
"Video mode": "Video modu",
"Videos": "Videolar",
"Playlists": "Oynatma listeleri",
"Community": "Topluluk",
"Current version: ": "Şu anki versiyon: "
}

View File

@@ -1,6 +1,7 @@
{ {
"`x` subscribers": "`x` підписників", "`x` subscribers": "`x` підписників",
"`x` videos": "`x` відео", "`x` videos": "`x` відео",
"`x` playlists": "",
"LIVE": "ПРЯМИЙ ЕФІР", "LIVE": "ПРЯМИЙ ЕФІР",
"Shared `x` ago": "Розміщено `x` назад", "Shared `x` ago": "Розміщено `x` назад",
"Unsubscribe": "Відписатися", "Unsubscribe": "Відписатися",
@@ -56,7 +57,7 @@
"Play next by default: ": "Завжди вмикати наступне відео: ", "Play next by default: ": "Завжди вмикати наступне відео: ",
"Autoplay next video: ": "Автовідтворення наступного відео: ", "Autoplay next video: ": "Автовідтворення наступного відео: ",
"Listen by default: ": "Режим «тільки звук» як усталений: ", "Listen by default: ": "Режим «тільки звук» як усталений: ",
"Proxy videos? ": "Програвати відео через проксі? ", "Proxy videos: ": "Програвати відео через проксі? ",
"Default speed: ": "Усталена швидкість відео: ", "Default speed: ": "Усталена швидкість відео: ",
"Preferred video quality: ": "Пріорітетна якість відео: ", "Preferred video quality: ": "Пріорітетна якість відео: ",
"Player volume: ": "Гучність відео: ", "Player volume: ": "Гучність відео: ",
@@ -65,13 +66,17 @@
"reddit": "Reddit", "reddit": "Reddit",
"Default captions: ": "Основна мова субтитрів: ", "Default captions: ": "Основна мова субтитрів: ",
"Fallback captions: ": "Запасна мова субтитрів: ", "Fallback captions: ": "Запасна мова субтитрів: ",
"Show related videos? ": "Показувати схожі відео? ", "Show related videos: ": "Показувати схожі відео? ",
"Show annotations by default? ": "Завжди показувати анотації? ", "Show annotations by default: ": "Завжди показувати анотації? ",
"Visual preferences": "Налаштування сайту", "Visual preferences": "Налаштування сайту",
"Player style: ": "",
"Dark mode: ": "Темне оформлення: ", "Dark mode: ": "Темне оформлення: ",
"Theme: ": "",
"dark": "",
"light": "",
"Thin mode: ": "Полегшене оформлення: ", "Thin mode: ": "Полегшене оформлення: ",
"Subscription preferences": "Налаштування підписок", "Subscription preferences": "Налаштування підписок",
"Show annotations by default for subscribed channels? ": "Завжди показувати анотації у відео каналів, на які ви підписані? ", "Show annotations by default for subscribed channels: ": "Завжди показувати анотації у відео каналів, на які ви підписані? ",
"Redirect homepage to feed: ": "Показувати відео з каналів, на які підписані, як головну сторінку: ", "Redirect homepage to feed: ": "Показувати відео з каналів, на які підписані, як головну сторінку: ",
"Number of videos shown in feed: ": "Кількість відео з каналів, на які підписані, у потоці: ", "Number of videos shown in feed: ": "Кількість відео з каналів, на які підписані, у потоці: ",
"Sort videos by: ": "Сортувати відео: ", "Sort videos by: ": "Сортувати відео: ",
@@ -99,11 +104,11 @@
"Administrator preferences": "Адміністраторські налаштування", "Administrator preferences": "Адміністраторські налаштування",
"Default homepage: ": "Усталена домашня сторінка: ", "Default homepage: ": "Усталена домашня сторінка: ",
"Feed menu: ": "Меню потоку з відео: ", "Feed menu: ": "Меню потоку з відео: ",
"Top enabled? ": "Увімкнути топ відео? ", "Top enabled: ": "Увімкнути топ відео? ",
"CAPTCHA enabled? ": "Увімкнути капчу? ", "CAPTCHA enabled: ": "Увімкнути капчу? ",
"Login enabled? ": "Увімкнути авторизацію? ", "Login enabled: ": "Увімкнути авторизацію? ",
"Registration enabled? ": "Увімкнути реєстрацію? ", "Registration enabled: ": "Увімкнути реєстрацію? ",
"Report statistics? ": "Повідомляти статистику? ", "Report statistics: ": "Повідомляти статистику? ",
"Save preferences": "Зберегти налаштування", "Save preferences": "Зберегти налаштування",
"Subscription manager": "Менеджер підписок", "Subscription manager": "Менеджер підписок",
"Token manager": "Менеджер токенів", "Token manager": "Менеджер токенів",
@@ -122,7 +127,17 @@
"View JavaScript license information.": "Переглянути інформацію щодо ліцензії JavaScript.", "View JavaScript license information.": "Переглянути інформацію щодо ліцензії JavaScript.",
"View privacy policy.": "Переглянути політику приватності.", "View privacy policy.": "Переглянути політику приватності.",
"Trending": "У тренді", "Trending": "У тренді",
"Public": "",
"Unlisted": "Немає в списку", "Unlisted": "Немає в списку",
"Private": "",
"View all playlists": "",
"Updated `x` ago": "",
"Delete playlist `x`?": "",
"Delete playlist": "",
"Create playlist": "",
"Title": "",
"Playlist privacy": "",
"Editing playlist `x`": "",
"Watch on YouTube": "Дивитися на YouTube", "Watch on YouTube": "Дивитися на YouTube",
"Hide annotations": "Приховати анотації", "Hide annotations": "Приховати анотації",
"Show annotations": "Показати анотації", "Show annotations": "Показати анотації",

View File

@@ -1,6 +1,7 @@
{ {
"`x` subscribers": "`x` 订阅者", "`x` subscribers": "`x` 订阅者",
"`x` videos": "`x` 视频", "`x` videos": "`x` 视频",
"`x` playlists": "",
"LIVE": "直播", "LIVE": "直播",
"Shared `x` ago": "`x` 前分享", "Shared `x` ago": "`x` 前分享",
"Unsubscribe": "取消订阅", "Unsubscribe": "取消订阅",
@@ -56,7 +57,7 @@
"Play next by default: ": "默认自动播放下一个视频:", "Play next by default: ": "默认自动播放下一个视频:",
"Autoplay next video: ": "自动播放下一个视频:", "Autoplay next video: ": "自动播放下一个视频:",
"Listen by default: ": "默认只聆听声音:", "Listen by default: ": "默认只聆听声音:",
"Proxy videos? ": "代理视频?", "Proxy videos: ": "代理视频?",
"Default speed: ": "默认速度:", "Default speed: ": "默认速度:",
"Preferred video quality: ": "视频质量偏好:", "Preferred video quality: ": "视频质量偏好:",
"Player volume: ": "播放器音量:", "Player volume: ": "播放器音量:",
@@ -65,13 +66,17 @@
"reddit": "Reddit", "reddit": "Reddit",
"Default captions: ": "默认字幕语言:", "Default captions: ": "默认字幕语言:",
"Fallback captions: ": "后备字幕语言:", "Fallback captions: ": "后备字幕语言:",
"Show related videos? ": "显示相关视频?", "Show related videos: ": "显示相关视频?",
"Show annotations by default? ": "默认显示视频注释?", "Show annotations by default: ": "默认显示视频注释?",
"Visual preferences": "视觉选项", "Visual preferences": "视觉选项",
"Player style: ": "",
"Dark mode: ": "暗色模式:", "Dark mode: ": "暗色模式:",
"Theme: ": "",
"dark": "",
"light": "",
"Thin mode: ": "窄页模式:", "Thin mode: ": "窄页模式:",
"Subscription preferences": "订阅设置", "Subscription preferences": "订阅设置",
"Show annotations by default for subscribed channels? ": "在订阅频道的视频默认显示注释?", "Show annotations by default for subscribed channels: ": "在订阅频道的视频默认显示注释?",
"Redirect homepage to feed: ": "跳转主页到 feed: ", "Redirect homepage to feed: ": "跳转主页到 feed: ",
"Number of videos shown in feed: ": "Feed 中显示的视频数量:", "Number of videos shown in feed: ": "Feed 中显示的视频数量:",
"Sort videos by: ": "视频排序方式:", "Sort videos by: ": "视频排序方式:",
@@ -99,11 +104,11 @@
"Administrator preferences": "管理员选项", "Administrator preferences": "管理员选项",
"Default homepage: ": "默认主页:", "Default homepage: ": "默认主页:",
"Feed menu: ": "Feed 菜单:", "Feed menu: ": "Feed 菜单:",
"Top enabled? ": "启用“热门视频”页?", "Top enabled: ": "启用“热门视频”页?",
"CAPTCHA enabled? ": "启用验证码?", "CAPTCHA enabled: ": "启用验证码?",
"Login enabled? ": "启用登录?", "Login enabled: ": "启用登录?",
"Registration enabled? ": "启用注册?", "Registration enabled: ": "启用注册?",
"Report statistics? ": "报告统计信息?", "Report statistics: ": "报告统计信息?",
"Save preferences": "保存选项", "Save preferences": "保存选项",
"Subscription manager": "订阅管理器", "Subscription manager": "订阅管理器",
"Token manager": "令牌管理器", "Token manager": "令牌管理器",
@@ -122,7 +127,17 @@
"View JavaScript license information.": "查看 JavaScript 协议信息。", "View JavaScript license information.": "查看 JavaScript 协议信息。",
"View privacy policy.": "查看隐私政策。", "View privacy policy.": "查看隐私政策。",
"Trending": "时下流行", "Trending": "时下流行",
"Public": "",
"Unlisted": "不公开", "Unlisted": "不公开",
"Private": "",
"View all playlists": "",
"Updated `x` ago": "",
"Delete playlist `x`?": "",
"Delete playlist": "",
"Create playlist": "",
"Title": "",
"Playlist privacy": "",
"Editing playlist `x`": "",
"Watch on YouTube": "在 YouTube 观看", "Watch on YouTube": "在 YouTube 观看",
"Hide annotations": "隐藏注释", "Hide annotations": "隐藏注释",
"Show annotations": "显示注释", "Show annotations": "显示注释",

381
locales/zh-TW.json Normal file
View File

@@ -0,0 +1,381 @@
{
"`x` subscribers": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` 個訂閱者",
"": "`x` 個訂閱者"
},
"`x` videos": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` 部影片",
"": "`x` 部影片"
},
"`x` playlists": "",
"LIVE": "直播",
"Shared `x` ago": "`x` 前分享",
"Unsubscribe": "取消訂閱",
"Subscribe": "訂閱",
"View channel on YouTube": "在 YouTube 上檢視頻道",
"View playlist on YouTube": "在 YouTube 上檢視播放清單",
"newest": "最新",
"oldest": "最舊",
"popular": "流行",
"last": "上一個",
"Next page": "下一頁",
"Previous page": "上一頁",
"Clear watch history?": "清除觀看歷史?",
"New password": "新密碼",
"New passwords must match": "新密碼必須符合",
"Cannot change password for Google accounts": "無法變更 Google 帳號的密碼",
"Authorize token?": "授權 token",
"Authorize token for `x`?": "`x` 的授權 token",
"Yes": "是",
"No": "否",
"Import and Export Data": "匯入與匯出資料",
"Import": "匯入",
"Import Invidious data": "匯入 Invidious 資料",
"Import YouTube subscriptions": "匯入 YouTube 訂閱",
"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 匯出為 JSON",
"Delete account?": "刪除帳號?",
"History": "歷史",
"An alternative front-end to YouTube": "一個 YouTube 的替代前端",
"JavaScript license information": "JavaScript 授權條款資訊",
"source": "來源",
"Log in": "登入",
"Log in/register": "登入/註冊",
"Log in with Google": "使用 Google 登入",
"User ID": "使用者 ID",
"Password": "密碼",
"Time (h:mm:ss):": "時間 (h:mm:ss):",
"Text CAPTCHA": "文字 CAPTCHA",
"Image CAPTCHA": "圖片 CAPTCHA",
"Sign In": "登入",
"Register": "註冊",
"E-mail": "電子郵件",
"Google verification code": "Google 驗證碼",
"Preferences": "偏好設定",
"Player preferences": "播放器偏好設定",
"Always loop: ": "總是循環播放:",
"Autoplay: ": "自動播放:",
"Play next by default: ": "預設播放下一部:",
"Autoplay next video: ": "自動播放下一部影片:",
"Listen by default: ": "預設聆聽:",
"Proxy videos: ": "代理影片:",
"Default speed: ": "預設速度:",
"Preferred video quality: ": "偏好的影片畫質:",
"Player volume: ": "播放器音量:",
"Default comments: ": "預設留言:",
"youtube": "youtube",
"reddit": "reddit",
"Default captions: ": "預設字幕:",
"Fallback captions: ": "汰退字幕:",
"Show related videos: ": "顯示相關的影片:",
"Show annotations by default: ": "預設顯示註釋:",
"Visual preferences": "視覺偏好設定",
"Player style: ": "播放器樣式",
"Dark mode: ": "深色模式:",
"Theme: ": "佈景主題",
"dark": "深色",
"light": "淺色",
"Thin mode: ": "精簡模式:",
"Subscription preferences": "訂閱偏好設定",
"Show annotations by default for subscribed channels: ": "預設為已訂閱的頻道顯示註釋?",
"Redirect homepage to feed: ": "重新導向首頁至 feed",
"Number of videos shown in feed: ": "顯示在 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): ": "僅顯示通知(如果有的話):",
"Enable web notifications": "啟用網路通知",
"`x` uploaded a video": "`x` 上傳了一部影片",
"`x` is live": "`x` 正在直播",
"Data preferences": "資料偏好設定",
"Clear watch history": "清除觀看歷史",
"Import/export data": "匯入/匯出資料",
"Change password": "變更密碼",
"Manage subscriptions": "管理訂閱",
"Manage tokens": "管理 tokens",
"Watch history": "觀看歷史",
"Delete account": "刪除帳號",
"Administrator preferences": "管理員偏好設定",
"Default homepage: ": "預設首頁:",
"Feed menu: ": "Feed 選單:",
"Top enabled: ": "頂部啟用:",
"CAPTCHA enabled: ": "CAPTCHA 啟用:",
"Login enabled: ": "啟用登入?",
"Registration enabled: ": "啟用註冊?",
"Report statistics: ": "回報統計?",
"Save preferences": "儲存偏好設定",
"Subscription manager": "訂閱管理員",
"Token manager": "Token 管理員",
"Token": "Token",
"`x` subscriptions": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` 個訂閱",
"": "`x` 個訂閱"
},
"`x` tokens": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` token",
"": "`x` tokens"
},
"Import/export": "匯入/匯出",
"unsubscribe": "取消訂閱",
"revoke": "撤銷",
"Subscriptions": "訂閱",
"`x` unseen notifications": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` 個未讀的通知",
"": "`x` 個未讀的通知"
},
"search": "搜尋",
"Log out": "登出",
"Released under the AGPLv3 by Omar Roth.": "Omar Roth 以 AGPLv3 釋出。",
"Source available here.": "原始碼在此提供。",
"View JavaScript license information.": "檢視 JavaScript 授權條款資訊。",
"View privacy policy.": "檢視隱私權政策。",
"Trending": "趨勢",
"Public": "公開",
"Unlisted": "未列出",
"Private": "私人",
"View all playlists": "檢視所有播放清單",
"Updated `x` ago": "更新於 `x` 之前",
"Delete playlist `x`?": "刪除播放清單",
"Delete playlist": "刪除播放清單",
"Create playlist": "建立播放清單",
"Title": "標題",
"Playlist privacy": "播放清單隱私",
"Editing playlist `x`": "已編輯播放清單 `x`",
"Watch on YouTube": "在 YouTube 上觀看",
"Hide annotations": "隱藏註釋",
"Show annotations": "顯示註釋",
"Genre: ": "風格:",
"License: ": "授權條款:",
"Family friendly? ": "家庭友好?",
"Wilson score: ": "威爾遜分數:",
"Engagement: ": "參與度:",
"Whitelisted regions: ": "白名單區域:",
"Blacklisted regions: ": "黑名單區域:",
"Shared `x`": "`x` 發佈",
"`x` views": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` 次檢視",
"": "`x` 次檢視"
},
"Premieres in `x`": "首映於 `x`",
"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.": "嗨!看來您將 JavaScript 關閉了。點擊這裡以檢視留言,請注意,它們可能需要比較長的時間載入。",
"View YouTube comments": "檢視 YouTube 留言",
"View more comments on Reddit": "在 Reddit 上檢視更多留言",
"View `x` comments": "檢視 `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.": "無法登入,請確定雙因素驗證(驗證器或簡訊)已開啟。",
"Invalid TFA code": "無效的 TFA 代碼",
"Login failed. This may be because two-factor authentication is not turned on for your account.": "登入失敗。這可能是因為您的帳號未開啟雙因素驗證的關係。",
"Wrong answer": "錯誤的答案",
"Erroneous CAPTCHA": "錯誤的 CAPTCHA",
"CAPTCHA is a required field": "CAPTCHA 為必填欄位",
"User ID is a required field": "使用者 ID 為必填欄位",
"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`": "`x` 的 Invidious 私密 feed",
"channel:`x`": "頻道:`x`",
"Deleted or invalid channel": "已刪除或無效的頻道",
"This channel does not exist.": "此頻道不存在。",
"Could not get channel info.": "無法取得頻道資訊。",
"Could not fetch comments": "無法擷取留言",
"View `x` replies": {
"([^.,0-9]|^)1([^.,0-9]|$)": "檢視 `x` 則回覆",
"": "檢視 `x` 則回覆"
},
"`x` ago": "`x` 以前",
"Load more": "載入更多",
"`x` points": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` 點",
"": "`x` 點"
},
"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": "隱藏的欄位 \"challenge\" 是必填欄位",
"Hidden field \"token\" is a required field": "隱藏的欄位 \"token\" 是必填欄位",
"Erroneous challenge": "錯誤的 challenge",
"Erroneous token": "錯誤的 token",
"No such user": "無此使用者",
"Token is expired, please try again": "Token 已過期,請再試一次",
"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": "祖魯語",
"`x` years": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` 年",
"": "`x` 年"
},
"`x` months": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` 月",
"": "`x` 月"
},
"`x` weeks": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` 週",
"": "`x` 週"
},
"`x` days": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` 天",
"": "`x` 天"
},
"`x` hours": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` 小時",
"": "`x` 小時"
},
"`x` minutes": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` 天",
"": "`x` 天"
},
"`x` seconds": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` 秒",
"": "`x` 秒"
},
"Fallback comments: ": "汰退留言:",
"Popular": "熱門頻道",
"Top": "熱門影片",
"About": "關於",
"Rating: ": "評分:",
"Language: ": "語言:",
"View as playlist": "以播放清單檢視",
"Default": "預設值",
"Music": "音樂",
"Gaming": "遊戲",
"News": "新聞",
"Movies": "電影",
"Download": "下載",
"Download as: ": "下載為:",
"%A %B %-d, %Y": "%A %B %-d, %Y",
"(edited)": "(已編輯)",
"YouTube comment permalink": "YouTube 留言永久連結",
"permalink": "",
"`x` marked it with a ❤": "`x` 為此標記 ❤",
"Audio mode": "音訊模式",
"Video mode": "視訊模式",
"Videos": "影片",
"Playlists": "播放清單",
"Community": "社群",
"Current version: ": "目前版本:"
}

View File

@@ -1,5 +1,5 @@
name: invidious name: invidious
version: 0.19.0 version: 0.20.1
authors: authors:
- Omar Roth <omarroth@protonmail.com> - Omar Roth <omarroth@protonmail.com>
@@ -11,11 +11,23 @@ targets:
dependencies: dependencies:
pg: pg:
github: will/crystal-pg github: will/crystal-pg
version: ~> 0.19.0
sqlite3: sqlite3:
github: crystal-lang/crystal-sqlite3 github: crystal-lang/crystal-sqlite3
version: ~> 0.14.0
kemal: kemal:
github: kemalcr/kemal github: kemalcr/kemal
version: ~> 0.26.0
pool:
github: ysbaddaden/pool
version: ~> 0.2.3
protodec:
github: omarroth/protodec
version: ~> 0.1.2
lsquic:
github: omarroth/lsquic.cr
version: ~> 0.1.3
crystal: 0.29.0 crystal: 0.31.1
license: AGPLv3 license: AGPLv3

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -41,13 +41,15 @@ struct ChannelVideo
end end
end end
def to_xml(locale, host_url, xml : XML::Builder) def to_xml(locale, host_url, query_params, xml : XML::Builder)
query_params["v"] = self.id
xml.element("entry") do xml.element("entry") do
xml.element("id") { xml.text "yt:video:#{self.id}" } xml.element("id") { xml.text "yt:video:#{self.id}" }
xml.element("yt:videoId") { xml.text self.id } xml.element("yt:videoId") { xml.text self.id }
xml.element("yt:channelId") { xml.text self.ucid } xml.element("yt:channelId") { xml.text self.ucid }
xml.element("title") { xml.text self.title } xml.element("title") { xml.text self.title }
xml.element("link", rel: "alternate", href: "#{host_url}/watch?v=#{self.id}") xml.element("link", rel: "alternate", href: "#{host_url}/watch?#{query_params}")
xml.element("author") do xml.element("author") do
xml.element("name") { xml.text self.author } xml.element("name") { xml.text self.author }
@@ -56,7 +58,7 @@ struct ChannelVideo
xml.element("content", type: "xhtml") do xml.element("content", type: "xhtml") do
xml.element("div", xmlns: "http://www.w3.org/1999/xhtml") do xml.element("div", xmlns: "http://www.w3.org/1999/xhtml") do
xml.element("a", href: "#{host_url}/watch?v=#{self.id}") do xml.element("a", href: "#{host_url}/watch?#{query_params}") do
xml.element("img", src: "#{host_url}/vi/#{self.id}/mqdefault.jpg") xml.element("img", src: "#{host_url}/vi/#{self.id}/mqdefault.jpg")
end end
end end
@@ -118,7 +120,7 @@ struct AboutChannel
description_html: String, description_html: String,
paid: Bool, paid: Bool,
total_views: Int64, total_views: Int64,
sub_count: Int64, sub_count: Int32,
joined: Time, joined: Time,
is_family_friendly: Bool, is_family_friendly: Bool,
allowed_regions: Array(String), allowed_regions: Array(String),
@@ -127,6 +129,13 @@ struct AboutChannel
}) })
end end
class ChannelRedirect < Exception
property channel_id : String
def initialize(@channel_id)
end
end
def get_batch_channels(channels, db, refresh = false, pull_all_videos = true, max_threads = 10) def get_batch_channels(channels, db, refresh = false, pull_all_videos = true, max_threads = 10)
finished_channel = Channel(String | Nil).new finished_channel = Channel(String | Nil).new
@@ -172,23 +181,21 @@ def get_channel(id, db, refresh = true, pull_all_videos = true)
args = arg_array(channel_array) args = arg_array(channel_array)
db.exec("INSERT INTO channels VALUES (#{args}) \ db.exec("INSERT INTO channels VALUES (#{args}) \
ON CONFLICT (id) DO UPDATE SET author = $2, updated = $3", channel_array) ON CONFLICT (id) DO UPDATE SET author = $2, updated = $3", args: channel_array)
end end
else else
channel = fetch_channel(id, db, pull_all_videos: pull_all_videos) channel = fetch_channel(id, db, pull_all_videos: pull_all_videos)
channel_array = channel.to_a channel_array = channel.to_a
args = arg_array(channel_array) args = arg_array(channel_array)
db.exec("INSERT INTO channels VALUES (#{args})", channel_array) db.exec("INSERT INTO channels VALUES (#{args})", args: channel_array)
end end
return channel return channel
end end
def fetch_channel(ucid, db, pull_all_videos = true, locale = nil) def fetch_channel(ucid, db, pull_all_videos = true, locale = nil)
client = make_client(YT_URL) rss = YT_POOL.client &.get("/feeds/videos.xml?channel_id=#{ucid}").body
rss = client.get("/feeds/videos.xml?channel_id=#{ucid}").body
rss = XML.parse_html(rss) rss = XML.parse_html(rss)
author = rss.xpath_node(%q(//feed/title)) author = rss.xpath_node(%q(//feed/title))
@@ -207,7 +214,7 @@ def fetch_channel(ucid, db, pull_all_videos = true, locale = nil)
page = 1 page = 1
url = produce_channel_videos_url(ucid, page, auto_generated: auto_generated) url = produce_channel_videos_url(ucid, page, auto_generated: auto_generated)
response = client.get(url) response = YT_POOL.client &.get(url)
json = JSON.parse(response.body) json = JSON.parse(response.body)
if json["content_html"]? && !json["content_html"].as_s.empty? if json["content_html"]? && !json["content_html"].as_s.empty?
@@ -268,13 +275,13 @@ def fetch_channel(ucid, db, pull_all_videos = true, locale = nil)
db.exec("INSERT INTO channel_videos VALUES (#{args}) \ db.exec("INSERT INTO channel_videos VALUES (#{args}) \
ON CONFLICT (id) DO UPDATE SET title = $2, published = $3, \ ON CONFLICT (id) DO UPDATE SET title = $2, published = $3, \
updated = $4, ucid = $5, author = $6, length_seconds = $7, \ updated = $4, ucid = $5, author = $6, length_seconds = $7, \
live_now = $8, views = $10", video_array) live_now = $8, views = $10", args: video_array)
# Update all users affected by insert # Update all users affected by insert
if emails.empty? if emails.empty?
values = "'{}'" values = "'{}'"
else else
values = "VALUES #{emails.map { |id| %(('#{id}')) }.join(",")}" values = "VALUES #{emails.map { |email| %((E'#{email.gsub({'\'' => "\\'", '\\' => "\\\\"})}')) }.join(",")}"
end end
db.exec("UPDATE users SET feed_needs_update = true WHERE email = ANY(#{values})") db.exec("UPDATE users SET feed_needs_update = true WHERE email = ANY(#{values})")
@@ -287,7 +294,7 @@ def fetch_channel(ucid, db, pull_all_videos = true, locale = nil)
loop do loop do
url = produce_channel_videos_url(ucid, page, auto_generated: auto_generated) url = produce_channel_videos_url(ucid, page, auto_generated: auto_generated)
response = client.get(url) response = YT_POOL.client &.get(url)
json = JSON.parse(response.body) json = JSON.parse(response.body)
if json["content_html"]? && !json["content_html"].as_s.empty? if json["content_html"]? && !json["content_html"].as_s.empty?
@@ -336,13 +343,13 @@ def fetch_channel(ucid, db, pull_all_videos = true, locale = nil)
db.exec("INSERT INTO channel_videos VALUES (#{args}) \ db.exec("INSERT INTO channel_videos VALUES (#{args}) \
ON CONFLICT (id) DO UPDATE SET title = $2, published = $3, \ ON CONFLICT (id) DO UPDATE SET title = $2, published = $3, \
updated = $4, ucid = $5, author = $6, length_seconds = $7, \ updated = $4, ucid = $5, author = $6, length_seconds = $7, \
live_now = $8, views = $10", video_array) live_now = $8, views = $10", args: video_array)
# Update all users affected by insert # Update all users affected by insert
if emails.empty? if emails.empty?
values = "'{}'" values = "'{}'"
else else
values = "VALUES #{emails.map { |id| %(('#{id}')) }.join(",")}" values = "VALUES #{emails.map { |email| %((E'#{email.gsub({'\'' => "\\'", '\\' => "\\\\"})}')) }.join(",")}"
end end
db.exec("UPDATE users SET feed_needs_update = true WHERE email = ANY(#{values})") db.exec("UPDATE users SET feed_needs_update = true WHERE email = ANY(#{values})")
@@ -366,34 +373,34 @@ def fetch_channel(ucid, db, pull_all_videos = true, locale = nil)
end end
def fetch_channel_playlists(ucid, author, auto_generated, continuation, sort_by) def fetch_channel_playlists(ucid, author, auto_generated, continuation, sort_by)
client = make_client(YT_URL)
if continuation if continuation
url = produce_channel_playlists_url(ucid, continuation, sort_by, auto_generated) url = produce_channel_playlists_url(ucid, continuation, sort_by, auto_generated)
response = client.get(url) response = YT_POOL.client &.get(url)
json = JSON.parse(response.body) json = JSON.parse(response.body)
if json["load_more_widget_html"].as_s.empty? if json["load_more_widget_html"].as_s.empty?
return [] of SearchItem, nil continuation = nil
end else
continuation = XML.parse_html(json["load_more_widget_html"].as_s)
continuation = continuation.xpath_node(%q(//button[@data-uix-load-more-href]))
continuation = XML.parse_html(json["load_more_widget_html"].as_s) if continuation
continuation = continuation.xpath_node(%q(//button[@data-uix-load-more-href])) continuation = extract_channel_playlists_cursor(continuation["data-uix-load-more-href"], auto_generated)
if continuation end
continuation = extract_channel_playlists_cursor(continuation["data-uix-load-more-href"], auto_generated)
end end
html = XML.parse_html(json["content_html"].as_s) html = XML.parse_html(json["content_html"].as_s)
nodeset = html.xpath_nodes(%q(//li[contains(@class, "feed-item-container")])) nodeset = html.xpath_nodes(%q(//li[contains(@class, "feed-item-container")]))
else elsif auto_generated
url = "/channel/#{ucid}/playlists?disable_polymer=1&flow=list" url = "/channel/#{ucid}"
if auto_generated response = YT_POOL.client &.get(url)
url += "&view=50" html = XML.parse_html(response.body)
else
url += "&view=1" nodeset = html.xpath_nodes(%q(//ul[@id="browse-items-primary"]/li[contains(@class, "feed-item-container")]))
end else
url = "/channel/#{ucid}/playlists?disable_polymer=1&flow=list&view=1"
case sort_by case sort_by
when "last", "last_added" when "last", "last_added"
@@ -404,7 +411,7 @@ def fetch_channel_playlists(ucid, author, auto_generated, continuation, sort_by)
url += "&sort=dd" url += "&sort=dd"
end end
response = client.get(url) response = YT_POOL.client &.get(url)
html = XML.parse_html(response.body) html = XML.parse_html(response.body)
continuation = html.xpath_node(%q(//button[@data-uix-load-more-href])) continuation = html.xpath_node(%q(//button[@data-uix-load-more-href]))
@@ -425,193 +432,110 @@ def fetch_channel_playlists(ucid, author, auto_generated, continuation, sort_by)
end end
def produce_channel_videos_url(ucid, page = 1, auto_generated = nil, sort_by = "newest") def produce_channel_videos_url(ucid, page = 1, auto_generated = nil, sort_by = "newest")
object = {
"80226972:embedded" => {
"2:string" => ucid,
"3:base64" => {
"2:string" => "videos",
"6:varint": 2_i64,
"7:varint": 1_i64,
"12:varint": 1_i64,
"13:string": "",
"23:varint": 0_i64,
},
},
}
if auto_generated if auto_generated
seed = Time.unix(1525757349) seed = Time.unix(1525757349)
until seed >= Time.utc until seed >= Time.utc
seed += 1.month seed += 1.month
end end
timestamp = seed - (page - 1).months timestamp = seed - (page - 1).months
page = "#{timestamp.to_unix}" object["80226972:embedded"]["3:base64"].as(Hash)["4:varint"] = 0x36_i64
switch = 0x36 object["80226972:embedded"]["3:base64"].as(Hash)["15:string"] = "#{timestamp.to_unix}"
else else
page = "#{page}" object["80226972:embedded"]["3:base64"].as(Hash)["4:varint"] = 0_i64
switch = 0x00 object["80226972:embedded"]["3:base64"].as(Hash)["15:string"] = "#{page}"
end end
meta = IO::Memory.new
meta.write(Bytes[0x12, 0x06])
meta.print("videos")
meta.write(Bytes[0x30, 0x02])
meta.write(Bytes[0x38, 0x01])
meta.write(Bytes[0x60, 0x01])
meta.write(Bytes[0x6a, 0x00])
meta.write(Bytes[0xb8, 0x01, 0x00])
meta.write(Bytes[0x20, switch])
meta.write(Bytes[0x7a, page.size])
meta.print(page)
case sort_by case sort_by
when "newest" when "newest"
# Empty tags can be omitted
# meta.write(Bytes[0x18,0x00])
when "popular" when "popular"
meta.write(Bytes[0x18, 0x01]) object["80226972:embedded"]["3:base64"].as(Hash)["3:varint"] = 0x01_i64
when "oldest" when "oldest"
meta.write(Bytes[0x18, 0x02]) object["80226972:embedded"]["3:base64"].as(Hash)["3:varint"] = 0x02_i64
end end
meta.rewind object["80226972:embedded"]["3:string"] = Base64.urlsafe_encode(Protodec::Any.from_json(Protodec::Any.cast_json(object["80226972:embedded"]["3:base64"])))
meta = Base64.urlsafe_encode(meta.to_slice) object["80226972:embedded"].delete("3:base64")
meta = URI.escape(meta)
continuation = IO::Memory.new continuation = object.try { |i| Protodec::Any.cast_json(object) }
continuation.write(Bytes[0x12, ucid.size]) .try { |i| Protodec::Any.from_json(i) }
continuation.print(ucid) .try { |i| Base64.urlsafe_encode(i) }
.try { |i| URI.encode_www_form(i) }
continuation.write(Bytes[0x1a, meta.size]) return "/browse_ajax?continuation=#{continuation}&gl=US&hl=en"
continuation.print(meta)
continuation.rewind
continuation = continuation.gets_to_end
wrapper = IO::Memory.new
wrapper.write(Bytes[0xe2, 0xa9, 0x85, 0xb2, 0x02, continuation.size])
wrapper.print(continuation)
wrapper.rewind
wrapper = Base64.urlsafe_encode(wrapper.to_slice)
wrapper = URI.escape(wrapper)
url = "/browse_ajax?continuation=#{wrapper}&gl=US&hl=en"
return url
end end
def produce_channel_playlists_url(ucid, cursor, sort = "newest", auto_generated = false) def produce_channel_playlists_url(ucid, cursor, sort = "newest", auto_generated = false)
object = {
"80226972:embedded" => {
"2:string" => ucid,
"3:base64" => {
"2:string" => "playlists",
"6:varint": 2_i64,
"7:varint": 1_i64,
"12:varint": 1_i64,
"13:string": "",
"23:varint": 0_i64,
},
},
}
if !auto_generated if !auto_generated
cursor = Base64.urlsafe_encode(cursor, false) cursor = Base64.urlsafe_encode(cursor, false)
end end
object["80226972:embedded"]["3:base64"].as(Hash)["15:string"] = cursor
meta = IO::Memory.new
if auto_generated if auto_generated
meta.write(Bytes[0x08, 0x0a]) object["80226972:embedded"]["3:base64"].as(Hash)["4:varint"] = 0x32_i64
end
meta.write(Bytes[0x12, 0x09])
meta.print("playlists")
if auto_generated
meta.write(Bytes[0x20, 0x32])
else else
# TODO: Look at 0x01, 0x00 object["80226972:embedded"]["3:base64"].as(Hash)["4:varint"] = 1_i64
case sort case sort
when "oldest", "oldest_created" when "oldest", "oldest_created"
meta.write(Bytes[0x18, 0x02]) object["80226972:embedded"]["3:base64"].as(Hash)["3:varint"] = 2_i64
when "newest", "newest_created" when "newest", "newest_created"
meta.write(Bytes[0x18, 0x03]) object["80226972:embedded"]["3:base64"].as(Hash)["3:varint"] = 3_i64
when "last", "last_added" when "last", "last_added"
meta.write(Bytes[0x18, 0x04]) object["80226972:embedded"]["3:base64"].as(Hash)["3:varint"] = 4_i64
end end
meta.write(Bytes[0x20, 0x01])
end end
meta.write(Bytes[0x30, 0x02]) object["80226972:embedded"]["3:string"] = Base64.urlsafe_encode(Protodec::Any.from_json(Protodec::Any.cast_json(object["80226972:embedded"]["3:base64"])))
meta.write(Bytes[0x38, 0x01]) object["80226972:embedded"].delete("3:base64")
meta.write(Bytes[0x60, 0x01])
meta.write(Bytes[0x6a, 0x00])
meta.write(Bytes[0x7a, cursor.size]) continuation = object.try { |i| Protodec::Any.cast_json(object) }
meta.print(cursor) .try { |i| Protodec::Any.from_json(i) }
.try { |i| Base64.urlsafe_encode(i) }
.try { |i| URI.encode_www_form(i) }
meta.write(Bytes[0xb8, 0x01, 0x00]) return "/browse_ajax?continuation=#{continuation}&gl=US&hl=en"
meta.rewind
meta = Base64.urlsafe_encode(meta.to_slice)
meta = URI.escape(meta)
continuation = IO::Memory.new
continuation.write(Bytes[0x12, ucid.size])
continuation.print(ucid)
continuation.write(Bytes[0x1a])
continuation.write(write_var_int(meta.size))
continuation.print(meta)
continuation.rewind
continuation = continuation.gets_to_end
wrapper = IO::Memory.new
wrapper.write(Bytes[0xe2, 0xa9, 0x85, 0xb2, 0x02])
wrapper.write(write_var_int(continuation.size))
wrapper.print(continuation)
wrapper.rewind
wrapper = Base64.urlsafe_encode(wrapper.to_slice)
wrapper = URI.escape(wrapper)
url = "/browse_ajax?continuation=#{wrapper}&gl=US&hl=en"
return url
end end
def extract_channel_playlists_cursor(url, auto_generated) def extract_channel_playlists_cursor(url, auto_generated)
wrapper = HTTP::Params.parse(URI.parse(url).query.not_nil!)["continuation"] cursor = URI.parse(url).query_params
.try { |i| URI.decode_www_form(i["continuation"]) }
wrapper = URI.unescape(wrapper) .try { |i| Base64.decode(i) }
wrapper = Base64.decode(wrapper) .try { |i| IO::Memory.new(i) }
.try { |i| Protodec::Any.parse(i) }
# 0xe2 0xa9 0x85 0xb2 0x02 .try { |i| i["80226972:0:embedded"]["3:1:base64"].as_h.find { |k, v| k.starts_with?("15:") } }
wrapper += 5 .try &.[1].as_s || ""
continuation_size = read_var_int(wrapper[0, 4])
wrapper += write_var_int(continuation_size).size
continuation = wrapper[0, continuation_size]
# 0x12
continuation += 1
ucid_size = continuation[0]
continuation += 1
ucid = continuation[0, ucid_size]
continuation += ucid_size
# 0x1a
continuation += 1
meta_size = read_var_int(continuation[0, 4])
continuation += write_var_int(meta_size).size
meta = continuation[0, meta_size]
continuation += meta_size
meta = String.new(meta)
meta = URI.unescape(meta)
meta = Base64.decode(meta)
# 0x12 0x09 playlists
meta += 11
until meta[0] == 0x7a
tag = read_var_int(meta[0, 4])
meta += write_var_int(tag).size
value = meta[0]
meta += 1
end
# 0x7a
meta += 1
cursor_size = meta[0]
meta += 1
cursor = meta[0, cursor_size]
cursor = String.new(cursor)
if !auto_generated if !auto_generated
cursor = URI.unescape(cursor) cursor = URI.decode_www_form(cursor)
cursor = Base64.decode_string(cursor) .try { |i| Base64.decode_string(i) }
end end
return cursor return cursor
@@ -619,13 +543,9 @@ end
# TODO: Add "sort_by" # TODO: Add "sort_by"
def fetch_channel_community(ucid, continuation, locale, config, kemal_config, format, thin_mode) def fetch_channel_community(ucid, continuation, locale, config, kemal_config, format, thin_mode)
client = make_client(YT_URL) response = YT_POOL.client &.get("/channel/#{ucid}/community?gl=US&hl=en")
headers = HTTP::Headers.new
headers["User-Agent"] = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
response = client.get("/channel/#{ucid}/community?gl=US&hl=en", headers)
if response.status_code == 404 if response.status_code == 404
response = client.get("/user/#{ucid}/community?gl=US&hl=en", headers) response = YT_POOL.client &.get("/user/#{ucid}/community?gl=US&hl=en")
end end
if response.status_code == 404 if response.status_code == 404
@@ -647,6 +567,7 @@ def fetch_channel_community(ucid, continuation, locale, config, kemal_config, fo
else else
continuation = produce_channel_community_continuation(ucid, continuation) continuation = produce_channel_community_continuation(ucid, continuation)
headers = HTTP::Headers.new
headers["cookie"] = response.cookies.add_request_headers(headers)["cookie"] headers["cookie"] = response.cookies.add_request_headers(headers)["cookie"]
headers["content-type"] = "application/x-www-form-urlencoded" headers["content-type"] = "application/x-www-form-urlencoded"
@@ -662,7 +583,7 @@ def fetch_channel_community(ucid, continuation, locale, config, kemal_config, fo
session_token: session_token, session_token: session_token,
} }
response = client.post("/comment_service_ajax?action_get_comments=1&ctoken=#{continuation}&continuation=#{continuation}&hl=en&gl=US", headers, form: post_req) response = YT_POOL.client &.post("/comment_service_ajax?action_get_comments=1&ctoken=#{continuation}&continuation=#{continuation}&hl=en&gl=US", headers, form: post_req)
body = JSON.parse(response.body) body = JSON.parse(response.body)
body = body["response"]["continuationContents"]["itemSectionContinuation"]? || body = body["response"]["continuationContents"]["itemSectionContinuation"]? ||
@@ -808,12 +729,13 @@ def fetch_channel_community(ucid, continuation, locale, config, kemal_config, fo
width = thumbnail["width"].as_i width = thumbnail["width"].as_i
height = thumbnail["height"].as_i height = thumbnail["height"].as_i
aspect_ratio = (width.to_f / height.to_f) aspect_ratio = (width.to_f / height.to_f)
url = thumbnail["url"].as_s.gsub(/=w\d+-h\d+(-p)?(-nd)?(-df)?(-rwa)?/, "=s640")
qualities = {320, 560, 640, 1280, 2000} qualities = {320, 560, 640, 1280, 2000}
qualities.each do |quality| qualities.each do |quality|
json.object do json.object do
json.field "url", thumbnail["url"].as_s.gsub("=s640-", "=s#{quality}-") json.field "url", url.gsub(/=s\d+/, "=s#{quality}")
json.field "width", quality json.field "width", quality
json.field "height", (quality / aspect_ratio).ceil.to_i json.field "height", (quality / aspect_ratio).ceil.to_i
end end
@@ -872,58 +794,53 @@ def fetch_channel_community(ucid, continuation, locale, config, kemal_config, fo
end end
def produce_channel_community_continuation(ucid, cursor) def produce_channel_community_continuation(ucid, cursor)
cursor = URI.escape(cursor) object = {
continuation = IO::Memory.new "80226972:embedded" => {
"2:string" => ucid,
"3:string" => cursor,
},
}
continuation.write(Bytes[0xe2, 0xa9, 0x85, 0xb2, 0x02]) continuation = object.try { |i| Protodec::Any.cast_json(object) }
continuation.write(write_var_int(3 + ucid.size + write_var_int(cursor.size).size + cursor.size)) .try { |i| Protodec::Any.from_json(i) }
.try { |i| Base64.urlsafe_encode(i) }
continuation.write(Bytes[0x12, ucid.size]) .try { |i| URI.encode_www_form(i) }
continuation.print(ucid)
continuation.write(Bytes[0x1a])
continuation.write(write_var_int(cursor.size))
continuation.print(cursor)
continuation.rewind
continuation = Base64.urlsafe_encode(continuation.to_slice)
continuation = URI.escape(continuation)
return continuation return continuation
end end
def extract_channel_community_cursor(continuation) def extract_channel_community_cursor(continuation)
continuation = URI.unescape(continuation) object = URI.decode_www_form(continuation)
continuation = Base64.decode(continuation) .try { |i| Base64.decode(i) }
.try { |i| IO::Memory.new(i) }
.try { |i| Protodec::Any.parse(i) }
.try { |i| i["80226972:0:embedded"]["3:1:base64"].as_h }
# 0xe2 0xa9 0x85 0xb2 0x02 if object["53:2:embedded"]?.try &.["3:0:embedded"]?
continuation += 5 object["53:2:embedded"]["3:0:embedded"]["2:0:string"] = object["53:2:embedded"]["3:0:embedded"]
.try { |i| i["2:0:base64"].as_h }
.try { |i| Protodec::Any.cast_json(i) }
.try { |i| Protodec::Any.from_json(i) }
.try { |i| Base64.urlsafe_encode(i, padding: false) }
total_size = read_var_int(continuation[0, 4]) object["53:2:embedded"]["3:0:embedded"].as_h.delete("2:0:base64")
continuation += write_var_int(total_size).size
# 0x12
continuation += 1
ucid_size = continuation[0]
continuation += 1
ucid = continuation[0, ucid_size]
continuation += ucid_size
# 0x1a
continuation += 1
until continuation[0] == 'E'.ord
continuation += 1
end end
return String.new(continuation) cursor = Protodec::Any.cast_json(object)
.try { |i| Protodec::Any.from_json(i) }
.try { |i| Base64.urlsafe_encode(i) }
cursor
end end
def get_about_info(ucid, locale) def get_about_info(ucid, locale)
client = make_client(YT_URL) about = YT_POOL.client &.get("/channel/#{ucid}/about?disable_polymer=1&gl=US&hl=en")
about = client.get("/channel/#{ucid}/about?disable_polymer=1&gl=US&hl=en")
if about.status_code == 404 if about.status_code == 404
about = client.get("/user/#{ucid}/about?disable_polymer=1&gl=US&hl=en") about = YT_POOL.client &.get("/user/#{ucid}/about?disable_polymer=1&gl=US&hl=en")
end
if md = about.headers["location"]?.try &.match(/\/channel\/(?<ucid>UC[a-zA-Z0-9_-]{22})/)
raise ChannelRedirect.new(channel_id: md["ucid"])
end end
about = XML.parse_html(about.body) about = XML.parse_html(about.body)
@@ -939,12 +856,6 @@ def get_about_info(ucid, locale)
raise error_message raise error_message
end end
sub_count = about.xpath_node(%q(//span[contains(text(), "subscribers")]))
if sub_count
sub_count = sub_count.content.delete(", subscribers").to_i?
end
sub_count ||= 0
author = about.xpath_node(%q(//span[contains(@class,"qualified-channel-title-text")]/a)).not_nil!.content author = about.xpath_node(%q(//span[contains(@class,"qualified-channel-title-text")]/a)).not_nil!.content
author_url = about.xpath_node(%q(//span[contains(@class,"qualified-channel-title-text")]/a)).not_nil!["href"] author_url = about.xpath_node(%q(//span[contains(@class,"qualified-channel-title-text")]/a)).not_nil!["href"]
author_thumbnail = about.xpath_node(%q(//img[@class="channel-header-profile-image"])).not_nil!["src"] author_thumbnail = about.xpath_node(%q(//img[@class="channel-header-profile-image"])).not_nil!["src"]
@@ -958,7 +869,8 @@ def get_about_info(ucid, locale)
banner = nil banner = nil
end end
description_html = about.xpath_node(%q(//div[contains(@class,"about-description")])).try &.to_s || "" description_html = about.xpath_node(%q(//div[contains(@class,"about-description")])).try &.to_s ||
%(<div class="about-description branded-page-box-padding"><pre></pre></div>)
paid = about.xpath_node(%q(//meta[@itemprop="paid"])).not_nil!["content"] == "True" paid = about.xpath_node(%q(//meta[@itemprop="paid"])).not_nil!["content"] == "True"
is_family_friendly = about.xpath_node(%q(//meta[@itemprop="isFamilyFriendly"])).not_nil!["content"] == "True" is_family_friendly = about.xpath_node(%q(//meta[@itemprop="isFamilyFriendly"])).not_nil!["content"] == "True"
@@ -987,21 +899,14 @@ def get_about_info(ucid, locale)
) )
end end
total_views = 0_i64 joined = about.xpath_node(%q(//span[contains(., "Joined")]))
sub_count = 0_i64 .try &.content.try { |text| Time.parse(text, "Joined %b %-d, %Y", Time::Location.local) } || Time.unix(0)
joined = Time.unix(0) total_views = about.xpath_node(%q(//span[contains(., "views")]/b))
metadata = about.xpath_nodes(%q(//span[@class="about-stat"])) .try &.content.try &.gsub(/\D/, "").to_i64? || 0_i64
metadata.each do |item|
case item.content sub_count = about.xpath_node(%q(.//span[contains(@class, "subscriber-count")]))
when .includes? "views" .try &.["title"].try { |text| short_text_to_number(text) } || 0
total_views = item.content.gsub(/\D/, "").to_i64
when .includes? "subscribers"
sub_count = item.content.delete("subscribers").gsub(/\D/, "").to_i64
when .includes? "Joined"
joined = Time.parse(item.content.lchop("Joined "), "%b %-d, %Y", Time::Location.local)
end
end
# Auto-generated channels # Auto-generated channels
# https://support.google.com/youtube/answer/2579942 # https://support.google.com/youtube/answer/2579942
@@ -1013,7 +918,7 @@ def get_about_info(ucid, locale)
tabs = about.xpath_nodes(%q(//ul[@id="channel-navigation-menu"]/li/a/span)).map { |node| node.content.downcase } tabs = about.xpath_nodes(%q(//ul[@id="channel-navigation-menu"]/li/a/span)).map { |node| node.content.downcase }
return AboutChannel.new( AboutChannel.new(
ucid: ucid, ucid: ucid,
author: author, author: author,
auto_generated: auto_generated, auto_generated: auto_generated,
@@ -1036,11 +941,9 @@ def get_60_videos(ucid, author, page, auto_generated, sort_by = "newest")
count = 0 count = 0
videos = [] of SearchVideo videos = [] of SearchVideo
client = make_client(YT_URL)
2.times do |i| 2.times do |i|
url = produce_channel_videos_url(ucid, page * 2 + (i - 1), auto_generated: auto_generated, sort_by: sort_by) url = produce_channel_videos_url(ucid, page * 2 + (i - 1), auto_generated: auto_generated, sort_by: sort_by)
response = client.get(url) response = YT_POOL.client &.get(url)
json = JSON.parse(response.body) json = JSON.parse(response.body)
if json["content_html"]? && !json["content_html"].as_s.empty? if json["content_html"]? && !json["content_html"].as_s.empty?
@@ -1065,11 +968,10 @@ def get_60_videos(ucid, author, page, auto_generated, sort_by = "newest")
end end
def get_latest_videos(ucid) def get_latest_videos(ucid)
client = make_client(YT_URL)
videos = [] of SearchVideo videos = [] of SearchVideo
url = produce_channel_videos_url(ucid, 0) url = produce_channel_videos_url(ucid, 0)
response = client.get(url) response = YT_POOL.client &.get(url)
json = JSON.parse(response.body) json = JSON.parse(response.body)
if json["content_html"]? && !json["content_html"].as_s.empty? if json["content_html"]? && !json["content_html"].as_s.empty?

View File

@@ -57,14 +57,22 @@ class RedditListing
}) })
end end
def fetch_youtube_comments(id, db, continuation, format, locale, thin_mode, region, sort_by = "top") def fetch_youtube_comments(id, db, cursor, format, locale, thin_mode, region, sort_by = "top")
video = get_video(id, db, region: region) video = get_video(id, db, region: region)
session_token = video.info["session_token"]? session_token = video.info["session_token"]?
ctoken = produce_comment_continuation(id, cursor: "", sort_by: sort_by) case cursor
continuation ||= ctoken when nil, ""
ctoken = produce_comment_continuation(id, cursor: "", sort_by: sort_by)
# when .starts_with? "Ug"
# ctoken = produce_comment_reply_continuation(id, video.ucid, cursor)
when .starts_with? "ADSJ"
ctoken = produce_comment_continuation(id, cursor: cursor, sort_by: sort_by)
else
ctoken = cursor
end
if !continuation || continuation.empty? || !session_token if !session_token
if format == "json" if format == "json"
return {"comments" => [] of String}.to_json return {"comments" => [] of String}.to_json
else else
@@ -73,10 +81,10 @@ def fetch_youtube_comments(id, db, continuation, format, locale, thin_mode, regi
end end
post_req = { post_req = {
page_token: ctoken,
session_token: session_token, session_token: session_token,
} }
client = make_client(YT_URL, video.info["region"]?)
headers = HTTP::Headers.new headers = HTTP::Headers.new
headers["content-type"] = "application/x-www-form-urlencoded" headers["content-type"] = "application/x-www-form-urlencoded"
@@ -89,7 +97,7 @@ def fetch_youtube_comments(id, db, continuation, format, locale, thin_mode, regi
headers["x-youtube-client-name"] = "1" headers["x-youtube-client-name"] = "1"
headers["x-youtube-client-version"] = "2.20180719" headers["x-youtube-client-version"] = "2.20180719"
response = client.post("/comment_service_ajax?action_get_comments=1&ctoken=#{continuation}&continuation=#{continuation}&hl=en&gl=US", headers, form: post_req) response = YT_POOL.client(region, &.post("/comment_service_ajax?action_get_comments=1&hl=en&gl=US", headers, form: post_req))
response = JSON.parse(response.body) response = JSON.parse(response.body)
if !response["response"]["continuationContents"]? if !response["response"]["continuationContents"]?
@@ -216,8 +224,8 @@ def fetch_youtube_comments(id, db, continuation, format, locale, thin_mode, regi
end end
if body["continuations"]? if body["continuations"]?
continuation = body["continuations"][0]["nextContinuationData"]["continuation"] continuation = body["continuations"][0]["nextContinuationData"]["continuation"].as_s
json.field "continuation", continuation json.field "continuation", cursor.try &.starts_with?("E") ? continuation : extract_comment_cursor(continuation)
end end
end end
end end
@@ -339,7 +347,7 @@ def template_youtube_comments(comments, locale, thin_mode)
END_HTML END_HTML
else else
html << <<-END_HTML html << <<-END_HTML
<iframe id='ivplayer' type='text/html' style='position:absolute;width:100%;height:100%;left:0;top:0' src='/embed/#{attachment["videoId"]?}' frameborder='0'></iframe> <iframe id='ivplayer' type='text/html' style='position:absolute;width:100%;height:100%;left:0;top:0' src='/embed/#{attachment["videoId"]?}?autoplay=0' frameborder='0'></iframe>
END_HTML END_HTML
end end
@@ -563,110 +571,85 @@ def content_to_comment_html(content)
return comment_html return comment_html
end end
def extract_comment_cursor(continuation)
cursor = URI.decode_www_form(continuation)
.try { |i| Base64.decode(i) }
.try { |i| IO::Memory.new(i) }
.try { |i| Protodec::Any.parse(i) }
.try { |i| i["6:2:embedded"]["1:0:string"].as_s }
return cursor
end
def produce_comment_continuation(video_id, cursor = "", sort_by = "top") def produce_comment_continuation(video_id, cursor = "", sort_by = "top")
continuation = IO::Memory.new object = {
"2:embedded" => {
"2:string" => video_id,
"24:varint" => 1_i64,
"25:varint" => 1_i64,
"28:varint" => 1_i64,
"36:embedded" => {
"5:varint" => -1_i64,
"8:varint" => 0_i64,
},
},
"3:varint" => 6_i64,
"6:embedded" => {
"1:string" => cursor,
"4:embedded" => {
"4:string" => video_id,
"6:varint" => 0_i64,
},
"5:varint" => 20_i64,
},
}
continuation.write(Bytes[0x12, 0x26]) case sort_by
when "top"
continuation.write(Bytes[0x12, video_id.size]) object["6:embedded"].as(Hash)["4:embedded"].as(Hash)["6:varint"] = 0_i64
continuation.print(video_id) when "new", "newest"
object["6:embedded"].as(Hash)["4:embedded"].as(Hash)["6:varint"] = 1_i64
continuation.write(Bytes[0xc0, 0x01, 0x01])
continuation.write(Bytes[0xc8, 0x01, 0x01])
continuation.write(Bytes[0xe0, 0x01, 0x01])
continuation.write(Bytes[0xa2, 0x02, 0x0d])
continuation.write(Bytes[0x28, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01])
continuation.write(Bytes[0x40, 0x00])
continuation.write(Bytes[0x18, 0x06])
if cursor.empty?
continuation.write(Bytes[0x32])
continuation.write(write_var_int(video_id.size + 8))
continuation.write(Bytes[0x22, video_id.size + 4])
continuation.write(Bytes[0x22, video_id.size])
continuation.print(video_id)
case sort_by
when "top"
continuation.write(Bytes[0x30, 0x00])
when "new", "newest"
continuation.write(Bytes[0x30, 0x01])
end
continuation.write(Bytes[0x78, 0x02])
else
continuation.write(Bytes[0x32])
continuation.write(write_var_int(cursor.size + video_id.size + 11))
continuation.write(Bytes[0x0a])
continuation.write(write_var_int(cursor.size))
continuation.print(cursor)
continuation.write(Bytes[0x22, video_id.size + 4])
continuation.write(Bytes[0x22, video_id.size])
continuation.print(video_id)
case sort_by
when "top"
continuation.write(Bytes[0x30, 0x00])
when "new", "newest"
continuation.write(Bytes[0x30, 0x01])
end
continuation.write(Bytes[0x28, 0x14])
end end
continuation.rewind continuation = object.try { |i| Protodec::Any.cast_json(object) }
continuation = continuation.gets_to_end .try { |i| Protodec::Any.from_json(i) }
.try { |i| Base64.urlsafe_encode(i) }
continuation = Base64.urlsafe_encode(continuation.to_slice) .try { |i| URI.encode_www_form(i) }
continuation = URI.escape(continuation)
return continuation return continuation
end end
def produce_comment_reply_continuation(video_id, ucid, comment_id) def produce_comment_reply_continuation(video_id, ucid, comment_id)
continuation = IO::Memory.new object = {
"2:embedded" => {
"2:string" => video_id,
"24:varint" => 1_i64,
"25:varint" => 1_i64,
"28:varint" => 1_i64,
"36:embedded" => {
"5:varint" => -1_i64,
"8:varint" => 0_i64,
},
},
"3:varint" => 6_i64,
"6:embedded" => {
"3:embedded" => {
"2:string" => comment_id,
"4:embedded" => {
"1:varint" => 0_i64,
},
"5:string" => ucid,
"6:string" => video_id,
"8:varint" => 1_i64,
"9:varint" => 10_i64,
},
},
}
continuation.write(Bytes[0x12, 0x26]) continuation = object.try { |i| Protodec::Any.cast_json(object) }
.try { |i| Protodec::Any.from_json(i) }
continuation.write(Bytes[0x12, video_id.size]) .try { |i| Base64.urlsafe_encode(i) }
continuation.print(video_id) .try { |i| URI.encode_www_form(i) }
continuation.write(Bytes[0xc0, 0x01, 0x01])
continuation.write(Bytes[0xc8, 0x01, 0x01])
continuation.write(Bytes[0xe0, 0x01, 0x01])
continuation.write(Bytes[0xa2, 0x02, 0x0d])
continuation.write(Bytes[0x28, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01])
continuation.write(Bytes[0x40, 0x00])
continuation.write(Bytes[0x18, 0x06])
continuation.write(Bytes[0x32, ucid.size + video_id.size + comment_id.size + 16])
continuation.write(Bytes[0x1a, ucid.size + video_id.size + comment_id.size + 14])
continuation.write(Bytes[0x12, comment_id.size])
continuation.print(comment_id)
continuation.write(Bytes[0x22, 0x02, 0x08, 0x00]) # ??
continuation.write(Bytes[ucid.size + video_id.size + 7])
continuation.write(Bytes[ucid.size])
continuation.print(ucid)
continuation.write(Bytes[0x32, video_id.size])
continuation.print(video_id)
continuation.write(Bytes[0x40, 0x01])
continuation.write(Bytes[0x48, 0x0a])
continuation.rewind
continuation = continuation.gets_to_end
continuation = Base64.urlsafe_encode(continuation.to_slice)
continuation = URI.escape(continuation)
return continuation return continuation
end end

View File

@@ -21,7 +21,7 @@ end
class Kemal::RouteHandler class Kemal::RouteHandler
{% for method in %w(GET POST PUT HEAD DELETE PATCH OPTIONS) %} {% for method in %w(GET POST PUT HEAD DELETE PATCH OPTIONS) %}
exclude ["/api/v1/*"], {{method}} exclude ["/api/v1/*"], {{method}}
{% end %} {% end %}
# Processes the route if it's a match. Otherwise renders 404. # Processes the route if it's a match. Otherwise renders 404.
@@ -33,8 +33,7 @@ class Kemal::RouteHandler
raise Kemal::Exceptions::CustomException.new(context) raise Kemal::Exceptions::CustomException.new(context)
end end
if context.request.method == "HEAD" && if context.request.method == "HEAD" && context.request.path.ends_with? ".jpg"
context.request.path.ends_with? ".jpg"
context.response.headers["Content-Type"] = "image/jpeg" context.response.headers["Content-Type"] = "image/jpeg"
end end
@@ -45,7 +44,7 @@ end
class Kemal::ExceptionHandler class Kemal::ExceptionHandler
{% for method in %w(GET POST PUT HEAD DELETE PATCH OPTIONS) %} {% for method in %w(GET POST PUT HEAD DELETE PATCH OPTIONS) %}
exclude ["/api/v1/*"], {{method}} exclude ["/api/v1/*"], {{method}}
{% end %} {% end %}
private def call_exception_with_status_code(context : HTTP::Server::Context, exception : Exception, status_code : Int32) private def call_exception_with_status_code(context : HTTP::Server::Context, exception : Exception, status_code : Int32)
@@ -69,20 +68,20 @@ class FilteredCompressHandler < Kemal::Handler
return call_next env if exclude_match? env return call_next env if exclude_match? env
{% if flag?(:without_zlib) %} {% if flag?(:without_zlib) %}
call_next env call_next env
{% else %} {% else %}
request_headers = env.request.headers request_headers = env.request.headers
if request_headers.includes_word?("Accept-Encoding", "gzip") if request_headers.includes_word?("Accept-Encoding", "gzip")
env.response.headers["Content-Encoding"] = "gzip" env.response.headers["Content-Encoding"] = "gzip"
env.response.output = Gzip::Writer.new(env.response.output, sync_close: true) env.response.output = Gzip::Writer.new(env.response.output, sync_close: true)
elsif request_headers.includes_word?("Accept-Encoding", "deflate") elsif request_headers.includes_word?("Accept-Encoding", "deflate")
env.response.headers["Content-Encoding"] = "deflate" env.response.headers["Content-Encoding"] = "deflate"
env.response.output = Flate::Writer.new(env.response.output, sync_close: true) env.response.output = Flate::Writer.new(env.response.output, sync_close: true)
end end
call_next env call_next env
{% end %} {% end %}
end end
end end
@@ -96,8 +95,8 @@ class AuthHandler < Kemal::Handler
begin begin
if token = env.request.headers["Authorization"]? if token = env.request.headers["Authorization"]?
token = JSON.parse(URI.unescape(token.lchop("Bearer "))) token = JSON.parse(URI.decode_www_form(token.lchop("Bearer ")))
session = URI.unescape(token["session"].as_s) session = URI.decode_www_form(token["session"].as_s)
scopes, expire, signature = validate_request(token, session, env.request, HMAC_KEY, PG_DB, nil) scopes, expire, signature = validate_request(token, session, env.request, HMAC_KEY, PG_DB, nil)
if email = PG_DB.query_one?("SELECT email FROM session_ids WHERE id = $1", session, as: String) if email = PG_DB.query_one?("SELECT email FROM session_ids WHERE id = $1", session, as: String)
@@ -130,7 +129,7 @@ class AuthHandler < Kemal::Handler
error_message = {"error" => ex.message}.to_json error_message = {"error" => ex.message}.to_json
env.response.status_code = 403 env.response.status_code = 403
env.response.puts error_message env.response.print error_message
end end
end end
end end
@@ -159,10 +158,10 @@ class APIHandler < Kemal::Handler
call_next env call_next env
env.response.output.rewind env.response.output.rewind
response = env.response.output.gets_to_end
if env.response.headers["Content-Type"]?.try &.== "application/json" if env.response.output.as(IO::Memory).size != 0 &&
response = JSON.parse(response) env.response.headers.includes_word?("Content-Type", "application/json")
response = JSON.parse(env.response.output)
if fields_text = env.params.query["fields"]? if fields_text = env.params.query["fields"]?
begin begin
@@ -173,16 +172,30 @@ class APIHandler < Kemal::Handler
end end
end end
if env.params.query["pretty"]? && env.params.query["pretty"] == "1" if env.params.query["pretty"]?.try &.== "1"
response = response.to_pretty_json
else
response = response.to_json
end
else
response = env.response.output.gets_to_end
end
rescue ex
env.response.content_type = "application/json" if env.response.headers.includes_word?("Content-Type", "text/html")
env.response.status_code = 500
if env.response.headers.includes_word?("Content-Type", "application/json")
response = {"error" => ex.message || "Unspecified error"}
if env.params.query["pretty"]?.try &.== "1"
response = response.to_pretty_json response = response.to_pretty_json
else else
response = response.to_json response = response.to_json
end end
end end
rescue ex
ensure ensure
env.response.output = output env.response.output = output
env.response.puts response env.response.print response
env.response.flush env.response.flush
end end
@@ -213,53 +226,15 @@ end
class HTTP::Client class HTTP::Client
private def handle_response(response) private def handle_response(response)
if @socket.is_a?(OpenSSL::SSL::Socket::Client) if @socket.is_a?(OpenSSL::SSL::Socket::Client) && @host.ends_with?("googlevideo.com")
close unless response.keep_alive? || @socket.as(OpenSSL::SSL::Socket::Client).@in_buffer_rem.empty? close unless response.keep_alive? || @socket.as(OpenSSL::SSL::Socket::Client).@in_buffer_rem.empty?
if @socket.as(OpenSSL::SSL::Socket::Client).@in_buffer_rem.empty? if @socket.as(OpenSSL::SSL::Socket::Client).@in_buffer_rem.empty?
@socket = nil @socket = nil
end end
else else
close unless response.keep_alive? close unless response.keep_alive?
end end
response response
end end
end end
# https://github.com/will/crystal-pg/pull/171
class PG::Statement < ::DB::Statement
protected def perform_query(args : Enumerable) : ResultSet
params = args.map { |arg| PQ::Param.encode(arg) }
conn = self.conn
conn.send_parse_message(@sql)
conn.send_bind_message params
conn.send_describe_portal_message
conn.send_execute_message
conn.send_sync_message
conn.expect_frame PQ::Frame::ParseComplete
conn.expect_frame PQ::Frame::BindComplete
frame = conn.read
case frame
when PQ::Frame::RowDescription
fields = frame.fields
when PQ::Frame::NoData
fields = nil
else
raise "expected RowDescription or NoData, got #{frame}"
end
ResultSet.new(self, fields)
rescue IO::Error
raise DB::ConnectionLost.new(connection)
end
protected def perform_exec(args : Enumerable) : ::DB::ExecResult
result = perform_query(args)
result.each { }
::DB::ExecResult.new(
rows_affected: result.rows_affected,
last_insert_id: 0_i64 # postgres doesn't support this
)
rescue IO::Error
raise DB::ConnectionLost.new(connection)
end
end

View File

@@ -24,6 +24,27 @@ end
struct ConfigPreferences struct ConfigPreferences
module StringToArray module StringToArray
def self.to_json(value : Array(String), json : JSON::Builder)
json.array do
value.each do |element|
json.string element
end
end
end
def self.from_json(value : JSON::PullParser) : Array(String)
begin
result = [] of String
value.read_array do
result << HTML.escape(value.read_string[0, 100])
end
rescue ex
result = [HTML.escape(value.read_string[0, 100]), ""]
end
result
end
def self.to_yaml(value : Array(String), yaml : YAML::Nodes::Builder) def self.to_yaml(value : Array(String), yaml : YAML::Nodes::Builder)
yaml.sequence do yaml.sequence do
value.each do |element| value.each do |element|
@@ -44,11 +65,11 @@ struct ConfigPreferences
node.raise "Expected scalar, not #{item.class}" node.raise "Expected scalar, not #{item.class}"
end end
result << item.value result << HTML.escape(item.value[0, 100])
end end
rescue ex rescue ex
if node.is_a?(YAML::Nodes::Scalar) if node.is_a?(YAML::Nodes::Scalar)
result = [node.value, ""] result = [HTML.escape(node.value[0, 100]), ""]
else else
result = ["", ""] result = ["", ""]
end end
@@ -58,6 +79,51 @@ struct ConfigPreferences
end end
end end
module BoolToString
def self.to_json(value : String, json : JSON::Builder)
json.string value
end
def self.from_json(value : JSON::PullParser) : String
begin
result = value.read_string
if result.empty?
CONFIG.default_user_preferences.dark_mode
else
result
end
rescue ex
if value.read_bool
"dark"
else
"light"
end
end
end
def self.to_yaml(value : String, yaml : YAML::Nodes::Builder)
yaml.scalar value
end
def self.from_yaml(ctx : YAML::ParseContext, node : YAML::Nodes::Node) : String
unless node.is_a?(YAML::Nodes::Scalar)
node.raise "Expected scalar, not #{node.class}"
end
case node.value
when "true"
"dark"
when "false"
"light"
when ""
CONFIG.default_user_preferences.dark_mode
else
node.value
end
end
end
yaml_mapping({ yaml_mapping({
annotations: {type: Bool, default: false}, annotations: {type: Bool, default: false},
annotations_subscribed: {type: Bool, default: false}, annotations_subscribed: {type: Bool, default: false},
@@ -66,15 +132,17 @@ struct ConfigPreferences
comments: {type: Array(String), default: ["youtube", ""], converter: StringToArray}, comments: {type: Array(String), default: ["youtube", ""], converter: StringToArray},
continue: {type: Bool, default: false}, continue: {type: Bool, default: false},
continue_autoplay: {type: Bool, default: true}, continue_autoplay: {type: Bool, default: true},
dark_mode: {type: Bool, default: false}, dark_mode: {type: String, default: "", converter: BoolToString},
latest_only: {type: Bool, default: false}, latest_only: {type: Bool, default: false},
listen: {type: Bool, default: false}, listen: {type: Bool, default: false},
local: {type: Bool, default: false}, local: {type: Bool, default: false},
locale: {type: String, default: "en-US"}, locale: {type: String, default: "en-US"},
max_results: {type: Int32, default: 40}, max_results: {type: Int32, default: 40},
notifications_only: {type: Bool, default: false}, notifications_only: {type: Bool, default: false},
player_style: {type: String, default: "invidious"},
quality: {type: String, default: "hd720"}, quality: {type: String, default: "hd720"},
redirect_feed: {type: Bool, default: false}, default_home: {type: String, default: "Popular"},
feed_menu: {type: Array(String), default: ["Popular", "Trending", "Subscriptions", "Playlists"]},
related_videos: {type: Bool, default: true}, related_videos: {type: Bool, default: true},
sort: {type: String, default: "published"}, sort: {type: String, default: "published"},
speed: {type: Float32, default: 1.0_f32}, speed: {type: Float32, default: 1.0_f32},
@@ -87,12 +155,61 @@ end
struct Config struct Config
module ConfigPreferencesConverter module ConfigPreferencesConverter
def self.to_yaml(value : Preferences, yaml : YAML::Nodes::Builder)
value.to_yaml(yaml)
end
def self.from_yaml(ctx : YAML::ParseContext, node : YAML::Nodes::Node) : Preferences def self.from_yaml(ctx : YAML::ParseContext, node : YAML::Nodes::Node) : Preferences
Preferences.new(*ConfigPreferences.new(ctx, node).to_tuple) Preferences.new(*ConfigPreferences.new(ctx, node).to_tuple)
end end
end
def self.to_yaml(value : Preferences, yaml : YAML::Nodes::Builder) module FamilyConverter
value.to_yaml(yaml) def self.to_yaml(value : Socket::Family, yaml : YAML::Nodes::Builder)
case value
when Socket::Family::UNSPEC
yaml.scalar nil
when Socket::Family::INET
yaml.scalar "ipv4"
when Socket::Family::INET6
yaml.scalar "ipv6"
end
end
def self.from_yaml(ctx : YAML::ParseContext, node : YAML::Nodes::Node) : Socket::Family
if node.is_a?(YAML::Nodes::Scalar)
case node.value.downcase
when "ipv4"
Socket::Family::INET
when "ipv6"
Socket::Family::INET6
else
Socket::Family::UNSPEC
end
else
node.raise "Expected scalar, not #{node.class}"
end
end
end
module StringToCookies
def self.to_yaml(value : HTTP::Cookies, yaml : YAML::Nodes::Builder)
(value.map { |c| "#{c.name}=#{c.value}" }).join("; ").to_yaml(yaml)
end
def self.from_yaml(ctx : YAML::ParseContext, node : YAML::Nodes::Node) : HTTP::Cookies
unless node.is_a?(YAML::Nodes::Scalar)
node.raise "Expected scalar, not #{node.class}"
end
cookies = HTTP::Cookies.new
node.value.split(";").each do |cookie|
next if cookie.strip.empty?
name, value = cookie.split("=", 2)
cookies << HTTP::Cookie.new(name.strip, value.strip)
end
cookies
end end
end end
@@ -118,8 +235,6 @@ struct Config
hmac_key: String?, # HMAC signing key for CSRF tokens and verifying pubsub subscriptions hmac_key: String?, # HMAC signing key for CSRF tokens and verifying pubsub subscriptions
domain: String?, # Domain to be used for links to resources on the site where an absolute URL is required domain: String?, # Domain to be used for links to resources on the site where an absolute URL is required
use_pubsub_feeds: {type: Bool | Int32, default: false}, # Subscribe to channels using PubSubHubbub (requires domain, hmac_key) use_pubsub_feeds: {type: Bool | Int32, default: false}, # Subscribe to channels using PubSubHubbub (requires domain, hmac_key)
default_home: {type: String, default: "Top"},
feed_menu: {type: Array(String), default: ["Popular", "Top", "Trending", "Subscriptions"]},
top_enabled: {type: Bool, default: true}, top_enabled: {type: Bool, default: true},
captcha_enabled: {type: Bool, default: true}, captcha_enabled: {type: Bool, default: true},
login_enabled: {type: Bool, default: true}, login_enabled: {type: Bool, default: true},
@@ -131,12 +246,19 @@ struct Config
default: Preferences.new(*ConfigPreferences.from_yaml("").to_tuple), default: Preferences.new(*ConfigPreferences.from_yaml("").to_tuple),
converter: ConfigPreferencesConverter, converter: ConfigPreferencesConverter,
}, },
dmca_content: {type: Array(String), default: [] of String}, # For compliance with DMCA, disables download widget using list of video IDs dmca_content: {type: Array(String), default: [] of String}, # For compliance with DMCA, disables download widget using list of video IDs
check_tables: {type: Bool, default: false}, # Check table integrity, automatically try to add any missing columns, create tables, etc. check_tables: {type: Bool, default: false}, # Check table integrity, automatically try to add any missing columns, create tables, etc.
cache_annotations: {type: Bool, default: false}, # Cache annotations requested from IA, will not cache empty annotations or annotations that only contain cards cache_annotations: {type: Bool, default: false}, # Cache annotations requested from IA, will not cache empty annotations or annotations that only contain cards
banner: {type: String?, default: nil}, # Optional banner to be displayed along top of page for announcements, etc. banner: {type: String?, default: nil}, # Optional banner to be displayed along top of page for announcements, etc.
hsts: {type: Bool?, default: true}, # Enables 'Strict-Transport-Security'. Ensure that `domain` and all subdomains are served securely hsts: {type: Bool?, default: true}, # Enables 'Strict-Transport-Security'. Ensure that `domain` and all subdomains are served securely
disable_proxy: {type: Bool? | Array(String)?, default: false}, # Disable proxying server-wide: options: 'dash', 'livestreams', 'downloads', 'local' disable_proxy: {type: Bool? | Array(String)?, default: false}, # Disable proxying server-wide: options: 'dash', 'livestreams', 'downloads', 'local'
force_resolve: {type: Socket::Family, default: Socket::Family::UNSPEC, converter: FamilyConverter}, # Connect to YouTube over 'ipv6', 'ipv4'. Will sometimes resolve fix issues with rate-limiting (see https://github.com/ytdl-org/youtube-dl/issues/21729)
port: {type: Int32, default: 3000}, # Port to listen for connections (overrided by command line argument)
host_binding: {type: String, default: "0.0.0.0"}, # Host to bind (overrided by command line argument)
pool_size: {type: Int32, default: 100}, # Pool size for HTTP requests to youtube.com and ytimg.com (each domain has a separate pool of `pool_size`)
admin_email: {type: String, default: "omarroth@protonmail.com"}, # Email for bug reports
cookies: {type: HTTP::Cookies, default: HTTP::Cookies.new, converter: StringToCookies}, # Saved cookies in "name1=value1; name2=value2..." format
captcha_key: {type: String?, default: nil}, # Key for Anti-Captcha
}) })
end end
@@ -214,8 +336,7 @@ end
def extract_videos(nodeset, ucid = nil, author_name = nil) def extract_videos(nodeset, ucid = nil, author_name = nil)
videos = extract_items(nodeset, ucid, author_name) videos = extract_items(nodeset, ucid, author_name)
videos.select! { |item| !item.is_a?(SearchChannel | SearchPlaylist) } videos.select { |item| item.is_a?(SearchVideo) }.map { |video| video.as(SearchVideo) }
videos.map { |video| video.as(SearchVideo) }
end end
def extract_items(nodeset, ucid = nil, author_name = nil) def extract_items(nodeset, ucid = nil, author_name = nil)
@@ -234,18 +355,8 @@ def extract_items(nodeset, ucid = nil, author_name = nil)
next next
end end
anchor = node.xpath_node(%q(.//div[contains(@class, "yt-lockup-byline")]/a)) author_id = node.xpath_node(%q(.//div[contains(@class, "yt-lockup-byline")]/a)).try &.["href"].split("/")[-1] || ucid || ""
if anchor author = node.xpath_node(%q(.//div[contains(@class, "yt-lockup-byline")]/a)).try &.content.strip || author_name || ""
author = anchor.content.strip
author_id = anchor["href"].split("/")[-1]
end
author ||= author_name
author_id ||= ucid
author ||= ""
author_id ||= ""
description_html = node.xpath_node(%q(.//div[contains(@class, "yt-lockup-description")])).try &.to_s || "" description_html = node.xpath_node(%q(.//div[contains(@class, "yt-lockup-description")])).try &.to_s || ""
tile = node.xpath_node(%q(.//div[contains(@class, "yt-lockup-tile")])) tile = node.xpath_node(%q(.//div[contains(@class, "yt-lockup-tile")]))
@@ -263,14 +374,14 @@ def extract_items(nodeset, ucid = nil, author_name = nil)
anchor = node.xpath_node(%q(.//ul[@class="yt-lockup-meta-info"]/li/a)) anchor = node.xpath_node(%q(.//ul[@class="yt-lockup-meta-info"]/li/a))
end end
video_count = node.xpath_node(%q(.//span[@class="formatted-video-count-label"]/b)) video_count = node.xpath_node(%q(.//span[@class="formatted-video-count-label"]/b)) ||
node.xpath_node(%q(.//span[@class="formatted-video-count-label"]))
if video_count if video_count
video_count = video_count.content video_count = video_count.content
if video_count == "50+" if video_count == "50+"
author = "YouTube" author = "YouTube"
author_id = "UC-9-kyTW8ZkZNDHQJ6FgpwQ" author_id = "UC-9-kyTW8ZkZNDHQJ6FgpwQ"
video_count = video_count.rchop("+")
end end
video_count = video_count.gsub(/\D/, "").to_i? video_count = video_count.gsub(/\D/, "").to_i?
@@ -300,22 +411,17 @@ def extract_items(nodeset, ucid = nil, author_name = nil)
) )
end end
playlist_thumbnail = node.xpath_node(%q(.//div/span/img)).try &.["data-thumb"]? playlist_thumbnail = node.xpath_node(%q(.//span/img)).try &.["data-thumb"]?
playlist_thumbnail ||= node.xpath_node(%q(.//div/span/img)).try &.["src"] playlist_thumbnail ||= node.xpath_node(%q(.//span/img)).try &.["src"]
if !playlist_thumbnail || playlist_thumbnail.empty?
thumbnail_id = videos[0]?.try &.id
else
thumbnail_id = playlist_thumbnail.match(/\/vi\/(?<video_id>[a-zA-Z0-9_-]{11})\/\w+\.jpg/).try &.["video_id"]
end
items << SearchPlaylist.new( items << SearchPlaylist.new(
title, title: title,
plid, id: plid,
author, author: author,
author_id, ucid: author_id,
video_count, video_count: video_count,
videos, videos: videos,
thumbnail_id thumbnail: playlist_thumbnail
) )
when .includes? "yt-lockup-channel" when .includes? "yt-lockup-channel"
author = title.strip author = title.strip
@@ -333,64 +439,37 @@ def extract_items(nodeset, ucid = nil, author_name = nil)
author_thumbnail ||= "" author_thumbnail ||= ""
subscriber_count = node.xpath_node(%q(.//span[contains(@class, "yt-subscriber-count")])).try &.["title"].gsub(/\D/, "").to_i? subscriber_count = node.xpath_node(%q(.//span[contains(@class, "subscriber-count")]))
subscriber_count ||= 0 .try &.["title"].try { |text| short_text_to_number(text) } || 0
video_count = node.xpath_node(%q(.//ul[@class="yt-lockup-meta-info"]/li)).try &.content.split(" ")[0].gsub(/\D/, "").to_i? video_count = node.xpath_node(%q(.//ul[@class="yt-lockup-meta-info"]/li)).try &.content.split(" ")[0].gsub(/\D/, "").to_i?
video_count ||= 0
items << SearchChannel.new( items << SearchChannel.new(
author: author, author: author,
ucid: ucid, ucid: ucid,
author_thumbnail: author_thumbnail, author_thumbnail: author_thumbnail,
subscriber_count: subscriber_count, subscriber_count: subscriber_count,
video_count: video_count, video_count: video_count || 0,
description_html: description_html description_html: description_html,
auto_generated: video_count ? false : true,
) )
else else
id = id.lchop("/watch?v=") id = id.lchop("/watch?v=")
metadata = node.xpath_nodes(%q(.//div[contains(@class,"yt-lockup-meta")]/ul/li)) metadata = node.xpath_node(%q(.//div[contains(@class,"yt-lockup-meta")]/ul))
begin published = metadata.try &.xpath_node(%q(.//li[contains(text(), " ago")])).try { |node| decode_date(node.content.sub(/^[a-zA-Z]+ /, "")) }
published = decode_date(metadata[0].content.lchop("Streamed ").lchop("Starts ")) published ||= metadata.try &.xpath_node(%q(.//span[@data-timestamp])).try { |node| Time.unix(node["data-timestamp"].to_i64) }
rescue ex
end
begin
published ||= Time.unix(metadata[0].xpath_node(%q(.//span)).not_nil!["data-timestamp"].to_i64)
rescue ex
end
published ||= Time.utc published ||= Time.utc
begin view_count = metadata.try &.xpath_node(%q(.//li[contains(text(), " views")])).try &.content.gsub(/\D/, "").to_i64?
view_count = metadata[0].content.rchop(" watching").delete(",").try &.to_i64?
rescue ex
end
begin
view_count ||= metadata.try &.[1].content.delete("No views,").try &.to_i64?
rescue ex
end
view_count ||= 0_i64 view_count ||= 0_i64
length_seconds = node.xpath_node(%q(.//span[@class="video-time"])) length_seconds = node.xpath_node(%q(.//span[@class="video-time"])).try { |node| decode_length_seconds(node.content) }
if length_seconds length_seconds ||= -1
length_seconds = decode_length_seconds(length_seconds.content)
else
length_seconds = -1
end
live_now = node.xpath_node(%q(.//span[contains(@class, "yt-badge-live")])) live_now = node.xpath_node(%q(.//span[contains(@class, "yt-badge-live")])) ? true : false
if live_now premium = node.xpath_node(%q(.//span[text()="Premium"])) ? true : false
live_now = true
else
live_now = false
end
if node.xpath_node(%q(.//span[text()="Premium"]))
premium = true
else
premium = false
end
if !premium || node.xpath_node(%q(.//span[contains(text(), "Free episode")])) if !premium || node.xpath_node(%q(.//span[contains(text(), "Free episode")]))
paid = false paid = false
@@ -428,26 +507,18 @@ def extract_shelf_items(nodeset, ucid = nil, author_name = nil)
nodeset.each do |shelf| nodeset.each do |shelf|
shelf_anchor = shelf.xpath_node(%q(.//h2[contains(@class, "branded-page-module-title")])) shelf_anchor = shelf.xpath_node(%q(.//h2[contains(@class, "branded-page-module-title")]))
next if !shelf_anchor
if !shelf_anchor title = shelf_anchor.xpath_node(%q(.//span[contains(@class, "branded-page-module-title-text")])).try &.content.strip
next
end
title = shelf_anchor.xpath_node(%q(.//span[contains(@class, "branded-page-module-title-text")]))
if title
title = title.content.strip
end
title ||= "" title ||= ""
id = shelf_anchor.xpath_node(%q(.//a)).try &.["href"] id = shelf_anchor.xpath_node(%q(.//a)).try &.["href"]
if !id next if !id
next
end
is_playlist = false shelf_is_playlist = false
videos = [] of SearchPlaylistVideo videos = [] of SearchPlaylistVideo
shelf.xpath_nodes(%q(.//ul[contains(@class, "yt-uix-shelfslider-list")]/li)).each do |child_node| shelf.xpath_nodes(%q(.//ul[contains(@class, "yt-uix-shelfslider-list") or contains(@class, "expanded-shelf-content-list")]/li)).each do |child_node|
type = child_node.xpath_node(%q(./div)) type = child_node.xpath_node(%q(./div))
if !type if !type
next next
@@ -455,7 +526,7 @@ def extract_shelf_items(nodeset, ucid = nil, author_name = nil)
case type["class"] case type["class"]
when .includes? "yt-lockup-video" when .includes? "yt-lockup-video"
is_playlist = true shelf_is_playlist = true
anchor = child_node.xpath_node(%q(.//h3[contains(@class, "yt-lockup-title")]/a)) anchor = child_node.xpath_node(%q(.//h3[contains(@class, "yt-lockup-title")]/a))
if anchor if anchor
@@ -488,41 +559,60 @@ def extract_shelf_items(nodeset, ucid = nil, author_name = nil)
playlist_thumbnail = child_node.xpath_node(%q(.//span/img)).try &.["data-thumb"]? playlist_thumbnail = child_node.xpath_node(%q(.//span/img)).try &.["data-thumb"]?
playlist_thumbnail ||= child_node.xpath_node(%q(.//span/img)).try &.["src"] playlist_thumbnail ||= child_node.xpath_node(%q(.//span/img)).try &.["src"]
if !playlist_thumbnail || playlist_thumbnail.empty?
thumbnail_id = videos[0]?.try &.id
else
thumbnail_id = playlist_thumbnail.match(/\/vi\/(?<video_id>[a-zA-Z0-9_-]{11})\/\w+\.jpg/).try &.["video_id"]
end
video_count_label = child_node.xpath_node(%q(.//span[@class="formatted-video-count-label"])) video_count = child_node.xpath_node(%q(.//span[@class="formatted-video-count-label"]/b)) ||
if video_count_label child_node.xpath_node(%q(.//span[@class="formatted-video-count-label"]))
video_count = video_count_label.content.gsub(/\D/, "").to_i? if video_count
video_count = video_count.content.gsub(/\D/, "").to_i?
end end
video_count ||= 50 video_count ||= 50
videos = [] of SearchPlaylistVideo
child_node.xpath_nodes(%q(.//*[contains(@class, "yt-lockup-playlist-items")]/li)).each do |video|
anchor = video.xpath_node(%q(.//a))
if anchor
video_title = anchor.content.strip
id = HTTP::Params.parse(URI.parse(anchor["href"]).query.not_nil!)["v"]
end
video_title ||= ""
id ||= ""
anchor = video.xpath_node(%q(.//span/span))
if anchor
length_seconds = decode_length_seconds(anchor.content)
end
length_seconds ||= 0
videos << SearchPlaylistVideo.new(
video_title,
id,
length_seconds
)
end
items << SearchPlaylist.new( items << SearchPlaylist.new(
playlist_title, title: playlist_title,
plid, id: plid,
author_name, author: author_name,
ucid, ucid: ucid,
video_count, video_count: video_count,
Array(SearchPlaylistVideo).new, videos: videos,
thumbnail_id thumbnail: playlist_thumbnail
) )
end end
end end
if is_playlist if shelf_is_playlist
plid = HTTP::Params.parse(URI.parse(id).query.not_nil!)["list"] plid = HTTP::Params.parse(URI.parse(id).query.not_nil!)["list"]
items << SearchPlaylist.new( items << SearchPlaylist.new(
title, title: title,
plid, id: plid,
author_name, author: author_name,
ucid, ucid: ucid,
videos.size, video_count: videos.size,
videos, videos: videos,
videos[0].try &.id thumbnail: "https://i.ytimg.com/vi/#{videos[0].id}/mqdefault.jpg"
) )
end end
end end
@@ -530,7 +620,17 @@ def extract_shelf_items(nodeset, ucid = nil, author_name = nil)
return items return items
end end
def analyze_table(db, logger, table_name, struct_type = nil) def check_enum(db, logger, enum_name, struct_type = nil)
if !db.query_one?("SELECT true FROM pg_type WHERE typname = $1", enum_name, as: Bool)
logger.puts("CREATE TYPE #{enum_name}")
db.using_connection do |conn|
conn.as(PG::Connection).exec_all(File.read("config/sql/#{enum_name}.sql"))
end
end
end
def check_table(db, logger, table_name, struct_type = nil)
# Create table if it doesn't exist # Create table if it doesn't exist
begin begin
db.exec("SELECT * FROM #{table_name} LIMIT 0") db.exec("SELECT * FROM #{table_name} LIMIT 0")
@@ -650,48 +750,6 @@ def cache_annotation(db, id, annotations)
end end
end end
def proxy_file(response, env)
if response.headers.includes_word?("Content-Encoding", "gzip")
Gzip::Writer.open(env.response) do |deflate|
response.pipe(deflate)
end
elsif response.headers.includes_word?("Content-Encoding", "deflate")
Flate::Writer.open(env.response) do |deflate|
response.pipe(deflate)
end
else
response.pipe(env.response)
end
end
class HTTP::Client::Response
def pipe(io)
HTTP.serialize_body(io, headers, @body, @body_io, @version)
end
end
# Supports serialize_body without first writing headers
module HTTP
def self.serialize_body(io, headers, body, body_io, version)
if body
io << body
elsif body_io
content_length = content_length(headers)
if content_length
copied = IO.copy(body_io, io)
if copied != content_length
raise ArgumentError.new("Content-Length header is #{content_length} but body had #{copied} bytes")
end
elsif Client::Response.supports_chunked?(version)
headers["Transfer-Encoding"] = "chunked"
serialize_chunked_body(io, body_io)
else
io << body
end
end
end
end
def create_notification_stream(env, config, kemal_config, decrypt_function, topics, connection_channel) def create_notification_stream(env, config, kemal_config, decrypt_function, topics, connection_channel)
connection = Channel(PQ::Notification).new(8) connection = Channel(PQ::Notification).new(8)
connection_channel.send({true, connection}) connection_channel.send({true, connection})
@@ -834,3 +892,79 @@ def extract_initial_data(body)
return JSON.parse(initial_data) return JSON.parse(initial_data)
end end
end end
def proxy_file(response, env)
if response.headers.includes_word?("Content-Encoding", "gzip")
Gzip::Writer.open(env.response) do |deflate|
response.pipe(deflate)
end
elsif response.headers.includes_word?("Content-Encoding", "deflate")
Flate::Writer.open(env.response) do |deflate|
response.pipe(deflate)
end
else
response.pipe(env.response)
end
end
class HTTP::Client::Response
def pipe(io)
HTTP.serialize_body(io, headers, @body, @body_io, @version)
end
end
# Supports serialize_body without first writing headers
module HTTP
def self.serialize_body(io, headers, body, body_io, version)
if body
io << body
elsif body_io
content_length = content_length(headers)
if content_length
copied = IO.copy(body_io, io)
if copied != content_length
raise ArgumentError.new("Content-Length header is #{content_length} but body had #{copied} bytes")
end
elsif Client::Response.supports_chunked?(version)
headers["Transfer-Encoding"] = "chunked"
serialize_chunked_body(io, body_io)
else
io << body
end
end
end
end
class HTTP::Client
property family : Socket::Family = Socket::Family::UNSPEC
private def socket
socket = @socket
return socket if socket
hostname = @host.starts_with?('[') && @host.ends_with?(']') ? @host[1..-2] : @host
socket = TCPSocket.new hostname, @port, @dns_timeout, @connect_timeout, @family
socket.read_timeout = @read_timeout if @read_timeout
socket.sync = false
{% if !flag?(:without_openssl) %}
if tls = @tls
socket = OpenSSL::SSL::Socket::Client.new(socket, context: tls, sync_close: true, hostname: @host)
end
{% end %}
@socket = socket
end
end
class TCPSocket
def initialize(host, port, dns_timeout = nil, connect_timeout = nil, family = Socket::Family::UNSPEC)
Addrinfo.tcp(host, port, timeout: dns_timeout, family: family) do |addrinfo|
super(addrinfo.family, addrinfo.type, addrinfo.protocol)
connect(addrinfo, timeout: connect_timeout) do |error|
close
error
end
end
end
end

View File

@@ -127,6 +127,8 @@ def subscribe_to_feeds(db, logger, key, config)
end end
max_channel = Channel(Int32).new max_channel = Channel(Int32).new
client_pool = HTTPPool.new(PUBSUB_URL, capacity: max_threads, timeout: 0.05)
spawn do spawn do
max_threads = max_channel.receive max_threads = max_channel.receive
active_threads = 0 active_threads = 0
@@ -147,12 +149,13 @@ def subscribe_to_feeds(db, logger, key, config)
spawn do spawn do
begin begin
response = subscribe_pubsub(ucid, key, config) response = subscribe_pubsub(ucid, key, config, client_pool)
if response.status_code >= 400 if response.status_code >= 400
logger.puts("#{ucid} : #{response.body}") logger.puts("#{ucid} : #{response.body}")
end end
rescue ex rescue ex
logger.puts("#{ucid} : #{ex.message}")
end end
active_channel.send(true) active_channel.send(true)
@@ -225,10 +228,77 @@ def update_decrypt_function
yield decrypt_function yield decrypt_function
rescue ex rescue ex
next next
ensure
sleep 1.minute
Fiber.yield
end end
end
end
sleep 1.minute def bypass_captcha(captcha_key, logger)
Fiber.yield loop do
begin
response = YT_POOL.client &.get("/watch?v=CvFH_6DNRCY&gl=US&hl=en&disable_polymer=1&has_verified=1&bpctr=9999999999")
if response.body.includes?("To continue with your YouTube experience, please fill out the form below.")
html = XML.parse_html(response.body)
form = html.xpath_node(%(//form[@action="/das_captcha"])).not_nil!
site_key = form.xpath_node(%(.//div[@class="g-recaptcha"])).try &.["data-sitekey"]
inputs = {} of String => String
form.xpath_nodes(%(.//input[@name])).map do |node|
inputs[node["name"]] = node["value"]
end
headers = response.cookies.add_request_headers(HTTP::Headers.new)
response = JSON.parse(HTTP::Client.post("https://api.anti-captcha.com/createTask", body: {
"clientKey" => CONFIG.captcha_key,
"task" => {
"type" => "NoCaptchaTaskProxyless",
# "type" => "NoCaptchaTask",
"websiteURL" => "https://www.youtube.com/watch?v=CvFH_6DNRCY&gl=US&hl=en&disable_polymer=1&has_verified=1&bpctr=9999999999",
"websiteKey" => site_key,
# "proxyType" => "http",
# "proxyAddress" => CONFIG.proxy_address,
# "proxyPort" => CONFIG.proxy_port,
# "proxyLogin" => CONFIG.proxy_user,
# "proxyPassword" => CONFIG.proxy_pass,
# "userAgent" => "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36",
},
}.to_json).body)
if response["error"]?
raise response["error"].as_s
end
task_id = response["taskId"].as_i
loop do
sleep 10.seconds
response = JSON.parse(HTTP::Client.post("https://api.anti-captcha.com/getTaskResult", body: {
"clientKey" => CONFIG.captcha_key,
"taskId" => task_id,
}.to_json).body)
if response["status"]?.try &.== "ready"
break
elsif response["errorId"]?.try &.as_i != 0
raise response["errorDescription"].as_s
end
end
inputs["g-recaptcha-response"] = response["solution"]["gRecaptchaResponse"].as_s
response = YT_POOL.client &.post("/das_captcha", headers, form: inputs)
yield response.cookies.select { |cookie| cookie.name != "PREF" }
end
rescue ex
logger.puts("Exception: #{ex.message}")
ensure
sleep 1.minute
Fiber.yield
end
end end
end end

View File

@@ -4,7 +4,7 @@ def Object.from_json(string_or_io, default) : self
new parser, default new parser, default
end end
# Adds configurable 'default' to # Adds configurable 'default'
macro patched_json_mapping(_properties_, strict = false) macro patched_json_mapping(_properties_, strict = false)
{% for key, value in _properties_ %} {% for key, value in _properties_ %}
{% _properties_[key] = {type: value} unless value.is_a?(HashLiteral) || value.is_a?(NamedTupleLiteral) %} {% _properties_[key] = {type: value} unless value.is_a?(HashLiteral) || value.is_a?(NamedTupleLiteral) %}
@@ -50,7 +50,7 @@ macro patched_json_mapping(_properties_, strict = false)
rescue exc : ::JSON::ParseException rescue exc : ::JSON::ParseException
raise ::JSON::MappingError.new(exc.message, self.class.to_s, nil, *%location, exc) raise ::JSON::MappingError.new(exc.message, self.class.to_s, nil, *%location, exc)
end end
while %pull.kind != :end_object until %pull.kind.end_object?
%key_location = %pull.location %key_location = %pull.location
key = %pull.read_object_key key = %pull.read_object_key
case key case key

View File

@@ -31,10 +31,10 @@ class HTTPProxy
if resp[:code]? == 200 if resp[:code]? == 200
{% if !flag?(:without_openssl) %} {% if !flag?(:without_openssl) %}
if tls if tls
tls_socket = OpenSSL::SSL::Socket::Client.new(socket, context: tls, sync_close: true, hostname: host) tls_socket = OpenSSL::SSL::Socket::Client.new(socket, context: tls, sync_close: true, hostname: host)
socket = tls_socket socket = tls_socket
end end
{% end %} {% end %}
return socket return socket
@@ -77,6 +77,10 @@ class HTTPClient < HTTP::Client
end end
end end
def unset_proxy
@socket = nil
end
def proxy_connection_options def proxy_connection_options
opts = {} of Symbol => Float64 | Nil opts = {} of Symbol => Float64 | Nil
@@ -97,6 +101,7 @@ def filter_proxies(proxies)
proxies.select! do |proxy| proxies.select! do |proxy|
begin begin
client = HTTPClient.new(YT_URL) client = HTTPClient.new(YT_URL)
client.before_request { |r| add_yt_headers(r) } if url.host == "www.youtube.com"
client.read_timeout = 10.seconds client.read_timeout = 10.seconds
client.connect_timeout = 10.seconds client.connect_timeout = 10.seconds

View File

@@ -1,8 +1,7 @@
def fetch_decrypt_function(id = "CvFH_6DNRCY") def fetch_decrypt_function(id = "CvFH_6DNRCY")
client = make_client(YT_URL) document = YT_POOL.client &.get("/watch?v=#{id}&gl=US&hl=en&disable_polymer=1").body
document = client.get("/watch?v=#{id}&gl=US&hl=en&disable_polymer=1").body
url = document.match(/src="(?<url>\/yts\/jsbin\/player_ias-.{9}\/en_US\/base.js)"/).not_nil!["url"] url = document.match(/src="(?<url>\/yts\/jsbin\/player_ias-.{9}\/en_US\/base.js)"/).not_nil!["url"]
player = client.get(url).body player = YT_POOL.client &.get(url).body
function_name = player.match(/^(?<name>[^=]+)=function\(a\){a=a\.split\(""\)/m).not_nil!["name"] function_name = player.match(/^(?<name>[^=]+)=function\(a\){a=a\.split\(""\)/m).not_nil!["name"]
function_body = player.match(/^#{Regex.escape(function_name)}=function\(a\){(?<body>[^}]+)}/m).not_nil!["body"] function_body = player.match(/^#{Regex.escape(function_name)}=function\(a\){(?<body>[^}]+)}/m).not_nil!["body"]

View File

@@ -119,7 +119,7 @@ module Kemal
config = Kemal.config.serve_static config = Kemal.config.serve_static
original_path = context.request.path.not_nil! original_path = context.request.path.not_nil!
request_path = URI.unescape(original_path) request_path = URI.decode_www_form(original_path)
# File path cannot contains '\0' (NUL) because all filesystem I know # File path cannot contains '\0' (NUL) because all filesystem I know
# don't accept '\0' character as file name. # don't accept '\0' character as file name.

View File

@@ -69,7 +69,7 @@ end
def validate_request(token, session, request, key, db, locale = nil) def validate_request(token, session, request, key, db, locale = nil)
case token case token
when String when String
token = JSON.parse(URI.unescape(token)).as_h token = JSON.parse(URI.decode_www_form(token)).as_h
when JSON::Any when JSON::Any
token = token.as_h token = token.as_h
when Nil when Nil

View File

@@ -1,3 +1,113 @@
require "lsquic"
require "pool/connection"
def add_yt_headers(request)
request.headers["x-youtube-client-name"] ||= "1"
request.headers["x-youtube-client-version"] ||= "1.20180719"
request.headers["user-agent"] ||= "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36"
request.headers["accept-charset"] ||= "ISO-8859-1,utf-8;q=0.7,*;q=0.7"
request.headers["accept"] ||= "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
request.headers["accept-language"] ||= "en-us,en;q=0.5"
request.headers["cookie"] = "#{(CONFIG.cookies.map { |c| "#{c.name}=#{c.value}" }).join("; ")}; #{request.headers["cookie"]?}"
end
struct HTTPPool
property! url : URI
property! capacity : Int32
property! timeout : Float64
property pool : ConnectionPool(HTTPClient)
def initialize(url : URI, @capacity = 5, @timeout = 5.0)
@url = url
@pool = build_pool
end
def client(region = nil, &block)
conn = pool.checkout
begin
if region
PROXY_LIST[region]?.try &.sample(40).each do |proxy|
begin
proxy = HTTPProxy.new(proxy_host: proxy[:ip], proxy_port: proxy[:port])
conn.set_proxy(proxy)
break
rescue ex
end
end
end
response = yield conn
if region
conn.unset_proxy
end
response
rescue ex
conn = HTTPClient.new(url)
conn.before_request { |r| add_yt_headers(r) } if url.host == "www.youtube.com"
conn.family = (url.host == "www.youtube.com" || url.host == "suggestqueries.google.com") ? CONFIG.force_resolve : Socket::Family::UNSPEC
conn.read_timeout = 10.seconds
conn.connect_timeout = 10.seconds
yield conn
ensure
pool.checkin(conn)
end
end
private def build_pool
ConnectionPool(HTTPClient).new(capacity: capacity, timeout: timeout) do
client = HTTPClient.new(url)
client.before_request { |r| add_yt_headers(r) } if url.host == "www.youtube.com"
client.family = (url.host == "www.youtube.com" || url.host == "suggestqueries.google.com") ? CONFIG.force_resolve : Socket::Family::UNSPEC
client.read_timeout = 10.seconds
client.connect_timeout = 10.seconds
client
end
end
end
struct QUICPool
property! url : URI
property! capacity : Int32
property! timeout : Float64
def initialize(url : URI, @capacity = 5, @timeout = 5.0)
@url = url
end
def client(region = nil, &block)
begin
if region
client = HTTPClient.new(url)
client.before_request { |r| add_yt_headers(r) } if url.host == "www.youtube.com"
client.read_timeout = 10.seconds
client.connect_timeout = 10.seconds
PROXY_LIST[region]?.try &.sample(40).each do |proxy|
begin
proxy = HTTPProxy.new(proxy_host: proxy[:ip], proxy_port: proxy[:port])
client.set_proxy(proxy)
break
rescue ex
end
end
yield client
else
conn = QUIC::Client.new(url)
conn.before_request { |r| add_yt_headers(r) } if url.host == "www.youtube.com"
yield conn
end
rescue ex
conn = QUIC::Client.new(url)
conn.before_request { |r| add_yt_headers(r) } if url.host == "www.youtube.com"
yield conn
end
end
end
# See http://www.evanmiller.org/how-not-to-sort-by-average-rating.html # See http://www.evanmiller.org/how-not-to-sort-by-average-rating.html
def ci_lower_bound(pos, n) def ci_lower_bound(pos, n)
if n == 0 if n == 0
@@ -20,8 +130,9 @@ end
def make_client(url : URI, region = nil) def make_client(url : URI, region = nil)
client = HTTPClient.new(url) client = HTTPClient.new(url)
client.read_timeout = 15.seconds client.family = (url.host == "www.youtube.com") ? CONFIG.force_resolve : Socket::Family::UNSPEC
client.connect_timeout = 15.seconds client.read_timeout = 10.seconds
client.connect_timeout = 10.seconds
if region if region
PROXY_LIST[region]?.try &.sample(40).each do |proxy| PROXY_LIST[region]?.try &.sample(40).each do |proxy|
@@ -38,7 +149,7 @@ def make_client(url : URI, region = nil)
end end
def decode_length_seconds(string) def decode_length_seconds(string)
length_seconds = string.split(":").map { |a| a.to_i } length_seconds = string.gsub(/[^0-9:]/, "").split(":").map &.to_i
length_seconds = [0] * (3 - length_seconds.size) + length_seconds length_seconds = [0] * (3 - length_seconds.size) + length_seconds
length_seconds = Time::Span.new(length_seconds[0], length_seconds[1], length_seconds[2]) length_seconds = Time::Span.new(length_seconds[0], length_seconds[1], length_seconds[2])
length_seconds = length_seconds.total_seconds.to_i length_seconds = length_seconds.total_seconds.to_i
@@ -156,7 +267,7 @@ def number_with_separator(number)
number.to_s.reverse.gsub(/(\d{3})(?=\d)/, "\\1,").reverse number.to_s.reverse.gsub(/(\d{3})(?=\d)/, "\\1,").reverse
end end
def short_text_to_number(short_text) def short_text_to_number(short_text : String) : Int32
case short_text case short_text
when .ends_with? "M" when .ends_with? "M"
number = short_text.rstrip(" mM").to_f number = short_text.rstrip(" mM").to_f
@@ -245,7 +356,7 @@ def get_referer(env, fallback = "/", unroll = true)
if referer.query if referer.query
params = HTTP::Params.parse(referer.query.not_nil!) params = HTTP::Params.parse(referer.query.not_nil!)
if params["referer"]? if params["referer"]?
referer = URI.parse(URI.unescape(params["referer"])) referer = URI.parse(URI.decode_www_form(params["referer"]))
else else
break break
end end
@@ -265,50 +376,41 @@ def get_referer(env, fallback = "/", unroll = true)
return referer return referer
end end
def read_var_int(bytes) struct VarInt
num_read = 0 def self.from_io(io : IO, format = IO::ByteFormat::NetworkEndian) : Int32
result = 0 result = 0_u32
num_read = 0
read = bytes[num_read] loop do
byte = io.read_byte
if bytes.size == 1 raise "Invalid VarInt" if !byte
result = bytes[0].to_i32 value = byte & 0x7f
else
while ((read & 0b10000000) != 0)
read = bytes[num_read].to_u64
value = (read & 0b01111111)
result |= (value << (7 * num_read))
result |= value.to_u32 << (7 * num_read)
num_read += 1 num_read += 1
if num_read > 5
raise "VarInt is too big" break if byte & 0x80 == 0
end raise "Invalid VarInt" if num_read > 5
end end
result.to_i32
end end
return result def self.to_io(io : IO, value : Int32)
end io.write_byte 0x00 if value == 0x00
value = value.to_u32
def write_var_int(value : Int)
bytes = [] of UInt8
value = value.to_u32
if value == 0
bytes = [0_u8]
else
while value != 0 while value != 0
temp = (value & 0b01111111).to_u8 byte = (value & 0x7f).to_u8
value = value >> 7 value >>= 7
if value != 0 if value != 0
temp |= 0b10000000 byte |= 0x80
end end
bytes << temp io.write_byte byte
end end
end end
return Slice.new(bytes.to_unsafe, bytes.size)
end end
def sha256(text) def sha256(text)
@@ -317,7 +419,7 @@ def sha256(text)
return digest.hexdigest return digest.hexdigest
end end
def subscribe_pubsub(topic, key, config) def subscribe_pubsub(topic, key, config, client_pool)
case topic case topic
when .match(/^UC[A-Za-z0-9_-]{22}$/) when .match(/^UC[A-Za-z0-9_-]{22}$/)
topic = "channel_id=#{topic}" topic = "channel_id=#{topic}"
@@ -329,7 +431,6 @@ def subscribe_pubsub(topic, key, config)
# TODO # TODO
end end
client = make_client(PUBSUB_URL)
time = Time.utc.to_unix.to_s time = Time.utc.to_unix.to_s
nonce = Random::Secure.hex(4) nonce = Random::Secure.hex(4)
signature = "#{time}:#{nonce}" signature = "#{time}:#{nonce}"
@@ -345,7 +446,7 @@ def subscribe_pubsub(topic, key, config)
"hub.secret" => key.to_s, "hub.secret" => key.to_s,
} }
return client.post("/subscribe", form: body) return client_pool.client &.post("/subscribe", form: body)
end end
def parse_range(range) def parse_range(range)
@@ -365,3 +466,16 @@ def parse_range(range)
return 0_i64, nil return 0_i64, nil
end end
def convert_theme(theme)
case theme
when "true"
"dark"
when "false"
"light"
when "", nil
nil
else
theme
end
end

View File

@@ -19,14 +19,13 @@ struct Mix
end end
def fetch_mix(rdid, video_id, cookies = nil, locale = nil) def fetch_mix(rdid, video_id, cookies = nil, locale = nil)
client = make_client(YT_URL)
headers = HTTP::Headers.new headers = HTTP::Headers.new
headers["User-Agent"] = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" headers["User-Agent"] = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"
if cookies if cookies
headers = cookies.add_request_headers(headers) headers = cookies.add_request_headers(headers)
end end
response = client.get("/watch?v=#{video_id}&list=#{rdid}&gl=US&hl=en&has_verified=1&bpctr=9999999999", headers) response = YT_POOL.client &.get("/watch?v=#{video_id}&list=#{rdid}&gl=US&hl=en&has_verified=1&bpctr=9999999999", headers)
initial_data = extract_initial_data(response.body) initial_data = extract_initial_data(response.body)

View File

@@ -1,5 +1,51 @@
struct PlaylistVideo struct PlaylistVideo
def to_json(locale, config, kemal_config, json : JSON::Builder) def to_xml(host_url, auto_generated, xml : XML::Builder)
xml.element("entry") do
xml.element("id") { xml.text "yt:video:#{self.id}" }
xml.element("yt:videoId") { xml.text self.id }
xml.element("yt:channelId") { xml.text self.ucid }
xml.element("title") { xml.text self.title }
xml.element("link", rel: "alternate", href: "#{host_url}/watch?v=#{self.id}")
xml.element("author") do
if auto_generated
xml.element("name") { xml.text self.author }
xml.element("uri") { xml.text "#{host_url}/channel/#{self.ucid}" }
else
xml.element("name") { xml.text author }
xml.element("uri") { xml.text "#{host_url}/channel/#{ucid}" }
end
end
xml.element("content", type: "xhtml") do
xml.element("div", xmlns: "http://www.w3.org/1999/xhtml") do
xml.element("a", href: "#{host_url}/watch?v=#{self.id}") do
xml.element("img", src: "#{host_url}/vi/#{self.id}/mqdefault.jpg")
end
end
end
xml.element("published") { xml.text self.published.to_s("%Y-%m-%dT%H:%M:%S%:z") }
xml.element("media:group") do
xml.element("media:title") { xml.text self.title }
xml.element("media:thumbnail", url: "#{host_url}/vi/#{self.id}/mqdefault.jpg",
width: "320", height: "180")
end
end
end
def to_xml(host_url, auto_generated, xml : XML::Builder? = nil)
if xml
to_xml(host_url, auto_generated, xml)
else
XML.build do |json|
to_xml(host_url, auto_generated, xml)
end
end
end
def to_json(locale, config, kemal_config, json : JSON::Builder, index : Int32?)
json.object do json.object do
json.field "title", self.title json.field "title", self.title
json.field "videoId", self.id json.field "videoId", self.id
@@ -12,17 +58,23 @@ struct PlaylistVideo
generate_thumbnails(json, self.id, config, kemal_config) generate_thumbnails(json, self.id, config, kemal_config)
end end
json.field "index", self.index if index
json.field "index", index
json.field "indexId", self.index.to_u64.to_s(16).upcase
else
json.field "index", self.index
end
json.field "lengthSeconds", self.length_seconds json.field "lengthSeconds", self.length_seconds
end end
end end
def to_json(locale, config, kemal_config, json : JSON::Builder | Nil = nil) def to_json(locale, config, kemal_config, json : JSON::Builder? = nil, index : Int32? = nil)
if json if json
to_json(locale, config, kemal_config, json) to_json(locale, config, kemal_config, json, index: index)
else else
JSON.build do |json| JSON.build do |json|
to_json(locale, config, kemal_config, json) to_json(locale, config, kemal_config, json, index: index)
end end
end end
end end
@@ -35,12 +87,66 @@ struct PlaylistVideo
length_seconds: Int32, length_seconds: Int32,
published: Time, published: Time,
plid: String, plid: String,
index: Int32, index: Int64,
live_now: Bool, live_now: Bool,
}) })
end end
struct Playlist struct Playlist
def to_json(offset, locale, config, kemal_config, json : JSON::Builder, continuation : String? = nil)
json.object do
json.field "type", "playlist"
json.field "title", self.title
json.field "playlistId", self.id
json.field "playlistThumbnail", self.thumbnail
json.field "author", self.author
json.field "authorId", self.ucid
json.field "authorUrl", "/channel/#{self.ucid}"
json.field "authorThumbnails" do
json.array do
qualities = {32, 48, 76, 100, 176, 512}
qualities.each do |quality|
json.object do
json.field "url", self.author_thumbnail.not_nil!.gsub(/=\d+/, "=s#{quality}")
json.field "width", quality
json.field "height", quality
end
end
end
end
json.field "description", html_to_content(self.description_html)
json.field "descriptionHtml", self.description_html
json.field "videoCount", self.video_count
json.field "viewCount", self.views
json.field "updated", self.updated.to_unix
json.field "isListed", self.privacy.public?
json.field "videos" do
json.array do
videos = get_playlist_videos(PG_DB, self, offset: offset, locale: locale, continuation: continuation)
videos.each_with_index do |video, index|
video.to_json(locale, config, Kemal.config, json)
end
end
end
end
end
def to_json(offset, locale, config, kemal_config, json : JSON::Builder? = nil, continuation : String? = nil)
if json
to_json(offset, locale, config, kemal_config, json, continuation: continuation)
else
JSON.build do |json|
to_json(offset, locale, config, kemal_config, json, continuation: continuation)
end
end
end
db_mapping({ db_mapping({
title: String, title: String,
id: String, id: String,
@@ -51,58 +157,124 @@ struct Playlist
video_count: Int32, video_count: Int32,
views: Int64, views: Int64,
updated: Time, updated: Time,
thumbnail: String?,
}) })
def privacy
PlaylistPrivacy::Public
end
end end
def fetch_playlist_videos(plid, page, video_count, continuation = nil, locale = nil) enum PlaylistPrivacy
client = make_client(YT_URL) Public = 0
Unlisted = 1
Private = 2
end
if continuation struct InvidiousPlaylist
html = client.get("/watch?v=#{continuation}&list=#{plid}&gl=US&hl=en&disable_polymer=1&has_verified=1&bpctr=9999999999") def to_json(offset, locale, config, kemal_config, json : JSON::Builder, continuation : String? = nil)
html = XML.parse_html(html.body) json.object do
json.field "type", "invidiousPlaylist"
json.field "title", self.title
json.field "playlistId", self.id
index = html.xpath_node(%q(//span[@id="playlist-current-index"])).try &.content.to_i? json.field "author", self.author
if index json.field "authorId", self.ucid
index -= 1 json.field "authorUrl", nil
end json.field "authorThumbnails", [] of String
index ||= 0
else
index = (page - 1) * 100
end
if video_count > 100 json.field "description", html_to_content(self.description_html)
url = produce_playlist_url(plid, index) json.field "descriptionHtml", self.description_html
json.field "videoCount", self.video_count
response = client.get(url) json.field "viewCount", self.views
response = JSON.parse(response.body) json.field "updated", self.updated.to_unix
if !response["content_html"]? || response["content_html"].as_s.empty? json.field "isListed", self.privacy.public?
raise translate(locale, "Empty playlist")
end
document = XML.parse_html(response["content_html"].as_s) json.field "videos" do
nodeset = document.xpath_nodes(%q(.//tr[contains(@class, "pl-video")])) json.array do
videos = extract_playlist(plid, nodeset, index) videos = get_playlist_videos(PG_DB, self, offset: offset, locale: locale, continuation: continuation)
else videos.each_with_index do |video, index|
# Playlist has less than one page of videos, so subsequent pages will be empty video.to_json(locale, config, Kemal.config, json, offset + index)
if page > 1 end
videos = [] of PlaylistVideo
else
# Extract first page of videos
response = client.get("/playlist?list=#{plid}&gl=US&hl=en&disable_polymer=1")
document = XML.parse_html(response.body)
nodeset = document.xpath_nodes(%q(.//tr[contains(@class, "pl-video")]))
videos = extract_playlist(plid, nodeset, 0)
if continuation
until videos[0].id == continuation
videos.shift
end end
end end
end end
end end
return videos def to_json(offset, locale, config, kemal_config, json : JSON::Builder? = nil, continuation : String? = nil)
if json
to_json(offset, locale, config, kemal_config, json, continuation: continuation)
else
JSON.build do |json|
to_json(offset, locale, config, kemal_config, json, continuation: continuation)
end
end
end
property thumbnail_id
module PlaylistPrivacyConverter
def self.from_rs(rs)
return PlaylistPrivacy.parse(String.new(rs.read(Slice(UInt8))))
end
end
db_mapping({
title: String,
id: String,
author: String,
description: {type: String, default: ""},
video_count: Int32,
created: Time,
updated: Time,
privacy: {type: PlaylistPrivacy, default: PlaylistPrivacy::Private, converter: PlaylistPrivacyConverter},
index: Array(Int64),
})
def thumbnail
@thumbnail_id ||= PG_DB.query_one?("SELECT id FROM playlist_videos WHERE plid = $1 ORDER BY array_position($2, index) LIMIT 1", self.id, self.index, as: String) || "-----------"
"/vi/#{@thumbnail_id}/mqdefault.jpg"
end
def author_thumbnail
nil
end
def ucid
nil
end
def views
0_i64
end
def description_html
HTML.escape(self.description).gsub("\n", "<br>")
end
end
def create_playlist(db, title, privacy, user)
plid = "IVPL#{Random::Secure.urlsafe_base64(24)[0, 31]}"
playlist = InvidiousPlaylist.new(
title: title.byte_slice(0, 150),
id: plid,
author: user.email,
description: "", # Max 5000 characters
video_count: 0,
created: Time.utc,
updated: Time.utc,
privacy: privacy,
index: [] of Int64,
)
playlist_array = playlist.to_a
args = arg_array(playlist_array)
db.exec("INSERT INTO playlists VALUES (#{args})", args: playlist_array)
return playlist
end end
def extract_playlist(plid, nodeset, index) def extract_playlist(plid, nodeset, index)
@@ -143,7 +315,7 @@ def extract_playlist(plid, nodeset, index)
length_seconds: length_seconds, length_seconds: length_seconds,
published: Time.utc, published: Time.utc,
plid: plid, plid: plid,
index: index + offset, index: (index + offset).to_i64,
live_now: live_now live_now: live_now
) )
end end
@@ -155,51 +327,48 @@ def produce_playlist_url(id, index)
if id.starts_with? "UC" if id.starts_with? "UC"
id = "UU" + id.lchop("UC") id = "UU" + id.lchop("UC")
end end
ucid = "VL" + id plid = "VL" + id
meta = IO::Memory.new data = {"1:varint" => index.to_i64}
meta.write(Bytes[0x08]) .try { |i| Protodec::Any.cast_json(i) }
meta.write(write_var_int(index)) .try { |i| Protodec::Any.from_json(i) }
.try { |i| Base64.urlsafe_encode(i, padding: false) }
meta.rewind object = {
meta = Base64.urlsafe_encode(meta.to_slice, false) "80226972:embedded" => {
meta = "PT:#{meta}" "2:string" => plid,
"3:base64" => {
"15:string" => "PT:#{data}",
},
},
}
continuation = IO::Memory.new continuation = object.try { |i| Protodec::Any.cast_json(object) }
continuation.write(Bytes[0x7a, meta.size]) .try { |i| Protodec::Any.from_json(i) }
continuation.print(meta) .try { |i| Base64.urlsafe_encode(i) }
.try { |i| URI.encode_www_form(i) }
continuation.rewind return "/browse_ajax?continuation=#{continuation}&gl=US&hl=en"
meta = Base64.urlsafe_encode(continuation.to_slice) end
meta = URI.escape(meta)
continuation = IO::Memory.new def get_playlist(db, plid, locale, refresh = true, force_refresh = false)
continuation.write(Bytes[0x12, ucid.size]) if plid.starts_with? "IV"
continuation.print(ucid) if playlist = db.query_one?("SELECT * FROM playlists WHERE id = $1", plid, as: InvidiousPlaylist)
continuation.write(Bytes[0x1a, meta.size]) return playlist
continuation.print(meta) else
raise "Playlist does not exist."
wrapper = IO::Memory.new end
wrapper.write(Bytes[0xe2, 0xa9, 0x85, 0xb2, 0x02, continuation.size]) else
wrapper.print(continuation) return fetch_playlist(plid, locale)
wrapper.rewind end
wrapper = Base64.urlsafe_encode(wrapper.to_slice)
wrapper = URI.escape(wrapper)
url = "/browse_ajax?continuation=#{wrapper}&gl=US&hl=en"
return url
end end
def fetch_playlist(plid, locale) def fetch_playlist(plid, locale)
client = make_client(YT_URL)
if plid.starts_with? "UC" if plid.starts_with? "UC"
plid = "UU#{plid.lchop("UC")}" plid = "UU#{plid.lchop("UC")}"
end end
response = client.get("/playlist?list=#{plid}&hl=en&disable_polymer=1") response = YT_POOL.client &.get("/playlist?list=#{plid}&hl=en&disable_polymer=1")
if response.status_code != 200 if response.status_code != 200
raise translate(locale, "Not a playlist.") raise translate(locale, "Not a playlist.")
end end
@@ -216,6 +385,9 @@ def fetch_playlist(plid, locale)
description_html = document.xpath_node(%q(//span[@class="pl-header-description-text"]/div/div[1])).try &.to_s || description_html = document.xpath_node(%q(//span[@class="pl-header-description-text"]/div/div[1])).try &.to_s ||
document.xpath_node(%q(//span[@class="pl-header-description-text"])).try &.to_s || "" document.xpath_node(%q(//span[@class="pl-header-description-text"])).try &.to_s || ""
playlist_thumbnail = document.xpath_node(%q(//div[@class="pl-header-thumb"]/img)).try &.["data-thumb"]? ||
document.xpath_node(%q(//div[@class="pl-header-thumb"]/img)).try &.["src"]
# YouTube allows anonymous playlists, so most of this can be empty or optional # YouTube allows anonymous playlists, so most of this can be empty or optional
anchor = document.xpath_node(%q(//ul[@class="pl-header-details"])) anchor = document.xpath_node(%q(//ul[@class="pl-header-details"]))
author = anchor.try &.xpath_node(%q(.//li[1]/a)).try &.content author = anchor.try &.xpath_node(%q(.//li[1]/a)).try &.content
@@ -227,15 +399,12 @@ def fetch_playlist(plid, locale)
video_count = anchor.try &.xpath_node(%q(.//li[2])).try &.content.gsub(/\D/, "").to_i? video_count = anchor.try &.xpath_node(%q(.//li[2])).try &.content.gsub(/\D/, "").to_i?
video_count ||= 0 video_count ||= 0
views = anchor.try &.xpath_node(%q(.//li[3])).try &.content.delete("No views, ").to_i64?
views = anchor.try &.xpath_node(%q(.//li[3])).try &.content.gsub(/\D/, "").to_i64?
views ||= 0_i64 views ||= 0_i64
updated = anchor.try &.xpath_node(%q(.//li[4])).try &.content.lchop("Last updated on ").lchop("Updated ") updated = anchor.try &.xpath_node(%q(.//li[4])).try &.content.lchop("Last updated on ").lchop("Updated ").try { |date| decode_date(date) }
if updated updated ||= Time.utc
updated = decode_date(updated)
else
updated = Time.utc
end
playlist = Playlist.new( playlist = Playlist.new(
title: title, title: title,
@@ -246,12 +415,64 @@ def fetch_playlist(plid, locale)
description_html: description_html, description_html: description_html,
video_count: video_count, video_count: video_count,
views: views, views: views,
updated: updated updated: updated,
thumbnail: playlist_thumbnail,
) )
return playlist return playlist
end end
def get_playlist_videos(db, playlist, offset, locale = nil, continuation = nil)
if playlist.is_a? InvidiousPlaylist
if !offset
index = PG_DB.query_one?("SELECT index FROM playlist_videos WHERE plid = $1 AND id = $2 LIMIT 1", playlist.id, continuation, as: Int64)
offset = playlist.index.index(index) || 0
end
db.query_all("SELECT * FROM playlist_videos WHERE plid = $1 ORDER BY array_position($2, index) LIMIT 100 OFFSET $3", playlist.id, playlist.index, offset, as: PlaylistVideo)
else
fetch_playlist_videos(playlist.id, playlist.video_count, offset, locale, continuation)
end
end
def fetch_playlist_videos(plid, video_count, offset = 0, locale = nil, continuation = nil)
if continuation
html = YT_POOL.client &.get("/watch?v=#{continuation}&list=#{plid}&gl=US&hl=en&disable_polymer=1&has_verified=1&bpctr=9999999999")
html = XML.parse_html(html.body)
index = html.xpath_node(%q(//span[@id="playlist-current-index"])).try &.content.to_i?.try &.- 1
offset = index || offset
end
if video_count > 100
url = produce_playlist_url(plid, offset)
response = YT_POOL.client &.get(url)
response = JSON.parse(response.body)
if !response["content_html"]? || response["content_html"].as_s.empty?
raise translate(locale, "Empty playlist")
end
document = XML.parse_html(response["content_html"].as_s)
nodeset = document.xpath_nodes(%q(.//tr[contains(@class, "pl-video")]))
videos = extract_playlist(plid, nodeset, offset)
elsif offset > 100
return [] of PlaylistVideo
else # Extract first page of videos
response = YT_POOL.client &.get("/playlist?list=#{plid}&gl=US&hl=en&disable_polymer=1")
document = XML.parse_html(response.body)
nodeset = document.xpath_nodes(%q(.//tr[contains(@class, "pl-video")]))
videos = extract_playlist(plid, nodeset, 0)
end
until videos.empty? || videos[0].index == offset
videos.shift
end
return videos
end
def template_playlist(playlist) def template_playlist(playlist)
html = <<-END_HTML html = <<-END_HTML
<h3> <h3>

View File

@@ -1,11 +1,13 @@
struct SearchVideo struct SearchVideo
def to_xml(host_url, auto_generated, xml : XML::Builder) def to_xml(host_url, auto_generated, query_params, xml : XML::Builder)
query_params["v"] = self.id
xml.element("entry") do xml.element("entry") do
xml.element("id") { xml.text "yt:video:#{self.id}" } xml.element("id") { xml.text "yt:video:#{self.id}" }
xml.element("yt:videoId") { xml.text self.id } xml.element("yt:videoId") { xml.text self.id }
xml.element("yt:channelId") { xml.text self.ucid } xml.element("yt:channelId") { xml.text self.ucid }
xml.element("title") { xml.text self.title } xml.element("title") { xml.text self.title }
xml.element("link", rel: "alternate", href: "#{host_url}/watch?v=#{self.id}") xml.element("link", rel: "alternate", href: "#{host_url}/watch?#{query_params}")
xml.element("author") do xml.element("author") do
if auto_generated if auto_generated
@@ -19,9 +21,11 @@ struct SearchVideo
xml.element("content", type: "xhtml") do xml.element("content", type: "xhtml") do
xml.element("div", xmlns: "http://www.w3.org/1999/xhtml") do xml.element("div", xmlns: "http://www.w3.org/1999/xhtml") do
xml.element("a", href: "#{host_url}/watch?v=#{self.id}") do xml.element("a", href: "#{host_url}/watch?#{query_params}") do
xml.element("img", src: "#{host_url}/vi/#{self.id}/mqdefault.jpg") xml.element("img", src: "#{host_url}/vi/#{self.id}/mqdefault.jpg")
end end
xml.element("p", style: "word-break:break-word;white-space:pre-wrap") { xml.text html_to_content(self.description_html) }
end end
end end
@@ -40,12 +44,12 @@ struct SearchVideo
end end
end end
def to_xml(host_url, auto_generated, xml : XML::Builder | Nil = nil) def to_xml(host_url, auto_generated, query_params, xml : XML::Builder | Nil = nil)
if xml if xml
to_xml(host_url, auto_generated, xml) to_xml(host_url, auto_generated, query_params, xml)
else else
XML.build do |json| XML.build do |json|
to_xml(host_url, auto_generated, xml) to_xml(host_url, auto_generated, query_params, xml)
end end
end end
end end
@@ -117,6 +121,7 @@ struct SearchPlaylist
json.field "type", "playlist" json.field "type", "playlist"
json.field "title", self.title json.field "title", self.title
json.field "playlistId", self.id json.field "playlistId", self.id
json.field "playlistThumbnail", self.thumbnail
json.field "author", self.author json.field "author", self.author
json.field "authorId", self.ucid json.field "authorId", self.ucid
@@ -152,13 +157,13 @@ struct SearchPlaylist
end end
db_mapping({ db_mapping({
title: String, title: String,
id: String, id: String,
author: String, author: String,
ucid: String, ucid: String,
video_count: Int32, video_count: Int32,
videos: Array(SearchPlaylistVideo), videos: Array(SearchPlaylistVideo),
thumbnail_id: String?, thumbnail: String?,
}) })
end end
@@ -176,7 +181,7 @@ struct SearchChannel
qualities.each do |quality| qualities.each do |quality|
json.object do json.object do
json.field "url", self.author_thumbnail.gsub("=s176-", "=s#{quality}-") json.field "url", self.author_thumbnail.gsub(/=\d+/, "=s#{quality}")
json.field "width", quality json.field "width", quality
json.field "height", quality json.field "height", quality
end end
@@ -184,8 +189,10 @@ struct SearchChannel
end end
end end
json.field "autoGenerated", self.auto_generated
json.field "subCount", self.subscriber_count json.field "subCount", self.subscriber_count
json.field "videoCount", self.video_count json.field "videoCount", self.video_count
json.field "description", html_to_content(self.description_html) json.field "description", html_to_content(self.description_html)
json.field "descriptionHtml", self.description_html json.field "descriptionHtml", self.description_html
end end
@@ -208,26 +215,25 @@ struct SearchChannel
subscriber_count: Int32, subscriber_count: Int32,
video_count: Int32, video_count: Int32,
description_html: String, description_html: String,
auto_generated: Bool,
}) })
end end
alias SearchItem = SearchVideo | SearchChannel | SearchPlaylist alias SearchItem = SearchVideo | SearchChannel | SearchPlaylist
def channel_search(query, page, channel) def channel_search(query, page, channel)
client = make_client(YT_URL) response = YT_POOL.client &.get("/channel/#{channel}?disable_polymer=1&hl=en&gl=US")
response = client.get("/channel/#{channel}?disable_polymer=1&hl=en&gl=US")
document = XML.parse_html(response.body) document = XML.parse_html(response.body)
canonical = document.xpath_node(%q(//link[@rel="canonical"])) canonical = document.xpath_node(%q(//link[@rel="canonical"]))
if !canonical if !canonical
response = client.get("/c/#{channel}?disable_polymer=1&hl=en&gl=US") response = YT_POOL.client &.get("/c/#{channel}?disable_polymer=1&hl=en&gl=US")
document = XML.parse_html(response.body) document = XML.parse_html(response.body)
canonical = document.xpath_node(%q(//link[@rel="canonical"])) canonical = document.xpath_node(%q(//link[@rel="canonical"]))
end end
if !canonical if !canonical
response = client.get("/user/#{channel}?disable_polymer=1&hl=en&gl=US") response = YT_POOL.client &.get("/user/#{channel}?disable_polymer=1&hl=en&gl=US")
document = XML.parse_html(response.body) document = XML.parse_html(response.body)
canonical = document.xpath_node(%q(//link[@rel="canonical"])) canonical = document.xpath_node(%q(//link[@rel="canonical"]))
end end
@@ -239,7 +245,7 @@ def channel_search(query, page, channel)
ucid = canonical["href"].split("/")[-1] ucid = canonical["href"].split("/")[-1]
url = produce_channel_search_url(ucid, query, page) url = produce_channel_search_url(ucid, query, page)
response = client.get(url) response = YT_POOL.client &.get(url)
json = JSON.parse(response.body) json = JSON.parse(response.body)
if json["content_html"]? && !json["content_html"].as_s.empty? if json["content_html"]? && !json["content_html"].as_s.empty?
@@ -257,12 +263,11 @@ def channel_search(query, page, channel)
end end
def search(query, page = 1, search_params = produce_search_params(content_type: "all"), region = nil) def search(query, page = 1, search_params = produce_search_params(content_type: "all"), region = nil)
client = make_client(YT_URL, region)
if query.empty? if query.empty?
return {0, [] of SearchItem} return {0, [] of SearchItem}
end end
html = client.get("/results?q=#{URI.escape(query)}&page=#{page}&sp=#{search_params}&hl=en&disable_polymer=1").body html = YT_POOL.client(region, &.get("/results?q=#{URI.encode_www_form(query)}&page=#{page}&sp=#{search_params}&hl=en&disable_polymer=1").body)
if html.empty? if html.empty?
return {0, [] of SearchItem} return {0, [] of SearchItem}
end end
@@ -276,143 +281,185 @@ end
def produce_search_params(sort : String = "relevance", date : String = "", content_type : String = "", def produce_search_params(sort : String = "relevance", date : String = "", content_type : String = "",
duration : String = "", features : Array(String) = [] of String) duration : String = "", features : Array(String) = [] of String)
head = "\x08" object = {
head += case sort "1:varint" => 0_i64,
when "relevance" "2:embedded" => {} of String => Int64,
"\x00" }
when "rating"
"\x01"
when "upload_date", "date"
"\x02"
when "view_count", "views"
"\x03"
else
raise "No sort #{sort}"
end
body = "" case sort
body += case date when "relevance"
when "hour" object["1:varint"] = 0_i64
"\x08\x01" when "rating"
when "today" object["1:varint"] = 1_i64
"\x08\x02" when "upload_date", "date"
when "week" object["1:varint"] = 2_i64
"\x08\x03" when "view_count", "views"
when "month" object["1:varint"] = 3_i64
"\x08\x04" else
when "year" raise "No sort #{sort}"
"\x08\x05" end
else
""
end
body += case content_type case date
when "video" when "hour"
"\x10\x01" object["2:embedded"].as(Hash)["1:varint"] = 1_i64
when "channel" when "today"
"\x10\x02" object["2:embedded"].as(Hash)["1:varint"] = 2_i64
when "playlist" when "week"
"\x10\x03" object["2:embedded"].as(Hash)["1:varint"] = 3_i64
when "movie" when "month"
"\x10\x04" object["2:embedded"].as(Hash)["1:varint"] = 4_i64
when "show" when "year"
"\x10\x05" object["2:embedded"].as(Hash)["1:varint"] = 5_i64
when "all" end
""
else
"\x10\x01"
end
body += case duration case content_type
when "short" when "video"
"\x18\x01" object["2:embedded"].as(Hash)["2:varint"] = 1_i64
when "long" when "channel"
"\x18\x02" object["2:embedded"].as(Hash)["2:varint"] = 2_i64
else when "playlist"
"" object["2:embedded"].as(Hash)["2:varint"] = 3_i64
end when "movie"
object["2:embedded"].as(Hash)["2:varint"] = 4_i64
when "show"
object["2:embedded"].as(Hash)["2:varint"] = 5_i64
when "all"
#
else
object["2:embedded"].as(Hash)["2:varint"] = 1_i64
end
case duration
when "short"
object["2:embedded"].as(Hash)["3:varint"] = 1_i64
when "long"
object["2:embedded"].as(Hash)["3:varint"] = 2_i64
end
features.each do |feature| features.each do |feature|
body += case feature case feature
when "hd" when "hd"
"\x20\x01" object["2:embedded"].as(Hash)["4:varint"] = 1_i64
when "subtitles" when "subtitles"
"\x28\x01" object["2:embedded"].as(Hash)["5:varint"] = 1_i64
when "creative_commons", "cc" when "creative_commons", "cc"
"\x30\x01" object["2:embedded"].as(Hash)["6:varint"] = 1_i64
when "3d" when "3d"
"\x38\x01" object["2:embedded"].as(Hash)["7:varint"] = 1_i64
when "live", "livestream" when "live", "livestream"
"\x40\x01" object["2:embedded"].as(Hash)["8:varint"] = 1_i64
when "purchased" when "purchased"
"\x48\x01" object["2:embedded"].as(Hash)["9:varint"] = 1_i64
when "4k" when "4k"
"\x70\x01" object["2:embedded"].as(Hash)["14:varint"] = 1_i64
when "360" when "360"
"\x78\x01" object["2:embedded"].as(Hash)["15:varint"] = 1_i64
when "location" when "location"
"\xb8\x01\x01" object["2:embedded"].as(Hash)["23:varint"] = 1_i64
when "hdr" when "hdr"
"\xc8\x01\x01" object["2:embedded"].as(Hash)["25:varint"] = 1_i64
else end
raise "Unknown feature #{feature}"
end
end end
if !body.empty? if object["2:embedded"].as(Hash).empty?
token = head + "\x12" + body.size.unsafe_chr + body object.delete("2:embedded")
else
token = head
end end
token = Base64.urlsafe_encode(token) params = object.try { |i| Protodec::Any.cast_json(object) }
token = URI.escape(token) .try { |i| Protodec::Any.from_json(i) }
.try { |i| Base64.urlsafe_encode(i) }
.try { |i| URI.encode_www_form(i) }
return token return params
end end
def produce_channel_search_url(ucid, query, page) def produce_channel_search_url(ucid, query, page)
page = "#{page}" object = {
"80226972:embedded" => {
"2:string" => ucid,
"3:base64" => {
"2:string" => "search",
"6:varint" => 2_i64,
"7:varint" => 1_i64,
"12:varint" => 1_i64,
"13:string" => "",
"23:varint" => 0_i64,
"15:string" => "#{page}",
},
"11:string" => query,
},
}
meta = IO::Memory.new continuation = object.try { |i| Protodec::Any.cast_json(object) }
meta.write(Bytes[0x12, 0x06]) .try { |i| Protodec::Any.from_json(i) }
meta.print("search") .try { |i| Base64.urlsafe_encode(i) }
.try { |i| URI.encode_www_form(i) }
meta.write(Bytes[0x30, 0x02]) return "/browse_ajax?continuation=#{continuation}&gl=US&hl=en"
meta.write(Bytes[0x38, 0x01]) end
meta.write(Bytes[0x60, 0x01])
meta.write(Bytes[0x6a, 0x00]) def process_search_query(query, page, user, region)
meta.write(Bytes[0xb8, 0x01, 0x00]) if user
user = user.as(User)
meta.write(Bytes[0x7a, page.size]) view_name = "subscriptions_#{sha256(user.email)}"
meta.print(page) end
meta.rewind channel = nil
meta = Base64.urlsafe_encode(meta.to_slice) content_type = "all"
meta = URI.escape(meta) date = ""
duration = ""
continuation = IO::Memory.new features = [] of String
continuation.write(Bytes[0x12, ucid.size]) sort = "relevance"
continuation.print(ucid) subscriptions = nil
continuation.write(Bytes[0x1a, meta.size]) operators = query.split(" ").select { |a| a.match(/\w+:[\w,]+/) }
continuation.print(meta) operators.each do |operator|
key, value = operator.downcase.split(":")
continuation.write(Bytes[0x5a, query.size])
continuation.print(query) case key
when "channel", "user"
continuation.rewind channel = operator.split(":")[-1]
continuation = continuation.gets_to_end when "content_type", "type"
content_type = value
wrapper = IO::Memory.new when "date"
wrapper.write(Bytes[0xe2, 0xa9, 0x85, 0xb2, 0x02, continuation.size]) date = value
wrapper.print(continuation) when "duration"
wrapper.rewind duration = value
when "feature", "features"
wrapper = Base64.urlsafe_encode(wrapper.to_slice) features = value.split(",")
wrapper = URI.escape(wrapper) when "sort"
sort = value
url = "/browse_ajax?continuation=#{wrapper}&gl=US&hl=en" when "subscriptions"
subscriptions = value == "true"
return url else
operators.delete(operator)
end
end
search_query = (query.split(" ") - operators).join(" ")
if channel
count, items = channel_search(search_query, page, channel)
elsif subscriptions
if view_name
items = PG_DB.query_all("SELECT id,title,published,updated,ucid,author,length_seconds FROM (
SELECT *,
to_tsvector(#{view_name}.title) ||
to_tsvector(#{view_name}.author)
as document
FROM #{view_name}
) v_search WHERE v_search.document @@ plainto_tsquery($1) LIMIT 20 OFFSET $2;", search_query, (page - 1) * 20, as: ChannelVideo)
count = items.size
else
items = [] of ChannelVideo
count = 0
end
else
search_params = produce_search_params(sort: sort, date: date, content_type: content_type,
duration: duration, features: features)
count, items = search(search_query, page, search_params, region).as(Tuple)
end
{search_query, count, items}
end end

View File

@@ -1,5 +1,4 @@
def fetch_trending(trending_type, region, locale) def fetch_trending(trending_type, region, locale)
client = make_client(YT_URL)
headers = HTTP::Headers.new headers = HTTP::Headers.new
headers["User-Agent"] = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36" headers["User-Agent"] = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
@@ -12,7 +11,7 @@ def fetch_trending(trending_type, region, locale)
if trending_type && trending_type != "Default" if trending_type && trending_type != "Default"
trending_type = trending_type.downcase.capitalize trending_type = trending_type.downcase.capitalize
response = client.get("/feed/trending?gl=#{region}&hl=en", headers).body response = YT_POOL.client &.get("/feed/trending?gl=#{region}&hl=en", headers).body
initial_data = extract_initial_data(response) initial_data = extract_initial_data(response)
@@ -23,13 +22,13 @@ def fetch_trending(trending_type, region, locale)
url["channelListSubMenuAvatarRenderer"]["navigationEndpoint"]["commandMetadata"]["webCommandMetadata"]["url"] url["channelListSubMenuAvatarRenderer"]["navigationEndpoint"]["commandMetadata"]["webCommandMetadata"]["url"]
url = url["channelListSubMenuAvatarRenderer"]["navigationEndpoint"]["commandMetadata"]["webCommandMetadata"]["url"].as_s url = url["channelListSubMenuAvatarRenderer"]["navigationEndpoint"]["commandMetadata"]["webCommandMetadata"]["url"].as_s
url += "&disable_polymer=1&gl=#{region}&hl=en" url += "&disable_polymer=1&gl=#{region}&hl=en"
trending = client.get(url).body trending = YT_POOL.client &.get(url).body
plid = extract_plid(url) plid = extract_plid(url)
else else
trending = client.get("/feed/trending?gl=#{region}&hl=en&disable_polymer=1").body trending = YT_POOL.client &.get("/feed/trending?gl=#{region}&hl=en&disable_polymer=1").body
end end
else else
trending = client.get("/feed/trending?gl=#{region}&hl=en&disable_polymer=1").body trending = YT_POOL.client &.get("/feed/trending?gl=#{region}&hl=en&disable_polymer=1").body
end end
trending = XML.parse_html(trending) trending = XML.parse_html(trending)
@@ -42,7 +41,7 @@ end
def extract_plid(url) def extract_plid(url)
wrapper = HTTP::Params.parse(URI.parse(url).query.not_nil!)["bp"] wrapper = HTTP::Params.parse(URI.parse(url).query.not_nil!)["bp"]
wrapper = URI.unescape(wrapper) wrapper = URI.decode_www_form(wrapper)
wrapper = Base64.decode(wrapper) wrapper = Base64.decode(wrapper)
# 0xe2 0x02 0x2e # 0xe2 0x02 0x2e

View File

@@ -31,62 +31,6 @@ struct User
end end
struct Preferences struct Preferences
module StringToArray
def self.to_json(value : Array(String), json : JSON::Builder)
json.array do
value.each do |element|
json.string element
end
end
end
def self.from_json(value : JSON::PullParser) : Array(String)
begin
result = [] of String
value.read_array do
result << HTML.escape(value.read_string[0, 100])
end
rescue ex
result = [HTML.escape(value.read_string[0, 100]), ""]
end
result
end
def self.to_yaml(value : Array(String), yaml : YAML::Nodes::Builder)
yaml.sequence do
value.each do |element|
yaml.scalar element
end
end
end
def self.from_yaml(ctx : YAML::ParseContext, node : YAML::Nodes::Node) : Array(String)
begin
unless node.is_a?(YAML::Nodes::Sequence)
node.raise "Expected sequence, not #{node.class}"
end
result = [] of String
node.nodes.each do |item|
unless item.is_a?(YAML::Nodes::Scalar)
node.raise "Expected scalar, not #{item.class}"
end
result << HTML.escape(item.value[0, 100])
end
rescue ex
if node.is_a?(YAML::Nodes::Scalar)
result = [HTML.escape(node.value[0, 100]), ""]
else
result = ["", ""]
end
end
result
end
end
module ProcessString module ProcessString
def self.to_json(value : String, json : JSON::Builder) def self.to_json(value : String, json : JSON::Builder)
json.string value json.string value
@@ -127,19 +71,21 @@ struct Preferences
annotations: {type: Bool, default: CONFIG.default_user_preferences.annotations}, annotations: {type: Bool, default: CONFIG.default_user_preferences.annotations},
annotations_subscribed: {type: Bool, default: CONFIG.default_user_preferences.annotations_subscribed}, annotations_subscribed: {type: Bool, default: CONFIG.default_user_preferences.annotations_subscribed},
autoplay: {type: Bool, default: CONFIG.default_user_preferences.autoplay}, autoplay: {type: Bool, default: CONFIG.default_user_preferences.autoplay},
captions: {type: Array(String), default: CONFIG.default_user_preferences.captions, converter: StringToArray}, captions: {type: Array(String), default: CONFIG.default_user_preferences.captions, converter: ConfigPreferences::StringToArray},
comments: {type: Array(String), default: CONFIG.default_user_preferences.comments, converter: StringToArray}, comments: {type: Array(String), default: CONFIG.default_user_preferences.comments, converter: ConfigPreferences::StringToArray},
continue: {type: Bool, default: CONFIG.default_user_preferences.continue}, continue: {type: Bool, default: CONFIG.default_user_preferences.continue},
continue_autoplay: {type: Bool, default: CONFIG.default_user_preferences.continue_autoplay}, continue_autoplay: {type: Bool, default: CONFIG.default_user_preferences.continue_autoplay},
dark_mode: {type: Bool, default: CONFIG.default_user_preferences.dark_mode}, dark_mode: {type: String, default: CONFIG.default_user_preferences.dark_mode, converter: ConfigPreferences::BoolToString},
latest_only: {type: Bool, default: CONFIG.default_user_preferences.latest_only}, latest_only: {type: Bool, default: CONFIG.default_user_preferences.latest_only},
listen: {type: Bool, default: CONFIG.default_user_preferences.listen}, listen: {type: Bool, default: CONFIG.default_user_preferences.listen},
local: {type: Bool, default: CONFIG.default_user_preferences.local}, local: {type: Bool, default: CONFIG.default_user_preferences.local},
locale: {type: String, default: CONFIG.default_user_preferences.locale, converter: ProcessString}, locale: {type: String, default: CONFIG.default_user_preferences.locale, converter: ProcessString},
max_results: {type: Int32, default: CONFIG.default_user_preferences.max_results, converter: ClampInt}, max_results: {type: Int32, default: CONFIG.default_user_preferences.max_results, converter: ClampInt},
notifications_only: {type: Bool, default: CONFIG.default_user_preferences.notifications_only}, notifications_only: {type: Bool, default: CONFIG.default_user_preferences.notifications_only},
player_style: {type: String, default: CONFIG.default_user_preferences.player_style, converter: ProcessString},
quality: {type: String, default: CONFIG.default_user_preferences.quality, converter: ProcessString}, quality: {type: String, default: CONFIG.default_user_preferences.quality, converter: ProcessString},
redirect_feed: {type: Bool, default: CONFIG.default_user_preferences.redirect_feed}, default_home: {type: String, default: CONFIG.default_user_preferences.default_home},
feed_menu: {type: Array(String), default: CONFIG.default_user_preferences.feed_menu},
related_videos: {type: Bool, default: CONFIG.default_user_preferences.related_videos}, related_videos: {type: Bool, default: CONFIG.default_user_preferences.related_videos},
sort: {type: String, default: CONFIG.default_user_preferences.sort, converter: ProcessString}, sort: {type: String, default: CONFIG.default_user_preferences.sort, converter: ProcessString},
speed: {type: Float32, default: CONFIG.default_user_preferences.speed}, speed: {type: Float32, default: CONFIG.default_user_preferences.speed},
@@ -162,7 +108,7 @@ def get_user(sid, headers, db, refresh = true)
args = arg_array(user_array) args = arg_array(user_array)
db.exec("INSERT INTO users VALUES (#{args}) \ db.exec("INSERT INTO users VALUES (#{args}) \
ON CONFLICT (email) DO UPDATE SET updated = $1, subscriptions = $3", user_array) ON CONFLICT (email) DO UPDATE SET updated = $1, subscriptions = $3", args: user_array)
db.exec("INSERT INTO session_ids VALUES ($1,$2,$3) \ db.exec("INSERT INTO session_ids VALUES ($1,$2,$3) \
ON CONFLICT (id) DO NOTHING", sid, user.email, Time.utc) ON CONFLICT (id) DO NOTHING", sid, user.email, Time.utc)
@@ -181,7 +127,7 @@ def get_user(sid, headers, db, refresh = true)
args = arg_array(user.to_a) args = arg_array(user.to_a)
db.exec("INSERT INTO users VALUES (#{args}) \ db.exec("INSERT INTO users VALUES (#{args}) \
ON CONFLICT (email) DO UPDATE SET updated = $1, subscriptions = $3", user_array) ON CONFLICT (email) DO UPDATE SET updated = $1, subscriptions = $3", args: user_array)
db.exec("INSERT INTO session_ids VALUES ($1,$2,$3) \ db.exec("INSERT INTO session_ids VALUES ($1,$2,$3) \
ON CONFLICT (id) DO NOTHING", sid, user.email, Time.utc) ON CONFLICT (id) DO NOTHING", sid, user.email, Time.utc)
@@ -197,8 +143,7 @@ def get_user(sid, headers, db, refresh = true)
end end
def fetch_user(sid, headers, db) def fetch_user(sid, headers, db)
client = make_client(YT_URL) feed = YT_POOL.client &.get("/subscription_manager?disable_polymer=1", headers)
feed = client.get("/subscription_manager?disable_polymer=1", headers)
feed = XML.parse_html(feed.body) feed = XML.parse_html(feed.body)
channels = [] of String channels = [] of String
@@ -250,7 +195,7 @@ def generate_captcha(key, db)
end end
clock_svg = <<-END_SVG clock_svg = <<-END_SVG
<svg viewBox="0 0 100 100" width="200px"> <svg viewBox="0 0 100 100" width="200px" height="200px">
<circle cx="50" cy="50" r="45" fill="#eee" stroke="black" stroke-width="2"></circle> <circle cx="50" cy="50" r="45" fill="#eee" stroke="black" stroke-width="2"></circle>
<text x="69" y="20.091" text-anchor="middle" fill="black" font-family="Arial" font-size="10px"> 1</text> <text x="69" y="20.091" text-anchor="middle" fill="black" font-family="Arial" font-size="10px"> 1</text>
@@ -274,7 +219,7 @@ def generate_captcha(key, db)
END_SVG END_SVG
image = "" image = ""
convert = Process.run(%(convert -density 1200 -resize 400x400 -background none svg:- png:-), shell: true, convert = Process.run(%(rsvg-convert -w 400 -h 400 -b none -f png), shell: true,
input: IO::Memory.new(clock_svg), output: Process::Redirect::Pipe) do |proc| input: IO::Memory.new(clock_svg), output: Process::Redirect::Pipe) do |proc|
image = proc.output.gets_to_end image = proc.output.gets_to_end
image = Base64.strict_encode(image) image = Base64.strict_encode(image)
@@ -308,8 +253,7 @@ def subscribe_ajax(channel_id, action, env_headers)
headers = HTTP::Headers.new headers = HTTP::Headers.new
headers["Cookie"] = env_headers["Cookie"] headers["Cookie"] = env_headers["Cookie"]
client = make_client(YT_URL) html = YT_POOL.client &.get("/subscription_manager?disable_polymer=1", headers)
html = client.get("/subscription_manager?disable_polymer=1", headers)
cookies = HTTP::Cookies.from_headers(headers) cookies = HTTP::Cookies.from_headers(headers)
html.cookies.each do |cookie| html.cookies.each do |cookie|
@@ -333,10 +277,52 @@ def subscribe_ajax(channel_id, action, env_headers)
} }
post_url = "/subscription_ajax?#{action}=1&c=#{channel_id}" post_url = "/subscription_ajax?#{action}=1&c=#{channel_id}"
client.post(post_url, headers, form: post_req) YT_POOL.client &.post(post_url, headers, form: post_req)
end end
end end
# TODO: Playlist stub, sync with YouTube for Google accounts
# def playlist_ajax(video_ids, source_playlist_id, name, privacy, action, env_headers)
# headers = HTTP::Headers.new
# headers["Cookie"] = env_headers["Cookie"]
#
# html = YT_POOL.client &.get("/view_all_playlists?disable_polymer=1", headers)
#
# cookies = HTTP::Cookies.from_headers(headers)
# html.cookies.each do |cookie|
# if {"VISITOR_INFO1_LIVE", "YSC", "SIDCC"}.includes? cookie.name
# if cookies[cookie.name]?
# cookies[cookie.name] = cookie
# else
# cookies << cookie
# end
# end
# end
# headers = cookies.add_request_headers(headers)
#
# if match = html.body.match(/'XSRF_TOKEN': "(?<session_token>[A-Za-z0-9\_\-\=]+)"/)
# session_token = match["session_token"]
#
# headers["content-type"] = "application/x-www-form-urlencoded"
#
# post_req = {
# video_ids: [] of String,
# source_playlist_id: "",
# n: name,
# p: privacy,
# session_token: session_token,
# }
# post_url = "/playlist_ajax?#{action}=1"
#
# response = client.post(post_url, headers, form: post_req)
# if response.status_code == 200
# return JSON.parse(response.body)["result"]["playlistId"].as_s
# else
# return nil
# end
# end
# end
def get_subscription_feed(db, user, max_results = 40, page = 1) def get_subscription_feed(db, user, max_results = 40, page = 1)
limit = max_results.clamp(0, MAX_ITEMS_PER_PAGE) limit = max_results.clamp(0, MAX_ITEMS_PER_PAGE)
offset = (page - 1) * limit offset = (page - 1) * limit
@@ -350,8 +336,7 @@ def get_subscription_feed(db, user, max_results = 40, page = 1)
args = arg_array(notifications) args = arg_array(notifications)
notifications = db.query_all("SELECT * FROM channel_videos WHERE id IN (#{args}) notifications = db.query_all("SELECT * FROM channel_videos WHERE id IN (#{args}) ORDER BY published DESC", args: notifications, as: ChannelVideo)
ORDER BY published DESC", notifications, as: ChannelVideo)
videos = [] of ChannelVideo videos = [] of ChannelVideo
notifications.sort_by! { |video| video.published }.reverse! notifications.sort_by! { |video| video.published }.reverse!
@@ -377,14 +362,11 @@ def get_subscription_feed(db, user, max_results = 40, page = 1)
else else
values = "VALUES #{user.watched.map { |id| %(('#{id}')) }.join(",")}" values = "VALUES #{user.watched.map { |id| %(('#{id}')) }.join(",")}"
end end
videos = PG_DB.query_all("SELECT DISTINCT ON (ucid) * FROM #{view_name} WHERE \ videos = PG_DB.query_all("SELECT DISTINCT ON (ucid) * FROM #{view_name} WHERE NOT id = ANY (#{values}) ORDER BY ucid, published DESC", as: ChannelVideo)
NOT id = ANY (#{values}) \
ORDER BY ucid, published DESC", as: ChannelVideo)
else else
# Show latest video from each channel # Show latest video from each channel
videos = PG_DB.query_all("SELECT DISTINCT ON (ucid) * FROM #{view_name} \ videos = PG_DB.query_all("SELECT DISTINCT ON (ucid) * FROM #{view_name} ORDER BY ucid, published DESC", as: ChannelVideo)
ORDER BY ucid, published DESC", as: ChannelVideo)
end end
videos.sort_by! { |video| video.published }.reverse! videos.sort_by! { |video| video.published }.reverse!
@@ -397,14 +379,11 @@ def get_subscription_feed(db, user, max_results = 40, page = 1)
else else
values = "VALUES #{user.watched.map { |id| %(('#{id}')) }.join(",")}" values = "VALUES #{user.watched.map { |id| %(('#{id}')) }.join(",")}"
end end
videos = PG_DB.query_all("SELECT * FROM #{view_name} WHERE \ videos = PG_DB.query_all("SELECT * FROM #{view_name} WHERE NOT id = ANY (#{values}) ORDER BY published DESC LIMIT $1 OFFSET $2", limit, offset, as: ChannelVideo)
NOT id = ANY (#{values}) \
ORDER BY published DESC LIMIT $1 OFFSET $2", limit, offset, as: ChannelVideo)
else else
# Sort subscriptions as normal # Sort subscriptions as normal
videos = PG_DB.query_all("SELECT * FROM #{view_name} \ videos = PG_DB.query_all("SELECT * FROM #{view_name} ORDER BY published DESC LIMIT $1 OFFSET $2", limit, offset, as: ChannelVideo)
ORDER BY published DESC LIMIT $1 OFFSET $2", limit, offset, as: ChannelVideo)
end end
end end
@@ -421,16 +400,11 @@ def get_subscription_feed(db, user, max_results = 40, page = 1)
videos.sort_by! { |video| video.author }.reverse! videos.sort_by! { |video| video.author }.reverse!
end end
notifications = PG_DB.query_one("SELECT notifications FROM users WHERE email = $1", user.email, notifications = PG_DB.query_one("SELECT notifications FROM users WHERE email = $1", user.email, as: Array(String))
as: Array(String))
notifications = videos.select { |v| notifications.includes? v.id } notifications = videos.select { |v| notifications.includes? v.id }
videos = videos - notifications videos = videos - notifications
end end
if !limit
videos = videos[0..max_results]
end
return videos, notifications return videos, notifications
end end

View File

@@ -108,33 +108,7 @@ CAPTION_LANGUAGES = {
"Zulu", "Zulu",
} }
REGIONS = {"AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW"} REGIONS = {"AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW"}
BYPASS_REGIONS = {
"GB",
"DE",
"FR",
"IN",
"CN",
"RU",
"CA",
"JP",
"IT",
"TH",
"ES",
"AE",
"KR",
"IR",
"BR",
"PK",
"ID",
"BD",
"MX",
"PH",
"EG",
"VN",
"CD",
"TR",
}
# See https://github.com/rg3/youtube-dl/blob/master/youtube_dl/extractor/youtube.py#L380-#L476 # See https://github.com/rg3/youtube-dl/blob/master/youtube_dl/extractor/youtube.py#L380-#L476
VIDEO_FORMATS = { VIDEO_FORMATS = {
@@ -258,6 +232,7 @@ struct VideoPreferences
listen: Bool, listen: Bool,
local: Bool, local: Bool,
preferred_captions: Array(String), preferred_captions: Array(String),
player_style: String,
quality: String, quality: String,
raw: Bool, raw: Bool,
region: String?, region: String?,
@@ -272,6 +247,7 @@ end
struct Video struct Video
property player_json : JSON::Any? property player_json : JSON::Any?
property recommended_json : JSON::Any?
module HTTPParamConverter module HTTPParamConverter
def self.from_rs(rs) def self.from_rs(rs)
@@ -319,7 +295,7 @@ struct Video
qualities.each do |quality| qualities.each do |quality|
json.object do json.object do
json.field "url", self.author_thumbnail.gsub("=s48-", "=s#{quality}-") json.field "url", self.author_thumbnail.gsub(/=s\d+/, "=s#{quality}")
json.field "width", quality json.field "width", quality
json.field "height", quality json.field "height", quality
end end
@@ -329,7 +305,7 @@ struct Video
json.field "subCountText", self.sub_count_text json.field "subCountText", self.sub_count_text
json.field "lengthSeconds", self.info["length_seconds"].to_i json.field "lengthSeconds", self.length_seconds
json.field "allowRatings", self.allow_ratings json.field "allowRatings", self.allow_ratings
json.field "rating", self.info["avg_rating"].to_f32 json.field "rating", self.info["avg_rating"].to_f32
json.field "isListed", self.is_listed json.field "isListed", self.is_listed
@@ -340,10 +316,10 @@ struct Video
json.field "premiereTimestamp", self.premiere_timestamp.not_nil!.to_unix json.field "premiereTimestamp", self.premiere_timestamp.not_nil!.to_unix
end end
if self.player_response["streamingData"]?.try &.["hlsManifestUrl"]? if player_response["streamingData"]?.try &.["hlsManifestUrl"]?
host_url = make_host_url(config, kemal_config) host_url = make_host_url(config, kemal_config)
hlsvp = self.player_response["streamingData"]["hlsManifestUrl"].as_s hlsvp = player_response["streamingData"]["hlsManifestUrl"].as_s
hlsvp = hlsvp.gsub("https://manifest.googlevideo.com", host_url) hlsvp = hlsvp.gsub("https://manifest.googlevideo.com", host_url)
json.field "hlsUrl", hlsvp json.field "hlsUrl", hlsvp
@@ -432,7 +408,7 @@ struct Video
json.object do json.object do
json.field "label", caption.name.simpleText json.field "label", caption.name.simpleText
json.field "languageCode", caption.languageCode json.field "languageCode", caption.languageCode
json.field "url", "/api/v1/captions/#{id}?label=#{URI.escape(caption.name.simpleText)}" json.field "url", "/api/v1/captions/#{id}?label=#{URI.encode_www_form(caption.name.simpleText)}"
end end
end end
end end
@@ -450,9 +426,29 @@ struct Video
json.field "videoThumbnails" do json.field "videoThumbnails" do
generate_thumbnails(json, rv["id"], config, kemal_config) generate_thumbnails(json, rv["id"], config, kemal_config)
end end
json.field "author", rv["author"] json.field "author", rv["author"]
json.field "authorUrl", rv["author_url"]?
json.field "authorId", rv["ucid"]?
if rv["author_thumbnail"]?
json.field "authorThumbnails" do
json.array do
qualities = {32, 48, 76, 100, 176, 512}
qualities.each do |quality|
json.object do
json.field "url", rv["author_thumbnail"].gsub(/s\d+-/, "s#{quality}-")
json.field "width", quality
json.field "height", quality
end
end
end
end
end
json.field "lengthSeconds", rv["length_seconds"].to_i json.field "lengthSeconds", rv["length_seconds"].to_i
json.field "viewCountText", rv["short_view_count_text"] json.field "viewCountText", rv["short_view_count_text"]
json.field "viewCount", rv["view_count"]?.try &.to_i64
end end
end end
end end
@@ -493,7 +489,7 @@ struct Video
end end
def live_now def live_now
live_now = self.player_response["videoDetails"]?.try &.["isLive"]?.try &.as_bool live_now = player_response["videoDetails"]?.try &.["isLive"]?.try &.as_bool
if live_now.nil? if live_now.nil?
return false return false
@@ -540,7 +536,7 @@ struct Video
end end
def keywords def keywords
keywords = self.player_response["videoDetails"]?.try &.["keywords"]?.try &.as_a keywords = player_response["videoDetails"]?.try &.["keywords"]?.try &.as_a
keywords ||= [] of String keywords ||= [] of String
return keywords return keywords
@@ -549,7 +545,7 @@ struct Video
def fmt_stream(decrypt_function) def fmt_stream(decrypt_function)
streams = [] of HTTP::Params streams = [] of HTTP::Params
if fmt_streams = self.player_response["streamingData"]?.try &.["formats"]? if fmt_streams = player_response["streamingData"]?.try &.["formats"]?
fmt_streams.as_a.each do |fmt_stream| fmt_streams.as_a.each do |fmt_stream|
if !fmt_stream.as_h? if !fmt_stream.as_h?
next next
@@ -563,7 +559,14 @@ struct Video
fmt["clen"] = fmt_stream["contentLength"]?.try &.as_s || "0" fmt["clen"] = fmt_stream["contentLength"]?.try &.as_s || "0"
fmt["bitrate"] = fmt_stream["bitrate"]?.try &.as_i.to_s || "0" fmt["bitrate"] = fmt_stream["bitrate"]?.try &.as_i.to_s || "0"
fmt["itag"] = fmt_stream["itag"].as_i.to_s fmt["itag"] = fmt_stream["itag"].as_i.to_s
fmt["url"] = fmt_stream["url"].as_s if fmt_stream["url"]?
fmt["url"] = fmt_stream["url"].as_s
end
if fmt_stream["cipher"]?
HTTP::Params.parse(fmt_stream["cipher"].as_s).each do |key, value|
fmt[key] = value
end
end
fmt["quality"] = fmt_stream["quality"].as_s fmt["quality"] = fmt_stream["quality"].as_s
if fmt_stream["width"]? if fmt_stream["width"]?
@@ -616,7 +619,7 @@ struct Video
def adaptive_fmts(decrypt_function) def adaptive_fmts(decrypt_function)
adaptive_fmts = [] of HTTP::Params adaptive_fmts = [] of HTTP::Params
if fmts = self.player_response["streamingData"]?.try &.["adaptiveFormats"]? if fmts = player_response["streamingData"]?.try &.["adaptiveFormats"]?
fmts.as_a.each do |adaptive_fmt| fmts.as_a.each do |adaptive_fmt|
if !adaptive_fmt.as_h? if !adaptive_fmt.as_h?
next next
@@ -635,8 +638,14 @@ struct Video
fmt["clen"] = adaptive_fmt["contentLength"]?.try &.as_s || "0" fmt["clen"] = adaptive_fmt["contentLength"]?.try &.as_s || "0"
fmt["bitrate"] = adaptive_fmt["bitrate"]?.try &.as_i.to_s || "0" fmt["bitrate"] = adaptive_fmt["bitrate"]?.try &.as_i.to_s || "0"
fmt["itag"] = adaptive_fmt["itag"].as_i.to_s fmt["itag"] = adaptive_fmt["itag"].as_i.to_s
fmt["url"] = adaptive_fmt["url"].as_s if adaptive_fmt["url"]?
fmt["url"] = adaptive_fmt["url"].as_s
end
if adaptive_fmt["cipher"]?
HTTP::Params.parse(adaptive_fmt["cipher"].as_s).each do |key, value|
fmt[key] = value
end
end
if index = adaptive_fmt["indexRange"]? if index = adaptive_fmt["indexRange"]?
fmt["index"] = "#{index["start"]}-#{index["end"]}" fmt["index"] = "#{index["start"]}-#{index["end"]}"
end end
@@ -698,25 +707,23 @@ struct Video
end end
def player_response def player_response
if !@player_json @player_json = JSON.parse(@info["player_response"]) if !@player_json
@player_json = JSON.parse(@info["player_response"]) @player_json.not_nil!
end
return @player_json.not_nil!
end end
def storyboards def storyboards
storyboards = self.player_response["storyboards"]? storyboards = player_response["storyboards"]?
.try &.as_h .try &.as_h
.try &.["playerStoryboardSpecRenderer"]? .try &.["playerStoryboardSpecRenderer"]?
.try &.["spec"]?
.try &.as_s.split("|")
if !storyboards if !storyboards
storyboards = self.player_response["storyboards"]? if storyboard = player_response["storyboards"]?
.try &.as_h .try &.as_h
.try &.["playerLiveStoryboardSpecRenderer"]? .try &.["playerLiveStoryboardSpecRenderer"]?
.try &.["spec"]?
if storyboard = storyboards.try &.["spec"]? .try &.as_s
.try &.as_s
return [{ return [{
url: storyboard.split("#")[0], url: storyboard.split("#")[0],
width: 106, width: 106,
@@ -730,9 +737,6 @@ struct Video
end end
end end
storyboards = storyboards.try &.["spec"]?
.try &.as_s.split("|")
items = [] of NamedTuple( items = [] of NamedTuple(
url: String, url: String,
width: Int32, width: Int32,
@@ -761,6 +765,7 @@ struct Video
interval = interval.to_i interval = interval.to_i
storyboard_width = storyboard_width.to_i storyboard_width = storyboard_width.to_i
storyboard_height = storyboard_height.to_i storyboard_height = storyboard_height.to_i
storyboard_count = (count / (storyboard_width * storyboard_height)).ceil.to_i
items << { items << {
url: url.to_s.sub("$L", i).sub("$N", "M$M"), url: url.to_s.sub("$L", i).sub("$N", "M$M"),
@@ -770,7 +775,7 @@ struct Video
interval: interval, interval: interval,
storyboard_width: storyboard_width, storyboard_width: storyboard_width,
storyboard_height: storyboard_height, storyboard_height: storyboard_height,
storyboard_count: (count.to_f / (storyboard_width.to_f * storyboard_height.to_f)).ceil.to_i, storyboard_count: storyboard_count,
} }
end end
@@ -778,20 +783,18 @@ struct Video
end end
def paid def paid
reason = self.player_response["playabilityStatus"]?.try &.["reason"]? reason = player_response["playabilityStatus"]?.try &.["reason"]?
paid = reason == "This video requires payment to watch." ? true : false
if reason == "This video requires payment to watch."
paid = true
else
paid = false
end
return paid return paid
end end
def premium def premium
premium = self.player_response.to_s.includes? "Get YouTube without the ads." if info["premium"]?
return premium self.info["premium"] == "true"
else
false
end
end end
def captions def captions
@@ -827,7 +830,7 @@ struct Video
end end
def length_seconds def length_seconds
return self.info["length_seconds"].to_i player_response["videoDetails"]["lengthSeconds"].as_s.to_i
end end
db_mapping({ db_mapping({
@@ -873,6 +876,10 @@ struct CaptionName
end end
class VideoRedirect < Exception class VideoRedirect < Exception
property video_id : String
def initialize(@video_id)
end
end end
def get_video(id, db, refresh = true, region = nil, force_refresh = false) def get_video(id, db, refresh = true, region = nil, force_refresh = false)
@@ -892,7 +899,7 @@ def get_video(id, db, refresh = true, region = nil, force_refresh = false)
db.exec("UPDATE videos SET (info,updated,title,views,likes,dislikes,wilson_score,\ db.exec("UPDATE videos SET (info,updated,title,views,likes,dislikes,wilson_score,\
published,description,language,author,ucid,allowed_regions,is_family_friendly,\ published,description,language,author,ucid,allowed_regions,is_family_friendly,\
genre,genre_url,license,sub_count_text,author_thumbnail)\ genre,genre_url,license,sub_count_text,author_thumbnail)\
= (#{args}) WHERE id = $1", video_array) = (#{args}) WHERE id = $1", args: video_array)
rescue ex rescue ex
db.exec("DELETE FROM videos * WHERE id = $1", id) db.exec("DELETE FROM videos * WHERE id = $1", id)
raise ex raise ex
@@ -905,13 +912,43 @@ def get_video(id, db, refresh = true, region = nil, force_refresh = false)
args = arg_array(video_array) args = arg_array(video_array)
if !region if !region
db.exec("INSERT INTO videos VALUES (#{args}) ON CONFLICT (id) DO NOTHING", video_array) db.exec("INSERT INTO videos VALUES (#{args}) ON CONFLICT (id) DO NOTHING", args: video_array)
end end
end end
return video return video
end end
def extract_recommended(recommended_videos)
rvs = [] of HTTP::Params
recommended_videos.try &.each do |compact_renderer|
if compact_renderer["compactRadioRenderer"]? || compact_renderer["compactPlaylistRenderer"]?
# TODO
elsif video_renderer = compact_renderer["compactVideoRenderer"]?
recommended_video = HTTP::Params.new
recommended_video["id"] = video_renderer["videoId"].as_s
recommended_video["title"] = video_renderer["title"]["simpleText"].as_s
next if !video_renderer["shortBylineText"]?
recommended_video["author"] = video_renderer["shortBylineText"]["runs"].as_a[0]["text"].as_s
recommended_video["ucid"] = video_renderer["shortBylineText"]["runs"].as_a[0]["navigationEndpoint"]["browseEndpoint"]["browseId"].as_s
recommended_video["author_thumbnail"] = video_renderer["channelThumbnail"]["thumbnails"][0]["url"].as_s
if view_count = video_renderer["viewCountText"]?.try { |field| field["simpleText"]?.try &.as_s || field["runs"][0]?.try &.["text"].as_s }.try &.delete(", views watching").to_i64?.try &.to_s
recommended_video["view_count"] = view_count
recommended_video["short_view_count_text"] = "#{number_to_short_text(view_count.to_i64)} views"
end
recommended_video["length_seconds"] = decode_length_seconds(video_renderer["lengthText"]?.try &.["simpleText"]?.try &.as_s || "0:00").to_s
rvs << recommended_video
end
end
rvs
end
def extract_polymer_config(body, html) def extract_polymer_config(body, html)
params = HTTP::Params.new params = HTTP::Params.new
@@ -942,36 +979,14 @@ def extract_polymer_config(body, html)
params["ctoken"] = comment_continuation.try &.["continuation"]?.try &.as_s || "" params["ctoken"] = comment_continuation.try &.["continuation"]?.try &.as_s || ""
params["itct"] = comment_continuation.try &.["clickTrackingParams"]?.try &.as_s || "" params["itct"] = comment_continuation.try &.["clickTrackingParams"]?.try &.as_s || ""
recommended_videos = initial_data["contents"]? rvs = initial_data["contents"]?
.try &.["twoColumnWatchNextResults"]? .try &.["twoColumnWatchNextResults"]?
.try &.["secondaryResults"]? .try &.["secondaryResults"]?
.try &.["secondaryResults"]? .try &.["secondaryResults"]?
.try &.["results"]? .try &.["results"]?
.try &.as_a .try &.as_a
rvs = [] of String params["rvs"] = extract_recommended(rvs).join(",")
recommended_videos.try &.each do |compact_renderer|
if compact_renderer["compactRadioRenderer"]? || compact_renderer["compactPlaylistRenderer"]?
# TODO
elsif compact_renderer["compactVideoRenderer"]?
compact_renderer = compact_renderer["compactVideoRenderer"]
recommended_video = HTTP::Params.new
recommended_video["id"] = compact_renderer["videoId"].as_s
recommended_video["title"] = compact_renderer["title"]["simpleText"].as_s
recommended_video["author"] = compact_renderer["shortBylineText"]["runs"].as_a[0]["text"].as_s
recommended_video["ucid"] = compact_renderer["shortBylineText"]["runs"].as_a[0]["navigationEndpoint"]["browseEndpoint"]["browseId"].as_s
recommended_video["author_thumbnail"] = compact_renderer["channelThumbnail"]["thumbnails"][0]["url"].as_s
recommended_video["short_view_count_text"] = compact_renderer["shortViewCountText"]["simpleText"].as_s
recommended_video["view_count"] = compact_renderer["viewCountText"]?.try &.["simpleText"]?.try &.as_s.delete(", views watching").to_i64?.try &.to_s || "0"
recommended_video["length_seconds"] = decode_length_seconds(compact_renderer["lengthText"]?.try &.["simpleText"]?.try &.as_s || "0:00").to_s
rvs << recommended_video.to_s
end
end
params["rvs"] = rvs.join(",")
# TODO: Watching now # TODO: Watching now
params["views"] = primary_results.try &.as_a.select { |object| object["videoPrimaryInfoRenderer"]? }[0]? params["views"] = primary_results.try &.as_a.select { |object| object["videoPrimaryInfoRenderer"]? }[0]?
@@ -1081,8 +1096,35 @@ def extract_player_config(body, html)
params["session_token"] = md["session_token"] params["session_token"] = md["session_token"]
end end
if md = body.match(/'RELATED_PLAYER_ARGS': (?<rvs>{"rvs":"[^"]+"})/) if md = body.match(/'RELATED_PLAYER_ARGS': (?<json>.*?),\n/)
params["rvs"] = JSON.parse(md["rvs"])["rvs"].as_s recommended_json = JSON.parse(md["json"])
rvs_params = recommended_json["rvs"].as_s.split(",").map { |params| HTTP::Params.parse(params) }
if watch_next_response = recommended_json["watch_next_response"]?
watch_next_json = JSON.parse(watch_next_response.as_s)
rvs = watch_next_json["contents"]?
.try &.["twoColumnWatchNextResults"]?
.try &.["secondaryResults"]?
.try &.["secondaryResults"]?
.try &.["results"]?
.try &.as_a
rvs = extract_recommended(rvs).compact_map do |rv|
if !rv["short_view_count_text"]?
rv_params = rvs_params.select { |rv_params| rv_params["id"]? == (rv["id"]? || "") }[0]?
if rv_params.try &.["short_view_count_text"]?
rv["short_view_count_text"] = rv_params.not_nil!["short_view_count_text"]
rv
else
nil
end
else
rv
end
end
params["rvs"] = (rvs.map &.to_s).join(",")
end
end end
html_info = body.match(/ytplayer\.config = (?<info>.*?);ytplayer\.load/).try &.["info"] html_info = body.match(/ytplayer\.config = (?<info>.*?);ytplayer\.load/).try &.["info"]
@@ -1095,8 +1137,11 @@ def extract_player_config(body, html)
error_message = html.xpath_node(%q(//h1[@id="unavailable-message"])) error_message = html.xpath_node(%q(//h1[@id="unavailable-message"]))
if error_message if error_message
params["reason"] = error_message.content.strip params["reason"] = error_message.content.strip
elsif body.includes?("To continue with your YouTube experience, please fill out the form below.") ||
body.includes?("https://www.google.com/sorry/index")
params["reason"] = "Could not extract video info. Instance is likely blocked."
else else
params["reason"] = "Could not extract video info." params["reason"] = "Video unavailable."
end end
end end
@@ -1104,54 +1149,42 @@ def extract_player_config(body, html)
end end
def fetch_video(id, region) def fetch_video(id, region)
client = make_client(YT_URL, region) response = YT_POOL.client(region, &.get("/watch?v=#{id}&gl=US&hl=en&disable_polymer=1&has_verified=1&bpctr=9999999999"))
response = client.get("/watch?v=#{id}&gl=US&hl=en&disable_polymer=1&has_verified=1&bpctr=9999999999")
if md = response.headers["location"]?.try &.match(/v=(?<id>[a-zA-Z0-9_-]{11})/) if md = response.headers["location"]?.try &.match(/v=(?<id>[a-zA-Z0-9_-]{11})/)
raise VideoRedirect.new(md["id"]) raise VideoRedirect.new(video_id: md["id"])
end end
html = XML.parse_html(response.body) html = XML.parse_html(response.body)
info = extract_player_config(response.body, html) info = extract_player_config(response.body, html)
info["cookie"] = response.cookies.to_h.map { |name, cookie| "#{name}=#{cookie.value}" }.join("; ") info["cookie"] = response.cookies.to_h.map { |name, cookie| "#{name}=#{cookie.value}" }.join("; ")
# Try to use proxies for region-blocked videos allowed_regions = html.xpath_node(%q(//meta[@itemprop="regionsAllowed"])).try &.["content"].split(",")
if info["reason"]? && info["reason"].includes? "your country" if !allowed_regions || allowed_regions == [""]
bypass_channel = Channel({XML::Node, HTTP::Params} | Nil).new allowed_regions = [] of String
end
PROXY_LIST.each do |proxy_region, list| # Check for region-blocks
spawn do if info["reason"]? && info["reason"].includes?("your country")
client = make_client(YT_URL, proxy_region) bypass_regions = PROXY_LIST.keys & allowed_regions
proxy_response = client.get("/watch?v=#{id}&gl=US&hl=en&disable_polymer=1&has_verified=1&bpctr=9999999999") if !bypass_regions.empty?
region = bypass_regions[rand(bypass_regions.size)]
response = YT_POOL.client(region, &.get("/watch?v=#{id}&gl=US&hl=en&disable_polymer=1&has_verified=1&bpctr=9999999999"))
proxy_html = XML.parse_html(proxy_response.body) html = XML.parse_html(response.body)
proxy_info = extract_player_config(proxy_response.body, proxy_html) info = extract_player_config(response.body, html)
if !proxy_info["reason"]? info["region"] = region if region
proxy_info["region"] = proxy_region info["cookie"] = response.cookies.to_h.map { |name, cookie| "#{name}=#{cookie.value}" }.join("; ")
proxy_info["cookie"] = proxy_response.cookies.to_h.map { |name, cookie| "#{name}=#{cookie.value}" }.join("; ")
bypass_channel.send({proxy_html, proxy_info})
else
bypass_channel.send(nil)
end
end
end
PROXY_LIST.size.times do
response = bypass_channel.receive
if response
html, info = response
break
end
end end
end end
# Try to pull streams from embed URL # Try to pull streams from embed URL
if info["reason"]? if info["reason"]?
embed_page = client.get("/embed/#{id}").body embed_page = YT_POOL.client &.get("/embed/#{id}").body
sts = embed_page.match(/"sts"\s*:\s*(?<sts>\d+)/).try &.["sts"]? sts = embed_page.match(/"sts"\s*:\s*(?<sts>\d+)/).try &.["sts"]?
sts ||= "" sts ||= ""
embed_info = HTTP::Params.parse(client.get("/get_video_info?video_id=#{id}&eurl=https://youtube.googleapis.com/v/#{id}&gl=US&hl=en&disable_polymer=1&sts=#{sts}").body) embed_info = HTTP::Params.parse(YT_POOL.client &.get("/get_video_info?video_id=#{id}&eurl=https://youtube.googleapis.com/v/#{id}&gl=US&hl=en&disable_polymer=1&sts=#{sts}").body)
if !embed_info["reason"]? if !embed_info["reason"]?
embed_info.each do |key, value| embed_info.each do |key, value|
@@ -1162,17 +1195,20 @@ def fetch_video(id, region)
end end
end end
if info["errorcode"]?.try &.== "2" if info["reason"]? && !info["player_response"]?
raise "Video unavailable." raise info["reason"]
end end
if !info["title"]? || info["title"].empty? player_json = JSON.parse(info["player_response"])
raise "Video unavailable." if reason = player_json["playabilityStatus"]?.try &.["reason"]?.try &.as_s
raise reason
end end
title = info["title"] title = player_json["videoDetails"]["title"].as_s
author = info["author"]? || "" author = player_json["videoDetails"]["author"]?.try &.as_s || ""
ucid = info["ucid"]? || "" ucid = player_json["videoDetails"]["channelId"]?.try &.as_s || ""
info["premium"] = html.xpath_node(%q(.//span[text()="Premium"])) ? "true" : "false"
views = html.xpath_node(%q(//meta[@itemprop="interactionCount"])) views = html.xpath_node(%q(//meta[@itemprop="interactionCount"]))
.try &.["content"].to_i64? || 0_i64 .try &.["content"].to_i64? || 0_i64
@@ -1187,16 +1223,13 @@ def fetch_video(id, region)
avg_rating = avg_rating.nan? ? 0.0 : avg_rating avg_rating = avg_rating.nan? ? 0.0 : avg_rating
info["avg_rating"] = "#{avg_rating}" info["avg_rating"] = "#{avg_rating}"
description_html = html.xpath_node(%q(//p[@id="eow-description"])).try &.to_xml(options: XML::SaveOptions::NO_DECL) || "" description_html = html.xpath_node(%q(//p[@id="eow-description"])).try &.to_xml(options: XML::SaveOptions::NO_DECL) || "<p></p>"
wilson_score = ci_lower_bound(likes, likes + dislikes) wilson_score = ci_lower_bound(likes, likes + dislikes)
published = html.xpath_node(%q(//meta[@itemprop="datePublished"])).try &.["content"] published = html.xpath_node(%q(//meta[@itemprop="datePublished"])).try &.["content"]
published ||= Time.utc.to_s("%Y-%m-%d") published ||= Time.utc.to_s("%Y-%m-%d")
published = Time.parse(published, "%Y-%m-%d", Time::Location.local) published = Time.parse(published, "%Y-%m-%d", Time::Location.local)
allowed_regions = html.xpath_node(%q(//meta[@itemprop="regionsAllowed"])).try &.["content"].split(",")
allowed_regions ||= [] of String
is_family_friendly = html.xpath_node(%q(//meta[@itemprop="isFamilyFriendly"])).try &.["content"] == "True" is_family_friendly = html.xpath_node(%q(//meta[@itemprop="isFamilyFriendly"])).try &.["content"] == "True"
is_family_friendly ||= true is_family_friendly ||= true
@@ -1223,7 +1256,7 @@ def fetch_video(id, region)
end end
license = html.xpath_node(%q(//h4[contains(text(),"License")]/parent::*/ul/li)).try &.content || "" license = html.xpath_node(%q(//h4[contains(text(),"License")]/parent::*/ul/li)).try &.content || ""
sub_count_text = html.xpath_node(%q(//span[contains(@class, "yt-subscriber-count")])).try &.["title"]? || "0" sub_count_text = html.xpath_node(%q(//span[contains(@class, "subscriber-count")])).try &.["title"]? || "0"
author_thumbnail = html.xpath_node(%(//span[@class="yt-thumb-clip"]/img)).try &.["data-thumb"]?.try &.gsub(/^\/\//, "https://") || "" author_thumbnail = html.xpath_node(%(//span[@class="yt-thumb-clip"]/img)).try &.["data-thumb"]?.try &.gsub(/^\/\//, "https://") || ""
video = Video.new(id, info, Time.utc, title, views, likes, dislikes, wilson_score, published, description_html, video = Video.new(id, info, Time.utc, title, views, likes, dislikes, wilson_score, published, description_html,
@@ -1236,20 +1269,35 @@ def itag_to_metadata?(itag : String)
return VIDEO_FORMATS[itag]? return VIDEO_FORMATS[itag]?
end end
def process_continuation(db, query, plid, id)
continuation = nil
if plid
if index = query["index"]?.try &.to_i?
continuation = index
else
continuation = id
end
continuation ||= 0
end
continuation
end
def process_video_params(query, preferences) def process_video_params(query, preferences)
annotations = query["iv_load_policy"]?.try &.to_i? annotations = query["iv_load_policy"]?.try &.to_i?
autoplay = query["autoplay"]?.try &.to_i? autoplay = query["autoplay"]?.try { |q| (q == "true" || q == "1").to_unsafe }
comments = query["comments"]?.try &.split(",").map { |a| a.downcase } comments = query["comments"]?.try &.split(",").map { |a| a.downcase }
continue = query["continue"]?.try &.to_i? continue = query["continue"]?.try { |q| (q == "true" || q == "1").to_unsafe }
continue_autoplay = query["continue_autoplay"]?.try &.to_i? continue_autoplay = query["continue_autoplay"]?.try { |q| (q == "true" || q == "1").to_unsafe }
listen = query["listen"]? && (query["listen"] == "true" || query["listen"] == "1").to_unsafe listen = query["listen"]?.try { |q| (q == "true" || q == "1").to_unsafe }
local = query["local"]? && (query["local"] == "true" || query["local"] == "1").to_unsafe local = query["local"]?.try { |q| (q == "true" || q == "1").to_unsafe }
player_style = query["player_style"]?
preferred_captions = query["subtitles"]?.try &.split(",").map { |a| a.downcase } preferred_captions = query["subtitles"]?.try &.split(",").map { |a| a.downcase }
quality = query["quality"]? quality = query["quality"]?
region = query["region"]? region = query["region"]?
related_videos = query["related_videos"]? && (query["related_videos"] == "true" || query["related_videos"] == "1").to_unsafe related_videos = query["related_videos"]?.try { |q| (q == "true" || q == "1").to_unsafe }
speed = query["speed"]?.try &.rchop("x").to_f? speed = query["speed"]?.try &.rchop("x").to_f?
video_loop = query["loop"]?.try &.to_i? video_loop = query["loop"]?.try { |q| (q == "true" || q == "1").to_unsafe }
volume = query["volume"]?.try &.to_i? volume = query["volume"]?.try &.to_i?
if preferences if preferences
@@ -1261,6 +1309,7 @@ def process_video_params(query, preferences)
continue_autoplay ||= preferences.continue_autoplay.to_unsafe continue_autoplay ||= preferences.continue_autoplay.to_unsafe
listen ||= preferences.listen.to_unsafe listen ||= preferences.listen.to_unsafe
local ||= preferences.local.to_unsafe local ||= preferences.local.to_unsafe
player_style ||= preferences.player_style
preferred_captions ||= preferences.captions preferred_captions ||= preferences.captions
quality ||= preferences.quality quality ||= preferences.quality
related_videos ||= preferences.related_videos.to_unsafe related_videos ||= preferences.related_videos.to_unsafe
@@ -1276,6 +1325,7 @@ def process_video_params(query, preferences)
continue_autoplay ||= CONFIG.default_user_preferences.continue_autoplay.to_unsafe continue_autoplay ||= CONFIG.default_user_preferences.continue_autoplay.to_unsafe
listen ||= CONFIG.default_user_preferences.listen.to_unsafe listen ||= CONFIG.default_user_preferences.listen.to_unsafe
local ||= CONFIG.default_user_preferences.local.to_unsafe local ||= CONFIG.default_user_preferences.local.to_unsafe
player_style ||= CONFIG.default_user_preferences.player_style
preferred_captions ||= CONFIG.default_user_preferences.captions preferred_captions ||= CONFIG.default_user_preferences.captions
quality ||= CONFIG.default_user_preferences.quality quality ||= CONFIG.default_user_preferences.quality
related_videos ||= CONFIG.default_user_preferences.related_videos.to_unsafe related_videos ||= CONFIG.default_user_preferences.related_videos.to_unsafe
@@ -1300,17 +1350,10 @@ def process_video_params(query, preferences)
local = false local = false
end end
if query["t"]? if start = query["t"]? || query["time_continue"]? || query["start"]?
video_start = decode_time(query["t"]) video_start = decode_time(start)
end end
video_start ||= 0 video_start ||= 0
if query["time_continue"]?
video_start = decode_time(query["time_continue"])
end
video_start ||= 0
if query["start"]?
video_start = decode_time(query["start"])
end
if query["end"]? if query["end"]?
video_end = decode_time(query["end"]) video_end = decode_time(query["end"])
@@ -1334,6 +1377,7 @@ def process_video_params(query, preferences)
controls: controls, controls: controls,
listen: listen, listen: listen,
local: local, local: local,
player_style: player_style,
preferred_captions: preferred_captions, preferred_captions: preferred_captions,
quality: quality, quality: quality,
raw: raw, raw: raw,

View File

@@ -0,0 +1,56 @@
<% content_for "header" do %>
<title><%= playlist.title %> - Invidious</title>
<link rel="alternate" type="application/rss+xml" title="RSS" href="/feed/playlist/<%= plid %>" />
<% end %>
<div class="pure-g">
<div class="pure-u-1 pure-u-lg-1-5"></div>
<div class="pure-u-1 pure-u-lg-3-5">
<div class="h-box">
<form class="pure-form pure-form-aligned" action="/add_playlist_items" method="get">
<legend><a href="/playlist?list=<%= playlist.id %>"><%= translate(locale, "Editing playlist `x`", %|"#{HTML.escape(playlist.title)}"|) %></a></legend>
<fieldset>
<input class="pure-input-1" type="search" name="q" <% if query %>value="<%= HTML.escape(query) %>"<% else %>placeholder="<%= translate(locale, "Search for videos") %>"<% end %>>
<input type="hidden" name="list" value="<%= plid %>">
</fieldset>
</form>
</div>
</div>
<div class="pure-u-1 pure-u-lg-1-5"></div>
</div>
<script>
var playlist_data = {
csrf_token: '<%= URI.encode_www_form(env.get?("csrf_token").try &.as(String) || "") %>',
}
</script>
<script src="/js/playlist_widget.js"></script>
<div class="pure-g">
<% videos.each_slice(4) do |slice| %>
<% slice.each do |item| %>
<%= rendered "components/item" %>
<% end %>
<% end %>
</div>
<% if query %>
<div class="pure-g h-box">
<div class="pure-u-1 pure-u-lg-1-5">
<% if page > 1 %>
<a href="/add_playlist_items?list=<%= plid %>&q=<%= HTML.escape(query.not_nil!) %>&page=<%= page - 1 %>">
<%= translate(locale, "Previous page") %>
</a>
<% end %>
</div>
<div class="pure-u-1 pure-u-lg-3-5"></div>
<div class="pure-u-1 pure-u-lg-1-5" style="text-align:right">
<% if count >= 20 %>
<a href="/add_playlist_items?list=<%= plid %>&q=<%= HTML.escape(query.not_nil!) %>&page=<%= page + 1 %>">
<%= translate(locale, "Next page") %>
</a>
<% end %>
</div>
</div>
<% end %>

View File

@@ -72,7 +72,7 @@
<input type="hidden" name="expire" value="<%= expire %>"> <input type="hidden" name="expire" value="<%= expire %>">
<% end %> <% end %>
<input type="hidden" name="csrf_token" value="<%= URI.escape(csrf_token) %>"> <input type="hidden" name="csrf_token" value="<%= URI.encode_www_form(csrf_token) %>">
</form> </form>
</div> </div>
<% end %> <% end %>

View File

@@ -6,7 +6,7 @@
<div class="pure-u-1 pure-u-lg-1-5"></div> <div class="pure-u-1 pure-u-lg-1-5"></div>
<div class="pure-u-1 pure-u-lg-3-5"> <div class="pure-u-1 pure-u-lg-3-5">
<div class="h-box"> <div class="h-box">
<form class="pure-form pure-form-aligned" action="/change_password?referer=<%= URI.escape(referer) %>" method="post"> <form class="pure-form pure-form-aligned" action="/change_password?referer=<%= URI.encode_www_form(referer) %>" method="post">
<legend><%= translate(locale, "Change password") %></legend> <legend><%= translate(locale, "Change password") %></legend>
<fieldset> <fieldset>
@@ -23,7 +23,7 @@
<%= translate(locale, "Change password") %> <%= translate(locale, "Change password") %>
</button> </button>
<input type="hidden" name="csrf_token" value="<%= URI.escape(csrf_token) %>"> <input type="hidden" name="csrf_token" value="<%= URI.encode_www_form(csrf_token) %>">
</fieldset> </fieldset>
</form> </form>
</div> </div>

View File

@@ -27,6 +27,10 @@
</div> </div>
</div> </div>
<div class="h-box">
<p><span style="white-space:pre-wrap"><%= XML.parse_html(channel.description_html).xpath_node(%q(.//pre)).try &.content %></span></p>
</div>
<div class="h-box"> <div class="h-box">
<% ucid = channel.ucid %> <% ucid = channel.ucid %>
<% author = channel.author %> <% author = channel.author %>

View File

@@ -3,7 +3,7 @@
<% end %> <% end %>
<div class="h-box"> <div class="h-box">
<form class="pure-form pure-form-aligned" action="/clear_watch_history?referer=<%= URI.escape(referer) %>" method="post"> <form class="pure-form pure-form-aligned" action="/clear_watch_history?referer=<%= URI.encode_www_form(referer) %>" method="post">
<legend><%= translate(locale, "Clear watch history?") %></legend> <legend><%= translate(locale, "Clear watch history?") %></legend>
<div class="pure-g"> <div class="pure-g">
@@ -13,12 +13,12 @@
</button> </button>
</div> </div>
<div class="pure-u-1-2"> <div class="pure-u-1-2">
<a class="pure-button" href="<%= URI.escape(referer) %>"> <a class="pure-button" href="<%= URI.encode_www_form(referer) %>">
<%= translate(locale, "No") %> <%= translate(locale, "No") %>
</a> </a>
</div> </div>
</div> </div>
<input type="hidden" name="csrf_token" value="<%= URI.escape(csrf_token) %>"> <input type="hidden" name="csrf_token" value="<%= URI.encode_www_form(csrf_token) %>">
</form> </form>
</div> </div>

View File

@@ -26,6 +26,10 @@
</div> </div>
</div> </div>
<div class="h-box">
<p><span style="white-space:pre-wrap"><%= XML.parse_html(channel.description_html).xpath_node(%q(.//pre)).try &.content %></span></p>
</div>
<div class="h-box"> <div class="h-box">
<% ucid = channel.ucid %> <% ucid = channel.ucid %>
<% author = channel.author %> <% author = channel.author %>

View File

@@ -2,9 +2,9 @@
<div class="pure-u-1 pure-u-md-1-4"></div> <div class="pure-u-1 pure-u-md-1-4"></div>
<div class="pure-u-1 pure-u-md-1-2"> <div class="pure-u-1 pure-u-md-1-2">
<div class="pure-g"> <div class="pure-g">
<% feed_menu = config.feed_menu.dup %> <% feed_menu = env.get("preferences").as(Preferences).feed_menu.dup %>
<% if !env.get?("user") %> <% if !env.get?("user") %>
<% feed_menu.reject! {|feed| feed == "Subscriptions"} %> <% feed_menu.reject! {|item| {"Subscriptions", "Playlists"}.includes? item} %>
<% end %> <% end %>
<% feed_menu.each do |feed| %> <% feed_menu.each do |feed| %>
<div class="pure-u-1-2 pure-u-md-1-<%= feed_menu.size %>"> <div class="pure-u-1-2 pure-u-md-1-<%= feed_menu.size %>">

View File

@@ -11,11 +11,11 @@
<p><%= item.author %></p> <p><%= item.author %></p>
</a> </a>
<p><%= translate(locale, "`x` subscribers", number_with_separator(item.subscriber_count)) %></p> <p><%= translate(locale, "`x` subscribers", number_with_separator(item.subscriber_count)) %></p>
<p><%= translate(locale, "`x` videos", number_with_separator(item.video_count)) %></p> <% if !item.auto_generated %><p><%= translate(locale, "`x` videos", number_with_separator(item.video_count)) %></p><% end %>
<h5><%= item.description_html %></h5> <h5><%= item.description_html %></h5>
<% when SearchPlaylist %> <% when SearchPlaylist, InvidiousPlaylist %>
<% if item.id.starts_with? "RD" %> <% if item.id.starts_with? "RD" %>
<% url = "/mix?list=#{item.id}&continuation=#{item.thumbnail_id}" %> <% url = "/mix?list=#{item.id}&continuation=#{URI.parse(item.thumbnail || "/vi/-----------").full_path.split("/")[2]}" %>
<% else %> <% else %>
<% url = "/playlist?list=#{item.id}" %> <% url = "/playlist?list=#{item.id}" %>
<% end %> <% end %>
@@ -23,7 +23,7 @@
<a style="width:100%" href="<%= url %>"> <a style="width:100%" href="<%= url %>">
<% if !env.get("preferences").as(Preferences).thin_mode %> <% if !env.get("preferences").as(Preferences).thin_mode %>
<div class="thumbnail"> <div class="thumbnail">
<img class="thumbnail" src="/vi/<%= item.thumbnail_id %>/mqdefault.jpg"/> <img class="thumbnail" src="<%= URI.parse(item.thumbnail || "/").full_path %>"/>
<p class="length"><%= number_with_separator(item.video_count) %> videos</p> <p class="length"><%= number_with_separator(item.video_count) %> videos</p>
</div> </div>
<% end %> <% end %>
@@ -56,6 +56,19 @@
<% if !env.get("preferences").as(Preferences).thin_mode %> <% if !env.get("preferences").as(Preferences).thin_mode %>
<div class="thumbnail"> <div class="thumbnail">
<img class="thumbnail" src="/vi/<%= item.id %>/mqdefault.jpg"/> <img class="thumbnail" src="/vi/<%= item.id %>/mqdefault.jpg"/>
<% if plid = env.get?("remove_playlist_items") %>
<form onsubmit="return false" action="/playlist_ajax?action_remove_video=1&set_video_id=<%= item.index %>&playlist_id=<%= plid %>&referer=<%= env.get("current_page") %>" method="post">
<input type="hidden" name="csrf_token" value="<%= URI.encode_www_form(env.get?("csrf_token").try &.as(String) || "") %>">
<p class="watched">
<a onclick="remove_playlist_item(this)" data-index="<%= item.index %>" data-plid="<%= plid %>" href="javascript:void(0)">
<button type="submit" style="all:unset">
<i class="icon ion-md-trash"></i>
</button>
</a>
</p>
</form>
<% end %>
<% if item.responds_to?(:live_now) && item.live_now %> <% if item.responds_to?(:live_now) && item.live_now %>
<p class="length"><i class="icon ion-ios-play-circle"></i> <%= translate(locale, "LIVE") %></p> <p class="length"><i class="icon ion-ios-play-circle"></i> <%= translate(locale, "LIVE") %></p>
<% elsif item.length_seconds != 0 %> <% elsif item.length_seconds != 0 %>
@@ -63,7 +76,7 @@
<% end %> <% end %>
</div> </div>
<% end %> <% end %>
<p><%= item.title %></p> <p><a href="/watch?v=<%= item.id %>"><%= item.title %></a></p>
</a> </a>
<p> <p>
<b> <b>
@@ -91,7 +104,7 @@
<img class="thumbnail" src="/vi/<%= item.id %>/mqdefault.jpg"/> <img class="thumbnail" src="/vi/<%= item.id %>/mqdefault.jpg"/>
<% if env.get? "show_watched" %> <% if env.get? "show_watched" %>
<form onsubmit="return false" action="/watch_ajax?action_mark_watched=1&id=<%= item.id %>&referer=<%= env.get("current_page") %>" method="post"> <form onsubmit="return false" action="/watch_ajax?action_mark_watched=1&id=<%= item.id %>&referer=<%= env.get("current_page") %>" method="post">
<input type="hidden" name="csrf_token" value="<%= URI.escape(env.get?("csrf_token").try &.as(String) || "") %>"> <input type="hidden" name="csrf_token" value="<%= URI.encode_www_form(env.get?("csrf_token").try &.as(String) || "") %>">
<p class="watched"> <p class="watched">
<a onclick="mark_watched(this)" data-id="<%= item.id %>" href="javascript:void(0)"> <a onclick="mark_watched(this)" data-id="<%= item.id %>" href="javascript:void(0)">
<button type="submit" style="all:unset"> <button type="submit" style="all:unset">
@@ -103,6 +116,17 @@
</a> </a>
</p> </p>
</form> </form>
<% elsif plid = env.get? "add_playlist_items" %>
<form onsubmit="return false" action="/playlist_ajax?action_add_video=1&video_id=<%= item.id %>&playlist_id=<%= plid %>&referer=<%= env.get("current_page") %>" method="post">
<input type="hidden" name="csrf_token" value="<%= URI.encode_www_form(env.get?("csrf_token").try &.as(String) || "") %>">
<p class="watched">
<a onclick="add_playlist_item(this)" data-id="<%= item.id %>" data-plid="<%= plid %>" href="javascript:void(0)">
<button type="submit" style="all:unset">
<i class="icon ion-md-add"></i>
</button>
</a>
</p>
</form>
<% end %> <% end %>
<% if item.responds_to?(:live_now) && item.live_now %> <% if item.responds_to?(:live_now) && item.live_now %>

View File

@@ -1,5 +1,5 @@
<video style="outline:none;width:100%;background-color:#000" playsinline poster="<%= thumbnail %>" title="<%= HTML.escape(video.title) %>" <video style="outline:none;width:100%;background-color:#000" playsinline poster="<%= thumbnail %>" title="<%= HTML.escape(video.title) %>"
id="player" class="video-js" id="player" class="video-js player-style-<%= params.player_style %>"
onmouseenter='this["data-title"]=this["title"];this["title"]=""' onmouseenter='this["data-title"]=this["title"];this["title"]=""'
onmouseleave='this["title"]=this["data-title"];this["data-title"]=""' onmouseleave='this["title"]=this["data-title"];this["data-title"]=""'
oncontextmenu='this["title"]=this["data-title"]' oncontextmenu='this["title"]=this["data-title"]'

View File

@@ -6,7 +6,6 @@
<script src="/js/video.min.js?v=<%= ASSET_COMMIT %>"></script> <script src="/js/video.min.js?v=<%= ASSET_COMMIT %>"></script>
<script src="/js/videojs-contrib-quality-levels.min.js?v=<%= ASSET_COMMIT %>"></script> <script src="/js/videojs-contrib-quality-levels.min.js?v=<%= ASSET_COMMIT %>"></script>
<script src="/js/videojs-http-source-selector.min.js?v=<%= ASSET_COMMIT %>"></script> <script src="/js/videojs-http-source-selector.min.js?v=<%= ASSET_COMMIT %>"></script>
<script src="/js/videojs.hotkeys.min.js?v=<%= ASSET_COMMIT %>"></script>
<script src="/js/videojs-markers.min.js?v=<%= ASSET_COMMIT %>"></script> <script src="/js/videojs-markers.min.js?v=<%= ASSET_COMMIT %>"></script>
<script src="/js/videojs-share.min.js?v=<%= ASSET_COMMIT %>"></script> <script src="/js/videojs-share.min.js?v=<%= ASSET_COMMIT %>"></script>
<script src="/js/videojs-vtt-thumbnails.min.js?v=<%= ASSET_COMMIT %>"></script> <script src="/js/videojs-vtt-thumbnails.min.js?v=<%= ASSET_COMMIT %>"></script>

View File

@@ -2,7 +2,7 @@
<% if subscriptions.includes? ucid %> <% if subscriptions.includes? ucid %>
<p> <p>
<form action="/subscription_ajax?action_remove_subscriptions=1&c=<%= ucid %>&referer=<%= env.get("current_page") %>" method="post"> <form action="/subscription_ajax?action_remove_subscriptions=1&c=<%= ucid %>&referer=<%= env.get("current_page") %>" method="post">
<input type="hidden" name="csrf_token" value="<%= URI.escape(env.get?("csrf_token").try &.as(String) || "") %>"> <input type="hidden" name="csrf_token" value="<%= URI.encode_www_form(env.get?("csrf_token").try &.as(String) || "") %>">
<button data-type="unsubscribe" id="subscribe" class="pure-button pure-button-primary"> <button data-type="unsubscribe" id="subscribe" class="pure-button pure-button-primary">
<b><input style="all:unset" type="submit" value="<%= translate(locale, "Unsubscribe") %> | <%= sub_count_text %>"></b> <b><input style="all:unset" type="submit" value="<%= translate(locale, "Unsubscribe") %> | <%= sub_count_text %>"></b>
</button> </button>
@@ -11,7 +11,7 @@
<% else %> <% else %>
<p> <p>
<form action="/subscription_ajax?action_create_subscription_to_channel=1&c=<%= ucid %>&referer=<%= env.get("current_page") %>" method="post"> <form action="/subscription_ajax?action_create_subscription_to_channel=1&c=<%= ucid %>&referer=<%= env.get("current_page") %>" method="post">
<input type="hidden" name="csrf_token" value="<%= URI.escape(env.get?("csrf_token").try &.as(String) || "") %>"> <input type="hidden" name="csrf_token" value="<%= URI.encode_www_form(env.get?("csrf_token").try &.as(String) || "") %>">
<button data-type="subscribe" id="subscribe" class="pure-button pure-button-primary"> <button data-type="subscribe" id="subscribe" class="pure-button pure-button-primary">
<b><input style="all:unset" type="submit" value="<%= translate(locale, "Subscribe") %> | <%= sub_count_text %>"></b> <b><input style="all:unset" type="submit" value="<%= translate(locale, "Subscribe") %> | <%= sub_count_text %>"></b>
</button> </button>
@@ -24,7 +24,7 @@
ucid: '<%= ucid %>', ucid: '<%= ucid %>',
author: '<%= HTML.escape(author) %>', author: '<%= HTML.escape(author) %>',
sub_count_text: '<%= HTML.escape(sub_count_text) %>', sub_count_text: '<%= HTML.escape(sub_count_text) %>',
csrf_token: '<%= URI.escape(env.get?("csrf_token").try &.as(String) || "") %>', csrf_token: '<%= URI.encode_www_form(env.get?("csrf_token").try &.as(String) || "") %>',
subscribe_text: '<%= HTML.escape(translate(locale, "Subscribe")) %>', subscribe_text: '<%= HTML.escape(translate(locale, "Subscribe")) %>',
unsubscribe_text: '<%= HTML.escape(translate(locale, "Unsubscribe")) %>' unsubscribe_text: '<%= HTML.escape(translate(locale, "Unsubscribe")) %>'
} }

View File

@@ -0,0 +1,39 @@
<% content_for "header" do %>
<title><%= translate(locale, "Create playlist") %> - Invidious</title>
<% end %>
<div class="pure-g">
<div class="pure-u-1 pure-u-lg-1-5"></div>
<div class="pure-u-1 pure-u-lg-3-5">
<div class="h-box">
<form class="pure-form pure-form-aligned" action="/create_playlist?referer=<%= URI.encode_www_form(referer) %>" method="post">
<fieldset>
<legend><%= translate(locale, "Create playlist") %></legend>
<div class="pure-control-group">
<label for="title"><%= translate(locale, "Title") %> :</label>
<input required name="title" type="text" placeholder="<%= translate(locale, "Title") %>">
</div>
<div class="pure-control-group">
<label for="privacy"><%= translate(locale, "Playlist privacy") %> :</label>
<select name="privacy" id="privacy">
<% PlaylistPrivacy.names.each do |option| %>
<option value="<%= option %>" <% if option == "Public" %> selected <% end %>><%= translate(locale, option) %></option>
<% end %>
</select>
</div>
<div class="pure-controls">
<button type="submit" name="action" value="create_playlist" class="pure-button pure-button-primary">
<%= translate(locale, "Create playlist") %>
</button>
</div>
<input type="hidden" name="csrf_token" value="<%= URI.encode_www_form(csrf_token) %>">
</fieldset>
</form>
</div>
</div>
<div class="pure-u-1 pure-u-lg-1-5"></div>
</div>

View File

@@ -3,7 +3,7 @@
<% end %> <% end %>
<div class="h-box"> <div class="h-box">
<form class="pure-form pure-form-aligned" enctype="multipart/form-data" action="/data_control?referer=<%= URI.escape(referer) %>" method="post"> <form class="pure-form pure-form-aligned" enctype="multipart/form-data" action="/data_control?referer=<%= URI.encode_www_form(referer) %>" method="post">
<fieldset> <fieldset>
<legend><%= translate(locale, "Import") %></legend> <legend><%= translate(locale, "Import") %></legend>

View File

@@ -3,7 +3,7 @@
<% end %> <% end %>
<div class="h-box"> <div class="h-box">
<form class="pure-form pure-form-aligned" action="/delete_account?referer=<%= URI.escape(referer) %>" method="post"> <form class="pure-form pure-form-aligned" action="/delete_account?referer=<%= URI.encode_www_form(referer) %>" method="post">
<legend><%= translate(locale, "Delete account?") %></legend> <legend><%= translate(locale, "Delete account?") %></legend>
<div class="pure-g"> <div class="pure-g">
@@ -13,12 +13,12 @@
</button> </button>
</div> </div>
<div class="pure-u-1-2"> <div class="pure-u-1-2">
<a class="pure-button" href="<%= URI.escape(referer) %>"> <a class="pure-button" href="<%= URI.encode_www_form(referer) %>">
<%= translate(locale, "No") %> <%= translate(locale, "No") %>
</a> </a>
</div> </div>
</div> </div>
<input type="hidden" name="csrf_token" value="<%= URI.escape(csrf_token) %>"> <input type="hidden" name="csrf_token" value="<%= URI.encode_www_form(csrf_token) %>">
</form> </form>
</div> </div>

View File

@@ -0,0 +1,24 @@
<% content_for "header" do %>
<title><%= translate(locale, "Delete playlist") %> - Invidious</title>
<% end %>
<div class="h-box">
<form class="pure-form pure-form-aligned" action="/delete_playlist?list=<%= plid %>&referer=<%= URI.encode_www_form(referer) %>" method="post">
<legend><%= translate(locale, "Delete playlist `x`?", %|"#{HTML.escape(playlist.title)}"|) %></legend>
<div class="pure-g">
<div class="pure-u-1-2">
<button type="submit" name="submit" value="delete_playlist" class="pure-button pure-button-primary">
<%= translate(locale, "Yes") %>
</button>
</div>
<div class="pure-u-1-2">
<a class="pure-button" href="/playlist?list=<%= plid %>">
<%= translate(locale, "No") %>
</a>
</div>
</div>
<input type="hidden" name="csrf_token" value="<%= URI.encode_www_form(csrf_token) %>">
</form>
</div>

View File

@@ -0,0 +1,81 @@
<% content_for "header" do %>
<title><%= playlist.title %> - Invidious</title>
<link rel="alternate" type="application/rss+xml" title="RSS" href="/feed/playlist/<%= plid %>" />
<% end %>
<form class="pure-form" action="/edit_playlist?list=<%= plid %>" method="post">
<div class="pure-g h-box">
<div class="pure-u-2-3">
<h3><input class="pure-input-1" maxlength="150" name="title" type="text" value="<%= playlist.title %>"></h3>
<b>
<%= playlist.author %> |
<%= translate(locale, "`x` videos", "#{playlist.video_count}") %> |
<%= translate(locale, "Updated `x` ago", recode_date(playlist.updated, locale)) %> |
<i class="icon <%= {"ion-md-globe", "ion-ios-unlock", "ion-ios-lock"}[playlist.privacy.value] %>"></i>
<select name="privacy">
<% {"Public", "Unlisted", "Private"}.each do |option| %>
<option value="<%= option %>" <% if option == playlist.privacy.to_s %>selected<% end %>><%= translate(locale, option) %></option>
<% end %>
</select>
</b>
</div>
<div class="pure-u-1-3" style="text-align:right">
<h3>
<div class="pure-g user-field">
<div class="pure-u-1-3">
<a href="javascript:void(0)">
<button type="submit" style="all:unset">
<i class="icon ion-md-save"></i>
</button>
</a>
</div>
<div class="pure-u-1-3"><a href="/delete_playlist?list=<%= plid %>"><i class="icon ion-md-trash"></i></a></div>
<div class="pure-u-1-3"><a href="/feed/playlist/<%= plid %>"><i class="icon ion-logo-rss"></i></a></div>
</div>
</h3>
</div>
</div>
<div class="h-box">
<textarea maxlength="5000" name="description" style="margin-top:10px;max-width:100%;height:20vh" class="pure-input-1"><%= playlist.description %></textarea>
</div>
<input type="hidden" name="csrf_token" value="<%= URI.encode_www_form(csrf_token) %>">
</form>
<% if playlist.is_a?(InvidiousPlaylist) && playlist.author == user.try &.email %>
<div class="h-box" style="text-align:right">
<h3>
<a href="/add_playlist_items?list=<%= plid %>"><i class="icon ion-md-add"></i></a>
</h3>
</div>
<% end %>
<div class="h-box">
<hr>
</div>
<div class="pure-g">
<% videos.each_slice(4) do |slice| %>
<% slice.each do |item| %>
<%= rendered "components/item" %>
<% end %>
<% end %>
</div>
<div class="pure-g h-box">
<div class="pure-u-1 pure-u-lg-1-5">
<% if page > 1 %>
<a href="/playlist?list=<%= playlist.id %>&page=<%= page - 1 %>">
<%= translate(locale, "Previous page") %>
</a>
<% end %>
</div>
<div class="pure-u-1 pure-u-lg-3-5"></div>
<div class="pure-u-1 pure-u-lg-1-5" style="text-align:right">
<% if videos.size == 100 %>
<a href="/playlist?list=<%= playlist.id %>&page=<%= page + 1 %>">
<%= translate(locale, "Next page") %>
</a>
<% end %>
</div>
</div>

View File

@@ -29,8 +29,9 @@
<script> <script>
var video_data = { var video_data = {
id: '<%= video.id %>', id: '<%= video.id %>',
index: '<%= continuation %>',
plid: '<%= plid %>', plid: '<%= plid %>',
length_seconds: '<%= video.info["length_seconds"].to_f %>', length_seconds: '<%= video.length_seconds.to_f %>',
video_series: <%= video_series.to_json %>, video_series: <%= video_series.to_json %>,
params: <%= params.to_json %>, params: <%= params.to_json %>,
preferences: <%= preferences.to_json %>, preferences: <%= preferences.to_json %>,

View File

@@ -0,0 +1,8 @@
<% content_for "header" do %>
<meta name="description" content="<%= translate(locale, "An alternative front-end to YouTube") %>">
<title>
Invidious
</title>
<% end %>
<%= rendered "components/feed_menu" %>

View File

@@ -20,38 +20,38 @@
<script> <script>
var watched_data = { var watched_data = {
csrf_token: '<%= URI.escape(env.get?("csrf_token").try &.as(String) || "") %>', csrf_token: '<%= URI.encode_www_form(env.get?("csrf_token").try &.as(String) || "") %>',
} }
</script> </script>
<script src="/js/watched_widget.js"></script> <script src="/js/watched_widget.js"></script>
<div class="pure-g"> <div class="pure-g">
<% watched.each_slice(4) do |slice| %> <% watched.each_slice(4) do |slice| %>
<% slice.each do |item| %> <% slice.each do |item| %>
<div class="pure-u-1 pure-u-md-1-4"> <div class="pure-u-1 pure-u-md-1-4">
<div class="h-box"> <div class="h-box">
<a style="width:100%" href="/watch?v=<%= item %>"> <a style="width:100%" href="/watch?v=<%= item %>">
<% if !env.get("preferences").as(Preferences).thin_mode %> <% if !env.get("preferences").as(Preferences).thin_mode %>
<div class="thumbnail"> <div class="thumbnail">
<img class="thumbnail" src="/vi/<%= item %>/mqdefault.jpg"/> <img class="thumbnail" src="/vi/<%= item %>/mqdefault.jpg"/>
<form onsubmit="return false" action="/watch_ajax?action_mark_unwatched=1&id=<%= item %>&referer=<%= env.get("current_page") %>" method="post"> <form onsubmit="return false" action="/watch_ajax?action_mark_unwatched=1&id=<%= item %>&referer=<%= env.get("current_page") %>" method="post">
<input type="hidden" name="csrf_token" value="<%= URI.escape(env.get?("csrf_token").try &.as(String) || "") %>"> <input type="hidden" name="csrf_token" value="<%= URI.encode_www_form(env.get?("csrf_token").try &.as(String) || "") %>">
<p class="watched"> <p class="watched">
<a onclick="mark_unwatched(this)" data-id="<%= item %>" href="javascript:void(0)"> <a onclick="mark_unwatched(this)" data-id="<%= item %>" href="javascript:void(0)">
<button type="submit" style="all:unset"> <button type="submit" style="all:unset">
<i class="icon ion-md-trash"></i> <i class="icon ion-md-trash"></i>
</button> </button>
</a> </a>
</p> </p>
</form> </form>
</div> </div>
<p></p> <p></p>
<% end %> <% end %>
</a> </a>
</div>
</div> </div>
</div> <% end %>
<% end %> <% end %>
<% end %>
</div> </div>
<div class="pure-g h-box"> <div class="pure-g h-box">

View File

@@ -135,20 +135,6 @@
</td> </td>
</tr> </tr>
<tr>
<td>
<a href="/js/videojs.hotkeys.min.js?v=<%= ASSET_COMMIT %>">videojs.hotkeys.min.js</a>
</td>
<td>
<a href="http://www.apache.org/licenses/LICENSE-2.0">Apache-2.0-only</a>
</td>
<td>
<a href="https://github.com/ctd1500/videojs-hotkeys"><%= translate(locale, "source") %></a>
</td>
</tr>
<tr> <tr>
<td> <td>
<a href="/js/videojs-http-source-selector.min.js?v=<%= ASSET_COMMIT %>">videojs-http-source-selector.min.js</a> <a href="/js/videojs-http-source-selector.min.js?v=<%= ASSET_COMMIT %>">videojs-http-source-selector.min.js</a>

View File

@@ -21,8 +21,9 @@
<hr> <hr>
<% if account_type == "invidious" %> <% case account_type when %>
<form class="pure-form pure-form-stacked" action="/login?referer=<%= URI.escape(referer) %>&type=invidious" method="post"> <% when "invidious" %>
<form class="pure-form pure-form-stacked" action="/login?referer=<%= URI.encode_www_form(referer) %>&type=invidious" method="post">
<fieldset> <fieldset>
<% if email %> <% if email %>
<input name="email" type="hidden" value="<%= email %>"> <input name="email" type="hidden" value="<%= email %>">
@@ -42,9 +43,9 @@
<% case captcha_type when %> <% case captcha_type when %>
<% when "image" %> <% when "image" %>
<% captcha = captcha.not_nil! %> <% captcha = captcha.not_nil! %>
<img style="width:100%" src='<%= captcha[:question] %>'/> <img style="width:50%" src='<%= captcha[:question] %>'/>
<% captcha[:tokens].each_with_index do |token, i| %> <% captcha[:tokens].each_with_index do |token, i| %>
<input type="hidden" name="token[<%= i %>]" value="<%= URI.escape(token) %>"> <input type="hidden" name="token[<%= i %>]" value="<%= URI.encode_www_form(token) %>">
<% end %> <% end %>
<input type="hidden" name="captcha_type" value="image"> <input type="hidden" name="captcha_type" value="image">
<label for="answer"><%= translate(locale, "Time (h:mm:ss):") %></label> <label for="answer"><%= translate(locale, "Time (h:mm:ss):") %></label>
@@ -52,7 +53,7 @@
<% when "text" %> <% when "text" %>
<% captcha = captcha.not_nil! %> <% captcha = captcha.not_nil! %>
<% captcha[:tokens].each_with_index do |token, i| %> <% captcha[:tokens].each_with_index do |token, i| %>
<input type="hidden" name="token[<%= i %>]" value="<%= URI.escape(token) %>"> <input type="hidden" name="token[<%= i %>]" value="<%= URI.encode_www_form(token) %>">
<% end %> <% end %>
<input type="hidden" name="captcha_type" value="text"> <input type="hidden" name="captcha_type" value="text">
<label for="answer"><%= captcha[:question] %></label> <label for="answer"><%= captcha[:question] %></label>
@@ -84,8 +85,8 @@
<% end %> <% end %>
</fieldset> </fieldset>
</form> </form>
<% elsif account_type == "google" %> <% when "google" %>
<form class="pure-form pure-form-stacked" action="/login?referer=<%= URI.escape(referer) %>&type=google" method="post"> <form class="pure-form pure-form-stacked" action="/login?referer=<%= URI.encode_www_form(referer) %>&type=google" method="post">
<fieldset> <fieldset>
<% if email %> <% if email %>
<input name="email" type="hidden" value="<%= email %>"> <input name="email" type="hidden" value="<%= email %>">
@@ -101,9 +102,20 @@
<input required class="pure-input-1" name="password" type="password" placeholder="<%= translate(locale, "Password") %>"> <input required class="pure-input-1" name="password" type="password" placeholder="<%= translate(locale, "Password") %>">
<% end %> <% end %>
<% if prompt %>
<label for="tfa"><%= translate(locale, prompt) %> :</label>
<input required class="pure-input-1" name="tfa" type="text" placeholder="<%= translate(locale, prompt) %>">
<% end %>
<% if tfa %> <% if tfa %>
<label for="tfa"><%= translate(locale, "Google verification code") %> :</label> <input type="hidden" name="tfa" value="<%= tfa %>">
<input required class="pure-input-1" name="tfa" type="text" placeholder="<%= translate(locale, "Google verification code") %>"> <% end %>
<% if captcha %>
<img style="width:50%" src="/Captcha?v=2&ctoken=<%= captcha[:tokens][0] %>"/>
<input type="hidden" name="token" value="<%= captcha[:tokens][0] %>">
<label for="answer"><%= translate(locale, "Answer") %> :</label>
<input type="text" name="answer" type="text" placeholder="<%= translate(locale, "Answer") %>">
<% end %> <% end %>
<button type="submit" class="pure-button pure-button-primary"><%= translate(locale, "Sign In") %></button> <button type="submit" class="pure-button pure-button-primary"><%= translate(locale, "Sign In") %></button>

View File

@@ -6,36 +6,77 @@
<div class="pure-g h-box"> <div class="pure-g h-box">
<div class="pure-u-2-3"> <div class="pure-u-2-3">
<h3><%= playlist.title %></h3> <h3><%= playlist.title %></h3>
<% if playlist.is_a? InvidiousPlaylist %>
<b>
<% if playlist.author == user.try &.email %>
<a href="/view_all_playlists"><%= playlist.author %></a> |
<% else %>
<%= playlist.author %> |
<% end %>
<%= translate(locale, "`x` videos", "#{playlist.video_count}") %> |
<%= translate(locale, "Updated `x` ago", recode_date(playlist.updated, locale)) %> |
<% case playlist.as(InvidiousPlaylist).privacy when %>
<% when PlaylistPrivacy::Public %>
<i class="icon ion-md-globe"></i> <%= translate(locale, "Public") %>
<% when PlaylistPrivacy::Unlisted %>
<i class="icon ion-ios-unlock"></i> <%= translate(locale, "Unlisted") %>
<% when PlaylistPrivacy::Private %>
<i class="icon ion-ios-lock"></i> <%= translate(locale, "Private") %>
<% end %>
</b>
<% else %>
<b>
<a href="/channel/<%= playlist.ucid %>"><%= playlist.author %></a> |
<%= translate(locale, "`x` videos", "#{playlist.video_count}") %> |
<%= translate(locale, "Updated `x` ago", recode_date(playlist.updated, locale)) %>
</b>
<% end %>
<% if !playlist.is_a? InvidiousPlaylist %>
<div class="pure-u-2-3">
<a href="https://www.youtube.com/playlist?list=<%= playlist.id %>">
<%= translate(locale, "View playlist on YouTube") %>
</a>
</div>
<% end %>
</div> </div>
<div class="pure-u-1-3" style="text-align:right"> <div class="pure-u-1-3" style="text-align:right">
<h3> <h3>
<a href="/feed/playlist/<%= plid %>"><i class="icon ion-logo-rss"></i></a> <div class="pure-g user-field">
<% if playlist.is_a?(InvidiousPlaylist) && playlist.author == user.try &.email %>
<div class="pure-u-1-3"><a href="/edit_playlist?list=<%= plid %>"><i class="icon ion-md-create"></i></a></div>
<div class="pure-u-1-3"><a href="/delete_playlist?list=<%= plid %>"><i class="icon ion-md-trash"></i></a></div>
<% end %>
<div class="pure-u-1-3"><a href="/feed/playlist/<%= plid %>"><i class="icon ion-logo-rss"></i></a></div>
</div>
</h3> </h3>
</div> </div>
</div> </div>
<div class="pure-g h-box">
<div class="pure-u-1-3">
<a href="https://www.youtube.com/playlist?list=<%= playlist.id %>">
<%= translate(locale, "View playlist on YouTube") %>
</a>
<div class="pure-u-1 pure-md-1-3">
<a href="/channel/<%= playlist.ucid %>">
<b><%= playlist.author %></b>
</a>
</div>
</div>
<div class="pure-u-1-2"></div>
</div>
<div class="h-box"> <div class="h-box">
<p><%= playlist.description_html %></p> <p><%= playlist.description_html %></p>
</div> </div>
<% if playlist.is_a?(InvidiousPlaylist) && playlist.author == user.try &.email %>
<div class="h-box" style="text-align:right">
<h3>
<a href="/add_playlist_items?list=<%= plid %>"><i class="icon ion-md-add"></i></a>
</h3>
</div>
<% end %>
<div class="h-box"> <div class="h-box">
<hr> <hr>
</div> </div>
<% if playlist.is_a?(InvidiousPlaylist) && playlist.author == user.try &.email %>
<script>
var playlist_data = {
csrf_token: '<%= URI.encode_www_form(env.get?("csrf_token").try &.as(String) || "") %>',
}
</script>
<script src="/js/playlist_widget.js"></script>
<% end %>
<div class="pure-g"> <div class="pure-g">
<% videos.each_slice(4) do |slice| %> <% videos.each_slice(4) do |slice| %>
<% slice.each do |item| %> <% slice.each do |item| %>

View File

@@ -26,6 +26,10 @@
</div> </div>
</div> </div>
<div class="h-box">
<p><span style="white-space:pre-wrap"><%= XML.parse_html(channel.description_html).xpath_node(%q(.//pre)).try &.content %></span></p>
</div>
<div class="h-box"> <div class="h-box">
<% ucid = channel.ucid %> <% ucid = channel.ucid %>
<% author = channel.author %> <% author = channel.author %>
@@ -85,7 +89,7 @@
<div class="pure-g h-box"> <div class="pure-g h-box">
<div class="pure-u-1 pure-u-md-4-5"></div> <div class="pure-u-1 pure-u-md-4-5"></div>
<div class="pure-u-1 pure-u-lg-1-5" style="text-align:right"> <div class="pure-u-1 pure-u-lg-1-5" style="text-align:right">
<% if items.size >= 28 %> <% if continuation %>
<a href="/channel/<%= channel.ucid %>/playlists?continuation=<%= continuation %><% if sort_by != "last" %>&sort_by=<%= sort_by %><% end %>"> <a href="/channel/<%= channel.ucid %>/playlists?continuation=<%= continuation %><% if sort_by != "last" %>&sort_by=<%= sort_by %><% end %>">
<%= translate(locale, "Next page") %> <%= translate(locale, "Next page") %>
</a> </a>

View File

@@ -1,7 +1,7 @@
<% content_for "header" do %> <% content_for "header" do %>
<meta name="description" content="<%= translate(locale, "An alternative front-end to YouTube") %>"> <meta name="description" content="<%= translate(locale, "An alternative front-end to YouTube") %>">
<title> <title>
<% if config.default_home != "Popular" %> <% if env.get("preferences").as(Preferences).default_home != "Popular" %>
<%= translate(locale, "Popular") %> - Invidious <%= translate(locale, "Popular") %> - Invidious
<% else %> <% else %>
Invidious Invidious

View File

@@ -9,7 +9,7 @@ function update_value(element) {
</script> </script>
<div class="h-box"> <div class="h-box">
<form class="pure-form pure-form-aligned" action="/preferences?referer=<%= URI.escape(referer) %>" method="post"> <form class="pure-form pure-form-aligned" action="/preferences?referer=<%= URI.encode_www_form(referer) %>" method="post">
<fieldset> <fieldset>
<legend><%= translate(locale, "Player preferences") %></legend> <legend><%= translate(locale, "Player preferences") %></legend>
@@ -34,7 +34,7 @@ function update_value(element) {
</div> </div>
<div class="pure-control-group"> <div class="pure-control-group">
<label for="local"><%= translate(locale, "Proxy videos? ") %></label> <label for="local"><%= translate(locale, "Proxy videos: ") %></label>
<input name="local" id="local" type="checkbox" <% if preferences.local && !CONFIG.disabled?("local") %>checked<% end %> <% if CONFIG.disabled?("local") %>disabled<% end %>> <input name="local" id="local" type="checkbox" <% if preferences.local && !CONFIG.disabled?("local") %>checked<% end %> <% if CONFIG.disabled?("local") %>disabled<% end %>>
</div> </div>
@@ -46,7 +46,7 @@ function update_value(element) {
<div class="pure-control-group"> <div class="pure-control-group">
<label for="speed"><%= translate(locale, "Default speed: ") %></label> <label for="speed"><%= translate(locale, "Default speed: ") %></label>
<select name="speed" id="speed"> <select name="speed" id="speed">
<% {2.0, 1.5, 1.25, 1.0, 0.75, 0.5, 0.25}.each do |option| %> <% {2.0, 1.75, 1.5, 1.25, 1.0, 0.75, 0.5, 0.25}.each do |option| %>
<option <% if preferences.speed == option %> selected <% end %>><%= option %></option> <option <% if preferences.speed == option %> selected <% end %>><%= option %></option>
<% end %> <% end %>
</select> </select>
@@ -92,12 +92,12 @@ function update_value(element) {
</div> </div>
<div class="pure-control-group"> <div class="pure-control-group">
<label for="related_videos"><%= translate(locale, "Show related videos? ") %></label> <label for="related_videos"><%= translate(locale, "Show related videos: ") %></label>
<input name="related_videos" id="related_videos" type="checkbox" <% if preferences.related_videos %>checked<% end %>> <input name="related_videos" id="related_videos" type="checkbox" <% if preferences.related_videos %>checked<% end %>>
</div> </div>
<div class="pure-control-group"> <div class="pure-control-group">
<label for="annotations"><%= translate(locale, "Show annotations by default? ") %></label> <label for="annotations"><%= translate(locale, "Show annotations by default: ") %></label>
<input name="annotations" id="annotations" type="checkbox" <% if preferences.annotations %>checked<% end %>> <input name="annotations" id="annotations" type="checkbox" <% if preferences.annotations %>checked<% end %>>
</div> </div>
@@ -113,8 +113,21 @@ function update_value(element) {
</div> </div>
<div class="pure-control-group"> <div class="pure-control-group">
<label for="dark_mode"><%= translate(locale, "Dark mode: ") %></label> <label for="player_style"><%= translate(locale, "Player style: ") %></label>
<input name="dark_mode" id="dark_mode" type="checkbox" <% if preferences.dark_mode %>checked<% end %>> <select name="player_style" id="player_style">
<% {"invidious", "youtube"}.each do |option| %>
<option value="<%= option %>" <% if preferences.player_style == option %> selected <% end %>><%= translate(locale, option) %></option>
<% end %>
</select>
</div>
<div class="pure-control-group">
<label for="dark_mode"><%= translate(locale, "Theme: ") %></label>
<select name="dark_mode" id="dark_mode">
<% {"", "light", "dark"}.each do |option| %>
<option value="<%= option %>" <% if preferences.dark_mode == option %> selected <% end %>><%= translate(locale, option) %></option>
<% end %>
</select>
</div> </div>
<div class="pure-control-group"> <div class="pure-control-group">
@@ -122,19 +135,40 @@ function update_value(element) {
<input name="thin_mode" id="thin_mode" type="checkbox" <% if preferences.thin_mode %>checked<% end %>> <input name="thin_mode" id="thin_mode" type="checkbox" <% if preferences.thin_mode %>checked<% end %>>
</div> </div>
<% if env.get?("user") %>
<% feed_options = {"", "Popular", "Top", "Trending", "Subscriptions", "Playlists"} %>
<% else %>
<% feed_options = {"", "Popular", "Top", "Trending"} %>
<% end %>
<div class="pure-control-group">
<label for="default_home"><%= translate(locale, "Default homepage: ") %></label>
<select name="default_home" id="default_home">
<% feed_options.each do |option| %>
<option value="<%= option %>" <% if preferences.default_home == option %> selected <% end %>><%= translate(locale, option) %></option>
<% end %>
</select>
</div>
<div class="pure-control-group">
<label for="feed_menu"><%= translate(locale, "Feed menu: ") %></label>
<% (feed_options.size - 1).times do |index| %>
<select name="feed_menu[<%= index %>]" id="feed_menu[<%= index %>]">
<% feed_options.each do |option| %>
<option value="<%= option %>" <% if preferences.feed_menu[index]? == option %> selected <% end %>><%= translate(locale, option) %></option>
<% end %>
</select>
<% end %>
</div>
<% if env.get? "user" %> <% if env.get? "user" %>
<legend><%= translate(locale, "Subscription preferences") %></legend> <legend><%= translate(locale, "Subscription preferences") %></legend>
<div class="pure-control-group"> <div class="pure-control-group">
<label for="annotations_subscribed"><%= translate(locale, "Show annotations by default for subscribed channels? ") %></label> <label for="annotations_subscribed"><%= translate(locale, "Show annotations by default for subscribed channels: ") %></label>
<input name="annotations_subscribed" id="annotations_subscribed" type="checkbox" <% if preferences.annotations_subscribed %>checked<% end %>> <input name="annotations_subscribed" id="annotations_subscribed" type="checkbox" <% if preferences.annotations_subscribed %>checked<% end %>>
</div> </div>
<div class="pure-control-group">
<label for="redirect_feed"><%= translate(locale, "Redirect homepage to feed: ") %></label>
<input name="redirect_feed" id="redirect_feed" type="checkbox" <% if preferences.redirect_feed %>checked<% end %>>
</div>
<div class="pure-control-group"> <div class="pure-control-group">
<label for="max_results"><%= translate(locale, "Number of videos shown in feed: ") %></label> <label for="max_results"><%= translate(locale, "Number of videos shown in feed: ") %></label>
<input name="max_results" id="max_results" type="number" value="<%= preferences.max_results %>"> <input name="max_results" id="max_results" type="number" value="<%= preferences.max_results %>">
@@ -180,47 +214,47 @@ function update_value(element) {
<legend><%= translate(locale, "Administrator preferences") %></legend> <legend><%= translate(locale, "Administrator preferences") %></legend>
<div class="pure-control-group"> <div class="pure-control-group">
<label for="default_home"><%= translate(locale, "Default homepage: ") %></label> <label for="admin_default_home"><%= translate(locale, "Default homepage: ") %></label>
<select name="default_home" id="default_home"> <select name="admin_default_home" id="admin_default_home">
<% {"Popular", "Top", "Trending", "Subscriptions"}.each do |option| %> <% feed_options.each do |option| %>
<option value="<%= option %>" <% if config.default_home == option %> selected <% end %>><%= translate(locale, option) %></option> <option value="<%= option %>" <% if CONFIG.default_user_preferences.default_home == option %> selected <% end %>><%= translate(locale, option) %></option>
<% end %> <% end %>
</select> </select>
</div> </div>
<div class="pure-control-group"> <div class="pure-control-group">
<label for="feed_menu"><%= translate(locale, "Feed menu: ") %></label> <label for="admin_feed_menu"><%= translate(locale, "Feed menu: ") %></label>
<% 4.times do |index| %> <% (feed_options.size - 1).times do |index| %>
<select name="feed_menu[<%= index %>]" id="feed_menu[<%= index %>]"> <select name="admin_feed_menu[<%= index %>]" id="admin_feed_menu[<%= index %>]">
<% {"", "Popular", "Top", "Trending", "Subscriptions"}.each do |option| %> <% feed_options.each do |option| %>
<option value="<%= option %>" <% if config.feed_menu[index]? == option %> selected <% end %>><%= translate(locale, option) %></option> <option value="<%= option %>" <% if CONFIG.default_user_preferences.feed_menu[index]? == option %> selected <% end %>><%= translate(locale, option) %></option>
<% end %> <% end %>
</select> </select>
<% end %> <% end %>
</div> </div>
<div class="pure-control-group"> <div class="pure-control-group">
<label for="top_enabled"><%= translate(locale, "Top enabled? ") %></label> <label for="top_enabled"><%= translate(locale, "Top enabled: ") %></label>
<input name="top_enabled" id="top_enabled" type="checkbox" <% if config.top_enabled %>checked<% end %>> <input name="top_enabled" id="top_enabled" type="checkbox" <% if config.top_enabled %>checked<% end %>>
</div> </div>
<div class="pure-control-group"> <div class="pure-control-group">
<label for="captcha_enabled"><%= translate(locale, "CAPTCHA enabled? ") %></label> <label for="captcha_enabled"><%= translate(locale, "CAPTCHA enabled: ") %></label>
<input name="captcha_enabled" id="captcha_enabled" type="checkbox" <% if config.captcha_enabled %>checked<% end %>> <input name="captcha_enabled" id="captcha_enabled" type="checkbox" <% if config.captcha_enabled %>checked<% end %>>
</div> </div>
<div class="pure-control-group"> <div class="pure-control-group">
<label for="login_enabled"><%= translate(locale, "Login enabled? ") %></label> <label for="login_enabled"><%= translate(locale, "Login enabled: ") %></label>
<input name="login_enabled" id="login_enabled" type="checkbox" <% if config.login_enabled %>checked<% end %>> <input name="login_enabled" id="login_enabled" type="checkbox" <% if config.login_enabled %>checked<% end %>>
</div> </div>
<div class="pure-control-group"> <div class="pure-control-group">
<label for="registration_enabled"><%= translate(locale, "Registration enabled? ") %></label> <label for="registration_enabled"><%= translate(locale, "Registration enabled: ") %></label>
<input name="registration_enabled" id="registration_enabled" type="checkbox" <% if config.registration_enabled %>checked<% end %>> <input name="registration_enabled" id="registration_enabled" type="checkbox" <% if config.registration_enabled %>checked<% end %>>
</div> </div>
<div class="pure-control-group"> <div class="pure-control-group">
<label for="statistics_enabled"><%= translate(locale, "Report statistics? ") %></label> <label for="statistics_enabled"><%= translate(locale, "Report statistics: ") %></label>
<input name="statistics_enabled" id="statistics_enabled" type="checkbox" <% if config.statistics_enabled %>checked<% end %>> <input name="statistics_enabled" id="statistics_enabled" type="checkbox" <% if config.statistics_enabled %>checked<% end %>>
</div> </div>
<% end %> <% end %>
@@ -229,15 +263,15 @@ function update_value(element) {
<legend><%= translate(locale, "Data preferences") %></legend> <legend><%= translate(locale, "Data preferences") %></legend>
<div class="pure-control-group"> <div class="pure-control-group">
<a href="/clear_watch_history?referer=<%= URI.escape(referer) %>"><%= translate(locale, "Clear watch history") %></a> <a href="/clear_watch_history?referer=<%= URI.encode_www_form(referer) %>"><%= translate(locale, "Clear watch history") %></a>
</div> </div>
<div class="pure-control-group"> <div class="pure-control-group">
<a href="/change_password?referer=<%= URI.escape(referer) %>"><%= translate(locale, "Change password") %></a> <a href="/change_password?referer=<%= URI.encode_www_form(referer) %>"><%= translate(locale, "Change password") %></a>
</div> </div>
<div class="pure-control-group"> <div class="pure-control-group">
<a href="/data_control?referer=<%= URI.escape(referer) %>"><%= translate(locale, "Import/export data") %></a> <a href="/data_control?referer=<%= URI.encode_www_form(referer) %>"><%= translate(locale, "Import/export data") %></a>
</div> </div>
<div class="pure-control-group"> <div class="pure-control-group">
@@ -248,12 +282,16 @@ function update_value(element) {
<a href="/token_manager"><%= translate(locale, "Manage tokens") %></a> <a href="/token_manager"><%= translate(locale, "Manage tokens") %></a>
</div> </div>
<div class="pure-control-group">
<a href="/view_all_playlists"><%= translate(locale, "View all playlists") %></a>
</div>
<div class="pure-control-group"> <div class="pure-control-group">
<a href="/feed/history"><%= translate(locale, "Watch history") %></a> <a href="/feed/history"><%= translate(locale, "Watch history") %></a>
</div> </div>
<div class="pure-control-group"> <div class="pure-control-group">
<a href="/delete_account?referer=<%= URI.escape(referer) %>"><%= translate(locale, "Delete account") %></a> <a href="/delete_account?referer=<%= URI.encode_www_form(referer) %>"><%= translate(locale, "Delete account") %></a>
</div> </div>
<% end %> <% end %>

View File

@@ -3,73 +3,52 @@
<% end %> <% end %>
<div class="h-box"> <div class="h-box">
<%= Markdown.to_html(<<-END_PRIVACY_POLICY <h2>Privacy</h2>
## Privacy <p>This document concerns what data you provide to this website, the purpose of the data, how the data is stored, and how the data can be removed.</p>
This document concerns what data you provide to this website, the purpose of the data, how the data is stored, and how the data can be removed. <h3>Data you directly provide</h3>
<p>Data that you provide to the website for the purpose of the site's operation (for example: an account name, account password, or channel subscription) will be stored in the website's database until the user decides to remove it. This data will not be intentionally shared with anyone or anything.</p>
<p>Information stored about a registered user is limited to:</p>
<ul>
<li>a list of session tokens for remaining logged in across devices</li>
<li>the last time an account was updated (to provide accurate notifications)</li>
<li>a list of video IDs identifying notifications from a user's subscriptions</li>
<li>a list of channel UCIDs the user is subscribed to</li>
<li>a user ID (for persistent storage of subscriptions and preferences)</li>
<li>a json object containing user preferences</li>
<li>a hashed password if applicable (not present on google accounts)</li>
<li>a randomly generated token for providing an RSS feed of a user's subscriptions</li>
<li>a list of video IDs identifying watched videos</li>
</ul>
<p>Users can clear their watch history using the <a href="/clear_watch_history">clear watch history</a> page.</p>
<p>If a user is logged in with a Google account, no password will ever be stored. This website uses the session token provided by Google to identify a user, but does not store the information required to make requests on a user's behalf without their knowledge or consent.</p>
### Data you directly provide <h3>Data you passively provide</h3>
<p>When you request any resource from this website (for example: a page, a font, an image, or an API endpoint) information about the request may be logged.</p>
<p>Information about a request is limited to:</p>
<ul>
<li>the time the request was made</li>
<li>the status code of the response</li>
<li>the method of the request</li>
<li>the requested URL</li>
<li>how long it took to complete the request.</li>
</ul>
<p>No identifying information is logged, such as the visitor's cookie, user-agent, or IP address. Here are a couple lines to serve as an example:</p>
<pre><code>2019-01-19 16:37:47 +00:00 200 GET /api/v1/comments/xrlETJYzH-c?format=html&hl=en-US 1345.88ms
2019-01-19 16:37:53 +00:00 200 GET /vi/r5P-f5arPXE/maxres.jpg 1085.41ms
2019-01-19 16:37:54 +00:00 200 GET /watch 7.04ms</code></pre>
<p>This website does not store the visitor's user-agent or IP address and does not use fingerprinting, advertisements, or tracking of any form.</p>
<p>This website provides links to googlevideo.com to provide audio and video playback. googlevideo.com is owned by Google and is subject to their <a href="https://policies.google.com/privacy">privacy policy</a>.</p>
Data that you provide to the website for the purpose of the site's operation (for example: an account name, account password, or channel subscription) will be stored in the website's database until the user decides to remove it. This data will not be intentionally shared with anyone or anything. <h3>Data stored in your browser</h3>
<p>This website uses browser cookies to authenticate registered users. This data consists of:</p>
<ul>
<li>An account token to keep you logged into the website between visits, which is sent when any page is loaded while you are logged in</li>
</ul>
<p>This website also provides an option to store site preferences, such as the theme or locale, without an account. Using this feature will store a cookie in the visitor's browser containing their preferences. This cookie is sent on every request and does not contain any identifying information.</p>
<p>You can remove this data from your browser by logging out of this website, or by using your browser's cookie-related controls to delete the data.</p>
Information stored about a registered user is limited to: <h3>Removal of data</h3>
<p>To remove data stored in your browser, you can log out of the website, or you can use your browser's cookie-related controls to delete the data.</p>
- a list of session tokens for remaining logged in across devices <p>To remove data that has been stored in the website's database, you can use the <a href="/delete_account">delete my account</a> page.</p>
- the last time an account was updated (to provide accurate notifications)
- a list of video IDs identifying notifications from a user's subscriptions
- a list of channel UCIDs the user is subscribed to
- a user ID (for persistent storage of subscriptions and preferences)
- a json object containing user preferences
- a hashed password if applicable (not present on google accounts)
- a randomly generated token for providing an RSS feed of a user's subscriptions
- a list of video IDs identifying watched videos
The above list reflects [this code](https://github.com/omarroth/invidious/blob/master/src/invidious/users.cr#L14-L51).
Users can clear their watch history using the [clear watch history](/clear_watch_history) page.
If a user is logged in with a Google account, no password will ever be stored. This website uses the session token provided by Google to identify a user, but does not store the information required to make requests on a user's behalf without their knowledge or consent.
### Data you passively provide
When you request any resource from this website (for example: a page, a font, an image, or an API endpoint) information about the request may be logged.
Information about a request is limited to:
- the time the request was made
- the status code of the response
- the method of the request
- the requested URL
- how long it took to complete the request.
No identifying information is logged, such as the visitor's cookie, user-agent, or IP address. Here are a couple lines to serve as an example:
```
2019-01-19 16:37:47 +00:00 200 GET /api/v1/comments/xrlETJYzH-c?format=html&hl=en-US 1345.88ms
2019-01-19 16:37:53 +00:00 200 GET /vi/r5P-f5arPXE/maxres.jpg 1085.41ms
2019-01-19 16:37:54 +00:00 200 GET /watch 7.04ms
```
This website does not store the visitor's user-agent or IP address and does not use fingerprinting, advertisements, or tracking of any form.
This website provides links to googlevideo.com to provide audio and video playback. googlevideo.com is owned by Google and is subject to their [privacy policy](https://policies.google.com/privacy).
### Data stored in your browser
This website uses browser cookies to authenticate registered users. This data consists of:
- An account token to keep you logged into the website between visits, which is sent when any page is loaded while you are logged in
This website also provides an option to store site preferences, such as the theme or locale, without an account. Using this feature will store a cookie in the visitor's browser containing their preferences. This cookie is sent on every request and does not contain any identifying information.
You can remove this data from your browser by logging out of this website, or by using your browser's cookie-related controls to delete the data.
### Removal of data
To remove data stored in your browser, you can log out of the website, or you can use your browser's cookie-related controls to delete the data.
To remove data that has been stored in the website's database, you can use the [delete my account](/delete_account) page.
END_PRIVACY_POLICY
)
%>
</div> </div>

View File

@@ -19,7 +19,7 @@
</div> </div>
<div class="pure-u-1-3" style="text-align:right"> <div class="pure-u-1-3" style="text-align:right">
<h3> <h3>
<a href="/data_control?referer=<%= URI.escape(referer) %>"> <a href="/data_control?referer=<%= URI.encode_www_form(referer) %>">
<%= translate(locale, "Import/export") %> <%= translate(locale, "Import/export") %>
</a> </a>
</h3> </h3>
@@ -38,7 +38,7 @@
<div class="pure-u-1-5" style="text-align:right"> <div class="pure-u-1-5" style="text-align:right">
<h3 style="padding-right:0.5em"> <h3 style="padding-right:0.5em">
<form onsubmit="return false" action="/subscription_ajax?action_remove_subscriptions=1&c=<%= channel.id %>&referer=<%= env.get("current_page") %>" method="post"> <form onsubmit="return false" action="/subscription_ajax?action_remove_subscriptions=1&c=<%= channel.id %>&referer=<%= env.get("current_page") %>" method="post">
<input type="hidden" name="csrf_token" value="<%= URI.escape(env.get?("csrf_token").try &.as(String) || "") %>"> <input type="hidden" name="csrf_token" value="<%= URI.encode_www_form(env.get?("csrf_token").try &.as(String) || "") %>">
<a onclick="remove_subscription(this)" data-ucid="<%= channel.id %>" href="#"> <a onclick="remove_subscription(this)" data-ucid="<%= channel.id %>" href="#">
<input style="all:unset" type="submit" value="<%= translate(locale, "unsubscribe") %>"> <input style="all:unset" type="submit" value="<%= translate(locale, "unsubscribe") %>">
</a> </a>
@@ -78,6 +78,6 @@ function remove_subscription(target) {
} }
} }
xhr.send('csrf_token=<%= URI.escape(env.get?("csrf_token").try &.as(String) || "") %>'); xhr.send('csrf_token=<%= URI.encode_www_form(env.get?("csrf_token").try &.as(String) || "") %>');
} }
</script> </script>

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