Compare commits

..

97 Commits

Author SHA1 Message Date
89725df3dc Update CHANGELOG and bump version 2019-06-05 23:08:16 -05:00
51799844c9 Update Norwegian Bokmål translation 2019-06-05 18:11:25 +02:00
48de136e9d Update Esperanto translation 2019-06-05 18:11:25 +02:00
cb6f97a831 Update Esperanto translation 2019-06-05 18:11:25 +02:00
7e0cd0ab60 Update German translation 2019-06-05 18:11:25 +02:00
8521f04087 Use short URL for sharing videos 2019-06-05 11:10:23 -05:00
8ba45808be Fix typo in '/api/manifest/dash/id' 2019-06-04 21:14:57 -05:00
d876fd7f5b Add 'unique_res' option to '/api/manifest/dash/id' 2019-06-04 20:54:38 -05:00
352e409a6e Fix toggle_theme when visiting preferences with JS disabled 2019-06-04 20:13:58 -05:00
d6ec441c8e Add buffer for notification channels 2019-06-03 13:36:49 -05:00
d197497349 Add 'type' field to ChannelVideo and Video 2019-06-03 13:36:34 -05:00
d892ba6aa5 Refactor connection channel for delivering notifications 2019-06-03 13:12:06 -05:00
84b2583973 Fix insert for empty descriptions 2019-06-02 15:47:45 -05:00
108648b427 Optimize query for creating subscription feeds 2019-06-02 11:48:18 -05:00
71bf8b6b4d Refactor connect_listen for notifications 2019-06-02 07:41:53 -05:00
576067c1e5 Fix preference for web notifications 2019-06-01 18:06:44 -05:00
e23bab0103 Only add notification event listener after onload 2019-06-01 17:38:49 -05:00
4e111c84f3 Fix typo in '/watch' 2019-06-01 17:18:34 -05:00
8cecce7570 Fix audio mode for raw URLs 2019-06-01 16:28:08 -05:00
0338fd42e1 Add support for Web notifications 2019-06-01 16:09:17 -05:00
b3788bc143 Fix typo for feed_needs_update 2019-06-01 11:19:06 -05:00
18d66ddded Add 'needs_update' column for scheduling feed refresh 2019-06-01 10:19:18 -05:00
701b5ea561 Remove watched videos from notifications 2019-06-01 09:51:31 -05:00
86d0de4b0e Fix typo in post webhook 2019-05-31 10:29:45 -05:00
a95958f9f6 Fix videoplayback when encountering redirector URLs 2019-05-30 20:47:04 -05:00
69ab236f3f Fix typo in '/watch' 2019-05-30 19:00:38 -05:00
4cf3c6a616 HTML-escape strings to '/api/v1/auth/preferences' 2019-05-30 19:00:38 -05:00
da48bbf312 Add support for partial POST to '/api/v1/auth/preferences' 2019-05-30 19:00:38 -05:00
ac957db6d1 Provide dash qualities as reported by YouTube player 2019-05-30 19:00:30 -05:00
64464f23ae Add 'views' to channel_videos 2019-05-30 18:59:13 -05:00
52cb239194 Updated and corrected Dutch translation (#560)
* Updated and corrected Dutch translation
2019-05-29 18:08:42 -05:00
efd54b7523 Add 'comments' as URL parameter 2019-05-29 14:24:30 -05:00
2aca57cb82 Update specs 2019-05-28 10:04:11 -05:00
d68baf08cb Shrink h1 on mobile 2019-05-28 10:04:04 -05:00
a7578aa709 Update videojs-vtt-thumbnails version 2019-05-27 20:55:34 -05:00
a8261d376a Merge remote-tracking branch 'weblate/master' 2019-05-27 14:59:49 -05:00
fc346b4efd Add 'View playlist on YouTube' 2019-05-27 14:54:50 -05:00
ad09e734da Refactor refresh_feeds 2019-05-27 14:48:57 -05:00
a674fea1c2 Update French translation 2019-05-27 19:53:00 +02:00
9e22b34fac Update Spanish translation 2019-05-27 19:53:00 +02:00
fe24408620 Update English (United States) translation 2019-05-27 19:53:00 +02:00
c07ad0941c Fix typo in refresh_feeds 2019-05-27 12:51:18 -05:00
2f02b38b62 Merge pull request #557 from EsmailELBoBDev2/patch-1
Update ar.json
2019-05-27 12:25:21 -05:00
3ac766530d Add proper queuing for feed events 2019-05-27 12:23:15 -05:00
de77c71042 Add "local" to "next video" URLs 2019-05-27 12:16:22 -05:00
9c854a1757 Update ar.json 2019-05-27 17:04:11 +00:00
f66fa1150e Fix inconsistency in translation 2019-05-27 11:56:52 -05:00
f820706e4f Truncate password to 55 bytes 2019-05-27 09:06:32 -05:00
29e9e0f2cc Provide empty response on 204 2019-05-27 08:35:38 -05:00
2933093e17 updated arabic, FINALLY (#553)
* Update ar.json
2019-05-26 19:15:49 -05:00
71cd8918be Fix URI for storyboard extractor 2019-05-26 18:55:22 -05:00
c049ba59ff Add stub for '/timedtext_video' 2019-05-26 13:49:35 -05:00
51c5f28443 Add config option for updating feeds on event 2019-05-26 12:06:01 -05:00
bb1ed902a9 Trigger feed update when modifying subscriptions 2019-05-26 11:34:08 -05:00
b016a60a75 Add triggers for updating feeds 2019-05-26 11:28:54 -05:00
890d485bb5 Fix formatting 2019-05-26 10:53:56 -05:00
208bb2d72f Catch connection reset when proxying files 2019-05-26 09:41:12 -05:00
267bf289c4 Exclude /api/v1/auth/notifications from middleware 2019-05-21 10:08:49 -05:00
b3e083d866 Add POST /api/v1/auth/subscriptions 2019-05-21 09:01:17 -05:00
a675c64c2d Refactor DBConfig 2019-05-21 09:00:35 -05:00
8b50c8515f Fix content-type for captions 2019-05-20 20:22:01 -05:00
1eaa377583 Add Greek translation (thanks Iris!) 2019-05-20 13:06:54 -05:00
4345b1d930 Reset playbackRate once player has caught up to source 2019-05-20 12:15:48 -05:00
06bf0c2622 Copy proxy_file in chunks 2019-05-20 12:06:44 -05:00
3ac8de0a64 Fix proxy_file when response body is empty 2019-05-19 07:13:13 -05:00
f237fd9847 Fix CORS headers for proxied assets 2019-05-19 07:12:45 -05:00
5730280325 Only modify cues for auto-generated captions 2019-05-18 20:27:19 -05:00
ab4df7e078 Fix response for proxied assets 2019-05-18 19:15:47 -05:00
b52e6c99ab Update Ukrainian translation 2019-05-18 19:15:36 -05:00
7dab548522 Update Russian translation 2019-05-18 19:15:35 -05:00
785c341822 Update CloudTube link in README 2019-05-16 20:53:38 -05:00
7d2e1f63b5 Refactor watched_widget.js 2019-05-16 20:51:17 -05:00
e119459411 Add GET '/authorize_token' 2019-05-15 12:26:29 -05:00
97ef2191fd Add 'hsts' as config option 2019-05-14 08:21:01 -05:00
e833ccf309 Fix comments for age-restricted videos 2019-05-14 08:18:57 -05:00
a4134d30fa Fix comedy genre URL 2019-05-14 08:02:55 -05:00
6069fd02d3 Merge remote-tracking branch 'weblate/master' 2019-05-11 11:19:18 -05:00
bb15dc57a4 Fix font color for captions button 2019-05-11 11:09:45 -05:00
bdfe170c3b Fix length seconds for videos with longer duration 2019-05-11 10:59:47 -05:00
0fa2ba53ab Update Italian translation 2019-05-11 17:42:15 +02:00
4bb657debf Update Dutch translation 2019-05-11 17:42:15 +02:00
dd12840e34 Update French translation 2019-05-11 17:42:15 +02:00
b027dcfec9 Update Russian translation 2019-05-11 17:42:15 +02:00
9e9b6f1542 Update German translation 2019-05-11 17:42:15 +02:00
7cd66e20d0 Fix typo in X-XSS-Protection 2019-05-10 16:48:38 -05:00
d93df15eff Update licenses 2019-05-10 15:33:23 -05:00
ddfd20d997 Fix CSP for subdomains 2019-05-10 15:29:10 -05:00
fd8af88493 Use separate asset version for cache busting 2019-05-09 22:58:34 -05:00
bfa488f77d Add option to toggle theme without reload 2019-05-09 11:50:44 -05:00
03be793930 Fix typo in player.js 2019-05-09 08:36:36 -05:00
37d88d5ff7 Remove referer from XHR 2019-05-08 09:16:11 -05:00
4616f889fd Add simple form of cache busting 2019-05-08 08:58:10 -05:00
59cbf95c4f Update licenses 2019-05-06 11:27:11 -05:00
058711d3a8 Refactor player.js 2019-05-06 11:23:14 -05:00
2ddc61fa5c Refactor embed.js 2019-05-06 10:37:22 -05:00
e04b7d0f01 Fix video previews for embeds 2019-05-06 10:28:20 -05:00
2faa2ed1f4 Refactor watch.js 2019-05-06 09:48:33 -05:00
56 changed files with 3218 additions and 1736 deletions

View File

@ -1,3 +1,67 @@
# 0.18.0 (2019-06-06)
# Version 0.18.0: Native Notifications and Optimizations
Hope everyone has been doing well. This past month there have been [97 commits](https://github.com/omarroth/invidious/compare/0.17.0...0.18.0) from 10 contributors. For the most part changes this month have been on optimizing various parts of the site, mainly subscription feeds and support for serving images and other assets.
I'm quite happy to mention that support for Greek (`el`) has been added, which I hope will continue to make the site accessible for more users.
Subscription feeds will now only update when necessary, rather than periodically. This greatly lightens the load on DB as well as making the feeds generally more responsive when changing subscriptions, importing data, and when receiving new uploads.
Caching for images and other assets should be greatly improved with [#456](https://github.com/omarroth/invidious/issues/456). JavaScript has been pulled out into separate files where possible to take advantage of this, which should result in lighter pages and faster load times.
This past month several people have encountered issues with downloads and watching high quality video through the site, see [#532](https://github.com/omarroth/invidious/issues/532) and [#562](https://github.com/omarroth/invidious/issues/562). For this coming month I've allocated some more hardware which should help with this, and I'm also looking into optimizing how videos are currently served.
## For Developers
`viewCount` is now available for `/api/v1/popular` and all videos returned from `/api/v1/auth/notifications`. Both also now provide `"type"` for indicating available information for each object.
An `/authorize_token` page is now available for more easily creating new tokens for use in applications, see [this comment](https://github.com/omarroth/invidious/issues/473#issuecomment-496230812) in [#473](https://github.com/omarroth/invidious/issues/473) for more details.
A POST `/api/v1/auth/notifications` endpoint is also now available for correctly returning notifications for 150+ channels.
## For Administrators
There are two new schema changes for administrators: `views` for adding view count to the popular page, and `feed_needs_update` for tracking feed changes.
As always the relevant migration scripts are provided which should run when following instructions for [updating](https://github.com/omarroth/invidious/wiki/Updating). Otherwise, adding `check_tables: true` to your config will automatically make the required changes.
## Native Notifications
[<img src="https://omar.yt/81c3ae1839831bd9300d75e273b6552a86dc2352/native_notification.png" height="160" width="472">](https://omar.yt/81c3ae1839831bd9300d75e273b6552a86dc2352/native_notification.png "Example of native notification, available in repository under screnshots/native_notification.png")
It is now possible to receive [Web notifications](https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API) from subscribed channels.
You can enable notifications by clicking "Enable web notifications" in your preferences. Generally they appear within 20-60 seconds of a new video being uploaded, and I've found them to be an enormous quality of life improvement.
Although it has been fairly stable, please feel free to report any issues you find [here](https://github.com/omarroth/invidious/issues) or emailing me directly at omarroth@protonmail.com.
Important to note for administrators is that instances require [`use_pubsub_feeds`](https://github.com/omarroth/invidious/wiki/Configuration) and must be served over HTTPS in order to correctly send web notifications.
## Finances
### Donations
- [Patreon](https://www.patreon.com/omarroth) : \$49.73
- [Liberapay](https://liberapay.com/omarroth) : \$100.57
- Crypto : ~\$11.12 (converted from BCH, BTC)
- Total : \$161.42
### Expenses
- invidious-load1 (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-db1 (s-4vcpu-8gb) : \$40.00 (database)
- Total : \$85.00
See you all next month!
# 0.17.0 (2019-05-06)
# Version 0.17.0: Player and Authentication API

View File

@ -201,7 +201,7 @@ $ ./sentry
## Made with Invidious
- [FreeTube](https://github.com/FreeTubeApp/FreeTube): An Open Source YouTube app for privacy.
- [CloudTube](https://github.com/cloudrac3r/cadencegq): Website featuring pastebin, image host, and YouTube player
- [CloudTube](https://cadence.moe/cloudtube/subscriptions): A JS-rich alternate YouTube player
- [PeerTubeify](https://gitlab.com/Ealhad/peertubeify): On YouTube, displays a link to the same video on PeerTube, if it exists.
- [MusicPiped](https://github.com/deep-gaurav/MusicPiped): A materialistic music player that streams music from YouTube.

View File

@ -222,6 +222,11 @@ input[type="search"]::-webkit-search-cancel-button {
.navbar > .searchbar > form {
width: 60%;
}
h1 {
font-size: 1.25em;
margin: 0.42em 0;
}
}
@media screen and (max-width: 320px) {
@ -327,6 +332,11 @@ input[type="search"]::-webkit-search-cancel-button {
background-color: rgba(15, 15, 15, 0.5);
}
fieldset > select,
span > select {
color: rgba(49, 49, 51, 1);
}
.video-js .vjs-load-progress,
.video-js .vjs-load-progress div {
background: rgba(87, 87, 88, 1);

88
assets/js/embed.js Normal file
View File

@ -0,0 +1,88 @@
function get_playlist(plid, timeouts = 0) {
if (timeouts > 10) {
console.log('Failed to pull playlist');
return;
}
if (plid.startsWith('RD')) {
var plid_url = '/api/v1/mixes/' + plid +
'?continuation=' + video_data.id +
'&format=html&hl=' + video_data.preferences.locale;
} else {
var plid_url = '/api/v1/playlists/' + plid +
'?continuation=' + video_data.id +
'&format=html&hl=' + video_data.preferences.locale;
}
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 20000;
xhr.open('GET', plid_url, true);
xhr.send();
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
if (xhr.response.nextVideo) {
player.on('ended', function () {
var url = new URL('https://example.com/embed/' + xhr.response.nextVideo);
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('list', plid);
location.assign(url.pathname + url.search);
});
}
}
}
}
xhr.ontimeout = function () {
console.log('Pulling playlist timed out.');
get_playlist(plid, timeouts++);
}
}
if (video_data.plid) {
get_playlist(video_data.plid);
} else if (video_data.video_series) {
player.on('ended', function () {
var url = new URL('https://example.com/embed/' + video_data.video_series.shift());
if (video_data.params.autoplay || video_data.params.continue_autoplay) {
url.searchParams.set('autoplay', '1');
}
if (video_data.params.listen !== video_data.preferences.listen) {
url.searchParams.set('listen', video_data.params.listen);
}
if (video_data.params.speed !== video_data.preferences.speed) {
url.searchParams.set('speed', video_data.params.speed);
}
if (video_data.params.local !== video_data.preferences.local) {
url.searchParams.set('local', video_data.params.local);
}
if (video_data.video_series.length !== 0) {
url.searchParams.set('playlist', video_data.video_series.join(','))
}
location.assign(url.pathname + url.search);
});
}

139
assets/js/notifications.js Normal file
View File

@ -0,0 +1,139 @@
var notifications, delivered;
function get_subscriptions(callback, failures = 1) {
if (failures >= 10) {
return
}
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 20000;
xhr.open('GET', '/api/v1/auth/subscriptions', true);
xhr.send(null);
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
subscriptions = xhr.response;
callback(subscriptions);
} else {
console.log('Pulling subscriptions failed... ' + failures + '/10');
get_subscriptions(callback, failures++)
}
}
}
xhr.ontimeout = function () {
console.log('Pulling subscriptions failed... ' + failures + '/10');
get_subscriptions(callback, failures++);
}
}
function create_notification_stream(subscriptions) {
notifications = new SSE(
'/api/v1/auth/notifications?fields=videoId,title,author,authorId,publishedText,published,authorThumbnails,liveNow', {
withCredentials: true,
payload: 'topics=' + subscriptions.map(function (subscription) { return subscription.authorId }).join(','),
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
});
delivered = [];
var start_time = Math.round(new Date() / 1000);
notifications.onmessage = function (event) {
if (!event.id) {
return
}
var notification = JSON.parse(event.data);
console.log('Got notification:', notification);
if (start_time < notification.published && !delivered.includes(notification.videoId)) {
if (Notification.permission === 'granted') {
var system_notification =
new Notification((notification.liveNow ? notification_data.live_now_text : notification_data.upload_text).replace('`x`', notification.author), {
body: notification.title,
icon: '/ggpht' + new URL(notification.authorThumbnails[2].url).pathname,
img: '/ggpht' + new URL(notification.authorThumbnails[4].url).pathname,
tag: notification.videoId
});
system_notification.onclick = function (event) {
window.open('/watch?v=' + event.currentTarget.tag, '_blank');
}
}
delivered.push(notification.videoId);
localStorage.setItem('notification_count', parseInt(localStorage.getItem('notification_count') || '0') + 1);
var notification_ticker = document.getElementById('notification_ticker');
if (parseInt(localStorage.getItem('notification_count')) > 0) {
notification_ticker.innerHTML =
'<span id="notification_count">' + localStorage.getItem('notification_count') + '</span> <i class="icon ion-ios-notifications"></i>';
} else {
notification_ticker.innerHTML =
'<i class="icon ion-ios-notifications-outline"></i>';
}
}
}
notifications.onerror = function (event) {
console.log('Something went wrong with notifications, trying to reconnect...');
notifications.close();
get_subscriptions(create_notification_stream);
}
notifications.ontimeout = function (event) {
console.log('Something went wrong with notifications, trying to reconnect...');
notifications.close();
get_subscriptions(create_notification_stream);
}
notifications.stream();
}
window.addEventListener('load', function (e) {
localStorage.setItem('notification_count', document.getElementById('notification_count') ? document.getElementById('notification_count').innerText : '0');
if (localStorage.getItem('stream')) {
localStorage.removeItem('stream');
} else {
setTimeout(function () {
if (!localStorage.getItem('stream')) {
get_subscriptions(create_notification_stream);
localStorage.setItem('stream', true);
}
}, Math.random() * 1000 + 10);
}
window.addEventListener('storage', function (e) {
if (e.key === 'stream' && !e.newValue) {
if (notifications) {
localStorage.setItem('stream', true);
} else {
setTimeout(function () {
if (!localStorage.getItem('stream')) {
get_subscriptions(create_notification_stream);
localStorage.setItem('stream', true);
}
}, Math.random() * 1000 + 10);
}
} else if (e.key === 'notification_count') {
var notification_ticker = document.getElementById('notification_ticker');
if (parseInt(e.newValue) > 0) {
notification_ticker.innerHTML =
'<span id="notification_count">' + e.newValue + '</span> <i class="icon ion-ios-notifications"></i>';
} else {
notification_ticker.innerHTML =
'<i class="icon ion-ios-notifications-outline"></i>';
}
}
});
});
window.addEventListener('unload', function (e) {
if (notifications) {
localStorage.removeItem('stream');
}
});

240
assets/js/player.js Normal file
View File

@ -0,0 +1,240 @@
var options = {
preload: "auto",
liveui: true,
playbackRates: [0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 2.0],
controlBar: {
children: [
"playToggle",
"volumePanel",
"currentTimeDisplay",
"timeDivider",
"durationDisplay",
"progressControl",
"remainingTimeDisplay",
"captionsButton",
"qualitySelector",
"playbackRateMenuButton",
"fullscreenToggle"
]
}
}
if (player_data.aspect_ratio) {
options.aspectRatio = player_data.aspect_ratio;
}
var embed_url = new URL(location);
embed_url.searchParams.delete('v');
short_url = location.origin + '/' + video_data.id + embed_url.search;
embed_url = location.origin + '/embed/' + video_data.id + embed_url.search;
var shareOptions = {
socials: ["fbFeed", "tw", "reddit", "email"],
url: short_url,
title: player_data.title,
description: player_data.description,
image: player_data.thumbnail,
embedCode: "<iframe id='ivplayer' type='text/html' width='640' height='360' src='" + embed_url + "' frameborder='0'></iframe>"
}
var player = videojs("player", options, function () {
this.hotkeys({
volumeStep: 0.1,
seekStep: 5,
enableModifiersForNumbers: false,
enableHoverScroll: true,
customKeys: {
// Toggle play with K Key
play: {
key: function (e) {
return e.which === 75;
},
handler: function (player, options, e) {
if (player.paused()) {
player.play();
} else {
player.pause();
}
}
},
// Go backward 10 seconds
backward: {
key: function (e) {
return e.which === 74;
},
handler: function (player, options, e) {
player.currentTime(player.currentTime() - 10);
}
},
// Go forward 10 seconds
forward: {
key: function (e) {
return e.which === 76;
},
handler: function (player, options, e) {
player.currentTime(player.currentTime() + 10);
}
},
// Increase speed
increase_speed: {
key: function (e) {
return (e.which === 190 && e.shiftKey);
},
handler: function (player, _, e) {
size = options.playbackRates.length;
index = options.playbackRates.indexOf(player.playbackRate());
player.playbackRate(options.playbackRates[(index + 1) % size]);
}
},
// Decrease speed
decrease_speed: {
key: function (e) {
return (e.which === 188 && e.shiftKey);
},
handler: function (player, _, e) {
size = options.playbackRates.length;
index = options.playbackRates.indexOf(player.playbackRate());
player.playbackRate(options.playbackRates[(size + index - 1) % size]);
}
}
}
});
});
player.on('error', function (event) {
if (player.error().code === 2 || player.error().code === 4) {
setInterval(setTimeout(function (event) {
console.log('An error occured in the player, reloading...');
var currentTime = player.currentTime();
var playbackRate = player.playbackRate();
var paused = player.paused();
player.load();
if (currentTime > 0.5) {
currentTime -= 0.5;
}
player.currentTime(currentTime);
player.playbackRate(playbackRate);
if (!paused) {
player.play();
}
}, 5000), 5000);
}
});
// Add markers
if (video_data.params.video_start > 0 || video_data.params.video_end > 0) {
var markers = [{ time: video_data.params.video_start, text: 'Start' }];
if (video_data.params.video_end < 0) {
markers.push({ time: video_data.length_seconds - 0.5, text: 'End' });
} else {
markers.push({ time: video_data.params.video_end, text: 'End' });
}
player.markers({
onMarkerReached: function (marker) {
if (marker.text === 'End') {
if (player.loop()) {
player.markers.prev('Start');
} else {
player.pause();
}
}
},
markers: markers
});
player.currentTime(video_data.params.video_start);
}
player.volume(video_data.params.volume / 100);
player.playbackRate(video_data.params.speed);
player.on('waiting', function () {
if (player.playbackRate() > 1 && player.liveTracker.isLive() && player.liveTracker.atLiveEdge()) {
console.log('Player has caught up to source, resetting playbackRate.')
player.playbackRate(1);
}
});
if (video_data.params.autoplay) {
var bpb = player.getChild('bigPlayButton');
if (bpb) {
bpb.hide();
player.ready(function () {
new Promise(function (resolve, reject) {
setTimeout(() => resolve(1), 1);
}).then(function (result) {
var promise = player.play();
if (promise !== undefined) {
promise.then(_ => {
}).catch(error => {
bpb.show();
});
}
});
});
}
}
if (!video_data.params.listen && video_data.params.quality === 'dash') {
player.httpSourceSelector();
}
player.vttThumbnails({
src: location.origin + '/api/v1/storyboards/' + video_data.id + '?height=90'
});
// Enable annotations
if (!video_data.params.listen && video_data.params.annotations) {
var video_container = document.getElementById('player');
let xhr = new XMLHttpRequest();
xhr.responseType = 'text';
xhr.timeout = 60000;
xhr.open('GET', '/api/v1/annotations/' + video_data.id, true);
xhr.send();
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
videojs.registerPlugin('youtubeAnnotationsPlugin', youtubeAnnotationsPlugin);
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 });
});
}
}
}
}
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');
}
});
}
// Since videojs-share can sometimes be blocked, we defer it until last
player.share(shareOptions);

200
assets/js/sse.js Normal file
View File

@ -0,0 +1,200 @@
/**
* Copyright (C) 2016 Maxime Petazzoni <maxime.petazzoni@bulix.org>.
* All rights reserved.
*/
var SSE = function (url, options) {
if (!(this instanceof SSE)) {
return new SSE(url, options);
}
this.INITIALIZING = -1;
this.CONNECTING = 0;
this.OPEN = 1;
this.CLOSED = 2;
this.url = url;
options = options || {};
this.headers = options.headers || {};
this.payload = options.payload !== undefined ? options.payload : '';
this.method = options.method || (this.payload && 'POST' || 'GET');
this.FIELD_SEPARATOR = ':';
this.listeners = {};
this.xhr = null;
this.readyState = this.INITIALIZING;
this.progress = 0;
this.chunk = '';
this.addEventListener = function(type, listener) {
if (this.listeners[type] === undefined) {
this.listeners[type] = [];
}
if (this.listeners[type].indexOf(listener) === -1) {
this.listeners[type].push(listener);
}
};
this.removeEventListener = function(type, listener) {
if (this.listeners[type] === undefined) {
return;
}
var filtered = [];
this.listeners[type].forEach(function(element) {
if (element !== listener) {
filtered.push(element);
}
});
if (filtered.length === 0) {
delete this.listeners[type];
} else {
this.listeners[type] = filtered;
}
};
this.dispatchEvent = function(e) {
if (!e) {
return true;
}
e.source = this;
var onHandler = 'on' + e.type;
if (this.hasOwnProperty(onHandler)) {
this[onHandler].call(this, e);
if (e.defaultPrevented) {
return false;
}
}
if (this.listeners[e.type]) {
return this.listeners[e.type].every(function(callback) {
callback(e);
return !e.defaultPrevented;
});
}
return true;
};
this._setReadyState = function (state) {
var event = new CustomEvent('readystatechange');
event.readyState = state;
this.readyState = state;
this.dispatchEvent(event);
};
this._onStreamFailure = function(e) {
this.dispatchEvent(new CustomEvent('error'));
this.close();
}
this._onStreamProgress = function(e) {
if (this.xhr.status !== 200) {
this._onStreamFailure(e);
return;
}
if (this.readyState == this.CONNECTING) {
this.dispatchEvent(new CustomEvent('open'));
this._setReadyState(this.OPEN);
}
var data = this.xhr.responseText.substring(this.progress);
this.progress += data.length;
data.split(/(\r\n|\r|\n){2}/g).forEach(function(part) {
if (part.trim().length === 0) {
this.dispatchEvent(this._parseEventChunk(this.chunk.trim()));
this.chunk = '';
} else {
this.chunk += part;
}
}.bind(this));
};
this._onStreamLoaded = function(e) {
this._onStreamProgress(e);
// Parse the last chunk.
this.dispatchEvent(this._parseEventChunk(this.chunk));
this.chunk = '';
};
/**
* Parse a received SSE event chunk into a constructed event object.
*/
this._parseEventChunk = function(chunk) {
if (!chunk || chunk.length === 0) {
return null;
}
var e = {'id': null, 'retry': null, 'data': '', 'event': 'message'};
chunk.split(/\n|\r\n|\r/).forEach(function(line) {
line = line.trimRight();
var index = line.indexOf(this.FIELD_SEPARATOR);
if (index <= 0) {
// Line was either empty, or started with a separator and is a comment.
// Either way, ignore.
return;
}
var field = line.substring(0, index);
if (!(field in e)) {
return;
}
var value = line.substring(index + 1).trimLeft();
if (field === 'data') {
e[field] += value;
} else {
e[field] = value;
}
}.bind(this));
var event = new CustomEvent(e.event);
event.data = e.data;
event.id = e.id;
return event;
};
this._checkStreamClosed = function() {
if (this.xhr.readyState === XMLHttpRequest.DONE) {
this._setReadyState(this.CLOSED);
}
};
this.stream = function() {
this._setReadyState(this.CONNECTING);
this.xhr = new XMLHttpRequest();
this.xhr.addEventListener('progress', this._onStreamProgress.bind(this));
this.xhr.addEventListener('load', this._onStreamLoaded.bind(this));
this.xhr.addEventListener('readystatechange', this._checkStreamClosed.bind(this));
this.xhr.addEventListener('error', this._onStreamFailure.bind(this));
this.xhr.addEventListener('abort', this._onStreamFailure.bind(this));
this.xhr.open(this.method, this.url);
for (var header in this.headers) {
this.xhr.setRequestHeader(header, this.headers[header]);
}
this.xhr.send(this.payload);
};
this.close = function() {
if (this.readyState === this.CLOSED) {
return;
}
this.xhr.abort();
this.xhr = null;
this._setReadyState(this.CLOSED);
};
};
// Export our SSE module for npm.js
if (typeof exports !== 'undefined') {
exports.SSE = SSE;
}

View File

@ -8,14 +8,13 @@ if (subscribe_button.getAttribute('data-type') === 'subscribe') {
}
function subscribe(timeouts = 0) {
if (timeouts > 10) {
if (timeouts >= 10) {
console.log('Failed to subscribe.');
return;
}
var url = '/subscription_ajax?action_create_subscription_to_channel=1&redirect=false' +
'&c=' + subscribe_data.ucid +
'&referer=' + location.pathname + location.search;
'&c=' + subscribe_data.ucid;
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 20000;
@ -38,19 +37,18 @@ function subscribe(timeouts = 0) {
xhr.ontimeout = function () {
console.log('Subscribing timed out.');
subscribe(timeouts + 1);
};
subscribe(timeouts++);
}
}
function unsubscribe(timeouts = 0) {
if (timeouts > 10) {
if (timeouts >= 10) {
console.log('Failed to subscribe');
return;
}
var url = '/subscription_ajax?action_remove_subscriptions=1&redirect=false' +
'&c=' + subscribe_data.ucid +
'&referer=' + location.pathname + location.search;
'&c=' + subscribe_data.ucid;
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 20000;
@ -73,6 +71,6 @@ function unsubscribe(timeouts = 0) {
xhr.ontimeout = function () {
console.log('Unsubscribing timed out.');
unsubscribe(timeouts + 1);
};
unsubscribe(timeouts++);
}
}

34
assets/js/themes.js Normal file
View File

@ -0,0 +1,34 @@
var toggle_theme = document.getElementById('toggle_theme')
toggle_theme.href = 'javascript:void(0);';
toggle_theme.addEventListener('click', function () {
var dark_mode = document.getElementById('dark_theme').media == 'none';
var url = '/toggle_theme?redirect=false';
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 20000;
xhr.open('GET', url, true);
xhr.send();
set_mode(dark_mode);
localStorage.setItem('dark_mode', dark_mode);
});
window.addEventListener('storage', function (e) {
if (e.key == 'dark_mode') {
var dark_mode = e.newValue === 'true';
set_mode(dark_mode);
}
});
function set_mode(bool) {
document.getElementById('dark_theme').media = !bool ? 'none' : '';
document.getElementById('light_theme').media = bool ? 'none' : '';
if (bool) {
toggle_theme.children[0].setAttribute('class', 'icon ion-ios-sunny');
} else {
toggle_theme.children[0].setAttribute('class', 'icon ion-ios-moon');
}
}

File diff suppressed because one or more lines are too long

View File

@ -1,52 +1,419 @@
String.prototype.supplant = function (o) {
return this.replace(/{([^{}]*)}/g, function (a, b) {
var r = o[b];
return typeof r === 'string' || typeof r === 'number' ? r : a;
});
}
function toggle_parent(target) {
body = target.parentNode.parentNode.children[1];
if (body.style.display === null || body.style.display === "") {
target.innerHTML = "[ + ]";
body.style.display = "none";
if (body.style.display === null || body.style.display === '') {
target.innerHTML = '[ + ]';
body.style.display = 'none';
} else {
target.innerHTML = "[ - ]";
body.style.display = "";
target.innerHTML = '[ - ]';
body.style.display = '';
}
}
function toggle_comments(target) {
function toggle_comments(event) {
var target = event.target;
body = target.parentNode.parentNode.parentNode.children[1];
if (body.style.display === null || body.style.display === "") {
target.innerHTML = "[ + ]";
body.style.display = "none";
if (body.style.display === null || body.style.display === '') {
target.innerHTML = '[ + ]';
body.style.display = 'none';
} else {
target.innerHTML = "[ - ]";
body.style.display = "";
target.innerHTML = '[ - ]';
body.style.display = '';
}
}
function swap_comments(source) {
if (source == "youtube") {
function swap_comments(event) {
var source = event.target.getAttribute('data-comments');
if (source === 'youtube') {
get_youtube_comments();
} else if (source == "reddit") {
} else if (source === 'reddit') {
get_reddit_comments();
}
}
String.prototype.supplant = function (o) {
return this.replace(/{([^{}]*)}/g, function (a, b) {
var r = o[b];
return typeof r === "string" || typeof r === "number" ? r : a;
});
};
function hide_youtube_replies(event) {
var target = event.target;
sub_text = target.getAttribute('data-inner-text');
inner_text = target.getAttribute('data-sub-text');
function show_youtube_replies(target, inner_text, sub_text) {
body = target.parentNode.parentNode.children[1];
body.style.display = "";
target.innerHTML = inner_text;
target.setAttribute("onclick", "hide_youtube_replies(this, \'" + inner_text + "\', \'" + sub_text + "\')");
}
function hide_youtube_replies(target, inner_text, sub_text) {
body = target.parentNode.parentNode.children[1];
body.style.display = "none";
body.style.display = 'none';
target.innerHTML = sub_text;
target.setAttribute("onclick", "show_youtube_replies(this, \'" + inner_text + "\', \'" + sub_text + "\')");
target.onclick = show_youtube_replies;
target.setAttribute('data-inner-text', inner_text);
target.setAttribute('data-sub-text', sub_text);
}
function show_youtube_replies(event) {
var target = event.target;
sub_text = target.getAttribute('data-inner-text');
inner_text = target.getAttribute('data-sub-text');
body = target.parentNode.parentNode.children[1];
body.style.display = '';
target.innerHTML = sub_text;
target.onclick = hide_youtube_replies;
target.setAttribute('data-inner-text', inner_text);
target.setAttribute('data-sub-text', sub_text);
}
var continue_button = document.getElementById('continue');
if (continue_button) {
continue_button.onclick = continue_autoplay;
}
function continue_autoplay(event) {
if (event.target.checked) {
player.on('ended', function () {
var url = new URL('https://example.com/watch?v=' + video_data.next_video);
if (video_data.params.autoplay || video_data.params.continue_autoplay) {
url.searchParams.set('autoplay', '1');
}
if (video_data.params.listen !== video_data.preferences.listen) {
url.searchParams.set('listen', video_data.params.listen);
}
if (video_data.params.speed !== video_data.preferences.speed) {
url.searchParams.set('speed', video_data.params.speed);
}
if (video_data.params.local !== video_data.preferences.local) {
url.searchParams.set('local', video_data.params.local);
}
url.searchParams.set('continue', '1');
location.assign(url.pathname + url.search);
});
} else {
player.off('ended');
}
}
function number_with_separator(val) {
while (/(\d+)(\d{3})/.test(val.toString())) {
val = val.toString().replace(/(\d+)(\d{3})/, '$1' + ',' + '$2');
}
return val;
}
function get_playlist(plid, timeouts = 0) {
playlist = document.getElementById('playlist');
if (timeouts > 10) {
console.log('Failed to pull playlist');
playlist.innerHTML = '';
return;
}
playlist.innerHTML = ' \
<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3> \
<hr>'
if (plid.startsWith('RD')) {
var plid_url = '/api/v1/mixes/' + plid +
'?continuation=' + video_data.id +
'&format=html&hl=' + video_data.preferences.locale;
} else {
var plid_url = '/api/v1/playlists/' + plid +
'?continuation=' + video_data.id +
'&format=html&hl=' + video_data.preferences.locale;
}
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 20000;
xhr.open('GET', plid_url, true);
xhr.send();
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
playlist.innerHTML = xhr.response.playlistHtml;
if (xhr.response.nextVideo) {
player.on('ended', function () {
var url = new URL('https://example.com/watch?v=' + xhr.response.nextVideo);
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('list', plid);
location.assign(url.pathname + url.search);
});
}
} else {
playlist.innerHTML = '';
document.getElementById('continue').style.display = '';
}
}
}
xhr.ontimeout = function () {
console.log('Pulling playlist timed out.');
playlist = document.getElementById('playlist');
playlist.innerHTML =
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3><hr>';
get_playlist(plid, timeouts + 1);
}
}
function get_reddit_comments(timeouts = 0) {
comments = document.getElementById('comments');
if (timeouts > 10) {
console.log('Failed to pull comments');
comments.innerHTML = '';
return;
}
var fallback = comments.innerHTML;
comments.innerHTML =
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3>';
var url = '/api/v1/comments/' + video_data.id +
'?source=reddit&format=html' +
'&hl=' + video_data.preferences.locale;
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 20000;
xhr.open('GET', url, true);
xhr.send();
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
comments.innerHTML = ' \
<div> \
<h3> \
<a href="javascript:void(0)">[ - ]</a> \
{title} \
</h3> \
<p> \
<b> \
<a href="javascript:void(0)" data-comments="youtube"> \
{youtubeCommentsText} \
</a> \
</b> \
</p> \
<b> \
<a rel="noopener" target="_blank" href="https://reddit.com{permalink}">{redditPermalinkText}</a> \
</b> \
</div> \
<div>{contentHtml}</div> \
<hr>'.supplant({
title: xhr.response.title,
youtubeCommentsText: video_data.youtube_comments_text,
redditPermalinkText: video_data.reddit_permalink_text,
permalink: xhr.response.permalink,
contentHtml: xhr.response.contentHtml
});
comments.children[0].children[0].children[0].onclick = toggle_comments;
comments.children[0].children[1].children[0].onclick = swap_comments;
} else {
if (video_data.params.comments[1] === 'youtube') {
get_youtube_comments(timeouts + 1);
} else {
comments.innerHTML = fallback;
}
}
}
}
xhr.ontimeout = function () {
console.log('Pulling comments timed out.');
get_reddit_comments(timeouts + 1);
}
}
function get_youtube_comments(timeouts = 0) {
comments = document.getElementById('comments');
if (timeouts > 10) {
console.log('Failed to pull comments');
comments.innerHTML = '';
return;
}
var fallback = comments.innerHTML;
comments.innerHTML =
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3>';
var url = '/api/v1/comments/' + video_data.id +
'?format=html' +
'&hl=' + video_data.preferences.locale +
'&thin_mode=' + video_data.preferences.thin_mode;
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 20000;
xhr.open('GET', url, true);
xhr.send();
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
comments.innerHTML = ' \
<div> \
<h3> \
<a href="javascript:void(0)">[ - ]</a> \
{commentsText} \
</h3> \
<b> \
<a href="javascript:void(0)" data-comments="reddit"> \
{redditComments} \
</a> \
</b> \
</div> \
<div>{contentHtml}</div> \
<hr>'.supplant({
contentHtml: xhr.response.contentHtml,
redditComments: video_data.reddit_comments_text,
commentsText: video_data.comments_text.supplant(
{ commentCount: number_with_separator(xhr.response.commentCount) }
)
});
comments.children[0].children[0].children[0].onclick = toggle_comments;
comments.children[0].children[1].children[0].onclick = swap_comments;
} else {
if (video_data.params.comments[1] === 'youtube') {
get_youtube_comments(timeouts + 1);
} else {
comments.innerHTML = '';
}
}
}
}
xhr.ontimeout = function () {
console.log('Pulling comments timed out.');
comments.innerHTML =
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3>';
get_youtube_comments(timeouts + 1);
}
}
function get_youtube_replies(target, load_more) {
var continuation = target.getAttribute('data-continuation');
var body = target.parentNode.parentNode;
var fallback = body.innerHTML;
body.innerHTML =
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3>';
var url = '/api/v1/comments/' + video_data.id +
'?format=html' +
'&hl=' + video_data.preferences.locale +
'&thin_mode=' + video_data.preferences.thin_mode +
'&continuation=' + continuation;
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 20000;
xhr.open('GET', url, true);
xhr.send();
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
if (load_more) {
body = body.parentNode.parentNode;
body.removeChild(body.lastElementChild);
body.innerHTML += xhr.response.contentHtml;
} else {
body.removeChild(body.lastElementChild);
var p = document.createElement('p');
var a = document.createElement('a');
p.appendChild(a);
a.href = 'javascript:void(0)';
a.onclick = hide_youtube_replies;
a.setAttribute('data-sub-text', video_data.hide_replies_text);
a.setAttribute('data-inner-text', video_data.show_replies_text);
a.innerText = video_data.hide_replies_text;
var div = document.createElement('div');
div.innerHTML = xhr.response.contentHtml;
body.appendChild(p);
body.appendChild(div);
}
} else {
body.innerHTML = fallback;
}
}
}
xhr.ontimeout = function () {
console.log('Pulling comments timed out.');
body.innerHTML = fallback;
}
}
if (video_data.play_next) {
player.on('ended', function () {
var url = new URL('https://example.com/watch?v=' + video_data.next_video);
if (video_data.params.autoplay || video_data.params.continue_autoplay) {
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);
});
}
if (video_data.plid) {
get_playlist(video_data.plid);
}
if (video_data.params.comments[0] === 'youtube') {
get_youtube_comments();
} else if (video_data.params.comments[0] === 'reddit') {
get_reddit_comments();
} else if (video_data.params.comments[1] === 'youtube') {
get_youtube_comments();
} else if (video_data.params.comments[1] === 'reddit') {
get_reddit_comments();
} else {
comments = document.getElementById('comments');
comments.innerHTML = '';
}

