Compare commits
350 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d5f941829 | ||
|
|
c3bfaa1c33 | ||
|
|
ea0d52c0b8 | ||
|
|
fcb37f40f6 | ||
|
|
7f30d07f4c | ||
|
|
59744a96fa | ||
|
|
b82fb58dc4 | ||
|
|
c728214af7 | ||
|
|
305d636217 | ||
|
|
31312747e9 | ||
|
|
5ef288b840 | ||
|
|
f6615a490d | ||
|
|
bd4f5ebcdf | ||
|
|
1fd7ff5655 | ||
|
|
ab7e1b42bd | ||
|
|
a7723e6ded | ||
|
|
1b78001201 | ||
|
|
36c0eae7ed | ||
|
|
0ae43e242f | ||
|
|
bafd4f1860 | ||
|
|
388e58bf1e | ||
|
|
eee973fe86 | ||
|
|
61769c6f9c | ||
|
|
665ef9424e | ||
|
|
7a0f0ca5ce | ||
|
|
63be05146d | ||
|
|
9239cfb3c1 | ||
|
|
6fd24ad54f | ||
|
|
d70933c9f2 | ||
|
|
9ac2ddcb4d | ||
|
|
8d9569e06b | ||
|
|
02f8e657f3 | ||
|
|
3dc711ab9d | ||
|
|
702922dd88 | ||
|
|
2583c809ca | ||
|
|
b6071ce6dc | ||
|
|
186132bb98 | ||
|
|
c15790f230 | ||
|
|
13924a8353 | ||
|
|
fd84b57ac8 | ||
|
|
591a6b330a | ||
|
|
a3b767bb13 | ||
|
|
847ee61bf4 | ||
|
|
0c6cede287 | ||
|
|
ce4b07d7d7 | ||
|
|
a1f49b279f | ||
|
|
1c8075ca40 | ||
|
|
56b0952cd1 | ||
|
|
1c152f6cad | ||
|
|
57c05354c2 | ||
|
|
90b5479735 | ||
|
|
1079c4516c | ||
|
|
7381985c79 | ||
|
|
fd26f9f34e | ||
|
|
88b70973cc | ||
|
|
f0658bbd09 | ||
|
|
661e07c8db | ||
|
|
6e51189d4d | ||
|
|
dfdb7c835b | ||
|
|
f1d7aa09e4 | ||
|
|
88e6b865d9 | ||
|
|
d5c6d74f14 | ||
|
|
202f3d36c4 | ||
|
|
7a54b1d36a | ||
|
|
9091b36249 | ||
|
|
21285d9f6d | ||
|
|
2ebc773863 | ||
|
|
44f4057876 | ||
|
|
d85020079f | ||
|
|
956dc382ea | ||
|
|
99aa214859 | ||
|
|
405e98f429 | ||
|
|
a8c375fc95 | ||
|
|
4a56a2cad6 | ||
|
|
438945907d | ||
|
|
db245add0f | ||
|
|
986699bce5 | ||
|
|
d1803320f1 | ||
|
|
d4609519f0 | ||
|
|
2b4a6284e4 | ||
|
|
3c6be7e04c | ||
|
|
e738e57e26 | ||
|
|
21ebc398fa | ||
|
|
1ac611239e | ||
|
|
97e6047725 | ||
|
|
cf3f0fcc39 | ||
|
|
19c32bf993 | ||
|
|
e86eb16d91 | ||
|
|
1fcd1ff3e8 | ||
|
|
58f4212aa8 | ||
|
|
f01152eda1 | ||
|
|
11ff40bcd6 | ||
|
|
46e985b306 | ||
|
|
fdc014af67 | ||
|
|
bf11a46abe | ||
|
|
8f41130a14 | ||
|
|
e96c4732d6 | ||
|
|
a1d38a6940 | ||
|
|
9b8703cf49 | ||
|
|
c4d77bc18a | ||
|
|
c69fbb72d3 | ||
|
|
64e4791dca | ||
|
|
bc1e62ce51 | ||
|
|
79c1040796 | ||
|
|
eaf55bf12c | ||
|
|
ce528c9783 | ||
|
|
b9c7501012 | ||
|
|
ae10052aaf | ||
|
|
10abcd519f | ||
|
|
1d6c763e92 | ||
|
|
3fa0ce99f0 | ||
|
|
7380585f00 | ||
|
|
7557ffcda1 | ||
|
|
bc9d70109c | ||
|
|
7448159d6b | ||
|
|
a65998274f | ||
|
|
b2f4a0276a | ||
|
|
99d9c3a900 | ||
|
|
e4dc430c74 | ||
|
|
1435516a9c | ||
|
|
2a1befb41a | ||
|
|
2840d98fd4 | ||
|
|
32b9c0c840 | ||
|
|
f16273772e | ||
|
|
6375a62465 | ||
|
|
aa63c3f70e | ||
|
|
004fb96b2f | ||
|
|
5895604282 | ||
|
|
a1af75a87f | ||
|
|
732bd28c92 | ||
|
|
90715467a2 | ||
|
|
7425700009 | ||
|
|
8e884fe115 | ||
|
|
96c09450b8 | ||
|
|
64cfd2296c | ||
|
|
17cf0772fb | ||
|
|
66605196ad | ||
|
|
2c9b148627 | ||
|
|
07ef48a07a | ||
|
|
03f94db5e2 | ||
|
|
9b202adebd | ||
|
|
daf8e5b8b6 | ||
|
|
25bd27ef95 | ||
|
|
dd41e4906c | ||
|
|
20660b92f8 | ||
|
|
f0cc7a925c | ||
|
|
057e69fe70 | ||
|
|
4be82c5ca6 | ||
|
|
0eaf8f38a1 | ||
|
|
f31af18aa9 | ||
|
|
5859cd290c | ||
|
|
a39b1583da | ||
|
|
ac0eb9acaf | ||
|
|
a0d9e46c33 | ||
|
|
573404d3ac | ||
|
|
2fe545e19a | ||
|
|
ea52c05f05 | ||
|
|
2a643e86bc | ||
|
|
cc76428cd2 | ||
|
|
7ffc3a0652 | ||
|
|
51df0860cc | ||
|
|
e4f397d049 | ||
|
|
0c8dff162d | ||
|
|
4865529fed | ||
|
|
0a404cc9a6 | ||
|
|
17b84f32df | ||
|
|
a03958d937 | ||
|
|
27cd1e73f3 | ||
|
|
d6bd893573 | ||
|
|
7a7049b25b | ||
|
|
62ff9605ce | ||
|
|
2847c34f58 | ||
|
|
b5a00f3c47 | ||
|
|
09d0972ab4 | ||
|
|
6b12449be4 | ||
|
|
955b36913f | ||
|
|
7e6cf7b979 | ||
|
|
b82ae5e84a | ||
|
|
c5a17cd043 | ||
|
|
1692f7640c | ||
|
|
ebcb21dbfe | ||
|
|
b6d12cfb11 | ||
|
|
7f75a7ca0b | ||
|
|
bdc9196b4a | ||
|
|
a283c3143d | ||
|
|
57635c0d24 | ||
|
|
7ed4485717 | ||
|
|
394952a86a | ||
|
|
85854cac77 | ||
|
|
5bf3c28436 | ||
|
|
e25249ce4d | ||
|
|
40073e7089 | ||
|
|
0e141f21e8 | ||
|
|
9a1f4de323 | ||
|
|
83493237a5 | ||
|
|
fb14d9c134 | ||
|
|
63fca853d0 | ||
|
|
f647f7bdea | ||
|
|
06076c683f | ||
|
|
6b61eefca7 | ||
|
|
985dd65b83 | ||
|
|
f26ad00155 | ||
|
|
a210327318 | ||
|
|
5ae76bfe6c | ||
|
|
58fb74179b | ||
|
|
92223dbee5 | ||
|
|
1ceb827a82 | ||
|
|
f85472c0ce | ||
|
|
4933cd46d7 | ||
|
|
421ad21b40 | ||
|
|
6cea83991c | ||
|
|
b04a2d4f61 | ||
|
|
f8467fcda6 | ||
|
|
9f00dba0cb | ||
|
|
6a8a49d8ef | ||
|
|
7e2954c325 | ||
|
|
da21d33d96 | ||
|
|
27663b10a2 | ||
|
|
c099a5ad2e | ||
|
|
a4c05deb21 | ||
|
|
9df77707d3 | ||
|
|
ceea6e4597 | ||
|
|
b5b0599222 | ||
|
|
94152c4d17 | ||
|
|
f02b5e8c4d | ||
|
|
f1820ffaf7 | ||
|
|
52cad8d6da | ||
|
|
1590393fcc | ||
|
|
64f13df99b | ||
|
|
45cdb81861 | ||
|
|
ff563a70a5 | ||
|
|
84a5edf0eb | ||
|
|
5528a130b6 | ||
|
|
a384f6e5fd | ||
|
|
3646395f1d | ||
|
|
8bbf351d04 | ||
|
|
dde0292e1c | ||
|
|
ff1212a188 | ||
|
|
27934dad37 | ||
|
|
0d509c82ee | ||
|
|
30e6d29106 | ||
|
|
7a9ef0d664 | ||
|
|
3cce74d364 | ||
|
|
9698988be3 | ||
|
|
29af5fc4a6 | ||
|
|
a7b79824de | ||
|
|
d625d0ffbd | ||
|
|
1dcfa90c8e | ||
|
|
8170dad9bd | ||
|
|
699f85e773 | ||
|
|
f225d38680 | ||
|
|
2630dc8dcd | ||
|
|
276662a147 | ||
|
|
ed8a9af355 | ||
|
|
e6e3d826b9 | ||
|
|
5b3606ad1d | ||
|
|
072cc13f14 | ||
|
|
c1ed660ca0 | ||
|
|
2c44051318 | ||
|
|
d0a690c303 | ||
|
|
87e1fa0a28 | ||
|
|
a1af27b125 | ||
|
|
ceaddbc821 | ||
|
|
9989c8100a | ||
|
|
c0e73e71c5 | ||
|
|
b0ba670c91 | ||
|
|
d5c9b7dfe8 | ||
|
|
095b5fcea0 | ||
|
|
aeee40c894 | ||
|
|
a7fbcd0aa8 | ||
|
|
c9bc081f8c | ||
|
|
fbb5df0849 | ||
|
|
cef061d6fb | ||
|
|
def58ff11f | ||
|
|
9e73e3b153 | ||
|
|
e9ea365f2f | ||
|
|
55118a6768 | ||
|
|
1e214aae7c | ||
|
|
ff09a7255a | ||
|
|
26b7200360 | ||
|
|
b38a2bbd12 | ||
|
|
097cbcdae3 | ||
|
|
c0fdc28a84 | ||
|
|
6218078c51 | ||
|
|
a9aae6b36c | ||
|
|
96fb2118d5 | ||
|
|
48fc0949cc | ||
|
|
7d270211ae | ||
|
|
a9f5b84c7f | ||
|
|
2d20f12335 | ||
|
|
45b53b8902 | ||
|
|
898b768b30 | ||
|
|
06aa1bb90f | ||
|
|
1f6078cf25 | ||
|
|
ba36ab9559 | ||
|
|
586c0a0579 | ||
|
|
209d7117fb | ||
|
|
3751d11a0b | ||
|
|
1af86f6afb | ||
|
|
4c77908bb4 | ||
|
|
952b208a01 | ||
|
|
40fb29ea2b | ||
|
|
c1081e3df0 | ||
|
|
4b60f7ddff | ||
|
|
75d8c4f5c0 | ||
|
|
16a7fcb79b | ||
|
|
8cd0137aed | ||
|
|
f455b12085 | ||
|
|
1a9057a175 | ||
|
|
0fcfb7b82b | ||
|
|
30f08ae48c | ||
|
|
8f1b65de59 | ||
|
|
d88f9f3b3e | ||
|
|
08e8d0f56f | ||
|
|
fb535ad6bb | ||
|
|
15efac520e | ||
|
|
dd5623ffbf | ||
|
|
7a6a0f364c | ||
|
|
93297b63b1 | ||
|
|
e1540390a8 | ||
|
|
71ba071160 | ||
|
|
af449161ff | ||
|
|
03aa11b412 | ||
|
|
5e272db8f5 | ||
|
|
827e68acf5 | ||
|
|
987ea1cb98 | ||
|
|
633ecb524e | ||
|
|
f19d8f7095 | ||
|
|
a20e3cd77e | ||
|
|
a7b6a67615 | ||
|
|
e7f05d76fa | ||
|
|
5cb57fb176 | ||
|
|
95bde7bb8a | ||
|
|
daa2329f8b | ||
|
|
b23710f89f | ||
|
|
277dda0dcb | ||
|
|
cf9134416c | ||
|
|
2425368c3a | ||
|
|
20c4d213d9 | ||
|
|
af9134ffb4 | ||
|
|
f65ddaa0f1 | ||
|
|
9580a21786 | ||
|
|
dfd17bdd88 | ||
|
|
0f48d221b4 | ||
|
|
8f57388cd3 | ||
|
|
0992587da5 | ||
|
|
138a6b1136 | ||
|
|
c6ec8317ac | ||
|
|
81c2ecc788 | ||
|
|
7abe5dc845 |
273
CHANGELOG.md
273
CHANGELOG.md
@@ -1,3 +1,276 @@
|
|||||||
|
# 0.16.0 (2019-04-06)
|
||||||
|
|
||||||
|
# Version 0.16.0: API Improvements and Annotations
|
||||||
|
|
||||||
|
Hello again! This past month has seen [116 commits](https://github.com/omarroth/invidious/compare/0.15.0..0.16.0) from 13 contributors and a couple important changes I'd like to announce.
|
||||||
|
|
||||||
|
A privacy policy is now available [here](https://invidio.us/privacy). I've done my best to explain things as clearly as possible without oversimplifying, and would very much recommend reading it if you're concerned about your privacy and want to learn more about how Invidious uses your data. Please let me know if there is anything that needs clarification.
|
||||||
|
|
||||||
|
I'm also very happy to announce that a Spanish translation has been added to the site. You can use it with `?hl=es` or by setting `es` as your default locale. As always I'm extremely grateful to translators for making the site accessible to more people.
|
||||||
|
|
||||||
|
## For Administrators
|
||||||
|
|
||||||
|
Invidious now supports server-to-server [push notifications](https://developers.google.com/youtube/v3/guides/push_notifications). This uses [PubSubHubbub](https://pubsubhubbub.github.io/PubSubHubbub/pubsubhubbub-core-0.4.html) to automatically handle new videos sent to an instance, which is less resource intensive and generally faster. Note that it will not pull all videos from a subscribed channel, so recommended usage is in addition to `channel_threads`. Using PubSub requires a valid `domain` that updates can be sent to, and a random string that can be used to sign updates sent to the instance. You can enable it by adding `use_pubsub_feeds: true` to your `config.yml`. See [Configuration](https://github.com/omarroth/invidious/wiki/Configuration) for more info.
|
||||||
|
|
||||||
|
Unfortunately there are a couple necessary changes to the DB to support `liveNow` and `premiereTimestamp` in subscription feeds. Migration scripts have been provided that should be used automatically if following the instructions [here](https://github.com/omarroth/invidious/wiki/Updating).
|
||||||
|
|
||||||
|
You can now configure default user preferences for your instance. This allows you to set default locale, player preferences, and more. See [#415](https://github.com/omarroth/invidious/issues/415) for more details and example usage.
|
||||||
|
|
||||||
|
## For Developers
|
||||||
|
|
||||||
|
The [fields](https://developers.google.com/youtube/v3/getting-started#fields) API has been added with [#429](https://github.com/omarroth/invidious/pull/429) and is now supported on all JSON endpoints, thanks [**@afrmtbl**](https://github.com/afrmtbl)! Synax is straight-forward and can be used to reduce data transfer and create a simpler response for debugging. You can see an example [here](https://invidio.us/api/v1/videos/CvFH_6DNRCY?pretty=1&fields=title,recommendedVideos/title). I've been quite happy using it and hope it is similarly useful for others.
|
||||||
|
|
||||||
|
An `/api/v1/annotations/:id` endpoint has been added for pulling legacy annotation data from [this](https://archive.org/details/youtubeannotations) archive, see below for more details. You can also access annotation data available on YouTube using `?source=youtube`, although this will only return card data as legacy annotations were deleted on January 15th.
|
||||||
|
|
||||||
|
A couple minor changes to existing endpoints:
|
||||||
|
|
||||||
|
- A `premiereTimestamp` field has been added to `/api/v1/videos/:id`
|
||||||
|
- A `sort_by` param has been added to `/api/v1/comments/:id`, supports `new`, `top`.
|
||||||
|
|
||||||
|
More info is available in the [documentation](https://github.com/omarroth/invidious/wiki/API).
|
||||||
|
|
||||||
|
## Annotations
|
||||||
|
|
||||||
|
I'm pleased to announce that annotation data is finally available from the roughly 1.4 billion videos archived as part of [this](https://www.reddit.com/r/DataHoarder/comments/aa6czg/youtube_annotation_archive/) project. They are accessible from the Internet Archive [here](https://archive.org/details/youtubeannotations) or as a 355GB torrent, see [here](https://www.reddit.com/r/DataHoarder/comments/b7imx9/youtube_annotation_archive_annotation_data_from/) for more details. A corresponding `/api/v1/annotations/:id` endpoint has been added to Invidious which uses the collection from IA to provide legacy annotations.
|
||||||
|
|
||||||
|
Support for them in the player is possible thanks to [this](https://github.com/afrmtbl/videojs-youtube-annotations) plugin developed by [**@afrmtbl**](https://github.com/afrmtbl). A PR for adding support to the site is available as [#303](https://github.com/omarroth/invidious/pull/303). There's also an [extension](https://github.com/afrmtbl/AnnotationsRestored) for overlaying them on top of the YouTube player (again thanks to [**@afrmtbl**](https://github.com/afrmtbl)), and an [extension](https://tech234a.bitbucket.io/AnnotationsReloaded?src=invidious) for hooking into code still present in the YouTube player itself, developed by [**@tech234a**](https://github.com/tech234a).
|
||||||
|
|
||||||
|
I would recommend reading the [official announcement](https://www.reddit.com/r/DataHoarder/comments/b7imx9/youtube_annotation_archive_annotation_data_from/) for more details. I would like to again thank everyone that helped contribute to this project.
|
||||||
|
|
||||||
|
## Finances
|
||||||
|
|
||||||
|
### Donations
|
||||||
|
|
||||||
|
- [Patreon](https://www.patreon.com/omarroth) : \$42.42
|
||||||
|
- [Liberapay](https://liberapay.com/omarroth) : \$70.11
|
||||||
|
- Crypto : ~\$1.76 (converted from BCH, BTC, BSV)
|
||||||
|
- Total : \$114.29
|
||||||
|
|
||||||
|
### Expenses
|
||||||
|
|
||||||
|
- invidious-load1 (nyc1) : \$10.00 (load balancer)
|
||||||
|
- invidious-update1 (s-1vcpu-1gb) : \$5.00 (updates feeds)
|
||||||
|
- invidious-node1 (s-1vcpu-1gb) : \$5.00 (web server)
|
||||||
|
- invidious-node2 (s-1vcpu-1gb) : \$5.00 (web server)
|
||||||
|
- invidious-node3 (s-1vcpu-1gb) : \$5.00 (web server)
|
||||||
|
- invidious-node4 (s-1vcpu-1gb) : \$5.00 (web server)
|
||||||
|
- invidious-node5 (s-1vcpu-1gb) : \$5.00 (web server)
|
||||||
|
- invidious-db1 (s-4vcpu-8gb) : \$40.00 (database)
|
||||||
|
- Total : \$80.00
|
||||||
|
|
||||||
|
This past month the site saw a couple abnormal peaks in traffic, so an additional webserver has been added to match the increased load. The goal on Patreon has been updated to match the above expenses.
|
||||||
|
|
||||||
|
Thanks everyone!
|
||||||
|
|
||||||
|
# 0.15.0 (2019-03-06)
|
||||||
|
|
||||||
|
## Version 0.15.0: Preferences and Channel Playlists
|
||||||
|
|
||||||
|
The project has seen quite a bit of activity this past month. Large focus has been on fixing bugs, but there's still quite a few new features I'm happy to announce. There have been [133 commits](https://github.com/omarroth/invidious/compare/0.14.0...0.15.0) from 15 contributors this past month.
|
||||||
|
|
||||||
|
As a couple miscellaneous changes, a couple [nice screenshots](https://github.com/omarroth/invidious#screenshots) have been added to the README, so folks can see more of what the site has to offer without creating an account.
|
||||||
|
|
||||||
|
The footer has also been cleaned up quite a bit, and now displays the current version, so it's easier to know what features are available from the current instance.
|
||||||
|
|
||||||
|
## For Administrators
|
||||||
|
|
||||||
|
This past month there has been a minor release - `0.14.1` - which fixes a breaking change made by YouTube for their polymer redesign.
|
||||||
|
|
||||||
|
There have been several new features that unfortunately require a database migration. There are migration scripts provided in `config/migrate-scripts`, and the [wiki](https://github.com/omarroth/invidious/wiki/Updating) has instructions for automatically applying them. I'll do my best to keep those changes to a minimum, and expect to see a corresponding script to automatically apply any new changes.
|
||||||
|
|
||||||
|
Administrator preferences have been added with [#312](https://github.com/omarroth/invidious/issues/312), which allows administrators to customize their instance. Administrators can change the order of feed menus, change the default homepage, disable open registration, and several other options. There's a short 'how-to' [here](https://github.com/omarroth/invidious/issues/312#issuecomment-468831842), and the new options are documented [here](https://github.com/omarroth/invidious/wiki/Configuration).
|
||||||
|
|
||||||
|
An `/api/v1/stats` endpoint has been added with [#356](https://github.com/omarroth/invidious/issues/356), which reports the instance version and number of active users. Statistics are disabled by default, and can be enabled in administator preferences. Statistics for the official instance are available [here](https://invidio.us/api/v1/stats?pretty=1).
|
||||||
|
|
||||||
|
## For Developers
|
||||||
|
|
||||||
|
`/api/v1/channels/:ucid` now provides an `autoGenerated` tag, which returns true for [topic channels](https://www.youtube.com/channel/UCE80FOXpJydkkMo-BYoJdEg), and larger [genre channels](https://www.youtube.com/channel/UC-9-kyTW8ZkZNDHQJ6FgpwQ) generated by YouTube. These channels don't have any videos of their own, so `latestVideos` will be empty. It is recommended instead to display a list of playlists generated by YouTube.
|
||||||
|
|
||||||
|
You can now pull a list of playlists from a channel with `/api/v1/channels/playlists/:ucid`. Supported options are documented in the [wiki](https://github.com/omarroth/invidious/wiki/API#get-apiv1channelsplaylistsucid-apiv1channelsucidplaylists). Pagination is handled with a `continuation` token, which is generated on each call. Of note is that auto-generated channels currently have one page of results, and subsequent calls will be empty.
|
||||||
|
|
||||||
|
For quickly pulling the latest 30 videos from a channel, there is now `/api/v1/channels/latest/:ucid`. It is much faster than a call to `/api/v1/channels/:ucid`. It will not convert an author name to a valid ucid automatically, and will not return any extra data about a channel.
|
||||||
|
|
||||||
|
## Preferences
|
||||||
|
|
||||||
|
In addition to administrator preferences mentioned above, you can now change your preferences without an account (see [#42](https://github.com/omarroth/invidious/pull/42)). I think this is quite an improvement to the usability of the site, and is much friendlier to privacy-conscious folks that don't want to make an account. Preferences will be automatically imported to a newly created account.
|
||||||
|
|
||||||
|
Several issues with sorting subscriptions have been fixed, and `/manage_subscriptions` has been sped up significantly. The subscription feed has also seen a bump in performance. Delayed notifications have unfortunately started becoming a problem now that there are more users on the site. Some new changes are currently being tested which should mostly resolve the issue, so expect to see more in the next release.
|
||||||
|
|
||||||
|
## Channel Playlists
|
||||||
|
|
||||||
|
You can now view available playlists from a channel, and [auto-generated channels](https://invidio.us/channel/UC-9-kyTW8ZkZNDHQJ6FgpwQ) are no longer empty. You can sort as you would on YouTube, and all the same functionality should be available. I'm quite pleased to finally have it implemented, since it's currently the only data available from the above mentioned auto-generated channels, and makes it much easier to consume music on the site.
|
||||||
|
|
||||||
|
There's also more discussion on improving Invidious for streaming music in [#304](https://github.com/omarroth/invidious/issues/304), and adding support for music.youtube.com. I would appreciate any thoughts on how to improve that experience, since it's a very large and useful part of YouTube.
|
||||||
|
|
||||||
|
## Finances
|
||||||
|
|
||||||
|
### Donations
|
||||||
|
|
||||||
|
- [Patreon](https://www.patreon.com/omarroth) : \$42.42
|
||||||
|
- [Liberapay](https://liberapay.com/omarroth) : \$30.97
|
||||||
|
- Crypto : ~\$0.00 (converted from BCH, BTC)
|
||||||
|
- Total : \$73.39
|
||||||
|
|
||||||
|
### Expenses
|
||||||
|
|
||||||
|
- invidious-load1 (nyc1) : \$10.00 (load balancer)
|
||||||
|
- invidious-update1 (s-1vcpu-1gb) : \$5.00 (updates feeds)
|
||||||
|
- invidious-node1 (s-1vcpu-1gb) : \$5.00 (web server)
|
||||||
|
- invidious-node2 (s-1vcpu-1gb) : \$5.00 (web server)
|
||||||
|
- invidious-node3 (s-1vcpu-1gb) : \$5.00 (web server)
|
||||||
|
- invidious-node4 (s-1vcpu-1gb) : \$5.00 (web server)
|
||||||
|
- invidious-db1 (s-4vcpu-8gb) : \$40.00 (database)
|
||||||
|
- Total : \$75.00
|
||||||
|
|
||||||
|
It's been very humbling to see how fast the project has grown, and I look forward to making the site even better. Thank you everyone.
|
||||||
|
|
||||||
|
# 0.14.0 (2019-02-06)
|
||||||
|
|
||||||
|
## Version 0.14.0: Community
|
||||||
|
|
||||||
|
This last month several contributors have made improvements specifically for the people using this project. New pages have been added to the wiki, and there is now a [Matrix Server](https://riot.im/app/#/room/#invidious:matrix.org) and IRC channel so it's easier and faster for people to ask questions or chat. There have been [101 commits](https://github.com/omarroth/invidious/compare/0.13.0...0.14.0) since the last major release from 8 contributors.
|
||||||
|
|
||||||
|
It has come to my attention in the past month how many people are self-hosting, and I would like to make it easier for them to do so.
|
||||||
|
|
||||||
|
With that in mind, expect future releases to have a section for For Administrators (if any relevant changes) and For Developers (if any relevant changes).
|
||||||
|
|
||||||
|
## For Administrators
|
||||||
|
|
||||||
|
This month the most notable change for administrators is releases. As always, there will be a major release each month. However, a new minor release will be made whenever there are any critical bugs that need to be fixed.
|
||||||
|
|
||||||
|
This past month is the first time there has been a minor release - `0.13.1` - which fixes a breaking change made by YouTube. Administrators using versioning for their instances will be able to rely on the latest version, and should have a system in place to upgrade their instance as soon as a new release is available.
|
||||||
|
|
||||||
|
Several new pages have been added to the [wiki](https://github.com/omarroth/invidious/wiki#for-administrators) (as mentioned below) that will help administrators better setup their own instances. Configuration, maintenance, and instructions for updating are of note, as well as several common issues that are encountered when first setting up.
|
||||||
|
|
||||||
|
## For Developers
|
||||||
|
|
||||||
|
There's now a `pretty=1` parameter for most endpoints so you can view data easily from the browser, which is convenient for debugging and casual use. You can see an example [here](https://invidio.us/api/v1/videos/CvFH_6DNRCY?pretty=1).
|
||||||
|
|
||||||
|
Unfortunately the `/api/v1/insights/:id` endpoint is no longer functional, as YouTube removed all publicly available analytics around a month ago. The YouTube endpoint now returns a 404, so it's unlikely it will be functional again.
|
||||||
|
|
||||||
|
## Wiki
|
||||||
|
|
||||||
|
There have been a sizable number of changes to the Wiki, including a [list of public Invidious instances](https://github.com/omarroth/invidious/wiki/Invidious-Instances), the [list of extensions](https://github.com/omarroth/invidious/wiki/Extensions), and documentation for administrators (as mentioned above) and developers.
|
||||||
|
|
||||||
|
The wiki is editable by anyone so feel free to add anything you think is useful.
|
||||||
|
|
||||||
|
## Matrix & IRC
|
||||||
|
|
||||||
|
Thee is now a [Matrix Server](https://riot.im/app/#/room/#invidious:matrix.org) for Invidious, so please feel free to hop on if you have any questions or want to chat. There is also a registered IRC channel: #invidious on Freenode which is bridged to Matrix.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
Several new features have been added, including a download button, creator hearts and comment colors, and a French translation.
|
||||||
|
|
||||||
|
There have been fixes for Google logins, missing text in locales, invalid links to genre channels, and better error handling in the player, among others.
|
||||||
|
|
||||||
|
Several fixes and features are omitted for space, so I'd recommend taking a look at the [compare tab](https://github.com/omarroth/invidious/compare/0.13.0...0.14.0) for more information.
|
||||||
|
|
||||||
|
## Annotations Update
|
||||||
|
|
||||||
|
Annotations were removed January 15th, 2019 around15:00 UTC. Before they were deleted we were able to archive annotations from around 1.4 billion videos. I'd very much recommend taking a look [here](https://www.reddit.com/r/DataHoarder/comments/al7exa/youtube_annotation_archive_update_and_preview/) for more information and a list of acknowledgements. I'm extremely thankful to everyone who was able to contribute and I'm glad we were able to save such a large part of internet history.
|
||||||
|
|
||||||
|
There's been large strides in supporting them in the player as well, which you can follow in [#303](https://github.com/omarroth/invidious/pull/303). You can preview the functionality at https://dev.invidio.us . Before they are added to the main site expect to see an option to disable them, both site-wide and per video.
|
||||||
|
|
||||||
|
Organizing this project has unfortunately taken up quite a bit of my time, and I've been very grateful for everyone's patience.
|
||||||
|
|
||||||
|
## Finances
|
||||||
|
|
||||||
|
### Donations
|
||||||
|
|
||||||
|
- [Patreon](https://www.patreon.com/omarroth) : \$49.42
|
||||||
|
- [Liberapay](https://liberapay.com/omarroth) : \$27.89
|
||||||
|
- Crypto : ~\$0.00 (converted from BCH, BTC)
|
||||||
|
- Total : \$77.31
|
||||||
|
|
||||||
|
### Expenses
|
||||||
|
|
||||||
|
- invidious-load1 (nyc1) : \$10.00 (load balancer)
|
||||||
|
- invidious-update1 (s-1vcpu-1gb) : \$5.00 (updates feeds)
|
||||||
|
- invidious-node1 (s-1vcpu-1gb) : \$5.00 (web server)
|
||||||
|
- invidious-node2 (s-1vcpu-1gb) : \$5.00 (web server)
|
||||||
|
- invidious-node3 (s-1vcpu-1gb) : \$5.00 (web server)
|
||||||
|
- invidious-node4 (s-1vcpu-1gb) : \$5.00 (web server)
|
||||||
|
- invidious-db1 (s-4vcpu-8gb) : \$40.00 (database)
|
||||||
|
- Total : \$75.00
|
||||||
|
|
||||||
|
As always I'm grateful for everyone's contributions and support. I'll see you all in March.
|
||||||
|
|
||||||
|
# 0.13.1 (2019-01-19)
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
|
# 0.13.0 (2019-01-06)
|
||||||
|
|
||||||
|
## Version 0.13.0: Translations, Annotations, and Tor
|
||||||
|
|
||||||
|
I hope everyone had a happy New Year! There's been a couple new additions since last release, with [44 commits](https://github.com/omarroth/invidious/compare/0.12.0...0.13.0) from 9 contributors. It's been quite a year for the project, and I hope to continue improving the project into 2019! Starting off the new year:
|
||||||
|
|
||||||
|
## Translations
|
||||||
|
|
||||||
|
I'm happy to announce support for translations has been added with [`a160c64`](https://github.com/omarroth/invidious/a160c64). Currently, there is support for:
|
||||||
|
|
||||||
|
- Arabic (`ar`)
|
||||||
|
- Dutch (`nl`)
|
||||||
|
- English (`en-US`)
|
||||||
|
- German (`de`)
|
||||||
|
- Norwegian Bokmål (`nb_NO`)
|
||||||
|
- Polish (`pl`)
|
||||||
|
- Russian (`ru`)
|
||||||
|
|
||||||
|
Which you can change in your preferences under `Language`. You can also add `&hl=LANGUAGE` to the end of any request to translate it to your preferred language, for example https://invidio.us/?hl=ru. I'd like to say thank you again to everyone who has helped translate the site! I've mentioned this before, but I'm delighted that so many people find the project useful.
|
||||||
|
|
||||||
|
## Annotations
|
||||||
|
|
||||||
|
Recently, [YouTube announced that all annotations will be deleted on January 15th, 2019](https://support.google.com/youtube/answer/7342737). I believe that annotations have a very important place in YouTube's history, and [announced a project to archive them](https://www.reddit.com/r/DataHoarder/comments/aa6czg/youtube_annotation_archive/).
|
||||||
|
|
||||||
|
I expect annotations to be supported in the Invidious player once archiving is complete (see [#110](https://github.com/omarroth/invidious/issues/110) for details), and would also like to host them for other developers to use in their projects.
|
||||||
|
|
||||||
|
The code is available [here](https://github.com/omarroth/archive), and contains instructions for running a worker if you would like to contribute. There's much more information available in the announcement as well for anyone who is interested.
|
||||||
|
|
||||||
|
## Tor
|
||||||
|
|
||||||
|
I unfortunately missed the chance to mention this in the previous release, but I'm now happy to announce that you can now view Invidious through Tor at the following links:
|
||||||
|
|
||||||
|
kgg2m7yk5aybusll.onion
|
||||||
|
axqzx4s6s54s32yentfqojs3x5i7faxza6xo3ehd4bzzsg2ii4fv2iid.onion
|
||||||
|
|
||||||
|
Invidious is well suited to use through Tor, as it does not require any JS and is fairly lightweight. I'd recommend looking [here](https://diasp.org/posts/10965196) and [here](https://www.reddit.com/r/TOR/comments/a3c1ak/you_can_now_watch_youtube_videos_anonymously_with/) for more details on how to use the onion links, and would like to say thank you to [/u/whonix-os](https://www.reddit.com/user/whonix-os) for suggesting it and providing support setting setting them up.
|
||||||
|
|
||||||
|
## Popular and Trending
|
||||||
|
|
||||||
|
You can now easily view videos trending on YouTube with [`a16f967`](https://github.com/omarroth/invidious/a16f967). It also provides support for viewing YouTube's various categories categories, such as `News`, `Gaming`, and `Music`. You can also change the `region` parameter to view trending in different countries, which should be made easier to use in the coming weeks.
|
||||||
|
|
||||||
|
A link to `/feed/popular` has also been added, which provides a list of videos sorted using the algorithm described [here](https://github.com/omarroth/invidious/issues/217#issuecomment-436503761). I think it better reflects what users watch on the site, but I'd like to hear peoples' thoughts on this and on how it could be improved.
|
||||||
|
|
||||||
|
## Finances
|
||||||
|
|
||||||
|
### Donations
|
||||||
|
|
||||||
|
- [Patreon](https://www.patreon.com/omarroth): \$64.63
|
||||||
|
- [Liberapay](https://liberapay.com/omarroth) : \$30.05
|
||||||
|
- Crypto : ~\$28.74 (converted from BCH, BTC)
|
||||||
|
- Total : \$123.42
|
||||||
|
|
||||||
|
### Expenses
|
||||||
|
|
||||||
|
- invidious-load1 (nyc1) : \$10.00 (load balancer)
|
||||||
|
- invidious-update1 (s-1vcpu-1gb) : \$5.00 (updates feeds)
|
||||||
|
- invidious-node1 (s-1vcpu-1gb) : \$5.00 (web server)
|
||||||
|
- invidious-node2 (s-1vcpu-1gb) : \$5.00 (web server)
|
||||||
|
- invidious-node3 (s-1vcpu-1gb) : \$5.00 (web server)
|
||||||
|
- invidious-node4 (s-1vcpu-1gb) : \$5.00 (web server)
|
||||||
|
- invidious-db1 (s-4vcpu-8gb) : \$40.00 (database)
|
||||||
|
- Total : \$75.00
|
||||||
|
|
||||||
|
### What will happen with what's left over?
|
||||||
|
|
||||||
|
I believe this is the first month that all expenses have been fully paid for by donations. Thank you! I expect to allocate the current amount for hardware to improve performance and for hosting annotation data, as mentioned above.
|
||||||
|
|
||||||
|
Anything that is left over is kept to continue hosting the project for as long as possible. Thank you again everyone!
|
||||||
|
|
||||||
|
I think that's everything for 2018. There's lots still planned, and I'm very excited for the future of this project!
|
||||||
|
|
||||||
# 0.12.0 (2018-12-06)
|
# 0.12.0 (2018-12-06)
|
||||||
|
|
||||||
## Version 0.12.0: Accessibility, Privacy, Transparency
|
## Version 0.12.0: Accessibility, Privacy, Transparency
|
||||||
|
|||||||
159
README.md
159
README.md
@@ -3,7 +3,7 @@
|
|||||||
## Invidious is an alternative front-end to YouTube
|
## Invidious is an alternative front-end to YouTube
|
||||||
|
|
||||||
- Audio-only mode (and no need to keep window open on mobile)
|
- Audio-only mode (and no need to keep window open on mobile)
|
||||||
- [Open-source](https://github.com/omarroth/invidious) (AGPLv3 licensed)
|
- [Free software](https://github.com/omarroth/invidious) (AGPLv3 licensed)
|
||||||
- No ads
|
- No ads
|
||||||
- No need to create a Google account to save subscriptions
|
- No need to create a Google account to save subscriptions
|
||||||
- Lightweight (homepage is ~4 KB compressed)
|
- Lightweight (homepage is ~4 KB compressed)
|
||||||
@@ -27,8 +27,24 @@ Patreon: https://patreon.com/omarroth
|
|||||||
BTC: 356DpZyMXu6rYd55Yqzjs29n79kGKWcYrY
|
BTC: 356DpZyMXu6rYd55Yqzjs29n79kGKWcYrY
|
||||||
BCH: qq4ptclkzej5eza6a50et5ggc58hxsq5aylqut2npk
|
BCH: qq4ptclkzej5eza6a50et5ggc58hxsq5aylqut2npk
|
||||||
|
|
||||||
|
Onion links:
|
||||||
|
|
||||||
|
- kgg2m7yk5aybusll.onion
|
||||||
|
- axqzx4s6s54s32yentfqojs3x5i7faxza6xo3ehd4bzzsg2ii4fv2iid.onion
|
||||||
|
|
||||||
|
[Alternative Invidious instances](https://github.com/omarroth/invidious/wiki/Invidious-Instances)
|
||||||
|
|
||||||
|
## Screenshots
|
||||||
|
|
||||||
|
| Player | Preferences | Subscriptions |
|
||||||
|
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| [<img src="screenshots/01_player.png?raw=true" height="140" width="280">](screenshots/01_player.png?raw=true) | [<img src="screenshots/02_preferences.png?raw=true" height="140" width="280">](screenshots/02_preferences.png?raw=true) | [<img src="screenshots/03_subscriptions.png?raw=true" height="140" width="280">](screenshots/03_subscriptions.png?raw=true) |
|
||||||
|
| [<img src="screenshots/04_description.png?raw=true" height="140" width="280">](screenshots/04_description.png?raw=true) | [<img src="screenshots/05_preferences.png?raw=true" height="140" width="280">](screenshots/05_preferences.png?raw=true) | [<img src="screenshots/06_subscriptions.png?raw=true" height="140" width="280">](screenshots/06_subscriptions.png?raw=true) |
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
See [Invidious-Updater](https://github.com/tmiland/Invidious-Updater) for a self-contained script that can automatically install and update Invidious.
|
||||||
|
|
||||||
### Docker:
|
### Docker:
|
||||||
|
|
||||||
#### Build and start cluster:
|
#### Build and start cluster:
|
||||||
@@ -52,71 +68,102 @@ $ 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/session_ids.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 update && shards install
|
||||||
|
$ crystal build src/invidious.cr --release
|
||||||
|
# test compiled binary
|
||||||
|
$ ./invidious # stop with ctrl c
|
||||||
|
$ exit
|
||||||
|
```
|
||||||
|
|
||||||
|
#### systemd service
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ sudo cp /home/invidious/invidious/invidious.service /etc/systemd/system/invidious.service
|
||||||
|
$ sudo systemctl enable invidious.service
|
||||||
|
$ sudo systemctl start invidious.service
|
||||||
|
```
|
||||||
|
|
||||||
|
### OSX:
|
||||||
|
|
||||||
```bash
|
```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
|
||||||
$ shards
|
$ 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/session_ids.sql
|
||||||
|
$ psql invidious < config/sql/nonces.sql
|
||||||
|
|
||||||
|
# Setup Invidious
|
||||||
|
$ shards update && shards install
|
||||||
$ crystal build src/invidious.cr --release
|
$ crystal build src/invidious.cr --release
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Update Invidious
|
||||||
|
|
||||||
|
You can see how to update Invidious [here](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)
|
||||||
@@ -126,13 +173,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:
|
||||||
@@ -142,19 +190,20 @@ $ curl -fsSLo- https://raw.githubusercontent.com/samueleaton/sentry/master/insta
|
|||||||
$ ./sentry
|
$ ./sentry
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
[Documentation](https://github.com/omarroth/invidious/wiki) can be found in the wiki.
|
||||||
|
|
||||||
## Extensions
|
## Extensions
|
||||||
|
|
||||||
- [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](https://github.com/omarroth/invidious/wiki/Extensions) can be found in the wiki, as well as documentation for integrating it into other projects.
|
||||||
- [Invidious Redirect](https://greasyfork.org/en/scripts/370461-invidious-redirect): Redirects Youtube URLs to Invidio.us (userscript)
|
|
||||||
- [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
|
||||||
|
|
||||||
- [FreeTube](https://github.com/FreeTubeApp/FreeTube): An Open Source YouTube app for privacy.
|
- [FreeTube](https://github.com/FreeTubeApp/FreeTube): An Open Source YouTube app for privacy.
|
||||||
- [CloudTube](https://github.com/cloudrac3r/cadencegq): Website featuring pastebin, image host, and YouTube player
|
- [CloudTube](https://github.com/cloudrac3r/cadencegq): Website featuring pastebin, image host, and YouTube player
|
||||||
- [PeerTubeify](https://gitlab.com/Ealhad/peertubeify): On YouTube, displays a link to the same video on PeerTube, if it exists.
|
- [PeerTubeify](https://gitlab.com/Ealhad/peertubeify): On YouTube, displays a link to the same video on PeerTube, if it exists.
|
||||||
|
- [MusicPiped](https://github.com/deep-gaurav/MusicPiped): A materialistic music player that streams music from YouTube.
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
@@ -164,6 +213,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
|
||||||
|
|
||||||
|
[](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.
|
||||||
|
|||||||
@@ -28,6 +28,10 @@ body {
|
|||||||
color: rgba(35, 35, 35, 1);
|
color: rgba(35, 35, 35, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pure-form input[type="file"] {
|
||||||
|
color: #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
.navbar > .searchbar input {
|
.navbar > .searchbar input {
|
||||||
background-color: inherit;
|
background-color: inherit;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
|
|||||||
@@ -1,3 +1,47 @@
|
|||||||
|
.deleted {
|
||||||
|
background-color: rgb(255, 0, 0, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.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;
|
||||||
@@ -14,6 +58,7 @@ div {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.loading {
|
.loading {
|
||||||
|
display: inline-block;
|
||||||
animation: spin 2s linear infinite;
|
animation: spin 2s linear infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -22,22 +67,29 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.thumbnail {
|
div.thumbnail {
|
||||||
|
padding: 28.125%;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
img.thumbnail {
|
img.thumbnail {
|
||||||
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
@@ -107,6 +159,16 @@ img.thumbnail {
|
|||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
|
|
||||||
transition: 0.1s border-bottom;
|
transition: 0.1s border-bottom;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* https://stackoverflow.com/a/55170420 */
|
||||||
|
input[type="search"]::-webkit-search-cancel-button {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
height: 14px;
|
||||||
|
width: 14px;
|
||||||
|
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAn0lEQVR42u3UMQrDMBBEUZ9WfQqDmm22EaTyjRMHAlM5K+Y7lb0wnUZPIKHlnutOa+25Z4D++MRBX98MD1V/trSppLKHqj9TTBWKcoUqffbUcbBBEhTjBOV4ja4l4OIAZThEOV6jHO8ARXD+gPPvKMABinGOrnu6gTNUawrcQKNCAQ7QeTxORzle3+sDfjJpPCqhJh7GixZq4rHcc9l5A9qZ+WeBhgEuAAAAAElFTkSuQmCC);
|
||||||
|
background-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar > .searchbar .pure-form fieldset {
|
.navbar > .searchbar .pure-form fieldset {
|
||||||
@@ -133,6 +195,16 @@ img.thumbnail {
|
|||||||
margin-right: 1em;
|
margin-right: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-aspect-ratio: 16/9) {
|
||||||
|
.player-dimensions.vjs-fluid {
|
||||||
|
padding-top: 46.86% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#player-container {
|
||||||
|
padding-bottom: 46.86% !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 767px) {
|
@media screen and (max-width: 767px) {
|
||||||
.navbar {
|
.navbar {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -159,7 +231,7 @@ img.thumbnail {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Footer
|
* Footer
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -186,6 +258,48 @@ img.thumbnail {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Control Bar */
|
/* Control Bar */
|
||||||
|
@media screen and (max-width: 480px) {
|
||||||
|
.video-js .vjs-control-bar,
|
||||||
|
.vjs-menu-button-popup .vjs-menu .vjs-menu-content {
|
||||||
|
overflow: -webkit-paged-x;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.vjs-play-control,
|
||||||
|
.vjs-volume-panel,
|
||||||
|
.vjs-current-time,
|
||||||
|
.vjs-time-control,
|
||||||
|
.vjs-duration,
|
||||||
|
.vjs-progress-control,
|
||||||
|
.vjs-remaining-time {
|
||||||
|
order: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vjs-captions-button {
|
||||||
|
order: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vjs-quality-selector {
|
||||||
|
order: 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vjs-playback-rate {
|
||||||
|
order: 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vjs-share-control {
|
||||||
|
order: 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vjs-fullscreen-control {
|
||||||
|
order: 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vjs-control-bar {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
|
||||||
.video-js .vjs-control-bar,
|
.video-js .vjs-control-bar,
|
||||||
.vjs-menu-button-popup .vjs-menu .vjs-menu-content {
|
.vjs-menu-button-popup .vjs-menu .vjs-menu-content {
|
||||||
background-color: rgba(35, 35, 35, 0.75);
|
background-color: rgba(35, 35, 35, 0.75);
|
||||||
@@ -253,17 +367,21 @@ img.thumbnail {
|
|||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
#player {
|
.player-dimensions.vjs-fluid {
|
||||||
|
padding-top: 82vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
video.video-js {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#player-container {
|
#player-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-bottom: 56.25%;
|
padding-bottom: 82vh;
|
||||||
margin-left: 1em;
|
|
||||||
margin-right: 1em;
|
|
||||||
height: 0;
|
height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pure-control-group label {
|
||||||
|
word-wrap: normal;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,9 +1,16 @@
|
|||||||
a:hover,
|
a:hover,
|
||||||
a:active {
|
a:active {
|
||||||
color: #167ac6;
|
color: #167ac6 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: #303030;
|
color: #61809b;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* All links that do not fit with the default color goes here */
|
||||||
|
a:not([data-id]) > .icon,
|
||||||
|
.pure-u-md-1-5 > .h-box > a[href^="/watch?"],
|
||||||
|
.playlist-restricted > ol > li > a {
|
||||||
|
color: #303030;
|
||||||
|
}
|
||||||
|
|||||||
2
assets/css/video-js.min.css
vendored
2
assets/css/video-js.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* videojs-share
|
* videojs-share
|
||||||
* @version 2.0.1
|
* @version 3.0.0
|
||||||
* @copyright 2018 Mikhail Khazov <mkhazov.work@gmail.com>
|
* @copyright 2018 Mikhail Khazov <mkhazov.work@gmail.com>
|
||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
.video-js.vjs-videojs-share_open .vjs-modal-dialog .vjs-modal-dialog-content{display:flex;align-items:center;padding:0;background-image:linear-gradient(to bottom, rgba(0,0,0,0.77), rgba(0,0,0,0.75))}.video-js.vjs-videojs-share_open .vjs-modal-dialog .vjs-close-button{position:absolute;right:0;top:5px;width:30px;height:30px;color:#fff;cursor:pointer;opacity:0.9;transition:opacity 0.25s ease-out}.video-js.vjs-videojs-share_open .vjs-modal-dialog .vjs-close-button:before{content:'×';font-size:20px;line-height:15px}.video-js.vjs-videojs-share_open .vjs-modal-dialog .vjs-close-button:hover{opacity:1}.video-js .vjs-share{display:flex;flex-direction:column;justify-content:space-around;align-items:center;width:100%;height:100%;max-height:400px}.video-js .vjs-share__top,.video-js .vjs-share__middle,.video-js .vjs-share__bottom{display:flex}.video-js .vjs-share__top,.video-js .vjs-share__middle{flex-direction:column;justify-content:space-between}.video-js .vjs-share__middle{padding:0 25px}.video-js .vjs-share__title{align-self:center;font-size:22px;color:#fff}.video-js .vjs-share__subtitle{width:100%;margin:0 auto 12px;font-size:16px;color:#fff;opacity:0.7}.video-js .vjs-share__short-link-wrapper{position:relative;display:block;width:100%;height:40px;margin:0 auto;margin-bottom:15px;border:0;color:rgba(255,255,255,0.65);background-color:#363636;outline:none;overflow:hidden;flex-shrink:0}.video-js .vjs-share__short-link{display:block;width:100%;height:100%;padding:0 40px 0 15px;border:0;color:rgba(255,255,255,0.65);background-color:#363636;outline:none}.video-js .vjs-share__btn{position:absolute;right:0;bottom:0;height:40px;width:40px;display:flex;align-items:center;padding:0 11px;border:0;color:#fff;background-color:#2e2e2e;background-size:18px 19px;background-position:center;background-repeat:no-repeat;cursor:pointer;outline:none;transition:width 0.3s ease-out, padding 0.3s ease-out}.video-js .vjs-share__btn svg{flex-shrink:0}.video-js .vjs-share__btn span{position:relative;padding-left:10px;opacity:0;transition:opacity 0.3s ease-out}.video-js .vjs-share__btn:hover{justify-content:center;width:100%;padding:0 40px;background-image:none}.video-js .vjs-share__btn:hover span{opacity:1}.video-js .vjs-share__socials{display:flex;flex-wrap:wrap;justify-content:center;align-content:flex-start;transition:width 0.3s ease-out, height 0.3s ease-out}.video-js .vjs-share__social{display:flex;justify-content:center;align-items:center;flex-shrink:0;width:32px;height:32px;margin-right:6px;margin-bottom:6px;cursor:pointer;font-size:8px;transition:transform 0.3s ease-out, filter 0.2s ease-out;border:none;outline:none}.video-js .vjs-share__social:hover{filter:brightness(115%)}.video-js .vjs-share__social svg{width:100%;max-height:24px}.video-js .vjs-share__social_vk{background-color:#5d7294}.video-js .vjs-share__social_ok{background-color:#ed7c20}.video-js .vjs-share__social_mail{background-color:#134785}.video-js .vjs-share__social_tw{background-color:#76aaeb}.video-js .vjs-share__social_reddit{background-color:#ff4500}.video-js .vjs-share__social_fbFeed{background-color:#475995}.video-js .vjs-share__social_messenger{background-color:#0084ff}.video-js .vjs-share__social_gp{background-color:#d53f35}.video-js .vjs-share__social_linkedin{background-color:#0077b5}.video-js .vjs-share__social_viber{background-color:#766db5}.video-js .vjs-share__social_telegram{background-color:#4bb0e2}.video-js .vjs-share__social_whatsapp{background-color:#78c870}.video-js .vjs-share__bottom{justify-content:center}@media (max-height: 220px){.video-js .vjs-share .hidden-xs{display:none}}@media (max-height: 350px){.video-js .vjs-share .hidden-sm{display:none}}@media (min-height: 400px){.video-js .vjs-share__title{margin-bottom:15px}.video-js .vjs-share__short-link-wrapper{margin-bottom:30px}}@media (min-width: 320px){.video-js.vjs-videojs-share_open .vjs-modal-dialog .vjs-close-button{right:5px;top:10px}}@media (min-width: 660px){.video-js.vjs-videojs-share_open .vjs-modal-dialog .vjs-close-button{right:20px;top:20px}.video-js .vjs-share__social{width:40px;height:40px}}
|
.video-js.vjs-videojs-share_open .vjs-modal-dialog .vjs-modal-dialog-content{display:flex;align-items:center;padding:0;background-image:linear-gradient(to bottom, rgba(0,0,0,0.77), rgba(0,0,0,0.75))}.video-js.vjs-videojs-share_open .vjs-modal-dialog .vjs-close-button{position:absolute;right:0;top:5px;width:30px;height:30px;color:#fff;cursor:pointer;opacity:0.9;transition:opacity 0.25s ease-out}.video-js.vjs-videojs-share_open .vjs-modal-dialog .vjs-close-button:before{content:'×';font-size:20px;line-height:15px}.video-js.vjs-videojs-share_open .vjs-modal-dialog .vjs-close-button:hover{opacity:1}.video-js .vjs-share{display:flex;flex-direction:column;justify-content:space-around;align-items:center;width:100%;height:100%;max-height:400px}.video-js .vjs-share__top,.video-js .vjs-share__middle,.video-js .vjs-share__bottom{display:flex}.video-js .vjs-share__top,.video-js .vjs-share__middle{flex-direction:column;justify-content:space-between}.video-js .vjs-share__middle{padding:0 25px}.video-js .vjs-share__title{align-self:center;font-size:22px;color:#fff}.video-js .vjs-share__subtitle{width:100%;margin:0 auto 12px;font-size:16px;color:#fff;opacity:0.7}.video-js .vjs-share__short-link-wrapper{position:relative;display:block;width:100%;height:40px;margin:0 auto;margin-bottom:15px;border:0;color:rgba(255,255,255,0.65);background-color:#363636;outline:none;overflow:hidden;flex-shrink:0}.video-js .vjs-share__short-link{display:block;width:100%;height:100%;padding:0 40px 0 15px;border:0;color:rgba(255,255,255,0.65);background-color:#363636;outline:none}.video-js .vjs-share__btn{position:absolute;right:0;bottom:0;height:40px;width:40px;display:flex;align-items:center;padding:0 11px;border:0;color:#fff;background-color:#2e2e2e;background-size:18px 19px;background-position:center;background-repeat:no-repeat;cursor:pointer;outline:none;transition:width 0.3s ease-out, padding 0.3s ease-out}.video-js .vjs-share__btn svg{flex-shrink:0}.video-js .vjs-share__btn span{position:relative;padding-left:10px;opacity:0;transition:opacity 0.3s ease-out}.video-js .vjs-share__btn:hover{justify-content:center;width:100%;padding:0 40px;background-image:none}.video-js .vjs-share__btn:hover span{opacity:1}.video-js .vjs-share__socials{display:flex;flex-wrap:wrap;justify-content:center;align-content:flex-start;transition:width 0.3s ease-out, height 0.3s ease-out}.video-js .vjs-share__social{display:flex;justify-content:center;align-items:center;flex-shrink:0;width:32px;height:32px;margin-right:6px;margin-bottom:6px;cursor:pointer;font-size:8px;transition:transform 0.3s ease-out, filter 0.2s ease-out;border:none;outline:none}.video-js .vjs-share__social:hover{filter:brightness(115%)}.video-js .vjs-share__social svg{overflow:visible;max-height:24px}.video-js .vjs-share__social_vk{background-color:#5d7294}.video-js .vjs-share__social_ok{background-color:#ed7c20}.video-js .vjs-share__social_mail{background-color:#134785}.video-js .vjs-share__social_tw{background-color:#76aaeb}.video-js .vjs-share__social_reddit{background-color:#ff4500}.video-js .vjs-share__social_fbFeed{background-color:#475995}.video-js .vjs-share__social_messenger{background-color:#0084ff}.video-js .vjs-share__social_gp{background-color:#d53f35}.video-js .vjs-share__social_linkedin{background-color:#0077b5}.video-js .vjs-share__social_viber{background-color:#766db5}.video-js .vjs-share__social_telegram{background-color:#4bb0e2}.video-js .vjs-share__social_whatsapp{background-color:#78c870}.video-js .vjs-share__bottom{justify-content:center}@media (max-height: 220px){.video-js .vjs-share .hidden-xs{display:none}}@media (max-height: 350px){.video-js .vjs-share .hidden-sm{display:none}}@media (min-height: 400px){.video-js .vjs-share__title{margin-bottom:15px}.video-js .vjs-share__short-link-wrapper{margin-bottom:30px}}@media (min-width: 320px){.video-js.vjs-videojs-share_open .vjs-modal-dialog .vjs-close-button{right:5px;top:10px}}@media (min-width: 660px){.video-js.vjs-videojs-share_open .vjs-modal-dialog .vjs-close-button{right:20px;top:20px}.video-js .vjs-share__social{width:40px;height:40px}}
|
||||||
|
|||||||
3
assets/js/dash.mediaplayer.min.js
vendored
3
assets/js/dash.mediaplayer.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
19
assets/js/video.min.js
vendored
19
assets/js/video.min.js
vendored
File diff suppressed because one or more lines are too long
4
assets/js/videojs-share.min.js
vendored
4
assets/js/videojs-share.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,413 +0,0 @@
|
|||||||
/*
|
|
||||||
* Video.js Hotkeys
|
|
||||||
* https://github.com/ctd1500/videojs-hotkeys
|
|
||||||
*
|
|
||||||
* Copyright (c) 2015 Chris Dougherty
|
|
||||||
* Licensed under the Apache-2.0 license.
|
|
||||||
*/
|
|
||||||
|
|
||||||
;(function(root, factory) {
|
|
||||||
if (typeof window !== 'undefined' && window.videojs) {
|
|
||||||
factory(window.videojs);
|
|
||||||
} else if (typeof define === 'function' && define.amd) {
|
|
||||||
define('videojs-hotkeys', ['video.js'], function (module) {
|
|
||||||
return factory(module.default || module);
|
|
||||||
});
|
|
||||||
} else if (typeof module !== 'undefined' && module.exports) {
|
|
||||||
module.exports = factory(require('video.js'));
|
|
||||||
}
|
|
||||||
}(this, function (videojs) {
|
|
||||||
"use strict";
|
|
||||||
if (typeof window !== 'undefined') {
|
|
||||||
window['videojs_hotkeys'] = { version: "0.2.22" };
|
|
||||||
}
|
|
||||||
|
|
||||||
var hotkeys = function(options) {
|
|
||||||
var player = this;
|
|
||||||
var pEl = player.el();
|
|
||||||
var doc = document;
|
|
||||||
var def_options = {
|
|
||||||
volumeStep: 0.1,
|
|
||||||
seekStep: 5,
|
|
||||||
enableMute: true,
|
|
||||||
enableVolumeScroll: true,
|
|
||||||
enableHoverScroll: true,
|
|
||||||
enableFullscreen: true,
|
|
||||||
enableNumbers: true,
|
|
||||||
enableJogStyle: false,
|
|
||||||
alwaysCaptureHotkeys: false,
|
|
||||||
enableModifiersForNumbers: true,
|
|
||||||
enableInactiveFocus: true,
|
|
||||||
skipInitialFocus: false,
|
|
||||||
playPauseKey: playPauseKey,
|
|
||||||
rewindKey: rewindKey,
|
|
||||||
forwardKey: forwardKey,
|
|
||||||
volumeUpKey: volumeUpKey,
|
|
||||||
volumeDownKey: volumeDownKey,
|
|
||||||
muteKey: muteKey,
|
|
||||||
fullscreenKey: fullscreenKey,
|
|
||||||
customKeys: {}
|
|
||||||
};
|
|
||||||
|
|
||||||
var cPlay = 1,
|
|
||||||
cRewind = 2,
|
|
||||||
cForward = 3,
|
|
||||||
cVolumeUp = 4,
|
|
||||||
cVolumeDown = 5,
|
|
||||||
cMute = 6,
|
|
||||||
cFullscreen = 7;
|
|
||||||
|
|
||||||
// Use built-in merge function from Video.js v5.0+ or v4.4.0+
|
|
||||||
var mergeOptions = videojs.mergeOptions || videojs.util.mergeOptions;
|
|
||||||
options = mergeOptions(def_options, options || {});
|
|
||||||
|
|
||||||
var volumeStep = options.volumeStep,
|
|
||||||
seekStep = options.seekStep,
|
|
||||||
enableMute = options.enableMute,
|
|
||||||
enableVolumeScroll = options.enableVolumeScroll,
|
|
||||||
enableHoverScroll = options.enableHoverScroll,
|
|
||||||
enableFull = options.enableFullscreen,
|
|
||||||
enableNumbers = options.enableNumbers,
|
|
||||||
enableJogStyle = options.enableJogStyle,
|
|
||||||
alwaysCaptureHotkeys = options.alwaysCaptureHotkeys,
|
|
||||||
enableModifiersForNumbers = options.enableModifiersForNumbers,
|
|
||||||
enableInactiveFocus = options.enableInactiveFocus,
|
|
||||||
skipInitialFocus = options.skipInitialFocus;
|
|
||||||
|
|
||||||
// Set default player tabindex to handle keydown and doubleclick events
|
|
||||||
if (!pEl.hasAttribute('tabIndex')) {
|
|
||||||
pEl.setAttribute('tabIndex', '-1');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove player outline to fix video performance issue
|
|
||||||
pEl.style.outline = "none";
|
|
||||||
|
|
||||||
if (alwaysCaptureHotkeys || !player.autoplay()) {
|
|
||||||
if (!skipInitialFocus) {
|
|
||||||
player.one('play', function() {
|
|
||||||
pEl.focus(); // Fixes the .vjs-big-play-button handing focus back to body instead of the player
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (enableInactiveFocus) {
|
|
||||||
player.on('userinactive', function() {
|
|
||||||
// When the control bar fades, re-apply focus to the player if last focus was a control button
|
|
||||||
var cancelFocusingPlayer = function() {
|
|
||||||
clearTimeout(focusingPlayerTimeout);
|
|
||||||
};
|
|
||||||
var focusingPlayerTimeout = setTimeout(function() {
|
|
||||||
player.off('useractive', cancelFocusingPlayer);
|
|
||||||
var activeElement = doc.activeElement;
|
|
||||||
var controlBar = pEl.querySelector('.vjs-control-bar');
|
|
||||||
if (activeElement && activeElement.parentElement == controlBar) {
|
|
||||||
pEl.focus();
|
|
||||||
}
|
|
||||||
}, 10);
|
|
||||||
|
|
||||||
player.one('useractive', cancelFocusingPlayer);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
player.on('play', function() {
|
|
||||||
// Fix allowing the YouTube plugin to have hotkey support.
|
|
||||||
var ifblocker = pEl.querySelector('.iframeblocker');
|
|
||||||
if (ifblocker && ifblocker.style.display === '') {
|
|
||||||
ifblocker.style.display = "block";
|
|
||||||
ifblocker.style.bottom = "39px";
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var keyDown = function keyDown(event) {
|
|
||||||
var ewhich = event.which, wasPlaying, seekTime;
|
|
||||||
var ePreventDefault = event.preventDefault;
|
|
||||||
var duration = player.duration();
|
|
||||||
// When controls are disabled, hotkeys will be disabled as well
|
|
||||||
if (player.controls()) {
|
|
||||||
|
|
||||||
// Don't catch keys if any control buttons are focused, unless alwaysCaptureHotkeys is true
|
|
||||||
var activeEl = doc.activeElement;
|
|
||||||
if (alwaysCaptureHotkeys ||
|
|
||||||
activeEl == pEl ||
|
|
||||||
activeEl == pEl.querySelector('.vjs-tech') ||
|
|
||||||
activeEl == pEl.querySelector('.vjs-control-bar') ||
|
|
||||||
activeEl == pEl.querySelector('.iframeblocker')) {
|
|
||||||
|
|
||||||
switch (checkKeys(event, player)) {
|
|
||||||
// Spacebar toggles play/pause
|
|
||||||
case cPlay:
|
|
||||||
ePreventDefault();
|
|
||||||
if (alwaysCaptureHotkeys) {
|
|
||||||
// Prevent control activation with space
|
|
||||||
event.stopPropagation();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (player.paused()) {
|
|
||||||
player.play();
|
|
||||||
} else {
|
|
||||||
player.pause();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
// Seeking with the left/right arrow keys
|
|
||||||
case cRewind: // Seek Backward
|
|
||||||
wasPlaying = !player.paused();
|
|
||||||
ePreventDefault();
|
|
||||||
if (wasPlaying) {
|
|
||||||
player.pause();
|
|
||||||
}
|
|
||||||
seekTime = player.currentTime() - seekStepD(event);
|
|
||||||
// The flash player tech will allow you to seek into negative
|
|
||||||
// numbers and break the seekbar, so try to prevent that.
|
|
||||||
if (seekTime <= 0) {
|
|
||||||
seekTime = 0;
|
|
||||||
}
|
|
||||||
player.currentTime(seekTime);
|
|
||||||
if (wasPlaying) {
|
|
||||||
player.play();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case cForward: // Seek Forward
|
|
||||||
wasPlaying = !player.paused();
|
|
||||||
ePreventDefault();
|
|
||||||
if (wasPlaying) {
|
|
||||||
player.pause();
|
|
||||||
}
|
|
||||||
seekTime = player.currentTime() + seekStepD(event);
|
|
||||||
// Fixes the player not sending the end event if you
|
|
||||||
// try to seek past the duration on the seekbar.
|
|
||||||
if (seekTime >= duration) {
|
|
||||||
seekTime = wasPlaying ? duration - .001 : duration;
|
|
||||||
}
|
|
||||||
player.currentTime(seekTime);
|
|
||||||
if (wasPlaying) {
|
|
||||||
player.play();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
// Volume control with the up/down arrow keys
|
|
||||||
case cVolumeDown:
|
|
||||||
ePreventDefault();
|
|
||||||
if (!enableJogStyle) {
|
|
||||||
player.volume(player.volume() - volumeStep);
|
|
||||||
} else {
|
|
||||||
seekTime = player.currentTime() - 1;
|
|
||||||
if (player.currentTime() <= 1) {
|
|
||||||
seekTime = 0;
|
|
||||||
}
|
|
||||||
player.currentTime(seekTime);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case cVolumeUp:
|
|
||||||
ePreventDefault();
|
|
||||||
if (!enableJogStyle) {
|
|
||||||
player.volume(player.volume() + volumeStep);
|
|
||||||
} else {
|
|
||||||
seekTime = player.currentTime() + 1;
|
|
||||||
if (seekTime >= duration) {
|
|
||||||
seekTime = duration;
|
|
||||||
}
|
|
||||||
player.currentTime(seekTime);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
// Toggle Mute with the M key
|
|
||||||
case cMute:
|
|
||||||
if (enableMute) {
|
|
||||||
player.muted(!player.muted());
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
// Toggle Fullscreen with the F key
|
|
||||||
case cFullscreen:
|
|
||||||
if (enableFull) {
|
|
||||||
if (player.isFullscreen()) {
|
|
||||||
player.exitFullscreen();
|
|
||||||
} else {
|
|
||||||
player.requestFullscreen();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
// Number keys from 0-9 skip to a percentage of the video. 0 is 0% and 9 is 90%
|
|
||||||
if ((ewhich > 47 && ewhich < 59) || (ewhich > 95 && ewhich < 106)) {
|
|
||||||
// Do not handle if enableModifiersForNumbers set to false and keys are Ctrl, Cmd or Alt
|
|
||||||
if (enableModifiersForNumbers || !(event.metaKey || event.ctrlKey || event.altKey)) {
|
|
||||||
if (enableNumbers) {
|
|
||||||
var sub = 48;
|
|
||||||
if (ewhich > 95) {
|
|
||||||
sub = 96;
|
|
||||||
}
|
|
||||||
var number = ewhich - sub;
|
|
||||||
ePreventDefault();
|
|
||||||
player.currentTime(player.duration() * number * 0.1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Handle any custom hotkeys
|
|
||||||
for (var customKey in options.customKeys) {
|
|
||||||
var customHotkey = options.customKeys[customKey];
|
|
||||||
// Check for well formed custom keys
|
|
||||||
if (customHotkey && customHotkey.key && customHotkey.handler) {
|
|
||||||
// Check if the custom key's condition matches
|
|
||||||
if (customHotkey.key(event)) {
|
|
||||||
ePreventDefault();
|
|
||||||
customHotkey.handler(player, options, event);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var doubleClick = function doubleClick(event) {
|
|
||||||
// When controls are disabled, hotkeys will be disabled as well
|
|
||||||
if (player.controls()) {
|
|
||||||
|
|
||||||
// Don't catch clicks if any control buttons are focused
|
|
||||||
var activeEl = event.relatedTarget || event.toElement || doc.activeElement;
|
|
||||||
if (activeEl == pEl ||
|
|
||||||
activeEl == pEl.querySelector('.vjs-tech') ||
|
|
||||||
activeEl == pEl.querySelector('.iframeblocker')) {
|
|
||||||
|
|
||||||
if (enableFull) {
|
|
||||||
if (player.isFullscreen()) {
|
|
||||||
player.exitFullscreen();
|
|
||||||
} else {
|
|
||||||
player.requestFullscreen();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var volumeHover = false;
|
|
||||||
var volumeSelector = pEl.querySelector('.vjs-volume-menu-button') || pEl.querySelector('.vjs-volume-panel');
|
|
||||||
volumeSelector.onmouseover = function() { volumeHover = true; }
|
|
||||||
volumeSelector.onmouseout = function() { volumeHover = false; }
|
|
||||||
|
|
||||||
var mouseScroll = function mouseScroll(event) {
|
|
||||||
if (enableHoverScroll) {
|
|
||||||
// If we leave this undefined then it can match non-existent elements below
|
|
||||||
var activeEl = 0;
|
|
||||||
} else {
|
|
||||||
var activeEl = doc.activeElement;
|
|
||||||
}
|
|
||||||
|
|
||||||
// When controls are disabled, hotkeys will be disabled as well
|
|
||||||
if (player.controls()) {
|
|
||||||
if (alwaysCaptureHotkeys ||
|
|
||||||
activeEl == pEl ||
|
|
||||||
activeEl == pEl.querySelector('.vjs-tech') ||
|
|
||||||
activeEl == pEl.querySelector('.iframeblocker') ||
|
|
||||||
activeEl == pEl.querySelector('.vjs-control-bar') ||
|
|
||||||
volumeHover) {
|
|
||||||
|
|
||||||
if (enableVolumeScroll) {
|
|
||||||
event = window.event || event;
|
|
||||||
var delta = Math.max(-1, Math.min(1, (event.wheelDelta || -event.detail)));
|
|
||||||
event.preventDefault();
|
|
||||||
|
|
||||||
if (delta == 1) {
|
|
||||||
player.volume(player.volume() + volumeStep);
|
|
||||||
} else if (delta == -1) {
|
|
||||||
player.volume(player.volume() - volumeStep);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var checkKeys = function checkKeys(e, player) {
|
|
||||||
// Allow some modularity in defining custom hotkeys
|
|
||||||
|
|
||||||
// Play/Pause check
|
|
||||||
if (options.playPauseKey(e, player)) {
|
|
||||||
return cPlay;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Seek Backward check
|
|
||||||
if (options.rewindKey(e, player)) {
|
|
||||||
return cRewind;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Seek Forward check
|
|
||||||
if (options.forwardKey(e, player)) {
|
|
||||||
return cForward;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Volume Up check
|
|
||||||
if (options.volumeUpKey(e, player)) {
|
|
||||||
return cVolumeUp;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Volume Down check
|
|
||||||
if (options.volumeDownKey(e, player)) {
|
|
||||||
return cVolumeDown;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Mute check
|
|
||||||
if (options.muteKey(e, player)) {
|
|
||||||
return cMute;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fullscreen check
|
|
||||||
if (options.fullscreenKey(e, player)) {
|
|
||||||
return cFullscreen;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
function playPauseKey(e) {
|
|
||||||
// Space bar or MediaPlayPause
|
|
||||||
return (e.which === 32 || e.which === 179);
|
|
||||||
}
|
|
||||||
|
|
||||||
function rewindKey(e) {
|
|
||||||
// Left Arrow or MediaRewind
|
|
||||||
return (e.which === 37 || e.which === 177);
|
|
||||||
}
|
|
||||||
|
|
||||||
function forwardKey(e) {
|
|
||||||
// Right Arrow or MediaForward
|
|
||||||
return (e.which === 39 || e.which === 176);
|
|
||||||
}
|
|
||||||
|
|
||||||
function volumeUpKey(e) {
|
|
||||||
// Up Arrow
|
|
||||||
return (e.which === 38);
|
|
||||||
}
|
|
||||||
|
|
||||||
function volumeDownKey(e) {
|
|
||||||
// Down Arrow
|
|
||||||
return (e.which === 40);
|
|
||||||
}
|
|
||||||
|
|
||||||
function muteKey(e) {
|
|
||||||
// M key
|
|
||||||
return (e.which === 77);
|
|
||||||
}
|
|
||||||
|
|
||||||
function fullscreenKey(e) {
|
|
||||||
// F key
|
|
||||||
return (e.which === 70);
|
|
||||||
}
|
|
||||||
|
|
||||||
function seekStepD(e) {
|
|
||||||
// SeekStep caller, returns an int, or a function returning an int
|
|
||||||
return (typeof seekStep === "function" ? seekStep(e) : seekStep);
|
|
||||||
}
|
|
||||||
|
|
||||||
player.on('keydown', keyDown);
|
|
||||||
player.on('dblclick', doubleClick);
|
|
||||||
player.on('mousewheel', mouseScroll);
|
|
||||||
player.on("DOMMouseScroll", mouseScroll);
|
|
||||||
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
var registerPlugin = videojs.registerPlugin || videojs.plugin;
|
|
||||||
registerPlugin('hotkeys', hotkeys);
|
|
||||||
}));
|
|
||||||
5
assets/js/videojs.hotkeys.min.js
vendored
5
assets/js/videojs.hotkeys.min.js
vendored
@@ -1,2 +1,3 @@
|
|||||||
/* videojs-hotkeys v0.2.22 - https://github.com/ctd1500/videojs-hotkeys */
|
/* videojs-hotkeys v0.2.25 - https://github.com/ctd1500/videojs-hotkeys */
|
||||||
!function(e,t){"undefined"!=typeof window&&window.videojs?t(window.videojs):"function"==typeof define&&define.amd?define("videojs-hotkeys",["video.js"],function(e){return t(e.default||e)}):"undefined"!=typeof module&&module.exports&&(module.exports=t(require("video.js")))}(0,function(s){"use strict";"undefined"!=typeof window&&(window.videojs_hotkeys={version:"0.2.22"});(s.registerPlugin||s.plugin)("hotkeys",function(m){var y=this,v=y.el(),f=document,e={volumeStep:.1,seekStep:5,enableMute:!0,enableVolumeScroll:!0,enableHoverScroll:!0,enableFullscreen:!0,enableNumbers:!0,enableJogStyle:!1,alwaysCaptureHotkeys:!1,enableModifiersForNumbers:!0,enableInactiveFocus:!0,skipInitialFocus:!1,playPauseKey:function(e){return 32===e.which||179===e.which},rewindKey:function(e){return 37===e.which||177===e.which},forwardKey:function(e){return 39===e.which||176===e.which},volumeUpKey:function(e){return 38===e.which},volumeDownKey:function(e){return 40===e.which},muteKey:function(e){return 77===e.which},fullscreenKey:function(e){return 70===e.which},customKeys:{}},t=s.mergeOptions||s.util.mergeOptions,d=(m=t(e,m||{})).volumeStep,n=m.seekStep,p=m.enableMute,r=m.enableVolumeScroll,o=m.enableHoverScroll,b=m.enableFullscreen,h=m.enableNumbers,w=m.enableJogStyle,k=m.alwaysCaptureHotkeys,S=m.enableModifiersForNumbers,u=m.enableInactiveFocus,l=m.skipInitialFocus;v.hasAttribute("tabIndex")||v.setAttribute("tabIndex","-1"),v.style.outline="none",!k&&y.autoplay()||l||y.one("play",function(){v.focus()}),u&&y.on("userinactive",function(){var n=function(){clearTimeout(e)},e=setTimeout(function(){y.off("useractive",n);var e=f.activeElement,t=v.querySelector(".vjs-control-bar");e&&e.parentElement==t&&v.focus()},10);y.one("useractive",n)}),y.on("play",function(){var e=v.querySelector(".iframeblocker");e&&""===e.style.display&&(e.style.display="block",e.style.bottom="39px")});var i=!1,c=v.querySelector(".vjs-volume-menu-button")||v.querySelector(".vjs-volume-panel");c.onmouseover=function(){i=!0},c.onmouseout=function(){i=!1};var a=function(e){if(o)var t=0;else t=f.activeElement;if(y.controls()&&(k||t==v||t==v.querySelector(".vjs-tech")||t==v.querySelector(".iframeblocker")||t==v.querySelector(".vjs-control-bar")||i)&&r){e=window.event||e;var n=Math.max(-1,Math.min(1,e.wheelDelta||-e.detail));e.preventDefault(),1==n?y.volume(y.volume()+d):-1==n&&y.volume(y.volume()-d)}},K=function(e,t){return m.playPauseKey(e,t)?1:m.rewindKey(e,t)?2:m.forwardKey(e,t)?3:m.volumeUpKey(e,t)?4:m.volumeDownKey(e,t)?5:m.muteKey(e,t)?6:m.fullscreenKey(e,t)?7:void 0};function q(e){return"function"==typeof n?n(e):n}return y.on("keydown",function(e){var t,n,r=e.which,o=e.preventDefault,u=y.duration();if(y.controls()){var l=f.activeElement;if(k||l==v||l==v.querySelector(".vjs-tech")||l==v.querySelector(".vjs-control-bar")||l==v.querySelector(".iframeblocker"))switch(K(e,y)){case 1:o(),k&&e.stopPropagation(),y.paused()?y.play():y.pause();break;case 2:t=!y.paused(),o(),t&&y.pause(),(n=y.currentTime()-q(e))<=0&&(n=0),y.currentTime(n),t&&y.play();break;case 3:t=!y.paused(),o(),t&&y.pause(),u<=(n=y.currentTime()+q(e))&&(n=t?u-.001:u),y.currentTime(n),t&&y.play();break;case 5:o(),w?(n=y.currentTime()-1,y.currentTime()<=1&&(n=0),y.currentTime(n)):y.volume(y.volume()-d);break;case 4:o(),w?(u<=(n=y.currentTime()+1)&&(n=u),y.currentTime(n)):y.volume(y.volume()+d);break;case 6:p&&y.muted(!y.muted());break;case 7:b&&(y.isFullscreen()?y.exitFullscreen():y.requestFullscreen());break;default:if((47<r&&r<59||95<r&&r<106)&&(S||!(e.metaKey||e.ctrlKey||e.altKey))&&h){var i=48;95<r&&(i=96);var c=r-i;o(),y.currentTime(y.duration()*c*.1)}for(var a in m.customKeys){var s=m.customKeys[a];s&&s.key&&s.handler&&s.key(e)&&(o(),s.handler(y,m,e))}}}}),y.on("dblclick",function(e){if(y.controls()){var t=e.relatedTarget||e.toElement||f.activeElement;t!=v&&t!=v.querySelector(".vjs-tech")&&t!=v.querySelector(".iframeblocker")||b&&(y.isFullscreen()?y.exitFullscreen():y.requestFullscreen())}}),y.on("mousewheel",a),y.on("DOMMouseScroll",a),this})});
|
!function(e,n){"undefined"!=typeof window&&window.videojs?n(window.videojs):"function"==typeof define&&define.amd?define("videojs-hotkeys",["video.js"],function(e){return n(e.default||e)}):"undefined"!=typeof module&&module.exports&&(module.exports=n(require("video.js")))}(0,function(e){"use strict";"undefined"!=typeof window&&(window.videojs_hotkeys={version:"0.2.25"});(e.registerPlugin||e.plugin)("hotkeys",function(n){function t(e){return"function"==typeof s?s(e):s}function r(e){null!=e&&"function"==typeof e.then&&e.then(null,function(e){})}var o=this,u=o.el(),l=document,i={volumeStep:.1,seekStep:5,enableMute:!0,enableVolumeScroll:!0,enableHoverScroll:!1,enableFullscreen:!0,enableNumbers:!0,enableJogStyle:!1,alwaysCaptureHotkeys:!1,enableModifiersForNumbers:!0,enableInactiveFocus:!0,skipInitialFocus:!1,playPauseKey:function(e){return 32===e.which||179===e.which},rewindKey:function(e){return 37===e.which||177===e.which},forwardKey:function(e){return 39===e.which||176===e.which},volumeUpKey:function(e){return 38===e.which},volumeDownKey:function(e){return 40===e.which},muteKey:function(e){return 77===e.which},fullscreenKey:function(e){return 70===e.which},customKeys:{}},c=e.mergeOptions||e.util.mergeOptions,a=(n=c(i,n||{})).volumeStep,s=n.seekStep,m=n.enableMute,f=n.enableVolumeScroll,y=n.enableHoverScroll,v=n.enableFullscreen,d=n.enableNumbers,p=n.enableJogStyle,b=n.alwaysCaptureHotkeys,h=n.enableModifiersForNumbers,w=n.enableInactiveFocus,k=n.skipInitialFocus,S=e.VERSION;u.hasAttribute("tabIndex")||u.setAttribute("tabIndex","-1"),u.style.outline="none",!b&&o.autoplay()||k||o.one("play",function(){u.focus()}),w&&o.on("userinactive",function(){var e=function(){clearTimeout(n)},n=setTimeout(function(){o.off("useractive",e);var n=l.activeElement,t=u.querySelector(".vjs-control-bar");n&&n.parentElement==t&&u.focus()},10);o.one("useractive",e)}),o.on("play",function(){var e=u.querySelector(".iframeblocker");e&&""===e.style.display&&(e.style.display="block",e.style.bottom="39px")});var K=!1,q=u.querySelector(".vjs-volume-menu-button")||u.querySelector(".vjs-volume-panel");null!=q&&(q.onmouseover=function(){K=!0},q.onmouseout=function(){K=!1});var j=function(e){if(y)n=0;else var n=l.activeElement;if(o.controls()&&(b||n==u||n==u.querySelector(".vjs-tech")||n==u.querySelector(".iframeblocker")||n==u.querySelector(".vjs-control-bar")||K)&&f){e=window.event||e;var t=Math.max(-1,Math.min(1,e.wheelDelta||-e.detail));e.preventDefault(),1==t?o.volume(o.volume()+a):-1==t&&o.volume(o.volume()-a)}},F=function(e,t){return n.playPauseKey(e,t)?1:n.rewindKey(e,t)?2:n.forwardKey(e,t)?3:n.volumeUpKey(e,t)?4:n.volumeDownKey(e,t)?5:n.muteKey(e,t)?6:n.fullscreenKey(e,t)?7:void 0};return o.on("keydown",function(e){var i,c,s=e.which,f=e.preventDefault,y=o.duration();if(o.controls()){var w=l.activeElement;if(b||w==u||w==u.querySelector(".vjs-tech")||w==u.querySelector(".vjs-control-bar")||w==u.querySelector(".iframeblocker"))switch(F(e,o)){case 1:f(),b&&e.stopPropagation(),o.paused()?r(o.play()):o.pause();break;case 2:i=!o.paused(),f(),i&&o.pause(),(c=o.currentTime()-t(e))<=0&&(c=0),o.currentTime(c),i&&r(o.play());break;case 3:i=!o.paused(),f(),i&&o.pause(),(c=o.currentTime()+t(e))>=y&&(c=i?y-.001:y),o.currentTime(c),i&&r(o.play());break;case 5:f(),p?(c=o.currentTime()-1,o.currentTime()<=1&&(c=0),o.currentTime(c)):o.volume(o.volume()-a);break;case 4:f(),p?((c=o.currentTime()+1)>=y&&(c=y),o.currentTime(c)):o.volume(o.volume()+a);break;case 6:m&&o.muted(!o.muted());break;case 7:v&&(o.isFullscreen()?o.exitFullscreen():o.requestFullscreen());break;default:if((s>47&&s<59||s>95&&s<106)&&(h||!(e.metaKey||e.ctrlKey||e.altKey))&&d){var k=48;s>95&&(k=96);var S=s-k;f(),o.currentTime(o.duration()*S*.1)}for(var K in n.customKeys){var q=n.customKeys[K];q&&q.key&&q.handler&&q.key(e)&&(f(),q.handler(o,n,e))}}}}),o.on("dblclick",function(e){if(null!=S&&S<="7.1.0"&&o.controls()){var n=e.relatedTarget||e.toElement||l.activeElement;n!=u&&n!=u.querySelector(".vjs-tech")&&n!=u.querySelector(".iframeblocker")||v&&(o.isFullscreen()?o.exitFullscreen():o.requestFullscreen())}}),o.on("mousewheel",j),o.on("DOMMouseScroll",j),this})});
|
||||||
|
//# sourceMappingURL=videojs.hotkeys.min.js.map
|
||||||
@@ -35,18 +35,18 @@ String.prototype.supplant = function(o) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
function show_youtube_replies(target) {
|
function show_youtube_replies(target, inner_text, sub_text) {
|
||||||
body = target.parentNode.parentNode.children[1];
|
body = target.parentNode.parentNode.children[1];
|
||||||
body.style.display = "";
|
body.style.display = "";
|
||||||
|
|
||||||
target.innerHTML = "Hide replies";
|
target.innerHTML = inner_text;
|
||||||
target.setAttribute("onclick", "hide_youtube_replies(this)");
|
target.setAttribute("onclick", "hide_youtube_replies(this, \'" + inner_text + "\', \'" + sub_text + "\')");
|
||||||
}
|
}
|
||||||
|
|
||||||
function hide_youtube_replies(target) {
|
function hide_youtube_replies(target, inner_text, sub_text) {
|
||||||
body = target.parentNode.parentNode.children[1];
|
body = target.parentNode.parentNode.children[1];
|
||||||
body.style.display = "none";
|
body.style.display = "none";
|
||||||
|
|
||||||
target.innerHTML = "Show replies";
|
target.innerHTML = sub_text;
|
||||||
target.setAttribute("onclick", "show_youtube_replies(this)");
|
target.setAttribute("onclick", "show_youtube_replies(this, \'" + inner_text + "\', \'" + sub_text + "\')");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
video_threads: 0
|
|
||||||
crawl_threads: 0
|
|
||||||
channel_threads: 1
|
channel_threads: 1
|
||||||
feed_threads: 1
|
feed_threads: 1
|
||||||
db:
|
db:
|
||||||
@@ -10,3 +8,4 @@ db:
|
|||||||
dbname: invidious
|
dbname: invidious
|
||||||
full_refresh: false
|
full_refresh: false
|
||||||
https_only: false
|
https_only: false
|
||||||
|
domain:
|
||||||
|
|||||||
4
config/migrate-scripts/migrate-db-17cf077.sh
Executable file
4
config/migrate-scripts/migrate-db-17cf077.sh
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
psql invidious -c "ALTER TABLE channels ADD COLUMN subscribed bool;"
|
||||||
|
psql invidious -c "UPDATE channels SET subscribed = false;"
|
||||||
7
config/migrate-scripts/migrate-db-1c8075c.sh
Executable file
7
config/migrate-scripts/migrate-db-1c8075c.sh
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
psql invidious -c "ALTER TABLE channel_videos DROP COLUMN live_now CASCADE"
|
||||||
|
psql invidious -c "ALTER TABLE channel_videos DROP COLUMN premiere_timestamp CASCADE"
|
||||||
|
|
||||||
|
psql invidious -c "ALTER TABLE channel_videos ADD COLUMN live_now bool"
|
||||||
|
psql invidious -c "ALTER TABLE channel_videos ADD COLUMN premiere_timestamp timestamptz"
|
||||||
4
config/migrate-scripts/migrate-db-30e6d29.sh
Executable file
4
config/migrate-scripts/migrate-db-30e6d29.sh
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
psql invidious -c "ALTER TABLE channels ADD COLUMN deleted bool;"
|
||||||
|
psql invidious -c "UPDATE channels SET deleted = false;"
|
||||||
5
config/migrate-scripts/migrate-db-3646395.sh
Executable file
5
config/migrate-scripts/migrate-db-3646395.sh
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
psql invidious < config/sql/session_ids.sql
|
||||||
|
psql invidious -c "INSERT INTO session_ids (SELECT unnest(id), email, CURRENT_TIMESTAMP FROM users) ON CONFLICT (id) DO NOTHING"
|
||||||
|
psql invidious -c "ALTER TABLE users DROP COLUMN id"
|
||||||
4
config/migrate-scripts/migrate-db-6e51189.sh
Executable file
4
config/migrate-scripts/migrate-db-6e51189.sh
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
psql invidious -c "ALTER TABLE channel_videos ADD COLUMN live_now bool;"
|
||||||
|
psql invidious -c "UPDATE channel_videos SET live_now = false;"
|
||||||
3
config/migrate-scripts/migrate-db-88b7097.sh
Executable file
3
config/migrate-scripts/migrate-db-88b7097.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
psql invidious -c "ALTER TABLE channel_videos ADD COLUMN premiere_timestamp timestamptz;"
|
||||||
5
config/migrate-scripts/migrate-db-8e884fe.sh
Executable file
5
config/migrate-scripts/migrate-db-8e884fe.sh
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
psql invidious -c "ALTER TABLE channels DROP COLUMN subscribed"
|
||||||
|
psql invidious -c "ALTER TABLE channels ADD COLUMN subscribed timestamptz"
|
||||||
|
psql invidious -c "UPDATE channels SET subscribed = '2019-01-01 00:00:00+00'"
|
||||||
@@ -11,6 +11,8 @@ CREATE TABLE public.channel_videos
|
|||||||
ucid text,
|
ucid text,
|
||||||
author text,
|
author text,
|
||||||
length_seconds integer,
|
length_seconds integer,
|
||||||
|
live_now boolean,
|
||||||
|
premiere_timestamp timestamp with time zone,
|
||||||
CONSTRAINT channel_videos_id_key UNIQUE (id)
|
CONSTRAINT channel_videos_id_key UNIQUE (id)
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -31,6 +33,6 @@ CREATE INDEX channel_videos_published_idx
|
|||||||
|
|
||||||
CREATE INDEX channel_videos_ucid_idx
|
CREATE INDEX channel_videos_ucid_idx
|
||||||
ON public.channel_videos
|
ON public.channel_videos
|
||||||
USING hash
|
USING btree
|
||||||
(ucid COLLATE pg_catalog."default");
|
(ucid COLLATE pg_catalog."default");
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ CREATE TABLE public.channels
|
|||||||
id text NOT NULL,
|
id text NOT NULL,
|
||||||
author text,
|
author text,
|
||||||
updated timestamp with time zone,
|
updated timestamp with time zone,
|
||||||
|
deleted boolean,
|
||||||
|
subscribed timestamp with time zone,
|
||||||
CONSTRAINT channels_id_key UNIQUE (id)
|
CONSTRAINT channels_id_key UNIQUE (id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,18 @@
|
|||||||
CREATE TABLE public.nonces
|
CREATE TABLE public.nonces
|
||||||
(
|
(
|
||||||
nonce text,
|
nonce text,
|
||||||
expire timestamp with time zone
|
expire timestamp with time zone,
|
||||||
)
|
CONSTRAINT nonces_id_key UNIQUE (nonce)
|
||||||
WITH (
|
|
||||||
OIDS=FALSE
|
|
||||||
);
|
);
|
||||||
|
|
||||||
GRANT ALL ON TABLE public.nonces TO kemal;
|
GRANT ALL ON TABLE public.nonces TO kemal;
|
||||||
|
|
||||||
|
-- Index: public.nonces_nonce_idx
|
||||||
|
|
||||||
|
-- DROP INDEX public.nonces_nonce_idx;
|
||||||
|
|
||||||
|
CREATE INDEX nonces_nonce_idx
|
||||||
|
ON public.nonces
|
||||||
|
USING btree
|
||||||
|
(nonce COLLATE pg_catalog."default");
|
||||||
|
|
||||||
|
|||||||
23
config/sql/session_ids.sql
Normal file
23
config/sql/session_ids.sql
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
-- Table: public.session_ids
|
||||||
|
|
||||||
|
-- DROP TABLE public.session_ids;
|
||||||
|
|
||||||
|
CREATE TABLE public.session_ids
|
||||||
|
(
|
||||||
|
id text NOT NULL,
|
||||||
|
email text,
|
||||||
|
issued timestamp with time zone,
|
||||||
|
CONSTRAINT session_ids_pkey PRIMARY KEY (id)
|
||||||
|
);
|
||||||
|
|
||||||
|
GRANT ALL ON TABLE public.session_ids TO kemal;
|
||||||
|
|
||||||
|
-- Index: public.session_ids_id_idx
|
||||||
|
|
||||||
|
-- DROP INDEX public.session_ids_id_idx;
|
||||||
|
|
||||||
|
CREATE INDEX session_ids_id_idx
|
||||||
|
ON public.session_ids
|
||||||
|
USING btree
|
||||||
|
(id COLLATE pg_catalog."default");
|
||||||
|
|
||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
CREATE TABLE public.users
|
CREATE TABLE public.users
|
||||||
(
|
(
|
||||||
id text[] NOT NULL,
|
|
||||||
updated timestamp with time zone,
|
updated timestamp with time zone,
|
||||||
notifications text[],
|
notifications text[],
|
||||||
subscriptions text[],
|
subscriptions text[],
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ ADD . /invidious
|
|||||||
WORKDIR /invidious
|
WORKDIR /invidious
|
||||||
|
|
||||||
RUN sed -i 's/host: localhost/host: postgres/' config/config.yml && \
|
RUN sed -i 's/host: localhost/host: postgres/' config/config.yml && \
|
||||||
shards && \
|
shards update && shards install && \
|
||||||
crystal build src/invidious.cr
|
crystal build src/invidious.cr
|
||||||
|
|
||||||
CMD [ "/invidious/invidious" ]
|
CMD [ "/invidious/invidious" ]
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,15 @@ 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/session_ids.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
19
invidious.service
Normal 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
|
||||||
@@ -10,8 +10,9 @@
|
|||||||
"newest": "الأجدد",
|
"newest": "الأجدد",
|
||||||
"oldest": "الأقدم",
|
"oldest": "الأقدم",
|
||||||
"popular": "الاكثر شعبية",
|
"popular": "الاكثر شعبية",
|
||||||
"Preview page": "معاينة الصفحة",
|
"last": "اخر الفيديوهات المعدلة",
|
||||||
"Next page": "الصفحة الثانية",
|
"Next page": "الصفحة الثانية",
|
||||||
|
"Previous page": "الصفحة السابقة",
|
||||||
"Clear watch history?": "مسح السجل ؟",
|
"Clear watch history?": "مسح السجل ؟",
|
||||||
"Yes": "نعم",
|
"Yes": "نعم",
|
||||||
"No": "لا",
|
"No": "لا",
|
||||||
@@ -28,7 +29,6 @@
|
|||||||
"Export data as JSON": "استخراج البيانات كـ JSON",
|
"Export data as JSON": "استخراج البيانات كـ JSON",
|
||||||
"Delete account?": "حذف الحساب ؟",
|
"Delete account?": "حذف الحساب ؟",
|
||||||
"History": "السجل",
|
"History": "السجل",
|
||||||
"Previous page": "الصفحة السابقة",
|
|
||||||
"An alternative front-end to YouTube": "البديل الكامل لموقع يوتيوب",
|
"An alternative front-end to YouTube": "البديل الكامل لموقع يوتيوب",
|
||||||
"JavaScript license information": "معلومات ترخيص JavaScript",
|
"JavaScript license information": "معلومات ترخيص JavaScript",
|
||||||
"source": "المصدر",
|
"source": "المصدر",
|
||||||
@@ -50,6 +50,7 @@
|
|||||||
"Autoplay: ": "تشغيل تلقائى: ",
|
"Autoplay: ": "تشغيل تلقائى: ",
|
||||||
"Autoplay next video: ": "شغل الفيديو التالى تلقائى: ",
|
"Autoplay next video: ": "شغل الفيديو التالى تلقائى: ",
|
||||||
"Listen by default: ": "تشغيل النسخة السمعية تلقائى: ",
|
"Listen by default: ": "تشغيل النسخة السمعية تلقائى: ",
|
||||||
|
"Proxy videos? ": "عرض الفيديوهات عن طريق الوكيل(proxy) ؟",
|
||||||
"Default speed: ": "السرعة الإفتراضية: ",
|
"Default speed: ": "السرعة الإفتراضية: ",
|
||||||
"Preferred video quality: ": "الجودة المفضلة للفيديوهات: ",
|
"Preferred video quality: ": "الجودة المفضلة للفيديوهات: ",
|
||||||
"Player volume: ": "صوت المشغل: ",
|
"Player volume: ": "صوت المشغل: ",
|
||||||
@@ -82,6 +83,14 @@
|
|||||||
"Manage subscriptions": "إدارة المشتركين",
|
"Manage subscriptions": "إدارة المشتركين",
|
||||||
"Watch history": "سجل المشاهدة",
|
"Watch history": "سجل المشاهدة",
|
||||||
"Delete account": "حذف الحساب",
|
"Delete account": "حذف الحساب",
|
||||||
|
"Administrator preferences": "إعدادات المدير",
|
||||||
|
"Default homepage: ": "الصفحة الرئيسية الافتراضية ",
|
||||||
|
"Feed menu: ": "قائمة التغذية",
|
||||||
|
"Top enabled? ": "تفعيل 'الأفضل' ؟ ",
|
||||||
|
"CAPTCHA enabled? ": "تفعيل الكابتشا ؟",
|
||||||
|
"Login enabled? ": "تفعيل تسجيل الدخول ؟",
|
||||||
|
"Registration enabled? ": "تفعيل التسجيل ؟",
|
||||||
|
"Report statistics? ": "إبلاغ الإحصائيات",
|
||||||
"Save preferences": "حفظ التفضيلات",
|
"Save preferences": "حفظ التفضيلات",
|
||||||
"Subscription manager": "مدير الإشتراكات",
|
"Subscription manager": "مدير الإشتراكات",
|
||||||
"`x` subscriptions": "`x` مشتركين",
|
"`x` subscriptions": "`x` مشتركين",
|
||||||
@@ -93,12 +102,10 @@
|
|||||||
"Sign out": "تسجيل الخروج",
|
"Sign out": "تسجيل الخروج",
|
||||||
"Released under the AGPLv3 by Omar Roth.": "تم الإنشاء تحت AGPLv3 بواسطة عمر روث.",
|
"Released under the AGPLv3 by Omar Roth.": "تم الإنشاء تحت AGPLv3 بواسطة عمر روث.",
|
||||||
"Source available here.": "الأكواد متوفرة هنا.",
|
"Source available here.": "الأكواد متوفرة هنا.",
|
||||||
"Liberapay: ": "ليبرباى: ",
|
|
||||||
"Patreon: ": "باتريون: ",
|
|
||||||
"BTC: ": "بيتكوين: ",
|
|
||||||
"BCH: ": "بيتكوين كاش: ",
|
|
||||||
"View JavaScript license information.": "مشاهدة معلومات حول تراخيص الجافاسكريبت.",
|
"View JavaScript license information.": "مشاهدة معلومات حول تراخيص الجافاسكريبت.",
|
||||||
|
"View privacy policy.": "عرض سياسة الخصوصية",
|
||||||
"Trending": "الشائع",
|
"Trending": "الشائع",
|
||||||
|
"Unlisted": "غير مصنف",
|
||||||
"Watch video on Youtube": "مشاهدة الفيديو على اليوتيوب",
|
"Watch video on Youtube": "مشاهدة الفيديو على اليوتيوب",
|
||||||
"Genre: ": "النوع: ",
|
"Genre: ": "النوع: ",
|
||||||
"License: ": "التراخيص: ",
|
"License: ": "التراخيص: ",
|
||||||
@@ -108,6 +115,7 @@
|
|||||||
"Whitelisted regions: ": "الدول المسموح فيها هذا الفيديو: ",
|
"Whitelisted regions: ": "الدول المسموح فيها هذا الفيديو: ",
|
||||||
"Blacklisted regions: ": "الدول الحظور فيها هذا الفيديو: ",
|
"Blacklisted regions: ": "الدول الحظور فيها هذا الفيديو: ",
|
||||||
"Shared `x`": "شارك منذ `x`",
|
"Shared `x`": "شارك منذ `x`",
|
||||||
|
"Premieres in `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.": "اهلا! يبدو ان الجافاسكريبت معطلة. اضغط هنا لعرض التعليقات, ضع فى إعتبارك انها ستأخذ وقت اطول للعرض.",
|
"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 YouTube comments": "عرض تعليقات اليوتيوب",
|
||||||
"View more comments on Reddit": "عرض المزيد من التعليقات على\\من موقع Reddit",
|
"View more comments on Reddit": "عرض المزيد من التعليقات على\\من موقع Reddit",
|
||||||
@@ -265,9 +273,25 @@
|
|||||||
"`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 ❤": "'x' اعجب بهذا",
|
||||||
|
"Audio mode": "الوضع الصوتى",
|
||||||
|
"Video mode": "وضع الفيديو",
|
||||||
|
"Videos": "الفيديوهات",
|
||||||
|
"Playlists": "قوائم التشغيل",
|
||||||
|
"Current version: ": "الإصدار الحالى"
|
||||||
}
|
}
|
||||||
|
|||||||
566
locales/de.json
566
locales/de.json
@@ -1,273 +1,297 @@
|
|||||||
{
|
{
|
||||||
"`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",
|
"last": "",
|
||||||
"Next page": "Nächste Seite",
|
"Next page": "Nächste Seite",
|
||||||
"Clear watch history?": "Verlauf löschen?",
|
"Previous page": "Vorherige Seite",
|
||||||
"Yes": "Ja",
|
"Clear watch history?": "Verlauf löschen?",
|
||||||
"No": "Nein",
|
"Yes": "Ja",
|
||||||
"Import and Export Data": "Import und Export Daten",
|
"No": "Nein",
|
||||||
"Import": "Importieren",
|
"Import and Export Data": "Import und Export Daten",
|
||||||
"Import Invidious data": "Invidious Daten importieren",
|
"Import": "Importieren",
|
||||||
"Import YouTube subscriptions": "YouTube Abonnements importieren",
|
"Import Invidious data": "Invidious Daten importieren",
|
||||||
"Import FreeTube subscriptions (.db)": "FreeTube Abonnements importieren (.db)",
|
"Import YouTube subscriptions": "YouTube Abonnements importieren",
|
||||||
"Import NewPipe subscriptions (.json)": "NewPipe Abonnements importieren (.json)",
|
"Import FreeTube subscriptions (.db)": "FreeTube Abonnements importieren (.db)",
|
||||||
"Import NewPipe data (.zip)": "NewPipe Daten importieren (.zip)",
|
"Import NewPipe subscriptions (.json)": "NewPipe Abonnements importieren (.json)",
|
||||||
"Export": "Exportieren",
|
"Import NewPipe data (.zip)": "NewPipe Daten importieren (.zip)",
|
||||||
"Export subscriptions as OPML": "Abonnements als OPML exportieren",
|
"Export": "Exportieren",
|
||||||
"Export subscriptions as OPML (for NewPipe & FreeTube)": "Abonnements als OPML exportieren (für NewPipe & FreeTube)",
|
"Export subscriptions as OPML": "Abonnements als OPML exportieren",
|
||||||
"Export data as JSON": "Daten als JSON exportieren",
|
"Export subscriptions as OPML (for NewPipe & FreeTube)": "Abonnements als OPML exportieren (für NewPipe & FreeTube)",
|
||||||
"Delete account?": "Account löschen?",
|
"Export data as JSON": "Daten als JSON exportieren",
|
||||||
"History": "Verlauf",
|
"Delete account?": "Account löschen?",
|
||||||
"Previous page": "Vorherige Seite",
|
"History": "Verlauf",
|
||||||
"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: ",
|
"Proxy videos? ": "",
|
||||||
"Preferred video quality: ": "Bevorzugte Videoqualität: ",
|
"Default speed: ": "Standardgeschwindigkeit: ",
|
||||||
"Player volume: ": "Playerlautstärke: ",
|
"Preferred video quality: ": "Bevorzugte Videoqualität: ",
|
||||||
"Default comments: ": "Standardkommentare: ",
|
"Player volume: ": "Playerlautstärke: ",
|
||||||
"youtube": "youtube",
|
"Default comments: ": "Standardkommentare: ",
|
||||||
"reddit": "reddit",
|
"youtube": "youtube",
|
||||||
"Default captions: ": "Standarduntertitel: ",
|
"reddit": "reddit",
|
||||||
"Fallback captions: ": "Ersatzuntertitel: ",
|
"Default captions: ": "Standarduntertitel: ",
|
||||||
"Show related videos? ": "Ähnliche Videos anzeigen? ",
|
"Fallback captions: ": "Ersatzuntertitel: ",
|
||||||
"Visual preferences": "Anzeigeeinstellungen",
|
"Show related videos? ": "Ähnliche Videos anzeigen? ",
|
||||||
"Dark mode: ": "Nachtmodus: ",
|
"Visual preferences": "Anzeigeeinstellungen",
|
||||||
"Thin mode: ": "Schlanker Modus: ",
|
"Dark mode: ": "Nachtmodus: ",
|
||||||
"Subscription preferences": "Abonnementeinstellungen",
|
"Thin mode: ": "Schlanker Modus: ",
|
||||||
"Redirect homepage to feed: ": "Startseite zu Feed umleiten: ",
|
"Subscription preferences": "Abonnementeinstellungen",
|
||||||
"Number of videos shown in feed: ": "Anzahl von Videos die im Feed angezeigt werden: ",
|
"Redirect homepage to feed: ": "Startseite zu Feed umleiten: ",
|
||||||
"Sort videos by: ": "Videos sortieren nach: ",
|
"Number of videos shown in feed: ": "Anzahl von Videos die im Feed angezeigt werden: ",
|
||||||
"published": "veröffentlicht",
|
"Sort videos by: ": "Videos sortieren nach: ",
|
||||||
"published - reverse": "veröffentlicht - invertiert",
|
"published": "veröffentlicht",
|
||||||
"alphabetically": "alphabetisch",
|
"published - reverse": "veröffentlicht - invertiert",
|
||||||
"alphabetically - reverse": "alphabetisch - invertiert",
|
"alphabetically": "alphabetisch",
|
||||||
"channel name": "Kanalname",
|
"alphabetically - reverse": "alphabetisch - invertiert",
|
||||||
"channel name - reverse": "Kanalname - invertiert",
|
"channel name": "Kanalname",
|
||||||
"Only show latest video from channel: ": "Nur neueste Videos des Kanals anzeigen: ",
|
"channel name - reverse": "Kanalname - invertiert",
|
||||||
"Only show latest unwatched video from channel: ": "Nur neueste ungesehene Videos des Kanals anzeigen: ",
|
"Only show latest video from channel: ": "Nur neueste Videos des Kanals anzeigen: ",
|
||||||
"Only show unwatched: ": "Nur ungesehene anzeigen: ",
|
"Only show latest unwatched video from channel: ": "Nur neueste ungesehene Videos des Kanals anzeigen: ",
|
||||||
"Only show notifications (if there are any): ": "Nur Benachrichtigungen anzeigen (wenn es welche gibt): ",
|
"Only show unwatched: ": "Nur ungesehene anzeigen: ",
|
||||||
"Data preferences": "Dateneinstellungen",
|
"Only show notifications (if there are any): ": "Nur Benachrichtigungen anzeigen (wenn es welche gibt): ",
|
||||||
"Clear watch history": "Verlauf löschen",
|
"Data preferences": "Dateneinstellungen",
|
||||||
"Import/Export data": "Daten im- exportieren",
|
"Clear watch history": "Verlauf löschen",
|
||||||
"Manage subscriptions": "Abonnements verwalten",
|
"Import/Export data": "Daten im- exportieren",
|
||||||
"Watch history": "Verlauf",
|
"Manage subscriptions": "Abonnements verwalten",
|
||||||
"Delete account": "Account löschen",
|
"Watch history": "Verlauf",
|
||||||
"Save preferences": "Einstellungen speichern",
|
"Delete account": "Account löschen",
|
||||||
"Subscription manager": "Abonnementverwaltung",
|
"Administrator preferences": "",
|
||||||
"`x` subscriptions": "`x` Abonnements",
|
"Default homepage: ": "",
|
||||||
"Import/Export": "Importieren/Exportieren",
|
"Feed menu: ": "",
|
||||||
"unsubscribe": "abbestellen",
|
"Top enabled? ": "",
|
||||||
"Subscriptions": "Abonnements",
|
"CAPTCHA enabled? ": "",
|
||||||
"`x` unseen notifications": "`x` ungesehene Benachrichtigungen",
|
"Login enabled? ": "",
|
||||||
"search": "Suchen",
|
"Registration enabled? ": "",
|
||||||
"Sign out": "Abmelden",
|
"Report statistics? ": "",
|
||||||
"Released under the AGPLv3 by Omar Roth.": "Veröffentlicht unter AGPLv3 von Omar Roth.",
|
"Save preferences": "Einstellungen speichern",
|
||||||
"Source available here.": "Quellcode verfügbar hier.",
|
"Subscription manager": "Abonnementverwaltung",
|
||||||
"Liberapay: ": "Liberapay: ",
|
"`x` subscriptions": "`x` Abonnements",
|
||||||
"Patreon: ": "Patreon: ",
|
"Import/Export": "Importieren/Exportieren",
|
||||||
"BTC: ": "BTC: ",
|
"unsubscribe": "abbestellen",
|
||||||
"BCH: ": "BCH: ",
|
"Subscriptions": "Abonnements",
|
||||||
"View JavaScript license information.": "Javascript Lizenzinformationen anzeigen.",
|
"`x` unseen notifications": "`x` ungesehene Benachrichtigungen",
|
||||||
"Trending": "Trending",
|
"search": "Suchen",
|
||||||
"Watch video on Youtube": "Video auf YouTube ansehen",
|
"Sign out": "Abmelden",
|
||||||
"Genre: ": "Genre: ",
|
"Released under the AGPLv3 by Omar Roth.": "Veröffentlicht unter AGPLv3 von Omar Roth.",
|
||||||
"License: ": "Lizenz: ",
|
"Source available here.": "Quellcode verfügbar hier.",
|
||||||
"Family friendly? ": "Familienfreundlich? ",
|
"View JavaScript license information.": "Javascript Lizenzinformationen anzeigen.",
|
||||||
"Wilson score: ": "Wilson-Score: ",
|
"View privacy policy.": "",
|
||||||
"Engagement: ": "Engagement: ",
|
"Trending": "Trending",
|
||||||
"Whitelisted regions: ": "Erlaubte Regionen: ",
|
"Unlisted": "",
|
||||||
"Blacklisted regions: ": "Unerlaubte Regionen: ",
|
"Watch video on Youtube": "Video auf YouTube ansehen",
|
||||||
"Shared `x`": "Geteilt `x`",
|
"Genre: ": "Genre: ",
|
||||||
"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.",
|
"License: ": "Lizenz: ",
|
||||||
"View YouTube comments": "YouTube Kommentare anzeigen",
|
"Family friendly? ": "Familienfreundlich? ",
|
||||||
"View more comments on Reddit": "Mehr Kommentare auf Reddit anzeigen",
|
"Wilson score: ": "Wilson-Score: ",
|
||||||
"View `x` comments": "`x` Kommentare anzeigen",
|
"Engagement: ": "Engagement: ",
|
||||||
"View Reddit comments": "Reddit Kommentare anzeigen",
|
"Whitelisted regions: ": "Erlaubte Regionen: ",
|
||||||
"Hide replies": "Antworten verstecken",
|
"Blacklisted regions: ": "Unerlaubte Regionen: ",
|
||||||
"Show replies": "Antworten anzeigen",
|
"Shared `x`": "Geteilt `x`",
|
||||||
"Incorrect password": "Falsches Passwort",
|
"Premieres in `x`": "",
|
||||||
"Quota exceeded, try again in a few hours": "Kontingent überschritten, versuche es in ein paar Stunden erneut",
|
"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.",
|
||||||
"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.",
|
"View YouTube comments": "YouTube Kommentare anzeigen",
|
||||||
"Invalid TFA code": "Ungültiger TFA Code",
|
"View more comments on Reddit": "Mehr Kommentare auf Reddit anzeigen",
|
||||||
"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.",
|
"View `x` comments": "`x` Kommentare anzeigen",
|
||||||
"Invalid answer": "Ungültige Antwort",
|
"View Reddit comments": "Reddit Kommentare anzeigen",
|
||||||
"Invalid CAPTCHA": "Ungültiges CAPTCHA",
|
"Hide replies": "Antworten verstecken",
|
||||||
"CAPTCHA is a required field": "CAPTCHA ist eine erforderliche Eingabe",
|
"Show replies": "Antworten anzeigen",
|
||||||
"User ID is a required field": "Benutzer ID ist eine erforderliche Eingabe",
|
"Incorrect password": "Falsches Passwort",
|
||||||
"Password is a required field": "Passwort ist eine erforderliche Eingabe",
|
"Quota exceeded, try again in a few hours": "Kontingent überschritten, versuche es in ein paar Stunden erneut",
|
||||||
"Invalid username or password": "Ungültiger Benutzername oder Passwort",
|
"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.",
|
||||||
"Please sign in using 'Sign in with Google'": "Bitte melden sie sich mit 'Mit Google anmelden' an",
|
"Invalid TFA code": "Ungültiger TFA Code",
|
||||||
"Password cannot be empty": "Passwort darf nicht leer sein",
|
"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.",
|
||||||
"Password cannot be longer than 55 characters": "Passwort darf nicht länger als 55 Zeichen sein",
|
"Invalid answer": "Ungültige Antwort",
|
||||||
"Please sign in": "Bitte anmelden",
|
"Invalid CAPTCHA": "Ungültiges CAPTCHA",
|
||||||
"Invidious Private Feed for `x`": "Invidious Persönlicher Feed für `x`",
|
"CAPTCHA is a required field": "CAPTCHA ist eine erforderliche Eingabe",
|
||||||
"channel:`x`": "Kanal:`x`",
|
"User ID is a required field": "Benutzer ID ist eine erforderliche Eingabe",
|
||||||
"Deleted or invalid channel": "Gelöschter oder ungültiger Kanal",
|
"Password is a required field": "Passwort ist eine erforderliche Eingabe",
|
||||||
"This channel does not exist.": "Dieser Kanal existiert nicht.",
|
"Invalid username or password": "Ungültiger Benutzername oder Passwort",
|
||||||
"Could not get channel info.": "Kanalinformationen konnten nicht geladen werden.",
|
"Please sign in using 'Sign in with Google'": "Bitte melden sie sich mit 'Mit Google anmelden' an",
|
||||||
"Could not fetch comments": "Kommentare konnten nicht geladen werden",
|
"Password cannot be empty": "Passwort darf nicht leer sein",
|
||||||
"View `x` replies": "Zeige `x` Antworten",
|
"Password cannot be longer than 55 characters": "Passwort darf nicht länger als 55 Zeichen sein",
|
||||||
"`x` ago": "vor `x`",
|
"Please sign in": "Bitte anmelden",
|
||||||
"Load more": "Mehr laden",
|
"Invidious Private Feed for `x`": "Invidious Persönlicher Feed für `x`",
|
||||||
"`x` points": "`x` Punkte",
|
"channel:`x`": "Kanal:`x`",
|
||||||
"Could not create mix.": "Mix konnte nicht erstellt werden.",
|
"Deleted or invalid channel": "Gelöschter oder ungültiger Kanal",
|
||||||
"Playlist is empty": "Playlist ist leer",
|
"This channel does not exist.": "Dieser Kanal existiert nicht.",
|
||||||
"Invalid playlist.": "Ungültige Playlist.",
|
"Could not get channel info.": "Kanalinformationen konnten nicht geladen werden.",
|
||||||
"Playlist does not exist.": "Playlist existiert nicht.",
|
"Could not fetch comments": "Kommentare konnten nicht geladen werden",
|
||||||
"Could not pull trending pages.": "Trending Seiten konnten nicht geladen werden.",
|
"View `x` replies": "Zeige `x` Antworten",
|
||||||
"Hidden field \"challenge\" is a required field": "Verstecktes Feld \"challenge\" ist eine erforderliche Eingabe",
|
"`x` ago": "vor `x`",
|
||||||
"Hidden field \"token\" is a required field": "Verstecktes Feld \"token\" ist eine erforderliche Eingabe",
|
"Load more": "Mehr laden",
|
||||||
"Invalid challenge": "Ungültiger Test",
|
"`x` points": "`x` Punkte",
|
||||||
"Invalid token": "Ungöltige Marke",
|
"Could not create mix.": "Mix konnte nicht erstellt werden.",
|
||||||
"Invalid user": "Ungültiger Benutzer",
|
"Playlist is empty": "Playlist ist leer",
|
||||||
"Token is expired, please try again": "Marke ist abgelaufen, bitte erneut versuchen",
|
"Invalid playlist.": "Ungültige Playlist.",
|
||||||
"English": "Englisch",
|
"Playlist does not exist.": "Playlist existiert nicht.",
|
||||||
"English (auto-generated)": "Englisch (automatisch erzeugt)",
|
"Could not pull trending pages.": "Trending Seiten konnten nicht geladen werden.",
|
||||||
"Afrikaans": "Afrikaans",
|
"Hidden field \"challenge\" is a required field": "Verstecktes Feld \"challenge\" ist eine erforderliche Eingabe",
|
||||||
"Albanian": "Albanisch",
|
"Hidden field \"token\" is a required field": "Verstecktes Feld \"token\" ist eine erforderliche Eingabe",
|
||||||
"Amharic": "Amharisch",
|
"Invalid challenge": "Ungültiger Test",
|
||||||
"Arabic": "Arabisch",
|
"Invalid token": "Ungöltige Marke",
|
||||||
"Armenian": "Armenisch",
|
"Invalid user": "Ungültiger Benutzer",
|
||||||
"Azerbaijani": "Aserbaidschanisch",
|
"Token is expired, please try again": "Marke ist abgelaufen, bitte erneut versuchen",
|
||||||
"Bangla": "Bengalisch",
|
"English": "Englisch",
|
||||||
"Basque": "Baskisch",
|
"English (auto-generated)": "Englisch (automatisch erzeugt)",
|
||||||
"Belarusian": "Weißrussisch",
|
"Afrikaans": "Afrikaans",
|
||||||
"Bosnian": "Bosnisch",
|
"Albanian": "Albanisch",
|
||||||
"Bulgarian": "Bulgarisch",
|
"Amharic": "Amharisch",
|
||||||
"Burmese": "Burmesisch",
|
"Arabic": "Arabisch",
|
||||||
"Catalan": "Katalanisch",
|
"Armenian": "Armenisch",
|
||||||
"Cebuano": "Cebuano",
|
"Azerbaijani": "Aserbaidschanisch",
|
||||||
"Chinese (Simplified)": "Chinesisch (vereinfacht)",
|
"Bangla": "Bengalisch",
|
||||||
"Chinese (Traditional)": "Chinesisch (traditionell)",
|
"Basque": "Baskisch",
|
||||||
"Corsican": "Korsisch",
|
"Belarusian": "Weißrussisch",
|
||||||
"Croatian": "Kroatisch",
|
"Bosnian": "Bosnisch",
|
||||||
"Czech": "Tschechisch",
|
"Bulgarian": "Bulgarisch",
|
||||||
"Danish": "Dänisch",
|
"Burmese": "Burmesisch",
|
||||||
"Dutch": "Niederländisch",
|
"Catalan": "Katalanisch",
|
||||||
"Esperanto": "Esperanto",
|
"Cebuano": "Cebuano",
|
||||||
"Estonian": "Estnisch",
|
"Chinese (Simplified)": "Chinesisch (vereinfacht)",
|
||||||
"Filipino": "Philippinisch",
|
"Chinese (Traditional)": "Chinesisch (traditionell)",
|
||||||
"Finnish": "Finnisch",
|
"Corsican": "Korsisch",
|
||||||
"French": "Französisch",
|
"Croatian": "Kroatisch",
|
||||||
"Galician": "Galizisch",
|
"Czech": "Tschechisch",
|
||||||
"Georgian": "Georgisch",
|
"Danish": "Dänisch",
|
||||||
"German": "Deutsch",
|
"Dutch": "Niederländisch",
|
||||||
"Greek": "Griechisch",
|
"Esperanto": "Esperanto",
|
||||||
"Gujarati": "Gujarati",
|
"Estonian": "Estnisch",
|
||||||
"Haitian Creole": "Haitianisches Kreolisch",
|
"Filipino": "Philippinisch",
|
||||||
"Hausa": "Hausa",
|
"Finnish": "Finnisch",
|
||||||
"Hawaiian": "Hawaiianisch",
|
"French": "Französisch",
|
||||||
"Hebrew": "Hebräisch",
|
"Galician": "Galizisch",
|
||||||
"Hindi": "Hindi",
|
"Georgian": "Georgisch",
|
||||||
"Hmong": "Hmong",
|
"German": "Deutsch",
|
||||||
"Hungarian": "Ungarisch",
|
"Greek": "Griechisch",
|
||||||
"Icelandic": "Isländisch",
|
"Gujarati": "Gujarati",
|
||||||
"Igbo": "Igbo",
|
"Haitian Creole": "Haitianisches Kreolisch",
|
||||||
"Indonesian": "Indonesisch",
|
"Hausa": "Hausa",
|
||||||
"Irish": "Irisch",
|
"Hawaiian": "Hawaiianisch",
|
||||||
"Italian": "Italienisch",
|
"Hebrew": "Hebräisch",
|
||||||
"Japanese": "Japanisch",
|
"Hindi": "Hindi",
|
||||||
"Javanese": "Javanisch",
|
"Hmong": "Hmong",
|
||||||
"Kannada": "Kannada",
|
"Hungarian": "Ungarisch",
|
||||||
"Kazakh": "Kasachisch",
|
"Icelandic": "Isländisch",
|
||||||
"Khmer": "Khmer",
|
"Igbo": "Igbo",
|
||||||
"Korean": "Koreanisch",
|
"Indonesian": "Indonesisch",
|
||||||
"Kurdish": "Kurdisch",
|
"Irish": "Irisch",
|
||||||
"Kyrgyz": "Kirgisisch",
|
"Italian": "Italienisch",
|
||||||
"Lao": "Laotisch",
|
"Japanese": "Japanisch",
|
||||||
"Latin": "Lateinisch",
|
"Javanese": "Javanisch",
|
||||||
"Latvian": "Lettisch",
|
"Kannada": "Kannada",
|
||||||
"Lithuanian": "Litauisch",
|
"Kazakh": "Kasachisch",
|
||||||
"Luxembourgish": "Luxemburgisch",
|
"Khmer": "Khmer",
|
||||||
"Macedonian": "Mazedonisch",
|
"Korean": "Koreanisch",
|
||||||
"Malagasy": "Madagassisch",
|
"Kurdish": "Kurdisch",
|
||||||
"Malay": "Malaiisch",
|
"Kyrgyz": "Kirgisisch",
|
||||||
"Malayalam": "Malayalam",
|
"Lao": "Laotisch",
|
||||||
"Maltese": "Maltesisch",
|
"Latin": "Lateinisch",
|
||||||
"Maori": "Maori",
|
"Latvian": "Lettisch",
|
||||||
"Marathi": "Marathi",
|
"Lithuanian": "Litauisch",
|
||||||
"Mongolian": "Mongolisch",
|
"Luxembourgish": "Luxemburgisch",
|
||||||
"Nepali": "Nepalesisch",
|
"Macedonian": "Mazedonisch",
|
||||||
"Norwegian": "Norwegisch",
|
"Malagasy": "Madagassisch",
|
||||||
"Nyanja": "Nyanja",
|
"Malay": "Malaiisch",
|
||||||
"Pashto": "Paschtunisch",
|
"Malayalam": "Malayalam",
|
||||||
"Persian": "Persisch",
|
"Maltese": "Maltesisch",
|
||||||
"Polish": "Polnisch",
|
"Maori": "Maori",
|
||||||
"Portuguese": "Portugiesisch",
|
"Marathi": "Marathi",
|
||||||
"Punjabi": "Pandschabi",
|
"Mongolian": "Mongolisch",
|
||||||
"Romanian": "Rumänisch",
|
"Nepali": "Nepalesisch",
|
||||||
"Russian": "Russisch",
|
"Norwegian": "Norwegisch",
|
||||||
"Samoan": "Samoanisch",
|
"Nyanja": "Nyanja",
|
||||||
"Scottish Gaelic": "Schottisches Gälisch",
|
"Pashto": "Paschtunisch",
|
||||||
"Serbian": "Serbisch",
|
"Persian": "Persisch",
|
||||||
"Shona": "Schona",
|
"Polish": "Polnisch",
|
||||||
"Sindhi": "Sindhi",
|
"Portuguese": "Portugiesisch",
|
||||||
"Sinhala": "Singhalesisch",
|
"Punjabi": "Pandschabi",
|
||||||
"Slovak": "Slowakisch",
|
"Romanian": "Rumänisch",
|
||||||
"Slovenian": "Slowenisch",
|
"Russian": "Russisch",
|
||||||
"Somali": "Somali",
|
"Samoan": "Samoanisch",
|
||||||
"Southern Sotho": "Südliches Sotho",
|
"Scottish Gaelic": "Schottisches Gälisch",
|
||||||
"Spanish": "Spanisch",
|
"Serbian": "Serbisch",
|
||||||
"Spanish (Latin America)": "Spanisch (Lateinamerika)",
|
"Shona": "Schona",
|
||||||
"Sundanese": "Sundanesisch",
|
"Sindhi": "Sindhi",
|
||||||
"Swahili": "Suaheli",
|
"Sinhala": "Singhalesisch",
|
||||||
"Swedish": "Schwedisch",
|
"Slovak": "Slowakisch",
|
||||||
"Tajik": "Tadschikisch",
|
"Slovenian": "Slowenisch",
|
||||||
"Tamil": "Tamilisch",
|
"Somali": "Somali",
|
||||||
"Telugu": "Telugu",
|
"Southern Sotho": "Südliches Sotho",
|
||||||
"Thai": "Thailändisch",
|
"Spanish": "Spanisch",
|
||||||
"Turkish": "Türkisch",
|
"Spanish (Latin America)": "Spanisch (Lateinamerika)",
|
||||||
"Ukrainian": "Ukrainisch",
|
"Sundanese": "Sundanesisch",
|
||||||
"Urdu": "Urdu",
|
"Swahili": "Suaheli",
|
||||||
"Uzbek": "Usbekisch",
|
"Swedish": "Schwedisch",
|
||||||
"Vietnamese": "Vietnamesisch",
|
"Tajik": "Tadschikisch",
|
||||||
"Welsh": "Walisisch",
|
"Tamil": "Tamilisch",
|
||||||
"Western Frisian": "Westfriesisch",
|
"Telugu": "Telugu",
|
||||||
"Xhosa": "Xhosa",
|
"Thai": "Thailändisch",
|
||||||
"Yiddish": "Jiddisch",
|
"Turkish": "Türkisch",
|
||||||
"Yoruba": "Joruba",
|
"Ukrainian": "Ukrainisch",
|
||||||
"Zulu": "Zulu",
|
"Urdu": "Urdu",
|
||||||
"`x` years": "`x` Jahre",
|
"Uzbek": "Usbekisch",
|
||||||
"`x` months": "`x` Monate",
|
"Vietnamese": "Vietnamesisch",
|
||||||
"`x` weeks": "`x` Wochen",
|
"Welsh": "Walisisch",
|
||||||
"`x` days": "`x` Tage",
|
"Western Frisian": "Westfriesisch",
|
||||||
"`x` hours": "`x` Stunden",
|
"Xhosa": "Xhosa",
|
||||||
"`x` minutes": "`x` Minuten",
|
"Yiddish": "Jiddisch",
|
||||||
"`x` seconds": "`x` Sekunden",
|
"Yoruba": "Joruba",
|
||||||
"Fallback comments: ": "",
|
"Zulu": "Zulu",
|
||||||
"Popular": "Populär",
|
"`x` years": "`x` Jahre",
|
||||||
"Top": "",
|
"`x` months": "`x` Monate",
|
||||||
"About": "Über",
|
"`x` weeks": "`x` Wochen",
|
||||||
"Rating: ": "Bewertung: ",
|
"`x` days": "`x` Tage",
|
||||||
"Language: ": "Sprache: "
|
"`x` hours": "`x` Stunden",
|
||||||
|
"`x` minutes": "`x` Minuten",
|
||||||
|
"`x` seconds": "`x` Sekunden",
|
||||||
|
"Fallback comments: ": "Alternative Kommentare: ",
|
||||||
|
"Popular": "Populär",
|
||||||
|
"Top": "Top",
|
||||||
|
"About": "Über",
|
||||||
|
"Rating: ": "Bewertung: ",
|
||||||
|
"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 ❤": "",
|
||||||
|
"Audio mode": "",
|
||||||
|
"Video mode": "",
|
||||||
|
"Videos": "",
|
||||||
|
"Playlists": "",
|
||||||
|
"Current version: ": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,8 +10,9 @@
|
|||||||
"newest": "newest",
|
"newest": "newest",
|
||||||
"oldest": "oldest",
|
"oldest": "oldest",
|
||||||
"popular": "popular",
|
"popular": "popular",
|
||||||
"Preview page": "Preview page",
|
"last": "last",
|
||||||
"Next page": "Next page",
|
"Next page": "Next page",
|
||||||
|
"Previous page": "Previous page",
|
||||||
"Clear watch history?": "Clear watch history?",
|
"Clear watch history?": "Clear watch history?",
|
||||||
"Yes": "Yes",
|
"Yes": "Yes",
|
||||||
"No": "No",
|
"No": "No",
|
||||||
@@ -28,7 +29,6 @@
|
|||||||
"Export data as JSON": "Export data as JSON",
|
"Export data as JSON": "Export data as JSON",
|
||||||
"Delete account?": "Delete account?",
|
"Delete account?": "Delete account?",
|
||||||
"History": "History",
|
"History": "History",
|
||||||
"Previous page": "Previous page",
|
|
||||||
"An alternative front-end to YouTube": "An alternative front-end to YouTube",
|
"An alternative front-end to YouTube": "An alternative front-end to YouTube",
|
||||||
"JavaScript license information": "JavaScript license information",
|
"JavaScript license information": "JavaScript license information",
|
||||||
"source": "source",
|
"source": "source",
|
||||||
@@ -50,6 +50,7 @@
|
|||||||
"Autoplay: ": "Autoplay: ",
|
"Autoplay: ": "Autoplay: ",
|
||||||
"Autoplay next video: ": "Autoplay next video: ",
|
"Autoplay next video: ": "Autoplay next video: ",
|
||||||
"Listen by default: ": "Listen by default: ",
|
"Listen by default: ": "Listen by default: ",
|
||||||
|
"Proxy videos? ": "Proxy videos? ",
|
||||||
"Default speed: ": "Default speed: ",
|
"Default speed: ": "Default speed: ",
|
||||||
"Preferred video quality: ": "Preferred video quality: ",
|
"Preferred video quality: ": "Preferred video quality: ",
|
||||||
"Player volume: ": "Player volume: ",
|
"Player volume: ": "Player volume: ",
|
||||||
@@ -80,6 +81,14 @@
|
|||||||
"Manage subscriptions": "Manage subscriptions",
|
"Manage subscriptions": "Manage subscriptions",
|
||||||
"Watch history": "Watch history",
|
"Watch history": "Watch history",
|
||||||
"Delete account": "Delete account",
|
"Delete account": "Delete account",
|
||||||
|
"Administrator preferences": "Administrator preferences",
|
||||||
|
"Default homepage: ": "Default homepage: ",
|
||||||
|
"Feed menu: ": "Feed menu: ",
|
||||||
|
"Top enabled? ": "Top enabled? ",
|
||||||
|
"CAPTCHA enabled? ": "CAPTCHA enabled? ",
|
||||||
|
"Login enabled? ": "Login enabled? ",
|
||||||
|
"Registration enabled? ": "Registration enabled? ",
|
||||||
|
"Report statistics? ": "Report statistics? ",
|
||||||
"Save preferences": "Save preferences",
|
"Save preferences": "Save preferences",
|
||||||
"Subscription manager": "Subscription manager",
|
"Subscription manager": "Subscription manager",
|
||||||
"`x` subscriptions": "`x` subscriptions",
|
"`x` subscriptions": "`x` subscriptions",
|
||||||
@@ -92,7 +101,9 @@
|
|||||||
"Released under the AGPLv3 by Omar Roth.": "Released under the AGPLv3 by Omar Roth.",
|
"Released under the AGPLv3 by Omar Roth.": "Released under the AGPLv3 by Omar Roth.",
|
||||||
"Source available here.": "Source available here.",
|
"Source available here.": "Source available here.",
|
||||||
"View JavaScript license information.": "View JavaScript license information.",
|
"View JavaScript license information.": "View JavaScript license information.",
|
||||||
|
"View privacy policy.": "View privacy policy.",
|
||||||
"Trending": "Trending",
|
"Trending": "Trending",
|
||||||
|
"Unlisted": "",
|
||||||
"Watch video on Youtube": "Watch video on Youtube",
|
"Watch video on Youtube": "Watch video on Youtube",
|
||||||
"Genre: ": "Genre: ",
|
"Genre: ": "Genre: ",
|
||||||
"License: ": "License: ",
|
"License: ": "License: ",
|
||||||
@@ -102,6 +113,7 @@
|
|||||||
"Whitelisted regions: ": "Whitelisted regions: ",
|
"Whitelisted regions: ": "Whitelisted regions: ",
|
||||||
"Blacklisted regions: ": "Blacklisted regions: ",
|
"Blacklisted regions: ": "Blacklisted regions: ",
|
||||||
"Shared `x`": "Shared `x`",
|
"Shared `x`": "Shared `x`",
|
||||||
|
"Premieres in `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! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.",
|
"Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.": "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 YouTube comments",
|
"View YouTube comments": "View YouTube comments",
|
||||||
"View more comments on Reddit": "View more comments on Reddit",
|
"View more comments on Reddit": "View more comments on Reddit",
|
||||||
@@ -263,5 +275,21 @@
|
|||||||
"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 ❤",
|
||||||
|
"Audio mode": "Audio mode",
|
||||||
|
"Video mode": "Video mode",
|
||||||
|
"Videos": "Videos",
|
||||||
|
"Playlists": "Playlists",
|
||||||
|
"Current version: ": "Current version: "
|
||||||
}
|
}
|
||||||
|
|||||||
295
locales/es.json
Normal file
295
locales/es.json
Normal file
@@ -0,0 +1,295 @@
|
|||||||
|
{
|
||||||
|
"`x` subscribers": "`x` suscriptores",
|
||||||
|
"`x` videos": "`x` vídeos",
|
||||||
|
"LIVE": "DIRECTO",
|
||||||
|
"Shared `x` ago": "Compartido hace `x`",
|
||||||
|
"Unsubscribe": "Desuscribirse",
|
||||||
|
"Subscribe": "Suscribirse",
|
||||||
|
"Login to subscribe to `x`": "Inicie sesión para suscribirse a `x`",
|
||||||
|
"View channel on YouTube": "Ver el canal en YouTube",
|
||||||
|
"newest": "más nuevos",
|
||||||
|
"oldest": "más viejos",
|
||||||
|
"popular": "populares",
|
||||||
|
"last": "último",
|
||||||
|
"Next page": "Página siguiente",
|
||||||
|
"Previous page": "Página anterior",
|
||||||
|
"Clear watch history?": "¿Quiere borrar el historial de reproducción?",
|
||||||
|
"Yes": "Sí",
|
||||||
|
"No": "No",
|
||||||
|
"Import and Export Data": "Importación y exportación de datos",
|
||||||
|
"Import": "Importar",
|
||||||
|
"Import Invidious data": "Importar datos de Invidious",
|
||||||
|
"Import YouTube subscriptions": "Importar suscripciones de YouTube",
|
||||||
|
"Import FreeTube subscriptions (.db)": "Importar suscripciones de FreeTube (.db)",
|
||||||
|
"Import NewPipe subscriptions (.json)": "Importar suscripciones de NewPipe (.json)",
|
||||||
|
"Import NewPipe data (.zip)": "Importar datos de NewPipe (.zip)",
|
||||||
|
"Export": "Exportar",
|
||||||
|
"Export subscriptions as OPML": "Exportar suscripciones como OPML",
|
||||||
|
"Export subscriptions as OPML (for NewPipe & FreeTube)": "Exportar suscripciones como OPML (para NewPipe y FreeTube)",
|
||||||
|
"Export data as JSON": "Exportar datos como JSON",
|
||||||
|
"Delete account?": "¿Quiere borrar la cuenta?",
|
||||||
|
"History": "Historial",
|
||||||
|
"An alternative front-end to YouTube": "Una interfaz alternativa para YouTube",
|
||||||
|
"JavaScript license information": "Información de licencia de JavaScript",
|
||||||
|
"source": "código fuente",
|
||||||
|
"Login": "Iniciar sesión",
|
||||||
|
"Login/Register": "Iniciar sesión/Registrarse",
|
||||||
|
"Login to Google": "Iniciar sesión en Google",
|
||||||
|
"User ID:": "Nombre:",
|
||||||
|
"Password:": "Contraseña:",
|
||||||
|
"Time (h:mm:ss):": "Hora (h:mm:ss):",
|
||||||
|
"Text CAPTCHA": "CAPTCHA en texto",
|
||||||
|
"Image CAPTCHA": "CAPTCHA en imagen",
|
||||||
|
"Sign In": "Iniciar sesión",
|
||||||
|
"Register": "Registrarse",
|
||||||
|
"Email:": "Correo:",
|
||||||
|
"Google verification code:": "Código de verificación de Google:",
|
||||||
|
"Preferences": "Preferencias",
|
||||||
|
"Player preferences": "Preferencias del reproductor",
|
||||||
|
"Always loop: ": "Repetir siempre: ",
|
||||||
|
"Autoplay: ": "Reproducción automática: ",
|
||||||
|
"Autoplay next video: ": "Reproducir automáticamente el vídeo siguiente: ",
|
||||||
|
"Listen by default: ": "Activar el sonido por defecto: ",
|
||||||
|
"Proxy videos? ": "¿Usar un proxy para los vídeos? ",
|
||||||
|
"Default speed: ": "Velocidad por defecto: ",
|
||||||
|
"Preferred video quality: ": "Calidad de vídeo preferida: ",
|
||||||
|
"Player volume: ": "Volumen del reproductor: ",
|
||||||
|
"Default comments: ": "Comentarios por defecto: ",
|
||||||
|
"Default captions: ": "Subtítulos por defecto: ",
|
||||||
|
"Fallback captions: ": "Subtítulos alternativos: ",
|
||||||
|
"Show related videos? ": "¿Mostrar vídeos relacionados? ",
|
||||||
|
"Visual preferences": "Preferencias visuales",
|
||||||
|
"Dark mode: ": "Modo oscuro: ",
|
||||||
|
"Thin mode: ": "Modo compacto: ",
|
||||||
|
"Subscription preferences": "Preferencias de la suscripción",
|
||||||
|
"Redirect homepage to feed: ": "Redirigir la página de inicio a la fuente: ",
|
||||||
|
"Number of videos shown in feed: ": "Número de vídeos mostrados en la fuente: ",
|
||||||
|
"Sort videos by: ": "Ordenar los vídeos por: ",
|
||||||
|
"published": "fecha de publicación",
|
||||||
|
"published - reverse": "fecha de publicación: orden inverso",
|
||||||
|
"alphabetically": "alfabéticamente",
|
||||||
|
"alphabetically - reverse": "alfabéticamente: orden inverso",
|
||||||
|
"channel name": "nombre del canal",
|
||||||
|
"channel name - reverse": "nombre del canal: orden inverso",
|
||||||
|
"Only show latest video from channel: ": "Mostrar solo el último vídeo del canal: ",
|
||||||
|
"Only show latest unwatched video from channel: ": "Mostrar solo el último vídeo sin ver del canal: ",
|
||||||
|
"Only show unwatched: ": "Mostrar solo los no vistos: ",
|
||||||
|
"Only show notifications (if there are any): ": "Mostrar solo notificaciones (si hay alguna): ",
|
||||||
|
"Data preferences": "Preferencias de los datos",
|
||||||
|
"Clear watch history": "Borrar el historial de reproducción",
|
||||||
|
"Import/Export data": "Importar/Exportar datos",
|
||||||
|
"Manage subscriptions": "Gestionar las suscripciones",
|
||||||
|
"Watch history": "Historial de reproducción",
|
||||||
|
"Delete account": "Borrar cuenta",
|
||||||
|
"Administrator preferences": "Preferencias de administrador",
|
||||||
|
"Default homepage: ": "Página de inicio por defecto: ",
|
||||||
|
"Feed menu: ": "Menú de fuentes: ",
|
||||||
|
"Top enabled? ": "¿Habilitar los destacados? ",
|
||||||
|
"CAPTCHA enabled? ": "¿Habilitar los CAPTCHA? ",
|
||||||
|
"Login enabled? ": "¿Habilitar el inicio de sesión? ",
|
||||||
|
"Registration enabled? ": "¿Habilitar el registro? ",
|
||||||
|
"Report statistics? ": "¿Enviar estadísticas? ",
|
||||||
|
"Save preferences": "Guardar las preferencias",
|
||||||
|
"Subscription manager": "Gestor de suscripciones",
|
||||||
|
"`x` subscriptions": "`x` suscripciones",
|
||||||
|
"Import/Export": "Importar/Exportar",
|
||||||
|
"unsubscribe": "Desuscribirse",
|
||||||
|
"Subscriptions": "Suscripciones",
|
||||||
|
"`x` unseen notifications": "`x` notificaciones sin ver",
|
||||||
|
"search": "buscar",
|
||||||
|
"Sign out": "Cerrar la sesión",
|
||||||
|
"Released under the AGPLv3 by Omar Roth.": "Publicado bajo licencia AGPLv3 por Omar Roth.",
|
||||||
|
"Source available here.": "Código fuente disponible aquí.",
|
||||||
|
"View JavaScript license information.": "Ver información de licencia de JavaScript.",
|
||||||
|
"View privacy policy.": "Ver la política de privacidad.",
|
||||||
|
"Trending": "Tendencias",
|
||||||
|
"Unlisted": "",
|
||||||
|
"Watch video on Youtube": "Ver el vídeo en Youtube",
|
||||||
|
"Genre: ": "Género: ",
|
||||||
|
"License: ": "Licencia: ",
|
||||||
|
"Family friendly? ": "¿Filtrar contenidos? ",
|
||||||
|
"Wilson score: ": "Puntuación Wilson: ",
|
||||||
|
"Engagement: ": "Compromiso: ",
|
||||||
|
"Whitelisted regions: ": "Regiones permitidas: ",
|
||||||
|
"Blacklisted regions: ": "Regiones bloqueadas: ",
|
||||||
|
"Shared `x`": "Compartido `x`",
|
||||||
|
"Premieres in `x`": "",
|
||||||
|
"Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.": "¡Hola! Parece que tiene JavaScript desactivado. Haga clic aquí para ver los comentarios, pero tenga en cuenta que pueden tardar un poco más en cargarse.",
|
||||||
|
"View YouTube comments": "Ver los comentarios de YouTube",
|
||||||
|
"View more comments on Reddit": "Ver más comentarios en Reddit",
|
||||||
|
"View `x` comments": "Ver `x` comentarios",
|
||||||
|
"View Reddit comments": "Ver los comentarios de Reddit",
|
||||||
|
"Hide replies": "Ocultar las respuestas",
|
||||||
|
"Show replies": "Mostrar las respuestas",
|
||||||
|
"Incorrect password": "Contraseña incorrecta",
|
||||||
|
"Quota exceeded, try again in a few hours": "Cuota excedida, pruebe otra vez en unas horas",
|
||||||
|
"Unable to login, make sure two-factor authentication (Authenticator or SMS) is enabled.": "No se puede iniciar sesión, asegúrese de que la autentificación de dos factores (autentificador o SMS) esté habilitada.",
|
||||||
|
"Invalid TFA code": "Código TFA no válido",
|
||||||
|
"Login failed. This may be because two-factor authentication is not enabled on your account.": "Error de inicio de sesion. Puede deberse a que la autentificación de dos factores no está habilitada en su cuenta.",
|
||||||
|
"Invalid answer": "Respuesta no válida",
|
||||||
|
"Invalid CAPTCHA": "CAPTCHA no válido",
|
||||||
|
"CAPTCHA is a required field": "El CAPTCHA es un campo obligatorio",
|
||||||
|
"User ID is a required field": "El nombre es un campo obligatorio",
|
||||||
|
"Password is a required field": "La contraseña es un campo obligatorio",
|
||||||
|
"Invalid username or password": "Nombre o contraseña incorrecto",
|
||||||
|
"Please sign in using 'Sign in with Google'": "Inicie sesión con «Iniciar sesión con Google»",
|
||||||
|
"Password cannot be empty": "La contraseña no puede estar en blanco",
|
||||||
|
"Password cannot be longer than 55 characters": "La contraseña no puede tener más de 55 caracteres",
|
||||||
|
"Please sign in": "Inicie sesión, por favor",
|
||||||
|
"Invidious Private Feed for `x`": "Fuente privada de Invidious para `x`",
|
||||||
|
"channel:`x`": "canal: `x`",
|
||||||
|
"Deleted or invalid channel": "El canal no es válido o ha sido borrado",
|
||||||
|
"This channel does not exist.": "El canal no existe.",
|
||||||
|
"Could not get channel info.": "No se ha podido obtener información del canal.",
|
||||||
|
"Could not fetch comments": "No se han podido recuperar los comentarios.",
|
||||||
|
"View `x` replies": "Ver `x` respuestas",
|
||||||
|
"`x` ago": "hace `x`",
|
||||||
|
"Load more": "Cargar más",
|
||||||
|
"`x` points": "`x` puntos",
|
||||||
|
"Could not create mix.": "No se ha podido crear la mezcla.",
|
||||||
|
"Playlist is empty": "La lista de reproducción está vacía",
|
||||||
|
"Invalid playlist.": "Lista de reproducción no válida.",
|
||||||
|
"Playlist does not exist.": "La lista de reproducción no existe.",
|
||||||
|
"Could not pull trending pages.": "No se han podido obtener las páginas de tendencias.",
|
||||||
|
"Hidden field \"challenge\" is a required field": "El campo oculto «desafío» es un campo obligatorio",
|
||||||
|
"Hidden field \"token\" is a required field": "El campo oculto «símbolo» es un campo obligatorio",
|
||||||
|
"Invalid challenge": "Desafío no válido",
|
||||||
|
"Invalid token": "Símbolo no válido",
|
||||||
|
"Invalid user": "Usuario no válido",
|
||||||
|
"Token is expired, please try again": "El símbolo ha caducado, inténtelo de nuevo",
|
||||||
|
"English": "Inglés",
|
||||||
|
"English (auto-generated)": "Inglés (autogenerado)",
|
||||||
|
"Afrikaans": "Afrikáans",
|
||||||
|
"Albanian": "Albanés",
|
||||||
|
"Amharic": "Amárico",
|
||||||
|
"Arabic": "Árabe",
|
||||||
|
"Armenian": "Armenio",
|
||||||
|
"Azerbaijani": "Azerbaiyano",
|
||||||
|
"Bangla": "Bengalí",
|
||||||
|
"Basque": "Euskera",
|
||||||
|
"Belarusian": "Bielorruso",
|
||||||
|
"Bosnian": "Bosnio",
|
||||||
|
"Bulgarian": "Búlgaro",
|
||||||
|
"Burmese": "Birmano",
|
||||||
|
"Catalan": "Catalán",
|
||||||
|
"Cebuano": "Cebuano",
|
||||||
|
"Chinese (Simplified)": "Chino (simplificado)",
|
||||||
|
"Chinese (Traditional)": "Chino (tradicional)",
|
||||||
|
"Corsican": "Corso",
|
||||||
|
"Croatian": "Croata",
|
||||||
|
"Czech": "Checo",
|
||||||
|
"Danish": "Danés",
|
||||||
|
"Dutch": "Holandés",
|
||||||
|
"Esperanto": "Esperanto",
|
||||||
|
"Estonian": "Estonio",
|
||||||
|
"Filipino": "Filipino",
|
||||||
|
"Finnish": "Finés",
|
||||||
|
"French": "Francés",
|
||||||
|
"Galician": "Gallego",
|
||||||
|
"Georgian": "Georgiano",
|
||||||
|
"German": "Alemán",
|
||||||
|
"Greek": "Griego",
|
||||||
|
"Gujarati": "Guyaratí",
|
||||||
|
"Haitian Creole": "Criollo haitiano",
|
||||||
|
"Hausa": "Hausa",
|
||||||
|
"Hawaiian": "Hawaiano",
|
||||||
|
"Hebrew": "Hebreo",
|
||||||
|
"Hindi": "Hindi",
|
||||||
|
"Hmong": "Hmong",
|
||||||
|
"Hungarian": "Húngaro",
|
||||||
|
"Icelandic": "Islandés",
|
||||||
|
"Igbo": "Igbo",
|
||||||
|
"Indonesian": "Indonesio",
|
||||||
|
"Irish": "Irlandés",
|
||||||
|
"Italian": "Italiano",
|
||||||
|
"Japanese": "Japonés",
|
||||||
|
"Javanese": "Javanés",
|
||||||
|
"Kannada": "Canarés",
|
||||||
|
"Kazakh": "Kazajo",
|
||||||
|
"Khmer": "Camboyano",
|
||||||
|
"Korean": "Coreano",
|
||||||
|
"Kurdish": "Kurdo",
|
||||||
|
"Kyrgyz": "Kirguís",
|
||||||
|
"Lao": "Laosiano",
|
||||||
|
"Latin": "Latín",
|
||||||
|
"Latvian": "Letón",
|
||||||
|
"Lithuanian": "Lituano",
|
||||||
|
"Luxembourgish": "Luxemburgués",
|
||||||
|
"Macedonian": "Macedonio",
|
||||||
|
"Malagasy": "Malgache",
|
||||||
|
"Malay": "Malayo",
|
||||||
|
"Malayalam": "Malabar",
|
||||||
|
"Maltese": "Maltés",
|
||||||
|
"Maori": "Maorí",
|
||||||
|
"Marathi": "Maratí",
|
||||||
|
"Mongolian": "Mongol",
|
||||||
|
"Nepali": "Nepalí",
|
||||||
|
"Norwegian": "Noruego",
|
||||||
|
"Nyanja": "Chichewa",
|
||||||
|
"Pashto": "Pastún",
|
||||||
|
"Persian": "Persa",
|
||||||
|
"Polish": "Polaco",
|
||||||
|
"Portuguese": "Portugués",
|
||||||
|
"Punjabi": "Panyabí",
|
||||||
|
"Romanian": "Rumano",
|
||||||
|
"Russian": "Ruso",
|
||||||
|
"Samoan": "Samoano",
|
||||||
|
"Scottish Gaelic": "Gaélico escocés",
|
||||||
|
"Serbian": "Serbio",
|
||||||
|
"Shona": "Shona",
|
||||||
|
"Sindhi": "Sindi",
|
||||||
|
"Sinhala": "Cingalés",
|
||||||
|
"Slovak": "Eslovaco",
|
||||||
|
"Slovenian": "Esloveno",
|
||||||
|
"Somali": "Somalí",
|
||||||
|
"Southern Sotho": "Sesoto",
|
||||||
|
"Spanish": "Español",
|
||||||
|
"Spanish (Latin America)": "Español (Hispanoamérica)",
|
||||||
|
"Sundanese": "Sondanés",
|
||||||
|
"Swahili": "Suajili",
|
||||||
|
"Swedish": "Sueco",
|
||||||
|
"Tajik": "Tayiko",
|
||||||
|
"Tamil": "Tamil",
|
||||||
|
"Telugu": "Telugu",
|
||||||
|
"Thai": "Tailandés",
|
||||||
|
"Turkish": "Turco",
|
||||||
|
"Ukrainian": "Ucraniano",
|
||||||
|
"Urdu": "Urdu",
|
||||||
|
"Uzbek": "Uzbeko",
|
||||||
|
"Vietnamese": "Vietnamita",
|
||||||
|
"Welsh": "Galés",
|
||||||
|
"Western Frisian": "Frisón",
|
||||||
|
"Xhosa": "Xhosa",
|
||||||
|
"Yiddish": "Yidis",
|
||||||
|
"Yoruba": "Yoruba",
|
||||||
|
"Zulu": "Zulú",
|
||||||
|
"`x` years": "`x` años",
|
||||||
|
"`x` months": "`x` meses",
|
||||||
|
"`x` weeks": "`x` semanas",
|
||||||
|
"`x` days": "`x` días",
|
||||||
|
"`x` hours": "`x` horas",
|
||||||
|
"`x` minutes": "`x` minutos",
|
||||||
|
"`x` seconds": "`x` segundos",
|
||||||
|
"Fallback comments: ": "Comentarios alternativos: ",
|
||||||
|
"Popular": "Populares",
|
||||||
|
"Top": "Destacados",
|
||||||
|
"About": "Acerca de",
|
||||||
|
"Rating: ": "Valoración: ",
|
||||||
|
"Language: ": "Idioma: ",
|
||||||
|
"Default": "Por defecto",
|
||||||
|
"Music": "Música",
|
||||||
|
"Gaming": "Videojuegos",
|
||||||
|
"News": "Noticias",
|
||||||
|
"Movies": "Películas",
|
||||||
|
"Download": "Descargar",
|
||||||
|
"Download as: ": "Descargar como: ",
|
||||||
|
"%A %B %-d, %Y": "%A %B %-d, %Y",
|
||||||
|
"(edited)": "(editado)",
|
||||||
|
"Youtube permalink of the comment": "Enlace permanente de YouTube del comentario",
|
||||||
|
"`x` marked it with a ❤": "`x` lo ha marcado con un ❤",
|
||||||
|
"Audio mode": "Modo de audio",
|
||||||
|
"Video mode": "Modo de vídeo",
|
||||||
|
"Videos": "Vídeos",
|
||||||
|
"Playlists": "Listas de reproducción",
|
||||||
|
"Current version: ": "Versión actual: "
|
||||||
|
}
|
||||||
295
locales/eu.json
Normal file
295
locales/eu.json
Normal file
@@ -0,0 +1,295 @@
|
|||||||
|
{
|
||||||
|
"`x` subscribers": "`x` harpidedun",
|
||||||
|
"`x` videos": "`x` bideo",
|
||||||
|
"LIVE": "ZUZENEAN",
|
||||||
|
"Shared `x` ago": "Duela `x` partekatua",
|
||||||
|
"Unsubscribe": "Harpidetza kendu",
|
||||||
|
"Subscribe": "Harpidetu",
|
||||||
|
"Login to subscribe to `x`": "Saioa hasi `x`(e)ra harpidetzeko",
|
||||||
|
"View channel on YouTube": "Ikusi kanala YouTuben",
|
||||||
|
"newest": "berrienak",
|
||||||
|
"oldest": "zaharrenak",
|
||||||
|
"popular": "ospetsuenak",
|
||||||
|
"last": "",
|
||||||
|
"Next page": "Hurrengo orria",
|
||||||
|
"Previous page": "Aurreko 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)": "Harpidetzak OPML bezala esportatu (NewPipe eta FreeTuberako)",
|
||||||
|
"Export data as JSON": "Datuak JSON bezala esportatu",
|
||||||
|
"Delete account?": "Kontua ezabatu?",
|
||||||
|
"History": "Historia",
|
||||||
|
"An alternative front-end to YouTube": "YouTuberako interfaze alternatibo bat",
|
||||||
|
"JavaScript license information": "JavaScript lizentzia informazioa",
|
||||||
|
"source": "iturburua",
|
||||||
|
"Login": "Saioa hasi",
|
||||||
|
"Login/Register": "Saioa hasi/Izena eman",
|
||||||
|
"Login to Google": "Googlekin hasi saioa",
|
||||||
|
"User ID:": "Erabiltzaile IDa:",
|
||||||
|
"Password:": "Pasahitza:",
|
||||||
|
"Time (h:mm:ss):": "Denbora (o:mm:ss):",
|
||||||
|
"Text CAPTCHA": "Testu CAPTCHA",
|
||||||
|
"Image CAPTCHA": "Irudi CAPTCHA",
|
||||||
|
"Sign In": "",
|
||||||
|
"Register": "",
|
||||||
|
"Email:": "",
|
||||||
|
"Google verification code:": "",
|
||||||
|
"Preferences": "",
|
||||||
|
"Player preferences": "",
|
||||||
|
"Always loop: ": "",
|
||||||
|
"Autoplay: ": "",
|
||||||
|
"Autoplay next video: ": "",
|
||||||
|
"Listen by default: ": "",
|
||||||
|
"Proxy videos? ": "",
|
||||||
|
"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": "",
|
||||||
|
"Administrator preferences": "",
|
||||||
|
"Default homepage: ": "",
|
||||||
|
"Feed menu: ": "",
|
||||||
|
"Top enabled? ": "",
|
||||||
|
"CAPTCHA enabled? ": "",
|
||||||
|
"Login enabled? ": "",
|
||||||
|
"Registration enabled? ": "",
|
||||||
|
"Report statistics? ": "",
|
||||||
|
"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.": "",
|
||||||
|
"View privacy policy.": "",
|
||||||
|
"Unlisted": "",
|
||||||
|
"Trending": "",
|
||||||
|
"Watch video on Youtube": "",
|
||||||
|
"Genre: ": "",
|
||||||
|
"License: ": "",
|
||||||
|
"Family friendly? ": "",
|
||||||
|
"Wilson score: ": "",
|
||||||
|
"Engagement: ": "",
|
||||||
|
"Whitelisted regions: ": "",
|
||||||
|
"Blacklisted regions: ": "",
|
||||||
|
"Shared `x`": "",
|
||||||
|
"Premieres in `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 ❤": "",
|
||||||
|
"Audio mode": "",
|
||||||
|
"Video mode": "",
|
||||||
|
"Videos": "",
|
||||||
|
"Playlists": "",
|
||||||
|
"Current version: ": ""
|
||||||
|
}
|
||||||
295
locales/fr.json
Normal file
295
locales/fr.json
Normal file
@@ -0,0 +1,295 @@
|
|||||||
|
{
|
||||||
|
"`x` subscribers": "`x` abonnés",
|
||||||
|
"`x` videos": "`x` vidéos",
|
||||||
|
"LIVE": "EN DIRECT",
|
||||||
|
"Shared `x` ago": "Ajoutée il y a `x`",
|
||||||
|
"Unsubscribe": "Se désabonner",
|
||||||
|
"Subscribe": "S'abonner",
|
||||||
|
"Login to subscribe to `x`": "Vous devez vous connecter pour vous abonner à `x`",
|
||||||
|
"View channel on YouTube": "Voir la chaîne sur YouTube",
|
||||||
|
"newest": "Date d'ajout (la plus récente)",
|
||||||
|
"oldest": "Date d'ajout (la plus ancienne)",
|
||||||
|
"popular": "Les plus populaires",
|
||||||
|
"last": "Dernières",
|
||||||
|
"Next page": "Page suivante",
|
||||||
|
"Previous page": "Page précédente",
|
||||||
|
"Clear watch history?": "Êtes-vous sûr de vouloir supprimer l'historique des vidéos regardées ?",
|
||||||
|
"Yes": "Oui",
|
||||||
|
"No": "Non",
|
||||||
|
"Import and Export Data": "Importer et exporter des données",
|
||||||
|
"Import": "Importer",
|
||||||
|
"Import Invidious data": "Importer des données Invidious",
|
||||||
|
"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 en OPML",
|
||||||
|
"Export subscriptions as OPML (for NewPipe & FreeTube)": "Exporter les abonnements en OPML (pour NewPipe & FreeTube)",
|
||||||
|
"Export data as JSON": "Exporter les données au format JSON",
|
||||||
|
"Delete account?": "Êtes-vous sûr de vouloir supprimer votre compte ?",
|
||||||
|
"History": "Historique",
|
||||||
|
"An alternative front-end to YouTube": "Un front-end alternatif à YouTube",
|
||||||
|
"JavaScript license information": "Informations sur les licences JavaScript",
|
||||||
|
"source": "source",
|
||||||
|
"Login": "Se connecter",
|
||||||
|
"Login/Register": "Se connecter/Créer un compte",
|
||||||
|
"Login to Google": "Se connecter avec Google",
|
||||||
|
"User ID:": "Identifiant utilisateur :",
|
||||||
|
"Password:": "Mot de passe :",
|
||||||
|
"Time (h:mm:ss):": "Heure (h:mm:ss) :",
|
||||||
|
"Text CAPTCHA": "CAPTCHA Texte",
|
||||||
|
"Image CAPTCHA": "CAPTCHA Image",
|
||||||
|
"Sign In": "Se connecter",
|
||||||
|
"Register": "S'inscrire",
|
||||||
|
"Email:": "E-mail :",
|
||||||
|
"Google verification code:": "Code de vérification Google :",
|
||||||
|
"Preferences": "Préférences",
|
||||||
|
"Player preferences": "Préférences du lecteur",
|
||||||
|
"Always loop: ": "Lire en boucle : ",
|
||||||
|
"Autoplay: ": "Lire automatiquement : ",
|
||||||
|
"Autoplay next video: ": "Lire automatiquement la vidéo suivante : ",
|
||||||
|
"Listen by default: ": "Audio uniquement : ",
|
||||||
|
"Proxy videos? ": "Charger les vidéos à travers un proxy ? ",
|
||||||
|
"Default speed: ": "Vitesse par défaut : ",
|
||||||
|
"Preferred video quality: ": "Qualité vidéo souhaitée : ",
|
||||||
|
"Player volume: ": "Volume du lecteur : ",
|
||||||
|
"Default comments: ": "Source des commentaires : ",
|
||||||
|
"Default captions: ": "Sous-titres par défaut : ",
|
||||||
|
"Fallback captions: ": "Fallback captions: ",
|
||||||
|
"Show related videos? ": "Voir les vidéos liées ? ",
|
||||||
|
"Visual preferences": "Préférences du site",
|
||||||
|
"Dark mode: ": "Mode Sombre : ",
|
||||||
|
"Thin mode: ": "Mode Simplifié : ",
|
||||||
|
"Subscription preferences": "Préférences de la page d'abonnements",
|
||||||
|
"Redirect homepage to feed: ": "Rediriger la page d'accueil vers la page d'abonnements : ",
|
||||||
|
"Number of videos shown in feed: ": "Nombre de vidéos montrées dans la page d'abonnements : ",
|
||||||
|
"Sort videos by: ": "Trier les vidéos par : ",
|
||||||
|
"published": "publication",
|
||||||
|
"published - reverse": "publication - inversé",
|
||||||
|
"alphabetically": "alphabétiquement",
|
||||||
|
"alphabetically - reverse": "alphabétiquement - inversé",
|
||||||
|
"channel name": "nom de la chaîne",
|
||||||
|
"channel name - reverse": "nom de la chaîne - inversé",
|
||||||
|
"Only show latest video from channel: ": "Afficher uniquement la dernière vidéo de la chaîne : ",
|
||||||
|
"Only show latest unwatched video from channel: ": "Afficher uniquement la dernière vidéo de la chaîne non regardée : ",
|
||||||
|
"Only show unwatched: ": "Afficher uniquement les vidéos non regardées : ",
|
||||||
|
"Only show notifications (if there are any): ": "Afficher uniquement les notifications (s'il y en a) : ",
|
||||||
|
"Data preferences": "Préférences liées aux données",
|
||||||
|
"Clear watch history": "Supprimer l'historique des vidéos regardées",
|
||||||
|
"Import/Export data": "Importer/exporter les données",
|
||||||
|
"Manage subscriptions": "Gérer les abonnements",
|
||||||
|
"Watch history": "Historique de visionnage",
|
||||||
|
"Delete account": "Supprimer votre compte",
|
||||||
|
"Administrator preferences": "Préferences d'Administrateur",
|
||||||
|
"Default homepage: ": "Page d'accueil par défaut : ",
|
||||||
|
"Feed menu: ": "Menu des Flux : ",
|
||||||
|
"Top enabled? ": "Top activé ? ",
|
||||||
|
"CAPTCHA enabled? ": "CAPTCHA activé ? ",
|
||||||
|
"Login enabled? ": "Connexion activé ? ",
|
||||||
|
"Registration enabled? ": "Inscription activée ? ",
|
||||||
|
"Report statistics? ": "Télémétrie activé ? ",
|
||||||
|
"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 non vues",
|
||||||
|
"search": "Rechercher",
|
||||||
|
"Sign out": "Déconnexion",
|
||||||
|
"Released under the AGPLv3 by Omar Roth.": "Publié sous licence AGPLv3 par Omar Roth.",
|
||||||
|
"Source available here.": "Code Source.",
|
||||||
|
"View JavaScript license information.": "Voir les informations des licences JavaScript.",
|
||||||
|
"View privacy policy.": "Politique de confidentialité",
|
||||||
|
"Trending": "Tendances",
|
||||||
|
"Unlisted": "Non répertoriée",
|
||||||
|
"Watch video on Youtube": "Voir la vidéo sur Youtube",
|
||||||
|
"Genre: ": "Genre : ",
|
||||||
|
"License: ": "Licence : ",
|
||||||
|
"Family friendly? ": "Tout Public ? ",
|
||||||
|
"Wilson score: ": "Score de Wilson : ",
|
||||||
|
"Engagement: ": "Poucentage de spectateur aillant aimé Like ou Dislike la vidéo : ",
|
||||||
|
"Whitelisted regions: ": "Régions en liste blanche : ",
|
||||||
|
"Blacklisted regions: ": "Régions sur liste noire : ",
|
||||||
|
"Shared `x`": "Ajoutée le `x`",
|
||||||
|
"Premieres in `x`": "Première dans `x`",
|
||||||
|
"Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.": "Il semblerait que JavaScript soit désactivé. Cliquez ici pour voir les commentaires sans. Gardez à l'esprit que le chargement peut prendre plus de temps.",
|
||||||
|
"View YouTube comments": "Voir les commentaires YouTube",
|
||||||
|
"View more comments on Reddit": "Voir plus de commentaires sur Reddit",
|
||||||
|
"View `x` comments": "Voir `x` commentaires",
|
||||||
|
"View Reddit comments": "Voir les commentaires Reddit",
|
||||||
|
"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": "Nombre de tentative de connexion 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 d'authentification à deux facteurs 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 invalide",
|
||||||
|
"Invalid CAPTCHA": "CAPTCHA invalide",
|
||||||
|
"CAPTCHA is a required field": "Veuillez entrer un CAPTCHA",
|
||||||
|
"User ID is a required field": "Veuillez entrer un Identifiant Utilisateur",
|
||||||
|
"Password is a required field": "Veuillez entrer un Mot de passe",
|
||||||
|
"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 \"Se connecter 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 vous connecter",
|
||||||
|
"Invidious Private Feed for `x`": "Flux RSS privé pour `x`",
|
||||||
|
"channel:`x`": "chaîne:`x`",
|
||||||
|
"Deleted or invalid channel": "Chaîne supprimée ou invalide",
|
||||||
|
"This channel does not exist.": "Cette chaine n'existe pas.",
|
||||||
|
"Could not get channel info.": "Impossible de charger les informations de cette chaîne.",
|
||||||
|
"Could not fetch comments": "Impossible de charger 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 charger cette liste de lecture.",
|
||||||
|
"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 charger les pages de tendances.",
|
||||||
|
"Hidden field \"challenge\" is a required field": "Hidden field \"challenge\" is a required field",
|
||||||
|
"Hidden field \"token\" is a required field": "Hidden field \"token\" is a required field",
|
||||||
|
"Invalid challenge": "Invalid challenge",
|
||||||
|
"Invalid token": "Invalid token",
|
||||||
|
"Invalid user": "Invalid user",
|
||||||
|
"Token is expired, please try again": "Token is expired, please try again",
|
||||||
|
"English": "Anglais",
|
||||||
|
"English (auto-generated)": "Anglais (générés automatiquement)",
|
||||||
|
"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: ": "Fallback comments: ",
|
||||||
|
"Popular": "Populaire",
|
||||||
|
"Top": "Top",
|
||||||
|
"About": "A Propos",
|
||||||
|
"Rating: ": "Évaluation : ",
|
||||||
|
"Language: ": "Langue : ",
|
||||||
|
"Default": "Défaut",
|
||||||
|
"Music": "Musique",
|
||||||
|
"Gaming": "Jeux Vidéo",
|
||||||
|
"News": "Actualités",
|
||||||
|
"Movies": "Films",
|
||||||
|
"Download": "Télécharger",
|
||||||
|
"Download as: ": "Télécharger en : ",
|
||||||
|
"%A %B %-d, %Y": "%A %-d %B %Y",
|
||||||
|
"(edited)": "(modifié)",
|
||||||
|
"Youtube permalink of the comment": "Lien YouTube permanent vers le commentaire",
|
||||||
|
"`x` marked it with a ❤": "`x` l'a marqué d'un ❤",
|
||||||
|
"Audio mode": "Mode Audio",
|
||||||
|
"Video mode": "Mode Vidéo",
|
||||||
|
"Videos": "Vidéos",
|
||||||
|
"Playlists": "Liste de lecture",
|
||||||
|
"Current version: ": "Version :"
|
||||||
|
}
|
||||||
295
locales/it.json
Normal file
295
locales/it.json
Normal file
@@ -0,0 +1,295 @@
|
|||||||
|
{
|
||||||
|
"`x` subscribers": "`x` iscritti",
|
||||||
|
"`x` videos": "`x` video",
|
||||||
|
"LIVE": "IN DIRETTA",
|
||||||
|
"Shared `x` ago": "Condiviso `x` fa",
|
||||||
|
"Unsubscribe": "Disiscriviti",
|
||||||
|
"Subscribe": "Iscriviti",
|
||||||
|
"Login to subscribe to `x`": "Accedi per iscriverti a `x`",
|
||||||
|
"View channel on YouTube": "Vedi canale su YouTube",
|
||||||
|
"newest": "Data di aggiunta (più recente)",
|
||||||
|
"oldest": "Data di aggiunta (più vecchia)",
|
||||||
|
"popular": "Tendenze",
|
||||||
|
"last": "",
|
||||||
|
"Next page": "Pagina successiva",
|
||||||
|
"Previous page": "Pagina precedente",
|
||||||
|
"Clear watch history?": "Sei sicuro di voler cancellare la cronologia dei video guardati?",
|
||||||
|
"Yes": "Si",
|
||||||
|
"No": "No",
|
||||||
|
"Import and Export Data": "Importazione ed esportazione dati",
|
||||||
|
"Import": "Importa",
|
||||||
|
"Import Invidious data": "Importa dati Invidious",
|
||||||
|
"Import YouTube subscriptions": "Importa le iscrizioni da YouTube",
|
||||||
|
"Import FreeTube subscriptions (.db)": "Importa le iscrizioni da FreeTube (.db)",
|
||||||
|
"Import NewPipe subscriptions (.json)": "Importa le iscrizioni da NewPipe (.json)",
|
||||||
|
"Import NewPipe data (.zip)": "Importa i dati di NewPipe (.zip)",
|
||||||
|
"Export": "Esporta",
|
||||||
|
"Export subscriptions as OPML": "Esporta gli abbonamenti come OPML",
|
||||||
|
"Export subscriptions as OPML (for NewPipe & FreeTube)": "Esporta gli abbonamenti come OPML (per NewPipe e FreeTube)",
|
||||||
|
"Export data as JSON": "Esporta i dati in formato JSON",
|
||||||
|
"Delete account?": "Sei sicuro di voler cancellare l'account?",
|
||||||
|
"History": "Cronologia",
|
||||||
|
"An alternative front-end to YouTube": "Un'interfaccia alternativa per YouTube",
|
||||||
|
"JavaScript license information": "Info licenze JavaScript",
|
||||||
|
"source": "sorgente",
|
||||||
|
"Login": "Entra",
|
||||||
|
"Login/Register": "Entra/Registrati",
|
||||||
|
"Login to Google": "Entra con Google",
|
||||||
|
"User ID:": "ID utente:",
|
||||||
|
"Password:": "Password:",
|
||||||
|
"Time (h:mm:ss):": "Orario (h:mm:ss):",
|
||||||
|
"Text CAPTCHA": "Testo del CAPTCHA",
|
||||||
|
"Image CAPTCHA": "Immagine CAPTCHA",
|
||||||
|
"Sign In": "Entra",
|
||||||
|
"Register": "Registrati",
|
||||||
|
"Email:": "Email:",
|
||||||
|
"Google verification code:": "Codice di verifica Google:",
|
||||||
|
"Preferences": "Preferenze",
|
||||||
|
"Player preferences": "Preferenze del riproduttore",
|
||||||
|
"Always loop: ": "Ripeti sempre: ",
|
||||||
|
"Autoplay: ": "Riproduzione automatica: ",
|
||||||
|
"Autoplay next video: ": "Riproduci automaticamente il prossimo video: ",
|
||||||
|
"Listen by default: ": "Modalità solo audio come predefinita: ",
|
||||||
|
"Proxy videos? ": "",
|
||||||
|
"Default speed: ": "Velocità di riproduzione predefinita: ",
|
||||||
|
"Preferred video quality: ": "Preferenza sulla qualità video: ",
|
||||||
|
"Player volume: ": "Volume di riproduzione: ",
|
||||||
|
"Default comments: ": "Origine dei commenti: ",
|
||||||
|
"Default captions: ": "Sottotitoli predefiniti: ",
|
||||||
|
"Fallback captions: ": "Sottotitoli alternativi: ",
|
||||||
|
"Show related videos? ": "Mostra video correlati? ",
|
||||||
|
"Visual preferences": "Preferenze grafiche",
|
||||||
|
"Dark mode: ": "Tema scuro: ",
|
||||||
|
"Thin mode: ": "Modalità per connessioni lente: ",
|
||||||
|
"Subscription preferences": "Preferenze iscrizioni",
|
||||||
|
"Redirect homepage to feed: ": "Reindirizza la pagina principale a quella delle iscrizioni: ",
|
||||||
|
"Number of videos shown in feed: ": "Numero di video da mostrare nelle iscrizioni: ",
|
||||||
|
"Sort videos by: ": "Ordinare i video per: ",
|
||||||
|
"published": "data di pubblicazione",
|
||||||
|
"published - reverse": "data di pubblicazione - decrescente",
|
||||||
|
"alphabetically": "ordine alfabetico",
|
||||||
|
"alphabetically - reverse": "ordine alfabetico - decrescente",
|
||||||
|
"channel name": "nome del canale",
|
||||||
|
"channel name - reverse": "nome del canale - decrescente",
|
||||||
|
"Only show latest video from channel: ": "Mostra solo il video più recente del canale: ",
|
||||||
|
"Only show latest unwatched video from channel: ": "Mostra solo il video più recente non guardato del canale: ",
|
||||||
|
"Only show unwatched: ": "Mostra solo i video non guardati: ",
|
||||||
|
"Only show notifications (if there are any): ": "Mostra solo le notifiche (se presenti): ",
|
||||||
|
"Data preferences": "Preferenze dati",
|
||||||
|
"Clear watch history": "Cancella la cronologia dei video guardati",
|
||||||
|
"Import/Export data": "Importazione/esportazione dati",
|
||||||
|
"Manage subscriptions": "Gestisci le iscrizioni",
|
||||||
|
"Watch history": "Cronologia dei video",
|
||||||
|
"Delete account": "Elimina l'account",
|
||||||
|
"Administrator preferences": "",
|
||||||
|
"Default homepage: ": "",
|
||||||
|
"Feed menu: ": "",
|
||||||
|
"Top enabled? ": "",
|
||||||
|
"CAPTCHA enabled? ": "",
|
||||||
|
"Login enabled? ": "",
|
||||||
|
"Registration enabled? ": "",
|
||||||
|
"Report statistics? ": "",
|
||||||
|
"Save preferences": "Salva le preferenze",
|
||||||
|
"Subscription manager": "Gestisci le iscrizioni",
|
||||||
|
"`x` subscriptions": "`x` iscrizioni",
|
||||||
|
"Import/Export": "Importa/esporta",
|
||||||
|
"unsubscribe": "disiscriviti",
|
||||||
|
"Subscriptions": "Iscrizioni",
|
||||||
|
"`x` unseen notifications": "`x` notifiche non visualizzate",
|
||||||
|
"search": "Cerca",
|
||||||
|
"Sign out": "Esci",
|
||||||
|
"Released under the AGPLv3 by Omar Roth.": "Pubblicato con licenza AGPLv3 da Omar Roth.",
|
||||||
|
"Source available here.": "Codice sorgente.",
|
||||||
|
"View JavaScript license information.": "Guarda le informazioni di licenza del codice JavaScript.",
|
||||||
|
"View privacy policy.": "",
|
||||||
|
"Trending": "Tendenze",
|
||||||
|
"Unlisted": "",
|
||||||
|
"Watch video on Youtube": "Guarda il video su YouTube",
|
||||||
|
"Genre: ": "Genere: ",
|
||||||
|
"License: ": "Licenza: ",
|
||||||
|
"Family friendly? ": "Per tutti? ",
|
||||||
|
"Wilson score: ": "Punteggio di Wilson: ",
|
||||||
|
"Engagement: ": "Tasso di coinvolgimento: ",
|
||||||
|
"Whitelisted regions: ": "Regioni nella lista bianca: ",
|
||||||
|
"Blacklisted regions: ": "Regioni nella lista nera: ",
|
||||||
|
"Shared `x`": "Condiviso `x`",
|
||||||
|
"Premieres in `x`": "",
|
||||||
|
"Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.": "Ciao! Sembra che tu abbia disattivato JavaScript. Clicca qui per visualizzare i commenti. Considera che potrebbe volerci più tempo.",
|
||||||
|
"View YouTube comments": "Visualizza i commenti da YouTube",
|
||||||
|
"View more comments on Reddit": "Visualizza più commenti su Reddit",
|
||||||
|
"View `x` comments": "Visualizza `x` commenti",
|
||||||
|
"View Reddit comments": "Visualizza i commenti da Reddit",
|
||||||
|
"Hide replies": "Nascondi le risposte",
|
||||||
|
"Show replies": "Mostra le risposte",
|
||||||
|
"Incorrect password": "Password sbagliata",
|
||||||
|
"Quota exceeded, try again in a few hours": "Limite superato, prova di nuovo fra qualche ora",
|
||||||
|
"Unable to login, make sure two-factor authentication (Authenticator or SMS) is enabled.": "Impossibile autenticarsi, controlla che l'autenticazione in due passaggi (Authenticator o SMS) sia attiva.",
|
||||||
|
"Invalid TFA code": "Codice di autenticazione a due fattori non valido",
|
||||||
|
"Login failed. This may be because two-factor authentication is not enabled on your account.": "Login fallito. L'errore potrebbe essere causato dal fatto che la verifica in due passaggi non è attiva sul tuo account.",
|
||||||
|
"Invalid answer": "Risposta errata",
|
||||||
|
"Invalid CAPTCHA": "CAPTCHA errato",
|
||||||
|
"CAPTCHA is a required field": "Il CAPTCHA è un campo obbligatorio",
|
||||||
|
"User ID is a required field": "L'ID utente è obbligatorio",
|
||||||
|
"Password is a required field": "La password è un campo obbligatorio",
|
||||||
|
"Invalid username or password": "Nome utente o password errati",
|
||||||
|
"Please sign in using 'Sign in with Google'": "Per favore accedi con \"Entra con Google\"",
|
||||||
|
"Password cannot be empty": "La password non può essere vuota",
|
||||||
|
"Password cannot be longer than 55 characters": "La password non può contenere più di 55 caratteri",
|
||||||
|
"Please sign in": "Per favore, entra",
|
||||||
|
"Invidious Private Feed for `x`": "Feed privato Invidious per `x`",
|
||||||
|
"channel:`x`": "canale:`x`",
|
||||||
|
"Deleted or invalid channel": "Canale cancellato o invalido",
|
||||||
|
"This channel does not exist.": "Canale inesistente.",
|
||||||
|
"Could not get channel info.": "Impossibile ottenere le informazioni del canale.",
|
||||||
|
"Could not fetch comments": "Impossibile recuperare i commenti",
|
||||||
|
"View `x` replies": "Visualizza `x` risposte",
|
||||||
|
"`x` ago": "`x` fa",
|
||||||
|
"Load more": "Carica altro",
|
||||||
|
"`x` points": "`x` punti",
|
||||||
|
"Could not create mix.": "Impossibile creare il mix.",
|
||||||
|
"Playlist is empty": "Playlist vuota",
|
||||||
|
"Invalid playlist.": "Playlist invalida.",
|
||||||
|
"Playlist does not exist.": "Playlist inesistente.",
|
||||||
|
"Could not pull trending pages.": "Impossibile recuperare le tendenze.",
|
||||||
|
"Hidden field \"challenge\" is a required field": "Il campo nascosto \"challenge\" è obbligatorio",
|
||||||
|
"Hidden field \"token\" is a required field": "Il campo nascosto \"token\" è obbligatorio",
|
||||||
|
"Invalid challenge": "Campo \"challenge\" invalido",
|
||||||
|
"Invalid token": "Campo \"token\" invalido",
|
||||||
|
"Invalid user": "Utente invalido",
|
||||||
|
"Token is expired, please try again": "Token scaduto, riprova",
|
||||||
|
"English": "Inglese",
|
||||||
|
"English (auto-generated)": "Inglese (generati automaticamente)",
|
||||||
|
"Afrikaans": "Afrikaans",
|
||||||
|
"Albanian": "Albanese",
|
||||||
|
"Amharic": "Amarico",
|
||||||
|
"Arabic": "Arabo",
|
||||||
|
"Armenian": "Armeno",
|
||||||
|
"Azerbaijani": "Azero",
|
||||||
|
"Bangla": "Bengalese",
|
||||||
|
"Basque": "Basco",
|
||||||
|
"Belarusian": "Biellorusso",
|
||||||
|
"Bosnian": "Bosniaco",
|
||||||
|
"Bulgarian": "Bulgaro",
|
||||||
|
"Burmese": "Birmano",
|
||||||
|
"Catalan": "Catalano",
|
||||||
|
"Cebuano": "Sugbuanon",
|
||||||
|
"Chinese (Simplified)": "Cinese semplifiato",
|
||||||
|
"Chinese (Traditional)": "Cinese tradizionale",
|
||||||
|
"Corsican": "Corso",
|
||||||
|
"Croatian": "Croato",
|
||||||
|
"Czech": "Ceco",
|
||||||
|
"Danish": "Danese",
|
||||||
|
"Dutch": "Olandese",
|
||||||
|
"Esperanto": "Esperanto",
|
||||||
|
"Estonian": "Estone",
|
||||||
|
"Filipino": "Filippino",
|
||||||
|
"Finnish": "Finlandese",
|
||||||
|
"French": "Francese",
|
||||||
|
"Galician": "Galiziano",
|
||||||
|
"Georgian": "Georgiano",
|
||||||
|
"German": "Tedesco",
|
||||||
|
"Greek": "Greco",
|
||||||
|
"Gujarati": "Gujarati",
|
||||||
|
"Haitian Creole": "Creolo haitiano",
|
||||||
|
"Hausa": "Lingua hausa",
|
||||||
|
"Hawaiian": "Hawaiano",
|
||||||
|
"Hebrew": "Ebreo",
|
||||||
|
"Hindi": "Hindi",
|
||||||
|
"Hmong": "Hmong",
|
||||||
|
"Hungarian": "Ungarese",
|
||||||
|
"Icelandic": "Islandese",
|
||||||
|
"Igbo": "Igbo",
|
||||||
|
"Indonesian": "Indonesiano",
|
||||||
|
"Irish": "Irlandese",
|
||||||
|
"Italian": "Italiano",
|
||||||
|
"Japanese": "Giapponese",
|
||||||
|
"Javanese": "Giavanese",
|
||||||
|
"Kannada": "Kannada",
|
||||||
|
"Kazakh": "Kazaco",
|
||||||
|
"Khmer": "Khmer",
|
||||||
|
"Korean": "Coreano",
|
||||||
|
"Kurdish": "Curdo",
|
||||||
|
"Kyrgyz": "Kirghize",
|
||||||
|
"Lao": "Lao",
|
||||||
|
"Latin": "Latino",
|
||||||
|
"Latvian": "Lettone",
|
||||||
|
"Lithuanian": "Lituano",
|
||||||
|
"Luxembourgish": "Lussemburghese",
|
||||||
|
"Macedonian": "Macedone",
|
||||||
|
"Malagasy": "Malgascio",
|
||||||
|
"Malay": "Malese",
|
||||||
|
"Malayalam": "Lingua malayalam",
|
||||||
|
"Maltese": "Maltese",
|
||||||
|
"Maori": "Maori",
|
||||||
|
"Marathi": "Marathi",
|
||||||
|
"Mongolian": "Mongolo",
|
||||||
|
"Nepali": "Nepalese",
|
||||||
|
"Norwegian": "Norvegese",
|
||||||
|
"Nyanja": "Nyanja",
|
||||||
|
"Pashto": "Lingua pashtu",
|
||||||
|
"Persian": "Persiano",
|
||||||
|
"Polish": "Polacco",
|
||||||
|
"Portuguese": "Portoghese",
|
||||||
|
"Punjabi": "Punjabi",
|
||||||
|
"Romanian": "Rumeno",
|
||||||
|
"Russian": "Russo",
|
||||||
|
"Samoan": "Samoan",
|
||||||
|
"Scottish Gaelic": "Gaelico scozzese",
|
||||||
|
"Serbian": "Serbo",
|
||||||
|
"Shona": "Shona",
|
||||||
|
"Sindhi": "Sindhi",
|
||||||
|
"Sinhala": "Cingalese",
|
||||||
|
"Slovak": "Slovacco",
|
||||||
|
"Slovenian": "Sloveno",
|
||||||
|
"Somali": "Somalo",
|
||||||
|
"Southern Sotho": "Sotho del Sud",
|
||||||
|
"Spanish": "Spagnolo",
|
||||||
|
"Spanish (Latin America)": "Spagnolo (America latina)",
|
||||||
|
"Sundanese": "Sudanese",
|
||||||
|
"Swahili": "Swahili",
|
||||||
|
"Swedish": "Svedese",
|
||||||
|
"Tajik": "Tajik",
|
||||||
|
"Tamil": "Tamil",
|
||||||
|
"Telugu": "Telugu",
|
||||||
|
"Thai": "Thaï",
|
||||||
|
"Turkish": "Turco",
|
||||||
|
"Ukrainian": "Ucraino",
|
||||||
|
"Urdu": "Urdu",
|
||||||
|
"Uzbek": "Uzbeco",
|
||||||
|
"Vietnamese": "Vietnamese",
|
||||||
|
"Welsh": "Gallese",
|
||||||
|
"Western Frisian": "Frisone occidentale",
|
||||||
|
"Xhosa": "Xhosa",
|
||||||
|
"Yiddish": "Yiddish",
|
||||||
|
"Yoruba": "Yoruba",
|
||||||
|
"Zulu": "Zulu",
|
||||||
|
"`x` years": "`x` anni",
|
||||||
|
"`x` months": "`x` mesi",
|
||||||
|
"`x` weeks": "`x` settimane",
|
||||||
|
"`x` days": "`x` giorni",
|
||||||
|
"`x` hours": "`x` ore",
|
||||||
|
"`x` minutes": "`x` minuti",
|
||||||
|
"`x` seconds": "`x` secondi",
|
||||||
|
"Fallback comments: ": "Commenti alternativi: ",
|
||||||
|
"Popular": "Popolare",
|
||||||
|
"Top": "Top",
|
||||||
|
"About": "A proposito",
|
||||||
|
"Rating: ": "Punteggio: ",
|
||||||
|
"Language: ": "Lingua: ",
|
||||||
|
"Default": "Predefinito",
|
||||||
|
"Music": "Musica",
|
||||||
|
"Gaming": "Videogiochi",
|
||||||
|
"News": "Notizie",
|
||||||
|
"Movies": "Film",
|
||||||
|
"Download": "Scarica",
|
||||||
|
"Download as: ": "Scarica come: ",
|
||||||
|
"%A %B %-d, %Y": "%A %-d %B %Y",
|
||||||
|
"(edited)": "(modificato)",
|
||||||
|
"Youtube permalink of the comment": "Link permanente al commento di YouTube",
|
||||||
|
"`x` marked it with a ❤": "`x` l'ha contrassegnato con un ❤",
|
||||||
|
"Audio mode": "Modalità audio",
|
||||||
|
"Video mode": "Modalità video",
|
||||||
|
"Videos": "",
|
||||||
|
"Playlists": "",
|
||||||
|
"Current version: ": ""
|
||||||
|
}
|
||||||
@@ -10,8 +10,9 @@
|
|||||||
"newest": "nyeste",
|
"newest": "nyeste",
|
||||||
"oldest": "eldste",
|
"oldest": "eldste",
|
||||||
"popular": "populært",
|
"popular": "populært",
|
||||||
"Preview page": "Forhåndsvis side",
|
"last": "siste",
|
||||||
"Next page": "Neste side",
|
"Next page": "Neste side",
|
||||||
|
"Previous page": "Forrige side",
|
||||||
"Clear watch history?": "Tøm visningshistorikk?",
|
"Clear watch history?": "Tøm visningshistorikk?",
|
||||||
"Yes": "Ja",
|
"Yes": "Ja",
|
||||||
"No": "Nei",
|
"No": "Nei",
|
||||||
@@ -28,7 +29,6 @@
|
|||||||
"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",
|
|
||||||
"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",
|
||||||
@@ -50,6 +50,7 @@
|
|||||||
"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: ",
|
||||||
|
"Proxy videos? ": "Mellomtjen videoer? ",
|
||||||
"Default speed: ": "Forvalgt hastighet: ",
|
"Default speed: ": "Forvalgt hastighet: ",
|
||||||
"Preferred video quality: ": "Foretrukket videokvalitet: ",
|
"Preferred video quality: ": "Foretrukket videokvalitet: ",
|
||||||
"Player volume: ": "Avspillerlydstyrke: ",
|
"Player volume: ": "Avspillerlydstyrke: ",
|
||||||
@@ -80,6 +81,14 @@
|
|||||||
"Manage subscriptions": "Behandle abonnementer",
|
"Manage subscriptions": "Behandle abonnementer",
|
||||||
"Watch history": "Visningshistorikk",
|
"Watch history": "Visningshistorikk",
|
||||||
"Delete account": "Slett konto",
|
"Delete account": "Slett konto",
|
||||||
|
"Administrator preferences": "Administratorinnstillinger",
|
||||||
|
"Default homepage: ": "Forvalgt hjemmeside: ",
|
||||||
|
"Feed menu: ": "Flyt-meny: ",
|
||||||
|
"Top enabled? ": "Topp påskrudd? ",
|
||||||
|
"CAPTCHA enabled? ": "CAPTCHA påskrudd? ",
|
||||||
|
"Login enabled? ": "Innlogging påskrudd? ",
|
||||||
|
"Registration enabled? ": "Registrering påskrudd? ",
|
||||||
|
"Report statistics? ": "Innrapporter statistikk? ",
|
||||||
"Save preferences": "Lagre innstillinger",
|
"Save preferences": "Lagre innstillinger",
|
||||||
"Subscription manager": "Abonnementsbehandler",
|
"Subscription manager": "Abonnementsbehandler",
|
||||||
"`x` subscriptions": "`x` abonnementer",
|
"`x` subscriptions": "`x` abonnementer",
|
||||||
@@ -92,7 +101,9 @@
|
|||||||
"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.",
|
||||||
|
"View privacy policy.": "Vis personvernspraksis.",
|
||||||
"Trending": "Trendsettende",
|
"Trending": "Trendsettende",
|
||||||
|
"Unlisted": "Ulistet",
|
||||||
"Watch video on Youtube": "Vis video på YouTube",
|
"Watch video on Youtube": "Vis video på YouTube",
|
||||||
"Genre: ": "Sjanger: ",
|
"Genre: ": "Sjanger: ",
|
||||||
"License: ": "Lisens: ",
|
"License: ": "Lisens: ",
|
||||||
@@ -102,6 +113,7 @@
|
|||||||
"Whitelisted regions: ": "Hvitlistede regioner: ",
|
"Whitelisted regions: ": "Hvitlistede regioner: ",
|
||||||
"Blacklisted regions: ": "Svartelistede regioner: ",
|
"Blacklisted regions: ": "Svartelistede regioner: ",
|
||||||
"Shared `x`": "Delt `x`",
|
"Shared `x`": "Delt `x`",
|
||||||
|
"Premieres in `x`": "Premiere om `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",
|
||||||
@@ -263,5 +275,21 @@
|
|||||||
"Top": "Topp",
|
"Top": "Topp",
|
||||||
"About": "Om",
|
"About": "Om",
|
||||||
"Rating: ": "Vurdering: ",
|
"Rating: ": "Vurdering: ",
|
||||||
"Language: ": "Språk: "
|
"Language: ": "Språk: ",
|
||||||
|
"Default": "Forvalg",
|
||||||
|
"Music": "Musikk",
|
||||||
|
"Gaming": "Spill",
|
||||||
|
"News": "Nyheter",
|
||||||
|
"Movies": "Filmer",
|
||||||
|
"Download": "Last ned",
|
||||||
|
"Download as: ": "Last ned som: ",
|
||||||
|
"%A %B %-d, %Y": "",
|
||||||
|
"(edited)": "(redigert)",
|
||||||
|
"Youtube permalink of the comment": "Permanent YouTube-lenke til innholdet",
|
||||||
|
"`x` marked it with a ❤": "`x` levnet et ❤",
|
||||||
|
"Audio mode": "Lydmodus",
|
||||||
|
"Video mode": "Video-modus",
|
||||||
|
"Videos": "Videoer",
|
||||||
|
"Playlists": "Spillelister",
|
||||||
|
"Current version: ": "Nåværende versjon: "
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,8 +10,9 @@
|
|||||||
"newest": "nieuwste",
|
"newest": "nieuwste",
|
||||||
"oldest": "oudste",
|
"oldest": "oudste",
|
||||||
"popular": "populair",
|
"popular": "populair",
|
||||||
"Preview page": "Pagina voorvertonen",
|
"last": "",
|
||||||
"Next page": "Volgende pagina",
|
"Next page": "Volgende pagina",
|
||||||
|
"Previous page": "Vorige pagina",
|
||||||
"Clear watch history?": "Kijk geschiedenis wissen?",
|
"Clear watch history?": "Kijk geschiedenis wissen?",
|
||||||
"Yes": "Ja",
|
"Yes": "Ja",
|
||||||
"No": "Nee",
|
"No": "Nee",
|
||||||
@@ -28,7 +29,6 @@
|
|||||||
"Export data as JSON": "Exporteer gegevens als JSON",
|
"Export data as JSON": "Exporteer gegevens als JSON",
|
||||||
"Delete account?": "Verwijder account?",
|
"Delete account?": "Verwijder account?",
|
||||||
"History": "Geschiedenis",
|
"History": "Geschiedenis",
|
||||||
"Previous page": "Vorige pagina",
|
|
||||||
"An alternative front-end to YouTube": "Een alternatieve front-end voor YouTube",
|
"An alternative front-end to YouTube": "Een alternatieve front-end voor YouTube",
|
||||||
"JavaScript license information": "JavaScript licentie informatie",
|
"JavaScript license information": "JavaScript licentie informatie",
|
||||||
"source": "bron",
|
"source": "bron",
|
||||||
@@ -50,6 +50,7 @@
|
|||||||
"Autoplay: ": "Automatisch afspelen: ",
|
"Autoplay: ": "Automatisch afspelen: ",
|
||||||
"Autoplay next video: ": "Automatisch volgende video afspelen: ",
|
"Autoplay next video: ": "Automatisch volgende video afspelen: ",
|
||||||
"Listen by default: ": "Standaard luisteren: ",
|
"Listen by default: ": "Standaard luisteren: ",
|
||||||
|
"Proxy videos? ": "",
|
||||||
"Default speed: ": "Standaard snelheid: ",
|
"Default speed: ": "Standaard snelheid: ",
|
||||||
"Preferred video quality: ": "Video kwaliteit voorkeur: ",
|
"Preferred video quality: ": "Video kwaliteit voorkeur: ",
|
||||||
"Player volume: ": "Afspeler volume: ",
|
"Player volume: ": "Afspeler volume: ",
|
||||||
@@ -80,6 +81,14 @@
|
|||||||
"Manage subscriptions": "Abonnees beheren",
|
"Manage subscriptions": "Abonnees beheren",
|
||||||
"Watch history": "Kijkgeschiedenis",
|
"Watch history": "Kijkgeschiedenis",
|
||||||
"Delete account": "Account verwijderen",
|
"Delete account": "Account verwijderen",
|
||||||
|
"Administrator preferences": "",
|
||||||
|
"Default homepage: ": "",
|
||||||
|
"Feed menu: ": "",
|
||||||
|
"Top enabled? ": "",
|
||||||
|
"CAPTCHA enabled? ": "",
|
||||||
|
"Login enabled? ": "",
|
||||||
|
"Registration enabled? ": "",
|
||||||
|
"Report statistics? ": "",
|
||||||
"Save preferences": "Opslaan voorkeuren",
|
"Save preferences": "Opslaan voorkeuren",
|
||||||
"Subscription manager": "Abonnees beheerder",
|
"Subscription manager": "Abonnees beheerder",
|
||||||
"`x` subscriptions": "`x` abonnees",
|
"`x` subscriptions": "`x` abonnees",
|
||||||
@@ -92,7 +101,9 @@
|
|||||||
"Released under the AGPLv3 by Omar Roth.": "Uitgegeven onder AGPLv3 door Omar Roth.",
|
"Released under the AGPLv3 by Omar Roth.": "Uitgegeven onder AGPLv3 door Omar Roth.",
|
||||||
"Source available here.": "Bron beschikbaar hier.",
|
"Source available here.": "Bron beschikbaar hier.",
|
||||||
"View JavaScript license information.": "Bekijk JavaScript licentie informatie.",
|
"View JavaScript license information.": "Bekijk JavaScript licentie informatie.",
|
||||||
|
"View privacy policy.": "",
|
||||||
"Trending": "Trending",
|
"Trending": "Trending",
|
||||||
|
"Unlisted": "",
|
||||||
"Watch video on Youtube": "Bekijk video op Youtube",
|
"Watch video on Youtube": "Bekijk video op Youtube",
|
||||||
"Genre: ": "Genre: ",
|
"Genre: ": "Genre: ",
|
||||||
"License: ": "Licentie: ",
|
"License: ": "Licentie: ",
|
||||||
@@ -102,6 +113,7 @@
|
|||||||
"Whitelisted regions: ": "Toegestane regio's: ",
|
"Whitelisted regions: ": "Toegestane regio's: ",
|
||||||
"Blacklisted regions: ": "Geblokkeerde regio's: ",
|
"Blacklisted regions: ": "Geblokkeerde regio's: ",
|
||||||
"Shared `x`": "`x` gedeeld",
|
"Shared `x`": "`x` gedeeld",
|
||||||
|
"Premieres in `x`": "",
|
||||||
"Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.": "Hoi! Het lijkt erop dat je JavaScript uit hebt staan. Klik hier om de reacties te bekijken, hou er rekening mee dat het wat langer duurt om te laden.",
|
"Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.": "Hoi! Het lijkt erop dat je JavaScript uit hebt staan. Klik hier om de reacties te bekijken, hou er rekening mee dat het wat langer duurt om te laden.",
|
||||||
"View YouTube comments": "Bekijk YouTube reacties",
|
"View YouTube comments": "Bekijk YouTube reacties",
|
||||||
"View more comments on Reddit": "Bekijk meer reacties op Reddit",
|
"View more comments on Reddit": "Bekijk meer reacties op Reddit",
|
||||||
@@ -263,5 +275,21 @@
|
|||||||
"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 ❤": "",
|
||||||
|
"Audio mode": "",
|
||||||
|
"Video mode": "",
|
||||||
|
"Videos": "",
|
||||||
|
"Playlists": "",
|
||||||
|
"Current version: ": ""
|
||||||
}
|
}
|
||||||
|
|||||||
270
locales/pl.json
270
locales/pl.json
@@ -10,8 +10,9 @@
|
|||||||
"newest": "najnowsze",
|
"newest": "najnowsze",
|
||||||
"oldest": "najstarsze",
|
"oldest": "najstarsze",
|
||||||
"popular": "popularne",
|
"popular": "popularne",
|
||||||
"Preview page": "Podgląd strony",
|
"last": "ostatnie",
|
||||||
"Next page": "Następna strona",
|
"Next page": "Następna strona",
|
||||||
|
"Previous page": "Poprzednia strona",
|
||||||
"Clear watch history?": "Wyczyścić historię?",
|
"Clear watch history?": "Wyczyścić historię?",
|
||||||
"Yes": "Tak",
|
"Yes": "Tak",
|
||||||
"No": "Nie",
|
"No": "Nie",
|
||||||
@@ -28,8 +29,7 @@
|
|||||||
"Export data as JSON": "Eksportuj dane jako JSON",
|
"Export data as JSON": "Eksportuj dane jako JSON",
|
||||||
"Delete account?": "Usunąć konto?",
|
"Delete account?": "Usunąć konto?",
|
||||||
"History": "Historia",
|
"History": "Historia",
|
||||||
"Previous page": "Poprzednia strona",
|
"An alternative front-end to YouTube": "Alternatywny front-end dla YouTube",
|
||||||
"An alternative front-end to YouTube": "",
|
|
||||||
"JavaScript license information": "Informacja o licencji JavaScript",
|
"JavaScript license information": "Informacja o licencji JavaScript",
|
||||||
"source": "źródło",
|
"source": "źródło",
|
||||||
"Login": "Zaloguj",
|
"Login": "Zaloguj",
|
||||||
@@ -50,12 +50,13 @@
|
|||||||
"Autoplay: ": "Autoodtwarzanie: ",
|
"Autoplay: ": "Autoodtwarzanie: ",
|
||||||
"Autoplay next video: ": "Odtwórz następny film: ",
|
"Autoplay next video: ": "Odtwórz następny film: ",
|
||||||
"Listen by default: ": "Tryb dźwiękowy: ",
|
"Listen by default: ": "Tryb dźwiękowy: ",
|
||||||
|
"Proxy videos? ": "Filmy przez proxy? ",
|
||||||
"Default speed: ": "Domyślna prędkość: ",
|
"Default speed: ": "Domyślna prędkość: ",
|
||||||
"Preferred video quality: ": "Preferowana jakość filmów: ",
|
"Preferred video quality: ": "Preferowana jakość filmów: ",
|
||||||
"Player volume: ": "Głośność odtwarzacza: ",
|
"Player volume: ": "Głośność odtwarzacza: ",
|
||||||
"Default comments: ": "Domyślne komentarze: ",
|
"Default comments: ": "Domyślne komentarze: ",
|
||||||
"Default captions: ": "Domyślne napisy: ",
|
"Default captions: ": "Domyślne napisy: ",
|
||||||
"Fallback captions: ": "Rezerwowe napisy: ",
|
"Fallback captions: ": "Zastępcze napisy: ",
|
||||||
"Show related videos? ": "Pokaż powiązane filmy? ",
|
"Show related videos? ": "Pokaż powiązane filmy? ",
|
||||||
"Visual preferences": "Preferencje Wizualne",
|
"Visual preferences": "Preferencje Wizualne",
|
||||||
"Dark mode: ": "Ciemny motyw: ",
|
"Dark mode: ": "Ciemny motyw: ",
|
||||||
@@ -63,13 +64,13 @@
|
|||||||
"Subscription preferences": "Preferencje subskrybcji",
|
"Subscription preferences": "Preferencje subskrybcji",
|
||||||
"Redirect homepage to feed: ": "Przekieruj stronę główną do subskrybcji: ",
|
"Redirect homepage to feed: ": "Przekieruj stronę główną do subskrybcji: ",
|
||||||
"Number of videos shown in feed: ": "Liczba filmów widoczna na stronie subskrybcji: ",
|
"Number of videos shown in feed: ": "Liczba filmów widoczna na stronie subskrybcji: ",
|
||||||
"Sort videos by: ": "Sortuj filmy po: ",
|
"Sort videos by: ": "Sortuj filmy: ",
|
||||||
"published": "czasie publikacji",
|
"published": "po czasie publikacji",
|
||||||
"published - reverse": "czasie publikacji od najstarszych",
|
"published - reverse": "po czasie publikacji od najstarszych",
|
||||||
"alphabetically": "alfabetycznie",
|
"alphabetically": "alfabetycznie",
|
||||||
"alphabetically - reverse": "alfabetycznie od tyłu",
|
"alphabetically - reverse": "alfabetycznie od tyłu",
|
||||||
"channel name": "nazwie kanału",
|
"channel name": "po nazwie kanału",
|
||||||
"channel name - reverse": "nazwie kanału od tyłu",
|
"channel name - reverse": "po nazwie kanału od tyłu",
|
||||||
"Only show latest video from channel: ": "Pokazuj tylko najnowszy film z kanału: ",
|
"Only show latest video from channel: ": "Pokazuj tylko najnowszy film z kanału: ",
|
||||||
"Only show latest unwatched video from channel: ": "Pokazuj tylko najnowszy nie obejrzany film z kanału: ",
|
"Only show latest unwatched video from channel: ": "Pokazuj tylko najnowszy nie obejrzany film z kanału: ",
|
||||||
"Only show unwatched: ": "Pokazuj tylko nie obejrzane: ",
|
"Only show unwatched: ": "Pokazuj tylko nie obejrzane: ",
|
||||||
@@ -80,6 +81,14 @@
|
|||||||
"Manage subscriptions": "Organizuj subskrybcje",
|
"Manage subscriptions": "Organizuj subskrybcje",
|
||||||
"Watch history": "Historia",
|
"Watch history": "Historia",
|
||||||
"Delete account": "Usuń konto",
|
"Delete account": "Usuń konto",
|
||||||
|
"Administrator preferences": "Preferencje administratora",
|
||||||
|
"Default homepage: ": "Domyślna strona główna: ",
|
||||||
|
"Feed menu: ": "",
|
||||||
|
"Top enabled? ": "",
|
||||||
|
"CAPTCHA enabled? ": "CAPTCHA aktywna? ",
|
||||||
|
"Login enabled? ": "Logowanie włączone? ",
|
||||||
|
"Registration enabled? ": "Rejestracja włączona? ",
|
||||||
|
"Report statistics? ": "Raportować statystyki? ",
|
||||||
"Save preferences": "Zapisz preferencje",
|
"Save preferences": "Zapisz preferencje",
|
||||||
"Subscription manager": "Manager subskrybcji",
|
"Subscription manager": "Manager subskrybcji",
|
||||||
"`x` subscriptions": "`x` subskrybcji",
|
"`x` subscriptions": "`x` subskrybcji",
|
||||||
@@ -92,7 +101,9 @@
|
|||||||
"Released under the AGPLv3 by Omar Roth.": "Wydano na licencji AGPLv3 przez Omar Roth.",
|
"Released under the AGPLv3 by Omar Roth.": "Wydano na licencji AGPLv3 przez Omar Roth.",
|
||||||
"Source available here.": "Kod źródłowy dostępny tutaj.",
|
"Source available here.": "Kod źródłowy dostępny tutaj.",
|
||||||
"View JavaScript license information.": "Wyświetl informację o licencji JavaScript.",
|
"View JavaScript license information.": "Wyświetl informację o licencji JavaScript.",
|
||||||
|
"View privacy policy.": "Polityka prywatności.",
|
||||||
"Trending": "Na czasie",
|
"Trending": "Na czasie",
|
||||||
|
"Unlisted": "",
|
||||||
"Watch video on Youtube": "Zobacz film na YouTube",
|
"Watch video on Youtube": "Zobacz film na YouTube",
|
||||||
"Genre: ": "Gatunek: ",
|
"Genre: ": "Gatunek: ",
|
||||||
"License: ": "Licencja: ",
|
"License: ": "Licencja: ",
|
||||||
@@ -102,6 +113,7 @@
|
|||||||
"Whitelisted regions: ": "Dostępny na obszarach: ",
|
"Whitelisted regions: ": "Dostępny na obszarach: ",
|
||||||
"Blacklisted regions: ": "Niedostępny na obszarach: ",
|
"Blacklisted regions: ": "Niedostępny na obszarach: ",
|
||||||
"Shared `x`": "Udostępniono `x`",
|
"Shared `x`": "Udostępniono `x`",
|
||||||
|
"Premieres in `x`": "",
|
||||||
"Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.": "Cześć! Wygląda na to, że masz wyłączoną obsługę JavaScriptu. Kliknij tutaj, żeby zobaczyć komentarze. Pamiętaj, że wczytywanie może potrwać dłużej.",
|
"Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.": "Cześć! Wygląda na to, że masz wyłączoną obsługę JavaScriptu. Kliknij tutaj, żeby zobaczyć komentarze. Pamiętaj, że wczytywanie może potrwać dłużej.",
|
||||||
"View YouTube comments": "Wyświetl komentarze z YouTube",
|
"View YouTube comments": "Wyświetl komentarze z YouTube",
|
||||||
"View more comments on Reddit": "Wyświetl więcej komentarzy na Reddicie",
|
"View more comments on Reddit": "Wyświetl więcej komentarzy na Reddicie",
|
||||||
@@ -145,112 +157,112 @@
|
|||||||
"Invalid token": "Niepoprawny token",
|
"Invalid token": "Niepoprawny token",
|
||||||
"Invalid user": "Niepoprawny użytkownik",
|
"Invalid user": "Niepoprawny użytkownik",
|
||||||
"Token is expired, please try again": "Token wygasł, spróbuj ponownie",
|
"Token is expired, please try again": "Token wygasł, spróbuj ponownie",
|
||||||
"English": "",
|
"English": "angielski",
|
||||||
"English (auto-generated)": "",
|
"English (auto-generated)": "angielski (automatycznie generowane)",
|
||||||
"Afrikaans": "",
|
"Afrikaans": "afrykanerski",
|
||||||
"Albanian": "",
|
"Albanian": "albański",
|
||||||
"Amharic": "",
|
"Amharic": "amharski",
|
||||||
"Arabic": "",
|
"Arabic": "arabski",
|
||||||
"Armenian": "",
|
"Armenian": "armeński",
|
||||||
"Azerbaijani": "",
|
"Azerbaijani": "azerski",
|
||||||
"Bangla": "",
|
"Bangla": "bengalski",
|
||||||
"Basque": "",
|
"Basque": "baskijski",
|
||||||
"Belarusian": "",
|
"Belarusian": "białoruski",
|
||||||
"Bosnian": "",
|
"Bosnian": "bośniacki",
|
||||||
"Bulgarian": "",
|
"Bulgarian": "bułgarski",
|
||||||
"Burmese": "",
|
"Burmese": "birmański",
|
||||||
"Catalan": "",
|
"Catalan": "kataloński",
|
||||||
"Cebuano": "",
|
"Cebuano": "cebuański",
|
||||||
"Chinese (Simplified)": "",
|
"Chinese (Simplified)": "chiński (uproszczony)",
|
||||||
"Chinese (Traditional)": "",
|
"Chinese (Traditional)": "chiński (tradycyjny)",
|
||||||
"Corsican": "",
|
"Corsican": "korsykański",
|
||||||
"Croatian": "",
|
"Croatian": "chorwacki",
|
||||||
"Czech": "",
|
"Czech": "czeski",
|
||||||
"Danish": "",
|
"Danish": "duński",
|
||||||
"Dutch": "",
|
"Dutch": "holenderski",
|
||||||
"Esperanto": "",
|
"Esperanto": "esperanto",
|
||||||
"Estonian": "",
|
"Estonian": "estoński",
|
||||||
"Filipino": "",
|
"Filipino": "filipiński",
|
||||||
"Finnish": "",
|
"Finnish": "fiński",
|
||||||
"French": "",
|
"French": "francuski",
|
||||||
"Galician": "",
|
"Galician": "galicyjski",
|
||||||
"Georgian": "",
|
"Georgian": "gruziński",
|
||||||
"German": "",
|
"German": "niemiecki",
|
||||||
"Greek": "",
|
"Greek": "grecki",
|
||||||
"Gujarati": "",
|
"Gujarati": "gudźarati",
|
||||||
"Haitian Creole": "",
|
"Haitian Creole": "kreolski haitański",
|
||||||
"Hausa": "",
|
"Hausa": "hausa",
|
||||||
"Hawaiian": "",
|
"Hawaiian": "hawajski",
|
||||||
"Hebrew": "",
|
"Hebrew": "hebrajski",
|
||||||
"Hindi": "",
|
"Hindi": "hindi",
|
||||||
"Hmong": "",
|
"Hmong": "hmong",
|
||||||
"Hungarian": "",
|
"Hungarian": "węgierski",
|
||||||
"Icelandic": "",
|
"Icelandic": "islandzki",
|
||||||
"Igbo": "",
|
"Igbo": "ibo",
|
||||||
"Indonesian": "",
|
"Indonesian": "indonezyjski",
|
||||||
"Irish": "",
|
"Irish": "irlandzki",
|
||||||
"Italian": "",
|
"Italian": "włoski",
|
||||||
"Japanese": "",
|
"Japanese": "japoński",
|
||||||
"Javanese": "",
|
"Javanese": "jawajski",
|
||||||
"Kannada": "",
|
"Kannada": "kannada",
|
||||||
"Kazakh": "",
|
"Kazakh": "kazachski",
|
||||||
"Khmer": "",
|
"Khmer": "khmerski",
|
||||||
"Korean": "",
|
"Korean": "koreański",
|
||||||
"Kurdish": "",
|
"Kurdish": "kurdyjski",
|
||||||
"Kyrgyz": "",
|
"Kyrgyz": "kirgiski",
|
||||||
"Lao": "",
|
"Lao": "laotański",
|
||||||
"Latin": "",
|
"Latin": "łaciński",
|
||||||
"Latvian": "",
|
"Latvian": "łotewski",
|
||||||
"Lithuanian": "",
|
"Lithuanian": "litewski",
|
||||||
"Luxembourgish": "",
|
"Luxembourgish": "luksemburski",
|
||||||
"Macedonian": "",
|
"Macedonian": "macedoński",
|
||||||
"Malagasy": "",
|
"Malagasy": "malgaski",
|
||||||
"Malay": "",
|
"Malay": "malajski",
|
||||||
"Malayalam": "",
|
"Malayalam": "malajalam",
|
||||||
"Maltese": "",
|
"Maltese": "maltański",
|
||||||
"Maori": "",
|
"Maori": "maoryski",
|
||||||
"Marathi": "",
|
"Marathi": "marathi",
|
||||||
"Mongolian": "",
|
"Mongolian": "mongolski",
|
||||||
"Nepali": "",
|
"Nepali": "nepalski",
|
||||||
"Norwegian": "",
|
"Norwegian": "norweski",
|
||||||
"Nyanja": "",
|
"Nyanja": "njandża",
|
||||||
"Pashto": "",
|
"Pashto": "paszto",
|
||||||
"Persian": "",
|
"Persian": "perski",
|
||||||
"Polish": "",
|
"Polish": "polski",
|
||||||
"Portuguese": "",
|
"Portuguese": "portugalski",
|
||||||
"Punjabi": "",
|
"Punjabi": "pendżabski",
|
||||||
"Romanian": "",
|
"Romanian": "rumuński",
|
||||||
"Russian": "",
|
"Russian": "rosyjski",
|
||||||
"Samoan": "",
|
"Samoan": "samoański",
|
||||||
"Scottish Gaelic": "",
|
"Scottish Gaelic": "gaelicki szkocki",
|
||||||
"Serbian": "",
|
"Serbian": "serbski",
|
||||||
"Shona": "",
|
"Shona": "shona",
|
||||||
"Sindhi": "",
|
"Sindhi": "sindhi",
|
||||||
"Sinhala": "",
|
"Sinhala": "syngaleski",
|
||||||
"Slovak": "",
|
"Slovak": "słowacki",
|
||||||
"Slovenian": "",
|
"Slovenian": "słoweński",
|
||||||
"Somali": "",
|
"Somali": "somalijski",
|
||||||
"Southern Sotho": "",
|
"Southern Sotho": "sotho południowy",
|
||||||
"Spanish": "",
|
"Spanish": "hiszpański",
|
||||||
"Spanish (Latin America)": "",
|
"Spanish (Latin America)": "hiszpański (ameryka łacińska)",
|
||||||
"Sundanese": "",
|
"Sundanese": "sundajski",
|
||||||
"Swahili": "",
|
"Swahili": "suahili",
|
||||||
"Swedish": "",
|
"Swedish": "szwedzki",
|
||||||
"Tajik": "",
|
"Tajik": "tadżycki",
|
||||||
"Tamil": "",
|
"Tamil": "tamilski",
|
||||||
"Telugu": "",
|
"Telugu": "telugu",
|
||||||
"Thai": "",
|
"Thai": "tajski",
|
||||||
"Turkish": "",
|
"Turkish": "turecki",
|
||||||
"Ukrainian": "",
|
"Ukrainian": "ukraiński",
|
||||||
"Urdu": "",
|
"Urdu": "urdu",
|
||||||
"Uzbek": "",
|
"Uzbek": "uzbecki",
|
||||||
"Vietnamese": "",
|
"Vietnamese": "wietnamski",
|
||||||
"Welsh": "",
|
"Welsh": "walijski",
|
||||||
"Western Frisian": "",
|
"Western Frisian": "zachodniofryzyjski",
|
||||||
"Xhosa": "",
|
"Xhosa": "xhosa",
|
||||||
"Yiddish": "",
|
"Yiddish": "jidysz",
|
||||||
"Yoruba": "",
|
"Yoruba": "joruba",
|
||||||
"Zulu": "",
|
"Zulu": "zuluski",
|
||||||
"`x` years": "`x` lat",
|
"`x` years": "`x` lat",
|
||||||
"`x` months": "`x` miesięcy",
|
"`x` months": "`x` miesięcy",
|
||||||
"`x` weeks": "`x` tygodni",
|
"`x` weeks": "`x` tygodni",
|
||||||
@@ -258,10 +270,26 @@
|
|||||||
"`x` hours": "`x` godzin",
|
"`x` hours": "`x` godzin",
|
||||||
"`x` minutes": "`x` minut",
|
"`x` minutes": "`x` minut",
|
||||||
"`x` seconds": "`x` sekund",
|
"`x` seconds": "`x` sekund",
|
||||||
"Fallback comments: ": "",
|
"Fallback comments: ": "Zastępcze komentarze: ",
|
||||||
"Popular": "",
|
"Popular": "Popularne",
|
||||||
"Top": "",
|
"Top": "Najczęściej oglądane",
|
||||||
"About": "",
|
"About": "Informacje",
|
||||||
"Rating: ": "",
|
"Rating: ": "Ocena: ",
|
||||||
"Language: ": ""
|
"Language: ": "Język: ",
|
||||||
|
"Default": "Domyślnie",
|
||||||
|
"Music": "Muzyka",
|
||||||
|
"Gaming": "Gry",
|
||||||
|
"News": "Wiadomości",
|
||||||
|
"Movies": "Filmy",
|
||||||
|
"Download": "Pobierz",
|
||||||
|
"Download as: ": "Pobierz jako: ",
|
||||||
|
"%A %B %-d, %Y": "",
|
||||||
|
"(edited)": "(edytowany)",
|
||||||
|
"Youtube permalink of the comment": "Odnośnik bezpośredni do komentarza na YouTube",
|
||||||
|
"`x` marked it with a ❤": "'x' oznaczonych ❤",
|
||||||
|
"Audio mode": "Tryb audio",
|
||||||
|
"Video mode": "Tryb wideo",
|
||||||
|
"Videos": "Filmy",
|
||||||
|
"Playlists": "Playlisty",
|
||||||
|
"Current version: ": "Aktualna wersja: "
|
||||||
}
|
}
|
||||||
|
|||||||
246
locales/ru.json
246
locales/ru.json
@@ -10,8 +10,9 @@
|
|||||||
"newest": "новые",
|
"newest": "новые",
|
||||||
"oldest": "старые",
|
"oldest": "старые",
|
||||||
"popular": "популярные",
|
"popular": "популярные",
|
||||||
"Preview page": "Предварительный просмотр",
|
"last": "недавно обновленные",
|
||||||
"Next page": "Следующая страница",
|
"Next page": "Следующая страница",
|
||||||
|
"Previous page": "Предыдущая страница",
|
||||||
"Clear watch history?": "Очистить историю просмотров?",
|
"Clear watch history?": "Очистить историю просмотров?",
|
||||||
"Yes": "Да",
|
"Yes": "Да",
|
||||||
"No": "Нет",
|
"No": "Нет",
|
||||||
@@ -28,7 +29,6 @@
|
|||||||
"Export data as JSON": "Экспортировать данные в JSON",
|
"Export data as JSON": "Экспортировать данные в JSON",
|
||||||
"Delete account?": "Удалить аккаунт?",
|
"Delete account?": "Удалить аккаунт?",
|
||||||
"History": "История",
|
"History": "История",
|
||||||
"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": "источник",
|
||||||
@@ -50,6 +50,7 @@
|
|||||||
"Autoplay: ": "Автовоспроизведение: ",
|
"Autoplay: ": "Автовоспроизведение: ",
|
||||||
"Autoplay next video: ": "Автовоспроизведение следующего видео: ",
|
"Autoplay next video: ": "Автовоспроизведение следующего видео: ",
|
||||||
"Listen by default: ": "Режим \"только аудио\" по-умолчанию: ",
|
"Listen by default: ": "Режим \"только аудио\" по-умолчанию: ",
|
||||||
|
"Proxy videos? ": "Проксировать видео? ",
|
||||||
"Default speed: ": "Скорость по-умолчанию: ",
|
"Default speed: ": "Скорость по-умолчанию: ",
|
||||||
"Preferred video quality: ": "Предпочтительное качество видео: ",
|
"Preferred video quality: ": "Предпочтительное качество видео: ",
|
||||||
"Player volume: ": "Громкость воспроизведения: ",
|
"Player volume: ": "Громкость воспроизведения: ",
|
||||||
@@ -82,6 +83,14 @@
|
|||||||
"Manage subscriptions": "Управление подписками",
|
"Manage subscriptions": "Управление подписками",
|
||||||
"Watch history": "История просмотров",
|
"Watch history": "История просмотров",
|
||||||
"Delete account": "Удалить аккаунт",
|
"Delete account": "Удалить аккаунт",
|
||||||
|
"Administrator preferences": "Настройки администратора",
|
||||||
|
"Default homepage: ": "Главная страница по умолчанию: ",
|
||||||
|
"Feed menu: ": "Меню ленты: ",
|
||||||
|
"Top enabled? ": "Включить ТОП? ",
|
||||||
|
"CAPTCHA enabled? ": "Включить капчу? ",
|
||||||
|
"Login enabled? ": "Включить логин? ",
|
||||||
|
"Registration enabled? ": "Включить регистрацию? ",
|
||||||
|
"Report statistics? ": "Отображать статистику? ",
|
||||||
"Save preferences": "Сохранить настройки",
|
"Save preferences": "Сохранить настройки",
|
||||||
"Subscription manager": "Менеджер подписок",
|
"Subscription manager": "Менеджер подписок",
|
||||||
"`x` subscriptions": "`x` подписок",
|
"`x` subscriptions": "`x` подписок",
|
||||||
@@ -93,12 +102,10 @@
|
|||||||
"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: ",
|
|
||||||
"Patreon: ": "Patreon: ",
|
|
||||||
"BTC: ": "BTC: ",
|
|
||||||
"BCH: ": "BCH: ",
|
|
||||||
"View JavaScript license information.": "Посмотреть лицензии JavaScript кода.",
|
"View JavaScript license information.": "Посмотреть лицензии JavaScript кода.",
|
||||||
|
"View privacy policy.": "См. политику конфиденциальности.",
|
||||||
"Trending": "В тренде",
|
"Trending": "В тренде",
|
||||||
|
"Unlisted": "Доступно по ссылке",
|
||||||
"Watch video on Youtube": "Смотреть на YouTube",
|
"Watch video on Youtube": "Смотреть на YouTube",
|
||||||
"Genre: ": "Жанр: ",
|
"Genre: ": "Жанр: ",
|
||||||
"License: ": "Лицензия: ",
|
"License: ": "Лицензия: ",
|
||||||
@@ -108,6 +115,7 @@
|
|||||||
"Whitelisted regions: ": "Доступно для: ",
|
"Whitelisted regions: ": "Доступно для: ",
|
||||||
"Blacklisted regions: ": "Недоступно для: ",
|
"Blacklisted regions: ": "Недоступно для: ",
|
||||||
"Shared `x`": "Опубликовано `x`",
|
"Shared `x`": "Опубликовано `x`",
|
||||||
|
"Premieres in `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",
|
||||||
@@ -153,110 +161,110 @@
|
|||||||
"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` недель",
|
||||||
@@ -269,5 +277,21 @@
|
|||||||
"Top": "Топ",
|
"Top": "Топ",
|
||||||
"About": "О сайте",
|
"About": "О сайте",
|
||||||
"Rating: ": "Рейтинг: ",
|
"Rating: ": "Рейтинг: ",
|
||||||
"Language: ": "Язык: "
|
"Language: ": "Язык: ",
|
||||||
|
"Default": "По-умолчанию",
|
||||||
|
"Music": "Музыка",
|
||||||
|
"Gaming": "Игры",
|
||||||
|
"News": "Новости",
|
||||||
|
"Movies": "Фильмы",
|
||||||
|
"Download": "Скачать",
|
||||||
|
"Download as: ": "Скачать как: ",
|
||||||
|
"%A %B %-d, %Y": "%-d %B %Y, %A",
|
||||||
|
"(edited)": "(изменено)",
|
||||||
|
"Youtube permalink of the comment": "Прямая ссылка на YouTube",
|
||||||
|
"`x` marked it with a ❤": "❤ от автора канала \"`x`\"",
|
||||||
|
"Audio mode": "Аудио режим",
|
||||||
|
"Video mode": "Видео режим",
|
||||||
|
"Videos": "Видео",
|
||||||
|
"Playlists": "Плейлисты",
|
||||||
|
"Current version: ": "Текущая версия: "
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
screenshots/01_player.png
Normal file
BIN
screenshots/01_player.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 889 KiB |
BIN
screenshots/02_preferences.png
Normal file
BIN
screenshots/02_preferences.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 62 KiB |
BIN
screenshots/03_subscriptions.png
Normal file
BIN
screenshots/03_subscriptions.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 536 KiB |
BIN
screenshots/04_description.png
Normal file
BIN
screenshots/04_description.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 302 KiB |
BIN
screenshots/05_preferences.png
Normal file
BIN
screenshots/05_preferences.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 61 KiB |
BIN
screenshots/06_subscriptions.png
Normal file
BIN
screenshots/06_subscriptions.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 68 KiB |
10
setup.sh
10
setup.sh
@@ -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
|
|
||||||
@@ -1,24 +1,21 @@
|
|||||||
name: invidious
|
name: invidious
|
||||||
version: 0.12.0
|
version: 0.16.0
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- Omar Roth <omarroth@hotmail.com>
|
- Omar Roth <omarroth@protonmail.com>
|
||||||
|
|
||||||
targets:
|
targets:
|
||||||
invidious:
|
invidious:
|
||||||
main: src/invidious.cr
|
main: src/invidious.cr
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
detect_language:
|
|
||||||
github: detectlanguage/detectlanguage-crystal
|
|
||||||
kemal:
|
kemal:
|
||||||
github: kemalcr/kemal
|
github: kemalcr/kemal
|
||||||
commit: afd17fc
|
|
||||||
pg:
|
pg:
|
||||||
github: will/crystal-pg
|
github: will/crystal-pg
|
||||||
sqlite3:
|
sqlite3:
|
||||||
github: crystal-lang/crystal-sqlite3
|
github: crystal-lang/crystal-sqlite3
|
||||||
|
|
||||||
crystal: 0.27.0
|
crystal: 0.27.2
|
||||||
|
|
||||||
license: AGPLv3
|
license: AGPLv3
|
||||||
|
|||||||
84
spec/helpers_spec.cr
Normal file
84
spec/helpers_spec.cr
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
require "kemal"
|
||||||
|
require "pg"
|
||||||
|
require "spec"
|
||||||
|
require "yaml"
|
||||||
|
require "../src/invidious/helpers/*"
|
||||||
|
require "../src/invidious/channels"
|
||||||
|
require "../src/invidious/comments"
|
||||||
|
require "../src/invidious/playlists"
|
||||||
|
require "../src/invidious/search"
|
||||||
|
require "../src/invidious/users"
|
||||||
|
|
||||||
|
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", page: 20, sort_by: "popular").should eq("/browse_ajax?continuation=4qmFsgJAEhhVQy05LWt5VFc4WmtaTkRIUUo2Rmdwd1EaJEVnWjJhV1JsYjNNd0FqZ0JZQUZxQUxnQkFDQUFlZ0l5TUJnQg%3D%3D&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
|
||||||
|
|
||||||
|
describe "#produce_comment_continuation" do
|
||||||
|
it "correctly produces a continuation token for comments" do
|
||||||
|
produce_comment_continuation("_cE8xSu6swE", "ADSJ_i2qvJeFtL0htmS5_K5Ctj3eGFVBMWL9Wd42o3kmUL6_mAzdLp85-liQZL0mYr_16BhaggUqX652Sv9JqV6VXinShSP-ZT6rL4NolPBaPXVtJsO5_rA_qE3GubAuLFw9uzIIXU2-HnpXbdgPLWTFavfX206hqWmmpHwUOrmxQV_OX6tYkM3ux3rPAKCDrT8eWL7MU3bLiNcnbgkW8o0h8KYLL_8BPa8LcHbTv8pAoNkjerlX1x7K4pqxaXPoyz89qNlnh6rRx6AXgAzzoHH1dmcyQ8CIBeOHg-m4i8ZxdX4dP88XWrIFg-jJGhpGP8JUMDgZgavxVx225hUEYZMyrLGler5em4FgbG62YWC51moLDLeYEA").should eq("EiYSC19jRTh4U3U2c3dFwAEByAEB4AEBogINKP___________wFAABgGMowDCvYCQURTSl9pMnF2SmVGdEwwaHRtUzVfSzVDdGozZUdGVkJNV0w5V2Q0Mm8za21VTDZfbUF6ZExwODUtbGlRWkwwbVlyXzE2QmhhZ2dVcVg2NTJTdjlKcVY2VlhpblNoU1AtWlQ2ckw0Tm9sUEJhUFhWdEpzTzVfckFfcUUzR3ViQXVMRnc5dXpJSVhVMi1IbnBYYmRnUExXVEZhdmZYMjA2aHFXbW1wSHdVT3JteFFWX09YNnRZa00zdXgzclBBS0NEclQ4ZVdMN01VM2JMaU5jbmJna1c4bzBoOEtZTExfOEJQYThMY0hiVHY4cEFvTmtqZXJsWDF4N0s0cHF4YVhQb3l6ODlxTmxuaDZyUng2QVhnQXp6b0hIMWRtY3lROENJQmVPSGctbTRpOFp4ZFg0ZFA4OFhXcklGZy1qSkdocEdQOEpVTURnWmdhdnhWeDIyNWhVRVlaTXlyTEdsZXI1ZW00RmdiRzYyWVdDNTFtb0xETGVZRUEiDyILX2NFOHhTdTZzd0UwACgU")
|
||||||
|
|
||||||
|
produce_comment_continuation("_cE8xSu6swE", "ADSJ_i1yz21HI4xrtsYXVC-2_kfZ6kx1yjYQumXAAxqH3CAd7ZxKxfLdZS1__fqhCtOASRbbpSBGH_tH1J96Dxux-Qfjk-lUbupMqv08Q3aHzGu7p70VoUMHhI2-GoJpnbpmcOxkGzeIuenRS_ym2Y8fkDowhqLPFgsS0n4djnZ2UmC17F3Ch3N1S1UYf1ZVOc991qOC1iW9kJDzyvRQTWCPsJUPneSaAKW-Rr97pdesOkR4i8cNvHZRnQKe2HEfsvlJOb2C3lF1dJBfJeNfnQYeh5hv6_fZN7bt3-JL1Xk3Qc9NXNxmmbDpwAC_yFR8dthFfUJdyIO9Nu1D79MLYeR-H5HxqUJokkJiGIz4lTE_CXXbhAI").should eq("EiYSC19jRTh4U3U2c3dFwAEByAEB4AEBogINKP___________wFAABgGMokDCvMCQURTSl9pMXl6MjFISTR4cnRzWVhWQy0yX2tmWjZreDF5allRdW1YQUF4cUgzQ0FkN1p4S3hmTGRaUzFfX2ZxaEN0T0FTUmJicFNCR0hfdEgxSjk2RHh1eC1RZmprLWxVYnVwTXF2MDhRM2FIekd1N3A3MFZvVU1IaEkyLUdvSnBuYnBtY094a0d6ZUl1ZW5SU195bTJZOGZrRG93aHFMUEZnc1MwbjRkam5aMlVtQzE3RjNDaDNOMVMxVVlmMVpWT2M5OTFxT0MxaVc5a0pEenl2UlFUV0NQc0pVUG5lU2FBS1ctUnI5N3BkZXNPa1I0aThjTnZIWlJuUUtlMkhFZnN2bEpPYjJDM2xGMWRKQmZKZU5mblFZZWg1aHY2X2ZaTjdidDMtSkwxWGszUWM5TlhOeG1tYkRwd0FDX3lGUjhkdGhGZlVKZHlJTzlOdTFENzlNTFllUi1INUh4cVVKb2trSmlHSXo0bFRFX0NYWGJoQUkiDyILX2NFOHhTdTZzd0UwACgU")
|
||||||
|
|
||||||
|
produce_comment_continuation("29-q7YnyUmY", "").should eq("EiYSCzI5LXE3WW55VW1ZwAEByAEB4AEBogINKP___________wFAABgGMhMiDyILMjktcTdZbnlVbVkwAHgC")
|
||||||
|
|
||||||
|
produce_comment_continuation("CvFH_6DNRCY", "").should eq("EiYSC0N2RkhfNkROUkNZwAEByAEB4AEBogINKP___________wFAABgGMhMiDyILQ3ZGSF82RE5SQ1kwAHgC")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
describe "#produce_comment_reply_continuation" do
|
||||||
|
it "correctly produces a continuation token for replies to a given comment" do
|
||||||
|
produce_comment_reply_continuation("cIHQWOoJeag", "UCq6VFHwMzcMXbuKyG7SQYIg", "Ugx1IP_wGVv3WtGWcdV4AaABAg").should eq("EiYSC2NJSFFXT29KZWFnwAEByAEB4AEBogINKP___________wFAABgGMk0aSxIaVWd4MUlQX3dHVnYzV3RHV2NkVjRBYUFCQWciAggAKhhVQ3E2VkZId016Y01YYnVLeUc3U1FZSWcyC2NJSFFXT29KZWFnQAFICg%3D%3D")
|
||||||
|
|
||||||
|
produce_comment_reply_continuation("cIHQWOoJeag", "UCq6VFHwMzcMXbuKyG7SQYIg", "Ugza62y_TlmTu9o2RfF4AaABAg").should eq("EiYSC2NJSFFXT29KZWFnwAEByAEB4AEBogINKP___________wFAABgGMk0aSxIaVWd6YTYyeV9UbG1UdTlvMlJmRjRBYUFCQWciAggAKhhVQ3E2VkZId016Y01YYnVLeUc3U1FZSWcyC2NJSFFXT29KZWFnQAFICg%3D%3D")
|
||||||
|
|
||||||
|
produce_comment_reply_continuation("_cE8xSu6swE", "UC1AZY74-dGVPe6bfxFwwEMg", "UgyBUaRGHB9Jmt1dsUZ4AaABAg").should eq("EiYSC19jRTh4U3U2c3dFwAEByAEB4AEBogINKP___________wFAABgGMk0aSxIaVWd5QlVhUkdIQjlKbXQxZHNVWjRBYUFCQWciAggAKhhVQzFBWlk3NC1kR1ZQZTZiZnhGd3dFTWcyC19jRTh4U3U2c3dFQAFICg%3D%3D")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
1885
src/invidious.cr
1885
src/invidious.cr
File diff suppressed because it is too large
Load Diff
@@ -1,47 +1,59 @@
|
|||||||
class InvidiousChannel
|
struct InvidiousChannel
|
||||||
add_mapping({
|
db_mapping({
|
||||||
id: String,
|
id: String,
|
||||||
author: String,
|
author: String,
|
||||||
updated: Time,
|
updated: Time,
|
||||||
|
deleted: Bool,
|
||||||
|
subscribed: Time?,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
class ChannelVideo
|
struct ChannelVideo
|
||||||
add_mapping({
|
db_mapping({
|
||||||
id: String,
|
id: String,
|
||||||
title: String,
|
title: String,
|
||||||
published: Time,
|
published: Time,
|
||||||
updated: Time,
|
updated: Time,
|
||||||
ucid: String,
|
ucid: String,
|
||||||
author: String,
|
author: String,
|
||||||
length_seconds: {
|
length_seconds: {type: Int32, default: 0},
|
||||||
type: Int32,
|
live_now: {type: Bool, default: false},
|
||||||
default: 0,
|
premiere_timestamp: {type: Time?, default: nil},
|
||||||
},
|
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_batch_channels(channels, db, refresh = false, pull_all_videos = true, max_threads = 10)
|
def get_batch_channels(channels, db, refresh = false, pull_all_videos = true, max_threads = 10)
|
||||||
active_threads = 0
|
finished_channel = Channel(String | Nil).new
|
||||||
active_channel = Channel(String | Nil).new
|
|
||||||
|
|
||||||
final = [] of String
|
spawn do
|
||||||
channels.map do |ucid|
|
active_threads = 0
|
||||||
if active_threads >= max_threads
|
active_channel = Channel(Nil).new
|
||||||
if response = active_channel.receive
|
|
||||||
|
channels.each do |ucid|
|
||||||
|
if active_threads >= max_threads
|
||||||
|
active_channel.receive
|
||||||
active_threads -= 1
|
active_threads -= 1
|
||||||
final << response
|
end
|
||||||
|
|
||||||
|
active_threads += 1
|
||||||
|
spawn do
|
||||||
|
begin
|
||||||
|
get_channel(ucid, db, refresh, pull_all_videos)
|
||||||
|
finished_channel.send(ucid)
|
||||||
|
rescue ex
|
||||||
|
finished_channel.send(nil)
|
||||||
|
ensure
|
||||||
|
active_channel.send(nil)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
active_threads += 1
|
final = [] of String
|
||||||
spawn do
|
channels.size.times do
|
||||||
begin
|
ucid = finished_channel.receive
|
||||||
get_channel(ucid, db, refresh, pull_all_videos)
|
if ucid
|
||||||
active_channel.send(ucid)
|
final << ucid
|
||||||
rescue ex
|
|
||||||
active_channel.send(nil)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -49,13 +61,11 @@ def get_batch_channels(channels, db, refresh = false, pull_all_videos = true, ma
|
|||||||
end
|
end
|
||||||
|
|
||||||
def get_channel(id, db, refresh = true, pull_all_videos = true)
|
def get_channel(id, db, refresh = true, pull_all_videos = true)
|
||||||
client = make_client(YT_URL)
|
|
||||||
|
|
||||||
if db.query_one?("SELECT EXISTS (SELECT true FROM channels WHERE id = $1)", id, as: Bool)
|
if db.query_one?("SELECT EXISTS (SELECT true FROM channels WHERE id = $1)", id, as: Bool)
|
||||||
channel = db.query_one("SELECT * FROM channels WHERE id = $1", id, as: InvidiousChannel)
|
channel = db.query_one("SELECT * FROM channels WHERE id = $1", id, as: InvidiousChannel)
|
||||||
|
|
||||||
if refresh && Time.now - channel.updated > 10.minutes
|
if refresh && Time.now - channel.updated > 10.minutes
|
||||||
channel = fetch_channel(id, client, db, pull_all_videos: pull_all_videos)
|
channel = fetch_channel(id, db, pull_all_videos: pull_all_videos)
|
||||||
channel_array = channel.to_a
|
channel_array = channel.to_a
|
||||||
args = arg_array(channel_array)
|
args = arg_array(channel_array)
|
||||||
|
|
||||||
@@ -63,7 +73,7 @@ def get_channel(id, db, refresh = true, pull_all_videos = true)
|
|||||||
ON CONFLICT (id) DO UPDATE SET author = $2, updated = $3", channel_array)
|
ON CONFLICT (id) DO UPDATE SET author = $2, updated = $3", channel_array)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
channel = fetch_channel(id, client, db, pull_all_videos: pull_all_videos)
|
channel = fetch_channel(id, db, pull_all_videos: pull_all_videos)
|
||||||
channel_array = channel.to_a
|
channel_array = channel.to_a
|
||||||
args = arg_array(channel_array)
|
args = arg_array(channel_array)
|
||||||
|
|
||||||
@@ -73,7 +83,9 @@ def get_channel(id, db, refresh = true, pull_all_videos = true)
|
|||||||
return channel
|
return channel
|
||||||
end
|
end
|
||||||
|
|
||||||
def fetch_channel(ucid, client, db, pull_all_videos = true, locale = nil)
|
def fetch_channel(ucid, db, pull_all_videos = true, locale = nil)
|
||||||
|
client = make_client(YT_URL)
|
||||||
|
|
||||||
rss = client.get("/feeds/videos.xml?channel_id=#{ucid}").body
|
rss = client.get("/feeds/videos.xml?channel_id=#{ucid}").body
|
||||||
rss = XML.parse_html(rss)
|
rss = XML.parse_html(rss)
|
||||||
|
|
||||||
@@ -113,15 +125,32 @@ def fetch_channel(ucid, client, db, pull_all_videos = true, locale = nil)
|
|||||||
rss.xpath_nodes("//feed/entry").each do |entry|
|
rss.xpath_nodes("//feed/entry").each do |entry|
|
||||||
video_id = entry.xpath_node("videoid").not_nil!.content
|
video_id = entry.xpath_node("videoid").not_nil!.content
|
||||||
title = entry.xpath_node("title").not_nil!.content
|
title = entry.xpath_node("title").not_nil!.content
|
||||||
published = Time.parse(entry.xpath_node("published").not_nil!.content, "%FT%X%z", Time::Location.local)
|
published = Time.parse_rfc3339(entry.xpath_node("published").not_nil!.content)
|
||||||
updated = Time.parse(entry.xpath_node("updated").not_nil!.content, "%FT%X%z", Time::Location.local)
|
updated = Time.parse_rfc3339(entry.xpath_node("updated").not_nil!.content)
|
||||||
author = entry.xpath_node("author/name").not_nil!.content
|
author = entry.xpath_node("author/name").not_nil!.content
|
||||||
ucid = entry.xpath_node("channelid").not_nil!.content
|
ucid = entry.xpath_node("channelid").not_nil!.content
|
||||||
|
|
||||||
length_seconds = videos.select { |video| video.id == video_id }[0]?.try &.length_seconds
|
channel_video = videos.select { |video| video.id == video_id }[0]?
|
||||||
|
|
||||||
|
length_seconds = channel_video.try &.length_seconds
|
||||||
length_seconds ||= 0
|
length_seconds ||= 0
|
||||||
|
|
||||||
video = ChannelVideo.new(video_id, title, published, Time.now, ucid, author, length_seconds)
|
live_now = channel_video.try &.live_now
|
||||||
|
live_now ||= false
|
||||||
|
|
||||||
|
premiere_timestamp = channel_video.try &.premiere_timestamp
|
||||||
|
|
||||||
|
video = ChannelVideo.new(
|
||||||
|
video_id,
|
||||||
|
title,
|
||||||
|
published,
|
||||||
|
Time.now,
|
||||||
|
ucid,
|
||||||
|
author,
|
||||||
|
length_seconds,
|
||||||
|
live_now,
|
||||||
|
premiere_timestamp
|
||||||
|
)
|
||||||
|
|
||||||
db.exec("UPDATE users SET notifications = notifications || $1 \
|
db.exec("UPDATE users SET notifications = notifications || $1 \
|
||||||
WHERE updated < $2 AND $3 = ANY(subscriptions) AND $1 <> ALL(notifications)", video.id, video.published, ucid)
|
WHERE updated < $2 AND $3 = ANY(subscriptions) AND $1 <> ALL(notifications)", video.id, video.published, ucid)
|
||||||
@@ -129,9 +158,12 @@ def fetch_channel(ucid, client, db, pull_all_videos = true, locale = nil)
|
|||||||
video_array = video.to_a
|
video_array = video.to_a
|
||||||
args = arg_array(video_array)
|
args = arg_array(video_array)
|
||||||
|
|
||||||
|
# We don't include the 'premire_timestamp' here because channel pages don't include them,
|
||||||
|
# meaning the above timestamp is always null
|
||||||
db.exec("INSERT INTO channel_videos VALUES (#{args}) \
|
db.exec("INSERT INTO channel_videos VALUES (#{args}) \
|
||||||
ON CONFLICT (id) DO UPDATE SET title = $2, published = $3, \
|
ON CONFLICT (id) DO UPDATE SET title = $2, published = $3, \
|
||||||
updated = $4, ucid = $5, author = $6, length_seconds = $7", video_array)
|
updated = $4, ucid = $5, author = $6, length_seconds = $7, \
|
||||||
|
live_now = $8", video_array)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
page = 1
|
page = 1
|
||||||
@@ -158,7 +190,17 @@ def fetch_channel(ucid, client, db, pull_all_videos = true, locale = nil)
|
|||||||
end
|
end
|
||||||
|
|
||||||
count = nodeset.size
|
count = nodeset.size
|
||||||
videos = videos.map { |video| ChannelVideo.new(video.id, video.title, video.published, Time.now, video.ucid, video.author, video.length_seconds) }
|
videos = videos.map { |video| ChannelVideo.new(
|
||||||
|
video.id,
|
||||||
|
video.title,
|
||||||
|
video.published,
|
||||||
|
Time.now,
|
||||||
|
video.ucid,
|
||||||
|
video.author,
|
||||||
|
video.length_seconds,
|
||||||
|
video.live_now,
|
||||||
|
video.premiere_timestamp
|
||||||
|
) }
|
||||||
|
|
||||||
videos.each do |video|
|
videos.each do |video|
|
||||||
ids << video.id
|
ids << video.id
|
||||||
@@ -171,8 +213,12 @@ def fetch_channel(ucid, client, db, pull_all_videos = true, locale = nil)
|
|||||||
video_array = video.to_a
|
video_array = video.to_a
|
||||||
args = arg_array(video_array)
|
args = arg_array(video_array)
|
||||||
|
|
||||||
db.exec("INSERT INTO channel_videos VALUES (#{args}) ON CONFLICT (id) DO UPDATE SET title = $2, \
|
# We don't include the 'premire_timestamp' here because channel pages don't include them,
|
||||||
published = $3, updated = $4, ucid = $5, author = $6, length_seconds = $7", video_array)
|
# meaning the above timestamp is always null
|
||||||
|
db.exec("INSERT INTO channel_videos VALUES (#{args}) \
|
||||||
|
ON CONFLICT (id) DO UPDATE SET title = $2, published = $3, \
|
||||||
|
updated = $4, ucid = $5, author = $6, length_seconds = $7, \
|
||||||
|
live_now = $8", video_array)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -187,11 +233,90 @@ def fetch_channel(ucid, client, db, pull_all_videos = true, locale = nil)
|
|||||||
db.exec("DELETE FROM channel_videos * WHERE NOT id = ANY ('{#{ids.map { |id| %("#{id}") }.join(",")}}') AND ucid = $1", ucid)
|
db.exec("DELETE FROM channel_videos * WHERE NOT id = ANY ('{#{ids.map { |id| %("#{id}") }.join(",")}}') AND ucid = $1", ucid)
|
||||||
end
|
end
|
||||||
|
|
||||||
channel = InvidiousChannel.new(ucid, author, Time.now)
|
channel = InvidiousChannel.new(ucid, author, Time.now, false, nil)
|
||||||
|
|
||||||
return channel
|
return channel
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def subscribe_pubsub(ucid, key, config)
|
||||||
|
client = make_client(PUBSUB_URL)
|
||||||
|
time = Time.now.to_unix.to_s
|
||||||
|
nonce = Random::Secure.hex(4)
|
||||||
|
signature = "#{time}:#{nonce}"
|
||||||
|
|
||||||
|
host_url = make_host_url(config, Kemal.config)
|
||||||
|
|
||||||
|
body = {
|
||||||
|
"hub.callback" => "#{host_url}/feed/webhook/v1:#{time}:#{nonce}:#{OpenSSL::HMAC.hexdigest(:sha1, key, signature)}",
|
||||||
|
"hub.topic" => "https://www.youtube.com/xml/feeds/videos.xml?channel_id=#{ucid}",
|
||||||
|
"hub.verify" => "async",
|
||||||
|
"hub.mode" => "subscribe",
|
||||||
|
"hub.lease_seconds" => "432000",
|
||||||
|
"hub.secret" => key.to_s,
|
||||||
|
}
|
||||||
|
|
||||||
|
return client.post("/subscribe", form: body)
|
||||||
|
end
|
||||||
|
|
||||||
|
def fetch_channel_playlists(ucid, author, auto_generated, continuation, sort_by)
|
||||||
|
client = make_client(YT_URL)
|
||||||
|
|
||||||
|
if continuation
|
||||||
|
url = produce_channel_playlists_url(ucid, continuation, sort_by, auto_generated)
|
||||||
|
|
||||||
|
response = client.get(url)
|
||||||
|
json = JSON.parse(response.body)
|
||||||
|
|
||||||
|
if json["load_more_widget_html"].as_s.empty?
|
||||||
|
return [] of SearchItem, nil
|
||||||
|
end
|
||||||
|
|
||||||
|
continuation = XML.parse_html(json["load_more_widget_html"].as_s)
|
||||||
|
continuation = continuation.xpath_node(%q(//button[@data-uix-load-more-href]))
|
||||||
|
if continuation
|
||||||
|
continuation = extract_channel_playlists_cursor(continuation["data-uix-load-more-href"], auto_generated)
|
||||||
|
end
|
||||||
|
|
||||||
|
html = XML.parse_html(json["content_html"].as_s)
|
||||||
|
nodeset = html.xpath_nodes(%q(//li[contains(@class, "feed-item-container")]))
|
||||||
|
else
|
||||||
|
url = "/channel/#{ucid}/playlists?disable_polymer=1&flow=list"
|
||||||
|
|
||||||
|
if auto_generated
|
||||||
|
url += "&view=50"
|
||||||
|
else
|
||||||
|
url += "&view=1"
|
||||||
|
end
|
||||||
|
|
||||||
|
case sort_by
|
||||||
|
when "last", "last_added"
|
||||||
|
#
|
||||||
|
when "oldest", "oldest_created"
|
||||||
|
url += "&sort=da"
|
||||||
|
when "newest", "newest_created"
|
||||||
|
url += "&sort=dd"
|
||||||
|
end
|
||||||
|
|
||||||
|
response = client.get(url)
|
||||||
|
html = XML.parse_html(response.body)
|
||||||
|
|
||||||
|
continuation = html.xpath_node(%q(//button[@data-uix-load-more-href]))
|
||||||
|
if continuation
|
||||||
|
continuation = extract_channel_playlists_cursor(continuation["data-uix-load-more-href"], auto_generated)
|
||||||
|
end
|
||||||
|
|
||||||
|
nodeset = html.xpath_nodes(%q(//ul[@id="browse-items-primary"]/li[contains(@class, "feed-item-container")]))
|
||||||
|
end
|
||||||
|
|
||||||
|
if auto_generated
|
||||||
|
items = extract_shelf_items(nodeset, ucid, author)
|
||||||
|
else
|
||||||
|
items = extract_items(nodeset, ucid, author)
|
||||||
|
end
|
||||||
|
|
||||||
|
return items, continuation
|
||||||
|
end
|
||||||
|
|
||||||
def produce_channel_videos_url(ucid, page = 1, auto_generated = nil, sort_by = "newest")
|
def produce_channel_videos_url(ucid, page = 1, auto_generated = nil, sort_by = "newest")
|
||||||
if auto_generated
|
if auto_generated
|
||||||
seed = Time.unix(1525757349)
|
seed = Time.unix(1525757349)
|
||||||
@@ -202,54 +327,189 @@ 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])
|
||||||
|
meta.write(Bytes[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
|
||||||
|
|
||||||
|
def produce_channel_playlists_url(ucid, cursor, sort = "newest", auto_generated = false)
|
||||||
|
if !auto_generated
|
||||||
|
cursor = Base64.urlsafe_encode(cursor, false)
|
||||||
|
end
|
||||||
|
|
||||||
|
meta = IO::Memory.new
|
||||||
|
|
||||||
|
if auto_generated
|
||||||
|
meta.write(Bytes[0x08, 0x0a])
|
||||||
|
end
|
||||||
|
|
||||||
|
meta.write(Bytes[0x12, 0x09])
|
||||||
|
meta.print("playlists")
|
||||||
|
|
||||||
|
if auto_generated
|
||||||
|
meta.write(Bytes[0x20, 0x32])
|
||||||
|
else
|
||||||
|
# TODO: Look at 0x01, 0x00
|
||||||
|
case sort
|
||||||
|
when "oldest", "oldest_created"
|
||||||
|
meta.write(Bytes[0x18, 0x02])
|
||||||
|
when "newest", "newest_created"
|
||||||
|
meta.write(Bytes[0x18, 0x03])
|
||||||
|
when "last", "last_added"
|
||||||
|
meta.write(Bytes[0x18, 0x04])
|
||||||
|
end
|
||||||
|
|
||||||
|
meta.write(Bytes[0x20, 0x01])
|
||||||
|
end
|
||||||
|
|
||||||
|
meta.write(Bytes[0x30, 0x02])
|
||||||
|
meta.write(Bytes[0x38, 0x01])
|
||||||
|
meta.write(Bytes[0x60, 0x01])
|
||||||
|
meta.write(Bytes[0x6a, 0x00])
|
||||||
|
|
||||||
|
meta.write(Bytes[0x7a, cursor.size])
|
||||||
|
meta.print(cursor)
|
||||||
|
|
||||||
|
meta.write(Bytes[0xb8, 0x01, 0x00])
|
||||||
|
|
||||||
|
meta.rewind
|
||||||
|
meta = Base64.urlsafe_encode(meta.to_slice)
|
||||||
|
meta = URI.escape(meta)
|
||||||
|
|
||||||
|
continuation = IO::Memory.new
|
||||||
|
continuation.write(Bytes[0x12, ucid.size])
|
||||||
|
continuation.print(ucid)
|
||||||
|
|
||||||
|
continuation.write(Bytes[0x1a])
|
||||||
|
continuation.write(write_var_int(meta.size))
|
||||||
|
continuation.print(meta)
|
||||||
|
|
||||||
|
continuation.rewind
|
||||||
|
continuation = continuation.gets_to_end
|
||||||
|
|
||||||
|
wrapper = IO::Memory.new
|
||||||
|
wrapper.write(Bytes[0xe2, 0xa9, 0x85, 0xb2, 0x02])
|
||||||
|
wrapper.write(write_var_int(continuation.size))
|
||||||
|
wrapper.print(continuation)
|
||||||
|
wrapper.rewind
|
||||||
|
|
||||||
|
wrapper = Base64.urlsafe_encode(wrapper.to_slice)
|
||||||
|
wrapper = URI.escape(wrapper)
|
||||||
|
|
||||||
|
url = "/browse_ajax?continuation=#{wrapper}&gl=US&hl=en"
|
||||||
|
|
||||||
|
return url
|
||||||
|
end
|
||||||
|
|
||||||
|
def extract_channel_playlists_cursor(url, auto_generated)
|
||||||
|
wrapper = HTTP::Params.parse(URI.parse(url).query.not_nil!)["continuation"]
|
||||||
|
|
||||||
|
wrapper = URI.unescape(wrapper)
|
||||||
|
wrapper = Base64.decode(wrapper)
|
||||||
|
|
||||||
|
# 0xe2 0xa9 0x85 0xb2 0x02
|
||||||
|
wrapper += 5
|
||||||
|
|
||||||
|
continuation_size = read_var_int(wrapper[0, 4])
|
||||||
|
wrapper += write_var_int(continuation_size).size
|
||||||
|
continuation = wrapper[0, continuation_size]
|
||||||
|
|
||||||
|
# 0x12
|
||||||
|
continuation += 1
|
||||||
|
ucid_size = continuation[0]
|
||||||
|
continuation += 1
|
||||||
|
ucid = continuation[0, ucid_size]
|
||||||
|
continuation += ucid_size
|
||||||
|
|
||||||
|
# 0x1a
|
||||||
|
continuation += 1
|
||||||
|
meta_size = read_var_int(continuation[0, 4])
|
||||||
|
continuation += write_var_int(meta_size).size
|
||||||
|
meta = continuation[0, meta_size]
|
||||||
|
continuation += meta_size
|
||||||
|
|
||||||
|
meta = String.new(meta)
|
||||||
|
meta = URI.unescape(meta)
|
||||||
|
meta = Base64.decode(meta)
|
||||||
|
|
||||||
|
# 0x12 0x09 playlists
|
||||||
|
meta += 11
|
||||||
|
|
||||||
|
until meta[0] == 0x7a
|
||||||
|
tag = read_var_int(meta[0, 4])
|
||||||
|
meta += write_var_int(tag).size
|
||||||
|
value = meta[0]
|
||||||
|
meta += 1
|
||||||
|
end
|
||||||
|
|
||||||
|
# 0x7a
|
||||||
|
meta += 1
|
||||||
|
cursor_size = meta[0]
|
||||||
|
meta += 1
|
||||||
|
cursor = meta[0, cursor_size]
|
||||||
|
|
||||||
|
cursor = String.new(cursor)
|
||||||
|
|
||||||
|
if !auto_generated
|
||||||
|
cursor = URI.unescape(cursor)
|
||||||
|
cursor = Base64.decode_string(cursor)
|
||||||
|
end
|
||||||
|
|
||||||
|
return cursor
|
||||||
|
end
|
||||||
|
|
||||||
def get_about_info(ucid, locale)
|
def get_about_info(ucid, locale)
|
||||||
client = make_client(YT_URL)
|
client = make_client(YT_URL)
|
||||||
|
|
||||||
@@ -280,7 +540,7 @@ def get_about_info(ucid, locale)
|
|||||||
sub_count ||= 0
|
sub_count ||= 0
|
||||||
|
|
||||||
author = about.xpath_node(%q(//span[contains(@class,"qualified-channel-title-text")]/a)).not_nil!.content
|
author = about.xpath_node(%q(//span[contains(@class,"qualified-channel-title-text")]/a)).not_nil!.content
|
||||||
ucid = about.xpath_node(%q(//link[@rel="canonical"])).not_nil!["href"].split("/")[-1]
|
ucid = about.xpath_node(%q(//meta[@itemprop="channelId"])).not_nil!["content"]
|
||||||
|
|
||||||
# Auto-generated channels
|
# Auto-generated channels
|
||||||
# https://support.google.com/youtube/answer/2579942
|
# https://support.google.com/youtube/answer/2579942
|
||||||
@@ -324,3 +584,21 @@ def get_60_videos(ucid, page, auto_generated, sort_by = "newest")
|
|||||||
|
|
||||||
return videos, count
|
return videos, count
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def get_latest_videos(ucid)
|
||||||
|
client = make_client(YT_URL)
|
||||||
|
videos = [] of SearchVideo
|
||||||
|
|
||||||
|
url = produce_channel_videos_url(ucid, 0)
|
||||||
|
response = client.get(url)
|
||||||
|
json = JSON.parse(response.body)
|
||||||
|
|
||||||
|
if json["content_html"]? && !json["content_html"].as_s.empty?
|
||||||
|
document = XML.parse_html(json["content_html"].as_s)
|
||||||
|
nodeset = document.xpath_nodes(%q(//li[contains(@class, "feed-item-container")]))
|
||||||
|
|
||||||
|
videos = extract_videos(nodeset, ucid)
|
||||||
|
end
|
||||||
|
|
||||||
|
return videos
|
||||||
|
end
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class RedditComment
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
class RedditLink
|
struct RedditLink
|
||||||
JSON.mapping({
|
JSON.mapping({
|
||||||
author: String,
|
author: String,
|
||||||
score: Int32,
|
score: Int32,
|
||||||
@@ -41,7 +41,7 @@ class RedditLink
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
class RedditMore
|
struct RedditMore
|
||||||
JSON.mapping({
|
JSON.mapping({
|
||||||
children: Array(String),
|
children: Array(String),
|
||||||
count: Int32,
|
count: Int32,
|
||||||
@@ -56,72 +56,31 @@ class RedditListing
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
def fetch_youtube_comments(id, continuation, proxies, format, locale)
|
def fetch_youtube_comments(id, db, continuation, proxies, format, locale, thin_mode, region, sort_by = "top")
|
||||||
client = make_client(YT_URL)
|
video = get_video(id, db, proxies, region: region)
|
||||||
html = client.get("/watch?v=#{id}&gl=US&hl=en&disable_polymer=1&has_verified=1&bpctr=9999999999")
|
session_token = video.info["session_token"]?
|
||||||
headers = HTTP::Headers.new
|
|
||||||
headers["cookie"] = html.cookies.add_request_headers(headers)["cookie"]
|
|
||||||
body = html.body
|
|
||||||
|
|
||||||
session_token = body.match(/'XSRF_TOKEN': "(?<session_token>[A-Za-z0-9\_\-\=]+)"/).not_nil!["session_token"]
|
ctoken = produce_comment_continuation(id, cursor: "", sort_by: sort_by)
|
||||||
itct = body.match(/itct=(?<itct>[^"]+)"/).not_nil!["itct"]
|
continuation ||= ctoken
|
||||||
ctoken = body.match(/'COMMENTS_TOKEN': "(?<ctoken>[^"]+)"/)
|
|
||||||
|
|
||||||
if body.match(/<meta itemprop="regionsAllowed" content="">/)
|
if !continuation || !session_token
|
||||||
bypass_channel = Channel({String, HTTPClient, HTTP::Headers} | Nil).new
|
|
||||||
|
|
||||||
proxies.each do |proxy_region, list|
|
|
||||||
spawn do
|
|
||||||
proxy_client = make_client(YT_URL, proxies, proxy_region)
|
|
||||||
|
|
||||||
response = proxy_client.get("/watch?v=#{id}&gl=US&hl=en&disable_polymer=1&has_verified=1&bpctr=9999999999")
|
|
||||||
proxy_headers = HTTP::Headers.new
|
|
||||||
proxy_headers["Cookie"] = response.cookies.add_request_headers(headers)["cookie"]
|
|
||||||
proxy_html = response.body
|
|
||||||
|
|
||||||
if !proxy_html.match(/<meta itemprop="regionsAllowed" content="">/)
|
|
||||||
bypass_channel.send({proxy_html, proxy_client, proxy_headers})
|
|
||||||
else
|
|
||||||
bypass_channel.send(nil)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
proxies.size.times do
|
|
||||||
response = bypass_channel.receive
|
|
||||||
if response
|
|
||||||
html, client, headers = response
|
|
||||||
|
|
||||||
session_token = html.match(/'XSRF_TOKEN': "(?<session_token>[A-Za-z0-9\_\-\=]+)"/).not_nil!["session_token"]
|
|
||||||
itct = html.match(/itct=(?<itct>[^"]+)"/).not_nil!["itct"]
|
|
||||||
ctoken = html.match(/'COMMENTS_TOKEN': "(?<ctoken>[^"]+)"/)
|
|
||||||
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if !ctoken
|
|
||||||
if format == "json"
|
if format == "json"
|
||||||
return {"comments" => [] of String}.to_json
|
return {"comments" => [] of String}.to_json
|
||||||
else
|
else
|
||||||
return {"contentHtml" => "", "commentCount" => 0}.to_json
|
return {"contentHtml" => "", "commentCount" => 0}.to_json
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
ctoken = ctoken["ctoken"]
|
|
||||||
|
|
||||||
if !continuation.empty?
|
|
||||||
ctoken = continuation
|
|
||||||
else
|
|
||||||
continuation = ctoken
|
|
||||||
end
|
|
||||||
|
|
||||||
post_req = {
|
post_req = {
|
||||||
"session_token" => session_token,
|
"session_token" => session_token,
|
||||||
}
|
}
|
||||||
post_req = HTTP::Params.encode(post_req)
|
post_req = HTTP::Params.encode(post_req)
|
||||||
|
|
||||||
|
client = make_client(YT_URL, proxies, video.info["region"]?)
|
||||||
|
headers = HTTP::Headers.new
|
||||||
|
|
||||||
headers["content-type"] = "application/x-www-form-urlencoded"
|
headers["content-type"] = "application/x-www-form-urlencoded"
|
||||||
|
headers["cookie"] = video.info["cookie"]
|
||||||
|
|
||||||
headers["x-client-data"] = "CIi2yQEIpbbJAQipncoBCNedygEIqKPKAQ=="
|
headers["x-client-data"] = "CIi2yQEIpbbJAQipncoBCNedygEIqKPKAQ=="
|
||||||
headers["x-spf-previous"] = "https://www.youtube.com/watch?v=#{id}&gl=US&hl=en&disable_polymer=1&has_verified=1&bpctr=9999999999"
|
headers["x-spf-previous"] = "https://www.youtube.com/watch?v=#{id}&gl=US&hl=en&disable_polymer=1&has_verified=1&bpctr=9999999999"
|
||||||
@@ -129,7 +88,8 @@ def fetch_youtube_comments(id, continuation, proxies, format, locale)
|
|||||||
|
|
||||||
headers["x-youtube-client-name"] = "1"
|
headers["x-youtube-client-name"] = "1"
|
||||||
headers["x-youtube-client-version"] = "2.20180719"
|
headers["x-youtube-client-version"] = "2.20180719"
|
||||||
response = client.post("/comment_service_ajax?action_get_comments=1&pbj=1&ctoken=#{ctoken}&continuation=#{continuation}&itct=#{itct}&hl=en&gl=US", headers, post_req)
|
|
||||||
|
response = client.post("/comment_service_ajax?action_get_comments=1&ctoken=#{continuation}&continuation=#{continuation}&hl=en&gl=US", headers, post_req)
|
||||||
response = JSON.parse(response.body)
|
response = JSON.parse(response.body)
|
||||||
|
|
||||||
if !response["response"]["continuationContents"]?
|
if !response["response"]["continuationContents"]?
|
||||||
@@ -159,6 +119,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,14 +171,32 @@ 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
|
||||||
json.field "published", published.to_unix
|
json.field "published", published.to_unix
|
||||||
json.field "publishedText", translate(locale, "`x` ago", recode_date(published))
|
json.field "publishedText", translate(locale, "`x` ago", recode_date(published, locale))
|
||||||
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 +207,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
|
||||||
@@ -250,7 +231,7 @@ def fetch_youtube_comments(id, continuation, proxies, format, locale)
|
|||||||
|
|
||||||
if format == "html"
|
if format == "html"
|
||||||
comments = JSON.parse(comments)
|
comments = JSON.parse(comments)
|
||||||
content_html = template_youtube_comments(comments, locale)
|
content_html = template_youtube_comments(comments, locale, thin_mode)
|
||||||
|
|
||||||
comments = JSON.build do |json|
|
comments = JSON.build do |json|
|
||||||
json.object do
|
json.object do
|
||||||
@@ -270,7 +251,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.12.0 (by /u/omarroth)"}
|
headers = HTTP::Headers{"User-Agent" => "web:invidious:v#{CURRENT_VERSION} (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)
|
||||||
@@ -296,7 +277,7 @@ def fetch_reddit_comments(id)
|
|||||||
return comments, thread
|
return comments, thread
|
||||||
end
|
end
|
||||||
|
|
||||||
def template_youtube_comments(comments, locale)
|
def template_youtube_comments(comments, locale, thin_mode)
|
||||||
html = ""
|
html = ""
|
||||||
|
|
||||||
root = comments["comments"].as_a
|
root = comments["comments"].as_a
|
||||||
@@ -315,7 +296,11 @@ def template_youtube_comments(comments, locale)
|
|||||||
END_HTML
|
END_HTML
|
||||||
end
|
end
|
||||||
|
|
||||||
author_thumbnail = "/ggpht#{URI.parse(child["authorThumbnails"][-1]["url"].as_s).full_path}"
|
if !thin_mode
|
||||||
|
author_thumbnail = "/ggpht#{URI.parse(child["authorThumbnails"][-1]["url"].as_s).full_path}"
|
||||||
|
else
|
||||||
|
author_thumbnail = ""
|
||||||
|
end
|
||||||
|
|
||||||
html += <<-END_HTML
|
html += <<-END_HTML
|
||||||
<div class="pure-g">
|
<div class="pure-g">
|
||||||
@@ -325,12 +310,36 @@ 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), locale))} #{child["isEdited"] == true ? translate(locale, "(edited)") : ""}</span>
|
||||||
|
|
|
|
||||||
<i class="icon ion-ios-thumbs-up"></i> #{number_with_separator(child["likeCount"])}
|
<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"])}
|
||||||
|
END_HTML
|
||||||
|
|
||||||
|
if child["creatorHeart"]?
|
||||||
|
if !thin_mode
|
||||||
|
creator_thumbnail = "/ggpht#{URI.parse(child["creatorHeart"]["creatorThumbnail"].as_s).full_path}"
|
||||||
|
else
|
||||||
|
creator_thumbnail = ""
|
||||||
|
end
|
||||||
|
|
||||||
|
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="icon ion-ios-heart creator-heart-small-container"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
END_HTML
|
||||||
|
end
|
||||||
|
|
||||||
|
html += <<-END_HTML
|
||||||
</p>
|
</p>
|
||||||
#{replies_html}
|
#{replies_html}
|
||||||
</div>
|
</div>
|
||||||
@@ -371,10 +380,10 @@ def template_reddit_comments(root, locale)
|
|||||||
|
|
||||||
content = <<-END_HTML
|
content = <<-END_HTML
|
||||||
<p>
|
<p>
|
||||||
<a href="javascript:void(0)" onclick="toggle_parent(this)">[ - ]</a>
|
<a href="javascript:void(0)" onclick="toggle_parent(this)">[ - ]</a>
|
||||||
<b><a href="https://www.reddit.com/user/#{author}">#{author}</a></b>
|
<b><a href="https://www.reddit.com/user/#{author}">#{author}</a></b>
|
||||||
#{translate(locale, "`x` points", number_with_separator(score))}
|
#{translate(locale, "`x` points", number_with_separator(score))}
|
||||||
#{translate(locale, "`x` ago", recode_date(child.created_utc))}
|
#{translate(locale, "`x` ago", recode_date(child.created_utc, locale))}
|
||||||
</p>
|
</p>
|
||||||
<div>
|
<div>
|
||||||
#{body_html}
|
#{body_html}
|
||||||
@@ -488,10 +497,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
|
||||||
@@ -502,3 +515,111 @@ def content_to_comment_html(content)
|
|||||||
|
|
||||||
return comment_html
|
return comment_html
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def produce_comment_continuation(video_id, cursor = "", sort_by = "top")
|
||||||
|
continuation = IO::Memory.new
|
||||||
|
|
||||||
|
continuation.write(Bytes[0x12, 0x26])
|
||||||
|
|
||||||
|
continuation.write(Bytes[0x12, video_id.size])
|
||||||
|
continuation.print(video_id)
|
||||||
|
|
||||||
|
continuation.write(Bytes[0xc0, 0x01, 0x01])
|
||||||
|
continuation.write(Bytes[0xc8, 0x01, 0x01])
|
||||||
|
continuation.write(Bytes[0xe0, 0x01, 0x01])
|
||||||
|
|
||||||
|
continuation.write(Bytes[0xa2, 0x02, 0x0d])
|
||||||
|
continuation.write(Bytes[0x28, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01])
|
||||||
|
|
||||||
|
continuation.write(Bytes[0x40, 0x00])
|
||||||
|
continuation.write(Bytes[0x18, 0x06])
|
||||||
|
|
||||||
|
if cursor.empty?
|
||||||
|
continuation.write(Bytes[0x32])
|
||||||
|
continuation.write(write_var_int(video_id.size + 8))
|
||||||
|
|
||||||
|
continuation.write(Bytes[0x22, video_id.size + 4])
|
||||||
|
continuation.write(Bytes[0x22, video_id.size])
|
||||||
|
continuation.print(video_id)
|
||||||
|
|
||||||
|
case sort_by
|
||||||
|
when "top"
|
||||||
|
continuation.write(Bytes[0x30, 0x00])
|
||||||
|
when "new", "newest"
|
||||||
|
continuation.write(Bytes[0x30, 0x01])
|
||||||
|
end
|
||||||
|
|
||||||
|
continuation.write(Bytes[0x78, 0x02])
|
||||||
|
else
|
||||||
|
continuation.write(Bytes[0x32])
|
||||||
|
continuation.write(write_var_int(cursor.size + video_id.size + 11))
|
||||||
|
|
||||||
|
continuation.write(Bytes[0x0a])
|
||||||
|
continuation.write(write_var_int(cursor.size))
|
||||||
|
continuation.print(cursor)
|
||||||
|
|
||||||
|
continuation.write(Bytes[0x22, video_id.size + 4])
|
||||||
|
continuation.write(Bytes[0x22, video_id.size])
|
||||||
|
continuation.print(video_id)
|
||||||
|
|
||||||
|
case sort_by
|
||||||
|
when "top"
|
||||||
|
continuation.write(Bytes[0x30, 0x00])
|
||||||
|
when "new", "newest"
|
||||||
|
continuation.write(Bytes[0x30, 0x01])
|
||||||
|
end
|
||||||
|
|
||||||
|
continuation.write(Bytes[0x28, 0x14])
|
||||||
|
end
|
||||||
|
|
||||||
|
continuation.rewind
|
||||||
|
continuation = continuation.gets_to_end
|
||||||
|
|
||||||
|
continuation = Base64.urlsafe_encode(continuation.to_slice)
|
||||||
|
continuation = URI.escape(continuation)
|
||||||
|
|
||||||
|
return continuation
|
||||||
|
end
|
||||||
|
|
||||||
|
def produce_comment_reply_continuation(video_id, ucid, comment_id)
|
||||||
|
continuation = IO::Memory.new
|
||||||
|
|
||||||
|
continuation.write(Bytes[0x12, 0x26])
|
||||||
|
|
||||||
|
continuation.write(Bytes[0x12, video_id.size])
|
||||||
|
continuation.print(video_id)
|
||||||
|
|
||||||
|
continuation.write(Bytes[0xc0, 0x01, 0x01])
|
||||||
|
continuation.write(Bytes[0xc8, 0x01, 0x01])
|
||||||
|
continuation.write(Bytes[0xe0, 0x01, 0x01])
|
||||||
|
|
||||||
|
continuation.write(Bytes[0xa2, 0x02, 0x0d])
|
||||||
|
continuation.write(Bytes[0x28, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01])
|
||||||
|
|
||||||
|
continuation.write(Bytes[0x40, 0x00])
|
||||||
|
continuation.write(Bytes[0x18, 0x06])
|
||||||
|
|
||||||
|
continuation.write(Bytes[0x32, ucid.size + video_id.size + comment_id.size + 16])
|
||||||
|
continuation.write(Bytes[0x1a, ucid.size + video_id.size + comment_id.size + 14])
|
||||||
|
|
||||||
|
continuation.write(Bytes[0x12, comment_id.size])
|
||||||
|
continuation.print(comment_id)
|
||||||
|
|
||||||
|
continuation.write(Bytes[0x22, 0x02, 0x08, 0x00]) # ??
|
||||||
|
|
||||||
|
continuation.write(Bytes[ucid.size + video_id.size + 7])
|
||||||
|
continuation.write(Bytes[ucid.size])
|
||||||
|
continuation.print(ucid)
|
||||||
|
continuation.write(Bytes[0x32, video_id.size])
|
||||||
|
continuation.print(video_id)
|
||||||
|
continuation.write(Bytes[0x40, 0x01])
|
||||||
|
continuation.write(Bytes[0x48, 0x0a])
|
||||||
|
|
||||||
|
continuation.rewind
|
||||||
|
continuation = continuation.gets_to_end
|
||||||
|
|
||||||
|
continuation = Base64.urlsafe_encode(continuation.to_slice)
|
||||||
|
continuation = URI.escape(continuation)
|
||||||
|
|
||||||
|
return continuation
|
||||||
|
end
|
||||||
|
|||||||
143
src/invidious/helpers/handlers.cr
Normal file
143
src/invidious/helpers/handlers.cr
Normal file
@@ -0,0 +1,143 @@
|
|||||||
|
module HTTP::Handler
|
||||||
|
@@exclude_routes_tree = Radix::Tree(String).new
|
||||||
|
|
||||||
|
macro exclude(paths, method = "GET")
|
||||||
|
class_name = {{@type.name}}
|
||||||
|
method_downcase = {{method.downcase}}
|
||||||
|
class_name_method = "#{class_name}/#{method_downcase}"
|
||||||
|
({{paths}}).each do |path|
|
||||||
|
@@exclude_routes_tree.add class_name_method + path, '/' + method_downcase + path
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def exclude_match?(env : HTTP::Server::Context)
|
||||||
|
@@exclude_routes_tree.find(radix_path(env.request.method, env.request.path)).found?
|
||||||
|
end
|
||||||
|
|
||||||
|
private def radix_path(method : String, path : String)
|
||||||
|
"#{self.class}/#{method.downcase}#{path}"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
class Kemal::RouteHandler
|
||||||
|
exclude ["/api/v1/*"]
|
||||||
|
|
||||||
|
# Processes the route if it's a match. Otherwise renders 404.
|
||||||
|
private def process_request(context)
|
||||||
|
raise Kemal::Exceptions::RouteNotFound.new(context) unless context.route_found?
|
||||||
|
content = context.route.handler.call(context)
|
||||||
|
|
||||||
|
if !Kemal.config.error_handlers.empty? && Kemal.config.error_handlers.has_key?(context.response.status_code) && exclude_match?(context)
|
||||||
|
raise Kemal::Exceptions::CustomException.new(context)
|
||||||
|
end
|
||||||
|
|
||||||
|
context.response.print(content)
|
||||||
|
context
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
class Kemal::ExceptionHandler
|
||||||
|
exclude ["/api/v1/*"]
|
||||||
|
|
||||||
|
private def call_exception_with_status_code(context : HTTP::Server::Context, exception : Exception, status_code : Int32)
|
||||||
|
return if context.response.closed?
|
||||||
|
return if exclude_match? context
|
||||||
|
|
||||||
|
if !Kemal.config.error_handlers.empty? && Kemal.config.error_handlers.has_key?(status_code)
|
||||||
|
context.response.content_type = "text/html" unless context.response.headers.has_key?("Content-Type")
|
||||||
|
context.response.status_code = status_code
|
||||||
|
context.response.print Kemal.config.error_handlers[status_code].call(context, exception)
|
||||||
|
context
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
class FilteredCompressHandler < Kemal::Handler
|
||||||
|
exclude ["/videoplayback", "/videoplayback/*", "/vi/*", "/ggpht/*"]
|
||||||
|
|
||||||
|
def call(env)
|
||||||
|
return call_next env if exclude_match? env
|
||||||
|
|
||||||
|
{% if flag?(:without_zlib) %}
|
||||||
|
call_next env
|
||||||
|
{% else %}
|
||||||
|
request_headers = env.request.headers
|
||||||
|
|
||||||
|
if request_headers.includes_word?("Accept-Encoding", "gzip")
|
||||||
|
env.response.headers["Content-Encoding"] = "gzip"
|
||||||
|
env.response.output = Gzip::Writer.new(env.response.output, sync_close: true)
|
||||||
|
elsif request_headers.includes_word?("Accept-Encoding", "deflate")
|
||||||
|
env.response.headers["Content-Encoding"] = "deflate"
|
||||||
|
env.response.output = Flate::Writer.new(env.response.output, sync_close: true)
|
||||||
|
end
|
||||||
|
|
||||||
|
call_next env
|
||||||
|
{% 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"] = "*"
|
||||||
|
|
||||||
|
# Here we swap out the socket IO so we can modify the response as needed
|
||||||
|
output = env.response.output
|
||||||
|
env.response.output = IO::Memory.new
|
||||||
|
|
||||||
|
begin
|
||||||
|
call_next env
|
||||||
|
|
||||||
|
env.response.output.rewind
|
||||||
|
response = env.response.output.gets_to_end
|
||||||
|
|
||||||
|
if env.response.headers["Content-Type"]?.try &.== "application/json"
|
||||||
|
response = JSON.parse(response)
|
||||||
|
|
||||||
|
if env.params.query["fields"]?
|
||||||
|
fields_text = env.params.query["fields"]
|
||||||
|
begin
|
||||||
|
JSONFilter.filter(response, fields_text)
|
||||||
|
rescue ex
|
||||||
|
env.response.status_code = 400
|
||||||
|
response = {"error" => ex.message}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if env.params.query["pretty"]? && env.params.query["pretty"] == "1"
|
||||||
|
response = response.to_pretty_json
|
||||||
|
else
|
||||||
|
response = response.to_json
|
||||||
|
end
|
||||||
|
end
|
||||||
|
rescue
|
||||||
|
ensure
|
||||||
|
env.response.output = output
|
||||||
|
env.response.puts response
|
||||||
|
|
||||||
|
env.response.flush
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
class DenyFrame < Kemal::Handler
|
||||||
|
exclude ["/embed/*"]
|
||||||
|
|
||||||
|
def call(env)
|
||||||
|
return call_next env if exclude_match? env
|
||||||
|
|
||||||
|
env.response.headers["X-Frame-Options"] = "sameorigin"
|
||||||
|
call_next env
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# Temp fix for https://github.com/crystal-lang/crystal/issues/7383
|
||||||
|
class HTTP::Client
|
||||||
|
private def handle_response(response)
|
||||||
|
# close unless response.keep_alive?
|
||||||
|
response
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -1,60 +1,109 @@
|
|||||||
class Config
|
require "./macros"
|
||||||
|
|
||||||
|
struct ConfigPreferences
|
||||||
|
module StringToArray
|
||||||
|
def self.to_yaml(value : Array(String), yaml : YAML::Nodes::Builder)
|
||||||
|
yaml.sequence do
|
||||||
|
value.each do |element|
|
||||||
|
yaml.scalar element
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.from_yaml(ctx : YAML::ParseContext, node : YAML::Nodes::Node) : Array(String)
|
||||||
|
begin
|
||||||
|
unless node.is_a?(YAML::Nodes::Sequence)
|
||||||
|
node.raise "Expected sequence, not #{node.class}"
|
||||||
|
end
|
||||||
|
|
||||||
|
result = [] of String
|
||||||
|
node.nodes.each do |item|
|
||||||
|
unless item.is_a?(YAML::Nodes::Scalar)
|
||||||
|
node.raise "Expected scalar, not #{item.class}"
|
||||||
|
end
|
||||||
|
|
||||||
|
result << item.value
|
||||||
|
end
|
||||||
|
rescue ex
|
||||||
|
if node.is_a?(YAML::Nodes::Scalar)
|
||||||
|
result = [node.value, ""]
|
||||||
|
else
|
||||||
|
result = ["", ""]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
result
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
yaml_mapping({
|
||||||
|
autoplay: {type: Bool, default: false},
|
||||||
|
captions: {type: Array(String), default: ["", "", ""], converter: StringToArray},
|
||||||
|
comments: {type: Array(String), default: ["youtube", ""], converter: StringToArray},
|
||||||
|
continue: {type: Bool, default: false},
|
||||||
|
dark_mode: {type: Bool, default: false},
|
||||||
|
latest_only: {type: Bool, default: false},
|
||||||
|
listen: {type: Bool, default: false},
|
||||||
|
local: {type: Bool, default: false},
|
||||||
|
locale: {type: String, default: "en-US"},
|
||||||
|
max_results: {type: Int32, default: 40},
|
||||||
|
notifications_only: {type: Bool, default: false},
|
||||||
|
quality: {type: String, default: "hd720"},
|
||||||
|
redirect_feed: {type: Bool, default: false},
|
||||||
|
related_videos: {type: Bool, default: true},
|
||||||
|
sort: {type: String, default: "published"},
|
||||||
|
speed: {type: Float32, default: 1.0_f32},
|
||||||
|
thin_mode: {type: Bool, default: false},
|
||||||
|
unseen_only: {type: Bool, default: false},
|
||||||
|
video_loop: {type: Bool, default: false},
|
||||||
|
volume: {type: Int32, default: 100},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
struct Config
|
||||||
|
module ConfigPreferencesConverter
|
||||||
|
def self.from_yaml(ctx : YAML::ParseContext, node : YAML::Nodes::Node) : Preferences
|
||||||
|
Preferences.new(*ConfigPreferences.new(ctx, node).to_tuple)
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.to_yaml(value : Preferences, yaml : YAML::Nodes::Builder)
|
||||||
|
value.to_yaml(yaml)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
YAML.mapping({
|
YAML.mapping({
|
||||||
crawl_threads: Int32,
|
channel_threads: Int32, # Number of threads to use for crawling videos from channels (for updating subscriptions)
|
||||||
channel_threads: Int32,
|
feed_threads: Int32, # Number of threads to use for updating feeds
|
||||||
feed_threads: Int32,
|
db: NamedTuple( # Database configuration
|
||||||
video_threads: Int32,
|
user: String,
|
||||||
db: NamedTuple(
|
|
||||||
user: String,
|
|
||||||
password: String,
|
password: String,
|
||||||
host: String,
|
host: String,
|
||||||
port: Int32,
|
port: Int32,
|
||||||
dbname: String,
|
dbname: String,
|
||||||
),
|
),
|
||||||
dl_api_key: String?,
|
full_refresh: Bool, # Used for crawling channels: threads should check all videos uploaded by a channel
|
||||||
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 and verifying pubsub subscriptions
|
||||||
full_refresh: Bool,
|
domain: String?, # Domain to be used for links to resources on the site where an absolute URL is required
|
||||||
domain: String?,
|
use_pubsub_feeds: {type: Bool | Int32, default: false}, # Subscribe to channels using PubSubHubbub (requires domain, hmac_key)
|
||||||
|
default_home: {type: String, default: "Top"},
|
||||||
|
feed_menu: {type: Array(String), default: ["Popular", "Top", "Trending", "Subscriptions"]},
|
||||||
|
top_enabled: {type: Bool, default: true},
|
||||||
|
captcha_enabled: {type: Bool, default: true},
|
||||||
|
login_enabled: {type: Bool, default: true},
|
||||||
|
registration_enabled: {type: Bool, default: true},
|
||||||
|
statistics_enabled: {type: Bool, default: false},
|
||||||
|
admins: {type: Array(String), default: [] of String},
|
||||||
|
external_port: {type: Int32?, default: nil},
|
||||||
|
default_user_preferences: {type: Preferences,
|
||||||
|
default: Preferences.new(*ConfigPreferences.from_yaml("").to_tuple),
|
||||||
|
converter: ConfigPreferencesConverter,
|
||||||
|
},
|
||||||
|
dmca_content: {type: Array(String), default: [] of String}, # For compliance with DMCA, disables download widget using list of video IDs
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
class FilteredCompressHandler < Kemal::Handler
|
def rank_videos(db, n)
|
||||||
exclude ["/videoplayback", "/videoplayback/*", "/vi/*", "/api/*", "/ggpht/*"]
|
|
||||||
|
|
||||||
def call(env)
|
|
||||||
return call_next env if exclude_match? env
|
|
||||||
|
|
||||||
{% if flag?(:without_zlib) %}
|
|
||||||
call_next env
|
|
||||||
{% else %}
|
|
||||||
request_headers = env.request.headers
|
|
||||||
|
|
||||||
if request_headers.includes_word?("Accept-Encoding", "gzip")
|
|
||||||
env.response.headers["Content-Encoding"] = "gzip"
|
|
||||||
env.response.output = Gzip::Writer.new(env.response.output, sync_close: true)
|
|
||||||
elsif request_headers.includes_word?("Accept-Encoding", "deflate")
|
|
||||||
env.response.headers["Content-Encoding"] = "deflate"
|
|
||||||
env.response.output = Flate::Writer.new(env.response.output, sync_close: true)
|
|
||||||
end
|
|
||||||
|
|
||||||
call_next env
|
|
||||||
{% end %}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
class DenyFrame < Kemal::Handler
|
|
||||||
exclude ["/embed/*"]
|
|
||||||
|
|
||||||
def call(env)
|
|
||||||
return call_next env if exclude_match? env
|
|
||||||
|
|
||||||
env.response.headers["X-Frame-Options"] = "sameorigin"
|
|
||||||
call_next env
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def rank_videos(db, n, filter, url)
|
|
||||||
top = [] of {Float64, String}
|
top = [] of {Float64, String}
|
||||||
|
|
||||||
db.query("SELECT id, wilson_score, published FROM videos WHERE views > 5000 ORDER BY published DESC LIMIT 1000") do |rs|
|
db.query("SELECT id, wilson_score, published FROM videos WHERE views > 5000 ORDER BY published DESC LIMIT 1000") do |rs|
|
||||||
@@ -75,41 +124,7 @@ def rank_videos(db, n, filter, url)
|
|||||||
top.reverse!
|
top.reverse!
|
||||||
top = top.map { |a, b| b }
|
top = top.map { |a, b| b }
|
||||||
|
|
||||||
if filter
|
return top[0..n - 1]
|
||||||
language_list = [] of String
|
|
||||||
top.each do |id|
|
|
||||||
if language_list.size == n
|
|
||||||
break
|
|
||||||
else
|
|
||||||
client = make_client(url)
|
|
||||||
begin
|
|
||||||
video = get_video(id, db)
|
|
||||||
rescue ex
|
|
||||||
next
|
|
||||||
end
|
|
||||||
|
|
||||||
if video.language
|
|
||||||
language = video.language
|
|
||||||
else
|
|
||||||
description = XML.parse(video.description)
|
|
||||||
content = [video.title, description.content].join(" ")
|
|
||||||
content = content[0, 10000]
|
|
||||||
|
|
||||||
results = DetectLanguage.detect(content)
|
|
||||||
language = results[0].language
|
|
||||||
|
|
||||||
db.exec("UPDATE videos SET language = $1 WHERE id = $2", language, id)
|
|
||||||
end
|
|
||||||
|
|
||||||
if language == "en"
|
|
||||||
language_list << id
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return language_list
|
|
||||||
else
|
|
||||||
return top[0..n - 1]
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def login_req(login_form, f_req)
|
def login_req(login_form, f_req)
|
||||||
@@ -154,29 +169,11 @@ def extract_videos(nodeset, ucid = nil)
|
|||||||
videos.map { |video| video.as(SearchVideo) }
|
videos.map { |video| video.as(SearchVideo) }
|
||||||
end
|
end
|
||||||
|
|
||||||
def extract_items(nodeset, ucid = nil)
|
def extract_items(nodeset, ucid = nil, author_name = nil)
|
||||||
# TODO: Make this a 'common', so it makes more sense to be used here
|
# TODO: Make this a 'common', so it makes more sense to be used here
|
||||||
items = [] of SearchItem
|
items = [] of SearchItem
|
||||||
|
|
||||||
nodeset.each do |node|
|
nodeset.each do |node|
|
||||||
anchor = node.xpath_node(%q(.//h3[contains(@class,"yt-lockup-title")]/a))
|
|
||||||
if !anchor
|
|
||||||
next
|
|
||||||
end
|
|
||||||
|
|
||||||
if anchor["href"].starts_with? "https://www.googleadservices.com"
|
|
||||||
next
|
|
||||||
end
|
|
||||||
|
|
||||||
anchor = node.xpath_node(%q(.//div[contains(@class, "yt-lockup-byline")]/a))
|
|
||||||
if !anchor
|
|
||||||
author = ""
|
|
||||||
author_id = ""
|
|
||||||
else
|
|
||||||
author = anchor.content.strip
|
|
||||||
author_id = anchor["href"].split("/")[-1]
|
|
||||||
end
|
|
||||||
|
|
||||||
anchor = node.xpath_node(%q(.//h3[contains(@class, "yt-lockup-title")]/a))
|
anchor = node.xpath_node(%q(.//h3[contains(@class, "yt-lockup-title")]/a))
|
||||||
if !anchor
|
if !anchor
|
||||||
next
|
next
|
||||||
@@ -184,6 +181,22 @@ def extract_items(nodeset, ucid = nil)
|
|||||||
title = anchor.content.strip
|
title = anchor.content.strip
|
||||||
id = anchor["href"]
|
id = anchor["href"]
|
||||||
|
|
||||||
|
if anchor["href"].starts_with? "https://www.googleadservices.com"
|
||||||
|
next
|
||||||
|
end
|
||||||
|
|
||||||
|
anchor = node.xpath_node(%q(.//div[contains(@class, "yt-lockup-byline")]/a))
|
||||||
|
if anchor
|
||||||
|
author = anchor.content.strip
|
||||||
|
author_id = anchor["href"].split("/")[-1]
|
||||||
|
end
|
||||||
|
|
||||||
|
author ||= author_name
|
||||||
|
author_id ||= ucid
|
||||||
|
|
||||||
|
author ||= ""
|
||||||
|
author_id ||= ""
|
||||||
|
|
||||||
description_html = node.xpath_node(%q(.//div[contains(@class, "yt-lockup-description")]))
|
description_html = node.xpath_node(%q(.//div[contains(@class, "yt-lockup-description")]))
|
||||||
description_html, description = html_to_content(description_html)
|
description_html, description = html_to_content(description_html)
|
||||||
|
|
||||||
@@ -239,13 +252,22 @@ def extract_items(nodeset, ucid = nil)
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
playlist_thumbnail = node.xpath_node(%q(.//div/span/img)).try &.["data-thumb"]?
|
||||||
|
playlist_thumbnail ||= node.xpath_node(%q(.//div/span/img)).try &.["src"]
|
||||||
|
if !playlist_thumbnail || playlist_thumbnail.empty?
|
||||||
|
thumbnail_id = videos[0]?.try &.id
|
||||||
|
else
|
||||||
|
thumbnail_id = playlist_thumbnail.match(/\/vi\/(?<video_id>[a-zA-Z0-9_-]{11})\/\w+\.jpg/).try &.["video_id"]
|
||||||
|
end
|
||||||
|
|
||||||
items << SearchPlaylist.new(
|
items << SearchPlaylist.new(
|
||||||
title,
|
title,
|
||||||
plid,
|
plid,
|
||||||
author,
|
author,
|
||||||
author_id,
|
author_id,
|
||||||
video_count,
|
video_count,
|
||||||
videos
|
videos,
|
||||||
|
thumbnail_id
|
||||||
)
|
)
|
||||||
when .includes? "yt-lockup-channel"
|
when .includes? "yt-lockup-channel"
|
||||||
author = title.strip
|
author = title.strip
|
||||||
@@ -255,6 +277,12 @@ def extract_items(nodeset, ucid = nil)
|
|||||||
|
|
||||||
author_thumbnail = node.xpath_node(%q(.//div/span/img)).try &.["data-thumb"]?
|
author_thumbnail = node.xpath_node(%q(.//div/span/img)).try &.["data-thumb"]?
|
||||||
author_thumbnail ||= node.xpath_node(%q(.//div/span/img)).try &.["src"]
|
author_thumbnail ||= node.xpath_node(%q(.//div/span/img)).try &.["src"]
|
||||||
|
if author_thumbnail
|
||||||
|
author_thumbnail = URI.parse(author_thumbnail)
|
||||||
|
author_thumbnail.scheme = "https"
|
||||||
|
author_thumbnail = author_thumbnail.to_s
|
||||||
|
end
|
||||||
|
|
||||||
author_thumbnail ||= ""
|
author_thumbnail ||= ""
|
||||||
|
|
||||||
subscriber_count = node.xpath_node(%q(.//span[contains(@class, "yt-subscriber-count")])).try &.["title"].delete(",").to_i?
|
subscriber_count = node.xpath_node(%q(.//span[contains(@class, "yt-subscriber-count")])).try &.["title"].delete(",").to_i?
|
||||||
@@ -323,6 +351,11 @@ def extract_items(nodeset, ucid = nil)
|
|||||||
paid = true
|
paid = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
premiere_timestamp = node.xpath_node(%q(.//ul[@class="yt-lockup-meta-info"]/li/span[@class="localized-date"])).try &.["data-timestamp"]?.try &.to_i64
|
||||||
|
if premiere_timestamp
|
||||||
|
premiere_timestamp = Time.unix(premiere_timestamp)
|
||||||
|
end
|
||||||
|
|
||||||
items << SearchVideo.new(
|
items << SearchVideo.new(
|
||||||
title: title,
|
title: title,
|
||||||
id: id,
|
id: id,
|
||||||
@@ -335,7 +368,115 @@ def extract_items(nodeset, ucid = nil)
|
|||||||
length_seconds: length_seconds,
|
length_seconds: length_seconds,
|
||||||
live_now: live_now,
|
live_now: live_now,
|
||||||
paid: paid,
|
paid: paid,
|
||||||
premium: premium
|
premium: premium,
|
||||||
|
premiere_timestamp: premiere_timestamp
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return items
|
||||||
|
end
|
||||||
|
|
||||||
|
def extract_shelf_items(nodeset, ucid = nil, author_name = nil)
|
||||||
|
items = [] of SearchPlaylist
|
||||||
|
|
||||||
|
nodeset.each do |shelf|
|
||||||
|
shelf_anchor = shelf.xpath_node(%q(.//h2[contains(@class, "branded-page-module-title")]))
|
||||||
|
|
||||||
|
if !shelf_anchor
|
||||||
|
next
|
||||||
|
end
|
||||||
|
|
||||||
|
title = shelf_anchor.xpath_node(%q(.//span[contains(@class, "branded-page-module-title-text")]))
|
||||||
|
if title
|
||||||
|
title = title.content.strip
|
||||||
|
end
|
||||||
|
title ||= ""
|
||||||
|
|
||||||
|
id = shelf_anchor.xpath_node(%q(.//a)).try &.["href"]
|
||||||
|
if !id
|
||||||
|
next
|
||||||
|
end
|
||||||
|
|
||||||
|
is_playlist = false
|
||||||
|
videos = [] of SearchPlaylistVideo
|
||||||
|
|
||||||
|
shelf.xpath_nodes(%q(.//ul[contains(@class, "yt-uix-shelfslider-list")]/li)).each do |child_node|
|
||||||
|
type = child_node.xpath_node(%q(./div))
|
||||||
|
if !type
|
||||||
|
next
|
||||||
|
end
|
||||||
|
|
||||||
|
case type["class"]
|
||||||
|
when .includes? "yt-lockup-video"
|
||||||
|
is_playlist = true
|
||||||
|
|
||||||
|
anchor = child_node.xpath_node(%q(.//h3[contains(@class, "yt-lockup-title")]/a))
|
||||||
|
if anchor
|
||||||
|
video_title = anchor.content.strip
|
||||||
|
video_id = HTTP::Params.parse(URI.parse(anchor["href"]).query.not_nil!)["v"]
|
||||||
|
end
|
||||||
|
video_title ||= ""
|
||||||
|
video_id ||= ""
|
||||||
|
|
||||||
|
anchor = child_node.xpath_node(%q(.//span[@class="video-time"]))
|
||||||
|
if anchor
|
||||||
|
length_seconds = decode_length_seconds(anchor.content)
|
||||||
|
end
|
||||||
|
length_seconds ||= 0
|
||||||
|
|
||||||
|
videos << SearchPlaylistVideo.new(
|
||||||
|
video_title,
|
||||||
|
video_id,
|
||||||
|
length_seconds
|
||||||
|
)
|
||||||
|
when .includes? "yt-lockup-playlist"
|
||||||
|
anchor = child_node.xpath_node(%q(.//h3[contains(@class, "yt-lockup-title")]/a))
|
||||||
|
if anchor
|
||||||
|
playlist_title = anchor.content.strip
|
||||||
|
params = HTTP::Params.parse(URI.parse(anchor["href"]).query.not_nil!)
|
||||||
|
plid = params["list"]
|
||||||
|
end
|
||||||
|
playlist_title ||= ""
|
||||||
|
plid ||= ""
|
||||||
|
|
||||||
|
playlist_thumbnail = child_node.xpath_node(%q(.//span/img)).try &.["data-thumb"]?
|
||||||
|
playlist_thumbnail ||= child_node.xpath_node(%q(.//span/img)).try &.["src"]
|
||||||
|
if !playlist_thumbnail || playlist_thumbnail.empty?
|
||||||
|
thumbnail_id = videos[0]?.try &.id
|
||||||
|
else
|
||||||
|
thumbnail_id = playlist_thumbnail.match(/\/vi\/(?<video_id>[a-zA-Z0-9_-]{11})\/\w+\.jpg/).try &.["video_id"]
|
||||||
|
end
|
||||||
|
|
||||||
|
video_count_label = child_node.xpath_node(%q(.//span[@class="formatted-video-count-label"]))
|
||||||
|
if video_count_label
|
||||||
|
video_count = video_count_label.content.strip.match(/^\d+/).try &.[0].to_i?
|
||||||
|
end
|
||||||
|
video_count ||= 50
|
||||||
|
|
||||||
|
items << SearchPlaylist.new(
|
||||||
|
playlist_title,
|
||||||
|
plid,
|
||||||
|
author_name,
|
||||||
|
ucid,
|
||||||
|
video_count,
|
||||||
|
Array(SearchPlaylistVideo).new,
|
||||||
|
thumbnail_id
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if is_playlist
|
||||||
|
plid = HTTP::Params.parse(URI.parse(id).query.not_nil!)["list"]
|
||||||
|
|
||||||
|
items << SearchPlaylist.new(
|
||||||
|
title,
|
||||||
|
plid,
|
||||||
|
author_name,
|
||||||
|
ucid,
|
||||||
|
videos.size,
|
||||||
|
videos,
|
||||||
|
videos[0].try &.id
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
248
src/invidious/helpers/json_filter.cr
Normal file
248
src/invidious/helpers/json_filter.cr
Normal file
@@ -0,0 +1,248 @@
|
|||||||
|
module JSONFilter
|
||||||
|
alias BracketIndex = Hash(Int64, Int64)
|
||||||
|
|
||||||
|
alias GroupedFieldsValue = String | Array(GroupedFieldsValue)
|
||||||
|
alias GroupedFieldsList = Array(GroupedFieldsValue)
|
||||||
|
|
||||||
|
class FieldsParser
|
||||||
|
class ParseError < Exception
|
||||||
|
end
|
||||||
|
|
||||||
|
# Returns the `Regex` pattern used to match nest groups
|
||||||
|
def self.nest_group_pattern : Regex
|
||||||
|
# uses a '.' character to match json keys as they are allowed
|
||||||
|
# to contain any unicode codepoint
|
||||||
|
/(?:|,)(?<groupname>[^,\n]*?)\(/
|
||||||
|
end
|
||||||
|
|
||||||
|
# Returns the `Regex` pattern used to check if there are any empty nest groups
|
||||||
|
def self.unnamed_nest_group_pattern : Regex
|
||||||
|
/^\(|\(\(|\/\(/
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.parse_fields(fields_text : String) : Nil
|
||||||
|
if fields_text.empty?
|
||||||
|
raise FieldsParser::ParseError.new "Fields is empty"
|
||||||
|
end
|
||||||
|
|
||||||
|
opening_bracket_count = fields_text.count('(')
|
||||||
|
closing_bracket_count = fields_text.count(')')
|
||||||
|
|
||||||
|
if opening_bracket_count != closing_bracket_count
|
||||||
|
bracket_type = opening_bracket_count > closing_bracket_count ? "opening" : "closing"
|
||||||
|
raise FieldsParser::ParseError.new "There are too many #{bracket_type} brackets (#{opening_bracket_count}:#{closing_bracket_count})"
|
||||||
|
elsif match_result = unnamed_nest_group_pattern.match(fields_text)
|
||||||
|
raise FieldsParser::ParseError.new "Unnamed nest group at position #{match_result.begin}"
|
||||||
|
end
|
||||||
|
|
||||||
|
# first, handle top-level single nested properties: items/id, playlistItems/snippet, etc
|
||||||
|
parse_single_nests(fields_text) { |nest_list| yield nest_list }
|
||||||
|
|
||||||
|
# next, handle nest groups: items(id, etag, etc)
|
||||||
|
parse_nest_groups(fields_text) { |nest_list| yield nest_list }
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.parse_single_nests(fields_text : String) : Nil
|
||||||
|
single_nests = remove_nest_groups(fields_text)
|
||||||
|
|
||||||
|
if !single_nests.empty?
|
||||||
|
property_nests = single_nests.split(',')
|
||||||
|
|
||||||
|
property_nests.each do |nest|
|
||||||
|
nest_list = nest.split('/')
|
||||||
|
if nest_list.includes? ""
|
||||||
|
raise FieldsParser::ParseError.new "Empty key in nest list: #{nest_list}"
|
||||||
|
end
|
||||||
|
yield nest_list
|
||||||
|
end
|
||||||
|
# else
|
||||||
|
# raise FieldsParser::ParseError.new "Empty key in nest list 22: #{fields_text} | #{single_nests}"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.parse_nest_groups(fields_text : String) : Nil
|
||||||
|
nest_stack = [] of NamedTuple(group_name: String, closing_bracket_index: Int64)
|
||||||
|
bracket_pairs = get_bracket_pairs(fields_text, true)
|
||||||
|
|
||||||
|
text_index = 0
|
||||||
|
regex_index = 0
|
||||||
|
|
||||||
|
while regex_result = self.nest_group_pattern.match(fields_text, regex_index)
|
||||||
|
raw_match = regex_result[0]
|
||||||
|
group_name = regex_result["groupname"]
|
||||||
|
|
||||||
|
text_index = regex_result.begin
|
||||||
|
regex_index = regex_result.end
|
||||||
|
|
||||||
|
if text_index.nil? || regex_index.nil?
|
||||||
|
raise FieldsParser::ParseError.new "Received invalid index while parsing nest groups: text_index: #{text_index} | regex_index: #{regex_index}"
|
||||||
|
end
|
||||||
|
|
||||||
|
offset = raw_match.starts_with?(',') ? 1 : 0
|
||||||
|
|
||||||
|
opening_bracket_index = (text_index + group_name.size) + offset
|
||||||
|
closing_bracket_index = bracket_pairs[opening_bracket_index]
|
||||||
|
content_start = opening_bracket_index + 1
|
||||||
|
|
||||||
|
content = fields_text[content_start...closing_bracket_index]
|
||||||
|
|
||||||
|
if content.empty?
|
||||||
|
raise FieldsParser::ParseError.new "Empty nest group at position #{content_start}"
|
||||||
|
else
|
||||||
|
content = remove_nest_groups(content)
|
||||||
|
end
|
||||||
|
|
||||||
|
while nest_stack.size > 0 && closing_bracket_index > nest_stack[nest_stack.size - 1][:closing_bracket_index]
|
||||||
|
if nest_stack.size
|
||||||
|
nest_stack.pop
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
group_name.split('/').each do |group_name|
|
||||||
|
nest_stack.push({
|
||||||
|
group_name: group_name,
|
||||||
|
closing_bracket_index: closing_bracket_index,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
if !content.empty?
|
||||||
|
properties = content.split(',')
|
||||||
|
|
||||||
|
properties.each do |prop|
|
||||||
|
nest_list = nest_stack.map { |nest_prop| nest_prop[:group_name] }
|
||||||
|
|
||||||
|
if !prop.empty?
|
||||||
|
if prop.includes?('/')
|
||||||
|
parse_single_nests(prop) { |list| nest_list += list }
|
||||||
|
else
|
||||||
|
nest_list.push prop
|
||||||
|
end
|
||||||
|
else
|
||||||
|
raise FieldsParser::ParseError.new "Empty key in nest list: #{nest_list << prop}"
|
||||||
|
end
|
||||||
|
|
||||||
|
yield nest_list
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.remove_nest_groups(text : String) : String
|
||||||
|
content_bracket_pairs = get_bracket_pairs(text, false)
|
||||||
|
|
||||||
|
content_bracket_pairs.each_key.to_a.reverse.each do |opening_bracket|
|
||||||
|
closing_bracket = content_bracket_pairs[opening_bracket]
|
||||||
|
last_comma = text.rindex(',', opening_bracket) || 0
|
||||||
|
|
||||||
|
text = text[0...last_comma] + text[closing_bracket + 1...text.size]
|
||||||
|
end
|
||||||
|
|
||||||
|
return text.starts_with?(',') ? text[1...text.size] : text
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.get_bracket_pairs(text : String, recursive = true) : BracketIndex
|
||||||
|
istart = [] of Int64
|
||||||
|
bracket_index = BracketIndex.new
|
||||||
|
|
||||||
|
text.each_char_with_index do |char, index|
|
||||||
|
if char == '('
|
||||||
|
istart.push(index.to_i64)
|
||||||
|
end
|
||||||
|
|
||||||
|
if char == ')'
|
||||||
|
begin
|
||||||
|
opening = istart.pop
|
||||||
|
if recursive || (!recursive && istart.size == 0)
|
||||||
|
bracket_index[opening] = index.to_i64
|
||||||
|
end
|
||||||
|
rescue
|
||||||
|
raise FieldsParser::ParseError.new "No matching opening parenthesis at: #{index}"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if istart.size != 0
|
||||||
|
idx = istart.pop
|
||||||
|
raise FieldsParser::ParseError.new "No matching closing parenthesis at: #{idx}"
|
||||||
|
end
|
||||||
|
|
||||||
|
return bracket_index
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
class FieldsGrouper
|
||||||
|
alias SkeletonValue = Hash(String, SkeletonValue)
|
||||||
|
|
||||||
|
def self.create_json_skeleton(fields_text : String) : SkeletonValue
|
||||||
|
root_hash = {} of String => SkeletonValue
|
||||||
|
|
||||||
|
FieldsParser.parse_fields(fields_text) do |nest_list|
|
||||||
|
current_item = root_hash
|
||||||
|
nest_list.each do |key|
|
||||||
|
if current_item[key]?
|
||||||
|
current_item = current_item[key]
|
||||||
|
else
|
||||||
|
current_item[key] = {} of String => SkeletonValue
|
||||||
|
current_item = current_item[key]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
root_hash
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.create_grouped_fields_list(json_skeleton : SkeletonValue) : GroupedFieldsList
|
||||||
|
grouped_fields_list = GroupedFieldsList.new
|
||||||
|
json_skeleton.each do |key, value|
|
||||||
|
grouped_fields_list.push key
|
||||||
|
|
||||||
|
nested_keys = create_grouped_fields_list(value)
|
||||||
|
grouped_fields_list.push nested_keys unless nested_keys.empty?
|
||||||
|
end
|
||||||
|
return grouped_fields_list
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
class FilterError < Exception
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.filter(item : JSON::Any, fields_text : String, in_place : Bool = true)
|
||||||
|
skeleton = FieldsGrouper.create_json_skeleton(fields_text)
|
||||||
|
grouped_fields_list = FieldsGrouper.create_grouped_fields_list(skeleton)
|
||||||
|
filter(item, grouped_fields_list, in_place)
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.filter(item : JSON::Any, grouped_fields_list : GroupedFieldsList, in_place : Bool = true) : JSON::Any
|
||||||
|
item = item.clone unless in_place
|
||||||
|
|
||||||
|
if !item.as_h? && !item.as_a?
|
||||||
|
raise FilterError.new "Can't filter '#{item}' by #{grouped_fields_list}"
|
||||||
|
end
|
||||||
|
|
||||||
|
top_level_keys = Array(String).new
|
||||||
|
grouped_fields_list.each do |value|
|
||||||
|
if value.is_a? String
|
||||||
|
top_level_keys.push value
|
||||||
|
elsif value.is_a? Array
|
||||||
|
if !top_level_keys.empty?
|
||||||
|
key_to_filter = top_level_keys.last
|
||||||
|
|
||||||
|
if item.as_h?
|
||||||
|
filter(item[key_to_filter], value, in_place: true)
|
||||||
|
elsif item.as_a?
|
||||||
|
item.as_a.each { |arr_item| filter(arr_item[key_to_filter], value, in_place: true) }
|
||||||
|
end
|
||||||
|
else
|
||||||
|
raise FilterError.new "Tried to filter while top level keys list is empty"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if item.as_h?
|
||||||
|
item.as_h.select! top_level_keys
|
||||||
|
elsif item.as_a?
|
||||||
|
item.as_a.map { |value| filter(value, top_level_keys, in_place: true) }
|
||||||
|
end
|
||||||
|
|
||||||
|
item
|
||||||
|
end
|
||||||
|
end
|
||||||
35
src/invidious/helpers/logger.cr
Normal file
35
src/invidious/helpers/logger.cr
Normal 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
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
macro add_mapping(mapping)
|
macro db_mapping(mapping)
|
||||||
def initialize({{*mapping.keys.map { |id| "@#{id}".id }}})
|
def initialize({{*mapping.keys.map { |id| "@#{id}".id }}})
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -9,6 +9,33 @@ macro add_mapping(mapping)
|
|||||||
DB.mapping({{mapping}})
|
DB.mapping({{mapping}})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
macro json_mapping(mapping)
|
||||||
|
def initialize({{*mapping.keys.map { |id| "@#{id}".id }}})
|
||||||
|
end
|
||||||
|
|
||||||
|
def to_a
|
||||||
|
return [{{*mapping.keys.map { |id| "@#{id}".id }}}]
|
||||||
|
end
|
||||||
|
|
||||||
|
JSON.mapping({{mapping}})
|
||||||
|
YAML.mapping({{mapping}})
|
||||||
|
end
|
||||||
|
|
||||||
|
macro yaml_mapping(mapping)
|
||||||
|
def initialize({{*mapping.keys.map { |id| "@#{id}".id }}})
|
||||||
|
end
|
||||||
|
|
||||||
|
def to_a
|
||||||
|
return [{{*mapping.keys.map { |id| "@#{id}".id }}}]
|
||||||
|
end
|
||||||
|
|
||||||
|
def to_tuple
|
||||||
|
return { {{*mapping.keys.map { |id| "@#{id}".id }}} }
|
||||||
|
end
|
||||||
|
|
||||||
|
YAML.mapping({{mapping}})
|
||||||
|
end
|
||||||
|
|
||||||
macro templated(filename, template = "template")
|
macro templated(filename, template = "template")
|
||||||
render "src/invidious/views/#{{{filename}}}.ecr", "src/invidious/views/#{{{template}}}.ecr"
|
render "src/invidious/views/#{{{filename}}}.ecr", "src/invidious/views/#{{{template}}}.ecr"
|
||||||
end
|
end
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -136,37 +136,49 @@ def decode_date(string : String)
|
|||||||
return Time.now - delta
|
return Time.now - delta
|
||||||
end
|
end
|
||||||
|
|
||||||
def recode_date(time : Time)
|
def recode_date(time : Time, locale)
|
||||||
span = Time.now - time
|
span = Time.now - time
|
||||||
|
|
||||||
if span.total_days > 365.0
|
if span.total_days > 365.0
|
||||||
span = {span.total_days / 365, "year"}
|
span = translate(locale, "`x` years", (span.total_days.to_i / 365).to_s)
|
||||||
elsif span.total_days > 30.0
|
elsif span.total_days > 30.0
|
||||||
span = {span.total_days / 30, "month"}
|
span = translate(locale, "`x` months", (span.total_days.to_i / 30).to_s)
|
||||||
elsif span.total_days > 7.0
|
elsif span.total_days > 7.0
|
||||||
span = {span.total_days / 7, "week"}
|
span = translate(locale, "`x` weeks", (span.total_days.to_i / 7).to_s)
|
||||||
elsif span.total_hours > 24.0
|
elsif span.total_hours > 24.0
|
||||||
span = {span.total_days, "day"}
|
span = translate(locale, "`x` days", (span.total_days.to_i).to_s)
|
||||||
elsif span.total_minutes > 60.0
|
elsif span.total_minutes > 60.0
|
||||||
span = {span.total_hours, "hour"}
|
span = translate(locale, "`x` hours", (span.total_hours.to_i).to_s)
|
||||||
elsif span.total_seconds > 60.0
|
elsif span.total_seconds > 60.0
|
||||||
span = {span.total_minutes, "minute"}
|
span = translate(locale, "`x` minutes", (span.total_minutes.to_i).to_s)
|
||||||
else
|
else
|
||||||
span = {span.total_seconds, "second"}
|
span = translate(locale, "`x` seconds", (span.total_seconds.to_i).to_s)
|
||||||
end
|
end
|
||||||
|
|
||||||
span = {span[0].to_i, span[1]}
|
return span
|
||||||
if span[0] > 1
|
|
||||||
span = {span[0], span[1] + "s"}
|
|
||||||
end
|
|
||||||
|
|
||||||
return span.join(" ")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def number_with_separator(number)
|
def number_with_separator(number)
|
||||||
number.to_s.reverse.gsub(/(\d{3})(?=\d)/, "\\1,").reverse
|
number.to_s.reverse.gsub(/(\d{3})(?=\d)/, "\\1,").reverse
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def short_text_to_number(short_text)
|
||||||
|
case short_text
|
||||||
|
when .ends_with? "M"
|
||||||
|
number = short_text.rstrip(" mM").to_f
|
||||||
|
number *= 1000000
|
||||||
|
when .ends_with? "K"
|
||||||
|
number = short_text.rstrip(" kK").to_f
|
||||||
|
number *= 1000
|
||||||
|
else
|
||||||
|
number = short_text.rstrip(" ")
|
||||||
|
end
|
||||||
|
|
||||||
|
number = number.to_i
|
||||||
|
|
||||||
|
return number
|
||||||
|
end
|
||||||
|
|
||||||
def number_to_short_text(number)
|
def number_to_short_text(number)
|
||||||
seperated = number_with_separator(number).gsub(",", ".").split("")
|
seperated = number_with_separator(number).gsub(",", ".").split("")
|
||||||
text = seperated.first(2).join
|
text = seperated.first(2).join
|
||||||
@@ -198,16 +210,30 @@ def arg_array(array, start = 1)
|
|||||||
return args
|
return args
|
||||||
end
|
end
|
||||||
|
|
||||||
def make_host_url(ssl, host)
|
def make_host_url(config, kemal_config)
|
||||||
|
ssl = config.https_only || kemal_config.ssl
|
||||||
|
port = config.external_port || kemal_config.port
|
||||||
|
|
||||||
if ssl
|
if ssl
|
||||||
scheme = "https://"
|
scheme = "https://"
|
||||||
else
|
else
|
||||||
scheme = "http://"
|
scheme = "http://"
|
||||||
end
|
end
|
||||||
|
|
||||||
host ||= "invidio.us"
|
# Add if non-standard port
|
||||||
|
if port != 80 && port != 443
|
||||||
|
port = ":#{kemal_config.port}"
|
||||||
|
else
|
||||||
|
port = ""
|
||||||
|
end
|
||||||
|
|
||||||
return "#{scheme}#{host}"
|
if !config.domain
|
||||||
|
return ""
|
||||||
|
end
|
||||||
|
|
||||||
|
host = config.domain.not_nil!.lchop(".")
|
||||||
|
|
||||||
|
return "#{scheme}#{host}#{port}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_referer(env, fallback = "/")
|
def get_referer(env, fallback = "/")
|
||||||
@@ -242,21 +268,21 @@ def get_referer(env, fallback = "/")
|
|||||||
end
|
end
|
||||||
|
|
||||||
def read_var_int(bytes)
|
def read_var_int(bytes)
|
||||||
numRead = 0
|
num_read = 0
|
||||||
result = 0
|
result = 0
|
||||||
|
|
||||||
read = bytes[numRead]
|
read = bytes[num_read]
|
||||||
|
|
||||||
if bytes.size == 1
|
if bytes.size == 1
|
||||||
result = bytes[0].to_i32
|
result = bytes[0].to_i32
|
||||||
else
|
else
|
||||||
while ((read & 0b10000000) != 0)
|
while ((read & 0b10000000) != 0)
|
||||||
read = bytes[numRead].to_u64
|
read = bytes[num_read].to_u64
|
||||||
value = (read & 0b01111111)
|
value = (read & 0b01111111)
|
||||||
result |= (value << (7 * numRead))
|
result |= (value << (7 * num_read))
|
||||||
|
|
||||||
numRead += 1
|
num_read += 1
|
||||||
if numRead > 5
|
if num_read > 5
|
||||||
raise "VarInt is too big"
|
raise "VarInt is too big"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -284,7 +310,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)
|
||||||
|
|||||||
@@ -1,52 +1,4 @@
|
|||||||
def crawl_videos(db)
|
def refresh_channels(db, logger, max_threads = 1, full_refresh = false)
|
||||||
ids = Deque(String).new
|
|
||||||
random = Random.new
|
|
||||||
|
|
||||||
search(random.base64(3)).as(Tuple)[1].each do |video|
|
|
||||||
if video.is_a?(SearchVideo)
|
|
||||||
ids << video.id
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
loop do
|
|
||||||
if ids.empty?
|
|
||||||
search(random.base64(3)).as(Tuple)[1].each do |video|
|
|
||||||
if video.is_a?(SearchVideo)
|
|
||||||
ids << video.id
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
begin
|
|
||||||
id = ids[0]
|
|
||||||
video = get_video(id, db)
|
|
||||||
rescue ex
|
|
||||||
STDOUT << id << " : " << ex.message << "\n"
|
|
||||||
next
|
|
||||||
ensure
|
|
||||||
ids.delete(id)
|
|
||||||
end
|
|
||||||
|
|
||||||
rvs = [] of Hash(String, String)
|
|
||||||
video.info["rvs"]?.try &.split(",").each do |rv|
|
|
||||||
rvs << HTTP::Params.parse(rv).to_h
|
|
||||||
end
|
|
||||||
|
|
||||||
rvs.each do |rv|
|
|
||||||
if rv.has_key?("id") && !db.query_one?("SELECT EXISTS (SELECT true FROM videos WHERE id = $1)", rv["id"], as: Bool)
|
|
||||||
ids.delete(id)
|
|
||||||
ids << rv["id"]
|
|
||||||
if ids.size == 150
|
|
||||||
ids.shift
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
Fiber.yield
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def refresh_channels(db, max_threads = 1, full_refresh = false)
|
|
||||||
max_channel = Channel(Int32).new
|
max_channel = Channel(Int32).new
|
||||||
|
|
||||||
spawn do
|
spawn do
|
||||||
@@ -68,43 +20,29 @@ def refresh_channels(db, max_threads = 1, full_refresh = false)
|
|||||||
active_threads += 1
|
active_threads += 1
|
||||||
spawn do
|
spawn do
|
||||||
begin
|
begin
|
||||||
client = make_client(YT_URL)
|
channel = fetch_channel(id, db, full_refresh)
|
||||||
channel = fetch_channel(id, client, db, full_refresh)
|
|
||||||
|
|
||||||
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, deleted = false WHERE id = $3", Time.now, channel.author, id)
|
||||||
rescue ex
|
rescue ex
|
||||||
STDOUT << id << " : " << ex.message << "\n"
|
if ex.message == "Deleted or invalid channel"
|
||||||
|
db.exec("UPDATE channels SET updated = $1, deleted = true WHERE id = $2", Time.now, id)
|
||||||
|
end
|
||||||
|
logger.write("#{id} : #{ex.message}\n")
|
||||||
end
|
end
|
||||||
|
|
||||||
active_channel.send(true)
|
active_channel.send(true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
sleep 1.minute
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
max_channel.send(max_threads)
|
max_channel.send(max_threads)
|
||||||
end
|
end
|
||||||
|
|
||||||
def refresh_videos(db)
|
def refresh_feeds(db, logger, max_threads = 1)
|
||||||
loop do
|
|
||||||
db.query("SELECT id FROM videos ORDER BY updated") do |rs|
|
|
||||||
rs.each do
|
|
||||||
begin
|
|
||||||
id = rs.read(String)
|
|
||||||
video = get_video(id, db)
|
|
||||||
rescue ex
|
|
||||||
STDOUT << id << " : " << ex.message << "\n"
|
|
||||||
next
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
Fiber.yield
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def refresh_feeds(db, max_threads = 1)
|
|
||||||
max_channel = Channel(Int32).new
|
max_channel = Channel(Int32).new
|
||||||
|
|
||||||
spawn do
|
spawn do
|
||||||
@@ -127,34 +65,98 @@ def refresh_feeds(db, max_threads = 1)
|
|||||||
active_threads += 1
|
active_threads += 1
|
||||||
spawn do
|
spawn do
|
||||||
begin
|
begin
|
||||||
|
db.query("SELECT * FROM #{view_name} LIMIT 1") do |rs|
|
||||||
|
# View doesn't contain same number of rows as ChannelVideo
|
||||||
|
if ChannelVideo.from_rs(rs)[0]?.try &.to_a.size.try &.!= rs.column_count
|
||||||
|
db.exec("DROP MATERIALIZED VIEW #{view_name}")
|
||||||
|
raise "valid schema does not exist"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
db.exec("REFRESH MATERIALIZED VIEW #{view_name}")
|
db.exec("REFRESH MATERIALIZED VIEW #{view_name}")
|
||||||
rescue ex
|
rescue ex
|
||||||
STDOUT << "REFRESH " << email << " : " << ex.message << "\n"
|
# Create view if it doesn't exist
|
||||||
|
if ex.message.try &.ends_with?("does not exist")
|
||||||
|
# While iterating through, we may have an email stored from a deleted account
|
||||||
|
if db.query_one?("SELECT true FROM users WHERE email = $1", email, as: Bool)
|
||||||
|
db.exec("CREATE MATERIALIZED VIEW #{view_name} AS \
|
||||||
|
SELECT * FROM channel_videos WHERE \
|
||||||
|
ucid = ANY ((SELECT subscriptions FROM users WHERE email = E'#{email.gsub("'", "\\'")}')::text[]) \
|
||||||
|
ORDER BY published DESC;")
|
||||||
|
logger.write("CREATE #{view_name}\n")
|
||||||
|
end
|
||||||
|
else
|
||||||
|
logger.write("REFRESH #{email} : #{ex.message}\n")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
active_channel.send(true)
|
active_channel.send(true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
sleep 1.minute
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
max_channel.send(max_threads)
|
max_channel.send(max_threads)
|
||||||
end
|
end
|
||||||
|
|
||||||
def pull_top_videos(config, db)
|
def subscribe_to_feeds(db, logger, key, config)
|
||||||
if config.dl_api_key
|
if config.use_pubsub_feeds
|
||||||
DetectLanguage.configure do |dl_config|
|
case config.use_pubsub_feeds
|
||||||
dl_config.api_key = config.dl_api_key.not_nil!
|
when Bool
|
||||||
|
max_threads = config.use_pubsub_feeds.as(Bool).to_unsafe
|
||||||
|
when Int32
|
||||||
|
max_threads = config.use_pubsub_feeds.as(Int32)
|
||||||
end
|
end
|
||||||
filter = true
|
max_channel = Channel(Int32).new
|
||||||
|
|
||||||
|
spawn do
|
||||||
|
max_threads = max_channel.receive
|
||||||
|
active_threads = 0
|
||||||
|
active_channel = Channel(Bool).new
|
||||||
|
|
||||||
|
loop do
|
||||||
|
db.query_all("SELECT id FROM channels WHERE CURRENT_TIMESTAMP - subscribed > interval '4 days' OR subscribed IS NULL") do |rs|
|
||||||
|
rs.each do
|
||||||
|
ucid = rs.read(String)
|
||||||
|
|
||||||
|
if active_threads >= max_threads.as(Int32)
|
||||||
|
if active_channel.receive
|
||||||
|
active_threads -= 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
active_threads += 1
|
||||||
|
|
||||||
|
spawn do
|
||||||
|
begin
|
||||||
|
response = subscribe_pubsub(ucid, key, config)
|
||||||
|
|
||||||
|
if response.status_code >= 400
|
||||||
|
logger.write("#{ucid} : #{response.body}\n")
|
||||||
|
end
|
||||||
|
rescue ex
|
||||||
|
end
|
||||||
|
|
||||||
|
active_channel.send(true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
sleep 1.minute
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
max_channel.send(max_threads.as(Int32))
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
filter ||= false
|
def pull_top_videos(config, db)
|
||||||
|
|
||||||
loop do
|
loop do
|
||||||
begin
|
begin
|
||||||
top = rank_videos(db, 40, filter, YT_URL)
|
top = rank_videos(db, 40)
|
||||||
rescue ex
|
rescue ex
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
@@ -176,22 +178,22 @@ def pull_top_videos(config, db)
|
|||||||
end
|
end
|
||||||
|
|
||||||
yield videos
|
yield videos
|
||||||
Fiber.yield
|
sleep 1.minute
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def pull_popular_videos(db)
|
def pull_popular_videos(db)
|
||||||
loop do
|
loop do
|
||||||
subscriptions = PG_DB.query_all("SELECT channel FROM \
|
subscriptions = db.query_all("SELECT channel FROM \
|
||||||
(SELECT UNNEST(subscriptions) AS channel FROM users) AS d \
|
(SELECT UNNEST(subscriptions) AS channel FROM users) AS d \
|
||||||
GROUP BY channel ORDER BY COUNT(channel) DESC LIMIT 40", as: String)
|
GROUP BY channel ORDER BY COUNT(channel) DESC LIMIT 40", as: String)
|
||||||
|
|
||||||
videos = PG_DB.query_all("SELECT DISTINCT ON (ucid) * FROM \
|
videos = db.query_all("SELECT DISTINCT ON (ucid) * FROM \
|
||||||
channel_videos WHERE ucid IN (#{arg_array(subscriptions)}) \
|
channel_videos WHERE ucid IN (#{arg_array(subscriptions)}) \
|
||||||
ORDER BY ucid, published DESC", subscriptions, as: ChannelVideo).sort_by { |video| video.published }.reverse
|
ORDER BY ucid, published DESC", subscriptions, as: ChannelVideo).sort_by { |video| video.published }.reverse
|
||||||
|
|
||||||
yield videos
|
yield videos
|
||||||
Fiber.yield
|
sleep 1.minute
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -204,6 +206,7 @@ def update_decrypt_function
|
|||||||
end
|
end
|
||||||
|
|
||||||
yield decrypt_function
|
yield decrypt_function
|
||||||
|
sleep 1.minute
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -215,7 +218,8 @@ def find_working_proxies(regions)
|
|||||||
# proxies = filter_proxies(proxies)
|
# proxies = filter_proxies(proxies)
|
||||||
|
|
||||||
yield region, proxies
|
yield region, proxies
|
||||||
Fiber.yield
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
sleep 1.minute
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class MixVideo
|
struct MixVideo
|
||||||
add_mapping({
|
db_mapping({
|
||||||
title: String,
|
title: String,
|
||||||
id: String,
|
id: String,
|
||||||
author: String,
|
author: String,
|
||||||
@@ -10,8 +10,8 @@ class MixVideo
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
class Mix
|
struct Mix
|
||||||
add_mapping({
|
db_mapping({
|
||||||
title: String,
|
title: String,
|
||||||
id: String,
|
id: String,
|
||||||
videos: Array(MixVideo),
|
videos: Array(MixVideo),
|
||||||
@@ -43,8 +43,10 @@ def fetch_mix(rdid, video_id, cookies = nil, locale = nil)
|
|||||||
mix_title = playlist["title"].as_s
|
mix_title = playlist["title"].as_s
|
||||||
|
|
||||||
contents = playlist["contents"].as_a
|
contents = playlist["contents"].as_a
|
||||||
until contents[0]["playlistPanelVideoRenderer"]["videoId"].as_s == video_id
|
if contents.map { |video| video["playlistPanelVideoRenderer"]["videoId"] }.includes? video_id
|
||||||
contents.shift
|
until contents[0]["playlistPanelVideoRenderer"]["videoId"].as_s == video_id
|
||||||
|
contents.shift
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
videos = [] of MixVideo
|
videos = [] of MixVideo
|
||||||
@@ -52,7 +54,10 @@ def fetch_mix(rdid, video_id, cookies = nil, locale = nil)
|
|||||||
item = item["playlistPanelVideoRenderer"]
|
item = item["playlistPanelVideoRenderer"]
|
||||||
|
|
||||||
id = item["videoId"].as_s
|
id = item["videoId"].as_s
|
||||||
title = item["title"]["simpleText"].as_s
|
title = item["title"]?.try &.["simpleText"].as_s
|
||||||
|
if !title
|
||||||
|
next
|
||||||
|
end
|
||||||
author = item["longBylineText"]["runs"][0]["text"].as_s
|
author = item["longBylineText"]["runs"][0]["text"].as_s
|
||||||
ucid = item["longBylineText"]["runs"][0]["navigationEndpoint"]["browseEndpoint"]["browseId"].as_s
|
ucid = item["longBylineText"]["runs"][0]["navigationEndpoint"]["browseEndpoint"]["browseId"].as_s
|
||||||
length_seconds = decode_length_seconds(item["lengthText"]["simpleText"].as_s)
|
length_seconds = decode_length_seconds(item["lengthText"]["simpleText"].as_s)
|
||||||
@@ -94,7 +99,10 @@ def template_mix(mix)
|
|||||||
html += <<-END_HTML
|
html += <<-END_HTML
|
||||||
<li class="pure-menu-item">
|
<li class="pure-menu-item">
|
||||||
<a href="/watch?v=#{video["videoId"]}&list=#{mix["mixId"]}">
|
<a href="/watch?v=#{video["videoId"]}&list=#{mix["mixId"]}">
|
||||||
<img style="width:100%;" src="/vi/#{video["videoId"]}/mqdefault.jpg">
|
<div class="thumbnail">
|
||||||
|
<img class="thumbnail" src="/vi/#{video["videoId"]}/mqdefault.jpg">
|
||||||
|
<p class="length">#{recode_length_seconds(video["lengthSeconds"].as_i)}</p>
|
||||||
|
</div>
|
||||||
<p style="width:100%">#{video["title"]}</p>
|
<p style="width:100%">#{video["title"]}</p>
|
||||||
<p>
|
<p>
|
||||||
<b style="width: 100%">#{video["author"]}</b>
|
<b style="width: 100%">#{video["author"]}</b>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class PlaylistVideo
|
struct PlaylistVideo
|
||||||
add_mapping({
|
db_mapping({
|
||||||
title: String,
|
title: String,
|
||||||
id: String,
|
id: String,
|
||||||
author: String,
|
author: String,
|
||||||
@@ -8,11 +8,12 @@ class PlaylistVideo
|
|||||||
published: Time,
|
published: Time,
|
||||||
playlists: Array(String),
|
playlists: Array(String),
|
||||||
index: Int32,
|
index: Int32,
|
||||||
|
live_now: Bool,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
class Playlist
|
struct Playlist
|
||||||
add_mapping({
|
db_mapping({
|
||||||
title: String,
|
title: String,
|
||||||
id: String,
|
id: String,
|
||||||
author: String,
|
author: String,
|
||||||
@@ -101,8 +102,10 @@ def extract_playlist(plid, nodeset, index)
|
|||||||
anchor = video.xpath_node(%q(.//td[@class="pl-video-time"]/div/div[1]))
|
anchor = video.xpath_node(%q(.//td[@class="pl-video-time"]/div/div[1]))
|
||||||
if anchor && !anchor.content.empty?
|
if anchor && !anchor.content.empty?
|
||||||
length_seconds = decode_length_seconds(anchor.content)
|
length_seconds = decode_length_seconds(anchor.content)
|
||||||
|
live_now = false
|
||||||
else
|
else
|
||||||
length_seconds = 0
|
length_seconds = 0
|
||||||
|
live_now = true
|
||||||
end
|
end
|
||||||
|
|
||||||
videos << PlaylistVideo.new(
|
videos << PlaylistVideo.new(
|
||||||
@@ -114,6 +117,7 @@ def extract_playlist(plid, nodeset, index)
|
|||||||
published: Time.now,
|
published: Time.now,
|
||||||
playlists: [plid],
|
playlists: [plid],
|
||||||
index: index + offset,
|
index: index + offset,
|
||||||
|
live_now: live_now
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -126,32 +130,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
|
||||||
@@ -229,7 +238,10 @@ def template_playlist(playlist)
|
|||||||
html += <<-END_HTML
|
html += <<-END_HTML
|
||||||
<li class="pure-menu-item">
|
<li class="pure-menu-item">
|
||||||
<a href="/watch?v=#{video["videoId"]}&list=#{playlist["playlistId"]}">
|
<a href="/watch?v=#{video["videoId"]}&list=#{playlist["playlistId"]}">
|
||||||
<img style="width:100%;" src="/vi/#{video["videoId"]}/mqdefault.jpg">
|
<div class="thumbnail">
|
||||||
|
<img class="thumbnail" src="/vi/#{video["videoId"]}/mqdefault.jpg">
|
||||||
|
<p class="length">#{recode_length_seconds(video["lengthSeconds"].as_i)}</p>
|
||||||
|
</div>
|
||||||
<p style="width:100%">#{video["title"]}</p>
|
<p style="width:100%">#{video["title"]}</p>
|
||||||
<p>
|
<p>
|
||||||
<b style="width: 100%">#{video["author"]}</b>
|
<b style="width: 100%">#{video["author"]}</b>
|
||||||
|
|||||||
@@ -1,41 +1,43 @@
|
|||||||
class SearchVideo
|
struct SearchVideo
|
||||||
add_mapping({
|
db_mapping({
|
||||||
title: String,
|
title: String,
|
||||||
id: String,
|
id: String,
|
||||||
author: String,
|
author: String,
|
||||||
ucid: String,
|
ucid: String,
|
||||||
published: Time,
|
published: Time,
|
||||||
views: Int64,
|
views: Int64,
|
||||||
description: String,
|
description: String,
|
||||||
description_html: String,
|
description_html: String,
|
||||||
length_seconds: Int32,
|
length_seconds: Int32,
|
||||||
live_now: Bool,
|
live_now: Bool,
|
||||||
paid: Bool,
|
paid: Bool,
|
||||||
premium: Bool,
|
premium: Bool,
|
||||||
|
premiere_timestamp: Time?,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
class SearchPlaylistVideo
|
struct SearchPlaylistVideo
|
||||||
add_mapping({
|
db_mapping({
|
||||||
title: String,
|
title: String,
|
||||||
id: String,
|
id: String,
|
||||||
length_seconds: Int32,
|
length_seconds: Int32,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
class SearchPlaylist
|
struct SearchPlaylist
|
||||||
add_mapping({
|
db_mapping({
|
||||||
title: String,
|
title: String,
|
||||||
id: String,
|
id: String,
|
||||||
author: String,
|
author: String,
|
||||||
ucid: String,
|
ucid: String,
|
||||||
video_count: Int32,
|
video_count: Int32,
|
||||||
videos: Array(SearchPlaylistVideo),
|
videos: Array(SearchPlaylistVideo),
|
||||||
|
thumbnail_id: String?,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
class SearchChannel
|
struct SearchChannel
|
||||||
add_mapping({
|
db_mapping({
|
||||||
author: String,
|
author: String,
|
||||||
ucid: String,
|
ucid: String,
|
||||||
author_thumbnail: String,
|
author_thumbnail: String,
|
||||||
@@ -85,8 +87,8 @@ def channel_search(query, page, channel)
|
|||||||
return count, items
|
return count, items
|
||||||
end
|
end
|
||||||
|
|
||||||
def search(query, page = 1, search_params = produce_search_params(content_type: "all"))
|
def search(query, page = 1, search_params = produce_search_params(content_type: "all"), proxies = nil, region = nil)
|
||||||
client = make_client(YT_URL)
|
client = make_client(YT_URL, proxies, region)
|
||||||
if query.empty?
|
if query.empty?
|
||||||
return {0, [] of SearchItem}
|
return {0, [] of SearchItem}
|
||||||
end
|
end
|
||||||
@@ -188,7 +190,7 @@ def produce_search_params(sort : String = "relevance", date : String = "", conte
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if body.size > 0
|
if !body.empty?
|
||||||
token = head + "\x12" + body.size.unsafe_chr + body
|
token = head + "\x12" + body.size.unsafe_chr + body
|
||||||
else
|
else
|
||||||
token = head
|
token = head
|
||||||
@@ -203,36 +205,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
|
||||||
|
|||||||
@@ -39,7 +39,12 @@ def fetch_decrypt_function(id = "CvFH_6DNRCY")
|
|||||||
return decrypt_function
|
return decrypt_function
|
||||||
end
|
end
|
||||||
|
|
||||||
def decrypt_signature(a, code)
|
def decrypt_signature(fmt, code)
|
||||||
|
if !fmt["s"]?
|
||||||
|
return ""
|
||||||
|
end
|
||||||
|
|
||||||
|
a = fmt["s"]
|
||||||
a = a.split("")
|
a = a.split("")
|
||||||
|
|
||||||
code.each do |item|
|
code.each do |item|
|
||||||
@@ -53,7 +58,8 @@ def decrypt_signature(a, code)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return a.join("")
|
signature = a.join("")
|
||||||
|
return "&#{fmt["sp"]?}=#{signature}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def splice(a, b)
|
def splice(a, b)
|
||||||
|
|||||||
@@ -1,25 +1,23 @@
|
|||||||
require "crypto/bcrypt/password"
|
require "crypto/bcrypt/password"
|
||||||
|
|
||||||
class User
|
struct User
|
||||||
module PreferencesConverter
|
module PreferencesConverter
|
||||||
def self.from_rs(rs)
|
def self.from_rs(rs)
|
||||||
begin
|
begin
|
||||||
Preferences.from_json(rs.read(String))
|
Preferences.from_json(rs.read(String))
|
||||||
rescue ex
|
rescue ex
|
||||||
DEFAULT_USER_PREFERENCES
|
Preferences.from_json("{}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
add_mapping({
|
db_mapping({
|
||||||
id: Array(String),
|
|
||||||
updated: Time,
|
updated: Time,
|
||||||
notifications: Array(String),
|
notifications: Array(String),
|
||||||
subscriptions: Array(String),
|
subscriptions: Array(String),
|
||||||
email: String,
|
email: String,
|
||||||
preferences: {
|
preferences: {
|
||||||
type: Preferences,
|
type: Preferences,
|
||||||
default: DEFAULT_USER_PREFERENCES,
|
|
||||||
converter: PreferencesConverter,
|
converter: PreferencesConverter,
|
||||||
},
|
},
|
||||||
password: String?,
|
password: String?,
|
||||||
@@ -28,29 +26,7 @@ class User
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
DEFAULT_USER_PREFERENCES = Preferences.from_json({
|
struct Preferences
|
||||||
"video_loop" => false,
|
|
||||||
"autoplay" => false,
|
|
||||||
"continue" => false,
|
|
||||||
"listen" => false,
|
|
||||||
"speed" => 1.0,
|
|
||||||
"quality" => "hd720",
|
|
||||||
"volume" => 100,
|
|
||||||
"comments" => ["youtube", ""],
|
|
||||||
"captions" => ["", "", ""],
|
|
||||||
"related_videos" => true,
|
|
||||||
"redirect_feed" => false,
|
|
||||||
"locale" => "en-US",
|
|
||||||
"dark_mode" => false,
|
|
||||||
"thin_mode" => false,
|
|
||||||
"max_results" => 40,
|
|
||||||
"sort" => "published",
|
|
||||||
"latest_only" => false,
|
|
||||||
"unseen_only" => false,
|
|
||||||
"notifications_only" => false,
|
|
||||||
}.to_json)
|
|
||||||
|
|
||||||
class Preferences
|
|
||||||
module StringToArray
|
module StringToArray
|
||||||
def self.to_json(value : Array(String), json : JSON::Builder)
|
def self.to_json(value : Array(String), json : JSON::Builder)
|
||||||
json.array do
|
json.array do
|
||||||
@@ -72,103 +48,115 @@ class Preferences
|
|||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.to_yaml(value : Array(String), yaml : YAML::Nodes::Builder)
|
||||||
|
yaml.sequence do
|
||||||
|
value.each do |element|
|
||||||
|
yaml.scalar element
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.from_yaml(ctx : YAML::ParseContext, node : YAML::Nodes::Node) : Array(String)
|
||||||
|
begin
|
||||||
|
unless node.is_a?(YAML::Nodes::Sequence)
|
||||||
|
node.raise "Expected sequence, not #{node.class}"
|
||||||
|
end
|
||||||
|
|
||||||
|
result = [] of String
|
||||||
|
node.nodes.each do |item|
|
||||||
|
unless item.is_a?(YAML::Nodes::Scalar)
|
||||||
|
node.raise "Expected scalar, not #{item.class}"
|
||||||
|
end
|
||||||
|
|
||||||
|
result << item.value
|
||||||
|
end
|
||||||
|
rescue ex
|
||||||
|
if node.is_a?(YAML::Nodes::Scalar)
|
||||||
|
result = [node.value, ""]
|
||||||
|
else
|
||||||
|
result = ["", ""]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
result
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
JSON.mapping({
|
json_mapping({
|
||||||
video_loop: Bool,
|
autoplay: {type: Bool, default: CONFIG.default_user_preferences.autoplay},
|
||||||
autoplay: Bool,
|
captions: {type: Array(String), default: CONFIG.default_user_preferences.captions, converter: StringToArray},
|
||||||
continue: {
|
comments: {type: Array(String), default: CONFIG.default_user_preferences.comments, converter: StringToArray},
|
||||||
type: Bool,
|
continue: {type: Bool, default: CONFIG.default_user_preferences.continue},
|
||||||
default: false,
|
dark_mode: {type: Bool, default: CONFIG.default_user_preferences.dark_mode},
|
||||||
},
|
latest_only: {type: Bool, default: CONFIG.default_user_preferences.latest_only},
|
||||||
listen: {
|
listen: {type: Bool, default: CONFIG.default_user_preferences.listen},
|
||||||
type: Bool,
|
local: {type: Bool, default: CONFIG.default_user_preferences.local},
|
||||||
default: false,
|
locale: {type: String, default: CONFIG.default_user_preferences.locale},
|
||||||
},
|
max_results: {type: Int32, default: CONFIG.default_user_preferences.max_results},
|
||||||
speed: Float32,
|
notifications_only: {type: Bool, default: CONFIG.default_user_preferences.notifications_only},
|
||||||
quality: String,
|
quality: {type: String, default: CONFIG.default_user_preferences.quality},
|
||||||
volume: Int32,
|
redirect_feed: {type: Bool, default: CONFIG.default_user_preferences.redirect_feed},
|
||||||
comments: {
|
related_videos: {type: Bool, default: CONFIG.default_user_preferences.related_videos},
|
||||||
type: Array(String),
|
sort: {type: String, default: CONFIG.default_user_preferences.sort},
|
||||||
default: ["youtube", ""],
|
speed: {type: Float32, default: CONFIG.default_user_preferences.speed},
|
||||||
converter: StringToArray,
|
thin_mode: {type: Bool, default: CONFIG.default_user_preferences.thin_mode},
|
||||||
},
|
unseen_only: {type: Bool, default: CONFIG.default_user_preferences.unseen_only},
|
||||||
captions: {
|
video_loop: {type: Bool, default: CONFIG.default_user_preferences.video_loop},
|
||||||
type: Array(String),
|
volume: {type: Int32, default: CONFIG.default_user_preferences.volume},
|
||||||
default: ["", "", ""],
|
|
||||||
},
|
|
||||||
redirect_feed: {
|
|
||||||
type: Bool,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
related_videos: {
|
|
||||||
type: Bool,
|
|
||||||
default: true,
|
|
||||||
},
|
|
||||||
dark_mode: Bool,
|
|
||||||
thin_mode: {
|
|
||||||
type: Bool,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
max_results: Int32,
|
|
||||||
sort: String,
|
|
||||||
latest_only: Bool,
|
|
||||||
unseen_only: Bool,
|
|
||||||
notifications_only: {
|
|
||||||
type: Bool,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
locale: {
|
|
||||||
type: String,
|
|
||||||
default: "en-US",
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_user(sid, headers, db, refresh = true)
|
def get_user(sid, headers, db, refresh = true)
|
||||||
if db.query_one?("SELECT EXISTS (SELECT true FROM users WHERE $1 = ANY(id))", sid, as: Bool)
|
if email = db.query_one?("SELECT email FROM session_ids WHERE id = $1", sid, as: String)
|
||||||
user = db.query_one("SELECT * FROM users WHERE $1 = ANY(id)", sid, as: User)
|
user = db.query_one("SELECT * FROM users WHERE email = $1", email, as: User)
|
||||||
|
|
||||||
if refresh && Time.now - user.updated > 1.minute
|
if refresh && Time.now - user.updated > 1.minute
|
||||||
user = fetch_user(sid, headers, db)
|
user, sid = fetch_user(sid, headers, db)
|
||||||
user_array = user.to_a
|
user_array = user.to_a
|
||||||
|
|
||||||
user_array[5] = user_array[5].to_json
|
user_array[4] = user_array[4].to_json
|
||||||
args = arg_array(user_array)
|
args = arg_array(user_array)
|
||||||
|
|
||||||
db.exec("INSERT INTO users VALUES (#{args}) \
|
db.exec("INSERT INTO users VALUES (#{args}) \
|
||||||
ON CONFLICT (email) DO UPDATE SET id = users.id || $1, updated = $2, subscriptions = $4", user_array)
|
ON CONFLICT (email) DO UPDATE SET updated = $1, subscriptions = $3", user_array)
|
||||||
|
|
||||||
|
db.exec("INSERT INTO session_ids VALUES ($1,$2,$3) \
|
||||||
|
ON CONFLICT (id) DO NOTHING", sid, user.email, Time.now)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
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 \
|
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;")
|
||||||
rescue ex
|
rescue ex
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
user = fetch_user(sid, headers, db)
|
user, sid = fetch_user(sid, headers, db)
|
||||||
user_array = user.to_a
|
user_array = user.to_a
|
||||||
|
|
||||||
user_array[5] = user_array[5].to_json
|
user_array[4] = user_array[4].to_json
|
||||||
args = arg_array(user.to_a)
|
args = arg_array(user.to_a)
|
||||||
|
|
||||||
db.exec("INSERT INTO users VALUES (#{args}) \
|
db.exec("INSERT INTO users VALUES (#{args}) \
|
||||||
ON CONFLICT (email) DO UPDATE SET id = users.id || $1, updated = $2, subscriptions = $4", user_array)
|
ON CONFLICT (email) DO UPDATE SET updated = $1, subscriptions = $3", user_array)
|
||||||
|
|
||||||
|
db.exec("INSERT INTO session_ids VALUES ($1,$2,$3) \
|
||||||
|
ON CONFLICT (id) DO NOTHING", sid, user.email, Time.now)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
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 \
|
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;")
|
||||||
rescue ex
|
rescue ex
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return user
|
return user, sid
|
||||||
end
|
end
|
||||||
|
|
||||||
def fetch_user(sid, headers, db)
|
def fetch_user(sid, headers, db)
|
||||||
@@ -196,17 +184,17 @@ def fetch_user(sid, headers, db)
|
|||||||
|
|
||||||
token = Base64.urlsafe_encode(Random::Secure.random_bytes(32))
|
token = Base64.urlsafe_encode(Random::Secure.random_bytes(32))
|
||||||
|
|
||||||
user = User.new([sid], Time.now, [] of String, channels, email, DEFAULT_USER_PREFERENCES, nil, token, [] of String)
|
user = User.new(Time.now, [] of String, channels, email, CONFIG.default_user_preferences, nil, token, [] of String)
|
||||||
return user
|
return user, sid
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_user(sid, email, password)
|
def create_user(sid, email, password)
|
||||||
password = Crypto::Bcrypt::Password.create(password, cost: 10)
|
password = Crypto::Bcrypt::Password.create(password, cost: 10)
|
||||||
token = Base64.urlsafe_encode(Random::Secure.random_bytes(32))
|
token = Base64.urlsafe_encode(Random::Secure.random_bytes(32))
|
||||||
|
|
||||||
user = User.new([sid], Time.now, [] of String, [] of String, email, DEFAULT_USER_PREFERENCES, password.to_s, token, [] of String)
|
user = User.new(Time.now, [] of String, [] of String, email, CONFIG.default_user_preferences, password.to_s, token, [] of String)
|
||||||
|
|
||||||
return user
|
return user, sid
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_response(user_id, operation, key, db, expire = 6.hours)
|
def create_response(user_id, operation, key, db, expire = 6.hours)
|
||||||
@@ -242,11 +230,15 @@ def validate_response(challenge, token, user_id, operation, key, db, locale)
|
|||||||
raise translate(locale, "Invalid challenge")
|
raise translate(locale, "Invalid challenge")
|
||||||
end
|
end
|
||||||
|
|
||||||
challenge = OpenSSL::HMAC.digest(:sha256, HMAC_KEY, challenge)
|
challenge = OpenSSL::HMAC.digest(:sha256, key, challenge)
|
||||||
challenge = Base64.urlsafe_encode(challenge)
|
challenge = Base64.urlsafe_encode(challenge)
|
||||||
|
|
||||||
if db.query_one?("SELECT EXISTS (SELECT true FROM nonces WHERE nonce = $1)", nonce, as: Bool)
|
if nonce = db.query_one?("SELECT * FROM nonces WHERE nonce = $1", nonce, as: {String, Time})
|
||||||
db.exec("DELETE FROM nonces * WHERE nonce = $1", nonce)
|
if nonce[1] > Time.now
|
||||||
|
db.exec("UPDATE nonces SET expire = $1 WHERE nonce = $2", Time.new(1990, 1, 1), nonce[0])
|
||||||
|
else
|
||||||
|
raise translate(locale, "Invalid token")
|
||||||
|
end
|
||||||
else
|
else
|
||||||
raise translate(locale, "Invalid token")
|
raise translate(locale, "Invalid token")
|
||||||
end
|
end
|
||||||
@@ -260,7 +252,7 @@ def validate_response(challenge, token, user_id, operation, key, db, locale)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if challenge_user_id != user_id
|
if challenge_user_id != user_id
|
||||||
raise translate(locale, "Invalid user")
|
raise translate(locale, "Invalid token")
|
||||||
end
|
end
|
||||||
|
|
||||||
if expire < Time.now.to_unix
|
if expire < Time.now.to_unix
|
||||||
@@ -286,7 +278,7 @@ def generate_captcha(key, db)
|
|||||||
clock_svg = <<-END_SVG
|
clock_svg = <<-END_SVG
|
||||||
<svg viewBox="0 0 100 100" width="200px">
|
<svg viewBox="0 0 100 100" width="200px">
|
||||||
<circle cx="50" cy="50" r="45" fill="#eee" stroke="black" stroke-width="2"></circle>
|
<circle cx="50" cy="50" r="45" fill="#eee" stroke="black" stroke-width="2"></circle>
|
||||||
|
|
||||||
<text x="69" y="20.091" text-anchor="middle" fill="black" font-family="Arial" font-size="10px"> 1</text>
|
<text x="69" y="20.091" text-anchor="middle" fill="black" font-family="Arial" font-size="10px"> 1</text>
|
||||||
<text x="82.909" y="34" text-anchor="middle" fill="black" font-family="Arial" font-size="10px"> 2</text>
|
<text x="82.909" y="34" text-anchor="middle" fill="black" font-family="Arial" font-size="10px"> 2</text>
|
||||||
<text x="88" y="53" text-anchor="middle" fill="black" font-family="Arial" font-size="10px"> 3</text>
|
<text x="88" y="53" text-anchor="middle" fill="black" font-family="Arial" font-size="10px"> 3</text>
|
||||||
@@ -318,7 +310,22 @@ def generate_captcha(key, db)
|
|||||||
answer = "#{hour}:#{minute.to_s.rjust(2, '0')}:#{second.to_s.rjust(2, '0')}"
|
answer = "#{hour}:#{minute.to_s.rjust(2, '0')}:#{second.to_s.rjust(2, '0')}"
|
||||||
answer = OpenSSL::HMAC.hexdigest(:sha256, key, answer)
|
answer = OpenSSL::HMAC.hexdigest(:sha256, key, answer)
|
||||||
|
|
||||||
challenge, token = create_response(answer, "sign_in", key, db)
|
return {
|
||||||
|
question: image,
|
||||||
return {image: image, challenge: challenge, token: token}
|
tokens: [create_response(answer, "sign_in", key, db)],
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
def generate_text_captcha(key, db)
|
||||||
|
response = HTTP::Client.get(TEXTCAPTCHA_URL).body
|
||||||
|
response = JSON.parse(response)
|
||||||
|
|
||||||
|
tokens = response["a"].as_a.map do |answer|
|
||||||
|
create_response(answer.as_s, "sign_in", key, db)
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
question: response["q"].as_s,
|
||||||
|
tokens: tokens,
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -136,18 +136,6 @@ BYPASS_REGIONS = {
|
|||||||
"TR",
|
"TR",
|
||||||
}
|
}
|
||||||
|
|
||||||
VIDEO_THUMBNAILS = {
|
|
||||||
{name: "maxres", host: "invidio.us", url: "maxres", 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: "high", host: "i.ytimg.com", url: "hqdefault", height: 360, width: 480},
|
|
||||||
{name: "medium", host: "i.ytimg.com", url: "mqdefault", height: 180, width: 320},
|
|
||||||
{name: "default", host: "i.ytimg.com", url: "default", height: 90, width: 120},
|
|
||||||
{name: "start", host: "i.ytimg.com", url: "1", height: 90, width: 120},
|
|
||||||
{name: "middle", host: "i.ytimg.com", url: "2", height: 90, width: 120},
|
|
||||||
{name: "end", host: "i.ytimg.com", url: "3", height: 90, width: 120},
|
|
||||||
}
|
|
||||||
|
|
||||||
# See https://github.com/rg3/youtube-dl/blob/master/youtube_dl/extractor/youtube.py#L380-#L476
|
# See https://github.com/rg3/youtube-dl/blob/master/youtube_dl/extractor/youtube.py#L380-#L476
|
||||||
VIDEO_FORMATS = {
|
VIDEO_FORMATS = {
|
||||||
"5" => {"ext" => "flv", "width" => 400, "height" => 240, "acodec" => "mp3", "abr" => 64, "vcodec" => "h263"},
|
"5" => {"ext" => "flv", "width" => 400, "height" => 240, "acodec" => "mp3", "abr" => 64, "vcodec" => "h263"},
|
||||||
@@ -253,7 +241,7 @@ VIDEO_FORMATS = {
|
|||||||
"251" => {"ext" => "webm", "format" => "DASH audio", "acodec" => "opus", "abr" => 160},
|
"251" => {"ext" => "webm", "format" => "DASH audio", "acodec" => "opus", "abr" => 160},
|
||||||
}
|
}
|
||||||
|
|
||||||
class Video
|
struct Video
|
||||||
property player_json : JSON::Any?
|
property player_json : JSON::Any?
|
||||||
|
|
||||||
module HTTPParamConverter
|
module HTTPParamConverter
|
||||||
@@ -262,8 +250,65 @@ class Video
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def allow_ratings
|
||||||
|
allow_ratings = player_response["videoDetails"]?.try &.["allowRatings"]?.try &.as_bool
|
||||||
|
|
||||||
|
if allow_ratings.nil?
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
return allow_ratings
|
||||||
|
end
|
||||||
|
|
||||||
|
def live_now
|
||||||
|
live_now = self.player_response["videoDetails"]?.try &.["isLive"]?.try &.as_bool
|
||||||
|
|
||||||
|
if live_now.nil?
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
return live_now
|
||||||
|
end
|
||||||
|
|
||||||
|
def is_listed
|
||||||
|
is_listed = player_response["videoDetails"]?.try &.["isCrawlable"]?.try &.as_bool
|
||||||
|
|
||||||
|
if is_listed.nil?
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
return is_listed
|
||||||
|
end
|
||||||
|
|
||||||
|
def is_upcoming
|
||||||
|
is_upcoming = player_response["videoDetails"]?.try &.["isUpcoming"]?.try &.as_bool
|
||||||
|
|
||||||
|
if is_upcoming.nil?
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
return is_upcoming
|
||||||
|
end
|
||||||
|
|
||||||
|
def premiere_timestamp
|
||||||
|
if self.is_upcoming
|
||||||
|
premiere_timestamp = player_response["playabilityStatus"]?
|
||||||
|
.try &.["liveStreamability"]?
|
||||||
|
.try &.["liveStreamabilityRenderer"]?
|
||||||
|
.try &.["offlineSlate"]?
|
||||||
|
.try &.["liveStreamOfflineSlateRenderer"]?
|
||||||
|
.try &.["scheduledStartTime"]?.try &.as_s.to_i64
|
||||||
|
end
|
||||||
|
|
||||||
|
if premiere_timestamp
|
||||||
|
premiere_timestamp = Time.unix(premiere_timestamp)
|
||||||
|
end
|
||||||
|
|
||||||
|
return premiere_timestamp
|
||||||
|
end
|
||||||
|
|
||||||
def keywords
|
def keywords
|
||||||
keywords = self.player_response["videoDetails"]["keywords"]?.try &.as_a
|
keywords = self.player_response["videoDetails"]?.try &.["keywords"]?.try &.as_a
|
||||||
keywords ||= [] of String
|
keywords ||= [] of String
|
||||||
|
|
||||||
return keywords
|
return keywords
|
||||||
@@ -271,9 +316,51 @@ class Video
|
|||||||
|
|
||||||
def fmt_stream(decrypt_function)
|
def fmt_stream(decrypt_function)
|
||||||
streams = [] of HTTP::Params
|
streams = [] of HTTP::Params
|
||||||
self.info["url_encoded_fmt_stream_map"].split(",") do |string|
|
|
||||||
if !string.empty?
|
if fmt_streams = self.player_response["streamingData"]?.try &.["formats"]?
|
||||||
streams << HTTP::Params.parse(string)
|
fmt_streams.as_a.each do |fmt_stream|
|
||||||
|
if !fmt_stream.as_h?
|
||||||
|
next
|
||||||
|
end
|
||||||
|
|
||||||
|
fmt = {} of String => String
|
||||||
|
|
||||||
|
fmt["lmt"] = fmt_stream["lastModified"]?.try &.as_s || "0"
|
||||||
|
fmt["projection_type"] = "1"
|
||||||
|
fmt["type"] = fmt_stream["mimeType"].as_s
|
||||||
|
fmt["clen"] = fmt_stream["contentLength"]?.try &.as_s || "0"
|
||||||
|
fmt["bitrate"] = fmt_stream["bitrate"]?.try &.as_i.to_s || "0"
|
||||||
|
fmt["itag"] = fmt_stream["itag"].as_i.to_s
|
||||||
|
fmt["url"] = fmt_stream["url"].as_s
|
||||||
|
fmt["quality"] = fmt_stream["quality"].as_s
|
||||||
|
|
||||||
|
if fmt_stream["width"]?
|
||||||
|
fmt["size"] = "#{fmt_stream["width"]}x#{fmt_stream["height"]}"
|
||||||
|
fmt["height"] = fmt_stream["height"].as_i.to_s
|
||||||
|
end
|
||||||
|
|
||||||
|
if fmt_stream["fps"]?
|
||||||
|
fmt["fps"] = fmt_stream["fps"].as_i.to_s
|
||||||
|
end
|
||||||
|
|
||||||
|
if fmt_stream["qualityLabel"]?
|
||||||
|
fmt["quality_label"] = fmt_stream["qualityLabel"].as_s
|
||||||
|
end
|
||||||
|
|
||||||
|
params = HTTP::Params.new
|
||||||
|
fmt.each do |key, value|
|
||||||
|
params[key] = value
|
||||||
|
end
|
||||||
|
|
||||||
|
streams << params
|
||||||
|
end
|
||||||
|
|
||||||
|
streams.sort_by! { |stream| stream["height"].to_i }.reverse!
|
||||||
|
elsif fmt_stream = self.info["url_encoded_fmt_stream_map"]?
|
||||||
|
fmt_stream.split(",").each do |string|
|
||||||
|
if !string.empty?
|
||||||
|
streams << HTTP::Params.parse(string)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -286,10 +373,9 @@ class Video
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if streams[0]? && streams[0]["s"]?
|
streams.each do |fmt|
|
||||||
streams.each do |fmt|
|
fmt["url"] += "&host=" + (URI.parse(fmt["url"]).host || "")
|
||||||
fmt["url"] += "&signature=" + decrypt_signature(fmt["s"], decrypt_function)
|
fmt["url"] += decrypt_signature(fmt, decrypt_function)
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return streams
|
return streams
|
||||||
@@ -298,80 +384,54 @@ class Video
|
|||||||
def adaptive_fmts(decrypt_function)
|
def adaptive_fmts(decrypt_function)
|
||||||
adaptive_fmts = [] of HTTP::Params
|
adaptive_fmts = [] of HTTP::Params
|
||||||
|
|
||||||
if self.info.has_key?("adaptive_fmts")
|
if fmts = self.player_response["streamingData"]?.try &.["adaptiveFormats"]?
|
||||||
self.info["adaptive_fmts"].split(",") do |string|
|
fmts.as_a.each do |adaptive_fmt|
|
||||||
adaptive_fmts << HTTP::Params.parse(string)
|
if !adaptive_fmt.as_h?
|
||||||
end
|
next
|
||||||
elsif self.info.has_key?("dashmpd")
|
|
||||||
client = make_client(YT_URL)
|
|
||||||
response = client.get(self.info["dashmpd"])
|
|
||||||
document = XML.parse_html(response.body)
|
|
||||||
|
|
||||||
document.xpath_nodes(%q(//adaptationset)).each do |adaptation_set|
|
|
||||||
mime_type = adaptation_set["mimetype"]
|
|
||||||
|
|
||||||
document.xpath_nodes(%q(.//representation)).each do |representation|
|
|
||||||
codecs = representation["codecs"]
|
|
||||||
itag = representation["id"]
|
|
||||||
bandwidth = representation["bandwidth"]
|
|
||||||
url = representation.xpath_node(%q(.//baseurl)).not_nil!.content
|
|
||||||
|
|
||||||
clen = url.match(/clen\/(?<clen>\d+)/).try &.["clen"]
|
|
||||||
clen ||= "0"
|
|
||||||
lmt = url.match(/lmt\/(?<lmt>\d+)/).try &.["lmt"]
|
|
||||||
lmt ||= "#{((Time.now + 1.hour).to_unix_f.to_f64 * 1000000).to_i64}"
|
|
||||||
|
|
||||||
segment_list = representation.xpath_node(%q(.//segmentlist)).not_nil!
|
|
||||||
init = segment_list.xpath_node(%q(.//initialization))
|
|
||||||
|
|
||||||
# TODO: Replace with sane defaults when byteranges are absent
|
|
||||||
if init && !init["sourceurl"].starts_with? "sq"
|
|
||||||
init = init["sourceurl"].lchop("range/")
|
|
||||||
|
|
||||||
index = segment_list.xpath_node(%q(.//segmenturl)).not_nil!["media"]
|
|
||||||
index = index.lchop("range/")
|
|
||||||
index = "#{init.split("-")[1].to_i + 1}-#{index.split("-")[0].to_i}"
|
|
||||||
else
|
|
||||||
init = "0-0"
|
|
||||||
index = "1-1"
|
|
||||||
end
|
|
||||||
|
|
||||||
params = {
|
|
||||||
"type" => ["#{mime_type}; codecs=\"#{codecs}\""],
|
|
||||||
"url" => [url],
|
|
||||||
"projection_type" => ["1"],
|
|
||||||
"index" => [index],
|
|
||||||
"init" => [init],
|
|
||||||
"xtags" => [] of String,
|
|
||||||
"lmt" => [lmt],
|
|
||||||
"clen" => [clen],
|
|
||||||
"bitrate" => [bandwidth],
|
|
||||||
"itag" => [itag],
|
|
||||||
}
|
|
||||||
|
|
||||||
if mime_type == "video/mp4"
|
|
||||||
width = representation["width"]?
|
|
||||||
height = representation["height"]?
|
|
||||||
fps = representation["framerate"]?
|
|
||||||
|
|
||||||
metadata = itag_to_metadata?(itag)
|
|
||||||
if metadata
|
|
||||||
width ||= metadata["width"]?
|
|
||||||
height ||= metadata["height"]?
|
|
||||||
fps ||= metadata["fps"]?
|
|
||||||
end
|
|
||||||
|
|
||||||
if width && height
|
|
||||||
params["size"] = ["#{width}x#{height}"]
|
|
||||||
end
|
|
||||||
|
|
||||||
if width
|
|
||||||
params["quality_label"] = ["#{height}p"]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
adaptive_fmts << HTTP::Params.new(params)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
fmt = {} of String => String
|
||||||
|
|
||||||
|
if init = adaptive_fmt["initRange"]?
|
||||||
|
fmt["init"] = "#{init["start"]}-#{init["end"]}"
|
||||||
|
end
|
||||||
|
fmt["init"] ||= "0-0"
|
||||||
|
|
||||||
|
fmt["lmt"] = adaptive_fmt["lastModified"]?.try &.as_s || "0"
|
||||||
|
fmt["projection_type"] = "1"
|
||||||
|
fmt["type"] = adaptive_fmt["mimeType"].as_s
|
||||||
|
fmt["clen"] = adaptive_fmt["contentLength"]?.try &.as_s || "0"
|
||||||
|
fmt["bitrate"] = adaptive_fmt["bitrate"]?.try &.as_i.to_s || "0"
|
||||||
|
fmt["itag"] = adaptive_fmt["itag"].as_i.to_s
|
||||||
|
fmt["url"] = adaptive_fmt["url"].as_s
|
||||||
|
|
||||||
|
if index = adaptive_fmt["indexRange"]?
|
||||||
|
fmt["index"] = "#{index["start"]}-#{index["end"]}"
|
||||||
|
end
|
||||||
|
fmt["index"] ||= "0-0"
|
||||||
|
|
||||||
|
if adaptive_fmt["width"]?
|
||||||
|
fmt["size"] = "#{adaptive_fmt["width"]}x#{adaptive_fmt["height"]}"
|
||||||
|
end
|
||||||
|
|
||||||
|
if adaptive_fmt["fps"]?
|
||||||
|
fmt["fps"] = adaptive_fmt["fps"].as_i.to_s
|
||||||
|
end
|
||||||
|
|
||||||
|
if adaptive_fmt["qualityLabel"]?
|
||||||
|
fmt["quality_label"] = adaptive_fmt["qualityLabel"].as_s
|
||||||
|
end
|
||||||
|
|
||||||
|
params = HTTP::Params.new
|
||||||
|
fmt.each do |key, value|
|
||||||
|
params[key] = value
|
||||||
|
end
|
||||||
|
|
||||||
|
adaptive_fmts << params
|
||||||
|
end
|
||||||
|
elsif fmts = self.info["adaptive_fmts"]?
|
||||||
|
fmts.split(",") do |string|
|
||||||
|
adaptive_fmts << HTTP::Params.parse(string)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -381,23 +441,22 @@ class Video
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if adaptive_fmts[0]? && adaptive_fmts[0]["s"]?
|
adaptive_fmts.each do |fmt|
|
||||||
adaptive_fmts.each do |fmt|
|
fmt["url"] += "&host=" + (URI.parse(fmt["url"]).host || "")
|
||||||
fmt["url"] += "&signature=" + decrypt_signature(fmt["s"], decrypt_function)
|
fmt["url"] += decrypt_signature(fmt, decrypt_function)
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return adaptive_fmts
|
return adaptive_fmts
|
||||||
end
|
end
|
||||||
|
|
||||||
def video_streams(adaptive_fmts)
|
def video_streams(adaptive_fmts)
|
||||||
video_streams = adaptive_fmts.compact_map { |s| s["type"].starts_with?("video") ? s : nil }
|
video_streams = adaptive_fmts.select { |s| s["type"].starts_with? "video" }
|
||||||
|
|
||||||
return video_streams
|
return video_streams
|
||||||
end
|
end
|
||||||
|
|
||||||
def audio_streams(adaptive_fmts)
|
def audio_streams(adaptive_fmts)
|
||||||
audio_streams = adaptive_fmts.compact_map { |s| s["type"].starts_with?("audio") ? s : nil }
|
audio_streams = adaptive_fmts.select { |s| s["type"].starts_with? "audio" }
|
||||||
audio_streams.sort_by! { |s| s["bitrate"].to_i }.reverse!
|
audio_streams.sort_by! { |s| s["bitrate"].to_i }.reverse!
|
||||||
audio_streams.each do |stream|
|
audio_streams.each do |stream|
|
||||||
stream["bitrate"] = (stream["bitrate"].to_f64/1000).to_i.to_s
|
stream["bitrate"] = (stream["bitrate"].to_f64/1000).to_i.to_s
|
||||||
@@ -462,7 +521,7 @@ class Video
|
|||||||
return self.info["length_seconds"].to_i
|
return self.info["length_seconds"].to_i
|
||||||
end
|
end
|
||||||
|
|
||||||
add_mapping({
|
db_mapping({
|
||||||
id: String,
|
id: String,
|
||||||
info: {
|
info: {
|
||||||
type: HTTP::Params,
|
type: HTTP::Params,
|
||||||
@@ -490,7 +549,7 @@ class Video
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
class Caption
|
struct Caption
|
||||||
JSON.mapping(
|
JSON.mapping(
|
||||||
name: CaptionName,
|
name: CaptionName,
|
||||||
baseUrl: String,
|
baseUrl: String,
|
||||||
@@ -498,7 +557,7 @@ class Caption
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
class CaptionName
|
struct CaptionName
|
||||||
JSON.mapping(
|
JSON.mapping(
|
||||||
simpleText: String,
|
simpleText: String,
|
||||||
)
|
)
|
||||||
@@ -542,53 +601,63 @@ def get_video(id, db, proxies = {} of String => Array({ip: String, port: Int32})
|
|||||||
return video
|
return video
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def extract_player_config(body, html)
|
||||||
|
params = HTTP::Params.new
|
||||||
|
|
||||||
|
if md = body.match(/'XSRF_TOKEN': "(?<session_token>[A-Za-z0-9\_\-\=]+)"/)
|
||||||
|
params["session_token"] = md["session_token"]
|
||||||
|
end
|
||||||
|
|
||||||
|
if md = body.match(/'RELATED_PLAYER_ARGS': (?<rvs>{"rvs":"[^"]+"})/)
|
||||||
|
params["rvs"] = JSON.parse(md["rvs"])["rvs"].as_s
|
||||||
|
end
|
||||||
|
|
||||||
|
html_info = body.match(/ytplayer\.config = (?<info>.*?);ytplayer\.load/).try &.["info"]
|
||||||
|
|
||||||
|
if html_info
|
||||||
|
JSON.parse(html_info)["args"].as_h.each do |key, value|
|
||||||
|
params[key] = value.to_s
|
||||||
|
end
|
||||||
|
else
|
||||||
|
error_message = html.xpath_node(%q(//h1[@id="unavailable-message"]))
|
||||||
|
if error_message
|
||||||
|
params["reason"] = error_message.content.strip
|
||||||
|
else
|
||||||
|
params["reason"] = "Could not extract video info."
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return params
|
||||||
|
end
|
||||||
|
|
||||||
def fetch_video(id, proxies, region)
|
def fetch_video(id, proxies, region)
|
||||||
html_channel = Channel(XML::Node | String).new
|
client = make_client(YT_URL, proxies, region)
|
||||||
info_channel = Channel(HTTP::Params).new
|
response = client.get("/watch?v=#{id}&gl=US&hl=en&disable_polymer=1&has_verified=1&bpctr=9999999999")
|
||||||
|
|
||||||
spawn do
|
if md = response.headers["location"]?.try &.match(/v=(?<id>[a-zA-Z0-9_-]{11})/)
|
||||||
client = make_client(YT_URL, proxies, region)
|
raise VideoRedirect.new(md["id"])
|
||||||
html = client.get("/watch?v=#{id}&gl=US&hl=en&disable_polymer=1&has_verified=1&bpctr=9999999999")
|
|
||||||
|
|
||||||
if md = html.headers["location"]?.try &.match(/v=(?<id>[a-zA-Z0-9_-]{11})/)
|
|
||||||
next html_channel.send(md["id"])
|
|
||||||
end
|
|
||||||
|
|
||||||
html = XML.parse_html(html.body)
|
|
||||||
html_channel.send(html)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
spawn do
|
html = XML.parse_html(response.body)
|
||||||
client = make_client(YT_URL, proxies, region)
|
info = extract_player_config(response.body, html)
|
||||||
info = client.get("/get_video_info?video_id=#{id}&el=detailpage&ps=default&eurl=&gl=US&hl=en&disable_polymer=1")
|
info["cookie"] = response.cookies.to_h.map { |name, cookie| "#{name}=#{cookie.value}" }.join("; ")
|
||||||
info = HTTP::Params.parse(info.body)
|
|
||||||
|
|
||||||
if info["reason"]?
|
|
||||||
info = client.get("/get_video_info?video_id=#{id}&ps=default&eurl=&gl=US&hl=en&disable_polymer=1")
|
|
||||||
info = HTTP::Params.parse(info.body)
|
|
||||||
end
|
|
||||||
|
|
||||||
info_channel.send(info)
|
|
||||||
end
|
|
||||||
|
|
||||||
html = html_channel.receive
|
|
||||||
if html.as?(String)
|
|
||||||
raise VideoRedirect.new("#{html.as(String)}")
|
|
||||||
end
|
|
||||||
html = html.as(XML::Node)
|
|
||||||
|
|
||||||
info = info_channel.receive
|
|
||||||
|
|
||||||
|
# Try to use proxies for region-blocked videos
|
||||||
if info["reason"]? && info["reason"].includes? "your country"
|
if info["reason"]? && info["reason"].includes? "your country"
|
||||||
bypass_channel = Channel({HTTPClient, String} | Nil).new
|
bypass_channel = Channel({XML::Node, HTTP::Params} | Nil).new
|
||||||
|
|
||||||
proxies.each do |proxy_region, list|
|
proxies.each do |proxy_region, list|
|
||||||
spawn do
|
spawn do
|
||||||
client = make_client(YT_URL, proxies, proxy_region)
|
client = make_client(YT_URL, proxies, proxy_region)
|
||||||
|
proxy_response = client.get("/watch?v=#{id}&gl=US&hl=en&disable_polymer=1&has_verified=1&bpctr=9999999999")
|
||||||
|
|
||||||
info = HTTP::Params.parse(client.get("/get_video_info?video_id=#{id}&ps=default&eurl=&gl=US&hl=en&disable_polymer=1").body)
|
proxy_html = XML.parse_html(proxy_response.body)
|
||||||
if !info["reason"]?
|
proxy_info = extract_player_config(proxy_response.body, proxy_html)
|
||||||
bypass_channel.send({client, proxy_region})
|
|
||||||
|
if !proxy_info["reason"]?
|
||||||
|
proxy_info["region"] = proxy_region
|
||||||
|
proxy_info["cookie"] = proxy_response.cookies.to_h.map { |name, cookie| "#{name}=#{cookie.value}" }.join("; ")
|
||||||
|
bypass_channel.send({proxy_html, proxy_info})
|
||||||
else
|
else
|
||||||
bypass_channel.send(nil)
|
bypass_channel.send(nil)
|
||||||
end
|
end
|
||||||
@@ -598,41 +667,36 @@ def fetch_video(id, proxies, region)
|
|||||||
proxies.size.times do
|
proxies.size.times do
|
||||||
response = bypass_channel.receive
|
response = bypass_channel.receive
|
||||||
if response
|
if response
|
||||||
begin
|
html, info = response
|
||||||
client, proxy_region = response
|
break
|
||||||
|
|
||||||
html = XML.parse_html(client.get("/watch?v=#{id}&gl=US&hl=en&disable_polymer=1&has_verified=1&bpctr=9999999999").body)
|
|
||||||
info = HTTP::Params.parse(client.get("/get_video_info?video_id=#{id}&el=detailpage&ps=default&eurl=&gl=US&hl=en&disable_polymer=1").body)
|
|
||||||
|
|
||||||
if info["reason"]?
|
|
||||||
info = HTTP::Params.parse(client.get("/get_video_info?video_id=#{id}&ps=default&eurl=&gl=US&hl=en&disable_polymer=1").body)
|
|
||||||
end
|
|
||||||
|
|
||||||
info["region"] = proxy_region
|
|
||||||
|
|
||||||
break
|
|
||||||
rescue ex
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Try to pull streams from embed URL
|
||||||
if info["reason"]?
|
if info["reason"]?
|
||||||
html_info = html.to_s.match(/ytplayer\.config = (?<info>.*?);ytplayer\.load/).try &.["info"]
|
embed_page = client.get("/embed/#{id}").body
|
||||||
if html_info
|
sts = embed_page.match(/"sts"\s*:\s*(?<sts>\d+)/).try &.["sts"]?
|
||||||
html_info = JSON.parse(html_info)["args"].as_h
|
sts ||= ""
|
||||||
info.delete("reason")
|
embed_info = HTTP::Params.parse(client.get("/get_video_info?video_id=#{id}&eurl=https://youtube.googleapis.com/v/#{id}&gl=US&hl=en&disable_polymer=1&sts=#{sts}").body)
|
||||||
|
|
||||||
html_info.each do |k, v|
|
if !embed_info["reason"]?
|
||||||
info[k] = v.to_s
|
embed_info.each do |key, value|
|
||||||
|
info[key] = value.to_s
|
||||||
end
|
end
|
||||||
end
|
else
|
||||||
|
|
||||||
if info["reason"]?
|
|
||||||
raise info["reason"]
|
raise info["reason"]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if info["errorcode"]?.try &.== "2"
|
||||||
|
raise "Video unavailable."
|
||||||
|
end
|
||||||
|
|
||||||
|
if !info["title"]?
|
||||||
|
raise "Video unavailable."
|
||||||
|
end
|
||||||
|
|
||||||
title = info["title"]
|
title = info["title"]
|
||||||
author = info["author"]
|
author = info["author"]
|
||||||
ucid = info["ucid"]
|
ucid = info["ucid"]
|
||||||
@@ -649,6 +713,10 @@ 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
|
||||||
|
|
||||||
|
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 : ""
|
||||||
|
|
||||||
@@ -660,19 +728,27 @@ def fetch_video(id, proxies, region)
|
|||||||
|
|
||||||
allowed_regions = html.xpath_node(%q(//meta[@itemprop="regionsAllowed"])).try &.["content"].split(",")
|
allowed_regions = html.xpath_node(%q(//meta[@itemprop="regionsAllowed"])).try &.["content"].split(",")
|
||||||
allowed_regions ||= [] of String
|
allowed_regions ||= [] of String
|
||||||
|
|
||||||
is_family_friendly = html.xpath_node(%q(//meta[@itemprop="isFamilyFriendly"])).try &.["content"] == "True"
|
is_family_friendly = html.xpath_node(%q(//meta[@itemprop="isFamilyFriendly"])).try &.["content"] == "True"
|
||||||
is_family_friendly ||= true
|
is_family_friendly ||= true
|
||||||
|
|
||||||
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 ||= ""
|
||||||
|
|
||||||
@@ -711,9 +787,11 @@ 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?
|
||||||
listen = query["listen"]? && (query["listen"] == "true" || query["listen"] == "1").to_unsafe
|
listen = query["listen"]? && (query["listen"] == "true" || query["listen"] == "1").to_unsafe
|
||||||
|
local = query["local"]? && (query["local"] == "true").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"]?
|
||||||
region = query["region"]?
|
region = query["region"]?
|
||||||
|
related_videos = query["related_videos"]?
|
||||||
speed = query["speed"]?.try &.to_f?
|
speed = query["speed"]?.try &.to_f?
|
||||||
video_loop = query["loop"]?.try &.to_i?
|
video_loop = query["loop"]?.try &.to_i?
|
||||||
volume = query["volume"]?.try &.to_i?
|
volume = query["volume"]?.try &.to_i?
|
||||||
@@ -723,25 +801,31 @@ def process_video_params(query, preferences)
|
|||||||
autoplay ||= preferences.autoplay.to_unsafe
|
autoplay ||= preferences.autoplay.to_unsafe
|
||||||
continue ||= preferences.continue.to_unsafe
|
continue ||= preferences.continue.to_unsafe
|
||||||
listen ||= preferences.listen.to_unsafe
|
listen ||= preferences.listen.to_unsafe
|
||||||
|
local ||= preferences.local.to_unsafe
|
||||||
preferred_captions ||= preferences.captions
|
preferred_captions ||= preferences.captions
|
||||||
quality ||= preferences.quality
|
quality ||= preferences.quality
|
||||||
|
related_videos ||= preferences.related_videos.to_unsafe
|
||||||
speed ||= preferences.speed
|
speed ||= preferences.speed
|
||||||
video_loop ||= preferences.video_loop.to_unsafe
|
video_loop ||= preferences.video_loop.to_unsafe
|
||||||
volume ||= preferences.volume
|
volume ||= preferences.volume
|
||||||
end
|
end
|
||||||
|
|
||||||
autoplay ||= 0
|
autoplay ||= CONFIG.default_user_preferences.autoplay.to_unsafe
|
||||||
continue ||= 0
|
continue ||= CONFIG.default_user_preferences.continue.to_unsafe
|
||||||
listen ||= 0
|
listen ||= CONFIG.default_user_preferences.listen.to_unsafe
|
||||||
preferred_captions ||= [] of String
|
local ||= CONFIG.default_user_preferences.local.to_unsafe
|
||||||
quality ||= "hd720"
|
preferred_captions ||= CONFIG.default_user_preferences.captions
|
||||||
speed ||= 1
|
quality ||= CONFIG.default_user_preferences.quality
|
||||||
video_loop ||= 0
|
related_videos ||= CONFIG.default_user_preferences.related_videos.to_unsafe
|
||||||
volume ||= 100
|
speed ||= CONFIG.default_user_preferences.speed
|
||||||
|
video_loop ||= CONFIG.default_user_preferences.video_loop.to_unsafe
|
||||||
|
volume ||= CONFIG.default_user_preferences.volume
|
||||||
|
|
||||||
autoplay = autoplay == 1
|
autoplay = autoplay == 1
|
||||||
continue = continue == 1
|
continue = continue == 1
|
||||||
listen = listen == 1
|
listen = listen == 1
|
||||||
|
local = local == 1
|
||||||
|
related_videos = related_videos == 1
|
||||||
video_loop = video_loop == 1
|
video_loop = video_loop == 1
|
||||||
|
|
||||||
if query["t"]?
|
if query["t"]?
|
||||||
@@ -767,17 +851,19 @@ def process_video_params(query, preferences)
|
|||||||
|
|
||||||
controls = query["controls"]?.try &.to_i?
|
controls = query["controls"]?.try &.to_i?
|
||||||
controls ||= 1
|
controls ||= 1
|
||||||
controls = controls == 1
|
controls = controls >= 1
|
||||||
|
|
||||||
params = {
|
params = {
|
||||||
autoplay: autoplay,
|
autoplay: autoplay,
|
||||||
continue: continue,
|
continue: continue,
|
||||||
controls: controls,
|
controls: controls,
|
||||||
listen: listen,
|
listen: listen,
|
||||||
|
local: local,
|
||||||
preferred_captions: preferred_captions,
|
preferred_captions: preferred_captions,
|
||||||
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,
|
||||||
@@ -788,12 +874,26 @@ def process_video_params(query, preferences)
|
|||||||
return params
|
return params
|
||||||
end
|
end
|
||||||
|
|
||||||
def generate_thumbnails(json, id)
|
def build_thumbnails(id, config, kemal_config)
|
||||||
|
return {
|
||||||
|
{name: "maxres", host: "#{make_host_url(config, kemal_config)}", url: "maxres", height: 720, width: 1280},
|
||||||
|
{name: "maxresdefault", host: "https://i.ytimg.com", url: "maxresdefault", height: 720, width: 1280},
|
||||||
|
{name: "sddefault", host: "https://i.ytimg.com", url: "sddefault", height: 480, width: 640},
|
||||||
|
{name: "high", host: "https://i.ytimg.com", url: "hqdefault", height: 360, width: 480},
|
||||||
|
{name: "medium", host: "https://i.ytimg.com", url: "mqdefault", height: 180, width: 320},
|
||||||
|
{name: "default", host: "https://i.ytimg.com", url: "default", height: 90, width: 120},
|
||||||
|
{name: "start", host: "https://i.ytimg.com", url: "1", height: 90, width: 120},
|
||||||
|
{name: "middle", host: "https://i.ytimg.com", url: "2", height: 90, width: 120},
|
||||||
|
{name: "end", host: "https://i.ytimg.com", url: "3", height: 90, width: 120},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
def generate_thumbnails(json, id, config, kemal_config)
|
||||||
json.array do
|
json.array do
|
||||||
VIDEO_THUMBNAILS.each do |thumbnail|
|
build_thumbnails(id, config, kemal_config).each do |thumbnail|
|
||||||
json.object do
|
json.object do
|
||||||
json.field "quality", thumbnail[:name]
|
json.field "quality", thumbnail[:name]
|
||||||
json.field "url", "https://#{thumbnail[:host]}/vi/#{id}/#{thumbnail["url"]}.jpg"
|
json.field "url", "#{thumbnail[:host]}/vi/#{id}/#{thumbnail["url"]}.jpg"
|
||||||
json.field "width", thumbnail[:width]
|
json.field "width", thumbnail[:width]
|
||||||
json.field "height", thumbnail[:height]
|
json.field "height", thumbnail[:height]
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<% content_for "header" do %>
|
<% content_for "header" do %>
|
||||||
<title><%= author %> - Invidious</title>
|
<title><%= author %> - Invidious</title>
|
||||||
|
<link rel="alternate" type="application/rss+xml" title="RSS" href="/feed/channel/<%= ucid %>" />
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="pure-g h-box">
|
<div class="pure-g h-box">
|
||||||
@@ -14,41 +15,31 @@
|
|||||||
</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">
|
||||||
<div class="pure-u-1-3">
|
<div class="pure-u-1-3">
|
||||||
<a href="https://www.youtube.com/channel/<%= ucid %>"><%= translate(locale, "View channel on YouTube") %></a>
|
<a href="https://www.youtube.com/channel/<%= ucid %>"><%= translate(locale, "View channel on YouTube") %></a>
|
||||||
|
<% if !auto_generated %>
|
||||||
|
<div class="pure-u-1 pure-md-1-3">
|
||||||
|
<b><%= translate(locale, "Videos") %></b>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<div class="pure-u-1 pure-md-1-3">
|
||||||
|
<% if auto_generated %>
|
||||||
|
<b><%= translate(locale, "Playlists") %></b>
|
||||||
|
<% else %>
|
||||||
|
<a href="/channel/<%= ucid %>/playlists"><%= translate(locale, "Playlists") %></a>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pure-u-1-3">
|
<div class="pure-u-1-3">
|
||||||
</div>
|
</div>
|
||||||
<div class="pure-u-1-3">
|
<div class="pure-u-1-3">
|
||||||
<div class="pure-g" style="text-align:right;">
|
<div class="pure-g" style="text-align:right;">
|
||||||
<% {"newest", "oldest", "popular"}.each do |sort| %>
|
<% sort_options.each do |sort| %>
|
||||||
<div class="pure-u-1 pure-md-1-3">
|
<div class="pure-u-1 pure-md-1-3">
|
||||||
<% if sort_by == sort %>
|
<% if sort_by == sort %>
|
||||||
<b><%= translate(locale, sort) %></b>
|
<b><%= translate(locale, sort) %></b>
|
||||||
@@ -68,12 +59,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-g">
|
<div class="pure-g">
|
||||||
<% videos.each_slice(4) do |slice| %>
|
<% items.each_slice(4) do |slice| %>
|
||||||
<% slice.each do |item| %>
|
<% slice.each do |item| %>
|
||||||
<%= rendered "components/item" %>
|
<%= rendered "components/item" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-g h-box">
|
<div class="pure-g h-box">
|
||||||
<div class="pure-u-1 pure-u-md-1-5">
|
<div class="pure-u-1 pure-u-md-1-5">
|
||||||
@@ -94,43 +85,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>
|
||||||
|
|||||||
19
src/invidious/views/components/feed_menu.ecr
Normal file
19
src/invidious/views/components/feed_menu.ecr
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<div class="h-box pure-g">
|
||||||
|
<div class="pure-u-1 pure-u-md-1-4"></div>
|
||||||
|
<div class="pure-u-1 pure-u-md-1-2">
|
||||||
|
<div class="pure-g">
|
||||||
|
<% feed_menu = config.feed_menu.dup %>
|
||||||
|
<% if !env.get?("user") %>
|
||||||
|
<% feed_menu.reject! {|feed| feed == "Subscriptions"} %>
|
||||||
|
<% end %>
|
||||||
|
<% feed_menu.each do |feed| %>
|
||||||
|
<div class="pure-u-1-2 pure-u-md-1-<%= feed_menu.size %>">
|
||||||
|
<a href="/feed/<%= feed.downcase %>" style="text-align:center;" class="pure-menu-heading">
|
||||||
|
<%= translate(locale, feed) %>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="pure-u-1 pure-u-md-1-4"></div>
|
||||||
|
</div>
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<% case item when %>
|
<% case item when %>
|
||||||
<% when SearchChannel %>
|
<% when SearchChannel %>
|
||||||
<a style="width:100%;" href="/channel/<%= item.ucid %>">
|
<a style="width:100%;" href="/channel/<%= item.ucid %>">
|
||||||
<% if env.get?("user") && env.get("user").as(User).preferences.thin_mode %>
|
<% if env.get("preferences").as(Preferences).thin_mode %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<center>
|
<center>
|
||||||
<img style="width:56.25%;" src="/ggpht<%= URI.parse(item.author_thumbnail).full_path %>"/>
|
<img style="width:56.25%;" src="/ggpht<%= URI.parse(item.author_thumbnail).full_path %>"/>
|
||||||
@@ -16,15 +16,15 @@
|
|||||||
<h5><%= item.description_html %></h5>
|
<h5><%= item.description_html %></h5>
|
||||||
<% when SearchPlaylist %>
|
<% when SearchPlaylist %>
|
||||||
<% if item.id.starts_with? "RD" %>
|
<% if item.id.starts_with? "RD" %>
|
||||||
<% url = "/mix?list=#{item.id}&continuation=#{item.videos[0]?.try &.id}" %>
|
<% url = "/mix?list=#{item.id}&continuation=#{item.thumbnail_id}" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% url = "/playlist?list=#{item.id}" %>
|
<% url = "/playlist?list=#{item.id}" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<a style="width:100%;" href="<%= url %>">
|
<a style="width:100%;" href="<%= url %>">
|
||||||
<% if env.get?("user") && env.get("user").as(User).preferences.thin_mode %>
|
<% if env.get("preferences").as(Preferences).thin_mode %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="thumbnail">
|
<div class="thumbnail">
|
||||||
<img class="thumbnail" src="/vi/<%= item.videos[0]?.try &.id %>/mqdefault.jpg"/>
|
<img class="thumbnail" src="/vi/<%= item.thumbnail_id %>/mqdefault.jpg"/>
|
||||||
<p class="length"><%= number_with_separator(item.video_count) %> videos</p>
|
<p class="length"><%= number_with_separator(item.video_count) %> videos</p>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -35,11 +35,13 @@
|
|||||||
</p>
|
</p>
|
||||||
<% when MixVideo %>
|
<% when MixVideo %>
|
||||||
<a style="width:100%;" href="/watch?v=<%= item.id %>&list=<%= item.mixes[0] %>">
|
<a style="width:100%;" href="/watch?v=<%= item.id %>&list=<%= item.mixes[0] %>">
|
||||||
<% if env.get?("user") && env.get("user").as(User).preferences.thin_mode %>
|
<% if env.get("preferences").as(Preferences).thin_mode %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="thumbnail">
|
<div class="thumbnail">
|
||||||
<img class="thumbnail" src="/vi/<%= item.id %>/mqdefault.jpg"/>
|
<img class="thumbnail" src="/vi/<%= item.id %>/mqdefault.jpg"/>
|
||||||
|
<% if item.length_seconds != 0 %>
|
||||||
<p class="length"><%= recode_length_seconds(item.length_seconds) %></p>
|
<p class="length"><%= recode_length_seconds(item.length_seconds) %></p>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<p><%= item.title %></p>
|
<p><%= item.title %></p>
|
||||||
@@ -49,27 +51,30 @@
|
|||||||
</p>
|
</p>
|
||||||
<% when PlaylistVideo %>
|
<% when PlaylistVideo %>
|
||||||
<a style="width:100%;" href="/watch?v=<%= item.id %>&list=<%= item.playlists[0] %>">
|
<a style="width:100%;" href="/watch?v=<%= item.id %>&list=<%= item.playlists[0] %>">
|
||||||
<% if env.get?("user") && env.get("user").as(User).preferences.thin_mode %>
|
<% if env.get("preferences").as(Preferences).thin_mode %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="thumbnail">
|
<div class="thumbnail">
|
||||||
<img class="thumbnail" src="/vi/<%= item.id %>/mqdefault.jpg"/>
|
<img class="thumbnail" src="/vi/<%= item.id %>/mqdefault.jpg"/>
|
||||||
|
<% if item.responds_to?(:live_now) && item.live_now %>
|
||||||
|
<p class="length"><i class="icon ion-ios-play-circle"></i> <%= translate(locale, "LIVE") %></p>
|
||||||
|
<% elsif item.length_seconds != 0 %>
|
||||||
<p class="length"><%= recode_length_seconds(item.length_seconds) %></p>
|
<p class="length"><%= recode_length_seconds(item.length_seconds) %></p>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<p><%= item.title %></p>
|
<p><%= item.title %></p>
|
||||||
</a>
|
</a>
|
||||||
<% if item.responds_to?(:live_now) && item.live_now %>
|
|
||||||
<p><%= translate(locale, "LIVE") %></p>
|
|
||||||
<% end %>
|
|
||||||
<p>
|
<p>
|
||||||
<b><a style="width:100%;" href="/channel/<%= item.ucid %>"><%= item.author %></a></b>
|
<b><a style="width:100%;" href="/channel/<%= item.ucid %>"><%= item.author %></a></b>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<% if Time.now - item.published > 1.minute %>
|
<% if item.responds_to?(:premiere_timestamp) && item.premiere_timestamp && item.premiere_timestamp.not_nil! > Time.now %>
|
||||||
<h5><%= translate(locale, "Shared `x` ago", recode_date(item.published)) %></h5>
|
<h5><%= translate(locale, "Premieres in `x`", recode_date((item.premiere_timestamp.as(Time) - Time.now).ago, locale)) %></h5>
|
||||||
|
<% elsif Time.now - item.published > 1.minute %>
|
||||||
|
<h5><%= translate(locale, "Shared `x` ago", recode_date(item.published, locale)) %></h5>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if env.get?("user") && env.get("user").as(User).preferences.thin_mode %>
|
<% if env.get("preferences").as(Preferences).thin_mode %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<a style="width:100%;" href="/watch?v=<%= item.id %>">
|
<a style="width:100%;" href="/watch?v=<%= item.id %>">
|
||||||
<div class="thumbnail">
|
<div class="thumbnail">
|
||||||
@@ -81,26 +86,29 @@
|
|||||||
onmouseenter='this["href"]="javascript:void(0)"'
|
onmouseenter='this["href"]="javascript:void(0)"'
|
||||||
href="/mark_watched?id=<%= item.id %>">
|
href="/mark_watched?id=<%= item.id %>">
|
||||||
<i onmouseenter='this.setAttribute("class", "icon ion-ios-eye-off")'
|
<i onmouseenter='this.setAttribute("class", "icon ion-ios-eye-off")'
|
||||||
onmouseleave='this.setAttribute("class", "icon ion-ios-eye")'
|
onmouseleave='this.setAttribute("class", "icon ion-ios-eye")'
|
||||||
class="icon ion-ios-eye">
|
class="icon ion-ios-eye">
|
||||||
</i>
|
</i>
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% if item.responds_to?(:live_now) && item.live_now %>
|
||||||
|
<p class="length"><i class="icon ion-ios-play-circle"></i> <%= translate(locale, "LIVE") %></p>
|
||||||
|
<% elsif item.length_seconds != 0 %>
|
||||||
<p class="length"><%= recode_length_seconds(item.length_seconds) %></p>
|
<p class="length"><%= recode_length_seconds(item.length_seconds) %></p>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
<p><a href="/watch?v=<%= item.id %>"><%= item.title %></a></p>
|
<p><a href="/watch?v=<%= item.id %>"><%= item.title %></a></p>
|
||||||
<% if item.responds_to?(:live_now) && item.live_now %>
|
|
||||||
<p><%= translate(locale, "LIVE") %></p>
|
|
||||||
<% end %>
|
|
||||||
<p>
|
<p>
|
||||||
<b><a style="width:100%;" href="/channel/<%= item.ucid %>"><%= item.author %></a></b>
|
<b><a style="width:100%;" href="/channel/<%= item.ucid %>"><%= item.author %></a></b>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<% if Time.now - item.published > 1.minute %>
|
<% if item.responds_to?(:premiere_timestamp) && item.premiere_timestamp && item.premiere_timestamp.not_nil! > Time.now %>
|
||||||
<h5><%= translate(locale, "Shared `x` ago", recode_date(item.published)) %></h5>
|
<h5><%= translate(locale, "Premieres in `x`", recode_date((item.premiere_timestamp.as(Time) - Time.now).ago, locale)) %></h5>
|
||||||
|
<% elsif Time.now - item.published > 1.minute %>
|
||||||
|
<h5><%= translate(locale, "Shared `x` ago", recode_date(item.published, locale)) %></h5>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<video style="width:100%" playsinline poster="<%= thumbnail %>" title="<%= HTML.escape(video.title) %>"
|
<video style="outline:none;width:100%" playsinline poster="<%= thumbnail %>" title="<%= HTML.escape(video.title) %>"
|
||||||
id="player" class="video-js"
|
id="player" class="video-js"
|
||||||
onmouseenter='this["data-title"]=this["title"];this["title"]=""'
|
onmouseenter='this["data-title"]=this["title"];this["title"]=""'
|
||||||
onmouseleave='this["title"]=this["data-title"];this["data-title"]=""'
|
onmouseleave='this["title"]=this["data-title"];this["data-title"]=""'
|
||||||
@@ -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"] %><% if params[:local] %>&local=true<% end %>" 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,20 +19,20 @@
|
|||||||
<% 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"] %><% if params[:local] %>&local=true<% end %>" 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"] %><% if params[:local] %>&local=true<% end %>" type='<%= fmt["type"] %>' label="<%= fmt["label"] %>" selected="<%= i == 0 ? true : false %>">
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% preferred_captions.each_with_index do |caption, i| %>
|
<% preferred_captions.each_with_index do |caption, i| %>
|
||||||
<track kind="captions" src="/api/v1/captions/<%= video.id %>?label=<%= caption.name.simpleText %>&hl=<%= env.get("locale").as(String) %>"
|
<track kind="captions" src="/api/v1/captions/<%= video.id %>?label=<%= caption.name.simpleText %>&hl=<%= env.get("preferences").as(Preferences).locale %>"
|
||||||
label="<%= caption.name.simpleText %>" <% if i == 0 %>default<% end %>>
|
label="<%= caption.name.simpleText %>" <% if i == 0 %>default<% end %>>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% captions.each do |caption| %>
|
<% captions.each do |caption| %>
|
||||||
<track kind="captions" src="/api/v1/captions/<%= video.id %>?label=<%= caption.name.simpleText %>&hl=<%= env.get("locale").as(String) %>"
|
<track kind="captions" src="/api/v1/captions/<%= video.id %>?label=<%= caption.name.simpleText %>&hl=<%= env.get("preferences").as(Preferences).locale %>"
|
||||||
label="<%= caption.name.simpleText %>">
|
label="<%= caption.name.simpleText %>">
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -44,7 +44,7 @@ var options = {
|
|||||||
aspectRatio: "<%= aspect_ratio %>",
|
aspectRatio: "<%= aspect_ratio %>",
|
||||||
<% end %>
|
<% end %>
|
||||||
preload: "auto",
|
preload: "auto",
|
||||||
playbackRates: [0.5, 1, 1.5, 2],
|
playbackRates: [0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 2.0],
|
||||||
controlBar: {
|
controlBar: {
|
||||||
children: [
|
children: [
|
||||||
"playToggle",
|
"playToggle",
|
||||||
@@ -78,10 +78,11 @@ var player = videojs("player", options, function() {
|
|||||||
volumeStep: 0.1,
|
volumeStep: 0.1,
|
||||||
seekStep: 5,
|
seekStep: 5,
|
||||||
enableModifiersForNumbers: false,
|
enableModifiersForNumbers: false,
|
||||||
|
enableHoverScroll: true,
|
||||||
customKeys: {
|
customKeys: {
|
||||||
|
// Toggle play with K Key
|
||||||
play: {
|
play: {
|
||||||
key: function(e) {
|
key: function(e) {
|
||||||
// Toggle play with K Key
|
|
||||||
return e.which === 75;
|
return e.which === 75;
|
||||||
},
|
},
|
||||||
handler: function(player, options, e) {
|
handler: function(player, options, e) {
|
||||||
@@ -92,29 +93,72 @@ var player = videojs("player", options, function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// Go backward 5 seconds
|
||||||
backward: {
|
backward: {
|
||||||
key: function(e) {
|
key: function(e) {
|
||||||
// Go backward 5 seconds
|
|
||||||
return e.which === 74;
|
return e.which === 74;
|
||||||
},
|
},
|
||||||
handler: function(player, options, e) {
|
handler: function(player, options, e) {
|
||||||
player.currentTime(player.currentTime() - 5);
|
player.currentTime(player.currentTime() - 5);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// Go forward 5 seconds
|
||||||
forward: {
|
forward: {
|
||||||
key: function(e) {
|
key: function(e) {
|
||||||
// Go forward 5 seconds
|
|
||||||
return e.which === 76;
|
return e.which === 76;
|
||||||
},
|
},
|
||||||
handler: function(player, options, e) {
|
handler: function(player, options, e) {
|
||||||
player.currentTime(player.currentTime() + 5);
|
player.currentTime(player.currentTime() + 5);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// Increase speed
|
||||||
|
increase_speed: {
|
||||||
|
key: function(e) {
|
||||||
|
return e.which === 190;
|
||||||
|
},
|
||||||
|
handler: function(player, _, e) {
|
||||||
|
size = options.playbackRates.length;
|
||||||
|
index = options.playbackRates.indexOf(player.playbackRate());
|
||||||
|
player.playbackRate(options.playbackRates[(index + 1) % size]);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// Decrease speed
|
||||||
|
decrease_speed: {
|
||||||
|
key: function(e) {
|
||||||
|
return e.which === 188;
|
||||||
|
},
|
||||||
|
handler: function(player, _, e) {
|
||||||
|
size = options.playbackRates.length;
|
||||||
|
index = options.playbackRates.indexOf(player.playbackRate());
|
||||||
|
player.playbackRate(options.playbackRates[(size + index - 1) % size]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
player.share(shareOptions);
|
player.on('error', function(event) {
|
||||||
|
if (player.error().code === 2 || player.error().code === 4) {
|
||||||
|
setInterval(setTimeout(function (event) {
|
||||||
|
console.log("An error occured in the player, reloading...");
|
||||||
|
|
||||||
|
var currentTime = player.currentTime();
|
||||||
|
var playbackRate = player.playbackRate();
|
||||||
|
var paused = player.paused();
|
||||||
|
|
||||||
|
player.load();
|
||||||
|
if (currentTime > 0.5) {
|
||||||
|
currentTime -= 0.5;
|
||||||
|
}
|
||||||
|
player.currentTime(currentTime);
|
||||||
|
player.playbackRate(playbackRate);
|
||||||
|
|
||||||
|
if (!paused) {
|
||||||
|
player.play();
|
||||||
|
}
|
||||||
|
}, 5000), 5000);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
<% if params[:video_start] > 0 || params[:video_end] > 0 %>
|
<% if params[:video_start] > 0 || params[:video_end] > 0 %>
|
||||||
player.markers({
|
player.markers({
|
||||||
@@ -148,7 +192,7 @@ var bpb = player.getChild('bigPlayButton');
|
|||||||
|
|
||||||
if (bpb) {
|
if (bpb) {
|
||||||
bpb.hide();
|
bpb.hide();
|
||||||
|
|
||||||
player.ready(function() {
|
player.ready(function() {
|
||||||
new Promise(function(resolve, reject) {
|
new Promise(function(resolve, reject) {
|
||||||
setTimeout(() => resolve(1), 1);
|
setTimeout(() => resolve(1), 1);
|
||||||
@@ -165,4 +209,7 @@ if (bpb) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
// Since videojs-share can sometimes be blocked, we try to load it last
|
||||||
|
player.share(shareOptions);
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
24
src/invidious/views/components/subscribe_widget.ecr
Normal file
24
src/invidious/views/components/subscribe_widget.ecr
Normal 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 %>
|
||||||
74
src/invidious/views/components/subscribe_widget_script.ecr
Normal file
74
src/invidious/views/components/subscribe_widget_script.ecr
Normal 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").gsub("'", "\\'") %> | <%= 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").gsub("'", "\\'") %> | <%= 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);
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<input type="file" id="import_youtube" name="import_youtube">
|
<input type="file" id="import_youtube" name="import_youtube">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-control-group">
|
<div class="pure-control-group">
|
||||||
<label for="import_freetube"><%= translate(locale, "Import FreeTube subscriptions (.db)") %></label>
|
<label for="import_freetube"><%= translate(locale, "Import FreeTube subscriptions (.db)") %></label>
|
||||||
<input type="file" id="import_freetube" name="import_freetube">
|
<input type="file" id="import_freetube" name="import_freetube">
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
<label for="import_newpipe"><%= translate(locale, "Import NewPipe data (.zip)") %></label>
|
<label for="import_newpipe"><%= translate(locale, "Import NewPipe data (.zip)") %></label>
|
||||||
<input type="file" id="import_newpipe" name="import_newpipe">
|
<input type="file" id="import_newpipe" name="import_newpipe">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-controls">
|
<div class="pure-controls">
|
||||||
<button type="submit" class="pure-button pure-button-primary"><%= translate(locale, "Import") %></button>
|
<button type="submit" class="pure-button pure-button-primary"><%= translate(locale, "Import") %></button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,15 +9,14 @@
|
|||||||
<link rel="stylesheet" href="/css/default.css">
|
<link rel="stylesheet" href="/css/default.css">
|
||||||
<title><%= HTML.escape(video.title) %> - Invidious</title>
|
<title><%= HTML.escape(video.title) %> - Invidious</title>
|
||||||
<style>
|
<style>
|
||||||
video, #my_video, .video-js, .vjs-default-skin
|
#player {
|
||||||
{
|
position: fixed;
|
||||||
position: fixed;
|
right: 0;
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
min-width: 100%;
|
min-width: 100%;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
width: auto;
|
width: auto;
|
||||||
height: auto;
|
height: auto;
|
||||||
z-index: -100;
|
z-index: -100;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<div class="pure-u-1 pure-u-md-1-4">
|
<div class="pure-u-1 pure-u-md-1-4">
|
||||||
<div class="h-box">
|
<div class="h-box">
|
||||||
<a style="width:100%;" href="/watch?v=<%= item %>">
|
<a style="width:100%;" href="/watch?v=<%= item %>">
|
||||||
<% if env.get?("user") && env.get("user").as(User).preferences.thin_mode %>
|
<% if env.get("preferences").as(Preferences).thin_mode %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="thumbnail">
|
<div class="thumbnail">
|
||||||
<img class="thumbnail" src="/vi/<%= item %>/mqdefault.jpg"/>
|
<img class="thumbnail" src="/vi/<%= item %>/mqdefault.jpg"/>
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
<% content_for "header" do %>
|
|
||||||
<meta name="description" content="<%= translate(locale, "An alternative front-end to YouTube") %>">
|
|
||||||
<title>Invidious</title>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div class="h-box pure-g">
|
|
||||||
<div class="pure-u-1-4"></div>
|
|
||||||
<div class="pure-u-1 pure-u-md-1-2">
|
|
||||||
<div class="pure-g">
|
|
||||||
<div class="pure-u-1-3">
|
|
||||||
<a href="/feed/popular" style="text-align:center;" class="pure-menu-heading">
|
|
||||||
<%= translate(locale, "Popular") %>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="pure-u-1-3">
|
|
||||||
<a href="/feed/top" style="text-align:center;" class="pure-menu-heading">
|
|
||||||
<%= translate(locale, "Top") %>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="pure-u-1-3">
|
|
||||||
<a href="/feed/trending" style="text-align:center;" class="pure-menu-heading">
|
|
||||||
<%= translate(locale, "Trending") %>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="pure-u-1-4"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="pure-g">
|
|
||||||
<% top_videos.each_slice(4) do |slice| %>
|
|
||||||
<% slice.each do |item| %>
|
|
||||||
<%= rendered "components/item" %>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<a href="https://unpkg.com/dashjs@2.9.0/dist/dash.mediaplayer.debug.js"><%= translate(locale, "source") %></a>
|
<a href="https://github.com/Dash-Industry-Forum/dash.js"><%= translate(locale, "source") %></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<a href="/js/silvermine-videojs-quality-selector.js"><%= translate(locale, "source") %></a>
|
<a href="https://github.com/omarroth/videojs-quality-selector"><%= translate(locale, "source") %></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<a href="https://unpkg.com/video.js@6.12.1/dist/video.js"><%= translate(locale, "source") %></a>
|
<a href="https://github.com/videojs/video.js"><%= translate(locale, "source") %></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<a href="https://unpkg.com/videojs-contrib-quality-levels@2.0.7/dist/videojs-contrib-quality-levels.js"><%= translate(locale, "source") %></a>
|
<a href="https://github.com/videojs/videojs-contrib-quality-levels"><%= translate(locale, "source") %></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<a href="https://unpkg.com/videojs-contrib-dash@2.8.2/dist/videojs-dash.js"><%= translate(locale, "source") %></a>
|
<a href="https://github.com/videojs/videojs-contrib-dash"><%= translate(locale, "source") %></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<a href="https://unpkg.com/@videojs/http-streaming@1.2.2/dist/videojs-http-streaming.js"><%= translate(locale, "source") %></a>
|
<a href="https://github.com/videojs/http-streaming"><%= translate(locale, "source") %></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<a href="https://unpkg.com/videojs-markers@1.0.1/dist/videojs-markers.js"><%= translate(locale, "source") %></a>
|
<a href="https://github.com/spchuang/videojs-markers"><%= translate(locale, "source") %></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@@ -117,7 +117,7 @@
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<a href="https://unpkg.com/videojs-share@2.0.1/dist/videojs-share.js"><%= translate(locale, "source") %></a>
|
<a href="https://github.com/mkhazov/videojs-share"><%= translate(locale, "source") %></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<a href="/js/videojs.hotkeys.js"><%= translate(locale, "source") %></a>
|
<a href="https://github.com/ctd1500/videojs-hotkeys"><%= translate(locale, "source") %></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<div class="h-box">
|
<div class="h-box">
|
||||||
<div class="pure-g">
|
<div class="pure-g">
|
||||||
<div class="pure-u-1-2">
|
<div class="pure-u-1-2">
|
||||||
<a class="pure-button <% if account_type == "invidious" %>pure-button-disabled<% end %>" href="/login">
|
<a class="pure-button <% if account_type == "invidious" %>pure-button-disabled<% end %>" href="/login?type=invidious">
|
||||||
<%= translate(locale, "Login/Register") %>
|
<%= translate(locale, "Login/Register") %>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -22,52 +22,85 @@
|
|||||||
<% if account_type == "invidious" %>
|
<% if account_type == "invidious" %>
|
||||||
<form class="pure-form pure-form-stacked" action="/login?referer=<%= URI.escape(referer) %>&type=invidious" method="post">
|
<form class="pure-form pure-form-stacked" action="/login?referer=<%= URI.escape(referer) %>&type=invidious" method="post">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
<% if email %>
|
||||||
|
<input name="email" type="hidden" value="<%= email %>">
|
||||||
|
<% else %>
|
||||||
<label for="email"><%= translate(locale, "User ID:") %></label>
|
<label for="email"><%= translate(locale, "User ID:") %></label>
|
||||||
<input required class="pure-input-1" name="email" type="text" placeholder="User ID">
|
<input required class="pure-input-1" name="email" type="text" placeholder="User ID">
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% if password %>
|
||||||
|
<input name="password" type="hidden" value="<%= password %>">
|
||||||
|
<% else %>
|
||||||
<label for="password"><%= translate(locale, "Password:") %></label>
|
<label for="password"><%= translate(locale, "Password:") %></label>
|
||||||
<input required class="pure-input-1" name="password" type="password" placeholder="Password">
|
<input required class="pure-input-1" name="password" type="password" placeholder="Password">
|
||||||
|
|
||||||
<% if captcha_type == "image" %>
|
|
||||||
<img style="width:100%" src='<%= captcha.not_nil![:image] %>'/>
|
|
||||||
<input type="hidden" name="token" value="<%= captcha.not_nil![:token] %>">
|
|
||||||
<input type="hidden" name="challenge" value="<%= captcha.not_nil![:challenge] %>">
|
|
||||||
<label for="answer"><%= translate(locale, "Time (h:mm:ss):") %></label>
|
|
||||||
<input required type="text" name="answer" type="text" placeholder="h:mm:ss">
|
|
||||||
|
|
||||||
<label>
|
|
||||||
<a href="/login?referer=<%= URI.escape(referer) %>&type=invidious&captcha=text">
|
|
||||||
<%= translate(locale, "Text CAPTCHA") %>
|
|
||||||
</a>
|
|
||||||
</label>
|
|
||||||
<% else %>
|
|
||||||
<% text_captcha.not_nil![:tokens].each_with_index do |token, i| %>
|
|
||||||
<input type="hidden" name="text_challenge<%= i %>" value="<%= token[0] %>">
|
|
||||||
<input type="hidden" name="text_token<%= i %>" value="<%= token[1] %>">
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<label for="text_answer"><%= text_captcha.not_nil![:question] %></label>
|
|
||||||
<input required type="text" name="text_answer" type="text" placeholder="Answer">
|
|
||||||
|
|
||||||
<label>
|
<% if captcha %>
|
||||||
<a href="/login?referer=<%= URI.escape(referer) %>&type=invidious">
|
<% case captcha_type when %>
|
||||||
<%= translate(locale, "Image CAPTCHA") %>
|
<% when "image" %>
|
||||||
</a>
|
<% captcha = captcha.not_nil! %>
|
||||||
</label>
|
<img style="width:100%" src='<%= captcha[:question] %>'/>
|
||||||
|
<% captcha[:tokens].each_with_index do |token, i| %>
|
||||||
|
<input type="hidden" name="challenge[<%= i %>]" value="<%= token[0] %>">
|
||||||
|
<input type="hidden" name="token[<%= i %>]" value="<%= token[1] %>">
|
||||||
|
<% end %>
|
||||||
|
<input type="hidden" name="captcha_type" value="image">
|
||||||
|
<label for="answer"><%= translate(locale, "Time (h:mm:ss):") %></label>
|
||||||
|
<input type="text" name="answer" type="text" placeholder="h:mm:ss">
|
||||||
|
<% when "text" %>
|
||||||
|
<% captcha = captcha.not_nil! %>
|
||||||
|
<% captcha[:tokens].each_with_index do |token, i| %>
|
||||||
|
<input type="hidden" name="challenge[<%= i %>]" value="<%= token[0] %>">
|
||||||
|
<input type="hidden" name="token[<%= i %>]" value="<%= token[1] %>">
|
||||||
|
<% end %>
|
||||||
|
<input type="hidden" name="captcha_type" value="text">
|
||||||
|
<label for="answer"><%= captcha[:question] %></label>
|
||||||
|
<input type="text" name="answer" type="text" placeholder="Answer">
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<button type="submit" name="action" value="signin" class="pure-button pure-button-primary">
|
||||||
|
<%= translate(locale, "Register") %>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<% case captcha_type when %>
|
||||||
|
<% when "image" %>
|
||||||
|
<label>
|
||||||
|
<button type="submit" name="change_type" class="pure-button pure-button-primary" value="text">
|
||||||
|
<%= translate(locale, "Text CAPTCHA") %>
|
||||||
|
</button>
|
||||||
|
</label>
|
||||||
|
<% when "text" %>
|
||||||
|
<label>
|
||||||
|
<button type="submit" name="change_type" class="pure-button pure-button-primary" value="image">
|
||||||
|
<%= translate(locale, "Image CAPTCHA") %>
|
||||||
|
</button>
|
||||||
|
</label>
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
<button type="submit" name="action" value="signin" class="pure-button pure-button-primary">
|
||||||
|
<%= translate(locale, "Sign In") %>/<%= translate(locale, "Register") %>
|
||||||
|
</button>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<button type="submit" name="action" value="signin" class="pure-button pure-button-primary"><%= translate(locale, "Sign In") %></button>
|
|
||||||
<button type="submit" name="action" value="register" class="pure-button pure-button-primary"><%= translate(locale, "Register") %></button>
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
<% elsif account_type == "google" %>
|
<% elsif account_type == "google" %>
|
||||||
<form class="pure-form pure-form-stacked" action="/login?referer=<%= URI.escape(referer) %>" method="post">
|
<form class="pure-form pure-form-stacked" action="/login?referer=<%= URI.escape(referer) %>&type=google" method="post">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
<% if email %>
|
||||||
|
<input name="email" type="hidden" value="<%= email %>">
|
||||||
|
<% else %>
|
||||||
<label for="email"><%= translate(locale, "Email:") %></label>
|
<label for="email"><%= translate(locale, "Email:") %></label>
|
||||||
<input required class="pure-input-1" name="email" type="email" placeholder="Email">
|
<input required class="pure-input-1" name="email" type="email" placeholder="Email">
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% if password %>
|
||||||
|
<input name="password" type="hidden" value="<%= password %>">
|
||||||
|
<% else %>
|
||||||
<label for="password"><%= translate(locale, "Password:") %></label>
|
<label for="password"><%= translate(locale, "Password:") %></label>
|
||||||
<input required class="pure-input-1" name="password" type="password" placeholder="Password">
|
<input required class="pure-input-1" name="password" type="password" placeholder="Password">
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<% if tfa %>
|
<% if tfa %>
|
||||||
<label for="tfa"><%= translate(locale, "Google verification code:") %></label>
|
<label for="tfa"><%= translate(locale, "Google verification code:") %></label>
|
||||||
<input required class="pure-input-1" name="tfa" type="text" placeholder="Google verification code">
|
<input required class="pure-input-1" name="tfa" type="text" placeholder="Google verification code">
|
||||||
|
|||||||
@@ -19,4 +19,4 @@
|
|||||||
<%= rendered "components/item" %>
|
<%= rendered "components/item" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<% content_for "header" do %>
|
<% content_for "header" do %>
|
||||||
<title><%= playlist.title %> - Invidious</title>
|
<title><%= playlist.title %> - Invidious</title>
|
||||||
|
<link rel="alternate" type="application/rss+xml" title="RSS" href="/feed/playlist/<%= plid %>" />
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="pure-g h-box">
|
<div class="pure-g h-box">
|
||||||
@@ -30,7 +31,7 @@
|
|||||||
<%= rendered "components/item" %>
|
<%= rendered "components/item" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-g h-box">
|
<div class="pure-g h-box">
|
||||||
<div class="pure-u-1 pure-u-md-1-5">
|
<div class="pure-u-1 pure-u-md-1-5">
|
||||||
|
|||||||
80
src/invidious/views/playlists.ecr
Normal file
80
src/invidious/views/playlists.ecr
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
<% content_for "header" do %>
|
||||||
|
<title><%= author %> - Invidious</title>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<div class="pure-g h-box">
|
||||||
|
<div class="pure-u-2-3">
|
||||||
|
<h3><%= author %></h3>
|
||||||
|
</div>
|
||||||
|
<div class="pure-u-1-3" style="text-align:right;">
|
||||||
|
<h3>
|
||||||
|
<a href="/feed/channel/<%= ucid %>"><i class="icon ion-logo-rss"></i></a>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="h-box">
|
||||||
|
<% sub_count_text = number_to_short_text(sub_count) %>
|
||||||
|
<%= rendered "components/subscribe_widget" %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pure-g h-box">
|
||||||
|
<div class="pure-g pure-u-1-3">
|
||||||
|
<div class="pure-u-1 pure-md-1-3">
|
||||||
|
<a href="https://www.youtube.com/channel/<%= ucid %>"><%= translate(locale, "View channel on YouTube") %></a>
|
||||||
|
</div>
|
||||||
|
<div class="pure-u-1 pure-md-1-3">
|
||||||
|
<a href="/channel/<%= ucid %>"><%= translate(locale, "Videos") %></a>
|
||||||
|
</div>
|
||||||
|
<div class="pure-u-1 pure-md-1-3">
|
||||||
|
<% if !auto_generated %>
|
||||||
|
<b><%= translate(locale, "Playlists") %></b>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="pure-u-1-3">
|
||||||
|
</div>
|
||||||
|
<div class="pure-u-1-3">
|
||||||
|
<div class="pure-g" style="text-align:right;">
|
||||||
|
<% {"last", "oldest", "newest"}.each do |sort| %>
|
||||||
|
<div class="pure-u-1 pure-md-1-3">
|
||||||
|
<% if sort_by == sort %>
|
||||||
|
<b><%= translate(locale, sort) %></b>
|
||||||
|
<% else %>
|
||||||
|
<a href="/channel/<%= ucid %>/playlists?sort_by=<%= sort %>">
|
||||||
|
<%= translate(locale, sort) %>
|
||||||
|
</a>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="h-box">
|
||||||
|
<hr>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pure-g">
|
||||||
|
<% items.each_slice(4) do |slice| %>
|
||||||
|
<% slice.each do |item| %>
|
||||||
|
<%= rendered "components/item" %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pure-g h-box">
|
||||||
|
<div class="pure-u-1 pure-u-md-4-5"></div>
|
||||||
|
<div style="text-align:right;" class="pure-u-1 pure-u-md-1-5">
|
||||||
|
<% if items.size >= 28 %>
|
||||||
|
<a href="/channel/<%= ucid %>/playlists?continuation=<%= continuation %><% if sort_by != "last" %>&sort_by=<%= sort_by %><% end %>">
|
||||||
|
<%= translate(locale, "Next page") %>
|
||||||
|
</a>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
<% sub_count_text = number_to_short_text(sub_count) %>
|
||||||
|
<%= rendered "components/subscribe_widget_script" %>
|
||||||
|
</script>
|
||||||
@@ -1,7 +1,10 @@
|
|||||||
<% content_for "header" do %>
|
<% content_for "header" do %>
|
||||||
<title><%= translate(locale, "Popular") %> - Invidious</title>
|
<meta name="description" content="<%= translate(locale, "An alternative front-end to YouTube") %>">
|
||||||
|
<title><% if config.default_home != "Popular" %><%= translate(locale, "Popular") %> - <% end %>Invidious</title>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<%= rendered "components/feed_menu" %>
|
||||||
|
|
||||||
<div class="pure-g">
|
<div class="pure-g">
|
||||||
<% popular_videos.each_slice(4) do |slice| %>
|
<% popular_videos.each_slice(4) do |slice| %>
|
||||||
<% slice.each do |item| %>
|
<% slice.each do |item| %>
|
||||||
|
|||||||
@@ -15,29 +15,34 @@ function update_value(element) {
|
|||||||
|
|
||||||
<div class="pure-control-group">
|
<div class="pure-control-group">
|
||||||
<label for="video_loop"><%= translate(locale, "Always loop: ") %></label>
|
<label for="video_loop"><%= translate(locale, "Always loop: ") %></label>
|
||||||
<input name="video_loop" id="video_loop" type="checkbox" <% if user.preferences.video_loop %>checked<% end %>>
|
<input name="video_loop" id="video_loop" type="checkbox" <% if preferences.video_loop %>checked<% end %>>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-control-group">
|
<div class="pure-control-group">
|
||||||
<label for="autoplay"><%= translate(locale, "Autoplay: ") %></label>
|
<label for="autoplay"><%= translate(locale, "Autoplay: ") %></label>
|
||||||
<input name="autoplay" id="autoplay" type="checkbox" <% if user.preferences.autoplay %>checked<% end %>>
|
<input name="autoplay" id="autoplay" type="checkbox" <% if preferences.autoplay %>checked<% end %>>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-control-group">
|
<div class="pure-control-group">
|
||||||
<label for="continue"><%= translate(locale, "Autoplay next video: ") %></label>
|
<label for="continue"><%= translate(locale, "Autoplay next video: ") %></label>
|
||||||
<input name="continue" id="continue" type="checkbox" <% if user.preferences.continue %>checked<% end %>>
|
<input name="continue" id="continue" type="checkbox" <% if preferences.continue %>checked<% end %>>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pure-control-group">
|
||||||
|
<label for="local"><%= translate(locale, "Proxy videos? ") %></label>
|
||||||
|
<input name="local" id="local" type="checkbox" <% if preferences.local %>checked<% end %>>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-control-group">
|
<div class="pure-control-group">
|
||||||
<label for="listen"><%= translate(locale, "Listen by default: ") %></label>
|
<label for="listen"><%= translate(locale, "Listen by default: ") %></label>
|
||||||
<input name="listen" id="listen" type="checkbox" <% if user.preferences.listen %>checked<% end %>>
|
<input name="listen" id="listen" type="checkbox" <% if preferences.listen %>checked<% end %>>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-control-group">
|
<div class="pure-control-group">
|
||||||
<label for="speed"><%= translate(locale, "Default speed: ") %></label>
|
<label for="speed"><%= translate(locale, "Default speed: ") %></label>
|
||||||
<select name="speed" id="speed">
|
<select name="speed" id="speed">
|
||||||
<% {2.0, 1.5, 1.0, 0.5}.each do |option| %>
|
<% {2.0, 1.5, 1.25, 1.0, 0.75, 0.5, 0.25}.each do |option| %>
|
||||||
<option <% if user.preferences.speed == option %> selected <% end %>><%= option %></option>
|
<option <% if preferences.speed == option %> selected <% end %>><%= option %></option>
|
||||||
<% end %>
|
<% end %>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@@ -46,62 +51,42 @@ function update_value(element) {
|
|||||||
<label for="quality"><%= translate(locale, "Preferred video quality: ") %></label>
|
<label for="quality"><%= translate(locale, "Preferred video quality: ") %></label>
|
||||||
<select name="quality" id="quality">
|
<select name="quality" id="quality">
|
||||||
<% {"dash", "hd720", "medium", "small"}.each do |option| %>
|
<% {"dash", "hd720", "medium", "small"}.each do |option| %>
|
||||||
<option value="<%= option %>" <% if user.preferences.quality == option %> selected <% end %>><%= translate(locale, option) %></option>
|
<option value="<%= option %>" <% if preferences.quality == option %> selected <% end %>><%= translate(locale, option) %></option>
|
||||||
<% end %>
|
<% end %>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-control-group">
|
<div class="pure-control-group">
|
||||||
<label for="volume"><%= translate(locale, "Player volume: ") %></label>
|
<label for="volume"><%= translate(locale, "Player volume: ") %></label>
|
||||||
<input name="volume" id="volume" oninput="update_value(this);" type="range" min="0" max="100" step="5" value="<%= user.preferences.volume %>">
|
<input name="volume" id="volume" oninput="update_value(this);" type="range" min="0" max="100" step="5" value="<%= preferences.volume %>">
|
||||||
<span class="pure-form-message-inline" id="volume-value"><%= user.preferences.volume %></span>
|
<span class="pure-form-message-inline" id="volume-value"><%= preferences.volume %></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-control-group">
|
<div class="pure-control-group">
|
||||||
<label for="comments_0"><%= translate(locale, "Default comments: ") %></label>
|
<label for="comments[0]"><%= translate(locale, "Default comments: ") %></label>
|
||||||
<select name="comments_0" id="comments_0">
|
<% preferences.comments.each_with_index do |comments, index| %>
|
||||||
|
<select name="comments[<%= index %>]" id="comments[<%= index %>]">
|
||||||
<% {"", "youtube", "reddit"}.each do |option| %>
|
<% {"", "youtube", "reddit"}.each do |option| %>
|
||||||
<option value="<%= option %>" <% if user.preferences.comments[0] == option %> selected <% end %>><%= translate(locale, option) %></option>
|
<option value="<%= option %>" <% if preferences.comments[index] == option %> selected <% end %>><%= translate(locale, option) %></option>
|
||||||
<% end %>
|
<% end %>
|
||||||
</select>
|
</select>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-control-group">
|
<div class="pure-control-group">
|
||||||
<label for="comments_1"><%= translate(locale, "Fallback comments: ") %></label>
|
<label for="captions[0]"><%= translate(locale, "Default captions: ") %></label>
|
||||||
<select name="comments_1" id="comments_1">
|
<% preferences.captions.each_with_index do |caption, index| %>
|
||||||
<% {"", "youtube", "reddit"}.each do |option| %>
|
<select class="pure-u-1-6" name="captions[<%= index %>]" id="captions[<%= index %>]">
|
||||||
<option value="<%= option %>" <% if user.preferences.comments[1] == option %> selected <% end %>><%= translate(locale, option) %></option>
|
|
||||||
<% end %>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="pure-control-group">
|
|
||||||
<label for="captions_0"><%= translate(locale, "Default captions: ") %></label>
|
|
||||||
<select class="pure-u-1-5" name="captions_0" id="captions_0">
|
|
||||||
<% CAPTION_LANGUAGES.each do |option| %>
|
<% CAPTION_LANGUAGES.each do |option| %>
|
||||||
<option value="<%= option %>" <% if user.preferences.captions[0] == option %> selected <% end %>><%= translate(locale, option) %></option>
|
<option value="<%= option %>" <% if preferences.captions[index] == option %> selected <% end %>><%= translate(locale, option) %></option>
|
||||||
<% end %>
|
<% end %>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="pure-control-group">
|
|
||||||
<label for="captions_fallback"><%= translate(locale, "Fallback captions: ") %></label>
|
|
||||||
<select class="pure-u-1-5" name="captions_1" id="captions_1">
|
|
||||||
<% CAPTION_LANGUAGES.each do |option| %>
|
|
||||||
<option value="<%= option %>" <% if user.preferences.captions[1] == option %> selected <% end %>><%= translate(locale, option) %></option>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</select>
|
|
||||||
|
|
||||||
<select class="pure-u-1-5" name="captions_2" id="captions_2">
|
|
||||||
<% CAPTION_LANGUAGES.each do |option| %>
|
|
||||||
<option value="<%= option %>" <% if user.preferences.captions[2] == option %> selected <% end %>><%= translate(locale, option) %></option>
|
|
||||||
<% end %>
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-control-group">
|
<div class="pure-control-group">
|
||||||
<label for="related_videos"><%= translate(locale, "Show related videos? ") %></label>
|
<label for="related_videos"><%= translate(locale, "Show related videos? ") %></label>
|
||||||
<input name="related_videos" id="related_videos" type="checkbox" <% if user.preferences.related_videos %>checked<% end %>>
|
<input name="related_videos" id="related_videos" type="checkbox" <% if preferences.related_videos %>checked<% end %>>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<legend><%= translate(locale, "Visual preferences") %></legend>
|
<legend><%= translate(locale, "Visual preferences") %></legend>
|
||||||
@@ -110,63 +95,119 @@ function update_value(element) {
|
|||||||
<label for="locale"><%= translate(locale, "Language: ") %></label>
|
<label for="locale"><%= translate(locale, "Language: ") %></label>
|
||||||
<select name="locale" id="locale">
|
<select name="locale" id="locale">
|
||||||
<% LOCALES.each_key do |option| %>
|
<% LOCALES.each_key do |option| %>
|
||||||
<option value="<%= option %>" <% if user.preferences.locale == option %> selected <% end %>><%= option %></option>
|
<option value="<%= option %>" <% if preferences.locale == option %> selected <% end %>><%= option %></option>
|
||||||
<% end %>
|
<% end %>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-control-group">
|
<div class="pure-control-group">
|
||||||
<label for="dark_mode"><%= translate(locale, "Dark mode: ") %></label>
|
<label for="dark_mode"><%= translate(locale, "Dark mode: ") %></label>
|
||||||
<input name="dark_mode" id="dark_mode" type="checkbox" <% if user.preferences.dark_mode %>checked<% end %>>
|
<input name="dark_mode" id="dark_mode" type="checkbox" <% if preferences.dark_mode %>checked<% end %>>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-control-group">
|
<div class="pure-control-group">
|
||||||
<label for="thin_mode"><%= translate(locale, "Thin mode: ") %></label>
|
<label for="thin_mode"><%= translate(locale, "Thin mode: ") %></label>
|
||||||
<input name="thin_mode" id="thin_mode" type="checkbox" <% if user.preferences.thin_mode %>checked<% end %>>
|
<input name="thin_mode" id="thin_mode" type="checkbox" <% if preferences.thin_mode %>checked<% end %>>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<% if env.get? "user" %>
|
||||||
<legend><%= translate(locale, "Subscription preferences") %></legend>
|
<legend><%= translate(locale, "Subscription preferences") %></legend>
|
||||||
|
|
||||||
<div class="pure-control-group">
|
<div class="pure-control-group">
|
||||||
<label for="redirect_feed"><%= translate(locale, "Redirect homepage to feed: ") %></label>
|
<label for="redirect_feed"><%= translate(locale, "Redirect homepage to feed: ") %></label>
|
||||||
<input name="redirect_feed" id="redirect_feed" type="checkbox" <% if user.preferences.redirect_feed %>checked<% end %>>
|
<input name="redirect_feed" id="redirect_feed" type="checkbox" <% if preferences.redirect_feed %>checked<% end %>>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-control-group">
|
<div class="pure-control-group">
|
||||||
<label for="max_results"><%= translate(locale, "Number of videos shown in feed: ") %></label>
|
<label for="max_results"><%= translate(locale, "Number of videos shown in feed: ") %></label>
|
||||||
<input name="max_results" id="max_results" type="number" value="<%= user.preferences.max_results %>">
|
<input name="max_results" id="max_results" type="number" value="<%= preferences.max_results %>">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-control-group">
|
<div class="pure-control-group">
|
||||||
<label for="sort"><%= translate(locale, "Sort videos by: ") %></label>
|
<label for="sort"><%= translate(locale, "Sort videos by: ") %></label>
|
||||||
<select name="sort" id="sort">
|
<select name="sort" id="sort">
|
||||||
<% {"published", "published - reverse", "alphabetically", "alphabetically - reverse", "channel name", "channel name - reverse"}.each do |option| %>
|
<% {"published", "published - reverse", "alphabetically", "alphabetically - reverse", "channel name", "channel name - reverse"}.each do |option| %>
|
||||||
<option value="<%= option %>" <% if user.preferences.sort == option %> selected <% end %>><%= translate(locale, option) %></option>
|
<option value="<%= option %>" <% if preferences.sort == option %> selected <% end %>><%= translate(locale, option) %></option>
|
||||||
<% end %>
|
<% end %>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-control-group">
|
<div class="pure-control-group">
|
||||||
<label for="latest_only">Only show latest <% if user.preferences.unseen_only %>unwatched<% end %> video from channel: </label>
|
<% if preferences.unseen_only %>
|
||||||
<input name="latest_only" id="latest_only" type="checkbox" <% if user.preferences.latest_only %>checked<% end %>>
|
<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 preferences.latest_only %>checked<% end %>>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-control-group">
|
<div class="pure-control-group">
|
||||||
<label for="unseen_only"><%= translate(locale, "Only show unwatched: ") %></label>
|
<label for="unseen_only"><%= translate(locale, "Only show unwatched: ") %></label>
|
||||||
<input name="unseen_only" id="unseen_only" type="checkbox" <% if user.preferences.unseen_only %>checked<% end %>>
|
<input name="unseen_only" id="unseen_only" type="checkbox" <% if preferences.unseen_only %>checked<% end %>>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-control-group">
|
<div class="pure-control-group">
|
||||||
<label for="notifications_only"><%= translate(locale, "Only show notifications (if there are any): ") %></label>
|
<label for="notifications_only"><%= translate(locale, "Only show notifications (if there are any): ") %></label>
|
||||||
<input name="notifications_only" id="notifications_only" type="checkbox" <% if user.preferences.notifications_only %>checked<% end %>>
|
<input name="notifications_only" id="notifications_only" type="checkbox" <% if preferences.notifications_only %>checked<% end %>>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% if env.get?("user") && config.admins.includes? env.get?("user").as(User).email %>
|
||||||
|
<legend><%= translate(locale, "Administrator preferences") %></legend>
|
||||||
|
|
||||||
|
<div class="pure-control-group">
|
||||||
|
<label for="default_home"><%= translate(locale, "Default homepage: ") %></label>
|
||||||
|
<select name="default_home" id="default_home">
|
||||||
|
<% {"Popular", "Top", "Trending", "Subscriptions"}.each do |option| %>
|
||||||
|
<option value="<%= option %>" <% if config.default_home == option %> selected <% end %>><%= translate(locale, option) %></option>
|
||||||
|
<% end %>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="pure-control-group">
|
||||||
|
<label for="feed_menu"><%= translate(locale, "Feed menu: ") %></label>
|
||||||
|
<% 4.times do |index| %>
|
||||||
|
<select name="feed_menu[<%= index %>]" id="feed_menu[<%= index %>]">
|
||||||
|
<% {"", "Popular", "Top", "Trending", "Subscriptions"}.each do |option| %>
|
||||||
|
<option value="<%= option %>" <% if config.feed_menu[index]? == option %> selected <% end %>><%= translate(locale, option) %></option>
|
||||||
|
<% end %>
|
||||||
|
</select>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pure-control-group">
|
||||||
|
<label for="top_enabled"><%= translate(locale, "Top enabled? ") %></label>
|
||||||
|
<input name="top_enabled" id="top_enabled" type="checkbox" <% if config.top_enabled %>checked<% end %>>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pure-control-group">
|
||||||
|
<label for="captcha_enabled"><%= translate(locale, "CAPTCHA enabled? ") %></label>
|
||||||
|
<input name="captcha_enabled" id="captcha_enabled" type="checkbox" <% if config.captcha_enabled %>checked<% end %>>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pure-control-group">
|
||||||
|
<label for="login_enabled"><%= translate(locale, "Login enabled? ") %></label>
|
||||||
|
<input name="login_enabled" id="login_enabled" type="checkbox" <% if config.login_enabled %>checked<% end %>>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pure-control-group">
|
||||||
|
<label for="registration_enabled"><%= translate(locale, "Registration enabled? ") %></label>
|
||||||
|
<input name="registration_enabled" id="registration_enabled" type="checkbox" <% if config.registration_enabled %>checked<% end %>>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pure-control-group">
|
||||||
|
<label for="statistics_enabled"><%= translate(locale, "Report statistics? ") %></label>
|
||||||
|
<input name="statistics_enabled" id="statistics_enabled" type="checkbox" <% if config.statistics_enabled %>checked<% end %>>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% if env.get? "user" %>
|
||||||
<legend><%= translate(locale, "Data preferences") %></legend>
|
<legend><%= translate(locale, "Data preferences") %></legend>
|
||||||
|
|
||||||
<div class="pure-control-group">
|
<div class="pure-control-group">
|
||||||
<a href="/clear_watch_history?referer=<%= URI.escape(referer) %>"><%= translate(locale, "Clear watch history") %></a>
|
<a href="/clear_watch_history?referer=<%= URI.escape(referer) %>"><%= translate(locale, "Clear watch history") %></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-control-group">
|
<div class="pure-control-group">
|
||||||
<a href="/data_control?referer=<%= URI.escape(referer) %>"><%= translate(locale, "Import/Export data") %></a>
|
<a href="/data_control?referer=<%= URI.escape(referer) %>"><%= translate(locale, "Import/Export data") %></a>
|
||||||
</div>
|
</div>
|
||||||
@@ -182,6 +223,7 @@ function update_value(element) {
|
|||||||
<div class="pure-control-group">
|
<div class="pure-control-group">
|
||||||
<a href="/delete_account?referer=<%= URI.escape(referer) %>"><%= translate(locale, "Delete account") %></a>
|
<a href="/delete_account?referer=<%= URI.escape(referer) %>"><%= translate(locale, "Delete account") %></a>
|
||||||
</div>
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<div class="pure-controls">
|
<div class="pure-controls">
|
||||||
<button type="submit" class="pure-button pure-button-primary"><%= translate(locale, "Save preferences") %></button>
|
<button type="submit" class="pure-button pure-button-primary"><%= translate(locale, "Save preferences") %></button>
|
||||||
|
|||||||
75
src/invidious/views/privacy.ecr
Normal file
75
src/invidious/views/privacy.ecr
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
<% content_for "header" do %>
|
||||||
|
<title>Privacy Policy - Invidious</title>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<div class="h-box">
|
||||||
|
<%= Markdown.to_html(<<-END_PRIVACY_POLICY
|
||||||
|
## Privacy
|
||||||
|
|
||||||
|
This document concerns what data you provide to this website, the purpose of the data, how the data is stored, and how the data can be removed.
|
||||||
|
|
||||||
|
### Data you directly provide
|
||||||
|
|
||||||
|
Data that you provide to the website for the purpose of the site's operation (for example: an account name, account password, or channel subscription) will be stored in the website's database until the user decides to remove it. This data will not be intentionally shared with anyone or anything.
|
||||||
|
|
||||||
|
Information stored about a registered user is limited to:
|
||||||
|
|
||||||
|
- a list of session tokens for remaining logged in across devices
|
||||||
|
- the last time an account was updated (to provide accurate notifications)
|
||||||
|
- a list of video IDs identifying notifications from a user's subscriptions
|
||||||
|
- a list of channel UCIDs the user is subscribed to
|
||||||
|
- a user ID (for persistent storage of subscriptions and preferences)
|
||||||
|
- a json object containing user preferences
|
||||||
|
- a hashed password if applicable (not present on google accounts)
|
||||||
|
- a randomly generated token for providing an RSS feed of a user's subscriptions
|
||||||
|
- a list of video IDs identifying watched videos
|
||||||
|
|
||||||
|
The above list reflects [this code](https://github.com/omarroth/invidious/blob/master/src/invidious/users.cr#L14-L51).
|
||||||
|
|
||||||
|
Users can clear their watch history using the [clear watch history](/clear_watch_history) page.
|
||||||
|
|
||||||
|
If a user is logged in with a Google account, no password will ever be stored. This website uses the session token provided by Google to identify a user, but does not store the information required to make requests on a user's behalf without their knowledge or consent.
|
||||||
|
|
||||||
|
### Data you passively provide
|
||||||
|
|
||||||
|
When you request any resource from this website (for example: a page, a font, an image, or an API endpoint) information about the request may be logged.
|
||||||
|
|
||||||
|
Information about a request is limited to:
|
||||||
|
|
||||||
|
- the time the request was made
|
||||||
|
- the status code of the response
|
||||||
|
- the method of the request
|
||||||
|
- the requested URL
|
||||||
|
- how long it took to complete the request.
|
||||||
|
|
||||||
|
No identifying information is logged, such as the visitor's cookie, user-agent, or IP address. Here are a couple lines to serve as an example:
|
||||||
|
|
||||||
|
```
|
||||||
|
2019-01-19 16:37:47 +00:00 200 GET /api/v1/comments/xrlETJYzH-c?format=html&hl=en-US 1345.88ms
|
||||||
|
2019-01-19 16:37:53 +00:00 200 GET /vi/r5P-f5arPXE/maxres.jpg 1085.41ms
|
||||||
|
2019-01-19 16:37:54 +00:00 200 GET /watch 7.04ms
|
||||||
|
```
|
||||||
|
|
||||||
|
This website does not store the visitor's user-agent or IP address and does not use fingerprinting, advertisements, or tracking of any form.
|
||||||
|
|
||||||
|
This website provides links to googlevideo.com to provide audio and video playback. googlevideo.com is owned by Google and is subject to their [privacy policy](https://policies.google.com/privacy).
|
||||||
|
|
||||||
|
### Data stored in your browser
|
||||||
|
|
||||||
|
This website uses browser cookies to authenticate registered users. This data consists of:
|
||||||
|
|
||||||
|
- An account token to keep you logged into the website between visits, which is sent when any page is loaded while you are logged in
|
||||||
|
|
||||||
|
This website also provides an option to store site preferences, such as the theme or locale, without an account. Using this feature will store a cookie in the visitor's browser containing their preferences. This cookie is sent on every request and does not contain any identifying information.
|
||||||
|
|
||||||
|
You can remove this data from your browser by logging out of this website, or by using your browser's cookie-related controls to delete the data.
|
||||||
|
|
||||||
|
### Removal of data
|
||||||
|
|
||||||
|
To remove data stored in your browser, you can log out of the website, or you can use your browser's cookie-related controls to delete the data.
|
||||||
|
|
||||||
|
To remove data that has been stored in the website's database, you can use the [delete my account](/delete_account) page.
|
||||||
|
END_PRIVACY_POLICY
|
||||||
|
)
|
||||||
|
%>
|
||||||
|
</div>
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
<%= rendered "components/item" %>
|
<%= rendered "components/item" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-g h-box">
|
<div class="pure-g h-box">
|
||||||
<div class="pure-u-1 pure-u-md-1-5">
|
<div class="pure-u-1 pure-u-md-1-5">
|
||||||
|
|||||||
@@ -4,7 +4,9 @@
|
|||||||
|
|
||||||
<div class="pure-g h-box">
|
<div class="pure-g h-box">
|
||||||
<div class="pure-u-1-3">
|
<div class="pure-u-1-3">
|
||||||
<h3><%= translate(locale, "`x` subscriptions", %(<span id="count">#{subscriptions.size}</span>)) %></h3>
|
<h3>
|
||||||
|
<a href="/feed/subscriptions"><%= translate(locale, "`x` subscriptions", %(<span id="count">#{subscriptions.size}</span>)) %></a>
|
||||||
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="pure-u-1-3" style="text-align:center;">
|
<div class="pure-u-1-3" style="text-align:center;">
|
||||||
<h3>
|
<h3>
|
||||||
@@ -20,15 +22,15 @@
|
|||||||
|
|
||||||
<% subscriptions.each do |channel| %>
|
<% subscriptions.each do |channel| %>
|
||||||
<div class="h-box">
|
<div class="h-box">
|
||||||
<div class="pure-g">
|
<div class="pure-g<% if channel.deleted %> deleted <% end%>">
|
||||||
<div class="pure-u-2-5">
|
<div class="pure-u-2-5">
|
||||||
<h3>
|
<h3 style="padding-left: 0.5em">
|
||||||
<a href="/channel/<%= channel.id %>"><%= channel.author %></a>
|
<a href="/channel/<%= channel.id %>"><%= channel.author %></a>
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="pure-u-2-5"></div>
|
<div class="pure-u-2-5"></div>
|
||||||
<div class="pure-u-1-5" style="text-align: right;">
|
<div class="pure-u-1-5" style="text-align: right;">
|
||||||
<h3>
|
<h3 style="padding-right: 0.5em">
|
||||||
<a onclick="remove_subscription(this)"
|
<a onclick="remove_subscription(this)"
|
||||||
data-id="<%= channel.id %>"
|
data-id="<%= channel.id %>"
|
||||||
onmouseenter='this["href"]="javascript:void(0)"'
|
onmouseenter='this["href"]="javascript:void(0)"'
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
<% content_for "header" do %>
|
<% content_for "header" do %>
|
||||||
<title><%= translate(locale, "Subscriptions") %> - Invidious</title>
|
<title><%= translate(locale, "Subscriptions") %> - Invidious</title>
|
||||||
|
<link rel="alternate" type="application/rss+xml" title="RSS" href="/feed/private?token=<%= token %>" />
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<%= rendered "components/feed_menu" %>
|
||||||
|
|
||||||
<div class="pure-g h-box">
|
<div class="pure-g h-box">
|
||||||
<div class="pure-u-1-3">
|
<div class="pure-u-1-3">
|
||||||
<h3>
|
<h3>
|
||||||
@@ -15,7 +18,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="pure-u-1-3" style="text-align:right;">
|
<div class="pure-u-1-3" style="text-align:right;">
|
||||||
<h3>
|
<h3>
|
||||||
<a href="/feed/private?token=<%= user.token %>"><i class="icon ion-logo-rss"></i></a>
|
<a href="/feed/private?token=<%= token %>"><i class="icon ion-logo-rss"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -70,7 +73,7 @@ function mark_watched(target) {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="pure-g">
|
<div class="pure-g h-box">
|
||||||
<div class="pure-u-1 pure-u-md-1-5">
|
<div class="pure-u-1 pure-u-md-1-5">
|
||||||
<% if page >= 2 %>
|
<% if page >= 2 %>
|
||||||
<a href="/feed/subscriptions?max_results=<%= max_results %>&page=<%= page - 1 %>">
|
<a href="/feed/subscriptions?max_results=<%= max_results %>&page=<%= page - 1 %>">
|
||||||
|
|||||||
@@ -18,14 +18,14 @@
|
|||||||
<link rel="stylesheet" href="/css/grids-responsive-min.css">
|
<link rel="stylesheet" href="/css/grids-responsive-min.css">
|
||||||
<link rel="stylesheet" href="/css/ionicons.min.css">
|
<link rel="stylesheet" href="/css/ionicons.min.css">
|
||||||
<link rel="stylesheet" href="/css/default.css">
|
<link rel="stylesheet" href="/css/default.css">
|
||||||
<% if env.get?("user") && env.get("user").as(User).preferences.dark_mode %>
|
<% if env.get("preferences").as(Preferences).dark_mode %>
|
||||||
<link rel="stylesheet" href="/css/darktheme.css">
|
<link rel="stylesheet" href="/css/darktheme.css">
|
||||||
<% else %>
|
<% else %>
|
||||||
<link rel="stylesheet" href="/css/lighttheme.css">
|
<link rel="stylesheet" href="/css/lighttheme.css">
|
||||||
<% end %>
|
<% end %>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<% locale = LOCALES[env.get("locale").as(String)]? %>
|
<% locale = LOCALES[env.get("preferences").as(Preferences).locale]? %>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="pure-g">
|
<div class="pure-g">
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
<div class="pure-u-1 pure-u-md-12-24 searchbar">
|
<div class="pure-u-1 pure-u-md-12-24 searchbar">
|
||||||
<form class="pure-form" action="/search" method="get">
|
<form class="pure-form" action="/search" method="get">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<input type="search" style="width:100%;" name="q" placeholder="search" value="<%= env.get?("search").try {|x| HTML.escape(x.as(String)) } || env.params.query["q"]?.try {|x| HTML.escape(x)} %>">
|
<input type="search" style="width:100%;" name="q" placeholder="<%= translate(locale, "search") %>" value="<%= env.get?("search").try {|x| HTML.escape(x.as(String)) } || env.params.query["q"]?.try {|x| HTML.escape(x)} %>">
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -46,8 +46,7 @@
|
|||||||
<% if env.get? "user" %>
|
<% if env.get? "user" %>
|
||||||
<div class="pure-u-1-4">
|
<div class="pure-u-1-4">
|
||||||
<a href="/toggle_theme?referer=<%= env.get?("current_page") %>" class="pure-menu-heading">
|
<a href="/toggle_theme?referer=<%= env.get?("current_page") %>" class="pure-menu-heading">
|
||||||
<% preferences = env.get("user").as(User).preferences %>
|
<% if env.get("preferences").as(Preferences).dark_mode %>
|
||||||
<% if preferences.dark_mode %>
|
|
||||||
<i class="icon ion-ios-sunny"></i>
|
<i class="icon ion-ios-sunny"></i>
|
||||||
<% else %>
|
<% else %>
|
||||||
<i class="icon ion-ios-moon"></i>
|
<i class="icon ion-ios-moon"></i>
|
||||||
@@ -55,7 +54,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="pure-u-1-4">
|
<div class="pure-u-1-4">
|
||||||
<a href="/feed/subscriptions" class="pure-menu-heading">
|
<a title="<%= translate(locale, "Subscriptions") %>" href="/feed/subscriptions" class="pure-menu-heading">
|
||||||
<% notification_count = env.get("user").as(User).notifications.size %>
|
<% notification_count = env.get("user").as(User).notifications.size %>
|
||||||
<% if notification_count > 0 %>
|
<% if notification_count > 0 %>
|
||||||
<%= notification_count %> <i class="icon ion-ios-notifications"></i>
|
<%= notification_count %> <i class="icon ion-ios-notifications"></i>
|
||||||
@@ -65,7 +64,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="pure-u-1-4">
|
<div class="pure-u-1-4">
|
||||||
<a href="/preferences?referer=<%= env.get?("current_page") %>" class="pure-menu-heading">
|
<a title="<%= translate(locale, "Preferences") %>" href="/preferences?referer=<%= env.get?("current_page") %>" class="pure-menu-heading">
|
||||||
<i class="icon ion-ios-cog"></i>
|
<i class="icon ion-ios-cog"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -75,41 +74,67 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
<div class="pure-u-1-3">
|
||||||
|
<a href="/toggle_theme?referer=<%= env.get?("current_page") %>" class="pure-menu-heading">
|
||||||
|
<% if env.get("preferences").as(Preferences).dark_mode %>
|
||||||
|
<i class="icon ion-ios-sunny"></i>
|
||||||
|
<% else %>
|
||||||
|
<i class="icon ion-ios-moon"></i>
|
||||||
|
<% end %>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="pure-u-1-3">
|
||||||
|
<a title="<%= translate(locale, "Preferences") %>" href="/preferences?referer=<%= env.get?("current_page") %>" class="pure-menu-heading">
|
||||||
|
<i class="icon ion-ios-cog"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<% if config.login_enabled %>
|
||||||
|
<div class="pure-u-1-3">
|
||||||
<a href="/login?referer=<%= env.get?("current_page") %>" class="pure-menu-heading">
|
<a href="/login?referer=<%= env.get?("current_page") %>" class="pure-menu-heading">
|
||||||
<%= translate(locale, "Login") %>
|
<%= translate(locale, "Login") %>
|
||||||
</a>
|
</a>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<%= content %>
|
<%= content %>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<p>
|
<div class="pure-g">
|
||||||
<a href="https://github.com/omarroth">
|
<div class="pure-u-1 pure-u-md-1-3">
|
||||||
<%= translate(locale, "Released under the AGPLv3 by Omar Roth.") %>
|
<a href="https://github.com/omarroth/invidious">
|
||||||
</a>
|
<%= translate(locale, "Released under the AGPLv3 by Omar Roth.") %>
|
||||||
</p>
|
</a>
|
||||||
<p>
|
</div>
|
||||||
<a href="https://github.com/omarroth/invidious">
|
<div class="pure-u-1 pure-u-md-1-3">
|
||||||
<%= translate(locale, "Source available here.") %>
|
<i class="icon ion-logo-bitcoin"></i>
|
||||||
</a>
|
BTC: 356DpZyMXu6rYd55Yqzjs29n79kGKWcYrY</div>
|
||||||
</p>
|
<div class="pure-u-1 pure-u-md-1-3">
|
||||||
<p><%= translate(locale, "Liberapay: ") %>
|
<i class="icon ion-logo-bitcoin"></i>
|
||||||
<a href="https://liberapay.com/omarroth">
|
BCH: qq4ptclkzej5eza6a50et5ggc58hxsq5aylqut2npk</div>
|
||||||
https://liberapay.com/omarroth
|
<div class="pure-u-1 pure-u-md-1-3">
|
||||||
</a>
|
<i class="icon ion-logo-usd"></i>
|
||||||
</p>
|
<a href="https://liberapay.com/omarroth">Liberapay</a>
|
||||||
<p><%= translate(locale, "Patreon: ") %>
|
/
|
||||||
<a href="https://patreon.com/omarroth">
|
<a href="https://patreon.com/omarroth">Patreon</a>
|
||||||
https://patreon.com/omarroth
|
</div>
|
||||||
</a>
|
<div class="pure-u-1 pure-u-md-1-3">
|
||||||
</p>
|
<i class="icon ion-logo-javascript"></i>
|
||||||
<p><%= translate(locale, "BTC: ") %>356DpZyMXu6rYd55Yqzjs29n79kGKWcYrY</p>
|
<a rel="jslicense" href="/licenses">
|
||||||
<p><%= translate(locale, "BCH: ") %>qq4ptclkzej5eza6a50et5ggc58hxsq5aylqut2npk</p>
|
<%= translate(locale, "View JavaScript license information.") %>
|
||||||
<p>
|
</a>
|
||||||
<a rel="jslicense" href="/licenses">
|
/
|
||||||
<%= translate(locale, "View JavaScript license information.") %>
|
<i class="icon ion-ios-paper"></i>
|
||||||
</a>
|
<a href="/privacy">
|
||||||
</p>
|
<%= translate(locale, "View privacy policy.") %>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="pure-u-1 pure-u-md-1-3">
|
||||||
|
<i class="icon ion-logo-github"></i>
|
||||||
|
<%= translate(locale, "Current version: ") %> <%= CURRENT_VERSION %>-<%= CURRENT_COMMIT %>
|
||||||
|
<i class="icon ion-logo-github"></i>
|
||||||
|
<%= CURRENT_BRANCH %></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pure-u-1 pure-u-md-2-24"></div>
|
<div class="pure-u-1 pure-u-md-2-24"></div>
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
<% content_for "header" do %>
|
<% content_for "header" do %>
|
||||||
<title><%= translate(locale, "Top") %> - Invidious</title>
|
<meta name="description" content="<%= translate(locale, "An alternative front-end to YouTube") %>">
|
||||||
|
<title><% if config.default_home != "Top" %><%= translate(locale, "Top") %> - <% end %>Invidious</title>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<%= rendered "components/feed_menu" %>
|
||||||
|
|
||||||
<div class="pure-g">
|
<div class="pure-g">
|
||||||
<% top_videos.each_slice(4) do |slice| %>
|
<% top_videos.each_slice(4) do |slice| %>
|
||||||
<% slice.each do |item| %>
|
<% slice.each do |item| %>
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
<% content_for "header" do %>
|
<% content_for "header" do %>
|
||||||
<title><%= translate(locale, "Trending") %> - Invidious</title>
|
<meta name="description" content="<%= translate(locale, "An alternative front-end to YouTube") %>">
|
||||||
|
<title><% if config.default_home != "Trending" %><%= translate(locale, "Trending") %> - <% end %>Invidious</title>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<%= rendered "components/feed_menu" %>
|
||||||
|
|
||||||
<div class="pure-g h-box">
|
<div class="pure-g h-box">
|
||||||
<div class="pure-u-2-3">
|
<div class="pure-u-2-3">
|
||||||
<form class="pure-form pure-form-aligned" action="/feed/trending" method="get">
|
<form class="pure-form pure-form-aligned" action="/feed/trending" method="get">
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<meta name="twitter:url" content="<%= host_url %>/watch?v=<%= video.id %>">
|
<meta name="twitter:url" content="<%= host_url %>/watch?v=<%= video.id %>">
|
||||||
<meta name="twitter:title" content="<%= HTML.escape(video.title) %>">
|
<meta name="twitter:title" content="<%= HTML.escape(video.title) %>">
|
||||||
<meta name="twitter:description" content="<%= description %>">
|
<meta name="twitter:description" content="<%= description %>">
|
||||||
<meta name="twitter:image" content="/vi/<%= video.id %>/hqdefault.jpg">
|
<meta name="twitter:image" content="<%= host_url %>/vi/<%= video.id %>/maxres.jpg">
|
||||||
<meta name="twitter:player" content="<%= host_url %>/embed/<%= video.id %>">
|
<meta name="twitter:player" content="<%= host_url %>/embed/<%= video.id %>">
|
||||||
<meta name="twitter:player:width" content="1280">
|
<meta name="twitter:player:width" content="1280">
|
||||||
<meta name="twitter:player:height" content="720">
|
<meta name="twitter:player:height" content="720">
|
||||||
@@ -33,17 +33,20 @@
|
|||||||
|
|
||||||
<div class="h-box">
|
<div class="h-box">
|
||||||
<h1>
|
<h1>
|
||||||
<%= HTML.escape(video.title) %>
|
<%= HTML.escape(video.title) %>
|
||||||
<% if params[:listen] %>
|
<% if params[:listen] %>
|
||||||
<a href="/watch?<%= env.params.query %>&listen=0">
|
<a title="<%=translate(locale, "Video mode")%>" href="/watch?<%= env.params.query %>&listen=0">
|
||||||
<i class="icon ion-ios-videocam"></i>
|
<i class="icon ion-ios-videocam"></i>
|
||||||
</a>
|
</a>
|
||||||
<% else %>
|
<% else %>
|
||||||
<a href="/watch?<%= env.params.query %>&listen=1">
|
<a title="<%=translate(locale, "Audio mode")%>" href="/watch?<%= env.params.query %>&listen=1">
|
||||||
<i class="icon ion-ios-volume-high"></i>
|
<i class="icon ion-ios-volume-high"></i>
|
||||||
</a>
|
</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
</h1>
|
</h1>
|
||||||
|
<% if !video.is_listed %>
|
||||||
|
<h3><i class="icon ion-ios-lock"></i> <%= translate(locale, "Unlisted") %></h3>
|
||||||
|
<% end %>
|
||||||
<% if !reason.empty? %>
|
<% if !reason.empty? %>
|
||||||
<h3><%= reason %></h3>
|
<h3><%= reason %></h3>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -53,6 +56,38 @@
|
|||||||
<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>
|
||||||
|
|
||||||
|
<% if CONFIG.dmca_content.includes? video.id %>
|
||||||
|
<p>Download is disabled.</p>
|
||||||
|
<% else %>
|
||||||
|
<form class="pure-form pure-form-stacked" action="/latest_version" method="get" rel="noopener" target="_blank">
|
||||||
|
<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 value='{"id":"<%= video.id %>","itag":"<%= option["itag"] %>","title":"<%= URI.escape(video.title) %>-<%= video.id %>.<%= option["type"].split(";")[0].split("/")[1] %>"}'>
|
||||||
|
<%= option["quality_label"] %> - <%= option["type"].split(";")[0] %> @ <%= option["fps"] %>fps - video only
|
||||||
|
</option>
|
||||||
|
<% end %>
|
||||||
|
<% audio_streams.each do |option| %>
|
||||||
|
<option value='{"id":"<%= video.id %>","itag":"<%= option["itag"] %>","title":"<%= URI.escape(video.title) %>-<%= video.id %>.<%= option["type"].split(";")[0].split("/")[1] %>"}'>
|
||||||
|
<%= option["type"].split(";")[0] %> @ <%= option["bitrate"] %>k - audio only
|
||||||
|
</option>
|
||||||
|
<% end %>
|
||||||
|
<% fmt_stream.each do |option| %>
|
||||||
|
<option value='{"id":"<%= video.id %>","itag":"<%= option["itag"] %>","title":"<%= URI.escape(video.title) %>-<%= video.id %>.<%= option["type"].split(";")[0].split("/")[1] %>"}'>
|
||||||
|
<%= itag_to_metadata?(option["itag"]).try &.["height"]? || "~240" %>p - <%= option["type"].split(";")[0] %>
|
||||||
|
</option>
|
||||||
|
<% end %>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="submit" class="pure-button pure-button-primary">
|
||||||
|
<b><%= translate(locale, "Download") %></b>
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<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 +117,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,16 +148,16 @@
|
|||||||
</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? %>
|
||||||
<div id="continue" <% if plid %>style="display:none"<% end %>>
|
<div id="continue" <% if plid %>style="display:none"<% end %>>
|
||||||
<div class="pure-control-group">
|
<div class="pure-control-group">
|
||||||
@@ -156,7 +171,7 @@
|
|||||||
<% rvs.each do |rv| %>
|
<% rvs.each do |rv| %>
|
||||||
<% if rv["id"]? %>
|
<% if rv["id"]? %>
|
||||||
<a href="/watch?v=<%= rv["id"] %>">
|
<a href="/watch?v=<%= rv["id"] %>">
|
||||||
<% if preferences && preferences.thin_mode %>
|
<% if env.get("preferences").as(Preferences).thin_mode %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="thumbnail">
|
<div class="thumbnail">
|
||||||
<img class="thumbnail" src="/vi/<%= rv["id"] %>/mqdefault.jpg">
|
<img class="thumbnail" src="/vi/<%= rv["id"] %>/mqdefault.jpg">
|
||||||
@@ -179,7 +194,7 @@
|
|||||||
<script>
|
<script>
|
||||||
<% if !rvs.empty? && !plid && params[:continue] %>
|
<% if !rvs.empty? && !plid && params[:continue] %>
|
||||||
player.on('ended', function() {
|
player.on('ended', function() {
|
||||||
window.location.replace("/watch?v="
|
location.assign("/watch?v="
|
||||||
+ "<%= rvs.select { |rv| rv["id"]? }[0]?.try &.["id"] %>"
|
+ "<%= rvs.select { |rv| rv["id"]? }[0]?.try &.["id"] %>"
|
||||||
+ "&continue=1"
|
+ "&continue=1"
|
||||||
<% if params[:listen] %>
|
<% if params[:listen] %>
|
||||||
@@ -198,7 +213,7 @@ player.on('ended', function() {
|
|||||||
function continue_autoplay(target) {
|
function continue_autoplay(target) {
|
||||||
if (target.checked) {
|
if (target.checked) {
|
||||||
player.on('ended', function() {
|
player.on('ended', function() {
|
||||||
window.location.replace("/watch?v="
|
location.assign("/watch?v="
|
||||||
+ "<%= rvs.select { |rv| rv["id"]? }[0]?.try &.["id"] %>"
|
+ "<%= rvs.select { |rv| rv["id"]? }[0]?.try &.["id"] %>"
|
||||||
+ "&continue=1"
|
+ "&continue=1"
|
||||||
<% if params[:listen] %>
|
<% if params[:listen] %>
|
||||||
@@ -224,62 +239,32 @@ 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 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3> \
|
||||||
<hr>'
|
<hr>'
|
||||||
|
|
||||||
var plid = "<%= plid %>"
|
var plid = "<%= plid %>"
|
||||||
|
|
||||||
if (plid.startsWith("RD")) {
|
if (plid.startsWith("RD")) {
|
||||||
var plid_url = "/api/v1/mixes/<%= plid %>?continuation=<%= video.id %>&format=html&hl=<%= env.get("locale").as(String) %>";
|
var plid_url = "/api/v1/mixes/<%= plid %>?continuation=<%= video.id %>&format=html&hl=<%= env.get("preferences").as(Preferences).locale %>";
|
||||||
} else {
|
} else {
|
||||||
var plid_url = "/api/v1/playlists/<%= plid %>?continuation=<%= video.id %>&format=html&hl=<%= env.get("locale").as(String) %>";
|
var plid_url = "/api/v1/playlists/<%= plid %>?continuation=<%= video.id %>&format=html&hl=<%= env.get("preferences").as(Preferences).locale %>";
|
||||||
}
|
}
|
||||||
|
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
@@ -292,10 +277,10 @@ function get_playlist() {
|
|||||||
if (xhr.readyState == 4) {
|
if (xhr.readyState == 4) {
|
||||||
if (xhr.status == 200) {
|
if (xhr.status == 200) {
|
||||||
playlist.innerHTML = xhr.response.playlistHtml;
|
playlist.innerHTML = xhr.response.playlistHtml;
|
||||||
|
|
||||||
if (xhr.response.nextVideo) {
|
if (xhr.response.nextVideo) {
|
||||||
player.on('ended', function() {
|
player.on('ended', function() {
|
||||||
window.location.replace("/watch?v="
|
location.assign("/watch?v="
|
||||||
+ xhr.response.nextVideo
|
+ xhr.response.nextVideo
|
||||||
+ "&list=<%= plid %>"
|
+ "&list=<%= plid %>"
|
||||||
<% if params[:listen] %>
|
<% if params[:listen] %>
|
||||||
@@ -322,21 +307,28 @@ 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 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></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 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3>';
|
||||||
|
|
||||||
var url = "/api/v1/comments/<%= video.id %>?source=reddit&format=html&hl=<%= env.get("locale").as(String) %>";
|
var url = "/api/v1/comments/<%= video.id %>?source=reddit&format=html&hl=<%= env.get("preferences").as(Preferences).locale %>";
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.responseType = "json";
|
xhr.responseType = "json";
|
||||||
xhr.timeout = 20000;
|
xhr.timeout = 20000;
|
||||||
@@ -370,7 +362,7 @@ function get_reddit_comments() {
|
|||||||
contentHtml: xhr.response.contentHtml
|
contentHtml: xhr.response.contentHtml
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
<% if preferences && preferences.comments[1] == "youtube" %>
|
<% if preferences && preferences.comments[1] == "youtube" %>
|
||||||
get_youtube_comments();
|
get_youtube_comments();
|
||||||
<% else %>
|
<% else %>
|
||||||
comments.innerHTML = fallback;
|
comments.innerHTML = fallback;
|
||||||
@@ -382,17 +374,24 @@ 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 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3>';
|
||||||
|
|
||||||
var url = "/api/v1/comments/<%= video.id %>?format=html&hl=<%= env.get("locale").as(String) %>";
|
var url = "/api/v1/comments/<%= video.id %>?format=html&hl=<%= env.get("preferences").as(Preferences).locale %>&thin_mode=<%= env.get("preferences").as(Preferences).thin_mode %>";
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.responseType = "json";
|
xhr.responseType = "json";
|
||||||
xhr.timeout = 20000;
|
xhr.timeout = 20000;
|
||||||
@@ -424,7 +423,7 @@ function get_youtube_comments() {
|
|||||||
comments.innerHTML = "";
|
comments.innerHTML = "";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
<% if preferences && preferences.comments[1] == "youtube" %>
|
<% if preferences && preferences.comments[1] == "youtube" %>
|
||||||
get_youtube_comments();
|
get_youtube_comments();
|
||||||
<% else %>
|
<% else %>
|
||||||
comments.innerHTML = "";
|
comments.innerHTML = "";
|
||||||
@@ -437,8 +436,8 @@ function get_youtube_comments() {
|
|||||||
console.log("Pulling comments timed out.");
|
console.log("Pulling comments timed out.");
|
||||||
|
|
||||||
comments.innerHTML =
|
comments.innerHTML =
|
||||||
'<h3><center class="loading"><i class="icon ion-ios-refresh"></i></center></h3>';
|
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3>';
|
||||||
get_youtube_comments();
|
get_youtube_comments(timeouts + 1);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -448,9 +447,9 @@ function get_youtube_replies(target, load_more) {
|
|||||||
var body = target.parentNode.parentNode;
|
var body = target.parentNode.parentNode;
|
||||||
var fallback = body.innerHTML;
|
var fallback = body.innerHTML;
|
||||||
body.innerHTML =
|
body.innerHTML =
|
||||||
'<h3><center class="loading"><i class="icon ion-ios-refresh"></i></center></h3>';
|
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3>';
|
||||||
|
|
||||||
var url = '/api/v1/comments/<%= video.id %>?format=html&hl=<%= env.get("locale").as(String) %>&continuation=' +
|
var url = '/api/v1/comments/<%= video.id %>?format=html&hl=<%= env.get("preferences").as(Preferences).locale %>&thin_mode=<%= env.get("preferences").as(Preferences).thin_mode %>&continuation=' +
|
||||||
continuation;
|
continuation;
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.responseType = 'json';
|
xhr.responseType = 'json';
|
||||||
@@ -468,7 +467,7 @@ function get_youtube_replies(target, load_more) {
|
|||||||
} else {
|
} else {
|
||||||
body.innerHTML = ' \
|
body.innerHTML = ' \
|
||||||
<p><a href="javascript:void(0)" \
|
<p><a href="javascript:void(0)" \
|
||||||
onclick="hide_youtube_replies(this)"><%= translate(locale, "Hide replies") %> \
|
onclick="hide_youtube_replies(this, \'<%= translate(locale, "Hide replies") %>\', \'<%= translate(locale, "Show replies") %>\')"><%= translate(locale, "Hide replies") %> \
|
||||||
</a></p> \
|
</a></p> \
|
||||||
<div>{contentHtml}</div>'.supplant({
|
<div>{contentHtml}</div>'.supplant({
|
||||||
contentHtml: xhr.response.contentHtml,
|
contentHtml: xhr.response.contentHtml,
|
||||||
|
|||||||
Reference in New Issue
Block a user