Compare commits

..

97 Commits

Author SHA1 Message Date
699f85e773 Fix Google login 2019-02-05 08:49:24 -06:00
f225d38680 Revert updated dependencies 2019-02-04 15:34:53 -06:00
2630dc8dcd Add 'related_videos' to video params 2019-02-04 15:28:51 -06:00
276662a147 Use IO::Memory for creating continuation tokens 2019-02-04 15:17:10 -06:00
ed8a9af355 Add helpers_spec 2019-02-04 12:05:51 -06:00
e6e3d826b9 Update shard.yml 2019-02-04 12:05:31 -06:00
5b3606ad1d Merge pull request #339 from tmiland/contrib
Update README.md
2019-02-04 09:54:01 -06:00
072cc13f14 Merge remote-tracking branch 'upstream/master' into contrib 2019-02-03 16:20:02 +01:00
c1ed660ca0 Proxy creator thumbnail for heart container 2019-02-03 08:45:34 -06:00
2c44051318 Update README.md
Add manual commands to Debian and Ubuntu install instructions.
2019-02-03 12:57:01 +01:00
d0a690c303 Add CORS to API endpoints 2019-02-02 22:48:47 -06:00
87e1fa0a28 Add new text to locales 2019-02-02 19:07:09 -06:00
a1af27b125 Merge pull request #334 from aaferrari/master
Color change in the links and several improvements in the comments
2019-02-02 18:19:33 -06:00
ceaddbc821 Minor fixes in CSS colors 2019-02-02 20:13:40 -03:00
9989c8100a Properly escape email when creating view 2019-02-02 15:27:19 -06:00
c0e73e71c5 Merge branch 'master' of https://github.com/omarroth/invidious 2019-02-01 20:15:34 -03:00
b0ba670c91 Comments now show if they were edited and if they received a heart from the uploader (plus additional classes in default.css). The isEdited attribute was also added in the comments API and new strings in en-US.json 2019-02-01 09:09:10 -03:00
d5c9b7dfe8 Only play after error if already playing 2019-01-31 20:26:11 -06:00
095b5fcea0 Update Russian translation 2019-01-31 22:07:16 +01:00
aeee40c894 Update Basque translation 2019-01-31 22:07:16 +01:00
a7fbcd0aa8 Add Basque translation 2019-01-31 22:07:16 +01:00
c9bc081f8c Respect DEFAULT_USER_PREFERENCES in video params 2019-01-31 15:06:53 -06:00
fbb5df0849 Default to showing recommendations for logged out users 2019-01-31 14:54:02 -06:00
cef061d6fb Fix incorrect default in user preferences 2019-01-31 14:40:26 -06:00
def58ff11f Add interval and timeout for errors in player 2019-01-31 09:09:00 -06:00
9e73e3b153 Add errorcode for invalid video IDs 2019-01-31 08:48:44 -06:00
e9ea365f2f Add additional parameters in the API comments, highlight the user name in the uploader comments and I finished permalink of the comments. 2019-01-31 08:21:26 -03:00
55118a6768 Change color to the links and add a couple of improvements in the comments 2019-01-30 09:28:28 -03:00
1e214aae7c Reload player instead of removing invalid source 2019-01-29 19:55:27 -06:00
ff09a7255a Add handling to remove invalid sources 2019-01-28 22:36:27 -06:00
26b7200360 Respect playback rate when reloading player 2019-01-28 20:47:38 -06:00
b38a2bbd12 Reload player on error 2019-01-28 20:45:08 -06:00
097cbcdae3 Update subscribe button immediately 2019-01-27 22:12:07 -06:00
c0fdc28a84 Fix colors and data-url in download widget 2019-01-27 21:20:52 -06:00
6218078c51 Pull subscribe widget into separate file 2019-01-27 21:06:28 -06:00
a9aae6b36c Add internal redirect for video URLs 2019-01-27 20:36:40 -06:00
96fb2118d5 Merge pull request #324 from dimqua/patch-2
fix broken link
2019-01-27 12:02:19 -06:00
48fc0949cc fix broken link 2019-01-27 20:41:43 +03:00
7d270211ae Merge pull request #322 from Perflyst/readme-remove-extensions
Remove Extensions from README.md
2019-01-27 10:57:01 -06:00
a9f5b84c7f Remove Extensions from README.md 2019-01-27 17:01:03 +01:00
2d20f12335 Merge pull request #319 from dimqua/patch-1
fix file path
2019-01-26 15:40:26 -06:00
45b53b8902 fix file path 2019-01-26 19:12:13 +03:00
898b768b30 Fallback on ucid for channel search when author contains hyphen 2019-01-25 12:26:23 -06:00
06aa1bb90f Merge pull request #315 from EsmailELBoBDev2/master
Fix "Download as: " in ar.json
2019-01-25 11:44:44 -06:00
1f6078cf25 Fix links to invalid genre channels 2019-01-25 11:35:25 -06:00
ba36ab9559 Add 'pretty=1' option to API endpoints 2019-01-25 10:50:18 -06:00
586c0a0579 Add error message for unavailable endpoint /api/v1/insights/:id 2019-01-25 10:38:28 -06:00
209d7117fb Merge branch 'master' into master 2019-01-25 12:48:10 +02:00
3751d11a0b Update ar.json 2019-01-25 12:46:53 +02:00
1af86f6afb Add sleep to popular_videos and top_videos 2019-01-24 20:21:35 -06:00
4c77908bb4 Update postgres entrypoint for docker image 2019-01-24 19:02:09 -06:00
952b208a01 Add retry for /videoplaybacl 2019-01-24 13:53:14 -06:00
40fb29ea2b Merge pull request #313 from Perflyst/fix-install
Fix installation guide, Add Upgrade information, Create and mention documentation
2019-01-24 12:39:42 -06:00
c1081e3df0 Add links to documentation 2019-01-24 19:34:05 +01:00
4b60f7ddff Add logger to method calls 2019-01-24 12:19:02 -06:00
75d8c4f5c0 Use logger instead of STDOUT 2019-01-24 12:16:29 -06:00
16a7fcb79b Update ar.json (#314) 2019-01-24 12:03:19 -06:00
8cd0137aed Merge branch 'master' into master 2019-01-24 11:05:33 +02:00
f455b12085 Update ar.json 2019-01-24 11:03:33 +02:00
1a9057a175 Add fix to download widget for titles with unescaped characters 2019-01-24 00:01:56 -06:00
0fcfb7b82b Add redirect for legacy '/profile' endpoint 2019-01-23 23:12:48 -06:00
30f08ae48c Add missing text to locales 2019-01-23 22:54:04 -06:00
8f1b65de59 Add missing text to en-US.json 2019-01-23 22:45:31 -06:00
d88f9f3b3e Use params for importing dash sources 2019-01-23 19:46:17 -06:00
08e8d0f56f Fix typo in default.css 2019-01-23 19:25:09 -06:00
fb535ad6bb Add download widget 2019-01-23 19:05:24 -06:00
15efac520e Stop trying to pull comments after 10 timeouts 2019-01-23 18:23:31 -06:00
dd5623ffbf Update invidious usage
Thanks @omarroth
2019-01-23 21:40:17 +01:00
7a6a0f364c Run 'crystal tool format' 2019-01-23 14:37:04 -06:00
93297b63b1 Add logfile to systemd service and fix path 2019-01-23 21:31:52 +01:00
e1540390a8 Fix typo in config documentation 2019-01-23 14:30:45 -06:00
71ba071160 Add documentation to config 2019-01-23 14:28:31 -06:00
af449161ff Add -o option for redirecting output 2019-01-23 14:15:19 -06:00
03aa11b412 Rewrite installation guide 2019-01-23 21:12:02 +01:00
5e272db8f5 Delete setup.sh 2019-01-23 20:06:43 +01:00
827e68acf5 Resize player to better fit larger screens 2019-01-23 12:54:19 -06:00
987ea1cb98 Add IRC to README 2019-01-21 15:33:25 -06:00
633ecb524e Add 'fr' to list of supported locales 2019-01-21 15:04:09 -06:00
f19d8f7095 Merge pull request #311 from Perflyst/locale-fr
Add French translation
2019-01-21 14:55:32 -06:00
a20e3cd77e Add French translation 2019-01-21 20:21:42 +01:00
a7b6a67615 Use locale for "Only show latest" text 2019-01-21 11:54:44 -06:00
e7f05d76fa Add Contact and License sections to README 2019-01-21 11:35:10 -06:00
5cb57fb176 Move 'domain' into config.yml 2019-01-20 22:19:14 -06:00
95bde7bb8a Add handling for empty continuation 2019-01-20 10:03:36 -06:00
daa2329f8b Add fix for pulling comments from age-gated videos 2019-01-20 10:03:36 -06:00
b23710f89f Fix comments without startTimeSeconds 2019-01-20 10:03:36 -06:00
277dda0dcb Merge pull request #297 from Perflyst/systemd-service
Add systemd service
2019-01-19 11:30:53 -06:00
cf9134416c Remove unnecessary comment 2019-01-19 10:42:03 -06:00
2425368c3a Bump version 2019-01-19 10:03:23 -06:00
20c4d213d9 Use config.domain in place of hardcoded value 2019-01-19 09:10:52 -06:00
af9134ffb4 Add systemd service information to README.md 2019-01-19 15:08:26 +01:00
f65ddaa0f1 Add invidious.service 2019-01-19 15:04:28 +01:00
9580a21786 added support for vid types in "trending" page (#289)
* Added AR Support For trending Page
2019-01-17 10:17:16 -06:00
dfd17bdd88 Improve error message for 500 and add redirect for 404 2019-01-12 13:18:08 -06:00
0f48d221b4 Fix hlsvp extractor 2019-01-12 12:00:44 -06:00
8f57388cd3 Fix average rating where likes and dislikes are null 2019-01-12 11:56:07 -06:00
0992587da5 Updated wrong word :-) [UPDATE] (#284)
* updated & added new words
2019-01-11 10:18:10 -06:00
38 changed files with 2408 additions and 1213 deletions

136
README.md
View File

@ -32,6 +32,8 @@ Onion links:
- kgg2m7yk5aybusll.onion - kgg2m7yk5aybusll.onion
- axqzx4s6s54s32yentfqojs3x5i7faxza6xo3ehd4bzzsg2ii4fv2iid.onion - axqzx4s6s54s32yentfqojs3x5i7faxza6xo3ehd4bzzsg2ii4fv2iid.onion
[Alternative Invidious instances](https://github.com/omarroth/invidious/wiki/Invidious-Instances)
## Installation ## Installation
### Docker: ### Docker:
@ -57,71 +59,98 @@ $ docker volume rm invidious_postgresdata
$ docker-compose build $ docker-compose build
``` ```
### Arch Linux: ### Linux:
#### Install dependencies
```bash ```bash
# Install dependencies # Arch Linux
$ sudo pacman -S shards crystal imagemagick librsvg $ sudo pacman -S shards crystal imagemagick librsvg postgresql
# Setup PostgresSQL # Ubuntu or Debian
$ sudo systemctl enable postgresql # First you have to add the repository to your APT configuration. For easy setup just run in your command line:
$ sudo systemctl start postgresql
$ sudo -i -u postgres
$ createuser -s YOUR_USER_NAME
$ createdb YOUR_USER_NAME
$ exit
# Setup Invidious
$ git clone https://github.com/omarroth/invidious
$ cd invidious
$ ./setup.sh
$ shards
$ crystal build src/invidious.cr --release
```
### On Ubuntu:
```bash
# Install dependencies
$ curl -sSL https://dist.crystal-lang.org/apt/setup.sh | sudo bash $ curl -sSL https://dist.crystal-lang.org/apt/setup.sh | sudo bash
$ sudo apt update # That will add the signing key and the repository configuration. If you prefer to do it manually, execute the following commands:
$ curl -sL "https://keybase.io/crystal/pgp_keys.asc" | sudo apt-key add -
$ echo "deb https://dist.crystal-lang.org/apt crystal main" | sudo tee /etc/apt/sources.list.d/crystal.list
$ sudo apt-get update
$ sudo apt install crystal libssl-dev libxml2-dev libyaml-dev libgmp-dev libreadline-dev librsvg2-dev postgresql imagemagick libsqlite3-dev $ sudo apt install crystal libssl-dev libxml2-dev libyaml-dev libgmp-dev libreadline-dev librsvg2-dev postgresql imagemagick libsqlite3-dev
```
# Setup PostgreSQL #### Add invidious user and clone repository
```bash
$ useradd -m invidious
$ sudo -i -u invidious
$ git clone https://github.com/omarroth/invidious
$ exit
```
#### Setup PostgresSQL
```bash
$ sudo systemctl enable postgresql $ sudo systemctl enable postgresql
$ sudo systemctl start postgresql $ sudo systemctl start postgresql
$ sudo -i -u postgres $ sudo -i -u postgres
$ createuser -s YOUR_USER_NAME_HERE $ psql -c "CREATE USER kemal WITH PASSWORD 'kemal';"
$ createdb YOUR_USER_NAME_HERE $ createdb -O kemal invidious
$ psql invidious < /home/invidious/invidious/config/sql/channels.sql
$ psql invidious < /home/invidious/invidious/config/sql/videos.sql
$ psql invidious < /home/invidious/invidious/config/sql/channel_videos.sql
$ psql invidious < /home/invidious/invidious/config/sql/users.sql
$ psql invidious < /home/invidious/invidious/config/sql/nonces.sql
$ exit $ exit
# Setup Invidious
$ git clone https://github.com/omarroth/invidious
$ cd invidious
$ ./setup.sh
$ shards
$ crystal build src/invidious.cr --release
``` ```
### On OSX: #### Setup Invidious
```bash
$ sudo -i -u invidious
$ cd invidious
$ shards
$ crystal build src/invidious.cr --release
# test compiled binary
$ ./invidious # stop with ctrl c
$ exit
```
#### systemd service
```bash
$ sudo cp /home/invidious/invidious/invidious.service /etc/systemd/system/invidious.service
$ sudo systemctl enable invidious.service
$ sudo systemctl start invidious.service
```
### OSX:
```bash ```bash
# Install dependencies # Install dependencies
$ brew update $ brew update
$ brew install shards crystal-lang postgres imagemagick librsvg $ brew install shards crystal-lang postgres imagemagick librsvg
# Setup Invidious # Clone repository and setup postgres database
$ git clone https://github.com/omarroth/invidious $ git clone https://github.com/omarroth/invidious
$ cd invidious $ cd invidious
$ ./setup.sh $ brew services start postgresql
$ psql -c "CREATE ROLE kemal WITH LOGIN PASSWORD 'kemal';"
$ createdb invidious -U kemal
$ psql invidious < config/sql/channels.sql
$ psql invidious < config/sql/videos.sql
$ psql invidious < config/sql/channel_videos.sql
$ psql invidious < config/sql/users.sql
$ psql invidious < config/sql/nonces.sql
# Setup Invidious
$ shards $ shards
$ crystal build src/invidious.cr --release $ crystal build src/invidious.cr --release
``` ```
## Update Invidious
You can find information about how to update in the wiki: [Updating](https://github.com/omarroth/invidious/wiki/Updating).
## Usage: ## Usage:
```bash ```bash
$ crystal build src/invidious.cr --release
$ ./invidious -h $ ./invidious -h
Usage: invidious [arguments] Usage: invidious [arguments]
-b HOST, --bind HOST Host to bind (defaults to 0.0.0.0) -b HOST, --bind HOST Host to bind (defaults to 0.0.0.0)
@ -131,13 +160,14 @@ Usage: invidious [arguments]
--ssl-cert-file FILE SSL certificate file --ssl-cert-file FILE SSL certificate file
-h, --help Shows this help -h, --help Shows this help
-t THREADS, --crawl-threads=THREADS -t THREADS, --crawl-threads=THREADS
Number of threads for crawling (default: 1) Number of threads for crawling YouTube (default: 0)
-c THREADS, --channel-threads=THREADS -c THREADS, --channel-threads=THREADS
Number of threads for refreshing channels (default: 1) Number of threads for refreshing channels (default: 1)
-f THREADS, --feed-threads=THREADS -f THREADS, --feed-threads=THREADS
Number of threads for refreshing feeds (default: 1) Number of threads for refreshing feeds (default: 1)
-v THREADS, --video-threads=THREADS -v THREADS, --video-threads=THREADS
Number of threads for refreshing videos (default: 1) Number of threads for refreshing videos (default: 0)
-o OUTPUT, --output=OUTPUT Redirect output (default: STDOUT)
``` ```
Or for development: Or for development:
@ -147,13 +177,11 @@ $ curl -fsSLo- https://raw.githubusercontent.com/samueleaton/sentry/master/insta
$ ./sentry $ ./sentry
``` ```
## Extensions ## Documentation
[Documentation](https://github.com/omarroth/invidious/wiki) can be found in the wiki.
- [Alternate Tube Redirector](https://addons.mozilla.org/en-US/firefox/addon/alternate-tube-redirector/): Automatically open Youtube Videos on alternate sites like Invidious or Hooktube. ## Extensions
- [Invidious Redirect](https://greasyfork.org/en/scripts/370461-invidious-redirect): Redirects Youtube URLs to Invidio.us (userscript) Extensions for Invidious and for integrating Invidious into other projects [are in the wiki](https://github.com/omarroth/invidious/wiki/Extensions)
- [iPhone Redirector Shortcut](https://www.icloud.com/shortcuts/6bbf26d989cf4d07a5fe1626efbc0950): Automatically open YouTube videos in Invidious (iPhone shortcut)
- [Youtube to Invidious](https://greasyfork.org/en/scripts/375264-youtube-to-invidious): Scan page for youtube embeds and urls and replace with Invidious (userscript)
- [Invidious Downloader](https://github.com/erupete/InvidiousDownloader): Tampermonkey userscript for downloading videos or audio on Invidious (userscript)
## Made with Invidious ## Made with Invidious
@ -169,6 +197,18 @@ $ ./sentry
4. Push to the branch (git push origin my-new-feature) 4. Push to the branch (git push origin my-new-feature)
5. Create a new Pull Request 5. Create a new Pull Request
## Contributors ## Contact
- [omarroth](https://github.com/omarroth) - creator, maintainer Feel free to send an email to omarroth@protonmail.com or join our [Matrix Server](https://riot.im/app/#/room/#invidious:matrix.org), or #invidious on Freenode.
You can also view release notes on the [releases](https://github.com/omarroth/invidious/releases) page or in the CHANGELOG.md included in the repository.
## License
[![GNU AGPLv3 Image](https://www.gnu.org/graphics/agplv3-155x51.png)](http://www.gnu.org/licenses/agpl-3.0.en.html)
Invidious is Free Software: You can use, study share and improve it at your
will. Specifically you can redistribute and/or modify it under the terms of the
[GNU Affero General Public License](https://www.gnu.org/licenses/agpl.html) as
published by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

View File

@ -1,3 +1,43 @@
.channel-owner {
background-color: #008BEC;
color: #fff;
border-radius: 9px;
padding: 1px 6px;
}
.creator-heart-container {
display: inline-block;
padding: 0px 7px 6px 0px;
margin: 0px -7px -4px 0px;
}
.creator-heart {
position: relative;
width: 16px;
height: 16px;
border: 2px none;
}
.creator-heart-background-hearted {
width: 16px;
height: 16px;
padding: 0px;
position: relative;
}
.creator-heart-small-hearted {
position: absolute;
right: -7px;
bottom: -4px;
}
.creator-heart-small-container {
position: relative;
width: 13px;
height: 13px;
color: rgb(255, 0, 0);
}
.h-box { .h-box {
padding-left: 1em; padding-left: 1em;
padding-right: 1em; padding-right: 1em;
@ -22,11 +62,13 @@ div {
padding-right: 10px; padding-right: 10px;
} }
a.pure-button-primary { button.pure-button-primary,
a.pure-button-primary, .channel-owner:hover {
background-color: #a0a0a0; background-color: #a0a0a0;
color: rgba(35, 35, 35, 1); color: rgba(35, 35, 35, 1);
} }
button.pure-button-primary:hover,
a.pure-button-primary:hover { a.pure-button-primary:hover {
background-color: rgba(0, 182, 240, 1); background-color: rgba(0, 182, 240, 1);
color: #fff; color: #fff;
@ -262,8 +304,25 @@ img.thumbnail {
#player-container { #player-container {
position: relative; position: relative;
padding-bottom: 56.25%; padding-bottom: 55.25%;
margin-left: 1em; margin-left: 2em;
margin-right: 1em; margin-right: 2em;
height: 0; height: 0;
} }
#progress-container {
width: 100%;
border-radius: 2px;
background-color: #a0a0a0;
color: rgba(35, 35, 35, 1);
}
#download-progress {
width: 0%;
border-radius: 2px;
height: 10px;
background-color: rgba(0, 182, 240, 1);
color: #fff;
margin-top: 0.5em;
margin-bottom: 0.5em;
}

View File

@ -4,6 +4,6 @@ a:active {
} }
a { a {
color: #303030; color: #61809b;
text-decoration: none; text-decoration: none;
} }

View File

@ -50,3 +50,57 @@ function hide_youtube_replies(target) {
target.innerHTML = "Show replies"; target.innerHTML = "Show replies";
target.setAttribute("onclick", "show_youtube_replies(this)"); target.setAttribute("onclick", "show_youtube_replies(this)");
} }
function download_video(target) {
var title = target.getAttribute("data-title");
var children = document.getElementById("download_widget").children;
var progress = document.getElementById("download-progress");
var url = "";
document.getElementById("progress-container").style.display = "";
for (i = 0; i < children.length; i++) {
if (children[i].selected) {
url = children[i].getAttribute("data-url");
}
}
var xhr = new XMLHttpRequest();
xhr.open("GET", url);
xhr.responseType = "arraybuffer";
xhr.onprogress = function(event) {
if (event.lengthComputable) {
progress.style.width = "" + (event.loaded / event.total)*100 + "%";
}
};
xhr.onload = function(event) {
if (event.currentTarget.status != 200) {
console.log("Downloading " + title + " failed.")
document.getElementById("progress-container").style.display = "none";
progress.style.width = "0%";
return;
}
var data = new Blob([xhr.response], {'type' : 'video/mp4'});
var videoFile = window.URL.createObjectURL(data);
var link = document.createElement('a');
link.href = videoFile;
link.setAttribute('download', title);
document.body.appendChild(link);
window.requestAnimationFrame(function() {
var event = new MouseEvent('click');
link.dispatchEvent(event);
document.body.removeChild(link);
});
document.getElementById("progress-container").style.display = "none";
progress.style.width = "0%";
};
xhr.send(null);
}

View File

@ -10,3 +10,4 @@ db:
dbname: invidious dbname: invidious
full_refresh: false full_refresh: false
https_only: false https_only: false
domain: invidio.us

View File

@ -2,7 +2,6 @@ FROM postgres:10
ENV POSTGRES_USER postgres ENV POSTGRES_USER postgres
ADD ./setup.sh /setup.sh
ADD ./config/sql /config/sql ADD ./config/sql /config/sql
ADD ./docker/entrypoint.postgres.sh /entrypoint.sh ADD ./docker/entrypoint.postgres.sh /entrypoint.sh

View File

@ -10,7 +10,14 @@ if [ ! -f /var/lib/postgresql/data/setupFinished ]; then
sleep 5 sleep 5
done done
>&2 echo "### importing table schemas" >&2 echo "### importing table schemas"
su postgres -c "/setup.sh" && touch /var/lib/postgresql/data/setupFinished su postgres -c 'createdb invidious'
su postgres -c 'psql -c "CREATE USER kemal WITH PASSWORD '"'kemal'"'"'
su postgres -c 'psql invidious < config/sql/channels.sql'
su postgres -c 'psql invidious < config/sql/videos.sql'
su postgres -c 'psql invidious < config/sql/channel_videos.sql'
su postgres -c 'psql invidious < config/sql/users.sql'
su postgres -c 'psql invidious < config/sql/nonces.sql'
touch /var/lib/postgresql/data/setupFinished
echo "### invidious database setup finished" echo "### invidious database setup finished"
exit exit
fi fi

19
invidious.service Normal file
View File

@ -0,0 +1,19 @@
[Unit]
Description=Invidious (An alternative YouTube front-end)
After=syslog.target
After=network.target
[Service]
RestartSec=2s
Type=simple
User=invidious
Group=invidious
WorkingDirectory=/home/invidious/invidious
ExecStart=/home/invidious/invidious/invidious -o invidious.log
Restart=always
[Install]
WantedBy=multi-user.target

View File

@ -265,9 +265,20 @@
"`x` minutes": "`x` دقائق", "`x` minutes": "`x` دقائق",
"`x` seconds": "`x` ثوانى", "`x` seconds": "`x` ثوانى",
"Fallback comments: ": "التعليقات المصاحبة", "Fallback comments: ": "التعليقات المصاحبة",
"Popular": "الشائع", "Popular": "لاكثر شعبية",
"Top": "الأفضل", "Top": "الأفضل",
"About": "حول", "About": "حول",
"Rating: ": "التقييم", "Rating: ": "التقييم",
"Language: ": "اللغة" "Language: ": "اللغة",
"Default": "الكل",
"Music": "الاغانى",
"Gaming": "الألعاب",
"News": "الأخبار",
"Movies": "الأفلام",
"Download as: ": "تحميل كـ",
"Download": "تحميل",
"%A %B %-d, %Y": "",
"(edited)": "",
"Youtube permalink of the comment": "",
"`x` marked it with a ❤": ""
} }

View File

@ -1,273 +1,284 @@
{ {
"`x` subscribers": "`x` Abonnenten", "`x` subscribers": "`x` Abonnenten",
"`x` videos": "`x` Videos", "`x` videos": "`x` Videos",
"LIVE": "LIVE", "LIVE": "LIVE",
"Shared `x` ago": "Vor `x` geteilt", "Shared `x` ago": "Vor `x` geteilt",
"Unsubscribe": "Abbestellen", "Unsubscribe": "Abbestellen",
"Subscribe": "Abonnieren", "Subscribe": "Abonnieren",
"Login to subscribe to `x`": "Einloggen um `x` zu abonnieren", "Login to subscribe to `x`": "Einloggen um `x` zu abonnieren",
"View channel on YouTube": "Kanal auf YouTube anzeigen", "View channel on YouTube": "Kanal auf YouTube anzeigen",
"newest": "neueste", "newest": "neueste",
"oldest": "älteste", "oldest": "älteste",
"popular": "beliebt", "popular": "beliebt",
"Preview page": "Vorschau Seite", "Preview page": "Vorschau Seite",
"Next page": "Nächste Seite", "Next page": "Nächste Seite",
"Clear watch history?": "Verlauf löschen?", "Clear watch history?": "Verlauf löschen?",
"Yes": "Ja", "Yes": "Ja",
"No": "Nein", "No": "Nein",
"Import and Export Data": "Import und Export Daten", "Import and Export Data": "Import und Export Daten",
"Import": "Importieren", "Import": "Importieren",
"Import Invidious data": "Invidious Daten importieren", "Import Invidious data": "Invidious Daten importieren",
"Import YouTube subscriptions": "YouTube Abonnements importieren", "Import YouTube subscriptions": "YouTube Abonnements importieren",
"Import FreeTube subscriptions (.db)": "FreeTube Abonnements importieren (.db)", "Import FreeTube subscriptions (.db)": "FreeTube Abonnements importieren (.db)",
"Import NewPipe subscriptions (.json)": "NewPipe Abonnements importieren (.json)", "Import NewPipe subscriptions (.json)": "NewPipe Abonnements importieren (.json)",
"Import NewPipe data (.zip)": "NewPipe Daten importieren (.zip)", "Import NewPipe data (.zip)": "NewPipe Daten importieren (.zip)",
"Export": "Exportieren", "Export": "Exportieren",
"Export subscriptions as OPML": "Abonnements als OPML exportieren", "Export subscriptions as OPML": "Abonnements als OPML exportieren",
"Export subscriptions as OPML (for NewPipe & FreeTube)": "Abonnements als OPML exportieren (für NewPipe & FreeTube)", "Export subscriptions as OPML (for NewPipe & FreeTube)": "Abonnements als OPML exportieren (für NewPipe & FreeTube)",
"Export data as JSON": "Daten als JSON exportieren", "Export data as JSON": "Daten als JSON exportieren",
"Delete account?": "Account löschen?", "Delete account?": "Account löschen?",
"History": "Verlauf", "History": "Verlauf",
"Previous page": "Vorherige Seite", "Previous page": "Vorherige Seite",
"An alternative front-end to YouTube": "Eine alternative Oberfläche für YouTube", "An alternative front-end to YouTube": "Eine alternative Oberfläche für YouTube",
"JavaScript license information": "JavaScript Lizenzinformationen", "JavaScript license information": "JavaScript Lizenzinformationen",
"source": "Quelle", "source": "Quelle",
"Login": "Einloggen", "Login": "Einloggen",
"Login/Register": "Einloggen/Registrieren", "Login/Register": "Einloggen/Registrieren",
"Login to Google": "In Google einloggen", "Login to Google": "In Google einloggen",
"User ID:": "Benutzer ID:", "User ID:": "Benutzer ID:",
"Password:": "Passwort:", "Password:": "Passwort:",
"Time (h:mm:ss):": "Zeit (h:mm:ss):", "Time (h:mm:ss):": "Zeit (h:mm:ss):",
"Text CAPTCHA": "Text CAPTCHA", "Text CAPTCHA": "Text CAPTCHA",
"Image CAPTCHA": "Image CAPTCHA", "Image CAPTCHA": "Image CAPTCHA",
"Sign In": "Einloggen", "Sign In": "Einloggen",
"Register": "Registrieren", "Register": "Registrieren",
"Email:": "Email:", "Email:": "Email:",
"Google verification code:": "Google Bestätigungscode:", "Google verification code:": "Google Bestätigungscode:",
"Preferences": "Einstellungen", "Preferences": "Einstellungen",
"Player preferences": "Playereinstellungen", "Player preferences": "Playereinstellungen",
"Always loop: ": "Immer wiederholen: ", "Always loop: ": "Immer wiederholen: ",
"Autoplay: ": "Automatisch abspielen: ", "Autoplay: ": "Automatisch abspielen: ",
"Autoplay next video: ": "nächstes Video automatisch abspielen: ", "Autoplay next video: ": "nächstes Video automatisch abspielen: ",
"Listen by default: ": "Nur Ton als Standard: ", "Listen by default: ": "Nur Ton als Standard: ",
"Default speed: ": "Standardgeschwindigkeit: ", "Default speed: ": "Standardgeschwindigkeit: ",
"Preferred video quality: ": "Bevorzugte Videoqualität: ", "Preferred video quality: ": "Bevorzugte Videoqualität: ",
"Player volume: ": "Playerlautstärke: ", "Player volume: ": "Playerlautstärke: ",
"Default comments: ": "Standardkommentare: ", "Default comments: ": "Standardkommentare: ",
"youtube": "youtube", "youtube": "youtube",
"reddit": "reddit", "reddit": "reddit",
"Default captions: ": "Standarduntertitel: ", "Default captions: ": "Standarduntertitel: ",
"Fallback captions: ": "Ersatzuntertitel: ", "Fallback captions: ": "Ersatzuntertitel: ",
"Show related videos? ": "Ähnliche Videos anzeigen? ", "Show related videos? ": "Ähnliche Videos anzeigen? ",
"Visual preferences": "Anzeigeeinstellungen", "Visual preferences": "Anzeigeeinstellungen",
"Dark mode: ": "Nachtmodus: ", "Dark mode: ": "Nachtmodus: ",
"Thin mode: ": "Schlanker Modus: ", "Thin mode: ": "Schlanker Modus: ",
"Subscription preferences": "Abonnementeinstellungen", "Subscription preferences": "Abonnementeinstellungen",
"Redirect homepage to feed: ": "Startseite zu Feed umleiten: ", "Redirect homepage to feed: ": "Startseite zu Feed umleiten: ",
"Number of videos shown in feed: ": "Anzahl von Videos die im Feed angezeigt werden: ", "Number of videos shown in feed: ": "Anzahl von Videos die im Feed angezeigt werden: ",
"Sort videos by: ": "Videos sortieren nach: ", "Sort videos by: ": "Videos sortieren nach: ",
"published": "veröffentlicht", "published": "veröffentlicht",
"published - reverse": "veröffentlicht - invertiert", "published - reverse": "veröffentlicht - invertiert",
"alphabetically": "alphabetisch", "alphabetically": "alphabetisch",
"alphabetically - reverse": "alphabetisch - invertiert", "alphabetically - reverse": "alphabetisch - invertiert",
"channel name": "Kanalname", "channel name": "Kanalname",
"channel name - reverse": "Kanalname - invertiert", "channel name - reverse": "Kanalname - invertiert",
"Only show latest video from channel: ": "Nur neueste Videos des Kanals anzeigen: ", "Only show latest video from channel: ": "Nur neueste Videos des Kanals anzeigen: ",
"Only show latest unwatched video from channel: ": "Nur neueste ungesehene Videos des Kanals anzeigen: ", "Only show latest unwatched video from channel: ": "Nur neueste ungesehene Videos des Kanals anzeigen: ",
"Only show unwatched: ": "Nur ungesehene anzeigen: ", "Only show unwatched: ": "Nur ungesehene anzeigen: ",
"Only show notifications (if there are any): ": "Nur Benachrichtigungen anzeigen (wenn es welche gibt): ", "Only show notifications (if there are any): ": "Nur Benachrichtigungen anzeigen (wenn es welche gibt): ",
"Data preferences": "Dateneinstellungen", "Data preferences": "Dateneinstellungen",
"Clear watch history": "Verlauf löschen", "Clear watch history": "Verlauf löschen",
"Import/Export data": "Daten im- exportieren", "Import/Export data": "Daten im- exportieren",
"Manage subscriptions": "Abonnements verwalten", "Manage subscriptions": "Abonnements verwalten",
"Watch history": "Verlauf", "Watch history": "Verlauf",
"Delete account": "Account löschen", "Delete account": "Account löschen",
"Save preferences": "Einstellungen speichern", "Save preferences": "Einstellungen speichern",
"Subscription manager": "Abonnementverwaltung", "Subscription manager": "Abonnementverwaltung",
"`x` subscriptions": "`x` Abonnements", "`x` subscriptions": "`x` Abonnements",
"Import/Export": "Importieren/Exportieren", "Import/Export": "Importieren/Exportieren",
"unsubscribe": "abbestellen", "unsubscribe": "abbestellen",
"Subscriptions": "Abonnements", "Subscriptions": "Abonnements",
"`x` unseen notifications": "`x` ungesehene Benachrichtigungen", "`x` unseen notifications": "`x` ungesehene Benachrichtigungen",
"search": "Suchen", "search": "Suchen",
"Sign out": "Abmelden", "Sign out": "Abmelden",
"Released under the AGPLv3 by Omar Roth.": "Veröffentlicht unter AGPLv3 von Omar Roth.", "Released under the AGPLv3 by Omar Roth.": "Veröffentlicht unter AGPLv3 von Omar Roth.",
"Source available here.": "Quellcode verfügbar hier.", "Source available here.": "Quellcode verfügbar hier.",
"Liberapay: ": "Liberapay: ", "Liberapay: ": "Liberapay: ",
"Patreon: ": "Patreon: ", "Patreon: ": "Patreon: ",
"BTC: ": "BTC: ", "BTC: ": "BTC: ",
"BCH: ": "BCH: ", "BCH: ": "BCH: ",
"View JavaScript license information.": "Javascript Lizenzinformationen anzeigen.", "View JavaScript license information.": "Javascript Lizenzinformationen anzeigen.",
"Trending": "Trending", "Trending": "Trending",
"Watch video on Youtube": "Video auf YouTube ansehen", "Watch video on Youtube": "Video auf YouTube ansehen",
"Genre: ": "Genre: ", "Genre: ": "Genre: ",
"License: ": "Lizenz: ", "License: ": "Lizenz: ",
"Family friendly? ": "Familienfreundlich? ", "Family friendly? ": "Familienfreundlich? ",
"Wilson score: ": "Wilson-Score: ", "Wilson score: ": "Wilson-Score: ",
"Engagement: ": "Engagement: ", "Engagement: ": "Engagement: ",
"Whitelisted regions: ": "Erlaubte Regionen: ", "Whitelisted regions: ": "Erlaubte Regionen: ",
"Blacklisted regions: ": "Unerlaubte Regionen: ", "Blacklisted regions: ": "Unerlaubte Regionen: ",
"Shared `x`": "Geteilt `x`", "Shared `x`": "Geteilt `x`",
"Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.": "Hallo! Anscheinend haben Sie JavaScript deaktiviert. Klicken Sie hier um Kommentare anzuzeigen, beachten sie dass es etwas länger dauern kann um sie zu laden.", "Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.": "Hallo! Anscheinend haben Sie JavaScript deaktiviert. Klicken Sie hier um Kommentare anzuzeigen, beachten sie dass es etwas länger dauern kann um sie zu laden.",
"View YouTube comments": "YouTube Kommentare anzeigen", "View YouTube comments": "YouTube Kommentare anzeigen",
"View more comments on Reddit": "Mehr Kommentare auf Reddit anzeigen", "View more comments on Reddit": "Mehr Kommentare auf Reddit anzeigen",
"View `x` comments": "`x` Kommentare anzeigen", "View `x` comments": "`x` Kommentare anzeigen",
"View Reddit comments": "Reddit Kommentare anzeigen", "View Reddit comments": "Reddit Kommentare anzeigen",
"Hide replies": "Antworten verstecken", "Hide replies": "Antworten verstecken",
"Show replies": "Antworten anzeigen", "Show replies": "Antworten anzeigen",
"Incorrect password": "Falsches Passwort", "Incorrect password": "Falsches Passwort",
"Quota exceeded, try again in a few hours": "Kontingent überschritten, versuche es in ein paar Stunden erneut", "Quota exceeded, try again in a few hours": "Kontingent überschritten, versuche es in ein paar Stunden erneut",
"Unable to login, make sure two-factor authentication (Authenticator or SMS) is enabled.": "Login nicht möglich, stellen Sie sicher dass two-factor Authentifikation (Authentifizierung oder SMS) aktiviert ist.", "Unable to login, make sure two-factor authentication (Authenticator or SMS) is enabled.": "Login nicht möglich, stellen Sie sicher dass two-factor Authentifikation (Authentifizierung oder SMS) aktiviert ist.",
"Invalid TFA code": "Ungültiger TFA Code", "Invalid TFA code": "Ungültiger TFA Code",
"Login failed. This may be because two-factor authentication is not enabled on your account.": "Login fehlgeschlagen. Das kann daran liegen dass two-factor Authentifizierung in ihrem Account nicht aktiviert ist.", "Login failed. This may be because two-factor authentication is not enabled on your account.": "Login fehlgeschlagen. Das kann daran liegen dass two-factor Authentifizierung in ihrem Account nicht aktiviert ist.",
"Invalid answer": "Ungültige Antwort", "Invalid answer": "Ungültige Antwort",
"Invalid CAPTCHA": "Ungültiges CAPTCHA", "Invalid CAPTCHA": "Ungültiges CAPTCHA",
"CAPTCHA is a required field": "CAPTCHA ist eine erforderliche Eingabe", "CAPTCHA is a required field": "CAPTCHA ist eine erforderliche Eingabe",
"User ID is a required field": "Benutzer ID ist eine erforderliche Eingabe", "User ID is a required field": "Benutzer ID ist eine erforderliche Eingabe",
"Password is a required field": "Passwort ist eine erforderliche Eingabe", "Password is a required field": "Passwort ist eine erforderliche Eingabe",
"Invalid username or password": "Ungültiger Benutzername oder Passwort", "Invalid username or password": "Ungültiger Benutzername oder Passwort",
"Please sign in using 'Sign in with Google'": "Bitte melden sie sich mit 'Mit Google anmelden' an", "Please sign in using 'Sign in with Google'": "Bitte melden sie sich mit 'Mit Google anmelden' an",
"Password cannot be empty": "Passwort darf nicht leer sein", "Password cannot be empty": "Passwort darf nicht leer sein",
"Password cannot be longer than 55 characters": "Passwort darf nicht länger als 55 Zeichen sein", "Password cannot be longer than 55 characters": "Passwort darf nicht länger als 55 Zeichen sein",
"Please sign in": "Bitte anmelden", "Please sign in": "Bitte anmelden",
"Invidious Private Feed for `x`": "Invidious Persönlicher Feed für `x`", "Invidious Private Feed for `x`": "Invidious Persönlicher Feed für `x`",
"channel:`x`": "Kanal:`x`", "channel:`x`": "Kanal:`x`",
"Deleted or invalid channel": "Gelöschter oder ungültiger Kanal", "Deleted or invalid channel": "Gelöschter oder ungültiger Kanal",
"This channel does not exist.": "Dieser Kanal existiert nicht.", "This channel does not exist.": "Dieser Kanal existiert nicht.",
"Could not get channel info.": "Kanalinformationen konnten nicht geladen werden.", "Could not get channel info.": "Kanalinformationen konnten nicht geladen werden.",
"Could not fetch comments": "Kommentare konnten nicht geladen werden", "Could not fetch comments": "Kommentare konnten nicht geladen werden",
"View `x` replies": "Zeige `x` Antworten", "View `x` replies": "Zeige `x` Antworten",
"`x` ago": "vor `x`", "`x` ago": "vor `x`",
"Load more": "Mehr laden", "Load more": "Mehr laden",
"`x` points": "`x` Punkte", "`x` points": "`x` Punkte",
"Could not create mix.": "Mix konnte nicht erstellt werden.", "Could not create mix.": "Mix konnte nicht erstellt werden.",
"Playlist is empty": "Playlist ist leer", "Playlist is empty": "Playlist ist leer",
"Invalid playlist.": "Ungültige Playlist.", "Invalid playlist.": "Ungültige Playlist.",
"Playlist does not exist.": "Playlist existiert nicht.", "Playlist does not exist.": "Playlist existiert nicht.",
"Could not pull trending pages.": "Trending Seiten konnten nicht geladen werden.", "Could not pull trending pages.": "Trending Seiten konnten nicht geladen werden.",
"Hidden field \"challenge\" is a required field": "Verstecktes Feld \"challenge\" ist eine erforderliche Eingabe", "Hidden field \"challenge\" is a required field": "Verstecktes Feld \"challenge\" ist eine erforderliche Eingabe",
"Hidden field \"token\" is a required field": "Verstecktes Feld \"token\" ist eine erforderliche Eingabe", "Hidden field \"token\" is a required field": "Verstecktes Feld \"token\" ist eine erforderliche Eingabe",
"Invalid challenge": "Ungültiger Test", "Invalid challenge": "Ungültiger Test",
"Invalid token": "Ungöltige Marke", "Invalid token": "Ungöltige Marke",
"Invalid user": "Ungültiger Benutzer", "Invalid user": "Ungültiger Benutzer",
"Token is expired, please try again": "Marke ist abgelaufen, bitte erneut versuchen", "Token is expired, please try again": "Marke ist abgelaufen, bitte erneut versuchen",
"English": "Englisch", "English": "Englisch",
"English (auto-generated)": "Englisch (automatisch erzeugt)", "English (auto-generated)": "Englisch (automatisch erzeugt)",
"Afrikaans": "Afrikaans", "Afrikaans": "Afrikaans",
"Albanian": "Albanisch", "Albanian": "Albanisch",
"Amharic": "Amharisch", "Amharic": "Amharisch",
"Arabic": "Arabisch", "Arabic": "Arabisch",
"Armenian": "Armenisch", "Armenian": "Armenisch",
"Azerbaijani": "Aserbaidschanisch", "Azerbaijani": "Aserbaidschanisch",
"Bangla": "Bengalisch", "Bangla": "Bengalisch",
"Basque": "Baskisch", "Basque": "Baskisch",
"Belarusian": "Weißrussisch", "Belarusian": "Weißrussisch",
"Bosnian": "Bosnisch", "Bosnian": "Bosnisch",
"Bulgarian": "Bulgarisch", "Bulgarian": "Bulgarisch",
"Burmese": "Burmesisch", "Burmese": "Burmesisch",
"Catalan": "Katalanisch", "Catalan": "Katalanisch",
"Cebuano": "Cebuano", "Cebuano": "Cebuano",
"Chinese (Simplified)": "Chinesisch (vereinfacht)", "Chinese (Simplified)": "Chinesisch (vereinfacht)",
"Chinese (Traditional)": "Chinesisch (traditionell)", "Chinese (Traditional)": "Chinesisch (traditionell)",
"Corsican": "Korsisch", "Corsican": "Korsisch",
"Croatian": "Kroatisch", "Croatian": "Kroatisch",
"Czech": "Tschechisch", "Czech": "Tschechisch",
"Danish": "Dänisch", "Danish": "Dänisch",
"Dutch": "Niederländisch", "Dutch": "Niederländisch",
"Esperanto": "Esperanto", "Esperanto": "Esperanto",
"Estonian": "Estnisch", "Estonian": "Estnisch",
"Filipino": "Philippinisch", "Filipino": "Philippinisch",
"Finnish": "Finnisch", "Finnish": "Finnisch",
"French": "Französisch", "French": "Französisch",
"Galician": "Galizisch", "Galician": "Galizisch",
"Georgian": "Georgisch", "Georgian": "Georgisch",
"German": "Deutsch", "German": "Deutsch",
"Greek": "Griechisch", "Greek": "Griechisch",
"Gujarati": "Gujarati", "Gujarati": "Gujarati",
"Haitian Creole": "Haitianisches Kreolisch", "Haitian Creole": "Haitianisches Kreolisch",
"Hausa": "Hausa", "Hausa": "Hausa",
"Hawaiian": "Hawaiianisch", "Hawaiian": "Hawaiianisch",
"Hebrew": "Hebräisch", "Hebrew": "Hebräisch",
"Hindi": "Hindi", "Hindi": "Hindi",
"Hmong": "Hmong", "Hmong": "Hmong",
"Hungarian": "Ungarisch", "Hungarian": "Ungarisch",
"Icelandic": "Isländisch", "Icelandic": "Isländisch",
"Igbo": "Igbo", "Igbo": "Igbo",
"Indonesian": "Indonesisch", "Indonesian": "Indonesisch",
"Irish": "Irisch", "Irish": "Irisch",
"Italian": "Italienisch", "Italian": "Italienisch",
"Japanese": "Japanisch", "Japanese": "Japanisch",
"Javanese": "Javanisch", "Javanese": "Javanisch",
"Kannada": "Kannada", "Kannada": "Kannada",
"Kazakh": "Kasachisch", "Kazakh": "Kasachisch",
"Khmer": "Khmer", "Khmer": "Khmer",
"Korean": "Koreanisch", "Korean": "Koreanisch",
"Kurdish": "Kurdisch", "Kurdish": "Kurdisch",
"Kyrgyz": "Kirgisisch", "Kyrgyz": "Kirgisisch",
"Lao": "Laotisch", "Lao": "Laotisch",
"Latin": "Lateinisch", "Latin": "Lateinisch",
"Latvian": "Lettisch", "Latvian": "Lettisch",
"Lithuanian": "Litauisch", "Lithuanian": "Litauisch",
"Luxembourgish": "Luxemburgisch", "Luxembourgish": "Luxemburgisch",
"Macedonian": "Mazedonisch", "Macedonian": "Mazedonisch",
"Malagasy": "Madagassisch", "Malagasy": "Madagassisch",
"Malay": "Malaiisch", "Malay": "Malaiisch",
"Malayalam": "Malayalam", "Malayalam": "Malayalam",
"Maltese": "Maltesisch", "Maltese": "Maltesisch",
"Maori": "Maori", "Maori": "Maori",
"Marathi": "Marathi", "Marathi": "Marathi",
"Mongolian": "Mongolisch", "Mongolian": "Mongolisch",
"Nepali": "Nepalesisch", "Nepali": "Nepalesisch",
"Norwegian": "Norwegisch", "Norwegian": "Norwegisch",
"Nyanja": "Nyanja", "Nyanja": "Nyanja",
"Pashto": "Paschtunisch", "Pashto": "Paschtunisch",
"Persian": "Persisch", "Persian": "Persisch",
"Polish": "Polnisch", "Polish": "Polnisch",
"Portuguese": "Portugiesisch", "Portuguese": "Portugiesisch",
"Punjabi": "Pandschabi", "Punjabi": "Pandschabi",
"Romanian": "Rumänisch", "Romanian": "Rumänisch",
"Russian": "Russisch", "Russian": "Russisch",
"Samoan": "Samoanisch", "Samoan": "Samoanisch",
"Scottish Gaelic": "Schottisches Gälisch", "Scottish Gaelic": "Schottisches Gälisch",
"Serbian": "Serbisch", "Serbian": "Serbisch",
"Shona": "Schona", "Shona": "Schona",
"Sindhi": "Sindhi", "Sindhi": "Sindhi",
"Sinhala": "Singhalesisch", "Sinhala": "Singhalesisch",
"Slovak": "Slowakisch", "Slovak": "Slowakisch",
"Slovenian": "Slowenisch", "Slovenian": "Slowenisch",
"Somali": "Somali", "Somali": "Somali",
"Southern Sotho": "Südliches Sotho", "Southern Sotho": "Südliches Sotho",
"Spanish": "Spanisch", "Spanish": "Spanisch",
"Spanish (Latin America)": "Spanisch (Lateinamerika)", "Spanish (Latin America)": "Spanisch (Lateinamerika)",
"Sundanese": "Sundanesisch", "Sundanese": "Sundanesisch",
"Swahili": "Suaheli", "Swahili": "Suaheli",
"Swedish": "Schwedisch", "Swedish": "Schwedisch",
"Tajik": "Tadschikisch", "Tajik": "Tadschikisch",
"Tamil": "Tamilisch", "Tamil": "Tamilisch",
"Telugu": "Telugu", "Telugu": "Telugu",
"Thai": "Thailändisch", "Thai": "Thailändisch",
"Turkish": "Türkisch", "Turkish": "Türkisch",
"Ukrainian": "Ukrainisch", "Ukrainian": "Ukrainisch",
"Urdu": "Urdu", "Urdu": "Urdu",
"Uzbek": "Usbekisch", "Uzbek": "Usbekisch",
"Vietnamese": "Vietnamesisch", "Vietnamese": "Vietnamesisch",
"Welsh": "Walisisch", "Welsh": "Walisisch",
"Western Frisian": "Westfriesisch", "Western Frisian": "Westfriesisch",
"Xhosa": "Xhosa", "Xhosa": "Xhosa",
"Yiddish": "Jiddisch", "Yiddish": "Jiddisch",
"Yoruba": "Joruba", "Yoruba": "Joruba",
"Zulu": "Zulu", "Zulu": "Zulu",
"`x` years": "`x` Jahre", "`x` years": "`x` Jahre",
"`x` months": "`x` Monate", "`x` months": "`x` Monate",
"`x` weeks": "`x` Wochen", "`x` weeks": "`x` Wochen",
"`x` days": "`x` Tage", "`x` days": "`x` Tage",
"`x` hours": "`x` Stunden", "`x` hours": "`x` Stunden",
"`x` minutes": "`x` Minuten", "`x` minutes": "`x` Minuten",
"`x` seconds": "`x` Sekunden", "`x` seconds": "`x` Sekunden",
"Fallback comments: ": "", "Fallback comments: ": "",
"Popular": "Populär", "Popular": "Populär",
"Top": "", "Top": "",
"About": "Über", "About": "Über",
"Rating: ": "Bewertung: ", "Rating: ": "Bewertung: ",
"Language: ": "Sprache: " "Language: ": "Sprache: ",
"Default": "",
"Music": "",
"Gaming": "",
"News": "",
"Movies": "",
"Download": "",
"Download as: ": "",
"%A %B %-d, %Y": "",
"(edited)": "",
"Youtube permalink of the comment": "",
"`x` marked it with a ❤": ""
} }

View File

@ -263,5 +263,16 @@
"Top": "Top", "Top": "Top",
"About": "About", "About": "About",
"Rating: ": "Rating: ", "Rating: ": "Rating: ",
"Language: ": "Language: " "Language: ": "Language: ",
"Default": "Default",
"Music": "Music",
"Gaming": "Gaming",
"News": "News",
"Movies": "Movies",
"Download": "Download",
"Download as: ": "Download as: ",
"%A %B %-d, %Y": "%A %B %-d, %Y",
"(edited)": "(edited)",
"Youtube permalink of the comment": "Youtube permalink of the comment",
"`x` marked it with a ❤": "`x` marked it with a ❤"
} }

278
locales/eu.json Normal file
View File

@ -0,0 +1,278 @@
{
"`x` subscribers": "",
"`x` videos": "",
"LIVE": "",
"Shared `x` ago": "",
"Unsubscribe": "",
"Subscribe": "Harpidetu",
"Login to subscribe to `x`": "",
"View channel on YouTube": "Ikusi kanala YouTuben",
"newest": "berrienak",
"oldest": "zaharrenak",
"popular": "ospetsuenak",
"Preview page": "Aurrebista orria",
"Next page": "Hurrengo orria",
"Clear watch history?": "Garbitu ikusitakoen historia?",
"Yes": "Bai",
"No": "Ez",
"Import and Export Data": "Datuak inportatu eta esportatu",
"Import": "Inportatu",
"Import Invidious data": "Invidiouseko datuak inportatu",
"Import YouTube subscriptions": "YouTubeko harpidetzak inportatu",
"Import FreeTube subscriptions (.db)": "FreeTubeko harpidetzak inportatu (.db)",
"Import NewPipe subscriptions (.json)": "NewPipeko harpidetzak inportatu (.json)",
"Import NewPipe data (.zip)": "NewPipeko datuak inportatu (.zip)",
"Export": "Esportatu",
"Export subscriptions as OPML": "Esportatu harpidetzak OPML bezala",
"Export subscriptions as OPML (for NewPipe & FreeTube)": "",
"Export data as JSON": "",
"Delete account?": "Kontua ezabatu?",
"History": "Historia",
"Previous page": "Aurreko orria",
"An alternative front-end to YouTube": "",
"JavaScript license information": "",
"source": "",
"Login": "",
"Login/Register": "",
"Login to Google": "",
"User ID:": "",
"Password:": "",
"Time (h:mm:ss):": "",
"Text CAPTCHA": "",
"Image CAPTCHA": "",
"Sign In": "",
"Register": "",
"Email:": "",
"Google verification code:": "",
"Preferences": "",
"Player preferences": "",
"Always loop: ": "",
"Autoplay: ": "",
"Autoplay next video: ": "",
"Listen by default: ": "",
"Default speed: ": "",
"Preferred video quality: ": "",
"Player volume: ": "",
"Default comments: ": "",
"Default captions: ": "",
"Fallback captions: ": "",
"Show related videos? ": "",
"Visual preferences": "",
"Dark mode: ": "",
"Thin mode: ": "",
"Subscription preferences": "",
"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): ": "",
"Data preferences": "",
"Clear watch history": "",
"Import/Export data": "",
"Manage subscriptions": "",
"Watch history": "",
"Delete account": "",
"Save preferences": "",
"Subscription manager": "",
"`x` subscriptions": "",
"Import/Export": "",
"unsubscribe": "",
"Subscriptions": "",
"`x` unseen notifications": "",
"search": "",
"Sign out": "",
"Released under the AGPLv3 by Omar Roth.": "",
"Source available here.": "",
"View JavaScript license information.": "",
"Trending": "",
"Watch video on Youtube": "",
"Genre: ": "",
"License: ": "",
"Family friendly? ": "",
"Wilson score: ": "",
"Engagement: ": "",
"Whitelisted regions: ": "",
"Blacklisted regions: ": "",
"Shared `x`": "",
"Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.": "",
"View YouTube comments": "",
"View more comments on Reddit": "",
"View `x` comments": "",
"View Reddit comments": "",
"Hide replies": "",
"Show replies": "",
"Incorrect password": "",
"Quota exceeded, try again in a few hours": "",
"Unable to login, make sure two-factor authentication (Authenticator or SMS) is enabled.": "",
"Invalid TFA code": "",
"Login failed. This may be because two-factor authentication is not enabled on your account.": "",
"Invalid answer": "",
"Invalid CAPTCHA": "",
"CAPTCHA is a required field": "",
"User ID is a required field": "",
"Password is a required field": "",
"Invalid username or password": "",
"Please sign in using 'Sign in with Google'": "",
"Password cannot be empty": "",
"Password cannot be longer than 55 characters": "",
"Please sign in": "",
"Invidious Private Feed for `x`": "",
"channel:`x`": "",
"Deleted or invalid channel": "",
"This channel does not exist.": "",
"Could not get channel info.": "",
"Could not fetch comments": "",
"View `x` replies": "",
"`x` ago": "",
"Load more": "",
"`x` points": "",
"Could not create mix.": "",
"Playlist is empty": "",
"Invalid playlist.": "",
"Playlist does not exist.": "",
"Could not pull trending pages.": "",
"Hidden field \"challenge\" is a required field": "",
"Hidden field \"token\" is a required field": "",
"Invalid challenge": "",
"Invalid token": "",
"Invalid user": "",
"Token is expired, please try again": "",
"English": "",
"English (auto-generated)": "",
"Afrikaans": "",
"Albanian": "",
"Amharic": "",
"Arabic": "",
"Armenian": "",
"Azerbaijani": "",
"Bangla": "",
"Basque": "",
"Belarusian": "",
"Bosnian": "",
"Bulgarian": "",
"Burmese": "",
"Catalan": "",
"Cebuano": "",
"Chinese (Simplified)": "",
"Chinese (Traditional)": "",
"Corsican": "",
"Croatian": "",
"Czech": "",
"Danish": "",
"Dutch": "",
"Esperanto": "",
"Estonian": "",
"Filipino": "",
"Finnish": "",
"French": "",
"Galician": "",
"Georgian": "",
"German": "",
"Greek": "",
"Gujarati": "",
"Haitian Creole": "",
"Hausa": "",
"Hawaiian": "",
"Hebrew": "",
"Hindi": "",
"Hmong": "",
"Hungarian": "",
"Icelandic": "",
"Igbo": "",
"Indonesian": "",
"Irish": "",
"Italian": "",
"Japanese": "",
"Javanese": "",
"Kannada": "",
"Kazakh": "",
"Khmer": "",
"Korean": "",
"Kurdish": "",
"Kyrgyz": "",
"Lao": "",
"Latin": "",
"Latvian": "",
"Lithuanian": "",
"Luxembourgish": "",
"Macedonian": "",
"Malagasy": "",
"Malay": "",
"Malayalam": "",
"Maltese": "",
"Maori": "",
"Marathi": "",
"Mongolian": "",
"Nepali": "",
"Norwegian": "",
"Nyanja": "",
"Pashto": "",
"Persian": "",
"Polish": "",
"Portuguese": "",
"Punjabi": "",
"Romanian": "",
"Russian": "",
"Samoan": "",
"Scottish Gaelic": "",
"Serbian": "",
"Shona": "",
"Sindhi": "",
"Sinhala": "",
"Slovak": "",
"Slovenian": "",
"Somali": "",
"Southern Sotho": "",
"Spanish": "",
"Spanish (Latin America)": "",
"Sundanese": "",
"Swahili": "",
"Swedish": "",
"Tajik": "",
"Tamil": "",
"Telugu": "",
"Thai": "",
"Turkish": "",
"Ukrainian": "",
"Urdu": "",
"Uzbek": "",
"Vietnamese": "",
"Welsh": "",
"Western Frisian": "",
"Xhosa": "",
"Yiddish": "",
"Yoruba": "",
"Zulu": "",
"`x` years": "",
"`x` months": "",
"`x` weeks": "",
"`x` days": "",
"`x` hours": "",
"`x` minutes": "",
"`x` seconds": "",
"Fallback comments: ": "",
"Popular": "",
"Top": "",
"About": "",
"Rating: ": "",
"Language: ": "",
"Default": "",
"Music": "",
"Gaming": "",
"News": "",
"Movies": "",
"Download": "",
"Download as: ": "",
"%A %B %-d, %Y": "",
"(edited)": "",
"Youtube permalink of the comment": "",
"`x` marked it with a ❤": ""
}

278
locales/fr.json Normal file
View File

@ -0,0 +1,278 @@
{
"`x` subscribers": "`x` souscripteurs",
"`x` videos": "`x` vidéos",
"LIVE": "LIVE",
"Shared `x` ago": "Partagé il y a `x`",
"Unsubscribe": "Se désabonner",
"Subscribe": "S'abonner",
"Login to subscribe to `x`": "Se connecter pour s'abonner à `x`",
"View channel on YouTube": "Voir la chaîne sur YouTube",
"newest": "récent",
"oldest": "aînée",
"popular": "appréciés",
"Preview page": "Page de prévisualisation",
"Next page": "Page suivante",
"Clear watch history?": "L'histoire de la montre est claire?",
"Yes": "Oui",
"No": "Aucun",
"Import and Export Data": "Importation et exportation de données",
"Import": "Importation",
"Import Invidious data": "Importation de données invalides",
"Import YouTube subscriptions": "Importer des abonnements YouTube",
"Import FreeTube subscriptions (.db)": "Importer des abonnements FreeTube (.db)",
"Import NewPipe subscriptions (.json)": "Importer des abonnements NewPipe (.json)",
"Import NewPipe data (.zip)": "Importer des données NewPipe (.zip)",
"Export": "Exporter",
"Export subscriptions as OPML": "Exporter les abonnements comme OPML",
"Export subscriptions as OPML (for NewPipe & FreeTube)": "Exporter les abonnements comme OPML (pour NewPipe & FreeTube)",
"Export data as JSON": "Exporter les données au format JSON",
"Delete account?": "Supprimer un compte ?",
"History": "Histoire",
"Previous page": "Page précédente",
"An alternative front-end to YouTube": "Un frontal alternatif à YouTube",
"JavaScript license information": "Informations sur la licence JavaScript",
"source": "origine",
"Login": "Connexion",
"Login/Register": "Connexion/S'inscrire",
"Login to Google": "Se connecter à Google",
"User ID:": "ID utilisateur:",
"Password:": "Mot de passe:",
"Time (h:mm:ss):": "Temps (h:mm:ss):",
"Text CAPTCHA": "Texte CAPTCHA",
"Image CAPTCHA": "Image CAPTCHA",
"Sign In": "S'identifier",
"Register": "S'inscrire",
"Email:": "Courriel:",
"Google verification code:": "Code de vérification Google:",
"Preferences": "Préférences",
"Player preferences": "Joueur préférences",
"Always loop: ": "Toujours en boucle: ",
"Autoplay: ": "Autoplay: ",
"Autoplay next video: ": "Lecture automatique de la vidéo suivante: ",
"Listen by default: ": "Écouter par défaut: ",
"Default speed: ": "Vitesse par défaut: ",
"Preferred video quality: ": "Qualité vidéo préférée: ",
"Player volume: ": "Volume de lecteur: ",
"Default comments: ": "Commentaires par défaut: ",
"Default captions: ": "Légendes par défaut: ",
"Fallback captions: ": "Légendes de repli: ",
"Show related videos? ": "Voir les vidéos liées à ce sujet? ",
"Visual preferences": "Préférences visuelles",
"Dark mode: ": "Mode sombre: ",
"Thin mode: ": "Mode Thin: ",
"Subscription preferences": "Préférences d'abonnement",
"Redirect homepage to feed: ": "Rediriger la page d'accueil vers le flux: ",
"Number of videos shown in feed: ": "Nombre de vidéos montrées dans le flux: ",
"Sort videos by: ": "Trier les vidéos par: ",
"published": "publié",
"published - reverse": "publié - reverse",
"alphabetically": "alphabétiquement",
"alphabetically - reverse": "alphabétiquement - contraire",
"channel name": "nom du canal",
"channel name - reverse": "nom du canal - contraire",
"Only show latest video from channel: ": "Afficher uniquement les dernières vidéos de la chaîne: ",
"Only show latest unwatched video from channel: ": "Afficher uniquement les dernières vidéos non regardées de la chaîne: ",
"Only show unwatched: ": "Afficher uniquement les images non surveillées: ",
"Only show notifications (if there are any): ": "Afficher uniquement les notifications (s'il y en a): ",
"Data preferences": "Préférences de données",
"Clear watch history": "Historique clair de la montre",
"Import/Export data": "Données d'importation/exportation",
"Manage subscriptions": "Gérer les abonnements",
"Watch history": "Historique des montres",
"Delete account": "Supprimer un compte",
"Save preferences": "Enregistrer les préférences",
"Subscription manager": "Gestionnaire d'abonnement",
"`x` subscriptions": "`x` abonnements",
"Import/Export": "Importer/Exporter",
"unsubscribe": "se désabonner",
"Subscriptions": "Abonnements",
"`x` unseen notifications": "`x` notifications invisibles",
"search": "perquisition",
"Sign out": "Déconnexion",
"Released under the AGPLv3 by Omar Roth.": "Publié sous l'AGPLv3 par Omar Roth.",
"Source available here.": "Source disponible ici.",
"View JavaScript license information.": "Voir les informations de licence JavaScript.",
"Trending": "Tendances",
"Watch video on Youtube": "Voir la vidéo sur Youtube",
"Genre: ": "Genre: ",
"License: ": "Licence: ",
"Family friendly? ": "Convivialité familiale? ",
"Wilson score: ": "Wilson marque: ",
"Engagement: ": "Fiançailles: ",
"Whitelisted regions: ": "Régions en liste blanche: ",
"Blacklisted regions: ": "Régions sur liste noire: ",
"Shared `x`": "Partagée `x`",
"Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.": "Hi! On dirait que vous avez désactivé JavaScript. Cliquez ici pour voir les commentaires, gardez à l'esprit que le chargement peut prendre un peu plus de temps.",
"View YouTube comments": "Voir les commentaires sur YouTube",
"View more comments on Reddit": "Voir plus de commentaires sur Reddit",
"View `x` comments": "Voir `x` commentaires",
"View Reddit comments": "Voir Reddit commentaires",
"Hide replies": "Masquer les réponses",
"Show replies": "Afficher les réponses",
"Incorrect password": "Mot de passe incorrect",
"Quota exceeded, try again in a few hours": "Quota dépassé, réessayez dans quelques heures",
"Unable to login, make sure two-factor authentication (Authenticator or SMS) is enabled.": "Si vous ne parvenez pas à vous connecter, assurez-vous que l'authentification à deux facteurs (Authenticator ou SMS) est activée.",
"Invalid TFA code": "Code TFA invalide",
"Login failed. This may be because two-factor authentication is not enabled on your account.": "La connexion a échoué. Cela peut être dû au fait que l'authentification à deux facteurs n'est pas activée sur votre compte.",
"Invalid answer": "Réponse non valide",
"Invalid CAPTCHA": "CAPTCHA invalide",
"CAPTCHA is a required field": "CAPTCHA est un champ obligatoire",
"User ID is a required field": "Utilisateur ID est un champ obligatoire",
"Password is a required field": "Mot de passe est un champ obligatoire",
"Invalid username or password": "Nom d'utilisateur ou mot de passe invalide",
"Please sign in using 'Sign in with Google'": "Veuillez vous connecter en utilisant 'S'identifier avec Google'",
"Password cannot be empty": "Le mot de passe ne peut pas être vide",
"Password cannot be longer than 55 characters": "Le mot de passe ne doit pas comporter plus de 55 caractères.",
"Please sign in": "Veuillez ouvrir une session",
"Invidious Private Feed for `x`": "Flux privé Invidious pour `x`",
"channel:`x`": "chenal:`x`",
"Deleted or invalid channel": "Canal supprimé ou non valide",
"This channel does not exist.": "Ce canal n'existe pas.",
"Could not get channel info.": "Impossible d'obtenir des informations sur les chaînes.",
"Could not fetch comments": "Impossible d'aller chercher les commentaires",
"View `x` replies": "Voir `x` réponses",
"`x` ago": "il y a `x`",
"Load more": "Charger plus",
"`x` points": "`x` points",
"Could not create mix.": "Impossible de créer du mixage.",
"Playlist is empty": "La liste de lecture est vide",
"Invalid playlist.": "Liste de lecture invalide.",
"Playlist does not exist.": "La liste de lecture n'existe pas.",
"Could not pull trending pages.": "Impossible de tirer les pages de tendances.",
"Hidden field \"challenge\" is a required field": "Champ caché \"contestation\" est un champ obligatoire",
"Hidden field \"token\" is a required field": "Champ caché \"jeton\" est un champ obligatoire",
"Invalid challenge": "Contestation non valide",
"Invalid token": "Jeton non valide",
"Invalid user": "Iutilisateur non valide",
"Token is expired, please try again": "Le jeton est expiré, veuillez réessayer",
"English": "Anglais",
"English (auto-generated)": "Anglais (auto-généré)",
"Afrikaans": "Afrikaans",
"Albanian": "Albanais",
"Amharic": "Amharique",
"Arabic": "Arabe",
"Armenian": "Arménien",
"Azerbaijani": "Azerbaïdjanais",
"Bangla": "Bangla",
"Basque": "Basque",
"Belarusian": "Belarusian",
"Bosnian": "Bosnian",
"Bulgarian": "Bulgarian",
"Burmese": "Birman",
"Catalan": "Catalan",
"Cebuano": "Cebuano",
"Chinese (Simplified)": "Chinois (Simplifié)",
"Chinese (Traditional)": "Chinois (Traditionnel)",
"Corsican": "Corse",
"Croatian": "Croate",
"Czech": "Tchèque",
"Danish": "Danois",
"Dutch": "Hollandais",
"Esperanto": "Espéranto",
"Estonian": "Estonien",
"Filipino": "Philippin",
"Finnish": "Finlandais",
"French": "Français",
"Galician": "Galicien",
"Georgian": "Géorgien",
"German": "Allemand",
"Greek": "Grec",
"Gujarati": "Gujarati",
"Haitian Creole": "Créole Haïtien",
"Hausa": "Haoussa",
"Hawaiian": "Hawaïen",
"Hebrew": "Hébraïque",
"Hindi": "Hindi",
"Hmong": "Hmong",
"Hungarian": "Hongrois",
"Icelandic": "Islandais",
"Igbo": "Igbo",
"Indonesian": "Indonésien",
"Irish": "Irlandais",
"Italian": "Italien",
"Japanese": "Japonais",
"Javanese": "Javanais",
"Kannada": "Kannada",
"Kazakh": "Kazakh",
"Khmer": "Khmer",
"Korean": "Coréen",
"Kurdish": "Kurde",
"Kyrgyz": "Kirghize",
"Lao": "Lao",
"Latin": "Latin",
"Latvian": "Letton",
"Lithuanian": "Lituanien",
"Luxembourgish": "Luxembourgeois",
"Macedonian": "Macédonien",
"Malagasy": "Malgache",
"Malay": "Malais",
"Malayalam": "Malayalam",
"Maltese": "Maltais",
"Maori": "Maori",
"Marathi": "Marathi",
"Mongolian": "Mongol",
"Nepali": "Népalais",
"Norwegian": "Norvégien",
"Nyanja": "Nyanja",
"Pashto": "Pachtou",
"Persian": "Persan",
"Polish": "Polonais",
"Portuguese": "Portugais",
"Punjabi": "Punjabi",
"Romanian": "Roumain",
"Russian": "Russe",
"Samoan": "Samoan",
"Scottish Gaelic": "Eaélique Ècossais",
"Serbian": "Serbe",
"Shona": "Shona",
"Sindhi": "Sindhi",
"Sinhala": "Cinghalais",
"Slovak": "Slovaque",
"Slovenian": "Slovène",
"Somali": "Somalien",
"Southern Sotho": "Sotho du Sud",
"Spanish": "Espagnol",
"Spanish (Latin America)": "Espagnol (Amérique latine)",
"Sundanese": "Sundanais",
"Swahili": "Swahili",
"Swedish": "Suédois",
"Tajik": "Tajik",
"Tamil": "Tamil",
"Telugu": "Telugu",
"Thai": "Thaï",
"Turkish": "Turc",
"Ukrainian": "Ukrainien",
"Urdu": "Ourdou",
"Uzbek": "Ouzbek",
"Vietnamese": "Vietnamien",
"Welsh": "Gallois",
"Western Frisian": "Frison occidental",
"Xhosa": "Xhosa",
"Yiddish": "Yiddish",
"Yoruba": "Yoruba",
"Zulu": "Zoulou",
"`x` years": "`x` ans",
"`x` months": "`x` mois",
"`x` weeks": "`x` semaines",
"`x` days": "`x` jours",
"`x` hours": "`x` heures",
"`x` minutes": "`x` minutes",
"`x` seconds": "`x` secondes",
"Fallback comments: ": "Commentaires de repli: ",
"Popular": "Populaire",
"Top": "Haut",
"About": "Sur",
"Rating: ": "Évaluation: ",
"Language: ": "Langue: ",
"Default": "",
"Music": "",
"Gaming": "",
"News": "",
"Movies": "",
"Download": "",
"Download as: ": "",
"%A %B %-d, %Y": "",
"(edited)": "",
"Youtube permalink of the comment": "",
"`x` marked it with a ❤": ""
}

View File

@ -1,267 +1,278 @@
{ {
"`x` subscribers": "`x` abonnenter", "`x` subscribers": "`x` abonnenter",
"`x` videos": "`x` videoer", "`x` videos": "`x` videoer",
"LIVE": "SANNTIDSVISNING", "LIVE": "SANNTIDSVISNING",
"Shared `x` ago": "Delt for `x` siden", "Shared `x` ago": "Delt for `x` siden",
"Unsubscribe": "Opphev abonnement", "Unsubscribe": "Opphev abonnement",
"Subscribe": "Abonner", "Subscribe": "Abonner",
"Login to subscribe to `x`": "Logg inn for å abonnere på `x`", "Login to subscribe to `x`": "Logg inn for å abonnere på `x`",
"View channel on YouTube": "Vis kanal på YouTube", "View channel on YouTube": "Vis kanal på YouTube",
"newest": "nyeste", "newest": "nyeste",
"oldest": "eldste", "oldest": "eldste",
"popular": "populært", "popular": "populært",
"Preview page": "Forhåndsvis side", "Preview page": "Forhåndsvis side",
"Next page": "Neste side", "Next page": "Neste side",
"Clear watch history?": "Tøm visningshistorikk?", "Clear watch history?": "Tøm visningshistorikk?",
"Yes": "Ja", "Yes": "Ja",
"No": "Nei", "No": "Nei",
"Import and Export Data": "Importer- og eksporter data", "Import and Export Data": "Importer- og eksporter data",
"Import": "Importer", "Import": "Importer",
"Import Invidious data": "Importer Invidious-data", "Import Invidious data": "Importer Invidious-data",
"Import YouTube subscriptions": "Importer YouTube-abonnenter", "Import YouTube subscriptions": "Importer YouTube-abonnenter",
"Import FreeTube subscriptions (.db)": "Importer FreeTube-abonnenter (.db)", "Import FreeTube subscriptions (.db)": "Importer FreeTube-abonnenter (.db)",
"Import NewPipe subscriptions (.json)": "Importer NewPipe-abonnenter (.json)", "Import NewPipe subscriptions (.json)": "Importer NewPipe-abonnenter (.json)",
"Import NewPipe data (.zip)": "Importer NewPipe-data (.zip)", "Import NewPipe data (.zip)": "Importer NewPipe-data (.zip)",
"Export": "Eksporter", "Export": "Eksporter",
"Export subscriptions as OPML": "Eksporter abonnenter som OPML", "Export subscriptions as OPML": "Eksporter abonnenter som OPML",
"Export subscriptions as OPML (for NewPipe & FreeTube)": "Eksporter abonnenter som OPML (for NewPipe og FreeTube)", "Export subscriptions as OPML (for NewPipe & FreeTube)": "Eksporter abonnenter som OPML (for NewPipe og FreeTube)",
"Export data as JSON": "Eksporter data som JSON", "Export data as JSON": "Eksporter data som JSON",
"Delete account?": "Slett konto?", "Delete account?": "Slett konto?",
"History": "Historikk", "History": "Historikk",
"Previous page": "Forrige side", "Previous page": "Forrige side",
"An alternative front-end to YouTube": "En alternativ grenseflate for YouTube", "An alternative front-end to YouTube": "En alternativ grenseflate for YouTube",
"JavaScript license information": "JavaScript-lisensinformasjon", "JavaScript license information": "JavaScript-lisensinformasjon",
"source": "kilde", "source": "kilde",
"Login": "Logg inn", "Login": "Logg inn",
"Login/Register": "Logg inn/registrer", "Login/Register": "Logg inn/registrer",
"Login to Google": "Logg inn med Google", "Login to Google": "Logg inn med Google",
"User ID:": "Bruker-ID:", "User ID:": "Bruker-ID:",
"Password:": "Passord:", "Password:": "Passord:",
"Time (h:mm:ss):": "Tid (h:mm:ss):", "Time (h:mm:ss):": "Tid (h:mm:ss):",
"Text CAPTCHA": "Tekst-CAPTCHA", "Text CAPTCHA": "Tekst-CAPTCHA",
"Image CAPTCHA": "Bilde-CAPTCHA", "Image CAPTCHA": "Bilde-CAPTCHA",
"Sign In": "Innlogging", "Sign In": "Innlogging",
"Register": "Registrer", "Register": "Registrer",
"Email:": "E-post:", "Email:": "E-post:",
"Google verification code:": "Google-bekreftelseskode:", "Google verification code:": "Google-bekreftelseskode:",
"Preferences": "Innstillinger", "Preferences": "Innstillinger",
"Player preferences": "Avspillerinnstillinger", "Player preferences": "Avspillerinnstillinger",
"Always loop: ": "Alltid gjenta: ", "Always loop: ": "Alltid gjenta: ",
"Autoplay: ": "Autoavspilling: ", "Autoplay: ": "Autoavspilling: ",
"Autoplay next video: ": "Autospill neste video: ", "Autoplay next video: ": "Autospill neste video: ",
"Listen by default: ": "Lytt som forvalg: ", "Listen by default: ": "Lytt som forvalg: ",
"Default speed: ": "Forvalgt hastighet: ", "Default speed: ": "Forvalgt hastighet: ",
"Preferred video quality: ": "Foretrukket videokvalitet: ", "Preferred video quality: ": "Foretrukket videokvalitet: ",
"Player volume: ": "Avspillerlydstyrke: ", "Player volume: ": "Avspillerlydstyrke: ",
"Default comments: ": "Forvalgte kommentarer: ", "Default comments: ": "Forvalgte kommentarer: ",
"Default captions: ": "Forvalgte undertitler: ", "Default captions: ": "Forvalgte undertitler: ",
"Fallback captions: ": "Tilbakefallsundertitler: ", "Fallback captions: ": "Tilbakefallsundertitler: ",
"Show related videos? ": "Vis relaterte videoer? ", "Show related videos? ": "Vis relaterte videoer? ",
"Visual preferences": "Visuelle innstillinger", "Visual preferences": "Visuelle innstillinger",
"Dark mode: ": "Mørk drakt: ", "Dark mode: ": "Mørk drakt: ",
"Thin mode: ": "Tynt modus: ", "Thin mode: ": "Tynt modus: ",
"Subscription preferences": "Abonnementsinnstillinger", "Subscription preferences": "Abonnementsinnstillinger",
"Redirect homepage to feed: ": "Videresend hjemmeside til flyt: ", "Redirect homepage to feed: ": "Videresend hjemmeside til flyt: ",
"Number of videos shown in feed: ": "Antall videoer å vise i flyt: ", "Number of videos shown in feed: ": "Antall videoer å vise i flyt: ",
"Sort videos by: ": "Sorter videoer etter: ", "Sort videos by: ": "Sorter videoer etter: ",
"published": "publisert", "published": "publisert",
"published - reverse": "publisert - motsatt", "published - reverse": "publisert - motsatt",
"alphabetically": "alfabetisk", "alphabetically": "alfabetisk",
"alphabetically - reverse": "alfabetisk - motsatt", "alphabetically - reverse": "alfabetisk - motsatt",
"channel name": "kanalnavn", "channel name": "kanalnavn",
"channel name - reverse": "kanalnavn - motsatt", "channel name - reverse": "kanalnavn - motsatt",
"Only show latest video from channel: ": "Kun vis siste video fra kanal: ", "Only show latest video from channel: ": "Kun vis siste video fra kanal: ",
"Only show latest unwatched video from channel: ": "Kun vis siste usette video fra kanal: ", "Only show latest unwatched video from channel: ": "Kun vis siste usette video fra kanal: ",
"Only show unwatched: ": "Kun vis usette: ", "Only show unwatched: ": "Kun vis usette: ",
"Only show notifications (if there are any): ": "Kun vis merknader (hvis det er noen): ", "Only show notifications (if there are any): ": "Kun vis merknader (hvis det er noen): ",
"Data preferences": "Datainnstillinger", "Data preferences": "Datainnstillinger",
"Clear watch history": "Tøm visningshistorikk", "Clear watch history": "Tøm visningshistorikk",
"Import/Export data": "Importer/eksporter data", "Import/Export data": "Importer/eksporter data",
"Manage subscriptions": "Behandle abonnementer", "Manage subscriptions": "Behandle abonnementer",
"Watch history": "Visningshistorikk", "Watch history": "Visningshistorikk",
"Delete account": "Slett konto", "Delete account": "Slett konto",
"Save preferences": "Lagre innstillinger", "Save preferences": "Lagre innstillinger",
"Subscription manager": "Abonnementsbehandler", "Subscription manager": "Abonnementsbehandler",
"`x` subscriptions": "`x` abonnementer", "`x` subscriptions": "`x` abonnementer",
"Import/Export": "Importer/eksporter", "Import/Export": "Importer/eksporter",
"unsubscribe": "opphev abonnement", "unsubscribe": "opphev abonnement",
"Subscriptions": "Abonnement", "Subscriptions": "Abonnement",
"`x` unseen notifications": "`x` usette merknader", "`x` unseen notifications": "`x` usette merknader",
"search": "søk", "search": "søk",
"Sign out": "Logg ut", "Sign out": "Logg ut",
"Released under the AGPLv3 by Omar Roth.": "Utgitt med AGPLv3+lisens av Omar Roth.", "Released under the AGPLv3 by Omar Roth.": "Utgitt med AGPLv3+lisens av Omar Roth.",
"Source available here.": "Kildekode tilgjengelig her.", "Source available here.": "Kildekode tilgjengelig her.",
"View JavaScript license information.": "Vis JavaScript-lisensinfo.", "View JavaScript license information.": "Vis JavaScript-lisensinfo.",
"Trending": "Trendsettende", "Trending": "Trendsettende",
"Watch video on Youtube": "Vis video på YouTube", "Watch video on Youtube": "Vis video på YouTube",
"Genre: ": "Sjanger: ", "Genre: ": "Sjanger: ",
"License: ": "Lisens: ", "License: ": "Lisens: ",
"Family friendly? ": "Familievennlig? ", "Family friendly? ": "Familievennlig? ",
"Wilson score: ": "Wilson-poengsum: ", "Wilson score: ": "Wilson-poengsum: ",
"Engagement: ": "Engasjement: ", "Engagement: ": "Engasjement: ",
"Whitelisted regions: ": "Hvitlistede regioner: ", "Whitelisted regions: ": "Hvitlistede regioner: ",
"Blacklisted regions: ": "Svartelistede regioner: ", "Blacklisted regions: ": "Svartelistede regioner: ",
"Shared `x`": "Delt `x`", "Shared `x`": "Delt `x`",
"Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.": "Hei. Det ser ut til at du har JavaScript avslått. Klikk her for å vise kommentarer, ha i minnet at innlasting tar lengre tid.", "Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.": "Hei. Det ser ut til at du har JavaScript avslått. Klikk her for å vise kommentarer, ha i minnet at innlasting tar lengre tid.",
"View YouTube comments": "Vis YouTube-kommentarer", "View YouTube comments": "Vis YouTube-kommentarer",
"View more comments on Reddit": "Vis flere kommenterer på Reddit", "View more comments on Reddit": "Vis flere kommenterer på Reddit",
"View `x` comments": "Vis `x` kommentarer", "View `x` comments": "Vis `x` kommentarer",
"View Reddit comments": "Vis Reddit-kommentarer", "View Reddit comments": "Vis Reddit-kommentarer",
"Hide replies": "Skjul svar", "Hide replies": "Skjul svar",
"Show replies": "Vis svar", "Show replies": "Vis svar",
"Incorrect password": "Feil passord", "Incorrect password": "Feil passord",
"Quota exceeded, try again in a few hours": "Kvote overskredet, prøv igjen om et par timer", "Quota exceeded, try again in a few hours": "Kvote overskredet, prøv igjen om et par timer",
"Unable to login, make sure two-factor authentication (Authenticator or SMS) is enabled.": "Kunne ikke logge inn, forsikre deg om at tofaktor-identitetsbekreftelse (Authenticator eller SMS) er skrudd på.", "Unable to login, make sure two-factor authentication (Authenticator or SMS) is enabled.": "Kunne ikke logge inn, forsikre deg om at tofaktor-identitetsbekreftelse (Authenticator eller SMS) er skrudd på.",
"Invalid TFA code": "Ugyldig tofaktorkode", "Invalid TFA code": "Ugyldig tofaktorkode",
"Login failed. This may be because two-factor authentication is not enabled on your account.": "Innlogging mislyktes. Dette kan være fordi tofaktor-identitetsbekreftelse er skrudd av på kontoen din.", "Login failed. This may be because two-factor authentication is not enabled on your account.": "Innlogging mislyktes. Dette kan være fordi tofaktor-identitetsbekreftelse er skrudd av på kontoen din.",
"Invalid answer": "Ugyldig svar", "Invalid answer": "Ugyldig svar",
"Invalid CAPTCHA": "Ugyldig CAPTCHA", "Invalid CAPTCHA": "Ugyldig CAPTCHA",
"CAPTCHA is a required field": "CAPTCHA er et påkrevd felt", "CAPTCHA is a required field": "CAPTCHA er et påkrevd felt",
"User ID is a required field": "Bruker-ID er et påkrevd felt", "User ID is a required field": "Bruker-ID er et påkrevd felt",
"Password is a required field": "Passord er et påkrevd felt", "Password is a required field": "Passord er et påkrevd felt",
"Invalid username or password": "Ugyldig brukernavn eller passord", "Invalid username or password": "Ugyldig brukernavn eller passord",
"Please sign in using 'Sign in with Google'": "Logg inn ved bruk av \"Google-innlogging\"", "Please sign in using 'Sign in with Google'": "Logg inn ved bruk av \"Google-innlogging\"",
"Password cannot be empty": "Passordet kan ikke være tomt", "Password cannot be empty": "Passordet kan ikke være tomt",
"Password cannot be longer than 55 characters": "Passordet kan ikke være lengre enn 55 tegn", "Password cannot be longer than 55 characters": "Passordet kan ikke være lengre enn 55 tegn",
"Please sign in": "Logg inn", "Please sign in": "Logg inn",
"Invidious Private Feed for `x`": "Ugyldig privat flyt for `x`", "Invidious Private Feed for `x`": "Ugyldig privat flyt for `x`",
"channel:`x`": "kanal `x`", "channel:`x`": "kanal `x`",
"Deleted or invalid channel": "Slettet eller ugyldig kanal", "Deleted or invalid channel": "Slettet eller ugyldig kanal",
"This channel does not exist.": "Denne kanalen finnes ikke.", "This channel does not exist.": "Denne kanalen finnes ikke.",
"Could not get channel info.": "Kunne ikke innhente kanalinfo.", "Could not get channel info.": "Kunne ikke innhente kanalinfo.",
"Could not fetch comments": "Kunne ikke hente kommentarer", "Could not fetch comments": "Kunne ikke hente kommentarer",
"View `x` replies": "Vis `x` svar", "View `x` replies": "Vis `x` svar",
"`x` ago": "`x` siden", "`x` ago": "`x` siden",
"Load more": "Last inn flere", "Load more": "Last inn flere",
"`x` points": "`x` poeng", "`x` points": "`x` poeng",
"Could not create mix.": "Kunne ikke opprette miks.", "Could not create mix.": "Kunne ikke opprette miks.",
"Playlist is empty": "Spillelisten er tom", "Playlist is empty": "Spillelisten er tom",
"Invalid playlist.": "Ugyldig spilleliste.", "Invalid playlist.": "Ugyldig spilleliste.",
"Playlist does not exist.": "Spillelisten finnes ikke.", "Playlist does not exist.": "Spillelisten finnes ikke.",
"Could not pull trending pages.": "Kunne ikke hente trendsettende sider.", "Could not pull trending pages.": "Kunne ikke hente trendsettende sider.",
"Hidden field \"challenge\" is a required field": "Skjult felt \"utfordring\" er et påkrevd felt", "Hidden field \"challenge\" is a required field": "Skjult felt \"utfordring\" er et påkrevd felt",
"Hidden field \"token\" is a required field": "Skjult felt \"symbol\" er et påkrevd felt", "Hidden field \"token\" is a required field": "Skjult felt \"symbol\" er et påkrevd felt",
"Invalid challenge": "Ugyldig utfordring", "Invalid challenge": "Ugyldig utfordring",
"Invalid token": "Ugyldig symbol", "Invalid token": "Ugyldig symbol",
"Invalid user": "Ugyldig bruker", "Invalid user": "Ugyldig bruker",
"Token is expired, please try again": "Symbol utløpt, prøv igjen", "Token is expired, please try again": "Symbol utløpt, prøv igjen",
"English": "Engelsk", "English": "Engelsk",
"English (auto-generated)": "Engelsk (auto-generert)", "English (auto-generated)": "Engelsk (auto-generert)",
"Afrikaans": "", "Afrikaans": "",
"Albanian": "Albansk", "Albanian": "Albansk",
"Amharic": "", "Amharic": "",
"Arabic": "Arabisk", "Arabic": "Arabisk",
"Armenian": "Armensk", "Armenian": "Armensk",
"Azerbaijani": "", "Azerbaijani": "",
"Bangla": "", "Bangla": "",
"Basque": "", "Basque": "",
"Belarusian": "Hviterussisk", "Belarusian": "Hviterussisk",
"Bosnian": "Bosnisk", "Bosnian": "Bosnisk",
"Bulgarian": "Bulgarsk", "Bulgarian": "Bulgarsk",
"Burmese": "Burmesisk", "Burmese": "Burmesisk",
"Catalan": "Katalansk", "Catalan": "Katalansk",
"Cebuano": "", "Cebuano": "",
"Chinese (Simplified)": "", "Chinese (Simplified)": "",
"Chinese (Traditional)": "", "Chinese (Traditional)": "",
"Corsican": "", "Corsican": "",
"Croatian": "", "Croatian": "",
"Czech": "Tsjekkisk", "Czech": "Tsjekkisk",
"Danish": "Dansk", "Danish": "Dansk",
"Dutch": "", "Dutch": "",
"Esperanto": "Esperanto", "Esperanto": "Esperanto",
"Estonian": "", "Estonian": "",
"Filipino": "", "Filipino": "",
"Finnish": "Finsk", "Finnish": "Finsk",
"French": "Fransk", "French": "Fransk",
"Galician": "", "Galician": "",
"Georgian": "", "Georgian": "",
"German": "", "German": "",
"Greek": "", "Greek": "",
"Gujarati": "", "Gujarati": "",
"Haitian Creole": "", "Haitian Creole": "",
"Hausa": "", "Hausa": "",
"Hawaiian": "", "Hawaiian": "",
"Hebrew": "", "Hebrew": "",
"Hindi": "", "Hindi": "",
"Hmong": "", "Hmong": "",
"Hungarian": "Ungarsk", "Hungarian": "Ungarsk",
"Icelandic": "Islandsk", "Icelandic": "Islandsk",
"Igbo": "", "Igbo": "",
"Indonesian": "Indonesisk", "Indonesian": "Indonesisk",
"Irish": "Irsk", "Irish": "Irsk",
"Italian": "Italiensk", "Italian": "Italiensk",
"Japanese": "Japansk", "Japanese": "Japansk",
"Javanese": "", "Javanese": "",
"Kannada": "", "Kannada": "",
"Kazakh": "", "Kazakh": "",
"Khmer": "", "Khmer": "",
"Korean": "", "Korean": "",
"Kurdish": "", "Kurdish": "",
"Kyrgyz": "", "Kyrgyz": "",
"Lao": "", "Lao": "",
"Latin": "", "Latin": "",
"Latvian": "", "Latvian": "",
"Lithuanian": "", "Lithuanian": "",
"Luxembourgish": "", "Luxembourgish": "",
"Macedonian": "", "Macedonian": "",
"Malagasy": "", "Malagasy": "",
"Malay": "", "Malay": "",
"Malayalam": "", "Malayalam": "",
"Maltese": "", "Maltese": "",
"Maori": "", "Maori": "",
"Marathi": "", "Marathi": "",
"Mongolian": "", "Mongolian": "",
"Nepali": "", "Nepali": "",
"Norwegian": "Norsk bokmål", "Norwegian": "Norsk bokmål",
"Nyanja": "", "Nyanja": "",
"Pashto": "", "Pashto": "",
"Persian": "", "Persian": "",
"Polish": "", "Polish": "",
"Portuguese": "", "Portuguese": "",
"Punjabi": "", "Punjabi": "",
"Romanian": "", "Romanian": "",
"Russian": "Russisk", "Russian": "Russisk",
"Samoan": "", "Samoan": "",
"Scottish Gaelic": "", "Scottish Gaelic": "",
"Serbian": "Serbisk", "Serbian": "Serbisk",
"Shona": "", "Shona": "",
"Sindhi": "", "Sindhi": "",
"Sinhala": "", "Sinhala": "",
"Slovak": "Slovakisk", "Slovak": "Slovakisk",
"Slovenian": "Slovensk", "Slovenian": "Slovensk",
"Somali": "Somali", "Somali": "Somali",
"Southern Sotho": "", "Southern Sotho": "",
"Spanish": "Spansk", "Spanish": "Spansk",
"Spanish (Latin America)": "", "Spanish (Latin America)": "",
"Sundanese": "", "Sundanese": "",
"Swahili": "", "Swahili": "",
"Swedish": "Svensk", "Swedish": "Svensk",
"Tajik": "", "Tajik": "",
"Tamil": "", "Tamil": "",
"Telugu": "", "Telugu": "",
"Thai": "", "Thai": "",
"Turkish": "Tyrkisk", "Turkish": "Tyrkisk",
"Ukrainian": "Ukrainsk", "Ukrainian": "Ukrainsk",
"Urdu": "", "Urdu": "",
"Uzbek": "", "Uzbek": "",
"Vietnamese": "Vietnamesisk", "Vietnamese": "Vietnamesisk",
"Welsh": "", "Welsh": "",
"Western Frisian": "", "Western Frisian": "",
"Xhosa": "", "Xhosa": "",
"Yiddish": "", "Yiddish": "",
"Yoruba": "", "Yoruba": "",
"Zulu": "", "Zulu": "",
"`x` years": "`x` år", "`x` years": "`x` år",
"`x` months": "`x` måneder", "`x` months": "`x` måneder",
"`x` weeks": "`x` uker", "`x` weeks": "`x` uker",
"`x` days": "`x` dager", "`x` days": "`x` dager",
"`x` hours": "`x` timer", "`x` hours": "`x` timer",
"`x` minutes": "`x` minutter", "`x` minutes": "`x` minutter",
"`x` seconds": "`x` sekunder", "`x` seconds": "`x` sekunder",
"Fallback comments: ": "Tilbakefallskommentarer: ", "Fallback comments: ": "Tilbakefallskommentarer: ",
"Popular": "Pupulært", "Popular": "Pupulært",
"Top": "Topp", "Top": "Topp",
"About": "Om", "About": "Om",
"Rating: ": "Vurdering: ", "Rating: ": "Vurdering: ",
"Language: ": "Språk: " "Language: ": "Språk: ",
"Default": "",
"Music": "",
"Gaming": "",
"News": "",
"Movies": "",
"Download": "",
"Download as: ": "",
"%A %B %-d, %Y": "",
"(edited)": "",
"Youtube permalink of the comment": "",
"`x` marked it with a ❤": ""
} }

View File

@ -263,5 +263,16 @@
"Top": "", "Top": "",
"About": "", "About": "",
"Rating: ": "", "Rating: ": "",
"Language: ": "" "Language: ": "",
"Default": "",
"Music": "",
"Gaming": "",
"News": "",
"Movies": "",
"Download": "",
"Download as: ": "",
"%A %B %-d, %Y": "",
"(edited)": "",
"Youtube permalink of the comment": "",
"`x` marked it with a ❤": ""
} }

View File

@ -263,5 +263,16 @@
"Top": "", "Top": "",
"About": "", "About": "",
"Rating: ": "", "Rating: ": "",
"Language: ": "" "Language: ": "",
"Default": "",
"Music": "",
"Gaming": "",
"News": "",
"Movies": "",
"Download": "",
"Download as: ": "",
"%A %B %-d, %Y": "",
"(edited)": "",
"Youtube permalink of the comment": "",
"`x` marked it with a ❤": ""
} }

View File

@ -1,273 +1,284 @@
{ {
"`x` subscribers": "`x` подписчиков", "`x` subscribers": "`x` подписчиков",
"`x` videos": "`x` видео", "`x` videos": "`x` видео",
"LIVE": "ПРЯМОЙ ЭФИР", "LIVE": "ПРЯМОЙ ЭФИР",
"Shared `x` ago": "Опубликовано `x` назад", "Shared `x` ago": "Опубликовано `x` назад",
"Unsubscribe": "Отписаться", "Unsubscribe": "Отписаться",
"Subscribe": "Подписаться", "Subscribe": "Подписаться",
"Login to subscribe to `x`": "Войти, чтобы подписаться на `x`", "Login to subscribe to `x`": "Войти, чтобы подписаться на `x`",
"View channel on YouTube": "Канал на YouTube", "View channel on YouTube": "Канал на YouTube",
"newest": "новые", "newest": "новые",
"oldest": "старые", "oldest": "старые",
"popular": "популярные", "popular": "популярные",
"Preview page": "Предварительный просмотр", "Preview page": "Предварительный просмотр",
"Next page": "Следующая страница", "Next page": "Следующая страница",
"Clear watch history?": "Очистить историю просмотров?", "Clear watch history?": "Очистить историю просмотров?",
"Yes": "Да", "Yes": "Да",
"No": "Нет", "No": "Нет",
"Import and Export Data": "Импорт и экспорт данных", "Import and Export Data": "Импорт и экспорт данных",
"Import": "Импорт", "Import": "Импорт",
"Import Invidious data": "Импортировать данные Invidious", "Import Invidious data": "Импортировать данные Invidious",
"Import YouTube subscriptions": "Импортировать YouTube подписки", "Import YouTube subscriptions": "Импортировать YouTube подписки",
"Import FreeTube subscriptions (.db)": "Импортировать FreeTube подписки (.db)", "Import FreeTube subscriptions (.db)": "Импортировать FreeTube подписки (.db)",
"Import NewPipe subscriptions (.json)": "Импортировать NewPipe подписки (.json)", "Import NewPipe subscriptions (.json)": "Импортировать NewPipe подписки (.json)",
"Import NewPipe data (.zip)": "Импортировать данные NewPipe (.zip)", "Import NewPipe data (.zip)": "Импортировать данные NewPipe (.zip)",
"Export": "Экспорт", "Export": "Экспорт",
"Export subscriptions as OPML": "Экспортировать подписки в OPML", "Export subscriptions as OPML": "Экспортировать подписки в OPML",
"Export subscriptions as OPML (for NewPipe & FreeTube)": "Экспортировать подписки в OPML (для NewPipe и FreeTube)", "Export subscriptions as OPML (for NewPipe & FreeTube)": "Экспортировать подписки в OPML (для NewPipe и FreeTube)",
"Export data as JSON": "Экспортировать данные в JSON", "Export data as JSON": "Экспортировать данные в JSON",
"Delete account?": "Удалить аккаунт?", "Delete account?": "Удалить аккаунт?",
"History": "История", "History": "История",
"Previous page": "Предыдущая страница", "Previous page": "Предыдущая страница",
"An alternative front-end to YouTube": "Альтернативный фронтенд для YouTube", "An alternative front-end to YouTube": "Альтернативный фронтенд для YouTube",
"JavaScript license information": "Лицензии JavaScript", "JavaScript license information": "Лицензии JavaScript",
"source": "источник", "source": "источник",
"Login": "Войти", "Login": "Войти",
"Login/Register": "Войти/Регистрация", "Login/Register": "Войти/Регистрация",
"Login to Google": "Войти через Google", "Login to Google": "Войти через Google",
"User ID:": "ID пользователя:", "User ID:": "ID пользователя:",
"Password:": "Пароль:", "Password:": "Пароль:",
"Time (h:mm:ss):": "Время (ч:мм:сс):", "Time (h:mm:ss):": "Время (ч:мм:сс):",
"Text CAPTCHA": "Текст капчи", "Text CAPTCHA": "Текст капчи",
"Image CAPTCHA": "Изображение капчи", "Image CAPTCHA": "Изображение капчи",
"Sign In": "Войти", "Sign In": "Войти",
"Register": "Регистрация", "Register": "Регистрация",
"Email:": "Эл. почта:", "Email:": "Эл. почта:",
"Google verification code:": "Код подтверждения Google:", "Google verification code:": "Код подтверждения Google:",
"Preferences": "Настройки", "Preferences": "Настройки",
"Player preferences": "Настройки проигрывателя", "Player preferences": "Настройки проигрывателя",
"Always loop: ": "Всегда повторять: ", "Always loop: ": "Всегда повторять: ",
"Autoplay: ": "Автовоспроизведение: ", "Autoplay: ": "Автовоспроизведение: ",
"Autoplay next video: ": "Автовоспроизведение следующего видео: ", "Autoplay next video: ": "Автовоспроизведение следующего видео: ",
"Listen by default: ": "Режим \"только аудио\" по-умолчанию: ", "Listen by default: ": "Режим \"только аудио\" по-умолчанию: ",
"Default speed: ": "Скорость по-умолчанию: ", "Default speed: ": "Скорость по-умолчанию: ",
"Preferred video quality: ": "Предпочтительное качество видео: ", "Preferred video quality: ": "Предпочтительное качество видео: ",
"Player volume: ": "Громкость воспроизведения: ", "Player volume: ": "Громкость воспроизведения: ",
"Default comments: ": "Источник комментариев: ", "Default comments: ": "Источник комментариев: ",
"youtube": "YouTube", "youtube": "YouTube",
"reddit": "Reddit", "reddit": "Reddit",
"Default captions: ": "Субтитры по-умолчанию: ", "Default captions: ": "Субтитры по-умолчанию: ",
"Fallback captions: ": "Резервные субтитры: ", "Fallback captions: ": "Резервные субтитры: ",
"Show related videos? ": "Показывать похожие видео? ", "Show related videos? ": "Показывать похожие видео? ",
"Visual preferences": "Визуальные настройки", "Visual preferences": "Визуальные настройки",
"Dark mode: ": "Темная тема: ", "Dark mode: ": "Темная тема: ",
"Thin mode: ": "Облегченный режим: ", "Thin mode: ": "Облегченный режим: ",
"Subscription preferences": "Настройки подписок", "Subscription preferences": "Настройки подписок",
"Redirect homepage to feed: ": "Отображать ленту вместо главной страницы: ", "Redirect homepage to feed: ": "Отображать ленту вместо главной страницы: ",
"Number of videos shown in feed: ": "Число видео в ленте: ", "Number of videos shown in feed: ": "Число видео в ленте: ",
"Sort videos by: ": "Сортировать видео по: ", "Sort videos by: ": "Сортировать видео по: ",
"published": "дате публикации", "published": "дате публикации",
"published - reverse": "дате - обратный порядок", "published - reverse": "дате - обратный порядок",
"alphabetically": "алфавиту", "alphabetically": "алфавиту",
"alphabetically - reverse": "алфавиту - обратный порядок", "alphabetically - reverse": "алфавиту - обратный порядок",
"channel name": "имени канала", "channel name": "имени канала",
"channel name - reverse": "имени канала - обратный порядок", "channel name - reverse": "имени канала - обратный порядок",
"Only show latest video from channel: ": "Отображать только последние видео с каждого канала: ", "Only show latest video from channel: ": "Отображать только последние видео с каждого канала: ",
"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): ": "Отображать только оповещения (если есть): ",
"Data preferences": "Настройки данных", "Data preferences": "Настройки данных",
"Clear watch history": "Очистить историю просмотра", "Clear watch history": "Очистить историю просмотра",
"Import/Export data": "Импорт/Экспорт данных", "Import/Export data": "Импорт/Экспорт данных",
"Manage subscriptions": "Управление подписками", "Manage subscriptions": "Управление подписками",
"Watch history": "История просмотров", "Watch history": "История просмотров",
"Delete account": "Удалить аккаунт", "Delete account": "Удалить аккаунт",
"Save preferences": "Сохранить настройки", "Save preferences": "Сохранить настройки",
"Subscription manager": "Менеджер подписок", "Subscription manager": "Менеджер подписок",
"`x` subscriptions": "`x` подписок", "`x` subscriptions": "`x` подписок",
"Import/Export": "Импорт/Экспорт", "Import/Export": "Импорт/Экспорт",
"unsubscribe": "отписаться", "unsubscribe": "отписаться",
"Subscriptions": "Подписки", "Subscriptions": "Подписки",
"`x` unseen notifications": "`x` новых оповещений", "`x` unseen notifications": "`x` новых оповещений",
"search": "поиск", "search": "поиск",
"Sign out": "Выйти", "Sign out": "Выйти",
"Released under the AGPLv3 by Omar Roth.": "Распространяется Omar Roth по AGPLv3.", "Released under the AGPLv3 by Omar Roth.": "Распространяется Omar Roth по AGPLv3.",
"Source available here.": "Исходный код доступен здесь.", "Source available here.": "Исходный код доступен здесь.",
"Liberapay: ": "Liberapay: ", "Liberapay: ": "Liberapay: ",
"Patreon: ": "Patreon: ", "Patreon: ": "Patreon: ",
"BTC: ": "BTC: ", "BTC: ": "BTC: ",
"BCH: ": "BCH: ", "BCH: ": "BCH: ",
"View JavaScript license information.": "Посмотреть лицензии JavaScript кода.", "View JavaScript license information.": "Посмотреть лицензии JavaScript кода.",
"Trending": "В тренде", "Trending": "В тренде",
"Watch video on Youtube": "Смотреть на YouTube", "Watch video on Youtube": "Смотреть на YouTube",
"Genre: ": "Жанр: ", "Genre: ": "Жанр: ",
"License: ": "Лицензия: ", "License: ": "Лицензия: ",
"Family friendly? ": "Семейный просмотр: ", "Family friendly? ": "Семейный просмотр: ",
"Wilson score: ": "Рейтинг Вильсона: ", "Wilson score: ": "Рейтинг Вильсона: ",
"Engagement: ": "Вовлеченность: ", "Engagement: ": "Вовлеченность: ",
"Whitelisted regions: ": "Доступно для: ", "Whitelisted regions: ": "Доступно для: ",
"Blacklisted regions: ": "Недоступно для: ", "Blacklisted regions: ": "Недоступно для: ",
"Shared `x`": "Опубликовано `x`", "Shared `x`": "Опубликовано `x`",
"Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.": "Похоже, что у Вас отключен JavaScript. Нажмите сюда, чтобы увидеть комментарии (учтите, что они могут загружаться дольше).", "Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.": "Похоже, что у Вас отключен JavaScript. Нажмите сюда, чтобы увидеть комментарии (учтите, что они могут загружаться дольше).",
"View YouTube comments": "Смотреть комментарии с YouTube", "View YouTube comments": "Смотреть комментарии с YouTube",
"View more comments on Reddit": "Больше комментариев на Reddit", "View more comments on Reddit": "Больше комментариев на Reddit",
"View `x` comments": "Показать `x` комментариев", "View `x` comments": "Показать `x` комментариев",
"View Reddit comments": "Смотреть комментарии с Reddit", "View Reddit comments": "Смотреть комментарии с Reddit",
"Hide replies": "Скрыть ответы", "Hide replies": "Скрыть ответы",
"Show replies": "Показать ответы", "Show replies": "Показать ответы",
"Incorrect password": "Неправильный пароль", "Incorrect password": "Неправильный пароль",
"Quota exceeded, try again in a few hours": "Превышена квота, попробуйте снова через несколько часов", "Quota exceeded, try again in a few hours": "Превышена квота, попробуйте снова через несколько часов",
"Unable to login, make sure two-factor authentication (Authenticator or SMS) is enabled.": "Вход не выполнен, проверьте, не включена ли двухфакторная аутентификация.", "Unable to login, make sure two-factor authentication (Authenticator or SMS) is enabled.": "Вход не выполнен, проверьте, не включена ли двухфакторная аутентификация.",
"Invalid TFA code": "Неправильный TFA код", "Invalid TFA code": "Неправильный TFA код",
"Login failed. This may be because two-factor authentication is not enabled on your account.": "Не удалось войти. Это может быть из-за того, что в вашем аккаунте не включена двухфакторная аутентификация.", "Login failed. This may be because two-factor authentication is not enabled on your account.": "Не удалось войти. Это может быть из-за того, что в вашем аккаунте не включена двухфакторная аутентификация.",
"Invalid answer": "Неверный ответ", "Invalid answer": "Неверный ответ",
"Invalid CAPTCHA": "Неверная капча", "Invalid CAPTCHA": "Неверная капча",
"CAPTCHA is a required field": "Необходимо ввести капчу", "CAPTCHA is a required field": "Необходимо ввести капчу",
"User ID is a required field": "Необходимо ввести идентификатор пользователя", "User ID is a required field": "Необходимо ввести идентификатор пользователя",
"Password is a required field": "Необходимо ввести пароль", "Password is a required field": "Необходимо ввести пароль",
"Invalid username or password": "Недопустимый пароль или имя пользователя", "Invalid username or password": "Недопустимый пароль или имя пользователя",
"Please sign in using 'Sign in with Google'": "Пожалуйста войдите через Google", "Please sign in using 'Sign in with Google'": "Пожалуйста войдите через Google",
"Password cannot be empty": "Пароль не может быть пустым", "Password cannot be empty": "Пароль не может быть пустым",
"Password cannot be longer than 55 characters": "Пароль не может быть длиннее 55 символов", "Password cannot be longer than 55 characters": "Пароль не может быть длиннее 55 символов",
"Please sign in": "Пожалуйста, войдите", "Please sign in": "Пожалуйста, войдите",
"Invidious Private Feed for `x`": "Приватная лента Invidious для `x`", "Invidious Private Feed for `x`": "Приватная лента Invidious для `x`",
"channel:`x`": "канал: `x`", "channel:`x`": "канал: `x`",
"Deleted or invalid channel": "Канал удален или не найден", "Deleted or invalid channel": "Канал удален или не найден",
"This channel does not exist.": "Такой канал не существует.", "This channel does not exist.": "Такой канал не существует.",
"Could not get channel info.": "Невозможно получить информацию о канале.", "Could not get channel info.": "Невозможно получить информацию о канале.",
"Could not fetch comments": "Невозможно получить комментарии", "Could not fetch comments": "Невозможно получить комментарии",
"View `x` replies": "Показать `x` ответов", "View `x` replies": "Показать `x` ответов",
"`x` ago": "`x` назад", "`x` ago": "`x` назад",
"Load more": "Загрузить больше", "Load more": "Загрузить больше",
"`x` points": "`x` очков", "`x` points": "`x` очков",
"Could not create mix.": "Невозможно создать \"микс\".", "Could not create mix.": "Невозможно создать \"микс\".",
"Playlist is empty": "Плейлист пуст", "Playlist is empty": "Плейлист пуст",
"Invalid playlist.": "Некорректный плейлист.", "Invalid playlist.": "Некорректный плейлист.",
"Playlist does not exist.": "Плейлист не существует.", "Playlist does not exist.": "Плейлист не существует.",
"Could not pull trending pages.": "Невозможно получить страницы \"в тренде\".", "Could not pull trending pages.": "Невозможно получить страницы \"в тренде\".",
"Hidden field \"challenge\" is a required field": "Необходимо заполнить скрытое поле \"challenge\"", "Hidden field \"challenge\" is a required field": "Необходимо заполнить скрытое поле \"challenge\"",
"Hidden field \"token\" is a required field": "Необходимо заполнить скрытое поле \"токен\"", "Hidden field \"token\" is a required field": "Необходимо заполнить скрытое поле \"токен\"",
"Invalid challenge": "Неправильный ответ в \"challenge\"", "Invalid challenge": "Неправильный ответ в \"challenge\"",
"Invalid token": "Неправильный токен", "Invalid token": "Неправильный токен",
"Invalid user": "Недопустимое имя пользователя", "Invalid user": "Недопустимое имя пользователя",
"Token is expired, please try again": "Срок действия токена истек, попробуйте позже", "Token is expired, please try again": "Срок действия токена истек, попробуйте позже",
"English": "Английский", "English": "Английский",
"English (auto-generated)": "Английский (созданы автоматически)", "English (auto-generated)": "Английский (созданы автоматически)",
"Afrikaans": "", "Afrikaans": "Африкаанс",
"Albanian": "", "Albanian": "Албанский",
"Amharic": "", "Amharic": "Амхарский",
"Arabic": "", "Arabic": "Арабский",
"Armenian": "", "Armenian": "Армянский",
"Azerbaijani": "", "Azerbaijani": "Азербайджанский",
"Bangla": "", "Bangla": "",
"Basque": "", "Basque": "",
"Belarusian": "", "Belarusian": "",
"Bosnian": "", "Bosnian": "",
"Bulgarian": "", "Bulgarian": "",
"Burmese": "", "Burmese": "",
"Catalan": "", "Catalan": "",
"Cebuano": "", "Cebuano": "",
"Chinese (Simplified)": "", "Chinese (Simplified)": "",
"Chinese (Traditional)": "", "Chinese (Traditional)": "",
"Corsican": "", "Corsican": "",
"Croatian": "", "Croatian": "",
"Czech": "", "Czech": "",
"Danish": "", "Danish": "",
"Dutch": "", "Dutch": "",
"Esperanto": "", "Esperanto": "",
"Estonian": "", "Estonian": "",
"Filipino": "", "Filipino": "",
"Finnish": "", "Finnish": "",
"French": "", "French": "",
"Galician": "", "Galician": "",
"Georgian": "", "Georgian": "",
"German": "", "German": "",
"Greek": "", "Greek": "",
"Gujarati": "", "Gujarati": "",
"Haitian Creole": "", "Haitian Creole": "",
"Hausa": "", "Hausa": "",
"Hawaiian": "", "Hawaiian": "",
"Hebrew": "", "Hebrew": "",
"Hindi": "", "Hindi": "",
"Hmong": "", "Hmong": "",
"Hungarian": "", "Hungarian": "",
"Icelandic": "", "Icelandic": "",
"Igbo": "", "Igbo": "",
"Indonesian": "", "Indonesian": "",
"Irish": "", "Irish": "",
"Italian": "", "Italian": "",
"Japanese": "", "Japanese": "",
"Javanese": "", "Javanese": "",
"Kannada": "", "Kannada": "",
"Kazakh": "", "Kazakh": "",
"Khmer": "", "Khmer": "",
"Korean": "", "Korean": "",
"Kurdish": "", "Kurdish": "",
"Kyrgyz": "", "Kyrgyz": "",
"Lao": "", "Lao": "",
"Latin": "", "Latin": "",
"Latvian": "", "Latvian": "",
"Lithuanian": "", "Lithuanian": "",
"Luxembourgish": "", "Luxembourgish": "",
"Macedonian": "", "Macedonian": "",
"Malagasy": "", "Malagasy": "",
"Malay": "", "Malay": "",
"Malayalam": "", "Malayalam": "",
"Maltese": "", "Maltese": "",
"Maori": "", "Maori": "",
"Marathi": "", "Marathi": "",
"Mongolian": "", "Mongolian": "",
"Nepali": "", "Nepali": "",
"Norwegian": "", "Norwegian": "",
"Nyanja": "", "Nyanja": "",
"Pashto": "", "Pashto": "",
"Persian": "", "Persian": "",
"Polish": "", "Polish": "",
"Portuguese": "", "Portuguese": "",
"Punjabi": "", "Punjabi": "",
"Romanian": "", "Romanian": "",
"Russian": "", "Russian": "",
"Samoan": "", "Samoan": "",
"Scottish Gaelic": "", "Scottish Gaelic": "",
"Serbian": "", "Serbian": "",
"Shona": "", "Shona": "",
"Sindhi": "", "Sindhi": "",
"Sinhala": "", "Sinhala": "",
"Slovak": "", "Slovak": "",
"Slovenian": "", "Slovenian": "",
"Somali": "", "Somali": "",
"Southern Sotho": "", "Southern Sotho": "",
"Spanish": "", "Spanish": "",
"Spanish (Latin America)": "", "Spanish (Latin America)": "",
"Sundanese": "", "Sundanese": "",
"Swahili": "", "Swahili": "",
"Swedish": "", "Swedish": "",
"Tajik": "", "Tajik": "",
"Tamil": "", "Tamil": "",
"Telugu": "", "Telugu": "",
"Thai": "", "Thai": "",
"Turkish": "", "Turkish": "",
"Ukrainian": "", "Ukrainian": "",
"Urdu": "", "Urdu": "",
"Uzbek": "", "Uzbek": "",
"Vietnamese": "", "Vietnamese": "",
"Welsh": "", "Welsh": "",
"Western Frisian": "", "Western Frisian": "",
"Xhosa": "", "Xhosa": "",
"Yiddish": "", "Yiddish": "",
"Yoruba": "", "Yoruba": "",
"Zulu": "", "Zulu": "Зулусский",
"`x` years": "`x` лет", "`x` years": "`x` лет",
"`x` months": "`x` месяцев", "`x` months": "`x` месяцев",
"`x` weeks": "`x` недель", "`x` weeks": "`x` недель",
"`x` days": "`x` дней", "`x` days": "`x` дней",
"`x` hours": "`x` часов", "`x` hours": "`x` часов",
"`x` minutes": "`x` минут", "`x` minutes": "`x` минут",
"`x` seconds": "`x` секунд", "`x` seconds": "`x` секунд",
"Fallback comments: ": "Резервные комментарии: ", "Fallback comments: ": "Резервные комментарии: ",
"Popular": "Популярное", "Popular": "Популярное",
"Top": "Топ", "Top": "Топ",
"About": "О сайте", "About": "О сайте",
"Rating: ": "Рейтинг: ", "Rating: ": "Рейтинг: ",
"Language: ": "Язык: " "Language: ": "Язык: ",
"Default": "По-умолчанию",
"Music": "Музыка",
"Gaming": "Игры",
"News": "Новости",
"Movies": "Фильмы",
"Download": "Скачать",
"Download as: ": "Скачать как: ",
"%A %B %-d, %Y": "",
"(edited)": "",
"Youtube permalink of the comment": "",
"`x` marked it with a ❤": ""
} }

View File

@ -1,10 +0,0 @@
#!/bin/bash
createdb invidious
#createuser kemal
psql -c "CREATE USER kemal WITH PASSWORD 'kemal';"
psql invidious < config/sql/channels.sql
psql invidious < config/sql/videos.sql
psql invidious < config/sql/channel_videos.sql
psql invidious < config/sql/users.sql
psql invidious < config/sql/nonces.sql

View File

@ -1,5 +1,5 @@
name: invidious name: invidious
version: 0.13.0 version: 0.13.1
authors: authors:
- Omar Roth <omarroth@hotmail.com> - Omar Roth <omarroth@hotmail.com>
@ -19,6 +19,6 @@ dependencies:
sqlite3: sqlite3:
github: crystal-lang/crystal-sqlite3 github: crystal-lang/crystal-sqlite3
crystal: 0.27.0 crystal: 0.27.1
license: AGPLv3 license: AGPLv3

62
spec/helpers_spec.cr Normal file
View File

@ -0,0 +1,62 @@
require "kemal"
require "pg"
require "spec"
require "yaml"
require "../src/invidious/helpers/*"
require "../src/invidious/channels"
require "../src/invidious/playlists"
require "../src/invidious/search"
describe "Helpers" 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")
produce_channel_videos_url(ucid: "UCXuqSBlHAE6Xw-yeJA0Tunw", sort_by: "popular").should eq("/browse_ajax?continuation=4qmFsgJCEhhVQ1h1cVNCbEhBRTZYdy15ZUpBMFR1bncaJkVnWjJhV1JsYjNNd0FqZ0JZQUZxQUxnQkFDQUFlZ0V4R0FFJTNE&gl=US&hl=en")
produce_channel_videos_url(ucid: "UCXuqSBlHAE6Xw-yeJA0Tunw", page: 20).should eq("/browse_ajax?continuation=4qmFsgJEEhhVQ1h1cVNCbEhBRTZYdy15ZUpBMFR1bncaKEVnWjJhV1JsYjNNd0FqZ0JZQUZxQUxnQkFDQUFlZ0l5TUElM0QlM0Q%3D&gl=US&hl=en")
produce_channel_videos_url(ucid: "UC-9-kyTW8ZkZNDHQJ6FgpwQ", auto_generated: true).should eq("/browse_ajax?continuation=4qmFsgJIEhhVQy05LWt5VFc4WmtaTkRIUUo2Rmdwd1EaLEVnWjJhV1JsYjNNd0FqZ0JZQUZxQUxnQkFDQTJlZ294TlRRNU5qQXpOelE1&gl=US&hl=en")
produce_channel_videos_url(ucid: "UC-9-kyTW8ZkZNDHQJ6FgpwQ", page: 20, auto_generated: true, sort_by: "popular").should eq("/browse_ajax?continuation=4qmFsgJOEhhVQy05LWt5VFc4WmtaTkRIUUo2Rmdwd1EaMkVnWjJhV1JsYjNNd0FqZ0JZQUZxQUxnQkFDQTJlZ294TkRrNU5Ea3hOelE1R0FFJTNE&gl=US&hl=en")
end
end
describe "#produce_channel_search_url" do
it "correctly produces token for searching a specific channel" do
produce_channel_search_url("UCXuqSBlHAE6Xw-yeJA0Tunw", "", 100).should eq("/browse_ajax?continuation=4qmFsgI-EhhVQ1h1cVNCbEhBRTZYdy15ZUpBMFR1bncaIEVnWnpaV0Z5WTJnd0FqZ0JZQUZxQUxnQkFIb0RNVEF3WgA%3D&gl=US&hl=en")
produce_channel_search_url("UCXuqSBlHAE6Xw-yeJA0Tunw", "По ожиशुपतिरपि子而時ஸ்றீனி", 0).should eq("/browse_ajax?continuation=4qmFsgJZEhhVQ1h1cVNCbEhBRTZYdy15ZUpBMFR1bncaJEVnWnpaV0Z5WTJnd0FqZ0JZQUZxQUxnQkFIb0JNQSUzRCUzRFoX0J_QviDQvtC20LjgpLbgpYHgpKrgpKTgpL_gpLDgpKrgpL_lrZDogIzmmYLgrrjgr43grrHgr4Dgrqngrr8%3D&gl=US&hl=en")
end
end
describe "#produce_playlist_url" do
it "correctly produces url for requesting index `x` of a playlist" do
produce_playlist_url("UUCla9fZca4I7KagBtgRGnOw", 0).should eq("/browse_ajax?continuation=4qmFsgIsEhpWTFVVQ2xhOWZaY2E0STdLYWdCdGdSR25PdxoOZWdaUVZEcERRVUUlM0Q%3D&gl=US&hl=en")
produce_playlist_url("UCCla9fZca4I7KagBtgRGnOw", 0).should eq("/browse_ajax?continuation=4qmFsgIsEhpWTFVVQ2xhOWZaY2E0STdLYWdCdGdSR25PdxoOZWdaUVZEcERRVUUlM0Q%3D&gl=US&hl=en")
produce_playlist_url("PLt5AfwLFPxWLNVixpe1w3fi6lE2OTq0ET", 0).should eq("/browse_ajax?continuation=4qmFsgI2EiRWTFBMdDVBZndMRlB4V0xOVml4cGUxdzNmaTZsRTJPVHEwRVQaDmVnWlFWRHBEUVVFJTNE&gl=US&hl=en")
produce_playlist_url("PLt5AfwLFPxWLNVixpe1w3fi6lE2OTq0ET", 10000).should eq("/browse_ajax?continuation=4qmFsgI0EiRWTFBMdDVBZndMRlB4V0xOVml4cGUxdzNmaTZsRTJPVHEwRVQaDGVnZFFWRHBEU2tKUA%3D%3D&gl=US&hl=en")
produce_playlist_url("PL55713C70BA91BD6E", 0).should eq("/browse_ajax?continuation=4qmFsgImEhRWTFBMNTU3MTNDNzBCQTkxQkQ2RRoOZWdaUVZEcERRVUUlM0Q%3D&gl=US&hl=en")
produce_playlist_url("PL55713C70BA91BD6E", 10000).should eq("/browse_ajax?continuation=4qmFsgIkEhRWTFBMNTU3MTNDNzBCQTkxQkQ2RRoMZWdkUVZEcERTa0pQ&gl=US&hl=en")
end
end
describe "#produce_search_params" do
it "correctly produces token for searching with specified filters" do
produce_search_params.should eq("CAASAhAB")
produce_search_params(sort: "upload_date", content_type: "video").should eq("CAISAhAB")
produce_search_params(content_type: "playlist").should eq("CAASAhAD")
produce_search_params(sort: "date", content_type: "video", features: ["hd", "cc", "purchased", "hdr"]).should eq("CAISCxABIAEwAUgByAEB")
produce_search_params(content_type: "channel").should eq("CAASAhAC")
end
end
end

View File

@ -16,6 +16,7 @@
require "detect_language" require "detect_language"
require "digest/md5" require "digest/md5"
require "file_utils"
require "kemal" require "kemal"
require "openssl/hmac" require "openssl/hmac"
require "option_parser" require "option_parser"
@ -35,6 +36,8 @@ channel_threads = CONFIG.channel_threads
feed_threads = CONFIG.feed_threads feed_threads = CONFIG.feed_threads
video_threads = CONFIG.video_threads video_threads = CONFIG.video_threads
logger = Invidious::LogHandler.new
Kemal.config.extra_options do |parser| Kemal.config.extra_options do |parser|
parser.banner = "Usage: invidious [arguments]" parser.banner = "Usage: invidious [arguments]"
parser.on("-t THREADS", "--crawl-threads=THREADS", "Number of threads for crawling YouTube (default: #{crawl_threads})") do |number| parser.on("-t THREADS", "--crawl-threads=THREADS", "Number of threads for crawling YouTube (default: #{crawl_threads})") do |number|
@ -69,6 +72,10 @@ Kemal.config.extra_options do |parser|
exit exit
end end
end end
parser.on("-o OUTPUT", "--output=OUTPUT", "Redirect output (default: STDOUT)") do |output|
FileUtils.mkdir_p(File.dirname(output))
logger = Invidious::LogHandler.new(File.open(output, mode: "a"))
end
end end
Kemal::CLI.new Kemal::CLI.new
@ -92,6 +99,7 @@ LOCALES = {
"ar" => load_locale("ar"), "ar" => load_locale("ar"),
"de" => load_locale("de"), "de" => load_locale("de"),
"en-US" => load_locale("en-US"), "en-US" => load_locale("en-US"),
"fr" => load_locale("fr"),
"nb_NO" => load_locale("nb_NO"), "nb_NO" => load_locale("nb_NO"),
"nl" => load_locale("nl"), "nl" => load_locale("nl"),
"pl" => load_locale("pl"), "pl" => load_locale("pl"),
@ -100,17 +108,17 @@ LOCALES = {
crawl_threads.times do crawl_threads.times do
spawn do spawn do
crawl_videos(PG_DB) crawl_videos(PG_DB, logger)
end end
end end
refresh_channels(PG_DB, channel_threads, CONFIG.full_refresh) refresh_channels(PG_DB, logger, channel_threads, CONFIG.full_refresh)
refresh_feeds(PG_DB, feed_threads) refresh_feeds(PG_DB, logger, feed_threads)
video_threads.times do |i| video_threads.times do |i|
spawn do spawn do
refresh_videos(PG_DB) refresh_videos(PG_DB, logger)
end end
end end
@ -118,6 +126,8 @@ top_videos = [] of Video
spawn do spawn do
pull_top_videos(CONFIG, PG_DB) do |videos| pull_top_videos(CONFIG, PG_DB) do |videos|
top_videos = videos top_videos = videos
sleep 1.minutes
Fiber.yield
end end
end end
@ -125,6 +135,8 @@ popular_videos = [] of ChannelVideo
spawn do spawn do
pull_popular_videos(PG_DB) do |videos| pull_popular_videos(PG_DB) do |videos|
popular_videos = videos popular_videos = videos
sleep 1.minutes
Fiber.yield
end end
end end
@ -294,7 +306,7 @@ get "/watch" do |env|
next env.redirect "/watch?v=#{ex.message}" next env.redirect "/watch?v=#{ex.message}"
rescue ex rescue ex
error_message = ex.message error_message = ex.message
STDOUT << id << " : " << ex.message << "\n" logger.write("#{id} : #{ex.message}\n")
next templated "error" next templated "error"
end end
@ -364,12 +376,12 @@ get "/watch" do |env|
video.description = replace_links(video.description) video.description = replace_links(video.description)
description = video.short_description description = video.short_description
host_url = make_host_url(Kemal.config.ssl || CONFIG.https_only, env.request.headers["Host"]?) host_url = make_host_url(Kemal.config.ssl || CONFIG.https_only, CONFIG.domain)
host_params = env.request.query_params host_params = env.request.query_params
host_params.delete_all("v") host_params.delete_all("v")
if video.info["hlsvp"]? if video.player_response["streamingData"]?.try &.["hlsManifestUrl"]?
hlsvp = video.info["hlsvp"] hlsvp = video.player_response["streamingData"]["hlsManifestUrl"].as_s
hlsvp = hlsvp.gsub("https://manifest.googlevideo.com", host_url) hlsvp = hlsvp.gsub("https://manifest.googlevideo.com", host_url)
end end
@ -392,9 +404,7 @@ get "/watch" do |env|
rvs << HTTP::Params.parse(rv).to_h rvs << HTTP::Params.parse(rv).to_h
end end
# rating = (video.likes.to_f/(video.likes.to_f + video.dislikes.to_f) * 4 + 1)
rating = video.info["avg_rating"].to_f64 rating = video.info["avg_rating"].to_f64
engagement = ((video.dislikes.to_f + video.likes.to_f)/video.views * 100) engagement = ((video.dislikes.to_f + video.likes.to_f)/video.views * 100)
playability_status = video.player_response["playabilityStatus"]? playability_status = video.player_response["playabilityStatus"]?
@ -466,12 +476,12 @@ get "/embed/:id" do |env|
video.description = replace_links(video.description) video.description = replace_links(video.description)
description = video.short_description description = video.short_description
host_url = make_host_url(Kemal.config.ssl || CONFIG.https_only, env.request.headers["Host"]?) host_url = make_host_url(Kemal.config.ssl || CONFIG.https_only, CONFIG.domain)
host_params = env.request.query_params host_params = env.request.query_params
host_params.delete_all("v") host_params.delete_all("v")
if video.info["hlsvp"]? if video.player_response["streamingData"]?.try &.["hlsManifestUrl"]?
hlsvp = video.info["hlsvp"] hlsvp = video.player_response["streamingData"]["hlsManifestUrl"].as_s
hlsvp = hlsvp.gsub("https://manifest.googlevideo.com", host_url) hlsvp = hlsvp.gsub("https://manifest.googlevideo.com", host_url)
end end
@ -552,14 +562,16 @@ get "/opensearch.xml" do |env|
locale = LOCALES[env.get("locale").as(String)]? locale = LOCALES[env.get("locale").as(String)]?
env.response.content_type = "application/opensearchdescription+xml" env.response.content_type = "application/opensearchdescription+xml"
host = make_host_url(Kemal.config.ssl || CONFIG.https_only, CONFIG.domain)
XML.build(indent: " ", encoding: "UTF-8") do |xml| XML.build(indent: " ", encoding: "UTF-8") do |xml|
xml.element("OpenSearchDescription", xmlns: "http://a9.com/-/spec/opensearch/1.1/") do xml.element("OpenSearchDescription", xmlns: "http://a9.com/-/spec/opensearch/1.1/") do
xml.element("ShortName") { xml.text "Invidious" } xml.element("ShortName") { xml.text "Invidious" }
xml.element("LongName") { xml.text "Invidious Search" } xml.element("LongName") { xml.text "Invidious Search" }
xml.element("Description") { xml.text "Search for videos, channels, and playlists on Invidious" } xml.element("Description") { xml.text "Search for videos, channels, and playlists on Invidious" }
xml.element("InputEncoding") { xml.text "UTF-8" } xml.element("InputEncoding") { xml.text "UTF-8" }
xml.element("Image", width: 48, height: 48, type: "image/x-icon") { xml.text "https://invidio.us/favicon.ico" } xml.element("Image", width: 48, height: 48, type: "image/x-icon") { xml.text "#{host}/favicon.ico" }
xml.element("Url", type: "text/html", method: "get", template: "https://invidio.us/search?q={searchTerms}") xml.element("Url", type: "text/html", method: "get", template: "#{host}/search?q={searchTerms}")
end end
end end
end end
@ -802,7 +814,7 @@ post "/login" do |env|
if challenge_results[0][-1][0].as_a? if challenge_results[0][-1][0].as_a?
# Prefer Authenticator app and SMS over unsupported protocols # Prefer Authenticator app and SMS over unsupported protocols
if challenge_results[0][-1][0][0][8] != 6 || challenge_results[0][-1][0][0][8] != 9 if challenge_results[0][-1][0][0][8] != 6 && challenge_results[0][-1][0][0][8] != 9
tfa = challenge_results[0][-1][0].as_a.select { |auth_type| auth_type[8] == 6 || auth_type[8] == 9 }[0] tfa = challenge_results[0][-1][0].as_a.select { |auth_type| auth_type[8] == 6 || auth_type[8] == 9 }[0]
select_challenge = "[#{challenge_results[0][-1][0].as_a.index(tfa).not_nil!}]" select_challenge = "[#{challenge_results[0][-1][0].as_a.index(tfa).not_nil!}]"
@ -1021,7 +1033,7 @@ post "/login" do |env|
view_name = "subscriptions_#{sha256(user.email)[0..7]}" view_name = "subscriptions_#{sha256(user.email)[0..7]}"
PG_DB.exec("CREATE MATERIALIZED VIEW #{view_name} AS \ PG_DB.exec("CREATE MATERIALIZED VIEW #{view_name} AS \
SELECT * FROM channel_videos WHERE \ SELECT * FROM channel_videos WHERE \
ucid = ANY ((SELECT subscriptions FROM users WHERE email = '#{user.email}')::text[]) \ ucid = ANY ((SELECT subscriptions FROM users WHERE email = E'#{user.email.gsub("'", "\\'")}')::text[]) \
ORDER BY published DESC;") ORDER BY published DESC;")
if Kemal.config.ssl || CONFIG.https_only if Kemal.config.ssl || CONFIG.https_only
@ -1116,21 +1128,21 @@ post "/preferences" do |env|
listen = listen == "on" listen = listen == "on"
speed = env.params.body["speed"]?.try &.as(String).to_f? speed = env.params.body["speed"]?.try &.as(String).to_f?
speed ||= 1.0 speed ||= DEFAULT_USER_PREFERENCES.speed
quality = env.params.body["quality"]?.try &.as(String) quality = env.params.body["quality"]?.try &.as(String)
quality ||= "hd720" quality ||= DEFAULT_USER_PREFERENCES.quality
volume = env.params.body["volume"]?.try &.as(String).to_i? volume = env.params.body["volume"]?.try &.as(String).to_i?
volume ||= 100 volume ||= DEFAULT_USER_PREFERENCES.volume
comments_0 = env.params.body["comments_0"]?.try &.as(String) || "youtube" comments_0 = env.params.body["comments_0"]?.try &.as(String) || DEFAULT_USER_PREFERENCES.comments[0]
comments_1 = env.params.body["comments_1"]?.try &.as(String) || "" comments_1 = env.params.body["comments_1"]?.try &.as(String) || DEFAULT_USER_PREFERENCES.comments[1]
comments = [comments_0, comments_1] comments = [comments_0, comments_1]
captions_0 = env.params.body["captions_0"]?.try &.as(String) || "" captions_0 = env.params.body["captions_0"]?.try &.as(String) || DEFAULT_USER_PREFERENCES.captions[0]
captions_1 = env.params.body["captions_1"]?.try &.as(String) || "" captions_1 = env.params.body["captions_1"]?.try &.as(String) || DEFAULT_USER_PREFERENCES.captions[1]
captions_2 = env.params.body["captions_2"]?.try &.as(String) || "" captions_2 = env.params.body["captions_2"]?.try &.as(String) || DEFAULT_USER_PREFERENCES.captions[2]
captions = [captions_0, captions_1, captions_2] captions = [captions_0, captions_1, captions_2]
related_videos = env.params.body["related_videos"]?.try &.as(String) related_videos = env.params.body["related_videos"]?.try &.as(String)
@ -1142,7 +1154,7 @@ post "/preferences" do |env|
redirect_feed = redirect_feed == "on" redirect_feed = redirect_feed == "on"
locale = env.params.body["locale"]?.try &.as(String) locale = env.params.body["locale"]?.try &.as(String)
locale ||= "en-US" locale ||= DEFAULT_USER_PREFERENCES.locale
dark_mode = env.params.body["dark_mode"]?.try &.as(String) dark_mode = env.params.body["dark_mode"]?.try &.as(String)
dark_mode ||= "off" dark_mode ||= "off"
@ -1153,10 +1165,10 @@ post "/preferences" do |env|
thin_mode = thin_mode == "on" thin_mode = thin_mode == "on"
max_results = env.params.body["max_results"]?.try &.as(String).to_i? max_results = env.params.body["max_results"]?.try &.as(String).to_i?
max_results ||= 40 max_results ||= DEFAULT_USER_PREFERENCES.max_results
sort = env.params.body["sort"]?.try &.as(String) sort = env.params.body["sort"]?.try &.as(String)
sort ||= "published" sort ||= DEFAULT_USER_PREFERENCES.sort
latest_only = env.params.body["latest_only"]?.try &.as(String) latest_only = env.params.body["latest_only"]?.try &.as(String)
latest_only ||= "off" latest_only ||= "off"
@ -1367,7 +1379,7 @@ get "/subscription_manager" do |env|
subscriptions.sort_by! { |channel| channel.author.downcase } subscriptions.sort_by! { |channel| channel.author.downcase }
if action_takeout if action_takeout
host_url = make_host_url(Kemal.config.ssl || CONFIG.https_only, env.request.headers["Host"]?) host_url = make_host_url(Kemal.config.ssl || CONFIG.https_only, CONFIG.domain)
if format == "json" if format == "json"
env.response.content_type = "application/json" env.response.content_type = "application/json"
@ -1915,7 +1927,7 @@ get "/feed/channel/:ucid" do |env|
videos, count = get_60_videos(ucid, page, auto_generated) videos, count = get_60_videos(ucid, page, auto_generated)
videos.select! { |video| !video.paid } videos.select! { |video| !video.paid }
host_url = make_host_url(Kemal.config.ssl || CONFIG.https_only, env.request.headers["Host"]?) host_url = make_host_url(Kemal.config.ssl || CONFIG.https_only, CONFIG.domain)
path = env.request.path path = env.request.path
feed = XML.build(indent: " ", encoding: "UTF-8") do |xml| feed = XML.build(indent: " ", encoding: "UTF-8") do |xml|
@ -2037,7 +2049,7 @@ get "/feed/private" do |env|
videos = videos[0..max_results] videos = videos[0..max_results]
end end
host_url = make_host_url(Kemal.config.ssl || CONFIG.https_only, env.request.headers["Host"]?) host_url = make_host_url(Kemal.config.ssl || CONFIG.https_only, CONFIG.domain)
path = env.request.path path = env.request.path
query = env.request.query.not_nil! query = env.request.query.not_nil!
@ -2084,7 +2096,7 @@ get "/feed/playlist/:plid" do |env|
plid = env.params.url["plid"] plid = env.params.url["plid"]
host_url = make_host_url(Kemal.config.ssl || CONFIG.https_only, env.request.headers["Host"]?) host_url = make_host_url(Kemal.config.ssl || CONFIG.https_only, CONFIG.domain)
path = env.request.path path = env.request.path
client = make_client(YT_URL) client = make_client(YT_URL)
@ -2134,6 +2146,16 @@ get "/c/:user" do |env|
env.redirect anchor["href"] env.redirect anchor["href"]
end end
# Legacy endpoint for /user/:username
get "/profile" do |env|
user = env.params.query["user"]?
if !user
env.redirect "/"
else
env.redirect "/user/#{user}"
end
end
get "/user/:user" do |env| get "/user/:user" do |env|
user = env.params.url["user"] user = env.params.url["user"]
env.redirect "/channel/#{user}" env.redirect "/channel/#{user}"
@ -2170,7 +2192,7 @@ get "/channel/:ucid" do |env|
end end
if !auto_generated if !auto_generated
if author.includes? " " if author.includes?(" ") || author.includes?("-")
env.set "search", "channel:#{ucid} " env.set "search", "channel:#{ucid} "
else else
env.set "search", "channel:#{author.downcase} " env.set "search", "channel:#{author.downcase} "
@ -2240,7 +2262,11 @@ get "/api/v1/captions/:id" do |env|
end end
end end
next response if env.params.query["pretty"]? && env.params.query["pretty"] == "1"
next JSON.parse(response).to_pretty_json
else
next response
end
end end
env.response.content_type = "text/vtt" env.response.content_type = "text/vtt"
@ -2346,13 +2372,24 @@ get "/api/v1/comments/:id" do |env|
if format == "json" if format == "json"
reddit_thread = JSON.parse(reddit_thread.to_json).as_h reddit_thread = JSON.parse(reddit_thread.to_json).as_h
reddit_thread["comments"] = JSON.parse(comments.to_json) reddit_thread["comments"] = JSON.parse(comments.to_json)
next reddit_thread.to_json
if env.params.query["pretty"]? && env.params.query["pretty"] == "1"
next reddit_thread.to_pretty_json
else
next reddit_thread.to_json
end
else else
next { response = {
"title" => reddit_thread.title, "title" => reddit_thread.title,
"permalink" => reddit_thread.permalink, "permalink" => reddit_thread.permalink,
"contentHtml" => content_html, "contentHtml" => content_html,
}.to_json }
if env.params.query["pretty"]? && env.params.query["pretty"] == "1"
next response.to_pretty_json
else
next response.to_json
end
end end
end end
end end
@ -2363,6 +2400,9 @@ get "/api/v1/insights/:id" do |env|
id = env.params.url["id"] id = env.params.url["id"]
env.response.content_type = "application/json" env.response.content_type = "application/json"
error_message = {"error" => "YouTube has removed publicly-available analytics."}.to_json
halt env, status_code: 503, response: error_message
client = make_client(YT_URL) client = make_client(YT_URL)
headers = HTTP::Headers.new headers = HTTP::Headers.new
html = client.get("/watch?v=#{id}&gl=US&hl=en&disable_polymer=1") html = client.get("/watch?v=#{id}&gl=US&hl=en&disable_polymer=1")
@ -2429,14 +2469,20 @@ get "/api/v1/insights/:id" do |env|
avg_view_duration_seconds = html_content.xpath_node(%q(//div[@id="stats-chart-tab-watch-time"]/span/span[2])).not_nil!.content avg_view_duration_seconds = html_content.xpath_node(%q(//div[@id="stats-chart-tab-watch-time"]/span/span[2])).not_nil!.content
avg_view_duration_seconds = decode_length_seconds(avg_view_duration_seconds) avg_view_duration_seconds = decode_length_seconds(avg_view_duration_seconds)
{ response = {
"viewCount" => view_count, "viewCount" => view_count,
"timeWatchedText" => time_watched, "timeWatchedText" => time_watched,
"subscriptionsDriven" => subscriptions_driven, "subscriptionsDriven" => subscriptions_driven,
"shares" => shares, "shares" => shares,
"avgViewDurationSeconds" => avg_view_duration_seconds, "avgViewDurationSeconds" => avg_view_duration_seconds,
"graphData" => graph_data, "graphData" => graph_data,
}.to_json }
if env.params.query["pretty"]? && env.params.query["pretty"] == "1"
next response.to_pretty_json
else
next response.to_json
end
end end
get "/api/v1/videos/:id" do |env| get "/api/v1/videos/:id" do |env|
@ -2520,12 +2566,13 @@ get "/api/v1/videos/:id" do |env|
json.field "isListed", video.info["is_listed"] == "1" json.field "isListed", video.info["is_listed"] == "1"
end end
if video.info["hlsvp"]? if video.player_response["streamingData"]?.try &.["hlsManifestUrl"]?
host_url = make_host_url(Kemal.config.ssl || CONFIG.https_only, env.request.headers["Host"]?) host_url = make_host_url(Kemal.config.ssl || CONFIG.https_only, CONFIG.domain)
host_params = env.request.query_params host_params = env.request.query_params
host_params.delete_all("v") host_params.delete_all("v")
hlsvp = video.info["hlsvp"] hlsvp = video.player_response["streamingData"]["hlsManifestUrl"].as_s
hlsvp = hlsvp.gsub("https://manifest.googlevideo.com", host_url) hlsvp = hlsvp.gsub("https://manifest.googlevideo.com", host_url)
json.field "hlsUrl", hlsvp json.field "hlsUrl", hlsvp
@ -2641,12 +2688,18 @@ get "/api/v1/videos/:id" do |env|
end end
end end
video_info if env.params.query["pretty"]? && env.params.query["pretty"] == "1"
JSON.parse(video_info).to_pretty_json
else
video_info
end
end end
get "/api/v1/trending" do |env| get "/api/v1/trending" do |env|
locale = LOCALES[env.get("locale").as(String)]? locale = LOCALES[env.get("locale").as(String)]?
env.response.content_type = "application/json"
region = env.params.query["region"]? region = env.params.query["region"]?
trending_type = env.params.query["type"]? trending_type = env.params.query["type"]?
@ -2686,13 +2739,18 @@ get "/api/v1/trending" do |env|
end end
end end
env.response.content_type = "application/json" if env.params.query["pretty"]? && env.params.query["pretty"] == "1"
videos JSON.parse(videos).to_pretty_json
else
videos
end
end end
get "/api/v1/popular" do |env| get "/api/v1/popular" do |env|
locale = LOCALES[env.get("locale").as(String)]? locale = LOCALES[env.get("locale").as(String)]?
env.response.content_type = "application/json"
videos = JSON.build do |json| videos = JSON.build do |json|
json.array do json.array do
popular_videos.each do |video| popular_videos.each do |video|
@ -2715,13 +2773,18 @@ get "/api/v1/popular" do |env|
end end
end end
env.response.content_type = "application/json" if env.params.query["pretty"]? && env.params.query["pretty"] == "1"
videos JSON.parse(videos).to_pretty_json
else
videos
end
end end
get "/api/v1/top" do |env| get "/api/v1/top" do |env|
locale = LOCALES[env.get("locale").as(String)]? locale = LOCALES[env.get("locale").as(String)]?
env.response.content_type = "application/json"
videos = JSON.build do |json| videos = JSON.build do |json|
json.array do json.array do
top_videos.each do |video| top_videos.each do |video|
@ -2751,8 +2814,11 @@ get "/api/v1/top" do |env|
end end
end end
env.response.content_type = "application/json" if env.params.query["pretty"]? && env.params.query["pretty"] == "1"
videos JSON.parse(videos).to_pretty_json
else
videos
end
end end
get "/api/v1/channels/:ucid" do |env| get "/api/v1/channels/:ucid" do |env|
@ -2949,7 +3015,11 @@ get "/api/v1/channels/:ucid" do |env|
end end
end end
channel_info if env.params.query["pretty"]? && env.params.query["pretty"] == "1"
JSON.parse(channel_info).to_pretty_json
else
channel_info
end
end end
["/api/v1/channels/:ucid/videos", "/api/v1/channels/videos/:ucid"].each do |route| ["/api/v1/channels/:ucid/videos", "/api/v1/channels/videos/:ucid"].each do |route|
@ -3014,7 +3084,11 @@ end
end end
end end
result if env.params.query["pretty"]? && env.params.query["pretty"] == "1"
JSON.parse(result).to_pretty_json
else
result
end
end end
end end
@ -3115,7 +3189,11 @@ get "/api/v1/channels/search/:ucid" do |env|
end end
end end
response if env.params.query["pretty"]? && env.params.query["pretty"] == "1"
JSON.parse(response).to_pretty_json
else
response
end
end end
get "/api/v1/search" do |env| get "/api/v1/search" do |env|
@ -3240,7 +3318,11 @@ get "/api/v1/search" do |env|
end end
end end
response if env.params.query["pretty"]? && env.params.query["pretty"] == "1"
JSON.parse(response).to_pretty_json
else
response
end
end end
get "/api/v1/playlists/:plid" do |env| get "/api/v1/playlists/:plid" do |env|
@ -3339,7 +3421,11 @@ get "/api/v1/playlists/:plid" do |env|
}.to_json }.to_json
end end
response if env.params.query["pretty"]? && env.params.query["pretty"] == "1"
JSON.parse(response).to_pretty_json
else
response
end
end end
get "/api/v1/mixes/:rdid" do |env| get "/api/v1/mixes/:rdid" do |env|
@ -3413,7 +3499,11 @@ get "/api/v1/mixes/:rdid" do |env|
}.to_json }.to_json
end end
response if env.params.query["pretty"]? && env.params.query["pretty"] == "1"
JSON.parse(response).to_pretty_json
else
response
end
end end
get "/api/manifest/dash/id/videoplayback" do |env| get "/api/manifest/dash/id/videoplayback" do |env|
@ -3536,7 +3626,8 @@ get "/api/manifest/hls_variant/*" do |env|
env.response.content_type = "application/x-mpegURL" env.response.content_type = "application/x-mpegURL"
env.response.headers.add("Access-Control-Allow-Origin", "*") env.response.headers.add("Access-Control-Allow-Origin", "*")
host_url = make_host_url(Kemal.config.ssl || CONFIG.https_only, env.request.headers["Host"]) host_url = make_host_url(Kemal.config.ssl || CONFIG.https_only, CONFIG.domain)
manifest = manifest.body manifest = manifest.body
manifest.gsub("https://www.youtube.com", host_url) manifest.gsub("https://www.youtube.com", host_url)
end end
@ -3549,7 +3640,7 @@ get "/api/manifest/hls_playlist/*" do |env|
halt env, status_code: manifest.status_code halt env, status_code: manifest.status_code
end end
host_url = make_host_url(Kemal.config.ssl || CONFIG.https_only, env.request.headers["Host"]) host_url = make_host_url(Kemal.config.ssl || CONFIG.https_only, CONFIG.domain)
manifest = manifest.body.gsub("https://www.youtube.com", host_url) manifest = manifest.body.gsub("https://www.youtube.com", host_url)
manifest = manifest.gsub(/https:\/\/r\d---.{11}\.c\.youtube\.com/, host_url) manifest = manifest.gsub(/https:\/\/r\d---.{11}\.c\.youtube\.com/, host_url)
@ -3561,6 +3652,40 @@ get "/api/manifest/hls_playlist/*" do |env|
manifest manifest
end end
# YouTube /videoplayback links expire after 6 hours,
# so we have a mechanism here to redirect to the latest version
get "/latest_version" do |env|
id = env.params.query["id"]?
itag = env.params.query["itag"]?
local = env.params.query["local"]?
local ||= "false"
local = local == "true"
if !id || !itag
halt env, status_code: 400
end
video = get_video(id, PG_DB, proxies)
fmt_stream = video.fmt_stream(decrypt_function)
adaptive_fmts = video.adaptive_fmts(decrypt_function)
urls = (fmt_stream + adaptive_fmts).select { |fmt| fmt["itag"] == itag }
if urls.empty?
halt env, status_code: 404
elsif urls.size > 1
halt env, status_code: 409
end
url = urls[0]["url"]
if local
url = URI.parse(url).full_path.not_nil!
end
env.redirect url
end
options "/videoplayback" do |env| options "/videoplayback" do |env|
env.response.headers["Access-Control-Allow-Origin"] = "*" env.response.headers["Access-Control-Allow-Origin"] = "*"
env.response.headers["Access-Control-Allow-Methods"] = "GET, OPTIONS" env.response.headers["Access-Control-Allow-Methods"] = "GET, OPTIONS"
@ -3624,9 +3749,23 @@ get "/videoplayback" do |env|
host = "https://r#{fvip}---#{mn}.googlevideo.com" host = "https://r#{fvip}---#{mn}.googlevideo.com"
url = "/videoplayback?#{query_params.to_s}" url = "/videoplayback?#{query_params.to_s}"
headers = env.request.headers
headers.delete("Host")
headers.delete("Cookie")
headers.delete("User-Agent")
headers.delete("Referer")
region = query_params["region"]? region = query_params["region"]?
client = make_client(URI.parse(host), proxies, region)
response = client.head(url) response = HTTP::Client::Response.new(403)
loop do
begin
client = make_client(URI.parse(host), proxies, region)
response = client.head(url, headers)
break
rescue ex
end
end
if response.headers["Location"]? if response.headers["Location"]?
url = URI.parse(response.headers["Location"]) url = URI.parse(response.headers["Location"])
@ -3644,12 +3783,6 @@ get "/videoplayback" do |env|
halt env, status_code: 403 halt env, status_code: 403
end end
headers = env.request.headers
headers.delete("Host")
headers.delete("Cookie")
headers.delete("User-Agent")
headers.delete("Referer")
client = make_client(URI.parse(host), proxies, region) client = make_client(URI.parse(host), proxies, region)
client.get(url, headers) do |response| client.get(url, headers) do |response|
env.response.status_code = response.status_code env.response.status_code = response.status_code
@ -3800,12 +3933,21 @@ error 404 do |env|
halt env, status_code: 302 halt env, status_code: 302
end end
error_message = "404 Page not found" env.response.headers["Location"] = "/"
templated "error" halt env, status_code: 302
end end
error 500 do |env| error 500 do |env|
error_message = "500 Server error" error_message = <<-END_HTML
Looks like you've found a bug in Invidious. Feel free to open a new issue
<a href="https://github.com/omarroth/invidious/issues/github.com/omarroth/invidious">
here
</a>
or send an email to
<a href="mailto:omarroth@protonmail.com">
omarroth@protonmail.com
</a>.
END_HTML
templated "error" templated "error"
end end
@ -3835,6 +3977,8 @@ public_folder "assets"
Kemal.config.powered_by_header = false Kemal.config.powered_by_header = false
add_handler FilteredCompressHandler.new add_handler FilteredCompressHandler.new
add_handler DenyFrame.new add_handler DenyFrame.new
add_handler APIHandler.new
add_context_storage_type(User) add_context_storage_type(User)
Kemal.config.logger = logger
Kemal.run Kemal.run

View File

@ -202,50 +202,58 @@ def produce_channel_videos_url(ucid, page = 1, auto_generated = nil, sort_by = "
timestamp = seed - (page - 1).months timestamp = seed - (page - 1).months
page = "#{timestamp.to_unix}" page = "#{timestamp.to_unix}"
switch = "\x36" switch = 0x36
else else
page = "#{page}" page = "#{page}"
switch = "\x00" switch = 0x00
end end
meta = "\x12\x06videos" meta = IO::Memory.new
meta += "\x30\x02" meta.write(Bytes[0x12, 0x06])
meta += "\x38\x01" meta.print("videos")
meta += "\x60\x01"
meta += "\x6a\x00" meta.write(Bytes[0x30, 0x02])
meta += "\xb8\x01\x00" meta.write(Bytes[0x38, 0x01])
meta += "\x20#{switch}" meta.write(Bytes[0x60, 0x01])
meta += "\x7a" meta.write(Bytes[0x6a, 0x00])
meta += page.size.to_u8.unsafe_chr meta.write(Bytes[0xb8, 0x01, 0x00])
meta += page
meta.write(Bytes[0x20, switch, 0x7a, page.size])
meta.print(page)
case sort_by case sort_by
when "newest" when "newest"
# Empty tags can be omitted # Empty tags can be omitted
# meta += "\x18\x00" # meta.write(Bytes[0x18,0x00])
when "popular" when "popular"
meta += "\x18\x01" meta.write(Bytes[0x18, 0x01])
when "oldest" when "oldest"
meta += "\x18\x02" meta.write(Bytes[0x18, 0x02])
end end
meta = Base64.urlsafe_encode(meta) meta.rewind
meta = Base64.urlsafe_encode(meta.to_slice)
meta = URI.escape(meta) meta = URI.escape(meta)
continuation = "\x12" continuation = IO::Memory.new
continuation += ucid.size.to_u8.unsafe_chr continuation.write(Bytes[0x12, ucid.size])
continuation += ucid continuation.print(ucid)
continuation += "\x1a"
continuation += meta.size.to_u8.unsafe_chr
continuation += meta
continuation = continuation.size.to_u8.unsafe_chr + continuation continuation.write(Bytes[0x1a, meta.size])
continuation = "\xe2\xa9\x85\xb2\x02" + continuation continuation.print(meta)
continuation = Base64.urlsafe_encode(continuation) continuation.rewind
continuation = URI.escape(continuation) continuation = continuation.gets_to_end
url = "/browse_ajax?continuation=#{continuation}&gl=US&hl=en" wrapper = IO::Memory.new
wrapper.write(Bytes[0xe2, 0xa9, 0x85, 0xb2, 0x02, continuation.size])
wrapper.print(continuation)
wrapper.rewind
wrapper = Base64.urlsafe_encode(wrapper.to_slice)
wrapper = URI.escape(wrapper)
url = "/browse_ajax?continuation=#{wrapper}&gl=US&hl=en"
return url return url
end end

View File

@ -67,7 +67,7 @@ def fetch_youtube_comments(id, continuation, proxies, format, locale)
itct = body.match(/itct=(?<itct>[^"]+)"/).not_nil!["itct"] itct = body.match(/itct=(?<itct>[^"]+)"/).not_nil!["itct"]
ctoken = body.match(/'COMMENTS_TOKEN': "(?<ctoken>[^"]+)"/) ctoken = body.match(/'COMMENTS_TOKEN': "(?<ctoken>[^"]+)"/)
if body.match(/<meta itemprop="regionsAllowed" content="">/) if body.match(/<meta itemprop="regionsAllowed" content="">/) && !body.match(/player-age-gate-content\">/)
bypass_channel = Channel({String, HTTPClient, HTTP::Headers} | Nil).new bypass_channel = Channel({String, HTTPClient, HTTP::Headers} | Nil).new
proxies.each do |proxy_region, list| proxies.each do |proxy_region, list|
@ -79,7 +79,7 @@ def fetch_youtube_comments(id, continuation, proxies, format, locale)
proxy_headers["Cookie"] = response.cookies.add_request_headers(headers)["cookie"] proxy_headers["Cookie"] = response.cookies.add_request_headers(headers)["cookie"]
proxy_html = response.body proxy_html = response.body
if !proxy_html.match(/<meta itemprop="regionsAllowed" content="">/) if !proxy_html.match(/<meta itemprop="regionsAllowed" content="">/) && !proxy_html.match(/player-age-gate-content\">/)
bypass_channel.send({proxy_html, proxy_client, proxy_headers}) bypass_channel.send({proxy_html, proxy_client, proxy_headers})
else else
bypass_channel.send(nil) bypass_channel.send(nil)
@ -159,6 +159,8 @@ def fetch_youtube_comments(id, continuation, proxies, format, locale)
json.field "commentCount", comment_count json.field "commentCount", comment_count
end end
json.field "videoId", id
json.field "comments" do json.field "comments" do
json.array do json.array do
contents.as_a.each do |node| contents.as_a.each do |node|
@ -209,7 +211,14 @@ def fetch_youtube_comments(id, continuation, proxies, format, locale)
json.field "authorUrl", "" json.field "authorUrl", ""
end end
published = decode_date(node_comment["publishedTimeText"]["runs"][0]["text"].as_s.rchop(" (edited)")) published_text = node_comment["publishedTimeText"]["runs"][0]["text"].as_s
published = decode_date(published_text.rchop(" (edited)"))
if published_text.includes?(" (edited)")
json.field "isEdited", true
else
json.field "isEdited", false
end
json.field "content", content json.field "content", content
json.field "contentHtml", content_html json.field "contentHtml", content_html
@ -217,6 +226,17 @@ def fetch_youtube_comments(id, continuation, proxies, format, locale)
json.field "publishedText", translate(locale, "`x` ago", recode_date(published)) json.field "publishedText", translate(locale, "`x` ago", recode_date(published))
json.field "likeCount", node_comment["likeCount"] json.field "likeCount", node_comment["likeCount"]
json.field "commentId", node_comment["commentId"] json.field "commentId", node_comment["commentId"]
json.field "authorIsChannelOwner", node_comment["authorIsChannelOwner"]
if node_comment["actionButtons"]["commentActionButtonsRenderer"]["creatorHeart"]?
hearth_data = node_comment["actionButtons"]["commentActionButtonsRenderer"]["creatorHeart"]["creatorHeartRenderer"]["creatorThumbnail"]
json.field "creatorHeart" do
json.object do
json.field "creatorThumbnail", hearth_data["thumbnails"][-1]["url"]
json.field "creatorName", hearth_data["accessibility"]["accessibilityData"]["label"]
end
end
end
if node_replies && !response["commentRepliesContinuation"]? if node_replies && !response["commentRepliesContinuation"]?
reply_count = node_replies["moreText"]["simpleText"].as_s.delete("View all reply replies,") reply_count = node_replies["moreText"]["simpleText"].as_s.delete("View all reply replies,")
@ -227,7 +247,8 @@ def fetch_youtube_comments(id, continuation, proxies, format, locale)
reply_count ||= 1 reply_count ||= 1
end end
continuation = node_replies["continuations"].as_a[0]["nextContinuationData"]["continuation"].as_s continuation = node_replies["continuations"]?.try &.as_a[0]["nextContinuationData"]["continuation"].as_s
continuation ||= ""
json.field "replies" do json.field "replies" do
json.object do json.object do
@ -270,7 +291,7 @@ end
def fetch_reddit_comments(id) def fetch_reddit_comments(id)
client = make_client(REDDIT_URL) client = make_client(REDDIT_URL)
headers = HTTP::Headers{"User-Agent" => "web:invidio.us:v0.13.0 (by /u/omarroth)"} headers = HTTP::Headers{"User-Agent" => "web:invidio.us:v0.13.1 (by /u/omarroth)"}
query = "(url:3D#{id}%20OR%20url:#{id})%20(site:youtube.com%20OR%20site:youtu.be)" query = "(url:3D#{id}%20OR%20url:#{id})%20(site:youtube.com%20OR%20site:youtu.be)"
search_results = client.get("/search.json?q=#{query}", headers) search_results = client.get("/search.json?q=#{query}", headers)
@ -325,12 +346,31 @@ def template_youtube_comments(comments, locale)
<div class="pure-u-20-24 pure-u-md-22-24"> <div class="pure-u-20-24 pure-u-md-22-24">
<p> <p>
<b> <b>
<a href="#{child["authorUrl"]}">#{child["author"]}</a> <a class="#{child["authorIsChannelOwner"] == true ? "channel-owner" : ""}" href="#{child["authorUrl"]}">#{child["author"]}</a>
</b> </b>
<p style="white-space:pre-wrap">#{child["contentHtml"]}</p> <p style="white-space:pre-wrap">#{child["contentHtml"]}</p>
#{translate(locale, "`x` ago", recode_date(Time.unix(child["published"].as_i64)))} <span title="#{Time.unix(child["published"].as_i64).to_s(translate(locale, "%A %B %-d, %Y"))}">#{translate(locale, "`x` ago", recode_date(Time.unix(child["published"].as_i64)))} #{child["isEdited"] == true ? translate(locale, "(edited)") : ""}</span>
|
<a href="https://www.youtube.com/watch?v=#{comments["videoId"]}&lc=#{child["commentId"]}" title="#{translate(locale, "Youtube permalink of the comment")}">[YT]</a>
| |
<i class="icon ion-ios-thumbs-up"></i> #{number_with_separator(child["likeCount"])} <i class="icon ion-ios-thumbs-up"></i> #{number_with_separator(child["likeCount"])}
END_HTML
if child["creatorHeart"]?
creator_thumbnail = "/ggpht#{URI.parse(child["creatorHeart"]["creatorThumbnail"].as_s).full_path}"
html += <<-END_HTML
<span class="creator-heart-container" title="#{translate(locale, "`x` marked it with a ❤", child["creatorHeart"]["creatorName"].as_s)}">
<div class="creator-heart">
<img class="creator-heart-background-hearted" src="#{creator_thumbnail}"></img>
<div class="creator-heart-small-hearted">
<div class="creator-heart-small-container">🖤</div>
</div>
</div>
</span>
END_HTML
end
html += <<-END_HTML
</p> </p>
#{replies_html} #{replies_html}
</div> </div>
@ -488,10 +528,14 @@ def content_to_comment_html(content)
text = %(<a href="#{url}">#{text}</a>) text = %(<a href="#{url}">#{text}</a>)
elsif watch_endpoint = run["navigationEndpoint"]["watchEndpoint"]? elsif watch_endpoint = run["navigationEndpoint"]["watchEndpoint"]?
length_seconds = watch_endpoint["startTimeSeconds"].as_i length_seconds = watch_endpoint["startTimeSeconds"]?
video_id = watch_endpoint["videoId"].as_s video_id = watch_endpoint["videoId"].as_s
text = %(<a href="javascript:void(0)" onclick="player.currentTime(#{length_seconds})">#{text}</a>) if length_seconds
text = %(<a href="javascript:void(0)" onclick="player.currentTime(#{length_seconds})">#{text}</a>)
else
text = %(<a href="/watch?v=#{video_id}">#{text}</a>)
end
elsif url = run["navigationEndpoint"]["commandMetadata"]?.try &.["webCommandMetadata"]["url"].as_s elsif url = run["navigationEndpoint"]["commandMetadata"]?.try &.["webCommandMetadata"]["url"].as_s
text = %(<a href="#{url}">#{text}</a>) text = %(<a href="#{url}">#{text}</a>)
end end

View File

@ -1,21 +1,21 @@
class Config class Config
YAML.mapping({ YAML.mapping({
crawl_threads: Int32, crawl_threads: Int32, # Number of threads to use for finding new videos from YouTube (used to populate "top" page)
channel_threads: Int32, channel_threads: Int32, # Number of threads to use for crawling videos from channels (for updating subscriptions)
feed_threads: Int32, feed_threads: Int32, # Number of threads to use for updating feeds
video_threads: Int32, video_threads: Int32, # Number of threads to use for updating videos in cache (mostly non-functional)
db: NamedTuple( db: NamedTuple( # Database configuration
user: String, user: String,
password: String, password: String,
host: String, host: String,
port: Int32, port: Int32,
dbname: String, dbname: String,
), ),
dl_api_key: String?, dl_api_key: String?, # DetectLanguage API Key (used to filter non-English results from "top" page), mostly non-functional
https_only: Bool?, https_only: Bool?, # Used to tell Invidious it is behind a proxy, so links to resources should be https://
hmac_key: String?, hmac_key: String?, # HMAC signing key for CSRF tokens
full_refresh: Bool, full_refresh: Bool, # Used for crawling channels: threads should check all videos uploaded by a channel
domain: String?, domain: String, # Domain to be used for links to resources on the site where an absolute URL is required
}) })
end end
@ -43,6 +43,18 @@ class FilteredCompressHandler < Kemal::Handler
end end
end end
class APIHandler < Kemal::Handler
only ["/api/v1/*"]
def call(env)
return call_next env unless only_match? env
env.response.headers["Access-Control-Allow-Origin"] = "*"
call_next env
end
end
class DenyFrame < Kemal::Handler class DenyFrame < Kemal::Handler
exclude ["/embed/*"] exclude ["/embed/*"]

View File

@ -0,0 +1,35 @@
require "logger"
class Invidious::LogHandler < Kemal::BaseLogHandler
def initialize(@io : IO = STDOUT)
end
def call(context : HTTP::Server::Context)
time = Time.now
call_next(context)
elapsed_text = elapsed_text(Time.now - time)
@io << time << ' ' << context.response.status_code << ' ' << context.request.method << ' ' << context.request.resource << ' ' << elapsed_text << '\n'
if @io.is_a? File
@io.flush
end
context
end
def write(message : String)
@io << message
if @io.is_a? File
@io.flush
end
end
private def elapsed_text(elapsed)
millis = elapsed.total_milliseconds
return "#{millis.round(2)}ms" if millis >= 1
"#{(millis * 1000).round(2)}µs"
end
end

View File

@ -205,8 +205,6 @@ def make_host_url(ssl, host)
scheme = "http://" scheme = "http://"
end end
host ||= "invidio.us"
return "#{scheme}#{host}" return "#{scheme}#{host}"
end end
@ -284,7 +282,7 @@ def write_var_int(value : Int)
end end
end end
return bytes return Slice.new(bytes.to_unsafe, bytes.size)
end end
def sha256(text) def sha256(text)

View File

@ -1,4 +1,4 @@
def crawl_videos(db) def crawl_videos(db, logger)
ids = Deque(String).new ids = Deque(String).new
random = Random.new random = Random.new
@ -21,7 +21,7 @@ def crawl_videos(db)
id = ids[0] id = ids[0]
video = get_video(id, db) video = get_video(id, db)
rescue ex rescue ex
STDOUT << id << " : " << ex.message << "\n" logger.write("#{id} : #{ex.message}\n")
next next
ensure ensure
ids.delete(id) ids.delete(id)
@ -46,7 +46,7 @@ def crawl_videos(db)
end end
end end
def refresh_channels(db, max_threads = 1, full_refresh = false) def refresh_channels(db, logger, max_threads = 1, full_refresh = false)
max_channel = Channel(Int32).new max_channel = Channel(Int32).new
spawn do spawn do
@ -73,7 +73,7 @@ def refresh_channels(db, max_threads = 1, full_refresh = false)
db.exec("UPDATE channels SET updated = $1, author = $2 WHERE id = $3", Time.now, channel.author, id) db.exec("UPDATE channels SET updated = $1, author = $2 WHERE id = $3", Time.now, channel.author, id)
rescue ex rescue ex
STDOUT << id << " : " << ex.message << "\n" logger.write("#{id} : #{ex.message}\n")
end end
active_channel.send(true) active_channel.send(true)
@ -86,7 +86,7 @@ def refresh_channels(db, max_threads = 1, full_refresh = false)
max_channel.send(max_threads) max_channel.send(max_threads)
end end
def refresh_videos(db) def refresh_videos(db, logger)
loop do loop do
db.query("SELECT id FROM videos ORDER BY updated") do |rs| db.query("SELECT id FROM videos ORDER BY updated") do |rs|
rs.each do rs.each do
@ -94,7 +94,7 @@ def refresh_videos(db)
id = rs.read(String) id = rs.read(String)
video = get_video(id, db) video = get_video(id, db)
rescue ex rescue ex
STDOUT << id << " : " << ex.message << "\n" logger.write("#{id} : #{ex.message}\n")
next next
end end
end end
@ -104,7 +104,7 @@ def refresh_videos(db)
end end
end end
def refresh_feeds(db, max_threads = 1) def refresh_feeds(db, logger, max_threads = 1)
max_channel = Channel(Int32).new max_channel = Channel(Int32).new
spawn do spawn do
@ -129,7 +129,7 @@ def refresh_feeds(db, max_threads = 1)
begin begin
db.exec("REFRESH MATERIALIZED VIEW #{view_name}") db.exec("REFRESH MATERIALIZED VIEW #{view_name}")
rescue ex rescue ex
STDOUT << "REFRESH " << email << " : " << ex.message << "\n" logger.write("REFRESH #{email} : #{ex.message}\n")
end end
active_channel.send(true) active_channel.send(true)

View File

@ -126,32 +126,37 @@ def produce_playlist_url(id, index)
end end
ucid = "VL" + id ucid = "VL" + id
meta = [0x08_u8] + write_var_int(index) meta = IO::Memory.new
meta = Slice.new(meta.to_unsafe, meta.size) meta.write(Bytes[0x08])
meta = Base64.urlsafe_encode(meta, false) meta.write(write_var_int(index))
meta.rewind
meta = Base64.urlsafe_encode(meta.to_slice, false)
meta = "PT:#{meta}" meta = "PT:#{meta}"
wrapped = "\x7a" continuation = IO::Memory.new
wrapped += meta.bytes.size.unsafe_chr continuation.write(Bytes[0x7a, meta.size])
wrapped += meta continuation.print(meta)
wrapped = Base64.urlsafe_encode(wrapped) continuation.rewind
meta = URI.escape(wrapped) meta = Base64.urlsafe_encode(continuation.to_slice)
meta = URI.escape(meta)
continuation = "\x12" continuation = IO::Memory.new
continuation += ucid.size.unsafe_chr continuation.write(Bytes[0x12, ucid.size])
continuation += ucid continuation.print(ucid)
continuation += "\x1a" continuation.write(Bytes[0x1a, meta.size])
continuation += meta.bytes.size.unsafe_chr continuation.print(meta)
continuation += meta
continuation = continuation.size.to_u8.unsafe_chr + continuation wrapper = IO::Memory.new
continuation = "\xe2\xa9\x85\xb2\x02" + continuation wrapper.write(Bytes[0xe2, 0xa9, 0x85, 0xb2, 0x02, continuation.size])
wrapper.print(continuation)
wrapper.rewind
continuation = Base64.urlsafe_encode(continuation) wrapper = Base64.urlsafe_encode(wrapper.to_slice)
continuation = URI.escape(continuation) wrapper = URI.escape(wrapper)
url = "/browse_ajax?continuation=#{continuation}" url = "/browse_ajax?continuation=#{wrapper}&gl=US&hl=en"
return url return url
end end

View File

@ -203,36 +203,45 @@ end
def produce_channel_search_url(ucid, query, page) def produce_channel_search_url(ucid, query, page)
page = "#{page}" page = "#{page}"
meta = "\x12\x06search" meta = IO::Memory.new
meta += "\x30\x02" meta.write(Bytes[0x12, 0x06])
meta += "\x38\x01" meta.print("search")
meta += "\x60\x01"
meta += "\x6a\x00"
meta += "\xb8\x01\x00"
meta += "\x7a"
meta += page.size.unsafe_chr
meta += page
meta = Base64.urlsafe_encode(meta) meta.write(Bytes[0x30, 0x02])
meta.write(Bytes[0x38, 0x01])
meta.write(Bytes[0x60, 0x01])
meta.write(Bytes[0x6a, 0x00])
meta.write(Bytes[0xb8, 0x01, 0x00])
meta.write(Bytes[0x7a, page.size])
meta.print(page)
meta.rewind
meta = Base64.urlsafe_encode(meta.to_slice)
meta = URI.escape(meta) meta = URI.escape(meta)
continuation = "\x12" continuation = IO::Memory.new
continuation += ucid.size.unsafe_chr continuation.write(Bytes[0x12, ucid.size])
continuation += ucid continuation.print(ucid)
continuation += "\x1a"
continuation += meta.size.unsafe_chr
continuation += meta
continuation += "\x5a"
continuation += query.size.unsafe_chr
continuation += query
continuation = continuation.size.unsafe_chr + continuation continuation.write(Bytes[0x1a, meta.size])
continuation = "\xe2\xa9\x85\xb2\x02" + continuation continuation.print(meta)
continuation = Base64.urlsafe_encode(continuation) continuation.write(Bytes[0x5a, query.size])
continuation = URI.escape(continuation) continuation.print(query)
url = "/browse_ajax?continuation=#{continuation}" continuation.rewind
continuation = continuation.gets_to_end
wrapper = IO::Memory.new
wrapper.write(Bytes[0xe2, 0xa9, 0x85, 0xb2, 0x02, continuation.size])
wrapper.print(continuation)
wrapper.rewind
wrapper = Base64.urlsafe_encode(wrapper.to_slice)
wrapper = URI.escape(wrapper)
url = "/browse_ajax?continuation=#{wrapper}&gl=US&hl=en"
return url return url
end end

View File

@ -79,36 +79,36 @@ class Preferences
autoplay: Bool, autoplay: Bool,
continue: { continue: {
type: Bool, type: Bool,
default: false, default: DEFAULT_USER_PREFERENCES.continue,
}, },
listen: { listen: {
type: Bool, type: Bool,
default: false, default: DEFAULT_USER_PREFERENCES.listen,
}, },
speed: Float32, speed: Float32,
quality: String, quality: String,
volume: Int32, volume: Int32,
comments: { comments: {
type: Array(String), type: Array(String),
default: ["youtube", ""], default: DEFAULT_USER_PREFERENCES.comments,
converter: StringToArray, converter: StringToArray,
}, },
captions: { captions: {
type: Array(String), type: Array(String),
default: ["", "", ""], default: DEFAULT_USER_PREFERENCES.captions,
}, },
redirect_feed: { redirect_feed: {
type: Bool, type: Bool,
default: false, default: DEFAULT_USER_PREFERENCES.redirect_feed,
}, },
related_videos: { related_videos: {
type: Bool, type: Bool,
default: true, default: DEFAULT_USER_PREFERENCES.related_videos,
}, },
dark_mode: Bool, dark_mode: Bool,
thin_mode: { thin_mode: {
type: Bool, type: Bool,
default: false, default: DEFAULT_USER_PREFERENCES.thin_mode,
}, },
max_results: Int32, max_results: Int32,
sort: String, sort: String,
@ -116,11 +116,11 @@ class Preferences
unseen_only: Bool, unseen_only: Bool,
notifications_only: { notifications_only: {
type: Bool, type: Bool,
default: false, default: DEFAULT_USER_PREFERENCES.notifications_only,
}, },
locale: { locale: {
type: String, type: String,
default: "en-US", default: DEFAULT_USER_PREFERENCES.locale,
}, },
}) })
end end

View File

@ -137,7 +137,7 @@ BYPASS_REGIONS = {
} }
VIDEO_THUMBNAILS = { VIDEO_THUMBNAILS = {
{name: "maxres", host: "invidio.us", url: "maxres", height: 720, width: 1280}, {name: "maxres", host: "#{CONFIG.domain}", url: "maxres", height: 720, width: 1280},
{name: "maxresdefault", host: "i.ytimg.com", url: "maxresdefault", height: 720, width: 1280}, {name: "maxresdefault", host: "i.ytimg.com", url: "maxresdefault", height: 720, width: 1280},
{name: "sddefault", host: "i.ytimg.com", url: "sddefault", height: 480, width: 640}, {name: "sddefault", host: "i.ytimg.com", url: "sddefault", height: 480, width: 640},
{name: "high", host: "i.ytimg.com", url: "hqdefault", height: 360, width: 480}, {name: "high", host: "i.ytimg.com", url: "hqdefault", height: 360, width: 480},
@ -633,6 +633,10 @@ def fetch_video(id, proxies, region)
end end
end end
if info["errorcode"]?.try &.== "2"
raise "Video unavailable."
end
title = info["title"] title = info["title"]
author = info["author"] author = info["author"]
ucid = info["ucid"] ucid = info["ucid"]
@ -649,7 +653,9 @@ def fetch_video(id, proxies, region)
dislikes = dislikes.try &.content.delete(",").try &.to_i? dislikes = dislikes.try &.content.delete(",").try &.to_i?
dislikes ||= 0 dislikes ||= 0
info["avg_rating"] = "#{(likes.to_f/(likes.to_f + dislikes.to_f) * 4 + 1)}" avg_rating = (likes.to_f/(likes.to_f + dislikes.to_f) * 4 + 1)
avg_rating = avg_rating.nan? ? 0.0 : avg_rating
info["avg_rating"] = "#{avg_rating}"
description = html.xpath_node(%q(//p[@id="eow-description"])) description = html.xpath_node(%q(//p[@id="eow-description"]))
description = description ? description.to_xml : "" description = description ? description.to_xml : ""
@ -668,13 +674,20 @@ def fetch_video(id, proxies, region)
genre = html.xpath_node(%q(//meta[@itemprop="genre"])).try &.["content"] genre = html.xpath_node(%q(//meta[@itemprop="genre"])).try &.["content"]
genre ||= "" genre ||= ""
genre_url = html.xpath_node(%(//a[text()="#{genre}"])).try &.["href"] 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
case genre case genre
when "Education"
genre_url = "/channel/UCdxpofrI-dO6oYfsqHDHphw"
when "Gaming"
genre_url = "/channel/UCOpNcN46UbXVtpKMrmU4Abg"
when "Movies" when "Movies"
genre_url = "/channel/UClgRkhTL3_hImCAmdLfDE4g" genre_url = "/channel/UClgRkhTL3_hImCAmdLfDE4g"
when "Education" when "Nonprofits & Activism"
# Education channel is linked but does not exist genre_url = "/channel/UCfFyYRYslvuhwMDnx6KjUvw"
genre_url = "/channel/UC3yA8nDwraeOfnYfBWun83g" when "Trailers"
genre_url = "/channel/UClgRkhTL3_hImCAmdLfDE4g"
end end
genre_url ||= "" genre_url ||= ""
@ -712,6 +725,7 @@ end
def process_video_params(query, preferences) def process_video_params(query, preferences)
autoplay = query["autoplay"]?.try &.to_i? autoplay = query["autoplay"]?.try &.to_i?
continue = query["continue"]?.try &.to_i? continue = query["continue"]?.try &.to_i?
related_videos = query["related_videos"]?
listen = query["listen"]? && (query["listen"] == "true" || query["listen"] == "1").to_unsafe listen = query["listen"]? && (query["listen"] == "true" || query["listen"] == "1").to_unsafe
preferred_captions = query["subtitles"]?.try &.split(",").map { |a| a.downcase } preferred_captions = query["subtitles"]?.try &.split(",").map { |a| a.downcase }
quality = query["quality"]? quality = query["quality"]?
@ -724,6 +738,7 @@ def process_video_params(query, preferences)
# region ||= preferences.region # region ||= preferences.region
autoplay ||= preferences.autoplay.to_unsafe autoplay ||= preferences.autoplay.to_unsafe
continue ||= preferences.continue.to_unsafe continue ||= preferences.continue.to_unsafe
related_videos ||= preferences.related_videos.to_unsafe
listen ||= preferences.listen.to_unsafe listen ||= preferences.listen.to_unsafe
preferred_captions ||= preferences.captions preferred_captions ||= preferences.captions
quality ||= preferences.quality quality ||= preferences.quality
@ -732,17 +747,19 @@ def process_video_params(query, preferences)
volume ||= preferences.volume volume ||= preferences.volume
end end
autoplay ||= 0 autoplay ||= DEFAULT_USER_PREFERENCES.autoplay.to_unsafe
continue ||= 0 continue ||= DEFAULT_USER_PREFERENCES.continue.to_unsafe
listen ||= 0 related_videos ||= DEFAULT_USER_PREFERENCES.related_videos.to_unsafe
preferred_captions ||= [] of String listen ||= DEFAULT_USER_PREFERENCES.listen.to_unsafe
quality ||= "hd720" preferred_captions ||= DEFAULT_USER_PREFERENCES.captions
speed ||= 1 quality ||= DEFAULT_USER_PREFERENCES.quality
video_loop ||= 0 speed ||= DEFAULT_USER_PREFERENCES.speed
volume ||= 100 video_loop ||= DEFAULT_USER_PREFERENCES.video_loop.to_unsafe
volume ||= DEFAULT_USER_PREFERENCES.volume
autoplay = autoplay == 1 autoplay = autoplay == 1
continue = continue == 1 continue = continue == 1
related_videos = related_videos == 1
listen = listen == 1 listen = listen == 1
video_loop = video_loop == 1 video_loop = video_loop == 1
@ -780,6 +797,7 @@ def process_video_params(query, preferences)
quality: quality, quality: quality,
raw: raw, raw: raw,
region: region, region: region,
related_videos: related_videos,
speed: speed, speed: speed,
video_end: video_end, video_end: video_end,
video_loop: video_loop, video_loop: video_loop,

View File

@ -14,30 +14,8 @@
</div> </div>
<div class="h-box"> <div class="h-box">
<% if user %> <% sub_count_text = number_to_short_text(sub_count) %>
<% if subscriptions.includes? ucid %> <%= rendered "components/subscribe_widget" %>
<p>
<a id="subscribe" onclick="unsubscribe()" class="pure-button pure-button-primary"
href="/subscription_ajax?action_remove_subscriptions=1&c=<%= ucid %>&referer=<%= env.get("current_page") %>">
<b><%= translate(locale, "Unsubscribe") %> | <%= number_to_short_text(sub_count) %></b>
</a>
</p>
<% else %>
<p>
<a id="subscribe" onclick="subscribe()" class="pure-button pure-button-primary"
href="/subscription_ajax?action_create_subscription_to_channel=1&c=<%= ucid %>&referer=<%= env.get("current_page") %>">
<b><%= translate(locale, "Subscribe") %> | <%= number_to_short_text(sub_count) %></b>
</a>
</p>
<% end %>
<% else %>
<p>
<a id="subscribe" class="pure-button pure-button-primary"
href="/login?referer=<%= env.get("current_page") %>">
<b><%= translate(locale, "Login to subscribe to `x`", author) %></b>
</a>
</p>
<% end %>
</div> </div>
<div class="pure-g h-box"> <div class="pure-g h-box">
@ -94,43 +72,6 @@
</div> </div>
<script> <script>
document.getElementById("subscribe")["href"] = "javascript:void(0)" <% sub_count_text = number_to_short_text(sub_count) %>
<%= rendered "components/subscribe_widget_script" %>
function subscribe() {
var url = "/subscription_ajax?action_create_subscription_to_channel=1&c=<%= ucid %>&referer=<%= env.get("current_page") %>";
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) {
subscribe_button = document.getElementById("subscribe");
subscribe_button.onclick = unsubscribe;
subscribe_button.innerHTML = '<b><%= translate(locale, "Unsubscribe") %> | <%= number_to_short_text(sub_count) %></b>'
}
}
}
}
function unsubscribe() {
var url = "/subscription_ajax?action_remove_subscriptions=1&c=<%= ucid %>&referer=<%= env.get("current_page") %>";
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) {
subscribe_button = document.getElementById("subscribe");
subscribe_button.onclick = subscribe;
subscribe_button.innerHTML = '<b><%= translate(locale, "Subscribe") %> | <%= number_to_short_text(sub_count) %></b>'
}
}
}
}
</script> </script>

View File

@ -11,7 +11,7 @@
<% else %> <% else %>
<% if params[:listen] %> <% if params[:listen] %>
<% audio_streams.each_with_index do |fmt, i| %> <% audio_streams.each_with_index do |fmt, i| %>
<source src="<%= fmt["url"] %>" type='<%= fmt["type"] %>' label="<%= fmt["bitrate"] %>k" selected="<%= i == 0 ? true : false %>"> <source src="/latest_version?id=<%= video.id %>&itag=<%= fmt["itag"] %>" type='<%= fmt["type"] %>' label="<%= fmt["bitrate"] %>k" selected="<%= i == 0 ? true : false %>">
<% end %> <% end %>
<% else %> <% else %>
<% if params[:quality] == "dash" %> <% if params[:quality] == "dash" %>
@ -19,9 +19,9 @@
<% end %> <% end %>
<% fmt_stream.each_with_index do |fmt, i| %> <% fmt_stream.each_with_index do |fmt, i| %>
<% if params[:quality] %> <% if params[:quality] %>
<source src="<%= fmt["url"] %>" type='<%= fmt["type"] %>' label="<%= fmt["label"] %>" selected="<%= params[:quality] == fmt["label"].split(" - ")[0] %>"> <source src="/latest_version?id=<%= video.id %>&itag=<%= fmt["itag"] %>" type='<%= fmt["type"] %>' label="<%= fmt["label"] %>" selected="<%= params[:quality] == fmt["label"].split(" - ")[0] %>">
<% else %> <% else %>
<source src="<%= fmt["url"] %>" type='<%= fmt["type"] %>' label="<%= fmt["label"] %>" selected="<%= i == 0 ? true : false %>"> <source src="/latest_version?id=<%= video.id %>&itag=<%= fmt["itag"] %>" type='<%= fmt["type"] %>' label="<%= fmt["label"] %>" selected="<%= i == 0 ? true : false %>">
<% end %> <% end %>
<% end %> <% end %>
<% end %> <% end %>
@ -114,6 +114,29 @@ var player = videojs("player", options, function() {
}); });
}); });
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);
}
});
player.share(shareOptions); player.share(shareOptions);
<% if params[:video_start] > 0 || params[:video_end] > 0 %> <% if params[:video_start] > 0 || params[:video_end] > 0 %>

View File

@ -8,7 +8,7 @@
<script src="/js/videojs-markers.min.js"></script> <script src="/js/videojs-markers.min.js"></script>
<script src="/js/videojs-share.min.js"></script> <script src="/js/videojs-share.min.js"></script>
<script src="/js/videojs-http-streaming.min.js"></script> <script src="/js/videojs-http-streaming.min.js"></script>
<% if env.get?("user") && env.get("user").as(User).preferences.quality == "dash" %> <% if params[:quality] == "dash" %>
<script src="/js/dash.mediaplayer.min.js"></script> <script src="/js/dash.mediaplayer.min.js"></script>
<script src="/js/videojs-dash.min.js"></script> <script src="/js/videojs-dash.min.js"></script>
<script src="/js/videojs-contrib-quality-levels.min.js"></script> <script src="/js/videojs-contrib-quality-levels.min.js"></script>

View File

@ -0,0 +1,24 @@
<% if user %>
<% if subscriptions.includes? ucid %>
<p>
<a id="subscribe" onclick="unsubscribe()" class="pure-button pure-button-primary"
href="/subscription_ajax?action_remove_subscriptions=1&c=<%= ucid %>&referer=<%= env.get("current_page") %>">
<b><%= translate(locale, "Unsubscribe") %> | <%= sub_count_text %></b>
</a>
</p>
<% else %>
<p>
<a id="subscribe" onclick="subscribe()" class="pure-button pure-button-primary"
href="/subscription_ajax?action_create_subscription_to_channel=1&c=<%= ucid %>&referer=<%= env.get("current_page") %>">
<b><%= translate(locale, "Subscribe") %> | <%= sub_count_text %></b>
</a>
</p>
<% end %>
<% else %>
<p>
<a id="subscribe" class="pure-button pure-button-primary"
href="/login?referer=<%= env.get("current_page") %>">
<b><%= translate(locale, "Login to subscribe to `x`", author) %></b>
</a>
</p>
<% end %>

View File

@ -0,0 +1,74 @@
subscribe_button = document.getElementById("subscribe");
if (subscribe_button.getAttribute('onclick')) {
subscribe_button["href"] = "javascript:void(0)";
}
function subscribe(timeouts = 0) {
subscribe_button = document.getElementById("subscribe");
if (timeouts > 10) {
console.log("Failed to subscribe.");
return;
}
var url = "/subscription_ajax?action_create_subscription_to_channel=1&c=<%= ucid %>&referer=<%= env.get("current_page") %>";
var xhr = new XMLHttpRequest();
xhr.responseType = "json";
xhr.timeout = 20000;
xhr.open("GET", url, true);
xhr.send();
var fallback = subscribe_button.innerHTML;
subscribe_button.onclick = unsubscribe;
subscribe_button.innerHTML = '<b><%= translate(locale, "Unsubscribe") %> | <%= sub_count_text %></b>'
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
if (xhr.status != 200) {
subscribe_button.onclick = subscribe;
subscribe_button.innerHTML = fallback;
}
}
}
xhr.ontimeout = function() {
console.log("Subscribing timed out.");
subscribe(timeouts + 1);
};
}
function unsubscribe(timeouts = 0) {
subscribe_button = document.getElementById("subscribe");
if (timeouts > 10) {
console.log("Failed to subscribe");
return;
}
var url = "/subscription_ajax?action_remove_subscriptions=1&c=<%= ucid %>&referer=<%= env.get("current_page") %>";
var xhr = new XMLHttpRequest();
xhr.responseType = "json";
xhr.timeout = 20000;
xhr.open("GET", url, true);
xhr.send();
var fallback = subscribe_button.innerHTML;
subscribe_button.onclick = subscribe;
subscribe_button.innerHTML = '<b><%= translate(locale, "Subscribe") %> | <%= sub_count_text %></b>'
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
if (xhr.status != 200) {
subscribe_button.onclick = unsubscribe;
subscribe_button.innerHTML = fallback;
}
}
}
xhr.ontimeout = function() {
console.log("Unsubscribing timed out.");
unsubscribe(timeouts + 1);
};
}