View File

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

View File

@ -0,0 +1,3 @@
#!/bin/sh
psql invidious kemal -c "ALTER TABLE channel_videos ADD COLUMN views bigint;"

View File

@ -0,0 +1,3 @@
#!/bin/sh
psql invidious kemal -c "ALTER TABLE users ADD COLUMN feed_needs_update boolean"

View File

@ -13,6 +13,7 @@ CREATE TABLE public.channel_videos
length_seconds integer,
live_now boolean,
premiere_timestamp timestamp with time zone,
views bigint,
CONSTRAINT channel_videos_id_key UNIQUE (id)
);

View File

@ -12,6 +12,7 @@ CREATE TABLE public.users
password text,
token text,
watched text[],
feed_needs_update boolean,
CONSTRAINT users_email_key UNIQUE (email)
);

View File

@ -6,6 +6,7 @@
"Unsubscribe": "إلغاء الإشتراك",
"Subscribe": "إشتراك",
"View channel on YouTube": "زيارة القناة على موقع يوتيوب",
"View playlist on YouTube": "",
"newest": "الأجدد",
"oldest": "الأقدم",
"popular": "الاكثر شعبية",
@ -52,8 +53,8 @@
"Player preferences": "التفضيلات المشغل",
"Always loop: ": "كرر الفيديو دائما: ",
"Autoplay: ": "تشغيل تلقائى: ",
"Play next by default: ": "",
"Autoplay next video: ": "شغل الفيديو التالى تلقائى: ",
"Play next by default: ": "شغل الفيديو التالى تلقائيا",
"Autoplay next video: ": " شغل الفيديو التالى تلقائيا (فى قوائم التشغيل)",
"Listen by default: ": "تشغيل النسخة السمعية تلقائى: ",
"Proxy videos? ": "عرض الفيديوهات عن طريق الوكيل(proxy) ؟",
"Default speed: ": "السرعة الإفتراضية: ",
@ -65,12 +66,12 @@
"Default captions: ": "الترجمات الإفتراضية: ",
"Fallback captions: ": "الترجمات المصاحبة: ",
"Show related videos? ": "عرض مقاطع الفيديو ذات الصلة؟",
"Show annotations by default? ": "",
"Show annotations by default? ": "عرض الملاحظات فى الفيديو تلقائيا ؟",
"Visual preferences": "التفضيلات المرئية",
"Dark mode: ": "الوضع الليلى: ",
"Thin mode: ": "الوضع الخفيف: ",
"Subscription preferences": "تفضيلات الإشتراك",
"Show annotations by default for subscribed channels? ": "",
"Show annotations by default for subscribed channels? ": "عرض الملاحظات فى الفيديوهات تلقائيا فى القنوات المشترك بها فقط ؟",
"Redirect homepage to feed: ": "إعادة التوجية من الصفحة الرئيسية لصفحة المشتركين (لرؤية اخر فيديوهات المشتركين): ",
"Number of videos shown in feed: ": "عدد الفيديوهات التى ستظهر فى صفحة المشتركين: ",
"Sort videos by: ": "ترتيب الفيديو بـ: ",
@ -84,6 +85,9 @@
"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` is live": "",
"Data preferences": "إعدادات التفضيلات",
"Clear watch history": "حذف سجل المشاهدة",
"Import/export data": "إضافة\\إستخراج البيانات",
@ -120,8 +124,8 @@
"Trending": "الشائع",
"Unlisted": "غير مصنف",
"Watch on YouTube": "مشاهدة الفيديو على اليوتيوب",
"Hide annotations": "",
"Show annotations": "",
"Hide annotations": "إخفاء الملاحظات فى الفيديو",
"Show annotations": "عرض الملاحظات فى الفيديو",
"Genre: ": "النوع: ",
"License: ": "التراخيص: ",
"Family friendly? ": "محتوى عائلى? ",

View File

@ -6,18 +6,19 @@
"Unsubscribe": "Abbestellen",
"Subscribe": "Abonnieren",
"View channel on YouTube": "Kanal auf YouTube anzeigen",
"View playlist on YouTube": "Wiedergabeliste auf YouTube anzeigen",
"newest": "neueste",
"oldest": "älteste",
"popular": "beliebt",
"last": "",
"last": "letzte",
"Next page": "Nächste Seite",
"Previous page": "Vorherige Seite",
"Clear watch history?": "Verlauf löschen?",
"New password": "",
"New passwords must match": "",
"Cannot change password for Google accounts": "",
"Authorize token?": "",
"Authorize token for `x`?": "",
"New password": "Neues Passwort",
"New passwords must match": "Neue Passwörter müssen übereinstimmen",
"Cannot change password for Google accounts": "Das Passwort für Google -Konten kann nicht geändert werden",
"Authorize token?": "Token autorisieren?",
"Authorize token for `x`?": "Token für `x` autorisieren?",
"Yes": "Ja",
"No": "Nein",
"Import and Export Data": "Import und Export Daten",
@ -52,10 +53,10 @@
"Player preferences": "Playereinstellungen",
"Always loop: ": "Immer wiederholen: ",
"Autoplay: ": "Automatisch abspielen: ",
"Play next by default: ": "",
"Play next by default: ": "Standardmäßig als nächstes abspielen: ",
"Autoplay next video: ": "nächstes Video automatisch abspielen: ",
"Listen by default: ": "Nur Ton als Standard: ",
"Proxy videos? ": "",
"Proxy videos? ": "Proxy-Videos? ",
"Default speed: ": "Standardgeschwindigkeit: ",
"Preferred video quality: ": "Bevorzugte Videoqualität: ",
"Player volume: ": "Playerlautstärke: ",
@ -65,12 +66,12 @@
"Default captions: ": "Standarduntertitel: ",
"Fallback captions: ": "Ersatzuntertitel: ",
"Show related videos? ": "Ähnliche Videos anzeigen? ",
"Show annotations by default? ": "",
"Show annotations by default? ": "Standardmäßig Anmerkungen anzeigen? ",
"Visual preferences": "Anzeigeeinstellungen",
"Dark mode: ": "Nachtmodus: ",
"Thin mode: ": "Schlanker Modus: ",
"Subscription preferences": "Abonnementeinstellungen",
"Show annotations by default for subscribed channels? ": "",
"Show annotations by default for subscribed channels? ": "Anmerkungen für abonnierte Kanäle standardmäßig anzeigen? ",
"Redirect homepage to feed: ": "Startseite zu Feed umleiten: ",
"Number of videos shown in feed: ": "Anzahl von Videos die im Feed angezeigt werden: ",
"Sort videos by: ": "Videos sortieren nach: ",
@ -84,31 +85,34 @@
"Only show latest unwatched video from channel: ": "Nur neueste ungesehene Videos des Kanals anzeigen: ",
"Only show unwatched: ": "Nur ungesehene anzeigen: ",
"Only show notifications (if there are any): ": "Nur Benachrichtigungen anzeigen (wenn es welche gibt): ",
"Enable web notifications": "",
"`x` uploaded a video": "",
"`x` is live": "",
"Data preferences": "Dateneinstellungen",
"Clear watch history": "Verlauf löschen",
"Import/export data": "Daten im- exportieren",
"Change password": "",
"Change password": "Passwort ändern",
"Manage subscriptions": "Abonnements verwalten",
"Manage tokens": "",
"Manage tokens": "Token verwalten",
"Watch history": "Verlauf",
"Delete account": "Account löschen",
"Administrator preferences": "",
"Default homepage: ": "",
"Feed menu: ": "",
"Top enabled? ": "",
"CAPTCHA enabled? ": "",
"Login enabled? ": "",
"Registration enabled? ": "",
"Report statistics? ": "",
"Administrator preferences": "Administratoreinstellungen",
"Default homepage: ": "Standard-Homepage: ",
"Feed menu: ": "Feed-Menü: ",
"Top enabled? ": "Top aktiviert? ",
"CAPTCHA enabled? ": "CAPTCHA aktiviert? ",
"Login enabled? ": "Login aktiviert? ",
"Registration enabled? ": "Registrierung aktiviert? ",
"Report statistics? ": "Statistiken berichten? ",
"Save preferences": "Einstellungen speichern",
"Subscription manager": "Abonnementverwaltung",
"Token manager": "",
"Token": "",
"Token manager": "Token-Manager",
"Token": "Token",
"`x` subscriptions": "`x` Abonnements",
"`x` tokens": "",
"`x` tokens": "`x` Tokens",
"Import/export": "Importieren/Exportieren",
"unsubscribe": "abbestellen",
"revoke": "",
"revoke": "widerrufen",
"Subscriptions": "Abonnements",
"`x` unseen notifications": "`x` ungesehene Benachrichtigungen",
"search": "Suchen",
@ -116,12 +120,12 @@
"Released under the AGPLv3 by Omar Roth.": "Veröffentlicht unter AGPLv3 von Omar Roth.",
"Source available here.": "Quellcode verfügbar hier.",
"View JavaScript license information.": "Javascript Lizenzinformationen anzeigen.",
"View privacy policy.": "",
"View privacy policy.": "Datenschutzerklärung einsehen.",
"Trending": "Trending",
"Unlisted": "",
"Unlisted": "Nicht aufgeführt",
"Watch on YouTube": "Video auf YouTube ansehen",
"Hide annotations": "",
"Show annotations": "",
"Hide annotations": "Anmerkungen ausblenden",
"Show annotations": "Anmerkungen anzeigen",
"Genre: ": "Genre: ",
"License: ": "Lizenz: ",
"Family friendly? ": "Familienfreundlich? ",
@ -130,8 +134,8 @@
"Whitelisted regions: ": "Erlaubte Regionen: ",
"Blacklisted regions: ": "Unerlaubte Regionen: ",
"Shared `x`": "Geteilt `x`",
"`x` views": "",
"Premieres in `x`": "",
"`x` views": "`x` Ansichten",
"Premieres in `x`": "Premieren in `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.",
"View YouTube comments": "YouTube Kommentare anzeigen",
"View more comments on Reddit": "Mehr Kommentare auf Reddit anzeigen",
@ -294,21 +298,21 @@
"About": "Über",
"Rating: ": "Bewertung: ",
"Language: ": "Sprache: ",
"View as playlist": "",
"Default": "",
"Music": "",
"Gaming": "",
"News": "",
"Movies": "",
"Download": "",
"Download as: ": "",
"%A %B %-d, %Y": "",
"(edited)": "",
"YouTube comment permalink": "",
"`x` marked it with a ❤": "",
"Audio mode": "",
"Video mode": "",
"Videos": "",
"Playlists": "",
"Current version: ": ""
}
"View as playlist": "Als Wiedergabeliste anzeigen",
"Default": "Standard",
"Music": "Musik",
"Gaming": "Videospiele",
"News": "Neuigkeiten",
"Movies": "Filme",
"Download": "Herunterladen",
"Download as: ": "Herunterladen als: ",
"%A %B %-d, %Y": "%A %B %-d, %Y",
"(edited)": "(editiert)",
"YouTube comment permalink": "YouTube-Kommentar Permalink",
"`x` marked it with a ❤": "`x` markierte es mit einem ❤",
"Audio mode": "Audiomodus",
"Video mode": "Videomodus",
"Videos": "Videos",
"Playlists": "Wiedergabelisten",
"Current version: ": "Aktuelle Version: "
}

363
locales/el.json Normal file
View File

@ -0,0 +1,363 @@
{
"`x` subscribers": {
"(\\D|^)1(\\D|$)": "`x` συνδρομητής",
"": "`x` συνδρομητές"
},
"`x` videos": {
"(\\D|^)1(\\D|$)": "`x` βίντεο",
"": "`x` βίντεο"
},
"LIVE": "ΖΩΝΤΑΝΑ",
"Shared `x` ago": "Μοιράστηκε πριν `x`",
"Unsubscribe": "Απεγγραφή",
"Subscribe": "Εγγραφή",
"View channel on YouTube": "Προβολή καναλιού στο YouTube",
"View playlist on YouTube": "",
"newest": "νεότερα",
"oldest": "παλιότερα",
"popular": "δημοφιλή",
"last": "τελευταία",
"Next page": "Επόμενη σελίδα",
"Previous page": "Προηγούμενη σελίδα",
"Clear watch history?": "Διαγραφή ιστορικού προβολής;",
"New password": "Νέος κωδικός πρόσβασης",
"New passwords must match": "Οι νέοι κωδικοί πρόσβασης πρέπει να ταιριάζουν",
"Cannot change password for Google accounts": "Δεν επιτρέπεται η αλλαγή κωδικού πρόσβασης λογαριασμών 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": "Ταυτότητα χρήστη",
"Password": "Κωδικός πρόσβασης",
"Time (h:mm:ss):": "Ώρα (ω:λλ:δδ):",
"Text CAPTCHA": "Κείμενο CAPTCHA",
"Image CAPTCHA": "Εικόνα CAPTCHA",
"Sign In": "Σύνδεση",
"Register": "Εγγραφή",
"E-mail": "E-mail",
"Google verification code": "Κωδικός επαλήθευσης Google",
"Preferences": "Προτιμήσεις",
"Player preferences": "Προτιμήσεις αναπαραγωγής",
"Always loop: ": "Αυτόματη επανάληψη: ",
"Autoplay: ": "Αυτόματη αναπαραγωγή: ",
"Play next by default: ": "Αναπαραγωγή επόμενου: ",
"Autoplay next video: ": "Αυτόματη αναπαραγωγή επόμενου: ",
"Listen by default: ": "Φόρτωση μόνο ήχου: ",
"Proxy videos? ": "Αναπαραγωγή με διακομιστή μεσολάβησης (proxy): ",
"Default speed: ": "Προεπιλεγμένη ταχύτητα: ",
"Preferred video quality: ": "Προτιμώμενη ανάλυση: ",
"Player volume: ": "Ένταση αναπαραγωγής: ",
"Default comments: ": "Προεπιλεγμένα σχόλια: ",
"youtube": "youtube",
"reddit": "reddit",
"Default captions: ": "Προεπιλεγμένοι υπότιτλοι: ",
"Fallback captions: ": "Εναλλακτικοί υπότιτλοι: ",
"Show related videos? ": "Προβολή σχετικών βίντεο; ",
"Show annotations by default? ": "Αυτόματη προβολή σημειώσεων; :",
"Visual preferences": "Προτιμήσεις εμφάνισης",
"Dark mode: ": "Σκοτεινή λειτουργία: ",
"Thin mode: ": "Ελαφριά λειτουργία: ",
"Subscription preferences": "Προτιμήσεις συνδρομών",
"Show annotations by default for subscribed channels? ": "Προβολή σημειώσεων μόνο για κανάλια στα οποία είστε συνδρομητής; ",
"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` is live": "",
"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? ": "Ενεργοποίηση κορυφαίων; ",
"CAPTCHA enabled? ": "Ενεργοποίηση CAPTCHA; ",
"Login enabled? ": "Ενεργοποίηση σύνδεσης; ",
"Registration enabled? ": "Ενεργοποίηση εγγραφής; ",
"Report statistics? ": "Αναφορά στατιστικών; ",
"Save preferences": "Αποθήκευση προτιμήσεων",
"Subscription manager": "Διαχειριστής συνδρομών",
"Token manager": "Διαχειριστής διασυνδέσεων",
"Token": "Διασύνδεση",
"`x` subscriptions": {
"(\\D|^)1(\\D|$)": "`x` συνδρομή",
"": "`x` συνδρομές"
},
"`x` tokens": {
"(\\D|^)1(\\D|$)": "`x` διασύνδεση",
"": "`x` διασυνδέσεις"
},
"Import/export": "Εισαγωγή/εξαγωγή",
"unsubscribe": "κατάργηση συνδρομής",
"revoke": "ανάκληση",
"Subscriptions": "Συνδρομές",
"`x` unseen notifications": {
"(\\D|^)1(\\D|$)": "`x` καινούρια ειδοποίηση",
"": "`x` καινούριες ειδοποιήσεις"
},
"search": "αναζήτηση",
"Log out": "Αποσύνδεση",
"Released under the AGPLv3 by Omar Roth.": "Κυκλοφορεί υπό την άδεια AGPLv3 από τον Omar Roth.",
"Source available here.": "Προβολή πηγαίου κώδικα εδώ.",
"View JavaScript license information.": "Προβολή πληροφοριών άδειας JavaScript.",
"View privacy policy.": "Προβολή πολιτικής απορρήτου.",
"Trending": "Τάσεις",
"Unlisted": "Κρυφό",
"Watch on YouTube": "Προβολή στο YouTube",
"Hide annotations": "Απόκρυψη σημειώσεων",
"Show annotations": "Προβολή σημειώσεων",
"Genre: ": "Είδος: ",
"License: ": "Άδεια: ",
"Family friendly? ": "Φιλικό προς την οικογένεια; ",
"Wilson score: ": "Wilson score: ",
"Engagement: ": "Ενδιαφέρον: ",
"Whitelisted regions: ": "Επιτρεπτές περιοχές: ",
"Blacklisted regions: ": "Μη-επιτρεπτές περιοχές: ",
"Shared `x`": "Μοιράστηκε το `x`",
"`x` views": {
"(\\D|^)1(\\D|$)": "`x` προβολή",
"": "`x` προβολές"
},
"Premieres in `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.": "Αδυναμία σύνδεσης, βεβαιωθείτε πως ο έλεγχος ταυτότητας δύο παραγόντων (με Authenticator ή SMS) είναι ενεργοποιημένος.",
"Invalid TFA code": "Μη έγκυρος κωδικός ελέγχου ταυτότητας δύο παραγόντων",
"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": "Η ταυτότητα χρήστη είναι απαιτούμενο πεδίο",
"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`": "Ροή RSS του Invidious για το χρήστη `x`",
"channel:`x`": "κανάλι:`x`",
"Deleted or invalid channel": "Διαγραμμένο ή μη έγκυρο κανάλι",
"This channel does not exist.": "Αυτό το κανάλι δεν υπάρχει.",
"Could not get channel info.": "Αδύναμια εύρεσης πληροφοριών καναλιού.",
"Could not fetch comments": "Αδυναμία λήψης σχολίων",
"View `x` replies": {
"(\\D|^)1(\\D|$)": "Προβολή `x` απάντησης",
"": "Προβολή `x` απαντήσεων"
},
"`x` ago": "Πριν `x`",
"Load more": "Φόρτωση περισσότερων",
"`x` points": {
"(\\D|^)1(\\D|$)": "`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": "Το Κρυφό πεδίο \"δοκιμασία\" είναι απαραίτητο",
"Hidden field \"token\" is a required field": "Το κρυφό πεδίο \"αναγνωριστικό διασύνδεσης\" είναι απαραίτητο",
"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": "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": "Xhosa",
"Yiddish": "Γίντις",
"Yoruba": "Γιορούμπα",
"Zulu": "Ζουλού",
"`x` years": {
"(\\D|^)1(\\D|$)": "`x` χρόνο",
"": "`x` χρόνια"
},
"`x` months": {
"(\\D|^)1(\\D|$)": "`x` μήνα",
"": "`x` μήνες"
},
"`x` weeks": {
"(\\D|^)1(\\D|$)": "`x` εβδομάδα",
"": "`x` εβδομάδες"
},
"`x` days": {
"(\\D|^)1(\\D|$)": "`x` ημέρα",
"": "`x` ημέρες"
},
"`x` hours": {
"(\\D|^)1(\\D|$)": "`x` ώρα",
"": "`x` ώρες"
},
"`x` minutes": {
"(\\D|^)1(\\D|$)": "`x` λεπτό",
"": "`x` λεπτά"
},
"`x` seconds": {
"(\\D|^)1(\\D|$)": "`x` δευτερόλεπτο",
"": "`x` δευτερόλεπτα"
},
"Fallback comments: ": "Εναλλακτικά σχόλια: ",
"Popular": "Δημοφιλή",
"Top": "Κορυφαία",
"About": "Σχετικά",
"Rating: ": "Aξιολόγηση: ",
"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 σχολίου",
"`x` marked it with a ❤": "Ο χρηστης `x` έβαλε ❤",
"Audio mode": "Λειτουργία ήχου",
"Video mode": "Λειτουργία βίντεο",
"Videos": "Βίντεο",
"Playlists": "Λίστες Αναπαραγωγής",
"Current version: ": "Τρέχουσα έκδοση: "
}

View File

@ -12,6 +12,7 @@
"Unsubscribe": "Unsubscribe",
"Subscribe": "Subscribe",
"View channel on YouTube": "View channel on YouTube",
"View playlist on YouTube": "View playlist on YouTube",
"newest": "newest",
"oldest": "oldest",
"popular": "popular",
@ -90,6 +91,9 @@
"Only show latest unwatched video from channel: ": "Only show latest unwatched video from channel: ",
"Only show unwatched: ": "Only show unwatched: ",
"Only show notifications (if there are any): ": "Only show notifications (if there are any): ",
"Enable web notifications": "Enable web notifications",
"`x` uploaded a video": "`x` uploaded a video",
"`x` is live": "`x` is live",
"Data preferences": "Data preferences",
"Clear watch history": "Clear watch history",
"Import/export data": "Import/export data",

View File

@ -6,6 +6,7 @@
"Unsubscribe": "Malaboni",
"Subscribe": "Aboni",
"View channel on YouTube": "Vidi kanalon en YouTube",
"View playlist on YouTube": "Vidi ludliston en YouTube",
"newest": "pli novaj",
"oldest": "pli malnovaj",
"popular": "popularaj",
@ -84,6 +85,9 @@
"Only show latest unwatched video from channel: ": "Nur montri pli novan malviditan videon el kanalo: ",
"Only show unwatched: ": "Nur montri malviditajn: ",
"Only show notifications (if there are any): ": "Nur montri sciigojn (se estas): ",
"Enable web notifications": "Ebligi retejajn sciigojn",
"`x` uploaded a video": "`x` alŝutis videon",
"`x` is live": "`x` estas nuna",
"Data preferences": "Datumagordoj",
"Clear watch history": "Forigi vidohistorion",
"Import/export data": "Importi/Eksporti datumojn",

View File

@ -6,6 +6,7 @@
"Unsubscribe": "Desuscribirse",
"Subscribe": "Suscribirse",
"View channel on YouTube": "Ver el canal en YouTube",
"View playlist on YouTube": "",
"newest": "más nuevos",
"oldest": "más viejos",
"popular": "populares",
@ -13,11 +14,11 @@
"Next page": "Página siguiente",
"Previous page": "Página anterior",
"Clear watch history?": "¿Quiere borrar el historial de reproducción?",
"New password": "",
"New passwords must match": "",
"Cannot change password for Google accounts": "",
"Authorize token?": "",
"Authorize token for `x`?": "",
"New password": "Nueva contraseña",
"New passwords must match": "Las nuevas contraseñas deben coincidir",
"Cannot change password for Google accounts": "No se puede cambiar la contraseña de la cuenta de Google",
"Authorize token?": "¿Autorizar el token?",
"Authorize token for `x`?": "¿Autorizar el token para `x`?",
"Yes": "Sí",
"No": "No",
"Import and Export Data": "Importación y exportación de datos",
@ -52,7 +53,7 @@
"Player preferences": "Preferencias del reproductor",
"Always loop: ": "Repetir siempre: ",
"Autoplay: ": "Reproducción automática: ",
"Play next by default: ": "",
"Play next by default: ": "Reproducir siguiente por defecto: ",
"Autoplay next video: ": "Reproducir automáticamente el vídeo siguiente: ",
"Listen by default: ": "Activar el sonido por defecto: ",
"Proxy videos? ": "¿Usar un proxy para los vídeos? ",
@ -60,17 +61,17 @@
"Preferred video quality: ": "Calidad de vídeo preferida: ",
"Player volume: ": "Volumen del reproductor: ",
"Default comments: ": "Comentarios por defecto: ",
"youtube": "",
"reddit": "",
"youtube": "YouTube",
"reddit": "Reddit",
"Default captions: ": "Subtítulos por defecto: ",
"Fallback captions: ": "Subtítulos alternativos: ",
"Show related videos? ": "¿Mostrar vídeos relacionados? ",
"Show annotations by default? ": "",
"Show annotations by default? ": "¿Mostrar anotaciones por defecto? ",
"Visual preferences": "Preferencias visuales",
"Dark mode: ": "Modo oscuro: ",
"Thin mode: ": "Modo compacto: ",
"Subscription preferences": "Preferencias de la suscripción",
"Show annotations by default for subscribed channels? ": "",
"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: ",
"Number of videos shown in feed: ": "Número de vídeos mostrados en la fuente: ",
"Sort videos by: ": "Ordenar los vídeos por: ",
@ -84,12 +85,15 @@
"Only show latest unwatched video from channel: ": "Mostrar solo el último vídeo sin ver del canal: ",
"Only show unwatched: ": "Mostrar solo los no vistos: ",
"Only show notifications (if there are any): ": "Mostrar solo notificaciones (si hay alguna): ",
"Enable web notifications": "",
"`x` uploaded a video": "",
"`x` is live": "",
"Data preferences": "Preferencias de los datos",
"Clear watch history": "Borrar el historial de reproducción",
"Import/export data": "Importar/Exportar datos",
"Change password": "",
"Change password": "Cambiar contraseña",
"Manage subscriptions": "Gestionar las suscripciones",
"Manage tokens": "",
"Manage tokens": "Gestionar tokens",
"Watch history": "Historial de reproducción",
"Delete account": "Borrar cuenta",
"Administrator preferences": "Preferencias de administrador",
@ -102,13 +106,13 @@
"Report statistics? ": "¿Enviar estadísticas? ",
"Save preferences": "Guardar las preferencias",
"Subscription manager": "Gestor de suscripciones",
"Token manager": "",
"Token": "",
"Token manager": "Gestor de tokens",
"Token": "Token",
"`x` subscriptions": "`x` suscripciones",
"`x` tokens": "",
"`x` tokens": "`x` tokens",
"Import/export": "Importar/Exportar",
"unsubscribe": "Desuscribirse",
"revoke": "",
"revoke": "revocar",
"Subscriptions": "Suscripciones",
"`x` unseen notifications": "`x` notificaciones sin ver",
"search": "buscar",
@ -120,8 +124,8 @@
"Trending": "Tendencias",
"Unlisted": "No listado",
"Watch on YouTube": "Ver el vídeo en Youtube",
"Hide annotations": "",
"Show annotations": "",
"Hide annotations": "Ocultar anotaciones",
"Show annotations": "Mostrar anotaciones",
"Genre: ": "Género: ",
"License: ": "Licencia: ",
"Family friendly? ": "¿Filtrar contenidos? ",

View File

@ -6,6 +6,7 @@
"Unsubscribe": "Harpidetza kendu",
"Subscribe": "Harpidetu",
"View channel on YouTube": "Ikusi kanala YouTuben",
"View playlist on YouTube": "",
"newest": "berrienak",
"oldest": "zaharrenak",
"popular": "ospetsuenak",
@ -84,6 +85,9 @@
"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` is live": "",
"Data preferences": "",
"Clear watch history": "",
"Import/export data": "",
@ -309,4 +313,4 @@
"Audio mode": "",
"Video mode": "",
"Videos": ""
}
}

View File