View File

@ -147,7 +147,11 @@ function update_value(element) {
</div> </div>
<div class="pure-control-group"> <div class="pure-control-group">
<label for="latest_only">Only show latest <% if user.preferences.unseen_only %>unwatched<% end %> video from channel: </label> <% if user.preferences.unseen_only %>
<label for="latest_only"><%= translate(locale, "Only show latest unwatched video from channel: ") %></label>
<% else %>
<label for="latest_only"><%= translate(locale, "Only show latest video from channel: ") %></label>
<% end %>
<input name="latest_only" id="latest_only" type="checkbox" <% if user.preferences.latest_only %>checked<% end %>> <input name="latest_only" id="latest_only" type="checkbox" <% if user.preferences.latest_only %>checked<% end %>>
</div> </div>

View File

@ -53,6 +53,34 @@
<div class="pure-u-1 pure-u-md-1-5"> <div class="pure-u-1 pure-u-md-1-5">
<div class="h-box"> <div class="h-box">
<p><a href="https://www.youtube.com/watch?v=<%= video.id %>"><%= translate(locale, "Watch video on Youtube") %></a></p> <p><a href="https://www.youtube.com/watch?v=<%= video.id %>"><%= translate(locale, "Watch video on Youtube") %></a></p>
<form class="pure-form pure-form-stacked">
<div class="pure-control-group">
<label for="download_widget"><%= translate(locale, "Download as: ") %></label>
<select style="width:100%" name="download_widget" id="download_widget">
<% video_streams.each do |option| %>
<option data-url="/latest_version?id=<%= video.id %>&itag=<%= option["itag"] %>&local=true"><%= option["quality_label"] %> - <%= option["type"].split(";")[0] %> @ <%= option["fps"] %>fps - video only</option>
<% end %>
<% audio_streams.each do |option| %>
<option data-url="/latest_version?id=<%= video.id %>&itag=<%= option["itag"] %>&local=true"><%= option["type"].split(";")[0] %> @ <%= option["bitrate"] %>k - audio only</option>
<% end %>
<% fmt_stream.each do |option| %>
<option data-url="/latest_version?id=<%= video.id %>&itag=<%= option["itag"] %>&local=true"><%= itag_to_metadata?(option["itag"]).try &.["height"]? || "~240" %>p - <%= option["type"].split(";")[0] %></option>
<% end %>
</select>
</div>
<div id="progress-container" style="width:100%; display:none">
<div id="download-progress">
</div>
</div>
<button type="button" data-title="<%= video.title.dump_unquoted %>-<%= video.id %>.mp4" onclick="download_video(this)"
class="pure-button pure-button-primary">
<b><%= translate(locale, "Download") %></b>
</button>
</form>
<p><i class="icon ion-ios-eye"></i> <%= number_with_separator(video.views) %></p> <p><i class="icon ion-ios-eye"></i> <%= number_with_separator(video.views) %></p>
<p><i class="icon ion-ios-thumbs-up"></i> <%= number_with_separator(video.likes) %></p> <p><i class="icon ion-ios-thumbs-up"></i> <%= number_with_separator(video.likes) %></p>
<p><i class="icon ion-ios-thumbs-down"></i> <%= number_with_separator(video.dislikes) %></p> <p><i class="icon ion-ios-thumbs-down"></i> <%= number_with_separator(video.dislikes) %></p>
@ -82,37 +110,17 @@
</div> </div>
</div> </div>
<div class="pure-u-1 <% if preferences && !preferences.related_videos && !plid %>pure-u-md-4-5<% else %>pure-u-md-3-5<% end %>"> <div class="pure-u-1 <% if params[:related_videos] || plid %>pure-u-md-3-5<% else %>pure-u-md-4-5<% end %>">
<div class="h-box"> <div class="h-box">
<p> <p>
<a href="/channel/<%= video.ucid %>"> <a href="/channel/<%= video.ucid %>">
<h3><%= video.author %></h3> <h3><%= video.author %></h3>
</a> </a>
</p> </p>
<% if user %> <% ucid = video.ucid %>
<% if subscriptions.includes? video.ucid %> <% author = video.author %>
<p> <% sub_count_text = video.sub_count_text %>
<a id="subscribe" onclick="unsubscribe()" class="pure-button pure-button-primary" <%= rendered "components/subscribe_widget" %>
href="/subscription_ajax?action_remove_subscriptions=1&c=<%= video.ucid %>&referer=<%= env.get("current_page") %>">
<b><%= translate(locale, "Unsubscribe") %> | <%= video.sub_count_text %></b>
</a>
</p>
<% else %>
<p>
<a id="subscribe" onclick="subscribe()" class="pure-button pure-button-primary"
href="/subscription_ajax?action_create_subscription_to_channel=1&c=<%= video.ucid %>&referer=<%= env.get("current_page") %>">
<b><%= translate(locale, "Subscribe") %> | <%= video.sub_count_text %></b>
</a>
</p>
<% end %>
<% else %>
<p>
<a id="subscribe" class="pure-button pure-button-primary"
href="/login?referer=<%= env.get("current_page") %>">
<b><%= translate(locale, "Login to subscribe to `x`", video.author) %></b>
</a>
</p>
<% end %>
<p> <p>
<b><%= translate(locale, "Shared `x`", video.published.to_s("%B %-d, %Y")) %></b> <b><%= translate(locale, "Shared `x`", video.published.to_s("%B %-d, %Y")) %></b>
</p> </p>
@ -133,14 +141,14 @@
</div> </div>
</div> </div>
</div> </div>
<% if preferences && preferences.related_videos || plid %> <% if params[:related_videos] || plid %>
<div class="pure-u-1 pure-u-md-1-5"> <div class="pure-u-1 pure-u-md-1-5">
<% if plid %> <% if plid %>
<div id="playlist" class="h-box"> <div id="playlist" class="h-box">
</div> </div>
<% end %> <% end %>
<% if !preferences || preferences && preferences.related_videos %> <% if params[:related_videos] %>
<div class="h-box"> <div class="h-box">
<% if !rvs.empty? %> <% if !rvs.empty? %>
@ -224,52 +232,22 @@ function number_with_separator(val) {
return val; return val;
} }
subscribe_button = document.getElementById("subscribe"); <% ucid = video.ucid %>
if (subscribe_button.getAttribute('onclick')) { <% author = video.author %>
subscribe_button["href"] = "javascript:void(0)"; <% sub_count_text = video.sub_count_text %>
} <%= rendered "components/subscribe_widget_script" %>
function subscribe() {
var url = "/subscription_ajax?action_create_subscription_to_channel=1&c=<%= video.ucid %>&referer=<%= env.get("current_page") %>";
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) {
subscribe_button = document.getElementById("subscribe");
subscribe_button.onclick = unsubscribe;
subscribe_button.innerHTML = '<b><%= translate(locale, "Unsubscribe") %> | <%= video.sub_count_text %></b>'
}
}
}
}
function unsubscribe() {
var url = "/subscription_ajax?action_remove_subscriptions=1&c=<%= video.ucid %>&referer=<%= env.get("current_page") %>";
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) {
subscribe_button = document.getElementById("subscribe");
subscribe_button.onclick = subscribe;
subscribe_button.innerHTML = '<b><%= translate(locale, "Subscribe") %> | <%= video.sub_count_text %></b>'
}
}
}
}
<% if plid %> <% if plid %>
function get_playlist() { function get_playlist(timeouts = 0) {
playlist = document.getElementById("playlist"); playlist = document.getElementById("playlist");
if (timeouts > 10) {
console.log("Failed to pull playlist");
playlist.innerHTML = "";
return;
}
playlist.innerHTML = ' \ playlist.innerHTML = ' \
<h3><center class="loading"><i class="icon ion-ios-refresh"></i></center></h3> \ <h3><center class="loading"><i class="icon ion-ios-refresh"></i></center></h3> \
<hr>' <hr>'
@ -323,15 +301,22 @@ function get_playlist() {
comments = document.getElementById("playlist"); comments = document.getElementById("playlist");
comments.innerHTML = comments.innerHTML =
'<h3><center class="loading"><i class="icon ion-ios-refresh"></i></center></h3><hr>'; '<h3><center class="loading"><i class="icon ion-ios-refresh"></i></center></h3><hr>';
get_playlist(); get_playlist(timeouts + 1);
}; };
} }
get_playlist(); get_playlist();
<% end %> <% end %>
function get_reddit_comments() { function get_reddit_comments(timeouts = 0) {
comments = document.getElementById("comments"); comments = document.getElementById("comments");
if (timeouts > 10) {
console.log("Failed to pull comments");
comments.innerHTML = "";
return;
}
var fallback = comments.innerHTML; var fallback = comments.innerHTML;
comments.innerHTML = comments.innerHTML =
'<h3><center class="loading"><i class="icon ion-ios-refresh"></i></center></h3>'; '<h3><center class="loading"><i class="icon ion-ios-refresh"></i></center></h3>';
@ -382,12 +367,19 @@ function get_reddit_comments() {
xhr.ontimeout = function() { xhr.ontimeout = function() {
console.log("Pulling comments timed out."); console.log("Pulling comments timed out.");
get_reddit_comments(); get_reddit_comments(timeouts + 1);
}; };
} }
function get_youtube_comments() { function get_youtube_comments(timeouts = 0) {
comments = document.getElementById("comments"); comments = document.getElementById("comments");
if (timeouts > 10) {
console.log("Failed to pull comments");
comments.innerHTML = "";
return;
}
var fallback = comments.innerHTML; var fallback = comments.innerHTML;
comments.innerHTML = comments.innerHTML =
'<h3><center class="loading"><i class="icon ion-ios-refresh"></i></center></h3>'; '<h3><center class="loading"><i class="icon ion-ios-refresh"></i></center></h3>';
@ -438,7 +430,7 @@ function get_youtube_comments() {
comments.innerHTML = comments.innerHTML =
'<h3><center class="loading"><i class="icon ion-ios-refresh"></i></center></h3>'; '<h3><center class="loading"><i class="icon ion-ios-refresh"></i></center></h3>';
get_youtube_comments(); get_youtube_comments(timeouts + 1);
}; };
} }