@ -6,6 +6,7 @@
"Unsubscribe": "Se désabonner",
"Subscribe": "S'abonner",
"View channel on YouTube": "Voir la chaîne sur YouTube",
"View playlist on YouTube": "",
"newest": "Date d'ajout (la plus récente)",
"oldest": "Date d'ajout (la plus ancienne)",
"popular": "Les plus populaires",
@ -13,11 +14,11 @@
"Next page": "Page suivante",
"Previous page": "Page précédente",
"Clear watch history?": "Êtes-vous sûr de vouloir supprimer l'historique des vidéos regardées ?",
"New password": "",
"New passwords must match": "",
"Cannot change password for Google accounts": "",
"Authorize token?": "",
"Authorize token for `x`?": "",
"New password": "Nouveau mot de passe",
"New passwords must match": "Les nouveaux mots de passe doivent être identiques",
"Cannot change password for Google accounts": "Le mot de passe d'un compte Google ne peut pas être changé",
"Authorize token?": "Autoriser le token ?",
"Authorize token for `x`?": "Autoriser le token pour `x` ?",
"Yes": "Oui",
"No": "Non",
"Import and Export Data": "Importer et exporter des données",
@ -52,7 +53,7 @@
"Player preferences": "Préférences du lecteur",
"Always loop: ": "Lire en boucle : ",
"Autoplay: ": "Lire automatiquement : ",
"Play next by default: ": "",
"Play next by default: ": "Jouer suirvante par défaut : ",
"Autoplay next video: ": "Lire automatiquement la vidéo suivante : ",
"Listen by default: ": "Audio uniquement : ",
"Proxy videos? ": "Charger les vidéos à travers un proxy ? ",
@ -60,22 +61,22 @@
"Preferred video quality: ": "Qualité vidéo souhaitée : ",
"Player volume: ": "Volume du lecteur : ",
"Default comments: ": "Source des commentaires : ",
"youtube": "",
"reddit": "",
"youtube": "YouTube",
"reddit": "Reddit",
"Default captions: ": "Sous-titres par défaut : ",
"Fallback captions: ": "Fallback captions: ",
"Fallback captions: ": "Sous-titres de repli : ",
"Show related videos? ": "Voir les vidéos liées ? ",
"Show annotations by default? ": "",
"Show annotations by default? ": "Voir les annotations par défaut ? ",
"Visual preferences": "Préférences du site",
"Dark mode: ": "Mode Sombre : ",
"Thin mode: ": "Mode Simplifié : ",
"Subscription preferences": "Préférences de la page d'abonnements",
"Show annotations by default for subscribed channels? ": "",
"Show annotations by default for subscribed channels? ": "Voir les annotations par défaut sur les chaînes suivies ? ",
"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 : ",
"Sort videos by: ": "Trier les vidéos par : ",
"published": "publication",
"published - reverse": "publication - inversé",
"published": "date de publication",
"published - reverse": "date de publication - inversé",
"alphabetically": "alphabétiquement",
"alphabetically - reverse": "alphabétiquement - inversé",
"channel name": "nom de la chaîne",
@ -84,12 +85,15 @@
"Only show latest unwatched video from channel: ": "Afficher uniquement la dernière vidéo de la chaîne non regardée : ",
"Only show unwatched: ": "Afficher uniquement les vidéos non regardées : ",
"Only show notifications (if there are any): ": "Afficher uniquement les notifications (s'il y en a) : ",
"Enable web notifications": "",
"`x` uploaded a video": "",
"`x` is live": "",
"Data preferences": "Préférences liées aux données",
"Clear watch history": "Supprimer l'historique des vidéos regardées",
"Import/export data": "Importer/exporter les données",
"Change password": "",
"Change password": "Modifier le mot de passe",
"Manage subscriptions": "Gérer les abonnements",
"Manage tokens": "",
"Manage tokens": "Gérer les tokens",
"Watch history": "Historique de visionnage",
"Delete account": "Supprimer votre compte",
"Administrator preferences": "Préferences d'Administrateur",
@ -102,13 +106,13 @@
"Report statistics? ": "Télémétrie activé ? ",
"Save preferences": "Enregistrer les préférences",
"Subscription manager": "Gestionnaire d'abonnement",
"Token manager": "",
"Token": "",
"Token manager": "Gestionnaire de tokens",
"Token": "Token",
"`x` subscriptions": "`x` abonnements",
"`x` tokens": "",
"`x` tokens": "`x` tokens",
"Import/export": "Importer/Exporter",
"unsubscribe": "se désabonner",
"revoke": "",
"revoke": "annuler",
"Subscriptions": "Abonnements",
"`x` unseen notifications": "`x` notifications non vues",
"search": "Rechercher",
@ -116,12 +120,12 @@
"Released under the AGPLv3 by Omar Roth.": "Publié sous licence AGPLv3 par Omar Roth.",
"Source available here.": "Code Source.",
"View JavaScript license information.": "Voir les informations des licences JavaScript.",
"View privacy policy.": "Politique de confidentialité",
"View privacy policy.": "Voir la politique de confidentialité.",
"Trending": "Tendances",
"Unlisted": "Non répertoriée",
"Watch on YouTube": "Voir la vidéo sur Youtube",
"Hide annotations": "",
"Show annotations": "",
"Hide annotations": "Masquer les annotations",
"Show annotations": "Afficher les annotations",
"Genre: ": "Genre : ",
"License: ": "Licence : ",
"Family friendly? ": "Tout Public ? ",
@ -130,7 +134,7 @@
"Whitelisted regions: ": "Régions en liste blanche : ",
"Blacklisted regions: ": "Régions sur liste noire : ",
"Shared `x`": "Ajoutée le `x`",
"`x` views": "",
"`x` views": "`x` vues",
"Premieres in `x`": "Première dans `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.",
"View YouTube comments": "Voir les commentaires YouTube",
@ -291,10 +295,10 @@
"Fallback comments: ": "Fallback comments: ",
"Popular": "Populaire",
"Top": "Top",
"About": "A Propos",
"About": "À propos",
"Rating: ": "Évaluation : ",
"Language: ": "Langue : ",
"View as playlist": "",
"View as playlist": "Voir en tant que liste de lecture",
"Default": "Défaut",
"Music": "Musique",
"Gaming": "Jeux Vidéo",
@ -310,5 +314,5 @@
"Video mode": "Mode Vidéo",
"Videos": "Vidéos",
"Playlists": "Liste de lecture",
"Current version: ": "Version :"
"Current version: ": "Version actuelle : "
}

View File

@ -6,17 +6,18 @@
"Unsubscribe": "Disiscriviti",
"Subscribe": "Iscriviti",
"View channel on YouTube": "Vedi canale su YouTube",
"View playlist on YouTube": "",
"newest": "Data di aggiunta (più recente)",
"oldest": "Data di aggiunta (più vecchia)",
"popular": "Tendenze",
"last": "",
"last": "durare",
"Next page": "Pagina successiva",
"Previous page": "Pagina precedente",
"Clear watch history?": "Sei sicuro di voler cancellare la cronologia dei video guardati?",
"New password": "",
"New passwords must match": "",
"Cannot change password for Google accounts": "",
"Authorize token?": "",
"New password": "Nuova password",
"New passwords must match": "Le nuove password devono corrispondere",
"Cannot change password for Google accounts": "Non è possibile modificare la password per gli account Google",
"Authorize token?": "Autorizzare gettone?",
"Authorize token for `x`?": "",
"Yes": "Si",
"No": "No",
@ -52,7 +53,7 @@
"Player preferences": "Preferenze del riproduttore",
"Always loop: ": "Ripeti sempre: ",
"Autoplay: ": "Riproduzione automatica: ",
"Play next by default: ": "",
"Play next by default: ": "Riproduzione successiva per impostazione predefinita: ",
"Autoplay next video: ": "Riproduci automaticamente il prossimo video: ",
"Listen by default: ": "Modalità solo audio come predefinita: ",
"Proxy videos? ": "",
@ -65,7 +66,7 @@
"Default captions: ": "Sottotitoli predefiniti: ",
"Fallback captions: ": "Sottotitoli alternativi: ",
"Show related videos? ": "Mostra video correlati? ",
"Show annotations by default? ": "",
"Show annotations by default? ": "Mostra le annotazioni per impostazione predefinita? ",
"Visual preferences": "Preferenze grafiche",
"Dark mode: ": "Tema scuro: ",
"Thin mode: ": "Modalità per connessioni lente: ",
@ -84,6 +85,9 @@
"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 notifications (if there are any): ": "Mostra solo le notifiche (se presenti): ",
"Enable web notifications": "",
"`x` uploaded a video": "",
"`x` is live": "",
"Data preferences": "Preferenze dati",
"Clear watch history": "Cancella la cronologia dei video guardati",
"Import/export data": "Importazione/esportazione dati",

View File

@ -6,6 +6,7 @@
"Unsubscribe": "Opphev abonnement",
"Subscribe": "Abonner",
"View channel on YouTube": "Vis kanal på YouTube",
"View playlist on YouTube": "Vis spilleliste på YouTube",
"newest": "nyeste",
"oldest": "eldste",
"popular": "populært",
@ -84,6 +85,9 @@
"Only show latest unwatched video from channel: ": "Kun vis siste usette video fra kanal: ",
"Only show unwatched: ": "Kun vis usette: ",
"Only show notifications (if there are any): ": "Kun vis merknader (hvis det er noen): ",
"Enable web notifications": "Skru på nettmerknader",
"`x` uploaded a video": "`x` lastet opp en video",
"`x` is live": "`x` er pålogget",
"Data preferences": "Datainnstillinger",
"Clear watch history": "Tøm visningshistorikk",
"Import/export data": "Importer/eksporter data",

View File

@ -1,286 +1,290 @@
{
"`x` subscribers": "`x` abonnees",
"`x` videos": "`x` videos",
"`x` videos": "`x` video's",
"LIVE": "LIVE",
"Shared `x` ago": "Gedeeld `x` geleden",
"Unsubscribe": "Abonnement opzeggen",
"Shared `x` ago": "Gedeeld: `x` geleden",
"Unsubscribe": "Deabonneren",
"Subscribe": "Abonneren",
"View channel on YouTube": "Bekijk kanaal op Youtube",
"View channel on YouTube": "Bekijk kanaal op YouTube",
"View playlist on YouTube": "Bekijk afspeellijst op YouTube",
"newest": "nieuwste",
"oldest": "oudste",
"popular": "populair",
"last": "",
"last": "laatste",
"Next page": "Volgende pagina",
"Previous page": "Vorige pagina",
"Clear watch history?": "Kijk geschiedenis wissen?",
"New password": "",
"New passwords must match": "",
"Cannot change password for Google accounts": "",
"Authorize token?": "",
"Authorize token for `x`?": "",
"Clear watch history?": "Wil je de kijkgeschiedenis wissen?",
"New password": "Nieuw wachtwoord",
"New passwords must match": "De nieuwe wachtwoorden moeten overeenkomen",
"Cannot change password for Google accounts": "Kan het wachtwoord van Google-accounts niet wijzigen",
"Authorize token?": "Wil je de toegangssleutel machtigen?",
"Authorize token for `x`?": "Wil je de toegangssleutel machtigen voor `x`?",
"Yes": "Ja",
"No": "Nee",
"Import and Export Data": "Importeer en Exporteer Gegevens",
"Import and Export Data": "Gegevens im- en exporteren",
"Import": "Importeren",
"Import Invidious data": "Importeer Invidious gegevens",
"Import YouTube subscriptions": "Importeer Youtube abonnees",
"Import FreeTube subscriptions (.db)": "Importeer FreeTube abonnees (.db)",
"Import NewPipe subscriptions (.json)": "Importeer NewPipe abonnees (.json)",
"Import NewPipe data (.zip)": "Importeer NewPipe gegevens (.zip)",
"Import Invidious data": "Invidious-gegevens importeren",
"Import YouTube subscriptions": "YouTube-abonnementen importeren",
"Import FreeTube subscriptions (.db)": "FreeTube-abonnementen importeren (.db)",
"Import NewPipe subscriptions (.json)": "NewPipe-abonnementen importeren (.json)",
"Import NewPipe data (.zip)": "NewPipe-gegevens importeren (.zip)",
"Export": "Exporteren",
"Export subscriptions as OPML": "Exporteer abonnees als OPML",
"Export subscriptions as OPML (for NewPipe & FreeTube)": "Exporteer abonnees als OPML (voor NewPipe & FreeTube)",
"Export data as JSON": "Exporteer gegevens als JSON",
"Delete account?": "Verwijder account?",
"Export subscriptions as OPML": "Abonnementen exporteren als OPML",
"Export subscriptions as OPML (for NewPipe & FreeTube)": "Abonnementen exporteren als OPML (voor NewPipe en FreeTube)",
"Export data as JSON": "Gegevens exporteren als JSON",
"Delete account?": "Wil je je account verwijderen?",
"History": "Geschiedenis",
"An alternative front-end to YouTube": "Een alternatieve front-end voor YouTube",
"JavaScript license information": "JavaScript licentie informatie",
"An alternative front-end to YouTube": "Een alternatief front-end voor YouTube",
"JavaScript license information": "JavaScript-licentieinformatie",
"source": "bron",
"Log in": "Inloggen",
"Log in/register": "Inloggen/Registreren",
"Log in with Google": "Inloggen op Google",
"User ID": "Gebruiker ID",
"Log in with Google": "Inloggen met Google",
"User ID": "Gebruikers-id",
"Password": "Wachtwoord",
"Time (h:mm:ss):": "Tijd (h:mm:ss):",
"Text CAPTCHA": "Tekst CAPTCHA",
"Image CAPTCHA": "Afbeelding CAPTCHA",
"Sign In": "Aanmelden",
"Text CAPTCHA": "Tekst-CAPTCHA",
"Image CAPTCHA": "Afbeelding-CAPTCHA",
"Sign In": "Inloggen",
"Register": "Registreren",
"E-mail": "Email",
"Google verification code": "Google verificatie code",
"Preferences": "Voorkeuren",
"Player preferences": "Afspeler voorkeuren",
"E-mail": "E-mailadres",
"Google verification code": "Google-verificatiecode",
"Preferences": "Instellingen",
"Player preferences": "Spelerinstellingen",
"Always loop: ": "Altijd herhalen: ",
"Autoplay: ": "Automatisch afspelen: ",
"Play next by default: ": "",
"Autoplay next video: ": "Automatisch volgende video afspelen: ",
"Play next by default: ": "Standaard volgende video afspelen: ",
"Autoplay next video: ": "Volgende video automatisch afspelen: ",
"Listen by default: ": "Standaard luisteren: ",
"Proxy videos? ": "",
"Default speed: ": "Standaard snelheid: ",
"Preferred video quality: ": "Video kwaliteit voorkeur: ",
"Player volume: ": "Afspeler volume: ",
"Default comments: ": "Standaard reacties: ",
"youtube": "",
"reddit": "",
"Default captions: ": "Standaard ondertitels: ",
"Fallback captions: ": "Alternatieve ondertitels: ",
"Show related videos? ": "Laat gerelateerde videos zien? ",
"Show annotations by default? ": "",
"Visual preferences": "Visuele voorkeuren",
"Proxy videos? ": "Video's afspelen via proxy? ",
"Default speed: ": "Standaard afspeelsnelheid: ",
"Preferred video quality: ": "Voorkeurskwaliteit: ",
"Player volume: ": "Spelervolume: ",
"Default comments: ": "Reacties tonen van: ",
"youtube": "YouTube",
"reddit": "Reddit",
"Default captions: ": "Standaard ondertiteling: ",
"Fallback captions: ": "Alternatieve ondertiteling: ",
"Show related videos? ": "Gerelateerde video's tonen? ",
"Show annotations by default? ": "Standaard annotaties tonen? ",
"Visual preferences": "Visuele instellingen",
"Dark mode: ": "Donkere modus: ",
"Thin mode: ": "Smalle modus: ",
"Subscription preferences": "Abonnement voorkeuren",
"Show annotations by default for subscribed channels? ": "",
"Subscription preferences": "Abonnementsinstellingen",
"Show annotations by default for subscribed channels? ": "Standaard annotaties tonen voor geabonneerde kanalen? ",
"Redirect homepage to feed: ": "Startpagina omleiden naar feed: ",
"Number of videos shown in feed: ": "Aantal videos te zien in feed: ",
"Sort videos by: ": "Sorteer videos op: ",
"published": "gepubliceerd",
"published - reverse": "gepubliceerd - omgekeerd",
"Number of videos shown in feed: ": "Aantal te tonen video's in feed: ",
"Sort videos by: ": "Video's sorteren op: ",
"published": "publicatiedatum",
"published - reverse": "publicatiedatum - omgekeerd",
"alphabetically": "alfabetische volgorde",
"alphabetically - reverse": "alfabetisch - omgekeerd",
"channel name": "kanaal naam",
"channel name - reverse": "kanaal naam - omgekeerd",
"Only show latest video from channel: ": "Laat alleen laatste video van kanaal zien: ",
"Only show latest unwatched video from channel: ": "Laat alleen de laatste onbekeken video zien van kanaal: ",
"Only show unwatched: ": "Laat alleen onbekeken videos zien: ",
"Only show notifications (if there are any): ": "Laat alleen notificaties zien (als die er zijn): ",
"Data preferences": "Gegevens voorkeuren",
"alphabetically - reverse": "alfabetische volgorde - omgekeerd",
"channel name": "kanaalnaam",
"channel name - reverse": "kanaalnaam - omgekeerd",
"Only show latest video from channel: ": "Alleen nieuwste video van kanaal tonen: ",
"Only show latest unwatched video from channel: ": "Alleen nieuwste niet-bekeken video van kanaal tonen: ",
"Only show unwatched: ": "Alleen niet-bekeken videos tonen: ",
"Only show notifications (if there are any): ": "Alleen meldingen tonen (als die er zijn): ",
"Enable web notifications": "",
"`x` uploaded a video": "",
"`x` is live": "",
"Data preferences": "Gegevensinstellingen",
"Clear watch history": "Kijkgeschiedenis wissen",
"Import/export data": "Importeer/Exporteer gegevens",
"Change password": "",
"Manage subscriptions": "Abonnees beheren",
"Manage tokens": "",
"Import/export data": "Gegevens im-/exporteren",
"Change password": "Wachtwoord wijzigen",
"Manage subscriptions": "Abonnementen beheren",
"Manage tokens": "Toegangssleutels beheren",
"Watch history": "Kijkgeschiedenis",
"Delete account": "Account verwijderen",
"Administrator preferences": "",
"Default homepage: ": "",
"Feed menu: ": "",
"Top enabled? ": "",
"CAPTCHA enabled? ": "",
"Login enabled? ": "",
"Registration enabled? ": "",
"Report statistics? ": "",
"Save preferences": "Opslaan voorkeuren",
"Subscription manager": "Abonnees beheerder",
"Token manager": "",
"Token": "",
"`x` subscriptions": "`x` abonnees",
"`x` tokens": "",
"Import/export": "Importeer/Exporteer",
"unsubscribe": "abonnement opzeggen",
"revoke": "",
"Subscriptions": "Abonnees",
"`x` unseen notifications": "`x` onbekeken notificaties",
"Administrator preferences": "Beheerdersinstellingen",
"Default homepage: ": "Standaard startpagina: ",
"Feed menu: ": "Feedmenu:",
"Top enabled? ": "Bovenkant inschakelen? ",
"CAPTCHA enabled? ": "CAPTCHA gebruiken? ",
"Login enabled? ": "Inloggen toestaan? ",
"Registration enabled? ": "Registratie toestaan? ",
"Report statistics? ": "Statistieken bijhouden? ",
"Save preferences": "Instellingen opslaan",
"Subscription manager": "Abonnementen beheren",
"Token manager": "Toegangssleutels beheren",
"Token": "Toegangssleutel",
"`x` subscriptions": "`x` abonnementen",
"`x` tokens": "`x` toegangssleutels",
"Import/export": "Importeren/Exporteren",
"unsubscribe": "Deabonneren",
"revoke": "Intrekken",
"Subscriptions": "Abonnementen",
"`x` unseen notifications": "`x` ongelezen meldingen",
"search": "zoeken",
"Log out": "Afmelden",
"Released under the AGPLv3 by Omar Roth.": "Uitgegeven onder AGPLv3 door Omar Roth.",
"Source available here.": "Bron beschikbaar hier.",
"View JavaScript license information.": "Bekijk JavaScript licentie informatie.",
"View privacy policy.": "",
"Trending": "Trending",
"Unlisted": "",
"Watch on YouTube": "Bekijk video op Youtube",
"Hide annotations": "",
"Show annotations": "",
"Log out": "Uitloggen",
"Released under the AGPLv3 by Omar Roth.": "Uitgegeven onder de AGPLv3-licentie door Omar Roth.",
"Source available here.": "De broncode is hier beschikbaar.",
"View JavaScript license information.": "JavaScript-licentieinformatie tonen.",
"View privacy policy.": "Privacybeleid tonen",
"Trending": "Uitgelicht",
"Unlisted": "Verborgen",
"Watch on YouTube": "Bekijk video op YouTube",
"Hide annotations": "Annotaties verbergen",
"Show annotations": "Annotaties tonen",
"Genre: ": "Genre: ",
"License: ": "Licentie: ",
"Family friendly? ": "Gezinsvriendelijk? ",
"Wilson score: ": "Wilson score: ",
"Wilson score: ": "Wilson-score: ",
"Engagement: ": "Betrokkenheid: ",
"Whitelisted regions: ": "Toegestane regio's: ",
"Blacklisted regions: ": "Geblokkeerde regio's: ",
"Shared `x`": "`x` gedeeld",
"`x` views": "",
"Premieres in `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.": "Hoi! Het lijkt erop dat je JavaScript uit hebt staan. Klik hier om de reacties te bekijken, hou er rekening mee dat het wat langer duurt om te laden.",
"View YouTube comments": "Bekijk YouTube reacties",
"View more comments on Reddit": "Bekijk meer reacties op Reddit",
"View `x` comments": "`x` reacties zien",
"View Reddit comments": "Bekijk Reddit reacties",
"Hide replies": "Verberg antwoorden",
"Show replies": "Laat antwoorden zien",
"Incorrect password": "Onjuist wachtwoord",
"Quota exceeded, try again in a few hours": "Quota overschreden, probeer het over een paar uur opnieuw",
"Unable to log in, make sure two-factor authentication (Authenticator or SMS) is turned on.": "Niet in staat om in te loggen, zorg ervoor dat two-factor authentication (Authenticator of SMS) is ingeschakeld.",
"Invalid TFA code": "Onjuiste TFA code",
"Login failed. This may be because two-factor authentication is not turned on for your account.": "Aanmelden mislukt. Dit kan zijn omdat two-factor authentication niet is ingeschakeld voor uw account.",
"`x` views": "`x` weergaven",
"Premieres in `x`": "Verschijnt over `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.": "Hoi! Het lijkt erop dat je JavaScript hebt uitgeschakeld. Klik hier om de reacties te bekijken. Let op: het laden duurt wat langer.",
"View YouTube comments": "YouTube-reacties tonen",
"View more comments on Reddit": "Meer reacties bekijken op Reddit",
"View `x` comments": "`x` reacties tonen",
"View Reddit comments": "Reddit-reacties tonen",
"Hide replies": "Antwoorden verbergen",
"Show replies": "Antwoorden tonen",
"Incorrect password": "Wachtwoord is onjuist",
"Quota exceeded, try again in a few hours": "Quota overschreden; probeer het over een paar uur opnieuw",
"Unable to log in, make sure two-factor authentication (Authenticator or SMS) is turned on.": "Kan niet inloggen. Zorg ervoor dat authenticatie in twee stappen (Authenticator of sms) is ingeschakeld.",
"Invalid TFA code": "Onjuiste TFA-code",
"Login failed. This may be because two-factor authentication is not turned on for your account.": "Inloggen mislukt. Wellicht is authenticatie in twee stappen niet ingeschakeld op je account.",
"Wrong answer": "Onjuist antwoord",
"Erroneous CAPTCHA": "Onjuiste CAPTCHA",
"CAPTCHA is a required field": "CAPTCHA is een vereist veld",
"User ID is a required field": "Gebruiker ID is een vereist veld",
"Password is a required field": "Wachtwoord is een vereist veld",
"Wrong username or password": "Ongeldige gebruikersnaam of wachtwoord",
"Please sign in using 'Log in with Google'": "Meld u aan met 'Aanmelden met Google'",
"Password cannot be empty": "Wachtwoord mag niet leeg zijn",
"Password cannot be longer than 55 characters": "Wachtwoord mag niet langer dan 55 tekens zijn",
"Please log in": "Meld u aan",
"Invidious Private Feed for `x`": "Invidious Privé Feed voor `x`",
"CAPTCHA is a required field": "CAPTCHA is vereist",
"User ID is a required field": "Gebruikers-id is vereist",
"Password is a required field": "Wachtwoord is vereist",
"Wrong username or password": "Onjuiste gebruikersnaam of wachtwoord",
"Please sign in using 'Log in with Google'": "Log in via 'Inloggen met Google'",
"Password cannot be empty": "Het wachtwoordveld mag niet leeg zijn",
"Password cannot be longer than 55 characters": "Het wachtwoord mag niet langer dan 55 tekens zijn",
"Please log in": "Log in",
"Invidious Private Feed for `x`": "Invidious-privéfeed van `x`",
"channel:`x`": "kanaal:`x`",
"Deleted or invalid channel": "Verwijderd of ongeldig kanaal",
"Deleted or invalid channel": "Verwijderd of niet-bestaand kanaal",
"This channel does not exist.": "Dit kanaal bestaat niet.",
"Could not get channel info.": "Kan kanaal informatie niet verkrijgen.",
"Could not fetch comments": "Kan reacties niet verkrijgen",
"View `x` replies": "`x` antwoorden zien",
"Could not get channel info.": "Kan geen kanaalinformatie ophalen.",
"Could not fetch comments": "Kan reacties niet ophalen",
"View `x` replies": "`x` antwoorden tonen",
"`x` ago": "`x` geleden",
"Load more": "Meer laden",
"`x` points": "`x` punten",
"Could not create mix.": "Kon mix niet maken.",
"Empty playlist": "Afspeellijst is leeg",
"Could not create mix.": "Kan geen mix maken.",
"Empty playlist": "Lege afspeellijst",
"Not a playlist.": "Ongeldige afspeellijst.",
"Playlist does not exist.": "Afspeellijst bestaat niet.",
"Could not pull trending pages.": "Kon trending paginas niet verkrijgen.",
"Hidden field \"challenge\" is a required field": "Verborgen veld \"uitdaging\" is een vereist veld",
"Hidden field \"token\" is a required field": "Verborgen veld \"token\" is een vereist veld",
"Could not pull trending pages.": "Kan uitgelichte pagina's niet ophalen.",
"Hidden field \"challenge\" is a required field": "Verborgen veld \"uitdaging\" is vereist",
"Hidden field \"token\" is a required field": "Verborgen veld \"toegangssleutel\" is vereist",
"Erroneous challenge": "Ongeldige uitdaging",
"Erroneous token": "Ongeldige token",
"No such user": "Ongeldige gebruiker",
"Token is expired, please try again": "Token is verlopen, probeer het opnieuw",
"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": "",
"Erroneous token": "Ongeldige toegangssleutel",
"No such user": "Gebruiker bestaat niet",
"Token is expired, please try again": "Toegangssleutel verlopen; probeer het opnieuw",
"English": "Engels",
"English (auto-generated)": "Engels (automatisch gegenereerd)",
"Afrikaans": "Afrikaans",
"Albanian": "Albanees",
"Amharic": "Amhaars",
"Arabic": "Arabisch",
"Armenian": "Armeens",
"Azerbaijani": "Azerbeidzjaans",
"Bangla": "Bangla",
"Basque": "Baskisch",
"Belarusian": "Wit-Rrussisch",
"Bosnian": "Bosnisch",
"Bulgarian": "Bulgaars",
"Burmese": "Birmaans",
"Catalan": "Catalaans",
"Cebuano": "Cebuano",
"Chinese (Simplified)": "Chinees (Veereenvoudigd)",
"Chinese (Traditional)": "Chinees (Traditioneel)",
"Corsican": "Corsicaans",
"Croatian": "Kroatisch",
"Czech": "Tsjechisch",
"Danish": "Deens",
"Dutch": "Nederlands",
"Esperanto": "Esperanto",
"Estonian": "Ests",
"Filipino": "Filipijns",
"Finnish": "Fins",
"French": "Frans",
"Galician": "Galicisch",
"Georgian": "Georgisch",
"German": "Duits",
"Greek": "Grieks",
"Gujarati": "Gujarati",
"Haitian Creole": "Creools",
"Hausa": "Hausa",
"Hawaiian": "Hawaïaans",
"Hebrew": "Heebreeuws",
"Hindi": "Hindi",
"Hmong": "Hmong",
"Hungarian": "Hongaars",
"Icelandic": "IJslands",
"Igbo": "Igbo",
"Indonesian": "Indonesisch",
"Irish": "Iers",
"Italian": "Italiaans",
"Japanese": "Japans",
"Javanese": "Javaans",
"Kannada": "Kannada",
"Kazakh": "Kazachs",
"Khmer": "Khmer",
"Korean": "Koreaans",
"Kurdish": "Koerdisch",
"Kyrgyz": "Kirgizisch",
"Lao": "Laotiaans",
"Latin": "Latijns",
"Latvian": "Lets",
"Lithuanian": "Litouws",
"Luxembourgish": "Luxemburgs",
"Macedonian": "Macedonisch",
"Malagasy": "Malagassisch",
"Malay": "Maleisisch",
"Malayalam": "Malayalam",
"Maltese": "Maltees",
"Maori": "Maorisch",
"Marathi": "Marathi",
"Mongolian": "Mongools",
"Nepali": "Nepalees",
"Norwegian Bokmål": "Noors (Bokmål)",
"Nyanja": "Nyanja",
"Pashto": "Pashto",
"Persian": "Perzisch",
"Polish": "Pools",
"Portuguese": "Portugees",
"Punjabi": "Punjabi",
"Romanian": "Roemeens",
"Russian": "Russisch",
"Samoan": "Samoaans",
"Scottish Gaelic": "Schots-Gaelisch",
"Serbian": "Servisch",
"Shona": "Shona",
"Sindhi": "Sindhi",
"Sinhala": "Sinhala",
"Slovak": "Slowaaks",
"Slovenian": "Sloveens",
"Somali": "Somalisch",
"Southern Sotho": "Zuid-Sotho",
"Spanish": "Spaans",
"Spanish (Latin America)": "Spaans (Latijns-Amerika)",
"Sundanese": "Soedanees",
"Swahili": "Swahili",
"Swedish": "Zweeds",
"Tajik": "Tajik",
"Tamil": "Tamil",
"Telugu": "Telugu",
"Thai": "Thaïs",
"Turkish": "Turks",
"Ukrainian": "Oekraïens",
"Urdu": "Urdu",
"Uzbek": "Oezbeeks",
"Vietnamese": "Vietnamees",
"Welsh": "Welsh",
"Western Frisian": "Fries",
"Xhosa": "Xhosa",
"Yiddish": "Joods",
"Yoruba": "Yoruba",
"Zulu": "Zulu",
"`x` years": "`x` jaar",
"`x` months": "`x` maanden",
"`x` weeks": "`x` weken",
@ -288,27 +292,27 @@
"`x` hours": "`x` uur",
"`x` minutes": "`x` minuten",
"`x` seconds": "`x` seconden",
"Fallback comments: ": "",
"Popular": "",
"Top": "",
"About": "",
"Rating: ": "",
"Language: ": "",
"View as playlist": "",
"Default": "",
"Music": "",
"Gaming": "",
"News": "",
"Movies": "",
"Download": "",
"Download as: ": "",
"%A %B %-d, %Y": "",
"(edited)": "",
"YouTube comment permalink": "",
"`x` marked it with a ❤": "",
"Audio mode": "",
"Video mode": "",
"Videos": "",
"Playlists": "",
"Current version: ": ""
"Fallback comments: ": "Terugvallen op",
"Popular": "Populair",
"Top": "Top",
"About": "Over",
"Rating: ": "Waardering",
"Language: ": "Taal",
"View as playlist": "Tonen als afspeellijst",
"Default": "Standaard",
"Music": "Muziek",
"Gaming": "Gaming",
"News": "Nieuws",
"Movies": "Films",
"Download": "Downloaden",
"Download as: ": "Downloaden als: ",
"%A %B %-d, %Y": "%A %B %-d, %Y",
"(edited)": "(bewerkt)",
"YouTube comment permalink": "Link naar YouTube-reactie",
"`x` marked it with a ❤": "`x` heeft dit gemarkeerd met ❤",
"Audio mode": "Audiomodus",
"Video mode": "Videomodus",
"Videos": "Video's",
"Playlists": "Afspeellijsten",
"Current version: ": "Huidige versie: "
}

View File

@ -6,6 +6,7 @@
"Unsubscribe": "Odsubskrybuj",
"Subscribe": "Subskrybuj",
"View channel on YouTube": "Wyświetl kanał na YouTube",
"View playlist on YouTube": "",
"newest": "najnowsze",
"oldest": "najstarsze",
"popular": "popularne",
@ -84,6 +85,9 @@
"Only show latest unwatched video from channel: ": "Pokazuj tylko najnowszy nie obejrzany film z kanału: ",
"Only show unwatched: ": "Pokazuj tylko nie obejrzane: ",
"Only show notifications (if there are any): ": "Pokazuj tylko powiadomienia (jeśli są): ",
"Enable web notifications": "",
"`x` uploaded a video": "",
"`x` is live": "",
"Data preferences": "Preferencje danych",
"Clear watch history": "Wyczyść historię",
"Import/export data": "Import/Eksport danych",

View File

@ -5,39 +5,40 @@
"Shared `x` ago": "Опубликовано `x` назад",
"Unsubscribe": "Отписаться",
"Subscribe": "Подписаться",
"View channel on YouTube": "Канал на YouTube",
"newest": "новые",
"oldest": "старые",
"View channel on YouTube": "Смотреть канал на YouTube",
"View playlist on YouTube": "",
"newest": "самые свежие",
"oldest": "самые старые",
"popular": "популярные",
"last": "недавно обновленные",
"last": "недавние",
"Next page": "Следующая страница",
"Previous page": "Предыдущая страница",
"Clear watch history?": "Очистить историю просмотров?",
"New password": "",
"New passwords must match": "",
"Cannot change password for Google accounts": "",
"Authorize token?": "",
"Authorize token for `x`?": "",
"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)",
"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",
"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",
"JavaScript license information": "Информация о лицензиях JavaScript",
"source": "источник",
"Log in": "Войти",
"Log in/register": "Войти/Регистрация",
"Log in/register": "Войти или зарегистрироваться",
"Log in with Google": "Войти через Google",
"User ID": "ID пользователя",
"Password": "Пароль",
@ -45,136 +46,139 @@
"Text CAPTCHA": "Текст капчи",
"Image CAPTCHA": "Изображение капчи",
"Sign In": "Войти",
"Register": "Регистрация",
"E-mail": "Эл. почта",
"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: ": "Скорость по умолчанию: ",
"Play next by default: ": "Всегда включать следующее видео? ",
"Autoplay next video: ": "Автопроигрывание следующего видео: ",
"Listen by default: ": "Режим «только аудио» по умолчанию: ",
"Proxy videos? ": "Проигрывать видео через прокси? ",
"Default speed: ": "Скорость видео по умолчанию: ",
"Preferred video quality: ": "Предпочтительное качество видео: ",
"Player volume: ": "Громкость воспроизведения: ",
"Player volume: ": "Громкость видео: ",
"Default comments: ": "Источник комментариев: ",
"youtube": "YouTube",
"reddit": "Reddit",
"Default captions: ": "Субтитры по умолчанию: ",
"Fallback captions: ": "Резервные субтитры: ",
"Default captions: ": "Основной язык субтитров: ",
"Fallback captions: ": "Дополнительный язык субтитров: ",
"Show related videos? ": "Показывать похожие видео? ",
"Show annotations by default? ": "",
"Visual preferences": "Визуальные настройки",
"Dark mode: ": "Темная тема: ",
"Thin mode: ": "Облегченный режим: ",
"Show annotations by default? ": "Всегда показывать аннотации? ",
"Visual preferences": "Настройки сайта",
"Dark mode: ": "Тёмное оформление: ",
"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): ": "Отображать только оповещения (если есть): ",
"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` is live": "",
"Data preferences": "Настройки данных",
"Clear watch history": "Очистить историю просмотра",
"Clear watch history": "Очистить историю просмотров",
"Import/export data": "Импорт/Экспорт данных",
"Change password": "",
"Manage subscriptions": "Управление подписками",
"Manage tokens": "",
"Change password": "Изменить пароль",
"Manage subscriptions": "Управлять подписками",
"Manage tokens": "Управлять токенами",
"Watch history": "История просмотров",
"Delete account": "Удалить аккаунт",
"Administrator preferences": "Настройки администратора",
"Administrator preferences": "Администраторские настройки",
"Default homepage: ": "Главная страница по умолчанию: ",
"Feed menu: ": "Меню ленты: ",
"Top enabled? ": "Включить топ? ",
"Feed menu: ": "Меню ленты видео: ",
"Top enabled? ": "Включить топ видео? ",
"CAPTCHA enabled? ": "Включить капчу? ",
"Login enabled? ": "Включить логин? ",
"Login enabled? ": "Включить авторизацию? ",
"Registration enabled? ": "Включить регистрацию? ",
"Report statistics? ": "Отображать статистику? ",
"Report statistics? ": "Сообщать статистику? ",
"Save preferences": "Сохранить настройки",
"Subscription manager": "Менеджер подписок",
"Token manager": "",
"Token": "",
"Token manager": "Менеджер токенов",
"Token": "Токен",
"`x` subscriptions": "`x` подписок",
"`x` tokens": "",
"Import/export": "Импорткспорт",
"`x` tokens": "`x` токенов",
"Import/export": "Импорт и экспорт",
"unsubscribe": "отписаться",
"revoke": "",
"revoke": "отозвать",
"Subscriptions": "Подписки",
"`x` unseen notifications": "`x` новых оповещений",
"`x` unseen notifications": "`x` непросмотренных оповещений",
"search": "поиск",
"Log out": "Выйти",
"Released under the AGPLv3 by Omar Roth.": "Распространяется Omar Roth по AGPLv3.",
"Released under the AGPLv3 by Omar Roth.": "Реализовано Омаром Ротом по лицензии AGPLv3.",
"Source available here.": "Исходный код доступен здесь.",
"View JavaScript license information.": "Посмотреть лицензии JavaScript кода.",
"View privacy policy.": "См. политику конфиденциальности.",
"View JavaScript license information.": "Посмотреть информацию по лицензии JavaScript.",
"View privacy policy.": "Посмотреть политику конфиденциальности.",
"Trending": "В тренде",
"Unlisted": "Доступно по ссылке",
"Unlisted": "Нет в списке",
"Watch on YouTube": "Смотреть на YouTube",
"Hide annotations": "",
"Show annotations": "",
"Hide annotations": "Скрыть аннотации",
"Show annotations": "Показать аннотации",
"Genre: ": "Жанр: ",
"License: ": "Лицензия: ",
"Family friendly? ": "Семейный просмотр: ",
"Wilson score: ": "Рейтинг Уилсона: ",
"Engagement: ": "Вовлеченность: ",
"Whitelisted regions: ": "Доступно для: ",
"Blacklisted regions: ": "Недоступно для: ",
"Engagement: ": "Вовлечённость: ",
"Whitelisted regions: ": "Доступно в регионах: ",
"Blacklisted regions: ": "Недоступно в регионах: ",
"Shared `x`": "Опубликовано `x`",
"`x` views": "`x` просмотров / просмотр / просмотра",
"`x` views": "`x` просмотров",
"Premieres in `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. Нажмите сюда, чтобы увидеть комментарии (учтите, что они могут загружаться дольше).",
"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 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 is a required field": "Необходимо ввести капчу",
"User ID is a required field": "Необходимо ввести идентификатор пользователя",
"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": "Неправильный код двухфакторной аутентификации",
"Login failed. This may be because two-factor authentication is not turned on for your account.": "Не удаётся войти. Это может быть из-за того, что в вашем аккаунте не включена двухфакторная аутентификация.",
"Wrong answer": "Неправильный ответ",
"Erroneous CAPTCHA": "Неправильная капча",
"CAPTCHA is a required field": "Необходимо пройти капчу",
"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",
"Wrong username or password": "Неправильный логин или пароль",
"Please sign in using 'Log in with Google'": "Пожалуйста, нажмите «Войти через Google»",
"Password cannot be empty": "Пароль не может быть пустым",
"Password cannot be longer than 55 characters": "Пароль не может быть длиннее 55 символов",
"Please log in": "Пожалуйста, войдите",
"Invidious Private Feed for `x`": "Приватная лента Invidious для `x`",
"channel:`x`": "канал: `x`",
"Deleted or invalid channel": "Канал удален или не найден",
"This channel does not exist.": "Такой канал не существует.",
"Could not get channel info.": "Невозможно получить информацию о канале.",
"Could not fetch comments": "Невозможно получить комментарии",
"Deleted or invalid channel": "Канал удалён или не найден",
"This channel does not exist.": "Такого канала не существует.",
"Could not get channel info.": "Не удаётся получить информацию об этом канале.",
"Could not fetch comments": "Не удаётся загрузить комментарии",
"View `x` replies": "Показать `x` ответов",
"`x` ago": "`x` назад",
"Load more": "Загрузить больше",
"`x` points": "`x` очков",
"Could not create mix.": "Невозможно создать \"микс\".",
"Could not create mix.": "Не удаётся создать микс.",
"Empty playlist": "Плейлист пуст",
"Not a playlist.": "Некорректный плейлист.",
"Playlist does not exist.": "Плейлист не существует.",
"Could not pull trending pages.": "Невозможно получить страницы \"в тренде\".",
"Hidden field \"challenge\" is a required field": "Необходимо заполнить скрытое поле \"challenge\"",
"Hidden field \"token\" is a required field": "Необходимо заполнить скрытое поле \"токен\"",
"Erroneous challenge": "Неправильный ответ в \"challenge\"",
"Could not pull trending pages.": "Не удаётся загрузить страницы «в тренде».",
"Hidden field \"challenge\" is a required field": "Необходимо заполнить скрытое поле «challenge»",
"Hidden field \"token\" is a required field": "Необходимо заполнить скрытое поле «токен»",
"Erroneous challenge": "Неправильный ответ в «challenge»",
"Erroneous token": "Неправильный токен",
"No such user": "Недопустимое имя пользователя",
"Token is expired, please try again": "Срок действия токена истек, попробуйте позже",
"Token is expired, please try again": "Срок действия токена истёк, попробуйте позже",
"English": "Английский",
"English (auto-generated)": "Английский (созданы автоматически)",
"Afrikaans": "Африкаанс",

View File

@ -1,11 +1,12 @@
{
"`x` subscribers": "`x` підписник / підписників / підписника",
"`x` subscribers": "`x` підписників",
"`x` videos": "`x` відео",
"LIVE": "ПРЯМИЙ ЕФІР",
"Shared `x` ago": "Розміщено `x` назад",
"Unsubscribe": "Відписатися",
"Subscribe": "Підписатися",
"View channel on YouTube": "Подивитися канал на YouTube",
"View playlist on YouTube": "",
"newest": "найновіше",
"oldest": "найстаріше",
"popular": "популярне",
@ -13,11 +14,11 @@
"Next page": "Наступна сторінка",
"Previous page": "Попередня сторінка",
"Clear watch history?": "Очистити історію переглядів?",
"New password": "",
"New passwords must match": "",
"Cannot change password for Google accounts": "",
"Authorize token?": "",
"Authorize token for `x`?": "",
"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": "Імпорт і експорт даних",
@ -52,7 +53,7 @@
"Player preferences": "Налаштування програвача",
"Always loop: ": "Завжди повторювати: ",
"Autoplay: ": "Автовідтворення: ",
"Play next by default: ": "",
"Play next by default: ": "Завжди вмикати наступне відео: ",
"Autoplay next video: ": "Автовідтворення наступного відео: ",
"Listen by default: ": "Режим «тільки звук» як усталений: ",
"Proxy videos? ": "Програвати відео через проксі? ",
@ -60,17 +61,17 @@
"Preferred video quality: ": "Пріорітетна якість відео: ",
"Player volume: ": "Гучність відео: ",
"Default comments: ": "Джерело коментарів: ",
"youtube": "",
"reddit": "",
"youtube": "YouTube",
"reddit": "Reddit",
"Default captions: ": "Основна мова субтитрів: ",
"Fallback captions: ": "Запасна мова субтитрів: ",
"Show related videos? ": "Показувати схожі відео? ",
"Show annotations by default? ": "",
"Show annotations by default? ": "Завжди показувати анотації? ",
"Visual preferences": "Налаштування сайту",
"Dark mode: ": "Темне оформлення: ",
"Thin mode: ": "Полегшене оформлення: ",
"Subscription preferences": "Налаштування підписок",
"Show annotations by default for subscribed channels? ": "",
"Show annotations by default for subscribed channels? ": "Завжди показувати анотації у відео каналів, на які ви підписані? ",
"Redirect homepage to feed: ": "Показувати відео з каналів, на які підписані, як головну сторінку: ",
"Number of videos shown in feed: ": "Кількість відео з каналів, на які підписані, у потоці: ",
"Sort videos by: ": "Сортувати відео: ",
@ -84,12 +85,15 @@
"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` is live": "",
"Data preferences": "Налаштування даних",
"Clear watch history": "Очистити історію переглядів",
"Import/export data": "Імпорт і експорт даних",
"Change password": "",
"Change password": "Змінити пароль",
"Manage subscriptions": "Керування підписками",
"Manage tokens": "",
"Manage tokens": "Керувати токенами",
"Watch history": "Історія переглядів",
"Delete account": "Видалити обліківку",
"Administrator preferences": "Адміністраторські налаштування",
@ -102,13 +106,13 @@
"Report statistics? ": "Повідомляти статистику? ",
"Save preferences": "Зберегти налаштування",
"Subscription manager": "Менеджер підписок",
"Token manager": "",
"Token": "",
"Token manager": "Менеджер токенів",
"Token": "Токен",
"`x` subscriptions": "`x` підписка / підписок / підписки",
"`x` tokens": "",
"`x` tokens": "`x` токенів",
"Import/export": "Імпорт і експорт",
"unsubscribe": "відписатися",
"revoke": "",
"revoke": "скасувати",
"Subscriptions": "Підписки",
"`x` unseen notifications": "`x` непереглянуте сповіщення / непереглянутих сповіщень / непереглянутих сповіщення",
"search": "пошук",
@ -118,10 +122,10 @@
"View JavaScript license information.": "Переглянути інформацію щодо ліцензії JavaScript.",
"View privacy policy.": "Переглянути політику приватності.",
"Trending": "У тренді",
"Unlisted": "Відсутнє у листі",
"Watch on YouTube": "Дивитися відео на YouTube",
"Hide annotations": "",
"Show annotations": "",
"Unlisted": "Немає в списку",
"Watch on YouTube": "Дивитися на YouTube",
"Hide annotations": "Приховати анотації",
"Show annotations": "Показати анотації",
"Genre: ": "Жанр: ",
"License: ": "Ліцензія: ",
"Family friendly? ": "Перегляд із родиною? ",
@ -130,7 +134,7 @@
"Whitelisted regions: ": "Доступно у регіонах: ",
"Blacklisted regions: ": "Недоступно у регіонах: ",
"Shared `x`": "Розміщено `x`",
"`x` views": "",
"`x` views": "`x` переглядів",
"Premieres in `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",
@ -150,7 +154,7 @@
"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»",
"Please sign in using 'Log in with Google'": "Будь ласка, натисніть «Увійти через Google»",
"Password cannot be empty": "Пароль не може бути порожнім",
"Password cannot be longer than 55 characters": "Пароль не може бути довшим за 55 знаків",
"Please log in": "Будь ласка, увійдіть",
@ -281,20 +285,20 @@
"Yiddish": "Їдиш",
"Yoruba": "Йоруба",
"Zulu": "Зулу",
"`x` years": "`x` років / рік / роки",
"`x` months": "`x` місяців / місяць / місяці",
"`x` weeks": "`x` тижнів / тиждень / тижні",
"`x` days": "`x` днів / день / дні",
"`x` hours": "`x` годин / година / години",
"`x` minutes": "`x` хвилин / хвилина / хвилини",
"`x` seconds": "`x` секунд / секунду / секунди",
"`x` years": "`x` років",
"`x` months": "`x` місяців",
"`x` weeks": "`x` тижнів",
"`x` days": "`x` днів",
"`x` hours": "`x` годин",
"`x` minutes": "`x` хвилин",
"`x` seconds": "`x` секунд",
"Fallback comments: ": "Резервні коментарі: ",
"Popular": "Популярне",
"Top": "Топ",
"About": "Про сайт",
"Rating: ": "Рейтинг: ",
"Language: ": "Мова: ",
"View as playlist": "",
"View as playlist": "Дивитися як плейлист",
"Default": "Усталено",
"Music": "Музика",
"Gaming": "Ігри",

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -1,5 +1,5 @@
name: invidious
version: 0.17.0
version: 0.18.0
authors:
- Omar Roth <omarroth@protonmail.com>

View File

@ -10,7 +10,7 @@ require "../src/invidious/playlists"
require "../src/invidious/search"
require "../src/invidious/users"
describe "Helpers" do
describe "Helper" do
describe "#produce_channel_videos_url" do
it "correctly produces url for requesting page `x` of a channel's videos" do
produce_channel_videos_url(ucid: "UCXuqSBlHAE6Xw-yeJA0Tunw").should eq("/browse_ajax?continuation=4qmFsgI8EhhVQ1h1cVNCbEhBRTZYdy15ZUpBMFR1bncaIEVnWjJhV1JsYjNNd0FqZ0JZQUZxQUxnQkFDQUFlZ0V4&gl=US&hl=en")
@ -93,7 +93,7 @@ describe "Helpers" do
":subscriptions/*",
"GET:tokens*",
],
"signature" => "f//2hS20th8pALF305PJFK+D2aVtvefNnQheILHD2vU=",
"signature" => "f__2hS20th8pALF305PJFK-D2aVtvefNnQheILHD2vU=",
}
sign_token("SECRET_KEY", token).should eq(token["signature"])

File diff suppressed because it is too large Load Diff

View File

@ -11,6 +11,8 @@ end
struct ChannelVideo
def to_json(locale, config, kemal_config, json : JSON::Builder)
json.object do
json.field "type", "shortVideo"
json.field "title", self.title
json.field "videoId", self.id
json.field "videoThumbnails" do
@ -24,6 +26,8 @@ struct ChannelVideo
json.field "authorUrl", "/channel/#{self.ucid}"
json.field "published", self.published.to_unix
json.field "publishedText", translate(locale, "`x` ago", recode_date(self.published, locale))
json.field "viewCount", self.views
end
end
@ -47,6 +51,7 @@ struct ChannelVideo
length_seconds: {type: Int32, default: 0},
live_now: {type: Bool, default: false},
premiere_timestamp: {type: Time?, default: nil},
views: {type: Int64?, default: nil},
})
end
@ -155,6 +160,8 @@ def fetch_channel(ucid, db, pull_all_videos = true, locale = nil)
updated = Time.parse_rfc3339(entry.xpath_node("updated").not_nil!.content)
author = entry.xpath_node("author/name").not_nil!.content
ucid = entry.xpath_node("channelid").not_nil!.content
views = entry.xpath_node("group/community/statistics").try &.["views"]?.try &.to_i64?
views ||= 0_i64
channel_video = videos.select { |video| video.id == video_id }[0]?
@ -175,21 +182,32 @@ def fetch_channel(ucid, db, pull_all_videos = true, locale = nil)
author: author,
length_seconds: length_seconds,
live_now: live_now,
premiere_timestamp: premiere_timestamp
premiere_timestamp: premiere_timestamp,
views: views,
)
db.exec("UPDATE users SET notifications = notifications || $1 \
WHERE updated < $2 AND $3 = ANY(subscriptions) AND $1 <> ALL(notifications)", video.id, video.published, ucid)
emails = db.query_all("UPDATE users SET notifications = notifications || $1 \
WHERE updated < $2 AND $3 = ANY(subscriptions) AND $1 <> ALL(notifications) RETURNING email",
video.id, video.published, ucid, as: String)
video_array = video.to_a
args = arg_array(video_array)
# We don't include the 'premire_timestamp' here because channel pages don't include them,
# We don't include the 'premiere_timestamp' here because channel pages don't include them,
# meaning the above timestamp is always null
db.exec("INSERT INTO channel_videos VALUES (#{args}) \
ON CONFLICT (id) DO UPDATE SET title = $2, published = $3, \
updated = $4, ucid = $5, author = $6, length_seconds = $7, \
live_now = $8", video_array)
live_now = $8, views = $10", video_array)
# Update all users affected by insert
if emails.empty?
values = "'{}'"
else
values = "VALUES #{emails.map { |id| %(('#{id}')) }.join(",")}"
end
db.exec("UPDATE users SET feed_needs_update = true WHERE email = ANY(#{values})")
end
if pull_all_videos
@ -227,24 +245,37 @@ def fetch_channel(ucid, db, pull_all_videos = true, locale = nil)
author: video.author,
length_seconds: video.length_seconds,
live_now: video.live_now,
premiere_timestamp: video.premiere_timestamp
premiere_timestamp: video.premiere_timestamp,
views: video.views
) }
videos.each do |video|
ids << video.id
# FIXME: Red videos don't provide published date, so the best we can do is ignore them
# We are notified of Red videos elsewhere (PubSub), which includes a correct published date,
# so since they don't provide a published date here we can safely ignore them.
if Time.now - video.published > 1.minute
db.exec("UPDATE users SET notifications = notifications || $1 \
WHERE updated < $2 AND $3 = ANY(subscriptions) AND $1 <> ALL(notifications)", video.id, video.published, video.ucid)
emails = db.query_all("UPDATE users SET notifications = notifications || $1 \
WHERE updated < $2 AND $3 = ANY(subscriptions) AND $1 <> ALL(notifications) RETURNING email",
video.id, video.published, video.ucid, as: String)
video_array = video.to_a
args = arg_array(video_array)
# We don't update the 'premire_timestamp' here because channel pages don't include them
db.exec("INSERT INTO channel_videos VALUES (#{args}) \
ON CONFLICT (id) DO UPDATE SET title = $2, updated = $4, \
ucid = $5, author = $6, length_seconds = $7, live_now = $8", video_array)
ON CONFLICT (id) DO UPDATE SET title = $2, published = $3, \
updated = $4, ucid = $5, author = $6, length_seconds = $7, \
live_now = $8, views = $10", video_array)
# Update all users affected by insert
if emails.empty?
values = "'{}'"
else
values = "VALUES #{emails.map { |id| %(('#{id}')) }.join(",")}"
end
db.exec("UPDATE users SET feed_needs_update = true WHERE email = ANY(#{values})")
end
end

View File

@ -63,7 +63,7 @@ end
class FilteredCompressHandler < Kemal::Handler
exclude ["/videoplayback", "/videoplayback/*", "/vi/*", "/ggpht/*", "/api/v1/auth/notifications"]
exclude ["/data_control"], "POST"
exclude ["/api/v1/auth/notifications", "/data_control"], "POST"
def call(env)
return call_next env if exclude_match? env
@ -139,7 +139,8 @@ class APIHandler < Kemal::Handler
{% for method in %w(GET POST PUT HEAD DELETE PATCH OPTIONS) %}
only ["/api/v1/*"], {{method}}
{% end %}
exclude ["/api/v1/auth/notifications"]
exclude ["/api/v1/auth/notifications"], "GET"
exclude ["/api/v1/auth/notifications"], "POST"
def call(env)
return call_next env unless only_match? env

View File

@ -97,15 +97,9 @@ struct Config
end
YAML.mapping({
channel_threads: Int32, # Number of threads to use for crawling videos from channels (for updating subscriptions)
feed_threads: Int32, # Number of threads to use for updating feeds
db: NamedTuple( # Database configuration
user: String,
password: String,
host: String,
port: Int32,
dbname: String,
),
channel_threads: Int32, # Number of threads to use for crawling videos from channels (for updating subscriptions)
feed_threads: Int32, # Number of threads to use for updating feeds
db: DBConfig, # Database configuration
full_refresh: Bool, # Used for crawling channels: threads should check all videos uploaded by a channel
https_only: Bool?, # Used to tell Invidious it is behind a proxy, so links to resources should be https://
hmac_key: String?, # HMAC signing key for CSRF tokens and verifying pubsub subscriptions
@ -128,6 +122,17 @@ user: String,
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
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
})
end
struct DBConfig
yaml_mapping({
user: String,
password: String,
host: String,
port: Int32,
dbname: String,
})
end
@ -628,3 +633,163 @@ def cache_annotation(db, id, annotations)
db.exec("INSERT INTO annotations VALUES ($1, $2) ON CONFLICT DO NOTHING", id, annotations)
end
end
def proxy_file(response, env)
if !response.body_io?
return
end
if response.headers.includes_word?("Content-Encoding", "gzip")
Gzip::Writer.open(env.response) do |deflate|
copy_in_chunks(response.body_io, deflate)
end
elsif response.headers.includes_word?("Content-Encoding", "deflate")
Flate::Writer.open(env.response) do |deflate|
copy_in_chunks(response.body_io, deflate)
end
else
copy_in_chunks(response.body_io, env.response)
end
end
# https://stackoverflow.com/a/44802810 <3
def copy_in_chunks(input, output, chunk_size = 4096)
size = 1
while size > 0
size = IO.copy(input, output, chunk_size)
Fiber.yield
end
end
def create_notification_stream(env, proxies, config, kemal_config, decrypt_function, topics, connection_channel)
connection = Channel(PQ::Notification).new(8)
connection_channel.send({true, connection})
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
since = env.params.query["since"]?.try &.to_i?
id = 0
if topics.includes? "debug"
spawn do
begin
loop do
time_span = [0, 0, 0, 0]
time_span[rand(4)] = rand(30) + 5
published = Time.now - Time::Span.new(time_span[0], time_span[1], time_span[2], time_span[3])
video_id = TEST_IDS[rand(TEST_IDS.size)]
video = get_video(video_id, PG_DB, proxies)
video.published = published
response = JSON.parse(video.to_json(locale, config, kemal_config, decrypt_function))
if fields_text = env.params.query["fields"]?
begin
JSONFilter.filter(response, fields_text)
rescue ex
env.response.status_code = 400
response = {"error" => ex.message}
end
end
env.response.puts "id: #{id}"
env.response.puts "data: #{response.to_json}"
env.response.puts
env.response.flush
id += 1
sleep 1.minute
end
rescue ex
end
end
end
spawn do
begin
if since
topics.try &.each do |topic|
case topic
when .match(/UC[A-Za-z0-9_-]{22}/)
PG_DB.query_all("SELECT * FROM channel_videos WHERE ucid = $1 AND published > $2 ORDER BY published DESC LIMIT 15",
topic, Time.unix(since.not_nil!), as: ChannelVideo).each do |video|
response = JSON.parse(video.to_json(locale, config, Kemal.config))
if fields_text = env.params.query["fields"]?
begin
JSONFilter.filter(response, fields_text)
rescue ex
env.response.status_code = 400
response = {"error" => ex.message}
end
end
env.response.puts "id: #{id}"
env.response.puts "data: #{response.to_json}"
env.response.puts
env.response.flush
id += 1
end
else
# TODO
end
end
end
end
end
spawn do
begin
loop do
event = connection.receive
notification = JSON.parse(event.payload)
topic = notification["topic"].as_s
video_id = notification["videoId"].as_s
published = notification["published"].as_i64
if !topics.try &.includes? topic
next
end
video = get_video(video_id, PG_DB, proxies)
video.published = Time.unix(published)
response = JSON.parse(video.to_json(locale, config, Kemal.config, decrypt_function))
if fields_text = env.params.query["fields"]?
begin
JSONFilter.filter(response, fields_text)
rescue ex
env.response.status_code = 400
response = {"error" => ex.message}
end
end
env.response.puts "id: #{id}"
env.response.puts "data: #{response.to_json}"
env.response.puts
env.response.flush
id += 1
end
rescue ex
ensure
connection_channel.send({false, connection})
end
end
begin
# Send heartbeat
loop do
env.response.puts ":keepalive #{Time.now.to_unix}"
env.response.puts
env.response.flush
sleep (20 + rand(11)).seconds
end
rescue ex
ensure
connection_channel.send({false, connection})
end
end

View File

@ -1,4 +1,4 @@
def refresh_channels(db, logger, max_threads = 1, full_refresh = false)
def refresh_channels(db, logger, config)
max_channel = Channel(Int32).new
spawn do
@ -20,7 +20,7 @@ def refresh_channels(db, logger, max_threads = 1, full_refresh = false)
active_threads += 1
spawn do
begin
channel = fetch_channel(id, db, full_refresh)
channel = fetch_channel(id, db, config.full_refresh)
db.exec("UPDATE channels SET updated = $1, author = $2, deleted = false WHERE id = $3", Time.now, channel.author, id)
rescue ex
@ -39,19 +39,18 @@ def refresh_channels(db, logger, max_threads = 1, full_refresh = false)
end
end
max_channel.send(max_threads)
max_channel.send(config.channel_threads)
end
def refresh_feeds(db, logger, max_threads = 1)
def refresh_feeds(db, logger, config)
max_channel = Channel(Int32).new
spawn do
max_threads = max_channel.receive
active_threads = 0
active_channel = Channel(Bool).new
loop do
db.query("SELECT email FROM users") do |rs|
db.query("SELECT email FROM users WHERE feed_needs_update = true OR feed_needs_update IS NULL") do |rs|
rs.each do
email = rs.read(String)
view_name = "subscriptions_#{sha256(email)}"
@ -75,7 +74,13 @@ def refresh_feeds(db, logger, max_threads = 1)
end
end
if db.query_one("SELECT pg_get_viewdef('#{view_name}')", as: String).includes? "ucid = ANY"
logger.write("Materialized view #{view_name} is out-of-date, recreating...\n")
db.exec("DROP MATERIALIZED VIEW #{view_name}")
end
db.exec("REFRESH MATERIALIZED VIEW #{view_name}")
db.exec("UPDATE users SET feed_needs_update = false WHERE email = $1", email)
rescue ex
# Rename old views
begin
@ -90,9 +95,10 @@ def refresh_feeds(db, logger, max_threads = 1)
if db.query_one?("SELECT true FROM users WHERE email = $1", email, as: Bool)
logger.write("CREATE #{view_name}\n")
db.exec("CREATE MATERIALIZED VIEW #{view_name} AS \
SELECT * FROM channel_videos WHERE \
ucid = ANY ((SELECT subscriptions FROM users WHERE email = E'#{email.gsub("'", "\\'")}')::text[]) \
ORDER BY published DESC;")
SELECT * FROM channel_videos WHERE
ucid IN (SELECT unnest(subscriptions) FROM users WHERE email = E'#{email.gsub("'", "\\'")}')
ORDER BY published DESC")
db.exec("UPDATE users SET feed_needs_update = false WHERE email = $1", email)
end
rescue ex
logger.write("REFRESH #{email} : #{ex.message}\n")
@ -105,11 +111,11 @@ def refresh_feeds(db, logger, max_threads = 1)
end
end
sleep 1.minute
sleep 5.seconds
end
end
max_channel.send(max_threads)
max_channel.send(config.feed_threads)
end
def subscribe_to_feeds(db, logger, key, config)

View File

@ -1,49 +1,49 @@
macro db_mapping(mapping)
def initialize({{*mapping.keys.map { |id| "@#{id}".id }}})
end
def initialize({{*mapping.keys.map { |id| "@#{id}".id }}})
end
def to_a
return [ {{*mapping.keys.map { |id| "@#{id}".id }}} ]
end
def to_a
return [ {{*mapping.keys.map { |id| "@#{id}".id }}} ]
end
def self.to_type_tuple
return { {{*mapping.keys.map { |id| "#{id}" }}} }
end
def self.to_type_tuple
return { {{*mapping.keys.map { |id| "#{id}" }}} }
end
DB.mapping( {{mapping}} )
DB.mapping( {{mapping}} )
end
macro json_mapping(mapping)
def initialize({{*mapping.keys.map { |id| "@#{id}".id }}})
end
def initialize({{*mapping.keys.map { |id| "@#{id}".id }}})
end
def to_a
return [ {{*mapping.keys.map { |id| "@#{id}".id }}} ]
end
def to_a
return [ {{*mapping.keys.map { |id| "@#{id}".id }}} ]
end
JSON.mapping( {{mapping}} )
YAML.mapping( {{mapping}} )
patched_json_mapping( {{mapping}} )
YAML.mapping( {{mapping}} )
end
macro yaml_mapping(mapping)
def initialize({{*mapping.keys.map { |id| "@#{id}".id }}})
end
def initialize({{*mapping.keys.map { |id| "@#{id}".id }}})
end
def to_a
return [ {{*mapping.keys.map { |id| "@#{id}".id }}} ]
end
def to_a
return [ {{*mapping.keys.map { |id| "@#{id}".id }}} ]
end
def to_tuple
return { {{*mapping.keys.map { |id| "@#{id}".id }}} }
end
def to_tuple
return { {{*mapping.keys.map { |id| "@#{id}".id }}} }
end
YAML.mapping({{mapping}})
YAML.mapping({{mapping}})
end
macro templated(filename, template = "template")
render "src/invidious/views/#{{{filename}}}.ecr", "src/invidious/views/#{{{template}}}.ecr"
render "src/invidious/views/#{{{filename}}}.ecr", "src/invidious/views/#{{{template}}}.ecr"
end
macro rendered(filename)
render "src/invidious/views/#{{{filename}}}.ecr"
render "src/invidious/views/#{{{filename}}}.ecr"
end

View File

@ -0,0 +1,166 @@
# Overloads https://github.com/crystal-lang/crystal/blob/0.28.0/src/json/from_json.cr#L24
def Object.from_json(string_or_io, default) : self
parser = JSON::PullParser.new(string_or_io)
new parser, default
end
# Adds configurable 'default' to
macro patched_json_mapping(_properties_, strict = false)
{% for key, value in _properties_ %}
{% _properties_[key] = {type: value} unless value.is_a?(HashLiteral) || value.is_a?(NamedTupleLiteral) %}
{% end %}
{% for key, value in _properties_ %}
{% _properties_[key][:key_id] = key.id.gsub(/\?$/, "") %}
{% end %}
{% for key, value in _properties_ %}
@{{value[:key_id]}} : {{value[:type]}}{{ (value[:nilable] ? "?" : "").id }}
{% if value[:setter] == nil ? true : value[:setter] %}
def {{value[:key_id]}}=(_{{value[:key_id]}} : {{value[:type]}}{{ (value[:nilable] ? "?" : "").id }})
@{{value[:key_id]}} = _{{value[:key_id]}}
end
{% end %}
{% if value[:getter] == nil ? true : value[:getter] %}
def {{key.id}} : {{value[:type]}}{{ (value[:nilable] ? "?" : "").id }}
@{{value[:key_id]}}
end
{% end %}
{% if value[:presence] %}
@{{value[:key_id]}}_present : Bool = false
def {{value[:key_id]}}_present?
@{{value[:key_id]}}_present
end
{% end %}
{% end %}
def initialize(%pull : ::JSON::PullParser, default = nil)
{% for key, value in _properties_ %}
%var{key.id} = nil
%found{key.id} = false
{% end %}
%location = %pull.location
begin
%pull.read_begin_object
rescue exc : ::JSON::ParseException
raise ::JSON::MappingError.new(exc.message, self.class.to_s, nil, *%location, exc)
end
while %pull.kind != :end_object
%key_location = %pull.location
key = %pull.read_object_key
case key
{% for key, value in _properties_ %}
when {{value[:key] || value[:key_id].stringify}}
%found{key.id} = true
begin
%var{key.id} =
{% if value[:nilable] || value[:default] != nil %} %pull.read_null_or { {% end %}
{% if value[:root] %}
%pull.on_key!({{value[:root]}}) do
{% end %}
{% if value[:converter] %}
{{value[:converter]}}.from_json(%pull)
{% elsif value[:type].is_a?(Path) || value[:type].is_a?(Generic) %}
{{value[:type]}}.new(%pull)
{% else %}
::Union({{value[:type]}}).new(%pull)
{% end %}
{% if value[:root] %}
end
{% end %}
{% if value[:nilable] || value[:default] != nil %} } {% end %}
rescue exc : ::JSON::ParseException
raise ::JSON::MappingError.new(exc.message, self.class.to_s, {{value[:key] || value[:key_id].stringify}}, *%key_location, exc)
end
{% end %}
else
{% if strict %}
raise ::JSON::MappingError.new("Unknown JSON attribute: #{key}", self.class.to_s, nil, *%key_location, nil)
{% else %}
%pull.skip
{% end %}
end
end
%pull.read_next
{% for key, value in _properties_ %}
{% unless value[:nilable] || value[:default] != nil %}
if %var{key.id}.nil? && !%found{key.id} && !::Union({{value[:type]}}).nilable?
raise ::JSON::MappingError.new("Missing JSON attribute: {{(value[:key] || value[:key_id]).id}}", self.class.to_s, nil, *%location, nil)
end
{% end %}
{% if value[:nilable] %}
{% if value[:default] != nil %}
@{{value[:key_id]}} = %found{key.id} ? %var{key.id} : (default.responds_to?(:{{value[:key_id]}}) ? default.{{value[:key_id]}} : {{value[:default]}})
{% else %}
@{{value[:key_id]}} = %var{key.id}
{% end %}
{% elsif value[:default] != nil %}
@{{value[:key_id]}} = %var{key.id}.nil? ? (default.responds_to?(:{{value[:key_id]}}) ? default.{{value[:key_id]}} : {{value[:default]}}) : %var{key.id}
{% else %}
@{{value[:key_id]}} = (%var{key.id}).as({{value[:type]}})
{% end %}
{% if value[:presence] %}
@{{value[:key_id]}}_present = %found{key.id}
{% end %}
{% end %}
end
def to_json(json : ::JSON::Builder)
json.object do
{% for key, value in _properties_ %}
_{{value[:key_id]}} = @{{value[:key_id]}}
{% unless value[:emit_null] %}
unless _{{value[:key_id]}}.nil?
{% end %}
json.field({{value[:key] || value[:key_id].stringify}}) do
{% if value[:root] %}
{% if value[:emit_null] %}
if _{{value[:key_id]}}.nil?
nil.to_json(json)
else
{% end %}
json.object do
json.field({{value[:root]}}) do
{% end %}
{% if value[:converter] %}
if _{{value[:key_id]}}
{{ value[:converter] }}.to_json(_{{value[:key_id]}}, json)
else
nil.to_json(json)
end
{% else %}
_{{value[:key_id]}}.to_json(json)
{% end %}
{% if value[:root] %}
{% if value[:emit_null] %}
end
{% end %}
end
end
{% end %}
end
{% unless value[:emit_null] %}
end
{% end %}
{% end %}
end
end
end

View File

@ -64,8 +64,8 @@ def recode_length_seconds(time)
time = time.seconds
text = "#{time.minutes.to_s.rjust(2, '0')}:#{time.seconds.to_s.rjust(2, '0')}"
if time.hours > 0
text = "#{time.hours.to_s.rjust(2, '0')}:#{text}"
if time.total_hours.to_i > 0
text = "#{time.total_hours.to_i.to_s.rjust(2, '0')}:#{text}"
end
text = text.lchop('0')
@ -243,7 +243,7 @@ def make_host_url(config, kemal_config)
return "#{scheme}#{host}#{port}"
end
def get_referer(env, fallback = "/")
def get_referer(env, fallback = "/", unroll = true)
referer = env.params.query["referer"]?
referer ||= env.request.headers["referer"]?
referer ||= fallback
@ -251,16 +251,18 @@ def get_referer(env, fallback = "/")
referer = URI.parse(referer)
# "Unroll" nested referrers
loop do
if referer.query
params = HTTP::Params.parse(referer.query.not_nil!)
if params["referer"]?
referer = URI.parse(URI.unescape(params["referer"]))
if unroll
loop do
if referer.query
params = HTTP::Params.parse(referer.query.not_nil!)
if params["referer"]?
referer = URI.parse(URI.unescape(params["referer"]))
else
break
end
else
break
end
else
break
end
end

View File

@ -20,9 +20,10 @@ struct User
type: Preferences,
converter: PreferencesConverter,
},
password: String?,
token: String,
watched: Array(String),
password: String?,
token: String,
watched: Array(String),
feed_needs_update: Bool?,
})
end
@ -40,10 +41,10 @@ struct Preferences
begin
result = [] of String
value.read_array do
result << value.read_string
result << HTML.escape(value.read_string)
end
rescue ex
result = [value.read_string, ""]
result = [HTML.escape(value.read_string), ""]
end
result
@ -69,11 +70,11 @@ struct Preferences
node.raise "Expected scalar, not #{item.class}"
end
result << item.value
result << HTML.escape(item.value)
end
rescue ex
if node.is_a?(YAML::Nodes::Scalar)
result = [node.value, ""]
result = [HTML.escape(node.value), ""]
else
result = ["", ""]
end
@ -83,6 +84,24 @@ struct Preferences
end
end
module EscapeString
def self.to_json(value : String, json : JSON::Builder)
json.string value
end
def self.from_json(value : JSON::PullParser) : String
HTML.escape(value.read_string)
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
HTML.escape(node.value)
end
end
json_mapping({
annotations: {type: Bool, default: CONFIG.default_user_preferences.annotations},
annotations_subscribed: {type: Bool, default: CONFIG.default_user_preferences.annotations_subscribed},
@ -95,13 +114,13 @@ struct Preferences
latest_only: {type: Bool, default: CONFIG.default_user_preferences.latest_only},
listen: {type: Bool, default: CONFIG.default_user_preferences.listen},
local: {type: Bool, default: CONFIG.default_user_preferences.local},
locale: {type: String, default: CONFIG.default_user_preferences.locale},
locale: {type: String, default: CONFIG.default_user_preferences.locale, converter: EscapeString},
max_results: {type: Int32, default: CONFIG.default_user_preferences.max_results},
notifications_only: {type: Bool, default: CONFIG.default_user_preferences.notifications_only},
quality: {type: String, default: CONFIG.default_user_preferences.quality},
quality: {type: String, default: CONFIG.default_user_preferences.quality, converter: EscapeString},
redirect_feed: {type: Bool, default: CONFIG.default_user_preferences.redirect_feed},
related_videos: {type: Bool, default: CONFIG.default_user_preferences.related_videos},
sort: {type: String, default: CONFIG.default_user_preferences.sort},
sort: {type: String, default: CONFIG.default_user_preferences.sort, converter: EscapeString},
speed: {type: Float32, default: CONFIG.default_user_preferences.speed},
thin_mode: {type: Bool, default: CONFIG.default_user_preferences.thin_mode},
unseen_only: {type: Bool, default: CONFIG.default_user_preferences.unseen_only},
@ -130,9 +149,9 @@ def get_user(sid, headers, db, refresh = true)
begin
view_name = "subscriptions_#{sha256(user.email)}"
db.exec("CREATE MATERIALIZED VIEW #{view_name} AS \
SELECT * FROM channel_videos WHERE \
ucid = ANY ((SELECT subscriptions FROM users WHERE email = E'#{user.email.gsub("'", "\\'")}')::text[]) \
ORDER BY published DESC;")
SELECT * FROM channel_videos WHERE
ucid IN (SELECT unnest(subscriptions) FROM users WHERE email = E'#{user.email.gsub("'", "\\'")}')
ORDER BY published DESC")
rescue ex
end
end
@ -152,9 +171,9 @@ def get_user(sid, headers, db, refresh = true)
begin
view_name = "subscriptions_#{sha256(user.email)}"
db.exec("CREATE MATERIALIZED VIEW #{view_name} AS \
SELECT * FROM channel_videos WHERE \
ucid = ANY ((SELECT subscriptions FROM users WHERE email = E'#{user.email.gsub("'", "\\'")}')::text[]) \
ORDER BY published DESC;")
SELECT * FROM channel_videos WHERE
ucid IN (SELECT unnest(subscriptions) FROM users WHERE email = E'#{user.email.gsub("'", "\\'")}')
ORDER BY published DESC")
rescue ex
end
end
@ -187,7 +206,7 @@ def fetch_user(sid, headers, db)
token = Base64.urlsafe_encode(Random::Secure.random_bytes(32))
user = User.new(Time.now, [] of String, channels, email, CONFIG.default_user_preferences, nil, token, [] of String)
user = User.new(Time.now, [] of String, channels, email, CONFIG.default_user_preferences, nil, token, [] of String, true)
return user, sid
end
@ -195,7 +214,7 @@ def create_user(sid, email, password)
password = Crypto::Bcrypt::Password.create(password, cost: 10)
token = Base64.urlsafe_encode(Random::Secure.random_bytes(32))
user = User.new(Time.now, [] of String, [] of String, email, CONFIG.default_user_preferences, password.to_s, token, [] of String)
user = User.new(Time.now, [] of String, [] of String, email, CONFIG.default_user_preferences, password.to_s, token, [] of String, true)
return user, sid
end
@ -269,3 +288,36 @@ def generate_text_captcha(key, db)
tokens: tokens,
}
end
def subscribe_ajax(channel_id, action, env_headers)
headers = HTTP::Headers.new
headers["Cookie"] = env_headers["Cookie"]
client = make_client(YT_URL)
html = client.get("/subscription_manager?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 = {
"session_token" => session_token,
}
post_url = "/subscription_ajax?#{action}=1&c=#{channel_id}"
client.post(post_url, headers, form: post_req)
end
end

View File

@ -245,6 +245,7 @@ struct VideoPreferences
json_mapping({
annotations: Bool,
autoplay: Bool,
comments: Array(String),
continue: Bool,
continue_autoplay: Bool,
controls: Bool,
@ -275,6 +276,8 @@ struct Video
def to_json(locale, config, kemal_config, decrypt_function)
JSON.build do |json|
json.object do
json.field "type", "video"
json.field "title", self.title
json.field "videoId", self.id
json.field "videoThumbnails" do
@ -721,10 +724,13 @@ struct Video
return items
end
url = storyboards.shift
url = URI.parse(storyboards.shift)
params = HTTP::Params.parse(url.query || "")
storyboards.each_with_index do |storyboard, i|
width, height, count, storyboard_width, storyboard_height, interval, _, sigh = storyboard.split("#")
params["sigh"] = sigh
url.query = params.to_s
width = width.to_i
height = height.to_i
@ -734,7 +740,7 @@ struct Video
storyboard_height = storyboard_height.to_i
items << {
url: "#{url}&sigh=#{sigh}".sub("$L", i).sub("$N", "M$M"),
url: url.to_s.sub("$L", i).sub("$N", "M$M"),
width: width,
height: height,
count: count,
@ -825,17 +831,17 @@ struct Video
end
struct Caption
JSON.mapping(
name: CaptionName,
baseUrl: String,
languageCode: String
)
json_mapping({
name: CaptionName,
baseUrl: String,
languageCode: String,
})
end
struct CaptionName
JSON.mapping(
json_mapping({
simpleText: String,
)
})
end
class VideoRedirect < Exception
@ -1155,7 +1161,7 @@ def fetch_video(id, proxies, region)
info["avg_rating"] = "#{avg_rating}"
description = html.xpath_node(%q(//p[@id="eow-description"]))
description = description ? description.to_xml(options: XML::SaveOptions::NO_DECL) : ""
description = description ? description.to_xml(options: XML::SaveOptions::NO_DECL) : %q(<p id="eow-description"></p>)
wilson_score = ci_lower_bound(likes, likes + dislikes)
@ -1174,8 +1180,10 @@ def fetch_video(id, proxies, region)
genre_url = html.xpath_node(%(//ul[contains(@class, "watch-info-tag-list")]/li/a[text()="#{genre}"])).try &.["href"]
# Sometimes YouTube tries to link to invalid/missing channels, so we fix that here
# YouTube provides invalid URLs for some genres, so we fix that here
case genre
when "Comedy"
genre_url = "/channel/UCQZ43c4dAA9eXCQuXWu9aTw"
when "Education"
genre_url = "/channel/UCdxpofrI-dO6oYfsqHDHphw"
when "Gaming"
@ -1223,15 +1231,16 @@ end
def process_video_params(query, preferences)
annotations = query["iv_load_policy"]?.try &.to_i?
autoplay = query["autoplay"]?.try &.to_i?
comments = query["comments"]?.try &.split(",").map { |a| a.downcase }
continue = query["continue"]?.try &.to_i?
continue_autoplay = query["continue_autoplay"]?.try &.to_i?
listen = query["listen"]? && (query["listen"] == "true" || query["listen"] == "1").to_unsafe
local = query["local"]? && (query["local"] == "true").to_unsafe
local = query["local"]? && (query["local"] == "true" || query["listen"] == "1").to_unsafe
preferred_captions = query["subtitles"]?.try &.split(",").map { |a| a.downcase }
quality = query["quality"]?
region = query["region"]?
related_videos = query["related_videos"]?
speed = query["speed"]?.try &.to_f?
related_videos = query["related_videos"]? && (query["related_videos"] == "true" || query["related_videos"] == "1").to_unsafe
speed = query["speed"]?.try &.rchop("x").to_f?
video_loop = query["loop"]?.try &.to_i?
volume = query["volume"]?.try &.to_i?
@ -1239,6 +1248,7 @@ def process_video_params(query, preferences)
# region ||= preferences.region
annotations ||= preferences.annotations.to_unsafe
autoplay ||= preferences.autoplay.to_unsafe
comments ||= preferences.comments
continue ||= preferences.continue.to_unsafe
continue_autoplay ||= preferences.continue_autoplay.to_unsafe
listen ||= preferences.listen.to_unsafe
@ -1253,6 +1263,7 @@ def process_video_params(query, preferences)
annotations ||= CONFIG.default_user_preferences.annotations.to_unsafe
autoplay ||= CONFIG.default_user_preferences.autoplay.to_unsafe
comments ||= CONFIG.default_user_preferences.comments
continue ||= CONFIG.default_user_preferences.continue.to_unsafe
continue_autoplay ||= CONFIG.default_user_preferences.continue_autoplay.to_unsafe
listen ||= CONFIG.default_user_preferences.listen.to_unsafe
@ -1301,6 +1312,7 @@ def process_video_params(query, preferences)
params = VideoPreferences.new(
annotations: annotations,
autoplay: autoplay,
comments: comments,
continue: continue,
continue_autoplay: continue_autoplay,
controls: controls,

View File

@ -39,7 +39,7 @@
<div class="pure-u-1">
<ul>
<% scopes.each do |scope| %>
<li><%= scope %></li>
<li><%= HTML.escape(scope) %></li>
<% end %>
</ul>
</div>

View File

@ -81,7 +81,7 @@
<% end %>
<div class="pure-u-1-3" style="text-align:right">
<%= item.responds_to?(:views) ? translate(locale, "`x` views", number_to_short_text(item.views)) : "" %>
<%= item.responds_to?(:views) && item.views ? translate(locale, "`x` views", number_to_short_text(item.views || 0)) : "" %>
</div>
</h5>
<% else %>
@ -93,7 +93,7 @@
<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) || "") %>">
<p class="watched">
<a onclick="mark_watched(this)" data-id="<%= item.id %>" href="#">
<a onclick="mark_watched(this)" data-id="<%= item.id %>" href="javascript:void(0)">
<button type="submit" style="all:unset">
<i onmouseenter='this.setAttribute("class", "icon ion-ios-eye-off")'
onmouseleave='this.setAttribute("class", "icon ion-ios-eye")'
@ -130,7 +130,7 @@
<% end %>
<div class="pure-u-1-3" style="text-align:right">
<%= item.responds_to?(:views) ? translate(locale, "`x` views", number_to_short_text(item.views)) : "" %>
<%= item.responds_to?(:views) && item.views ? translate(locale, "`x` views", number_to_short_text(item.views || 0)) : "" %>
</div>
</h5>
<% end %>

View File

@ -40,228 +40,11 @@
</video>
<script>
var options = {
<% if aspect_ratio %>
aspectRatio: "<%= aspect_ratio %>",
<% end %>
preload: "auto",
playbackRates: [0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 2.0],
controlBar: {
children: [
"playToggle",
"volumePanel",
"currentTimeDisplay",
"timeDivider",
"durationDisplay",
"progressControl",
"remainingTimeDisplay",
"captionsButton",
"qualitySelector",
"playbackRateMenuButton",
"fullscreenToggle"
]
}
};
var shareOptions = {
socials: ["fbFeed", "tw", "reddit", "email"],
url: window.location.href,
var player_data = {
aspect_ratio: '<%= aspect_ratio %>',
title: "<%= video.title.dump_unquoted %>",
description: "<%= description %>",
image: "<%= thumbnail %>",
embedCode: "<iframe id='ivplayer' type='text/html' width='640' height='360' \
src='<%= host_url %>/embed/<%= video.id %>?<%= host_params %>' frameborder='0'></iframe>"
};
var player = videojs("player", options, function() {
this.hotkeys({
volumeStep: 0.1,
seekStep: 5,
enableModifiersForNumbers: false,
enableHoverScroll: true,
customKeys: {
// Toggle play with K Key
play: {
key: function(e) {
return e.which === 75;
},
handler: function(player, options, e) {
if (player.paused()) {
player.play();
} else {
player.pause();
}
}
},
// Go backward 10 seconds
backward: {
key: function(e) {
return e.which === 74;
},
handler: function(player, options, e) {
player.currentTime(player.currentTime() - 10);
}
},
// Go forward 10 seconds
forward: {
key: function(e) {
return e.which === 76;
},
handler: function(player, options, e) {
player.currentTime(player.currentTime() + 10);
}
},
// Increase speed
increase_speed: {
key: function(e) {
return (e.which === 190 && e.shiftKey);
},
handler: function(player, _, e) {
size = options.playbackRates.length;
index = options.playbackRates.indexOf(player.playbackRate());
player.playbackRate(options.playbackRates[(index + 1) % size]);
}
},
// Decrease speed
decrease_speed: {
key: function(e) {
return (e.which === 188 && e.shiftKey);
},
handler: function(player, _, e) {
size = options.playbackRates.length;
index = options.playbackRates.indexOf(player.playbackRate());
player.playbackRate(options.playbackRates[(size + index - 1) % size]);
}
}
}
});
});
player.on('error', function(event) {
if (player.error().code === 2 || player.error().code === 4) {
setInterval(setTimeout(function (event) {
console.log('An error occured in the player, reloading...');
var currentTime = player.currentTime();
var playbackRate = player.playbackRate();
var paused = player.paused();
player.load();
if (currentTime > 0.5) {
currentTime -= 0.5;
}
player.currentTime(currentTime);
player.playbackRate(playbackRate);
if (!paused) {
player.play();
}
}, 5000), 5000);
}
});
<% if params.video_start > 0 || params.video_end > 0 %>
player.markers({
onMarkerReached: function(marker) {
if (marker.text === 'End') {
if (player.loop()) {
player.markers.prev('Start');
} else {
player.pause();
}
}
},
markers: [
{ time: <%= params.video_start %>, text: 'Start' },
<% if params.video_end < 0 %>
{ time: <%= video.info["length_seconds"].to_f - 0.5 %>, text: 'End' }
<% else %>
{ time: <%= params.video_end %>, text: 'End' }
<% end %>
]
});
player.currentTime(<%= params.video_start %>);
<% end %>
player.volume(<%= params.volume.to_f / 100 %>);
player.playbackRate(<%= params.speed %>);
<% if params.autoplay %>
var bpb = player.getChild('bigPlayButton');
if (bpb) {
bpb.hide();
player.ready(function() {
new Promise(function(resolve, reject) {
setTimeout(() => resolve(1), 1);
}).then(function(result) {
var promise = player.play();
if (promise !== undefined) {
promise.then(_ => {
}).catch(error => {
bpb.show();
});
}
});
});
description: "<%= HTML.escape(description) %>",
thumbnail: "<%= thumbnail %>"
}
<% end %>
<% if !params.listen && params.quality == "dash" %>
player.httpSourceSelector();
<% end %>
player.vttThumbnails({
src: 'api/v1/storyboards/<%= video.id %>?height=90'
});
<% if !params.listen && params.annotations %>
var video_container = document.getElementById('player');
let xhr = new XMLHttpRequest();
xhr.responseType = 'text';
xhr.timeout = 60000;
xhr.open('GET', '/api/v1/annotations/<%= video.id %>', true);
xhr.send();
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
videojs.registerPlugin('youtubeAnnotationsPlugin', youtubeAnnotationsPlugin);
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});
});
}
}
}
};
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');
}
});
<% end %>
// Since videojs-share can sometimes be blocked, we try to load it last
player.share(shareOptions);
</script>
<script src="/js/player.js?v=<%= ASSET_COMMIT %>"></script>

View File

@ -1,22 +1,22 @@
<link rel="stylesheet" href="/css/video-js.min.css">
<link rel="stylesheet" href="/css/videojs-http-source-selector.css">
<link rel="stylesheet" href="/css/videojs.markers.min.css">
<link rel="stylesheet" href="/css/videojs-share.css">
<link rel="stylesheet" href="/css/videojs-vtt-thumbnails.css">
<script src="/js/video.min.js"></script>
<script src="/js/videojs-contrib-quality-levels.min.js"></script>
<script src="/js/videojs-http-source-selector.min.js"></script>
<script src="/js/videojs.hotkeys.min.js"></script>
<script src="/js/videojs-markers.min.js"></script>
<script src="/js/videojs-share.min.js"></script>
<script src="/js/videojs-vtt-thumbnails.min.js"></script>
<link rel="stylesheet" href="/css/video-js.min.css?v=<%= ASSET_COMMIT %>">
<link rel="stylesheet" href="/css/videojs-http-source-selector.css?v=<%= ASSET_COMMIT %>">
<link rel="stylesheet" href="/css/videojs.markers.min.css?v=<%= ASSET_COMMIT %>">
<link rel="stylesheet" href="/css/videojs-share.css?v=<%= ASSET_COMMIT %>">
<link rel="stylesheet" href="/css/videojs-vtt-thumbnails.css?v=<%= ASSET_COMMIT %>">
<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-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-share.min.js?v=<%= ASSET_COMMIT %>"></script>
<script src="/js/videojs-vtt-thumbnails.min.js?v=<%= ASSET_COMMIT %>"></script>
<% if params.annotations %>
<link rel="stylesheet" href="/css/videojs-youtube-annotations.min.css">
<script src="/js/videojs-youtube-annotations.min.js"></script>
<link rel="stylesheet" href="/css/videojs-youtube-annotations.min.css?v=<%= ASSET_COMMIT %>">
<script src="/js/videojs-youtube-annotations.min.js?v=<%= ASSET_COMMIT %>"></script>
<% end %>
<% if params.listen || params.quality != "dash" %>
<link rel="stylesheet" href="/css/quality-selector.css">
<script src="/js/silvermine-videojs-quality-selector.min.js"></script>
<link rel="stylesheet" href="/css/quality-selector.css?v=<%= ASSET_COMMIT %>">
<script src="/js/silvermine-videojs-quality-selector.min.js?v=<%= ASSET_COMMIT %>"></script>
<% end %>

View File

@ -22,14 +22,14 @@
<script>
var subscribe_data = {
ucid: '<%= ucid %>',
author: '<%= author %>',
sub_count_text: '<%= sub_count_text %>',
author: '<%= HTML.escape(author) %>',
sub_count_text: '<%= HTML.escape(sub_count_text) %>',
csrf_token: '<%= URI.escape(env.get?("csrf_token").try &.as(String) || "") %>',
subscribe_text: '<%= translate(locale, "Subscribe").gsub("'", "\\'") %>',
unsubscribe_text: '<%= translate(locale, "Unsubscribe").gsub("'", "\\'") %>'
subscribe_text: '<%= HTML.escape(translate(locale, "Subscribe")) %>',
unsubscribe_text: '<%= HTML.escape(translate(locale, "Unsubscribe")) %>'
}
</script>
<script src="/js/subscribe_widget.js"></script>
<script src="/js/subscribe_widget.js?v=<%= ASSET_COMMIT %>"></script>
<% else %>
<p>
<a id="subscribe" class="pure-button pure-button-primary"

View File

@ -2,103 +2,39 @@
<html lang="<%= env.get("preferences").as(Preferences).locale %>">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="thumbnail" content="<%= thumbnail %>">
<%= rendered "components/player_sources" %>
<link rel="stylesheet" href="/css/default.css">
<title><%= HTML.escape(video.title) %> - Invidious</title>
<style>
#player {
position: fixed;
right: 0;
bottom: 0;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
z-index: -100;
}
</style>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="thumbnail" content="<%= thumbnail %>">
<%= rendered "components/player_sources" %>
<link rel="stylesheet" href="/css/default.css?v=<%= ASSET_COMMIT %>">
<title><%= HTML.escape(video.title) %> - Invidious</title>
<style>
#player {
position: fixed;
right: 0;
bottom: 0;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
z-index: -100;
}
</style>
</head>
<body>
<%= rendered "components/player" %>
<script>
<% if plid %>
function get_playlist(plid, timeouts = 0) {
if (timeouts > 10) {
console.log('Failed to pull playlist');
return;
}
if (plid.startsWith('RD')) {
var plid_url = '/api/v1/mixes/' + plid +
'?continuation=<%= video.id %>' +
'&format=html&hl=<%= env.get("preferences").as(Preferences).locale %>';
} else {
var plid_url = '/api/v1/playlists/' + plid +
'?continuation=<%= video.id %>' +
'&format=html&hl=<%= env.get("preferences").as(Preferences).locale %>';
}
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 20000;
xhr.open('GET', plid_url, true);
xhr.send();
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
if (xhr.response.nextVideo) {
player.on('ended', function() {
location.assign('/watch?v=' + xhr.response.nextVideo +
'&list=' + plid +
<% if params.listen != preferences.listen %>
'&listen=<%= params.listen %>' +
<% end %>
<% if params.autoplay || params.continue_autoplay %>
'&autoplay=1' +
<% end %>
<% if params.speed != preferences.speed %>
'&speed=<%= params.speed %>' +
<% end %>
''
);
});
}
}
}
};
xhr.ontimeout = function() {
console.log('Pulling playlist timed out.');
get_playlist(plid, timeouts + 1);
};
var video_data = {
id: '<%= video.id %>',
plid: '<%= plid %>',
length_seconds: '<%= video.info["length_seconds"].to_f %>',
video_series: <%= video_series.to_json %>,
params: <%= params.to_json %>,
preferences: <%= preferences.to_json %>
}
get_playlist('<%= plid %>');
<% elsif video_series %>
player.on('ended', function() {
location.assign('/embed/<%= video_series.shift %>' +
<% if !video_series.empty? %>
'?playlist=<%= video_series.join(",") %>' +
<% end %>
<% if params.listen != preferences.listen %>
'&listen=<%= params.listen %>' +
<% end %>
<% if params.autoplay || params.continue_autoplay %>
'&autoplay=1' +
<% end %>
<% if params.speed != preferences.speed %>
'&speed=<%= params.speed %>' +
<% end %>
''
);
});
<% end %>
</script>
<%= rendered "components/player" %>
<script src="/js/embed.js?v=<%= ASSET_COMMIT %>"></script>
</body>
</html>

View File

@ -18,6 +18,13 @@
</div>
</div>
<script>
var watched_data = {
csrf_token: '<%= URI.escape(env.get?("csrf_token").try &.as(String) || "") %>',
}
</script>
<script src="/js/watched_widget.js"></script>
<div class="pure-g">
<% watched.each_slice(4) do |slice| %>
<% slice.each do |item| %>
@ -27,10 +34,10 @@
<% if !env.get("preferences").as(Preferences).thin_mode %>
<div class="thumbnail">
<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) || "") %>">
<p class="watched">
<a onclick="mark_unwatched(this)" data-id="<%= item %>" href="#">
<a onclick="mark_unwatched(this)" data-id="<%= item %>" href="javascript:void(0)">
<button type="submit" style="all:unset">
<i class="icon ion-md-trash"></i>
</button>
@ -47,33 +54,6 @@
<% end %>
</div>
<script>
function mark_unwatched(target) {
var tile = target.parentNode.parentNode.parentNode.parentNode.parentNode;
tile.style.display = "none";
var count = document.getElementById('count')
count.innerText = count.innerText - 1;
var url = '/watch_ajax?action_mark_unwatched=1&redirect=false' +
'&id=' + target.getAttribute('data-id');
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 20000;
xhr.open('POST', url, true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.send('csrf_token=<%= URI.escape(env.get?("csrf_token").try &.as(String) || "") %>');
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
if (xhr.status != 200) {
count.innerText = count.innerText - 1 + 2;
tile.style.display = '';
}
}
}
}
</script>
<div class="pure-g h-box">
<div class="pure-u-1 pure-u-lg-1-5">
<% if page >= 2 %>

View File

@ -11,7 +11,49 @@
<table id="jslicense-labels1">
<tr>
<td>
<a href="/js/silvermine-videojs-quality-selector.min.js">silvermine-videojs-quality-selector.min.js</a>
<a href="/js/embed.js?v=<%= ASSET_COMMIT %>">embed.js</a>
</td>
<td>
<a href="https://www.gnu.org/licenses/agpl-3.0.html">AGPL-3.0</a>
</td>
<td>
<a href="/js/embed.js?v=<%= ASSET_COMMIT %>"><%= translate(locale, "source") %></a>
</td>
</tr>
<tr>
<td>
<a href="/js/notifications.js?v=<%= ASSET_COMMIT %>">notifications.js</a>
</td>
<td>
<a href="https://www.gnu.org/licenses/agpl-3.0.html">AGPL-3.0</a>
</td>
<td>
<a href="/js/notifications.js?v=<%= ASSET_COMMIT %>"><%= translate(locale, "source") %></a>
</td>
</tr>
<tr>
<td>
<a href="/js/player.js?v=<%= ASSET_COMMIT %>">player.js</a>
</td>
<td>
<a href="https://www.gnu.org/licenses/agpl-3.0.html">AGPL-3.0</a>
</td>
<td>
<a href="/js/player.js?v=<%= ASSET_COMMIT %>"><%= translate(locale, "source") %></a>
</td>
</tr>
<tr>
<td>
<a href="/js/silvermine-videojs-quality-selector.min.js?v=<%= ASSET_COMMIT %>">silvermine-videojs-quality-selector.min.js</a>
</td>
<td>
@ -25,7 +67,49 @@
<tr>
<td>
<a href="/js/videojs-contrib-quality-levels.min.js">videojs-contrib-quality-levels.min.js</a>
<a href="/js/sse.js?v=<%= ASSET_COMMIT %>">sse.js</a>
</td>
<td>
<a href="http://www.jclark.com/xml/copying.txt">Expat</a>
</td>
<td>
<a href="https://github.com/mpetazzoni/sse.js"><%= translate(locale, "source") %></a>
</td>
</tr>
<tr>
<td>
<a href="/js/subscribe_widget.js?v=<%= ASSET_COMMIT %>">subscribe_widget.js</a>
</td>
<td>
<a href="https://www.gnu.org/licenses/agpl-3.0.html">AGPL-3.0</a>
</td>
<td>
<a href="/js/subscribe_widget.js?v=<%= ASSET_COMMIT %>"><%= translate(locale, "source") %></a>
</td>
</tr>
<tr>
<td>
<a href="/js/themes.js?v=<%= ASSET_COMMIT %>">themes.js</a>
</td>
<td>
<a href="https://www.gnu.org/licenses/agpl-3.0.html">AGPL-3.0</a>
</td>
<td>
<a href="/js/themes.js?v=<%= ASSET_COMMIT %>"><%= translate(locale, "source") %></a>
</td>
</tr>
<tr>
<td>
<a href="/js/videojs-contrib-quality-levels.min.js?v=<%= ASSET_COMMIT %>">videojs-contrib-quality-levels.min.js</a>
</td>
<td>
@ -39,7 +123,7 @@
<tr>
<td>
<a href="/js/videojs.hotkeys.min.js">videojs.hotkeys.min.js</a>
<a href="/js/videojs.hotkeys.min.js?v=<%= ASSET_COMMIT %>">videojs.hotkeys.min.js</a>
</td>
<td>
@ -53,7 +137,7 @@
<tr>
<td>
<a href="/js/videojs-http-source-selector.min.js">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>
</td>
<td>
@ -67,7 +151,7 @@
<tr>
<td>
<a href="/js/videojs-markers.min.js">videojs-markers.min.js</a>
<a href="/js/videojs-markers.min.js?v=<%= ASSET_COMMIT %>">videojs-markers.min.js</a>
</td>
<td>
@ -81,7 +165,7 @@
<tr>
<td>
<a href="/js/videojs-share.min.js">videojs-share.min.js</a>
<a href="/js/videojs-share.min.js?v=<%= ASSET_COMMIT %>">videojs-share.min.js</a>
</td>
<td>
@ -95,7 +179,7 @@
<tr>
<td>
<a href="/js/videojs-vtt-thumbnails.min.js">videojs-vtt-thumbnails.min.js</a>
<a href="/js/videojs-vtt-thumbnails.min.js?v=<%= ASSET_COMMIT %>">videojs-vtt-thumbnails.min.js</a>
</td>
<td>
@ -103,13 +187,13 @@
</td>
<td>
<a href="https://github.com/chrisboustead/videojs-vtt-thumbnails"><%= translate(locale, "source") %></a>
<a href="https://github.com/omarroth/videojs-vtt-thumbnails"><%= translate(locale, "source") %></a>
</td>
</tr>
<tr>
<td>
<a href="/js/videojs-youtube-annotations.min.js">videojs-youtube-annotations.min.js</a>
<a href="/js/videojs-youtube-annotations.min.js?v=<%= ASSET_COMMIT %>">videojs-youtube-annotations.min.js</a>
</td>
<td>
@ -123,7 +207,7 @@
<tr>
<td>
<a href="/js/video.min.js">video.min.js</a>
<a href="/js/video.min.js?v=<%= ASSET_COMMIT %>">video.min.js</a>
</td>
<td>
@ -137,7 +221,7 @@
<tr>
<td>
<a href="/js/watch.js">watch.js</a>
<a href="/js/watch.js?v=<%= ASSET_COMMIT %>">watch.js</a>
</td>
<td>
@ -145,7 +229,7 @@
</td>
<td>
<a href="/js/watch.js"><%= translate(locale, "source") %></a>
<a href="/js/watch.js?v=<%= ASSET_COMMIT %>"><%= translate(locale, "source") %></a>
</td>
</tr>
</table>

View File

@ -15,17 +15,27 @@
</div>
<div class="pure-g h-box">
<div class="pure-u-1 pure-u-md-1-4">
<a href="/channel/<%= playlist.ucid %>">
<b><%= playlist.author %></b>
<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">
<p><%= playlist.description_html %></p>
</div>
<div class="h-box">
<hr>
</div>
<div class="pure-g">
<% videos.each_slice(4) do |slice| %>
<% slice.each do |item| %>

View File

@ -165,6 +165,13 @@ function update_value(element) {
<label for="notifications_only"><%= translate(locale, "Only show notifications (if there are any): ") %></label>
<input name="notifications_only" id="notifications_only" type="checkbox" <% if preferences.notifications_only %>checked<% end %>>
</div>
<% # Web notifications are only supported over HTTPS %>
<% if Kemal.config.ssl || config.https_only %>
<div class="pure-control-group">
<a href="#" onclick="Notification.requestPermission()"><%= translate(locale, "Enable web notifications") %></a>
</div>
<% end %>
<% end %>
<% if env.get?("user") && config.admins.includes? env.get?("user").as(User).email %>

View File

@ -45,6 +45,13 @@
<hr>
</div>
<script>
var watched_data = {
csrf_token: '<%= URI.escape(env.get?("csrf_token").try &.as(String) || "") %>',
}
</script>
<script src="/js/watched_widget.js"></script>
<div class="pure-g">
<% videos.each_slice(4) do |slice| %>
<% slice.each do |item| %>
@ -53,30 +60,6 @@
<% end %>
</div>
<script>
function mark_watched(target) {
var tile = target.parentNode.parentNode.parentNode.parentNode.parentNode;
tile.style.display = 'none';
var url = '/watch_ajax?action_mark_watched=1&redirect=false' +
'&id=' + target.getAttribute('data-id');
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 20000;
xhr.open('POST', url, true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.send('csrf_token=<%= URI.escape(env.get?("csrf_token").try &.as(String) || "") %>');
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
if (xhr.status != 200) {
tile.style.display = '';
}
}
}
}
</script>
<div class="pure-g h-box">
<div class="pure-u-1 pure-u-lg-1-5">
<% if page >= 2 %>

View File

@ -6,23 +6,20 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="referrer" content="no-referrer">
<%= yield_content "header" %>
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#575757">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=<%= ASSET_COMMIT %>">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png?v=<%= ASSET_COMMIT %>">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png?v=<%= ASSET_COMMIT %>">
<link rel="manifest" href="/site.webmanifest?v=<%= ASSET_COMMIT %>">
<link rel="mask-icon" href="/safari-pinned-tab.svg?v=<%= ASSET_COMMIT %>" color="#575757">
<meta name="msapplication-TileColor" content="#575757">
<meta name="theme-color" content="#575757">
<link title="Invidious" type="application/opensearchdescription+xml" rel="search" href="/opensearch.xml">
<link rel="stylesheet" href="/css/pure-min.css">
<link rel="stylesheet" href="/css/grids-responsive-min.css">
<link rel="stylesheet" href="/css/ionicons.min.css">
<link rel="stylesheet" href="/css/default.css">
<% if env.get("preferences").as(Preferences).dark_mode %>
<link rel="stylesheet" href="/css/darktheme.css">
<% else %>
<link rel="stylesheet" href="/css/lighttheme.css">
<% end %>
<link rel="stylesheet" href="/css/pure-min.css?v=<%= ASSET_COMMIT %>">
<link rel="stylesheet" href="/css/grids-responsive-min.css?v=<%= ASSET_COMMIT %>">
<link rel="stylesheet" href="/css/ionicons.min.css?v=<%= ASSET_COMMIT %>">
<link rel="stylesheet" href="/css/default.css?v=<%= ASSET_COMMIT %>">
<link rel="stylesheet" href="/css/darktheme.css?v=<%= ASSET_COMMIT %>" id="dark_theme" <% if !env.get("preferences").as(Preferences).dark_mode %>media="none"<% end %>>
<link rel="stylesheet" href="/css/lighttheme.css?v=<%= ASSET_COMMIT %>" id="light_theme" <% if env.get("preferences").as(Preferences).dark_mode %>media="none"<% end %>>
</head>
<% locale = LOCALES[env.get("preferences").as(Preferences).locale]? %>
@ -45,7 +42,7 @@
<div class="pure-u-1 pure-u-md-8-24 user-field">
<% if env.get? "user" %>
<div class="pure-u-1-4">
<a href="/toggle_theme?referer=<%= env.get?("current_page") %>" class="pure-menu-heading">
<a id="toggle_theme" href="/toggle_theme?referer=<%= env.get?("current_page") %>" class="pure-menu-heading">
<% if env.get("preferences").as(Preferences).dark_mode %>
<i class="icon ion-ios-sunny"></i>
<% else %>
@ -54,10 +51,10 @@
</a>
</div>
<div class="pure-u-1-4">
<a title="<%= translate(locale, "Subscriptions") %>" href="/feed/subscriptions" class="pure-menu-heading">
<a id="notification_ticker" title="<%= translate(locale, "Subscriptions") %>" href="/feed/subscriptions" class="pure-menu-heading">
<% notification_count = env.get("user").as(User).notifications.size %>
<% if notification_count > 0 %>
<%= notification_count %> <i class="icon ion-ios-notifications"></i>
<span id="notification_count"><%= notification_count %></span> <i class="icon ion-ios-notifications"></i>
<% else %>
<i class="icon ion-ios-notifications-outline"></i>
<% end %>
@ -78,7 +75,7 @@
</div>
<% else %>
<div class="pure-u-1-3">
<a href="/toggle_theme?referer=<%= env.get?("current_page") %>" class="pure-menu-heading">
<a id="toggle_theme" href="/toggle_theme?referer=<%= env.get?("current_page") %>" class="pure-menu-heading">
<% if env.get("preferences").as(Preferences).dark_mode %>
<i class="icon ion-ios-sunny"></i>
<% else %>
@ -153,6 +150,17 @@
</div>
<div class="pure-u-1 pure-u-md-2-24"></div>
</div>
<script src="/js/themes.js?v=<%= ASSET_COMMIT %>"></script>
<% if env.get? "user" %>
<script src="/js/sse.js?v=<%= ASSET_COMMIT %>"></script>
<script>
var notification_data = {
upload_text: '<%= HTML.escape(translate(locale, "`x` uploaded a video")) %>',
live_upload_text: '<%= HTML.escape(translate(locale, "`x` is live")) %>',
}
</script>
<script src="/js/notifications.js?v=<%= ASSET_COMMIT %>"></script>
<% end %>
</body>
</html>

View File

@ -22,11 +22,28 @@
<meta name="twitter:player" content="<%= host_url %>/embed/<%= video.id %>">
<meta name="twitter:player:width" content="1280">
<meta name="twitter:player:height" content="720">
<script src="/js/watch.js"></script>
<%= rendered "components/player_sources" %>
<title><%= HTML.escape(video.title) %> - Invidious</title>
<% end %>
<script>
var video_data = {
id: '<%= video.id %>',
plid: '<%= plid %>',
length_seconds: <%= video.info["length_seconds"].to_f %>,
play_next: <%= !rvs.empty? && !plid && params.continue %>,
next_video: '<%= rvs.select { |rv| rv["id"]? }[0]?.try &.["id"] %>',
youtube_comments_text: '<%= HTML.escape(translate(locale, "View YouTube comments")) %>',
reddit_comments_text: '<%= HTML.escape(translate(locale, "View Reddit comments")) %>',
reddit_permalink_text: '<%= HTML.escape(translate(locale, "View more comments on Reddit")) %>',
comments_text: '<%= HTML.escape(translate(locale, "View `x` comments", "{commentCount}")) %>',
hide_replies_text: '<%= HTML.escape(translate(locale, "Hide replies")) %>',
show_replies_text: '<%= HTML.escape(translate(locale, "Show replies")) %>',
params: <%= params.to_json %>,
preferences: <%= preferences.to_json %>
}
</script>
<div id="player-container" class="h-box">
<%= rendered "components/player" %>
</div>
@ -189,8 +206,8 @@
<% if !rvs.empty? %>
<div <% if plid %>style="display:none"<% end %>>
<div class="pure-control-group">
<label for="continue"><%= translate(locale, "Autoplay next video: ") %></label>
<input name="continue" onclick="continue_autoplay(this)" id="continue" type="checkbox" <% if params.continue %>checked<% end %>>
<label for="continue"><%= translate(locale, "Play next by default: ") %></label>
<input name="continue" id="continue" type="checkbox" <% if params.continue %>checked<% end %>>
</div>
<hr>
</div>
@ -225,320 +242,4 @@
</div>
<% end %>
</div>
<script>
<% if !rvs.empty? && !plid && params.continue %>
player.on('ended', function() {
location.assign('/watch?v=' +
'<%= rvs.select { |rv| rv["id"]? }[0]?.try &.["id"] %>' +
'&continue=1' +
<% if params.listen != preferences.listen %>
'&listen=<%= params.listen %>' +
<% end %>
<% if params.autoplay || params.continue_autoplay %>
'&autoplay=1' +
<% end %>
<% if params.speed != preferences.speed %>
'&speed=<%= params.speed %>' +
<% end %>
''
);
});
<% end %>
function continue_autoplay(target) {
if (target.checked) {
player.on('ended', function() {
location.assign('/watch?v=' +
'<%= rvs.select { |rv| rv["id"]? }[0]?.try &.["id"] %>' +
'&continue=1' +
<% if params.listen != preferences.listen %>
'&listen=<%= params.listen %>' +
<% end %>
<% if params.autoplay || params.continue_autoplay %>
'&autoplay=1' +
<% end %>
<% if params.speed != preferences.speed %>
'&speed=<%= params.speed %>' +
<% end %>
''
);
});
} else {
player.off('ended');
}
}
function number_with_separator(val) {
while (/(\d+)(\d{3})/.test(val.toString())) {
val = val.toString().replace(/(\d+)(\d{3})/, "$1" + "," + "$2");
}
return val;
}
<% if plid %>
function get_playlist(plid, timeouts = 0) {
playlist = document.getElementById('playlist');
if (timeouts > 10) {
console.log('Failed to pull playlist');
playlist.innerHTML = '';
return;
}
playlist.innerHTML = ' \
<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3> \
<hr>'
if (plid.startsWith('RD')) {
var plid_url = '/api/v1/mixes/' + plid +
'?continuation=<%= video.id %>' +
'&format=html&hl=<%= env.get("preferences").as(Preferences).locale %>';
} else {
var plid_url = '/api/v1/playlists/' + plid +
'?continuation=<%= video.id %>' +
'&format=html&hl=<%= env.get("preferences").as(Preferences).locale %>';
}
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 20000;
xhr.open('GET', plid_url, true);
xhr.send();
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
playlist.innerHTML = xhr.response.playlistHtml;
if (xhr.response.nextVideo) {
player.on('ended', function() {
location.assign('/watch?v=' + xhr.response.nextVideo +
'&list=' + plid +
<% if params.listen != preferences.listen %>
'&listen=<%= params.listen %>' +
<% end %>
<% if params.autoplay || params.continue_autoplay %>
'&autoplay=1' +
<% end %>
<% if params.speed != preferences.speed %>
'&speed=<%= params.speed %>' +
<% end %>
''
);
});
}
} else {
playlist.innerHTML = '';
document.getElementById('continue').style.display = '';
}
}
};
xhr.ontimeout = function() {
console.log('Pulling playlist timed out.');
playlist = document.getElementById('playlist');
playlist.innerHTML =
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3><hr>';
get_playlist(plid, timeouts + 1);
};
}
get_playlist('<%= plid %>');
<% end %>
function get_reddit_comments(timeouts = 0) {
comments = document.getElementById('comments');
if (timeouts > 10) {
console.log('Failed to pull comments');
comments.innerHTML = '';
return;
}
var fallback = comments.innerHTML;
comments.innerHTML =
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3>';
var url = '/api/v1/comments/<%= video.id %>' +
'?source=reddit&format=html' +
'&hl=<%= env.get("preferences").as(Preferences).locale %>';
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 20000;
xhr.open('GET', url, true);
xhr.send();
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
comments.innerHTML = ' \
<div> \
<h3> \
<a href="javascript:void(0)" onclick="toggle_comments(this)">[ - ]</a> \
{title} \
</h3> \
<p> \
<b> \
<a href="javascript:void(0)" onclick="swap_comments(\'youtube\')"> \
<%= translate(locale, "View YouTube comments") %> \
</a> \
</b> \
</p> \
<b> \
<a rel="noopener" target="_blank" href="https://reddit.com{permalink}"><%= translate(locale, "View more comments on Reddit") %></a> \
</b> \
</div> \
<div>{contentHtml}</div> \
<hr>'.supplant({
title: xhr.response.title,
permalink: xhr.response.permalink,
contentHtml: xhr.response.contentHtml
});
} else {
<% if preferences && preferences.comments[1] == "youtube" %>
get_youtube_comments(timeouts + 1);
<% else %>
comments.innerHTML = fallback;
<% end %>
}
}
};
xhr.ontimeout = function() {
console.log('Pulling comments timed out.');
get_reddit_comments(timeouts + 1);
};
}
function get_youtube_comments(timeouts = 0) {
comments = document.getElementById('comments');
if (timeouts > 10) {
console.log('Failed to pull comments');
comments.innerHTML = '';
return;
}
var fallback = comments.innerHTML;
comments.innerHTML =
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3>';
var url = '/api/v1/comments/<%= video.id %>' +
'?format=html' +
'&hl=<%= env.get("preferences").as(Preferences).locale %>' +
'&thin_mode=<%= env.get("preferences").as(Preferences).thin_mode %>';
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 20000;
xhr.open('GET', url, true);
xhr.send();
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
if (xhr.response.commentCount > 0) {
comments.innerHTML = ' \
<div> \
<h3> \
<a href="javascript:void(0)" onclick="toggle_comments(this)">[ - ]</a> \
<%= translate(locale, "View `x` comments", "{commentCount}") %> \
</h3> \
<b> \
<a href="javascript:void(0)" onclick="swap_comments(\'reddit\')"> \
<%= translate(locale, "View Reddit comments") %> \
</a> \
</b> \
</div> \
<div>{contentHtml}</div> \
<hr>'.supplant({
contentHtml: xhr.response.contentHtml,
commentCount: number_with_separator(xhr.response.commentCount)
});
} else {
comments.innerHTML = "";
}
} else {
<% if preferences && preferences.comments[1] == "youtube" %>
get_youtube_comments(timeouts + 1);
<% else %>
comments.innerHTML = '';
<% end %>
}
}
};
xhr.ontimeout = function() {
console.log('Pulling comments timed out.');
comments.innerHTML =
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3>';
get_youtube_comments(timeouts + 1);
};
}
function get_youtube_replies(target, load_more) {
var continuation = target.getAttribute('data-continuation');
var body = target.parentNode.parentNode;
var fallback = body.innerHTML;
body.innerHTML =
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3>';
var url = '/api/v1/comments/<%= video.id %>' +
'?format=html' +
'&hl=<%= env.get("preferences").as(Preferences).locale %>' +
'&thin_mode=<%= env.get("preferences").as(Preferences).thin_mode %>' +
'&continuation=' + continuation;
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 20000;
xhr.open('GET', url, true);
xhr.send();
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
if (load_more) {
body = body.parentNode.parentNode;
body.removeChild(body.lastElementChild);
body.innerHTML += xhr.response.contentHtml;
} else {
body.innerHTML = ' \
<p><a href="javascript:void(0)" \
onclick="hide_youtube_replies(this, \'<%= translate(locale, "Hide replies") %>\', \'<%= translate(locale, "Show replies") %>\')"><%= translate(locale, "Hide replies") %> \
</a></p> \
<div>{contentHtml}</div>'.supplant({
contentHtml: xhr.response.contentHtml,
});
}
} else {
body.innerHTML = fallback;
}
}
};
xhr.ontimeout = function() {
console.log('Pulling comments timed out.');
body.innerHTML = fallback;
};
}
<% if preferences %>
<% if preferences.comments[0] == "youtube" %>
get_youtube_comments();
<% elsif preferences.comments[0] == "reddit" %>
get_reddit_comments();
<% else %>
<% if preferences.comments[1] == "youtube" %>
get_youtube_comments();
<% elsif preferences.comments[1] == "reddit" %>
get_reddit_comments();
<% else %>
comments = document.getElementById('comments');
comments.innerHTML = '';
<% end %>
<% end %>
<% else %>
get_youtube_comments();
<% end %>
</script>
<script src="/js/watch.js?v=<%= ASSET_COMMIT %>"></script>