Compare commits
226 Commits
Author | SHA1 | Date | |
---|---|---|---|
a16f967085 | |||
7f8349d4b1 | |||
4ae57cb475 | |||
cc00beb1db | |||
a1d442d1e3 | |||
2fdf3d24e3 | |||
0832fa9bdb | |||
c2c224b16f | |||
7951d4c8aa | |||
a02b539362 | |||
fc4a2b812e | |||
6b4ea53a32 | |||
db7457f135 | |||
29db4c2301 | |||
99f024d222 | |||
f3c9566687 | |||
382a6b556d | |||
17a9b0cd15 | |||
5ca74a8dca | |||
162f7d9d3d | |||
388b3cff8b | |||
a5af6f4956 | |||
7f3bdc4bea | |||
d06c5306be | |||
2e39299071 | |||
7596baf03b | |||
0feb414a1d | |||
1360d67c11 | |||
a160c645c9 | |||
5b2b026468 | |||
78b34af305 | |||
a9a0280b1a | |||
4c936eab29 | |||
9463717b90 | |||
e605371154 | |||
467b000757 | |||
45a53e2616 | |||
51f4f60d46 | |||
7d47b5d4bd | |||
d0b30ad977 | |||
843606db65 | |||
b030149d76 | |||
b686d76d8c | |||
2ef3db334f | |||
89439e1775 | |||
65cc51766f | |||
b9aff18d43 | |||
d2f51ab71c | |||
21dd204a13 | |||
7fd4c76a59 | |||
4480e9c1ba | |||
6033e8aed1 | |||
32bd593a8a | |||
1c49fa3b63 | |||
7ab9d741bf | |||
6540742c76 | |||
dcf45d217f | |||
d211d8fc05 | |||
2dfb3e7814 | |||
19bf0ccbf0 | |||
2ea580e18e | |||
0152967d3e | |||
934c81b02f | |||
9ce02e579d | |||
32e4ad0784 | |||
18bb397c7d | |||
3c98601f35 | |||
26eb59e00d | |||
ca4e8b800c | |||
568e55dfa6 | |||
941a773b7d | |||
95ebfd34c5 | |||
fd7aa59e0f | |||
cdd916f51d | |||
e80884cfce | |||
c656a7cb9e | |||
a15463cf37 | |||
2ce038fb7a | |||
588f9b9bd6 | |||
d6d73bd336 | |||
f01cfd0226 | |||
60c6778344 | |||
a242390fc1 | |||
e5730f4cbc | |||
2be43c17ab | |||
2e99642173 | |||
aeaeacbf8d | |||
6b12f11e10 | |||
c7e8d623c0 | |||
ad20d6359b | |||
b535de690e | |||
c1a60392ae | |||
fff817b654 | |||
8706364d90 | |||
ed6d321bc6 | |||
b10794bc64 | |||
94c92b68a2 | |||
27488a2295 | |||
3418b82dc5 | |||
04d9b16a6b | |||
43961ef035 | |||
16964ca6ce | |||
879586d7f5 | |||
cd482cfd89 | |||
d185ba84bf | |||
c7f0a6f2e1 | |||
48526435ad | |||
b92542ea35 | |||
e6bc5bb35d | |||
6ca7a71db9 | |||
bf867c3fcf | |||
6db235becf | |||
71303452d8 | |||
adcefa4ffa | |||
c8b321920d | |||
47ed8bd13f | |||
44e9b4ac2a | |||
9aeb9ec00f | |||
0f58f872ac | |||
0e26e4d407 | |||
9113846d10 | |||
df7480bcb6 | |||
4b76b93610 | |||
1465cefa17 | |||
dcddb6fb83 | |||
7f868ecdf9 | |||
e8c9641548 | |||
b9e2fee2c9 | |||
0c8a1d46bd | |||
8766475e55 | |||
aaf8bdb28c | |||
b77c73df0d | |||
6066615553 | |||
30d040b02a | |||
8e6bee75e7 | |||
28f564ee4c | |||
1ea563f4f1 | |||
c5d2a57206 | |||
6ae5d489ec | |||
0a1c84ada1 | |||
fee3b93339 | |||
31a9abc03a | |||
3748c0083f | |||
7a6d4e6ef9 | |||
6c19f0f242 | |||
1ff8579575 | |||
b9c29bf537 | |||
f988123820 | |||
2be240767c | |||
103949c61e | |||
316a73f07e | |||
b26b6b9bdf | |||
3a44cfd3de | |||
570e09333a | |||
4e33d3a0b9 | |||
9e022f3b04 | |||
1dcca85819 | |||
ad57247a5f | |||
9194f47ee4 | |||
4f856dd898 | |||
c912e63fb5 | |||
7e558c5b1d | |||
19632511d5 | |||
d739ef8fd3 | |||
c92f6e44e7 | |||
19516eaa25 | |||
294c168193 | |||
468e6b1c27 | |||
c55c553725 | |||
596960f35a | |||
e39dec9778 | |||
8794e26e67 | |||
eb44a60f8d | |||
791f216a45 | |||
be601a7584 | |||
ceff2763a5 | |||
8fd54027de | |||
a97c72f63b | |||
81ea2bf799 | |||
ed3d9ce540 | |||
ef95dc2380 | |||
4875aa1d7e | |||
3ee7201f5d | |||
3c634d9f66 | |||
94d116974b | |||
5c87cf1547 | |||
1cfa1f6559 | |||
8b69e23471 | |||
57d88ffcc8 | |||
e46e6183ae | |||
b49623f90f | |||
95c6747a3e | |||
245d0b571f | |||
6e0df50a03 | |||
f88697541c | |||
5eefab62fd | |||
13b0526c7a | |||
1568a35cfb | |||
93082c0a45 | |||
1a39faee75 | |||
81b447782a | |||
c87aa8671c | |||
921c34aa65 | |||
ccc423f682 | |||
02335f3390 | |||
bcc8ba73bf | |||
35e63fa3f5 | |||
3fe4547f8e | |||
2dbe151ceb | |||
e2c15468e0 | |||
022427e20e | |||
88430a6fc0 | |||
c72b9bea64 | |||
80bc29f3cd | |||
f7125c1204 | |||
6f9056fd84 | |||
3733fe8272 | |||
98bb20abcd | |||
a4d44d3286 | |||
dc358fc7e5 | |||
e14f2f2750 | |||
650b44ade2 | |||
3830604e42 | |||
f83e9e6eb9 | |||
236358d3ad | |||
43d6b65b4f |
214
CHANGELOG.md
@ -1,10 +1,125 @@
|
||||
# 0.7.0 (2018-09-25)
|
||||
|
||||
## Week 7: 1080p and Search Types
|
||||
|
||||
# 0.12.0 (2018-12-06)
|
||||
|
||||
## Version 0.12.0: Accessibility, Privacy, Transparency
|
||||
|
||||
Hello again, it's been a while! A lot has happened since the last release. Invidious has seen [134 commits](https://github.com/omarroth/invidious/compare/0.11.0...0.12.0) from 3 contributors, and I'm quite happy with the progress that has been made. I enjoyed this past month, and I believe having a monthly release schedule allows me to focus on more long-term improvements, and I hope people enjoy these more substantial updates as well.
|
||||
|
||||
## Accessability and Privacy
|
||||
|
||||
There have been quite a few improvements for user privacy, and improvements that improve accessibility for both people and software.
|
||||
|
||||
You can now view comments without JS with [`19516ea`](https://github.com/omarroth/invidious/19516ea). Currently, this functionality is limited to the first 20 comments, but expect this functionality to be improved to come as close to the JS version as possible. Folks can track progress in [#204](https://github.com/omarroth/invidious/issues/204).
|
||||
|
||||
Invidious is now compatible with [LibreJS](https://www.gnu.org/software/librejs/), and provides license information [here](https://invidio.us/licenses) with [`7f868ec`](https://github.com/omarroth/invidious/7f868ec). As expected, all libraries are compatible under the AGPLv3, and I'm happy to mention that no other changes were required to make Invidious compatible with LibreJS.
|
||||
|
||||
A DNT policy has also been added with [`9194f47`](https://github.com/omarroth/invidious/9194f47) for compatibility with [Privacy Badger](https://www.eff.org/privacybadger). I'm pleased to mention that here too no other changes had to be made in order for Invidious to be compatible with this extension. I expect a privacy policy to be added soon as well, so users can better understand how Invidious uses their data.
|
||||
|
||||
For users that are visually impaired, there is now a text CAPTCHA available so it's easier to register and login. Because of the simple front-end of the project, I expect screen readers and other software to be able to easily understand the site's interface. In combination with the ability to listen-only, I believe Invidious is much more accessible than YouTube. Folks can read [#244](https://github.com/omarroth/invidious/issues/244) for more details, and I would very much appreciate any feedback on how this can be improved.
|
||||
|
||||
## User Preferences
|
||||
|
||||
There have been a lot of improvements to preferences. Options for enabling audio-only by default and continuous playback (autoplay) have been added with [`e39dec9`](https://github.com/omarroth/invidious/e39dec9), with [`4b76b93`](https://github.com/omarroth/invidious/4b76b93), respectively. Users can also now mark videos as watched from their subscription feed and view watch history by going to https://invidio.us/feed/history. I expect to add more information to history so that it's easier to use. Folks can track progress with [#182](https://github.com/omarroth/invidious/issues/182). As with all data Invidious keeps, watch history can be exported [here](https://invidio.us/data_control).
|
||||
|
||||
Users can now delete their account with [`b9c29bf`](https://github.com/omarroth/invidious/b9c29bf). This will remove _all_ user data from Invidious, including session IDs, watch history, and subscriptions. As mentioned above, it's easy to export that data and import it to a local instance, or export subscriptions for use with other applications such as [FreeTube](https://github.com/FreeTubeApp/FreeTube) or [NewPipe](https://github.com/TeamNewPipe/NewPipe).
|
||||
|
||||
## Translation and Internationalis(z)ation
|
||||
|
||||
Invidious has been approved for hosting by Weblate, available [here](https://hosted.weblate.org/projects/invidious/translations/). At the time of writing, translations for Arabic, Dutch, German, Polish, and Russian are currently underway. I would like to say a very big thank you to everyone working on them, and I hope to fully support them within around 2 weeks. Folks can track progress with [#251](https://github.com/omarroth/invidious/issues/251).
|
||||
|
||||
## Transperency and Finances
|
||||
|
||||
For the sake of transparency, I plan on publishing each month's finances. This is currently already done on Liberapay and Patreon, but there is not a total amount currently provided anywhere, and I would also like to include expenses to provide a better explanation of how patrons' money is being spent.
|
||||
|
||||
### Donations
|
||||
|
||||
- [Patreon](https://www.patreon.com/omarroth): \$43.60 (Patreon takes roughly 9%)
|
||||
- [Liberapay](https://liberapay.com/omarroth) : \$22.10
|
||||
- Crypto : ~\$1.25 (converted from BCH, BTC)
|
||||
- Total : \$66.95
|
||||
|
||||
### 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
|
||||
|
||||
I'd be happy to provide any explanation where needed. I would also like to thank everyone who donates, it really helps and I can't say how happy I am to see that so many people find it valuable.
|
||||
|
||||
That's all for this month. I wish everyone the best for the holidays, and I'll see you all again in January!
|
||||
|
||||
# 0.11.0 (2018-10-23)
|
||||
|
||||
## Week 11: FreeTube and Styling
|
||||
|
||||
This past Friday I'm been very excited to see that FreeTube version [0.4.0](https://github.com/FreeTubeApp/FreeTube/tree/0.4.0) has been released! I'd recommend taking a look at the official patch notes, but to spoil a little bit here: FreeTube now uses the Invidious API for _all_ requests previously sent to YouTube, and has also seen support for playlists, keyboard shortcuts, and more default settings (speed, autoplay, and subtitles). I'm happy to see that FreeTube has reached 500 stars on Github, and I think it's very much deserved. I'd recommend keeping an eye on the newly-launched [FreeTube blog](https://freetube.writeas.com/) for updates on the project.
|
||||
|
||||
Quite a few styling changes have been added this past week, including channel subscriber count to the subscribe and unsubscribe buttons. The changes sound small, but they've been a very big improvement and I'm quite satisfied with how they look. Also to note is that partial support for duration in thumbnails have been added with [#202](https://github.com/omarroth/invidious/issues/202). Overall, I think the site is becoming much more pleasing visually, and I hope to continue to improve it.
|
||||
|
||||
I've been very pleased to see Invidious in its current state, and I believe it's many times more mature compared to even a month ago. Changes have also started slowing down a bit as it's become more mature, and therefore I'd like to transition to a monthly update schedule in order to provide more comprehensive updates for everyone. I want to thank you all for helping me reach this point. I can't say how happy I am for Invidious to be where it is now.
|
||||
|
||||
Enjoy the rest of your week everyone, I'll see you in November!
|
||||
|
||||
# 0.10.0 (2018-10-16)
|
||||
|
||||
## Week 10: Subscriptions
|
||||
|
||||
This week I'm happy to announce that subscriptions have been drastically sped up with
|
||||
35e63fa. As I mentioned last week, this essentially "caches" a user's feed, meaning that operations that previously took 20 seconds or timed out, now can load in under a second. I'd take a look at [#173](https://github.com/omarroth/invidious/issues/173) for a sample benchmark. Previously features that made Invidious's feed so useful, such as filtering by unseen and by author would take too long to load, and so instead would timeout. I'm very happy that this has been fixed, and folks can get back to using these features.
|
||||
|
||||
Among some smaller features that have been added this week include [#118](https://github.com/omarroth/invidious/issues/118), which adds, in my opinion, some very attractive subscribe and unsubscribe buttons. I think it's also a bit of a functional improvement as well, since it doesn't require a user to reload the page in order to subscribe or unsubscribe to a channel, and also gives the opportunity to put the channel's sub count on display.
|
||||
|
||||
An option to swap between Reddit and YouTube comments without a page reload has been added with
|
||||
5eefab6, bringing it somewhat closer in functionality to the popular [AlienTube](https://github.com/xlexi/alientube) extension, on which it is based (although the extension unfortunately appears now to be fragmented).
|
||||
|
||||
As always, there are a couple smaller improvements this week, including some minor fixes for geo-bypass with
|
||||
e46e618 and [`245d0b5`](https://github.com/omarroth/invidious/245d0b5), playlist preferences with [`81b4477`](https://github.com/omarroth/invidious/81b4477), and YouTube comments with [`02335f3`](https://github.com/omarroth/invidious/02335f3).
|
||||
|
||||
This coming week I'd also recommend keeping an eye on the excellent [FreeTube](https://github.com/FreeTubeApp/FreeTube), which is looking forward to a new release. I've been very lucky to work with [**@PrestonN**](https://github.com/PrestonN) for the past few weeks to improve the Invidious API, and I'm quite looking forward to the new release.
|
||||
|
||||
That's all for this week folks, thank you all again for your continued interest and support.
|
||||
|
||||
# 0.9.0 (2018-10-08)
|
||||
|
||||
## Week 9: Playlists
|
||||
|
||||
Not as much to announce this week, but I'm still quite happy to announce a couple things, namely:
|
||||
|
||||
Playback support for playlists has finally been added with [`88430a6`](https://github.com/omarroth/invidious/88430a6). You can now view playlists with the `&list=` query param, as you would on YouTube. You can also view mixes with the mentioned `&list=`, although they require some extra handling that I would like to add in the coming week, as well as adding playlist looping and shuffle. I think playback support has been a roadblock for more exciting features such as [#114](https://github.com/omarroth/invidious/issues/114), and I look forward to improving the experience.
|
||||
|
||||
Comments have had a bit of a cosmetic upgrade with [#132](https://github.com/omarroth/invidious/issues/132), which I think helps better distinguish between Reddit and YouTube comments, as it makes them appear similarly to their respective sites. You can also now switch between YouTube and Reddit comments with a push of a button, which I think is quite an improvement, especially for newer or less popular videos with fewer comments.
|
||||
|
||||
I've had a small breakthrough in speeding up users' subscription feeds with PostgreSQL's [materialized views](https://www.postgresql.org/docs/current/static/rules-materializedviews.html). Without going into too much detail, materialized views essentially cache the result of a query, making it possible to run resource-intensive queries once, rather than every time a user visits their feed. In the coming week I hope to push this out to users, and hopefully close [#173](https://github.com/omarroth/invidious/issues/173).
|
||||
|
||||
I haven't had as much time to work on the project this week, but I'm quite happy to have added some new features. Have a great week everyone.
|
||||
|
||||
# 0.8.0 (2018-10-02)
|
||||
|
||||
## Week 8: Mixes
|
||||
|
||||
Hello again!
|
||||
|
||||
Mixes have been added with [`20130db`](https://github.com/omarroth/invidious/20130db), which makes it easy to create a playlist of related content. See [#188](https://github.com/omarroth/invidious/issues/188) for more info on how they work. Currently, they return the first 50 videos rather than a continuous feed to avoid tracking by Google/YouTube, which I think is a good trade-off between usability and privacy, and I hope other folks agree. You can create mixes by adding `RD` to the beginning of a video ID, an example is provided [here](https://www.invidio.us/mix?list=RDYE7VzlLtp-4) based on Big Buck Bunny. I've been quite happy with the results returned for the mixes I've tried, and it is not limited to music, which I think is a big plus. To emulate a continuous feed provided many are used to, using the last video of each mix as a new 'seed' has worked well for me. In the coming week I'd like to to add playback support in the player to listen to these easily.
|
||||
|
||||
A very big thanks to [**@flourgaz**](https://github.com/flourgaz) for Docker support with [#186](https://github.com/omarroth/invidious/pull/186). This is an enormous improvement in portability for the project, and opens the door for Heroku support (see [#162](https://github.com/omarroth/invidious/issues/162)), and seamless support on Windows. For most users, it should be as easy as running `docker-compose up`.
|
||||
|
||||
I've spent quite a bit of time this past week improving support for geo-bypass (see [#92](https://github.com/omarroth/invidious/issues/92)), and am happy to note that Invidious has been able to proxy ~50% of the geo-restricted videos I've tried. In addition, you can now watch geo-restricted videos if you have `dash` enabled as your `preferred quality`, for more details see [#34](https://github.com/omarroth/invidious/issues/34) and [#185](https://github.com/omarroth/invidious/issues/185), or last week's update. For folks interested in replicating these results for themselves, I'd take a look [here](https://gist.github.com/omarroth/3ce0f276c43e0c4b13e7d9cd35524688) for the script used, and [here](https://gist.github.com/omarroth/beffc4a76a7b82a422e1b36a571878ef) for a list of videos restricted in the US.
|
||||
|
||||
1080p has seen a fairly smooth roll-out, although there have been a couple issues reported, mainly [#193](https://github.com/omarroth/invidious/issues/193), which is likely an issue in the player. I've also encountered a couple other issues myself that I would like to investigate. Although none are major, I'd like to keep 1080p opt-in for registered users another week to better address these issues.
|
||||
|
||||
Have an excellent week everyone.
|
||||
|
||||
# 0.7.0 (2018-09-25)
|
||||
|
||||
## Week 7: 1080p and Search Types
|
||||
|
||||
Hello again everyone! I've got quite a couple announcements this week:
|
||||
|
||||
Experimental 1080p support has been added with [`b3ca392`](https://github.com/omarroth/invidious/b3ca392)2a9073b4abb0d7fde58a3e6098668f53e, and can be enabled by going to preferences and changing `preferred video quality` to `dash`. You can find more details [here](https://github.com/omarroth/invidious/issues/34#issuecomment-424171888). Currently quality and speed controls have not yet been integrated into the player, but I'd still appreciate feedback, mainly on any issues with buffering or DASH playback. I hope to integrate 1080p support into the player and push support site-wide in the coming weeks.
|
||||
Experimental 1080p support has been added with [`b3ca392`](https://github.com/omarroth/invidious/b3ca392), and can be enabled by going to preferences and changing `preferred video quality` to `dash`. You can find more details [here](https://github.com/omarroth/invidious/issues/34#issuecomment-424171888). Currently quality and speed controls have not yet been integrated into the player, but I'd still appreciate feedback, mainly on any issues with buffering or DASH playback. I hope to integrate 1080p support into the player and push support site-wide in the coming weeks.
|
||||
|
||||
You can now filter content types in search with the `type:TYPE` filter. Supported content types are `playlist`, `channel`, and `video`. More info is available [here](https://github.com/omarroth/invidious/issues/126#issuecomment-423823148). I think this is quite an improvement in usability and I hope others find the same.
|
||||
|
||||
@ -13,19 +128,20 @@ A [CHANGELOG](https://github.com/omarroth/invidious/blob/master/CHANGELOG.md) ha
|
||||
Recently, users have been reporting 504s when attempting to access their subscriptions, which is tracked in [#173](https://github.com/omarroth/invidious/issues/173). This is most likely caused by an uptick in usage, which I am absolutely grateful for, but unfortunately has resulted in an increase in costs for hosting the site, which is why I will be bumping my goal on Patreon from $60 to $80. I would appreciate any feedback on how subscriptions could be improved.
|
||||
|
||||
Other minor improvements include:
|
||||
- Additional regions added to bypass geo-block with [`9a78523`](https://github.com/omarroth/invidious/9a78523)41d9d67b6bddd8a9836c1b71c124c3614
|
||||
- Fix for playlists containing less than 100 videos (previously shown as empty) with [`35ac887`](https://github.com/omarroth/invidious/35ac887)13320a970e3a87a26249c2a18a709f020
|
||||
- Fix for `published` date for Reddit comments (previously showing negative seconds) with [`6e09202`](https://github.com/omarroth/invidious/6e09202)6d29eccc3e3adf02be138fddec2354027
|
||||
|
||||
Thank you everyone for your support!
|
||||
|
||||
# 0.6.0 (2018-09-18)
|
||||
|
||||
## Week 6: Filters and Thumbnails
|
||||
|
||||
- Additional regions added to bypass geo-block with [`9a78523`](https://github.com/omarroth/invidious/9a78523)
|
||||
- Fix for playlists containing less than 100 videos (previously shown as empty) with [`35ac887`](https://github.com/omarroth/invidious/35ac887)
|
||||
- Fix for `published` date for Reddit comments (previously showing negative seconds) with [`6e09202`](https://github.com/omarroth/invidious/6e09202)
|
||||
|
||||
Thank you everyone for your support!
|
||||
|
||||
# 0.6.0 (2018-09-18)
|
||||
|
||||
## Week 6: Filters and Thumbnails
|
||||
|
||||
Hello again! This week I'm happy to mention a couple new features to search as well as some miscellaneous usability improvements.
|
||||
|
||||
You can now constrain your search query to a specific channel with the `channel:CHANNEL` filter (see [#165](https://github.com/omarroth/invidious/issues/165) for more details). Unfortunately, other search filters combined with channel search are not yet supported. I hope to add support for them in the coming weeks.
|
||||
You can now constrain your search query to a specific channel with the `channel:CHANNEL` filter (see [#165](https://github.com/omarroth/invidious/issues/165) for more details). Unfortunately, other search filters combined with channel search are not yet supported. I hope to add support for them in the coming weeks.
|
||||
|
||||
You can also now search only your subscriptions by adding `subscriptions:true` to your query (see [#30](https://github.com/omarroth/invidious/issues/30) for more details). It's not quite ready for widespread use but I would appreciate feedback as the site updates to fully support it. Other search filters are not yet supported with `subscriptions:true`, but I hope to add more functionality to this as well.
|
||||
|
||||
@ -35,12 +151,12 @@ As a smaller improvement to the site, you can also now view RSS feeds for playli
|
||||
|
||||
These updates are also now listed under Github's [releases](https://github.com/omarroth/invidious/releases). I'm also planning on adding them as a `CHANGELOG.md` in the repository itself so people can receive a copy with the project's source.
|
||||
|
||||
That's all for this week. Thank you everyone for your support!
|
||||
|
||||
# 0.5.0 (2018-09-11)
|
||||
|
||||
## Week 5: Privacy and Security
|
||||
|
||||
That's all for this week. Thank you everyone for your support!
|
||||
|
||||
# 0.5.0 (2018-09-11)
|
||||
|
||||
## Week 5: Privacy and Security
|
||||
|
||||
I hope everyone had a good weekend! This past week I've been fixing some issues that have been brought to my attention to help better protect users and help them keep their anonymity.
|
||||
|
||||
An issue with open referers has been fixed with [`29a2186`](https://github.com/omarroth/invidious/29a2186), which prevents potential redirects to external sites on actions such as login or modifying preferences.
|
||||
@ -51,7 +167,7 @@ A potential XSS vector has also been fixed in YouTube comments with [`8c45694`](
|
||||
|
||||
All the above vulnerabilities were brought to my attention by someone who wishes to remain anonymous, but I would like to say again here how thankful I am. If anyone else would like to get in touch please feel free to email me at omarroth@hotmail.com or omarroth@protonmail.com.
|
||||
|
||||
This week a couple changes have been made to better protect user's privacy as well.
|
||||
This week a couple changes have been made to better protect user's privacy as well.
|
||||
All CSS and JS assets are now served locally with [`3ec684a`](https://github.com/omarroth/invidious/3ec684a), which means users no longer need to whitelist unpkg.com. Although I personally have encountered few issues, I understand that many folks would like to keep their browsing activity contained to as few parties as possible. In the coming week I also hope to proxy YouTube images, so that no user data is sent to Google.
|
||||
|
||||
YouTube links in comments now should redirect properly to the Invidious alternate with [`1c8bd67`](https://github.com/omarroth/invidious/1c8bd67) and [`cf63c82`](https://github.com/omarroth/invidious/cf63c82), so users can more easily evade Google tracking.
|
||||
@ -67,12 +183,12 @@ Folks have also probably noticed that the gutters on either side of the screen h
|
||||
"Music", "Sports", and "Popular on YouTube" channels now properly display their videos. You can subscribe to these channels just as you would normally.
|
||||
|
||||
This coming week I'm planning on spending time with my family, so I unfortunately may not be as responsive. I do still hope to add some smaller features for next week however, and I hope to continue development soon.
|
||||
Thank you everyone again for your support.
|
||||
|
||||
# 0.4.0 (2018-09-06)
|
||||
|
||||
## Week 4: Genre Channels
|
||||
|
||||
Thank you everyone again for your support.
|
||||
|
||||
# 0.4.0 (2018-09-06)
|
||||
|
||||
## Week 4: Genre Channels
|
||||
|
||||
Hello! I hope everyone enjoyed their weekend. Without further ado:
|
||||
Just today genre channels have been added with [#119](https://github.com/omarroth/invidious/issues/119). More information on genre channels is available [here](https://support.google.com/youtube/answer/2579942). You can subscribe to them as normally, and view them as RSS. I think they offer an interesting alternative way to find new content and I hope people find them useful.
|
||||
|
||||
@ -84,12 +200,12 @@ One of the major use cases for Invidious is as a stripped-down version of YouTub
|
||||
|
||||
Finally, I'm pleased to announce that Invidious has hit 100 stars on GitHub. I am very happy that Invidious has proven to be useful to so many people, and I can't say how grateful I am to everyone for their continued support.
|
||||
|
||||
Enjoy the rest of your week everyone!
|
||||
|
||||
# 0.3.0 (2018-09-06)
|
||||
|
||||
## Week 3: Quality of Life
|
||||
|
||||
Enjoy the rest of your week everyone!
|
||||
|
||||
# 0.3.0 (2018-09-06)
|
||||
|
||||
## Week 3: Quality of Life
|
||||
|
||||
Hello everyone! This week I've been working on some smaller features that will hopefully make the site more functional.
|
||||
Search filters have been added with [#126](https://github.com/omarroth/invidious/issues/126). You can now specify 'sort', 'date', 'duration', and 'features' within your query using the 'operator:value' syntax. I'd recommend taking a look [here](https://github.com/omarroth/invidious/blob/master/src/invidious/search.cr#L33-L114) for a list of supported options and at [#126](https://github.com/omarroth/invidious/issues/126) for some examples. This also opens the door for features such as [#30](https://github.com/omarroth/invidious/issues/30) which can be implemented as filters. I think advanced search is a major point in which Invidious can improve on YouTube and hope to add more features soon!
|
||||
|
||||
@ -101,12 +217,12 @@ I'd also like to announce that I've set up an account on [Liberapay](https://lib
|
||||
|
||||
[Two weeks ago](https://github.com/omarroth/invidious/releases/tag/0.1.0) I mentioned adding 1080p support into the player. Currently, the only thing blocking is [#207](https://github.com/videojs/http-streaming/pull/207) in the excellent [http-streaming](https://github.com/videojs/http-streaming) library. I hope to work with the videojs team to merge it soon and finally implement 1080p support!
|
||||
|
||||
That's all for this week, thank you again everyone for your support!
|
||||
|
||||
# 0.2.0 (2018-09-06)
|
||||
|
||||
## Week 2: Toward Playlists
|
||||
|
||||
That's all for this week, thank you again everyone for your support!
|
||||
|
||||
# 0.2.0 (2018-09-06)
|
||||
|
||||
## Week 2: Toward Playlists
|
||||
|
||||
Sorry for the late update! Not as much to announce this week, but still a couple things of note:
|
||||
I'm happy to announce that a playlists page and API endpoint has been added so you can now view playlists. Currently, you cannot watch playlists through the player, but I hope to add that in the coming week as well as adding functionality to add and modify playlists. There is a good conversation on [#114](https://github.com/omarroth/invidious/issues/114) about giving playlists even more functionality, which I think is interesting and would appreciate feedback on.
|
||||
|
||||
@ -116,16 +232,16 @@ A couple of miscellaneous features and bugfixes:
|
||||
|
||||
- You can now login to Invidious simultaneously from multiple devices - [#109](https://github.com/omarroth/invidious/issues/109)
|
||||
|
||||
- Added a note for scheduled livestreams - [#124](https://github.com/omarroth/invidious/issues/124)
|
||||
- Added a note for scheduled livestreams - [#124](https://github.com/omarroth/invidious/issues/124)
|
||||
|
||||
- Changed YouTube comment header to "View x comments" - [#120](https://github.com/omarroth/invidious/issues/120)
|
||||
- Changed YouTube comment header to "View x comments" - [#120](https://github.com/omarroth/invidious/issues/120)
|
||||
|
||||
Enjoy your week everyone!
|
||||
|
||||
# 0.1.0 (2018-09-06)
|
||||
|
||||
## Week 1: Invidious API and Geo-Bypass
|
||||
|
||||
Enjoy your week everyone!
|
||||
|
||||
# 0.1.0 (2018-09-06)
|
||||
|
||||
## Week 1: Invidious API and Geo-Bypass
|
||||
|
||||
Hello everyone! This past week there have been quite a few things worthy of mention:
|
||||
|
||||
I'm happy to announce the [Invidious Developer API](https://github.com/omarroth/invidious/wiki/API). The Invidious API does not use any of the official YouTube APIs, and instead crawls the site to provide a JSON interface for other developers to use. It's still under development but is already powering [CloudTube](https://github.com/cloudrac3r/cadencegq). The API currently does not have a quota (compared to YouTube) which I hope to continue thanks to continued support from my Patrons. Hopefully other developers find it useful, and I hope to continue to improve it so it can better serve the community.
|
||||
@ -134,4 +250,4 @@ Just today partial support for bypassing geo-restrictions has been added with [f
|
||||
|
||||
Support for generating DASH manifests has been fixed, in the coming week I hope to integrate this functionality into the watch page, so users can view videos in 1080p and above.
|
||||
|
||||
Thank you everyone for your continued interest and support!
|
||||
Thank you everyone for your continued interest and support!
|
||||
|
99
README.md
@ -2,7 +2,7 @@
|
||||
|
||||
## Invidious is an alternative front-end to YouTube
|
||||
|
||||
- Audio-only (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)
|
||||
- No ads
|
||||
- No need to create a Google account to save subscriptions
|
||||
@ -18,8 +18,9 @@
|
||||
- Set default player options (speed, quality, autoplay, loop)
|
||||
- Does not require JS to play videos
|
||||
- Support for Reddit comments in place of YT comments
|
||||
- Import/Export subscriptions, watch history, preference
|
||||
- Import/Export subscriptions, watch history, preferences
|
||||
- Does not use any of the official YouTube APIs
|
||||
- Developer [API](https://github.com/omarroth/invidious/wiki/API)
|
||||
|
||||
Liberapay: https://liberapay.com/omarroth
|
||||
Patreon: https://patreon.com/omarroth
|
||||
@ -51,47 +52,65 @@ $ docker volume rm invidious_postgresdata
|
||||
$ docker-compose build
|
||||
```
|
||||
|
||||
### Installing [Crystal](https://github.com/crystal-lang/crystal):
|
||||
|
||||
#### On Arch:
|
||||
### Arch Linux:
|
||||
|
||||
```bash
|
||||
$ sudo pacman -S shards crystal
|
||||
$ shards
|
||||
```
|
||||
# Install dependencies
|
||||
$ sudo pacman -S shards crystal imagemagick librsvg
|
||||
|
||||
#### On OSX:
|
||||
# Setup PostgresSQL
|
||||
$ sudo systemctl enable postgresql
|
||||
$ sudo systemctl start postgresql
|
||||
$ sudo -i -u postgres
|
||||
$ createuser -s YOUR_USER_NAME
|
||||
$ createdb YOUR_USER_NAME
|
||||
$ exit
|
||||
|
||||
```bash
|
||||
$ brew update
|
||||
$ brew install shards crystal-lang
|
||||
$ shards
|
||||
```
|
||||
|
||||
### Installing Postgres:
|
||||
|
||||
#### On Arch:
|
||||
|
||||
Install according to the [wiki](https://wiki.archlinux.org/index.php/PostgreSQL#Installing_PostgreSQL)
|
||||
|
||||
#### On OSX:
|
||||
|
||||
```bash
|
||||
$ brew install postgres
|
||||
```
|
||||
|
||||
### Setup Postgres:
|
||||
|
||||
```bash
|
||||
# Setup Invidious
|
||||
$ git clone https://github.com/omarroth/invidious
|
||||
$ cd invidious
|
||||
$ ./setup.sh
|
||||
$ shards
|
||||
$ crystal build src/invidious.cr --release
|
||||
```
|
||||
|
||||
### Installing ImageMagick (required for CAPTCHA):
|
||||
|
||||
#### On Arch:
|
||||
### On Ubuntu:
|
||||
|
||||
```bash
|
||||
$ sudo pacman -S imagemagick librsvg
|
||||
# Install dependencies
|
||||
$ curl -sSL https://dist.crystal-lang.org/apt/setup.sh | sudo bash
|
||||
$ sudo apt update
|
||||
$ sudo apt install crystal libssl-dev libxml2-dev libyaml-dev libgmp-dev libreadline-dev librsvg2-dev postgresql imagemagick libsqlite3-dev
|
||||
|
||||
# Setup PostgreSQL
|
||||
$ sudo systemctl enable postgresql
|
||||
$ sudo systemctl start postgresql
|
||||
$ sudo -i -u postgres
|
||||
$ createuser -s YOUR_USER_NAME_HERE
|
||||
$ createdb YOUR_USER_NAME_HERE
|
||||
$ exit
|
||||
|
||||
# Setup Invidious
|
||||
$ git clone https://github.com/omarroth/invidious
|
||||
$ cd invidious
|
||||
$ ./setup.sh
|
||||
$ shards
|
||||
$ crystal build src/invidious.cr --release
|
||||
```
|
||||
|
||||
### On OSX:
|
||||
|
||||
```bash
|
||||
# Install dependencies
|
||||
$ brew update
|
||||
$ brew install shards crystal-lang postgres imagemagick librsvg
|
||||
|
||||
# Setup Invidious
|
||||
$ git clone https://github.com/omarroth/invidious
|
||||
$ cd invidious
|
||||
$ ./setup.sh
|
||||
$ shards
|
||||
$ crystal build src/invidious.cr --release
|
||||
```
|
||||
|
||||
## Usage:
|
||||
@ -110,6 +129,8 @@ Usage: invidious [arguments]
|
||||
Number of threads for crawling (default: 1)
|
||||
-c THREADS, --channel-threads=THREADS
|
||||
Number of threads for refreshing channels (default: 1)
|
||||
-f THREADS, --feed-threads=THREADS
|
||||
Number of threads for refreshing feeds (default: 1)
|
||||
-v THREADS, --video-threads=THREADS
|
||||
Number of threads for refreshing videos (default: 1)
|
||||
```
|
||||
@ -125,7 +146,15 @@ $ ./sentry
|
||||
|
||||
- [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.
|
||||
- [Invidious Redirect](https://greasyfork.org/en/scripts/370461-invidious-redirect): Redirects Youtube URLs to Invidio.us (userscript)
|
||||
- [Invidio.us embed](https://greasyfork.org/en/scripts/370442-invidious-embed): Replaces YouTube embeds with Invidio.us embeds (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
|
||||
|
||||
- [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
|
||||
- [PeerTubeify](https://gitlab.com/Ealhad/peertubeify): On YouTube, displays a link to the same video on PeerTube, if it exists.
|
||||
|
||||
## Contributing
|
||||
|
||||
|
218
assets/.well-known/dnt-policy.txt
Normal file
@ -0,0 +1,218 @@
|
||||
Do Not Track Compliance Policy
|
||||
|
||||
Version 1.0
|
||||
|
||||
This domain complies with user opt-outs from tracking via the "Do Not Track"
|
||||
or "DNT" header [http://www.w3.org/TR/tracking-dnt/]. This file will always
|
||||
be posted via HTTPS at https://example-domain.com/.well-known/dnt-policy.txt
|
||||
to indicate this fact.
|
||||
|
||||
SCOPE
|
||||
|
||||
This policy document allows an operator of a Fully Qualified Domain Name
|
||||
("domain") to declare that it respects Do Not Track as a meaningful privacy
|
||||
opt-out of tracking, so that privacy-protecting software can better determine
|
||||
whether to block or anonymize communications with this domain. This policy is
|
||||
intended first and foremost to be posted on domains that publish ads, widgets,
|
||||
images, scripts and other third-party embedded hypertext (for instance on
|
||||
widgets.example.com), but it can be posted on any domain, including those users
|
||||
visit directly (such as www.example.com). The policy may be applied to some
|
||||
domains used by a company, site, or service, and not to others. Do Not Track
|
||||
may be sent by any client that uses the HTTP protocol, including websites,
|
||||
mobile apps, and smart devices like TVs. Do Not Track also works with all
|
||||
protocols able to read HTTP headers, including SPDY.
|
||||
|
||||
NOTE: This policy contains both Requirements and Exceptions. Where possible
|
||||
terms are defined in the text, but a few additional definitions are included
|
||||
at the end.
|
||||
|
||||
REQUIREMENTS
|
||||
|
||||
When this domain receives Web requests from a user who enables DNT by actively
|
||||
choosing an opt-out setting in their browser or by installing software that is
|
||||
primarily designed to protect privacy ("DNT User"), we will take the following
|
||||
measures with respect to those users' data, subject to the Exceptions, also
|
||||
listed below:
|
||||
|
||||
1. END USER IDENTIFIERS:
|
||||
|
||||
a. If a DNT User has logged in to our service, all user identifiers, such as
|
||||
unique or nearly unique cookies, "supercookies" and fingerprints are
|
||||
discarded as soon as the HTTP(S) response is issued.
|
||||
|
||||
Data structures which associate user identifiers with accounts may be
|
||||
employed to recognize logged in users per Exception 4 below, but may not
|
||||
be associated with records of the user's activities unless otherwise
|
||||
excepted.
|
||||
|
||||
b. If a DNT User is not logged in to our service, we will take steps to ensure
|
||||
that no user identifiers are transmitted to us at all.
|
||||
|
||||
2. LOG RETENTION:
|
||||
|
||||
a. Logs with DNT Users' identifiers removed (but including IP addresses and
|
||||
User Agent strings) may be retained for a period of 10 days or less,
|
||||
unless an Exception (below) applies. This period of time balances privacy
|
||||
concerns with the need to ensure that log processing systems have time to
|
||||
operate; that operations engineers have time to monitor and fix technical
|
||||
and performance problems; and that security and data aggregation systems
|
||||
have time to operate.
|
||||
|
||||
b. These logs will not be used for any other purposes.
|
||||
|
||||
3. OTHER DOMAINS:
|
||||
|
||||
a. If this domain transfers identifiable user data about DNT Users to
|
||||
contractors, affiliates or other parties, or embeds from or posts data to
|
||||
other domains, we will either:
|
||||
|
||||
b. ensure that the operators of those domains abide by this policy overall
|
||||
by posting it at /.well-known/dnt-policy.txt via HTTPS on the domains in
|
||||
question,
|
||||
|
||||
OR
|
||||
|
||||
ensure that the recipient's policies and practices require the recipient
|
||||
to respect the policy for our DNT Users' data.
|
||||
|
||||
OR
|
||||
|
||||
obtain a contractual commitment from the recipient to respect this policy
|
||||
for our DNT Users' data.
|
||||
|
||||
NOTE: if an “Other Domain” does not receive identifiable user information
|
||||
from the domain because such information has been removed, because the
|
||||
Other Domain does not log that information, or for some other reason, these
|
||||
requirements do not apply.
|
||||
|
||||
c. "Identifiable" means any records which are not Anonymized or otherwise
|
||||
covered by the Exceptions below.
|
||||
|
||||
4. PERIODIC REASSERTION OF COMPLIANCE:
|
||||
|
||||
At least once every 12 months, we will take reasonable steps commensurate
|
||||
with the size of our organization and the nature of our service to confirm
|
||||
our ongoing compliance with this document, and we will publicly reassert our
|
||||
compliance.
|
||||
|
||||
5. USER NOTIFICATION:
|
||||
|
||||
a. If we are required by law to retain or disclose user identifiers, we will
|
||||
attempt to provide the users with notice (unless we are prohibited or it
|
||||
would be futile) that a request for their information has been made in
|
||||
order to give the users an opportunity to object to the retention or
|
||||
disclosure.
|
||||
|
||||
b. We will attempt to provide this notice by email, if the users have given
|
||||
us an email address, and by postal mail if the users have provided a
|
||||
postal address.
|
||||
|
||||
c. If the users do not challenge the disclosure request, we may be legally
|
||||
required to turn over their information.
|
||||
|
||||
d. We may delay notice if we, in good faith, believe that an emergency
|
||||
involving danger of death or serious physical injury to any person
|
||||
requires disclosure without delay of information relating to the
|
||||
emergency.
|
||||
|
||||
EXCEPTIONS
|
||||
|
||||
Data from DNT Users collected by this domain may be logged or retained only in
|
||||
the following specific situations:
|
||||
|
||||
1. CONSENT / "OPT BACK IN"
|
||||
|
||||
a. DNT Users are opting out from tracking across the Web. It is possible
|
||||
that for some feature or functionality, we will need to ask a DNT User to
|
||||
"opt back in" to be tracked by us across the entire Web.
|
||||
|
||||
b. If we do that, we will take reasonable steps to verify that the users who
|
||||
select this option have genuinely intended to opt back in to tracking.
|
||||
One way to do this is by performing scientifically reasonable user
|
||||
studies with a representative sample of our users, but smaller
|
||||
organizations can satisfy this requirement by other means.
|
||||
|
||||
c. Where we believe that we have opt back in consent, our server will
|
||||
send a tracking value status header "Tk: C" as described in section 6.2
|
||||
of the W3C Tracking Preference Expression draft:
|
||||
|
||||
http://www.w3.org/TR/tracking-dnt/#tracking-status-value
|
||||
|
||||
2. TRANSACTIONS
|
||||
|
||||
If a DNT User actively and knowingly enters a transaction with our
|
||||
services (for instance, clicking on a clearly-labeled advertisement,
|
||||
posting content to a widget, or purchasing an item), we will retain
|
||||
necessary data for as long as required to perform the transaction. This
|
||||
may for example include keeping auditing information for clicks on
|
||||
advertising links; keeping a copy of posted content and the name of the
|
||||
posting user; keeping server-side session IDs to recognize logged in
|
||||
users; or keeping a copy of the physical address to which a purchased
|
||||
item will be shipped. By their nature, some transactions will require data
|
||||
to be retained indefinitely.
|
||||
|
||||
3. TECHNICAL AND SECURITY LOGGING:
|
||||
|
||||
a. If, during the processing of the initial request (for unique identifiers)
|
||||
or during the subsequent 10 days (for IP addresses and User Agent strings),
|
||||
we obtain specific information that causes our employees or systems to
|
||||
believe that a request is, or is likely to be, part of a security attack,
|
||||
spam submission, or fraudulent transaction, then logs of those requests
|
||||
are not subject to this policy.
|
||||
|
||||
b. If we encounter technical problems with our site, then, in rare
|
||||
circumstances, we may retain logs for longer than 10 days, if that is
|
||||
necessary to diagnose and fix those problems, but this practice will not be
|
||||
routinized and we will strive to delete such logs as soon as possible.
|
||||
|
||||
4. AGGREGATION:
|
||||
|
||||
a. We may retain and share anonymized datasets, such as aggregate records of
|
||||
readership patterns; statistical models of user behavior; graphs of system
|
||||
variables; data structures to count active users on monthly or yearly
|
||||
bases; database tables mapping authentication cookies to logged in
|
||||
accounts; non-unique data structures constructed within browsers for tasks
|
||||
such as ad frequency capping or conversion tracking; or logs with truncated
|
||||
and/or encrypted IP addresses and simplified User Agent strings.
|
||||
|
||||
b. "Anonymized" means we have conducted risk mitigation to ensure
|
||||
that the dataset, plus any additional information that is in our
|
||||
possession or likely to be available to us, does not allow the
|
||||
reconstruction of reading habits, online or offline activity of groups of
|
||||
fewer than 5000 individuals or devices.
|
||||
|
||||
c. If we generate anonymized datasets under this exception we will publicly
|
||||
document our anonymization methods in sufficient detail to allow outside
|
||||
experts to evaluate the effectiveness of those methods.
|
||||
|
||||
5. ERRORS:
|
||||
|
||||
From time to time, there may be errors by which user data is temporarily
|
||||
logged or retained in violation of this policy. If such errors are
|
||||
inadvertent, rare, and made in good faith, they do not constitute a breach
|
||||
of this policy. We will delete such data as soon as practicable after we
|
||||
become aware of any error and take steps to ensure that it is deleted by any
|
||||
third-party who may have had access to the data.
|
||||
|
||||
ADDITIONAL DEFINITIONS
|
||||
|
||||
"Fully Qualified Domain Name" means a domain name that addresses a computer
|
||||
connected to the Internet. For instance, example1.com; www.example1.com;
|
||||
ads.example1.com; and widgets.example2.com are all distinct FQDNs.
|
||||
|
||||
"Supercookie" means any technology other than an HTTP Cookie which can be used
|
||||
by a server to associate identifiers with the clients that visit it. Examples
|
||||
of supercookies include Flash LSO cookies, DOM storage, HTML5 storage, or
|
||||
tricks to store information in caches or etags.
|
||||
|
||||
"Risk mitigation" means an engineering process that evaluates the possibility
|
||||
and likelihood of various adverse outcomes, considers the available methods of
|
||||
making those adverse outcomes less likely, and deploys sufficient mitigations
|
||||
to bring the probability and harm from adverse outcomes below an acceptable
|
||||
threshold.
|
||||
|
||||
"Reading habits" includes amongst other things lists of visited DNS names, if
|
||||
those domains pertain to specific topics or activities, but records of visited
|
||||
DNS names are not reading habits if those domain names serve content of a very
|
||||
diverse and general nature, thereby revealing minimal information about the
|
||||
opinions, interests or activities of the user.
|
BIN
assets/android-chrome-192x192.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
assets/android-chrome-512x512.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
assets/apple-touch-icon.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
9
assets/browserconfig.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square150x150logo src="/mstile-150x150.png"/>
|
||||
<TileColor>#2b5797</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
</browserconfig>
|
@ -17,6 +17,57 @@ div {
|
||||
animation: spin 2s linear infinite;
|
||||
}
|
||||
|
||||
.playlist-restricted {
|
||||
height: 20em;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
a.pure-button-primary {
|
||||
background-color: #a0a0a0;
|
||||
color: rgba(35, 35, 35, 1);
|
||||
}
|
||||
|
||||
a.pure-button-primary:hover {
|
||||
background-color: rgba(0, 182, 240, 1);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
div.thumbnail {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
img.thumbnail {
|
||||
width: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.length {
|
||||
z-index: 100;
|
||||
position: absolute;
|
||||
background-color: rgba(35, 35, 35, 0.75);
|
||||
color: #fff;
|
||||
border-radius: 2px;
|
||||
padding: 2px;
|
||||
font-size: 16px;
|
||||
font-family: sans-serif;
|
||||
right: 0.5em;
|
||||
bottom: -0.5em;
|
||||
}
|
||||
|
||||
.watched {
|
||||
z-index: 100;
|
||||
position: absolute;
|
||||
background-color: rgba(35, 35, 35, 0.75);
|
||||
color: #fff;
|
||||
border-radius: 2px;
|
||||
padding: 4px 8px 4px 8px;
|
||||
font-size: 16px;
|
||||
font-family: sans-serif;
|
||||
left: 0.2em;
|
||||
top: -0.7em;
|
||||
}
|
||||
|
||||
/*
|
||||
* Navbar
|
||||
*/
|
||||
|
BIN
assets/favicon-16x16.png
Normal file
After Width: | Height: | Size: 589 B |
BIN
assets/favicon-32x32.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
assets/favicon.ico
Normal file
After Width: | Height: | Size: 15 KiB |
1979
assets/js/silvermine-videojs-quality-selector.js
Normal file
6
assets/js/videojs-dash.min.js
vendored
413
assets/js/videojs.hotkeys.js
Normal file
@ -0,0 +1,413 @@
|
||||
/*
|
||||
* 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);
|
||||
}));
|
52
assets/js/watch.js
Normal file
@ -0,0 +1,52 @@
|
||||
function toggle_parent(target) {
|
||||
body = target.parentNode.parentNode.children[1];
|
||||
if (body.style.display === null || body.style.display === "") {
|
||||
target.innerHTML = "[ + ]";
|
||||
body.style.display = "none";
|
||||
} else {
|
||||
target.innerHTML = "[ - ]";
|
||||
body.style.display = "";
|
||||
}
|
||||
}
|
||||
|
||||
function toggle_comments(target) {
|
||||
body = target.parentNode.parentNode.parentNode.children[1];
|
||||
if (body.style.display === null || body.style.display === "") {
|
||||
target.innerHTML = "[ + ]";
|
||||
body.style.display = "none";
|
||||
} else {
|
||||
target.innerHTML = "[ - ]";
|
||||
body.style.display = "";
|
||||
}
|
||||
}
|
||||
|
||||
function swap_comments(source) {
|
||||
if (source == "youtube") {
|
||||
get_youtube_comments();
|
||||
} else if (source == "reddit") {
|
||||
get_reddit_comments();
|
||||
}
|
||||
}
|
||||
|
||||
String.prototype.supplant = function(o) {
|
||||
return this.replace(/{([^{}]*)}/g, function(a, b) {
|
||||
var r = o[b];
|
||||
return typeof r === "string" || typeof r === "number" ? r : a;
|
||||
});
|
||||
};
|
||||
|
||||
function show_youtube_replies(target) {
|
||||
body = target.parentNode.parentNode.children[1];
|
||||
body.style.display = "";
|
||||
|
||||
target.innerHTML = "Hide replies";
|
||||
target.setAttribute("onclick", "hide_youtube_replies(this)");
|
||||
}
|
||||
|
||||
function hide_youtube_replies(target) {
|
||||
body = target.parentNode.parentNode.children[1];
|
||||
body.style.display = "none";
|
||||
|
||||
target.innerHTML = "Show replies";
|
||||
target.setAttribute("onclick", "show_youtube_replies(this)");
|
||||
}
|
BIN
assets/mstile-150x150.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
35
assets/safari-pinned-tab.svg
Normal file
@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
||||
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
||||
width="607.000000pt" height="607.000000pt" viewBox="0 0 607.000000 607.000000"
|
||||
preserveAspectRatio="xMidYMid meet">
|
||||
<metadata>
|
||||
Created by potrace 1.11, written by Peter Selinger 2001-2013
|
||||
</metadata>
|
||||
<g transform="translate(0.000000,607.000000) scale(0.100000,-0.100000)"
|
||||
fill="#000000" stroke="none">
|
||||
<path d="M2770 5949 c-775 -68 -1523 -436 -2020 -994 -491 -551 -743 -1200
|
||||
-743 -1915 -1 -466 100 -884 312 -1296 146 -284 307 -502 540 -734 172 -171
|
||||
264 -247 461 -378 415 -277 905 -452 1404 -501 161 -16 508 -14 666 4 914 105
|
||||
1715 590 2213 1342 306 462 467 995 467 1553 0 268 -22 448 -85 699 -94 378
|
||||
-293 778 -541 1091 -156 196 -449 465 -665 611 -405 272 -894 453 -1379 509
|
||||
-130 15 -502 21 -630 9z m475 -139 c527 -39 1012 -203 1435 -485 176 -117 274
|
||||
-198 436 -360 315 -313 518 -633 664 -1045 52 -148 112 -399 131 -555 19 -150
|
||||
17 -533 -4 -684 -102 -730 -489 -1382 -1092 -1836 -332 -250 -716 -425 -1135
|
||||
-519 -348 -77 -784 -87 -1150 -25 -1214 205 -2177 1157 -2350 2324 -56 377
|
||||
-30 801 70 1148 151 520 427 950 850 1326 566 502 1368 768 2145 711z"/>
|
||||
<path d="M2787 4669 c-124 -65 -123 -255 3 -319 86 -44 196 -16 247 62 58 87
|
||||
26 211 -67 258 -51 26 -132 26 -183 -1z"/>
|
||||
<path d="M2882 4108 c-12 -16 -63 -166 -102 -303 -30 -104 -101 -350 -165
|
||||
-565 -20 -69 -58 -199 -85 -290 -26 -91 -64 -221 -85 -290 -20 -69 -58 -199
|
||||
-85 -290 -26 -91 -64 -221 -85 -290 -20 -69 -57 -195 -81 -280 -59 -207 -93
|
||||
-299 -115 -310 -10 -6 -35 -10 -56 -10 -73 0 -84 -8 -81 -54 l3 -41 228 -3
|
||||
228 -2 -3 47 -3 48 -73 3 c-66 3 -74 5 -84 27 -13 28 0 104 37 225 13 41 47
|
||||
156 75 255 28 99 66 230 85 290 18 61 56 191 85 290 28 99 66 230 85 290 18
|
||||
61 56 191 85 290 85 297 123 419 131 429 5 5 17 -11 28 -35 10 -24 192 -393
|
||||
403 -819 211 -426 447 -902 523 -1058 l139 -282 168 0 c92 0 168 4 168 8 0 4
|
||||
-75 158 -166 342 -588 1183 -969 1958 -1033 2100 -29 63 -69 151 -89 195 -44
|
||||
95 -58 110 -80 83z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.0 KiB |
19
assets/site.webmanifest
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "Invidious",
|
||||
"short_name": "Invidious",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/android-chrome-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"theme_color": "#575757",
|
||||
"background_color": "#575757",
|
||||
"display": "standalone"
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
crawl_threads: 1
|
||||
video_threads: 0
|
||||
crawl_threads: 0
|
||||
channel_threads: 1
|
||||
video_threads: 1
|
||||
feed_threads: 1
|
||||
db:
|
||||
user: kemal
|
||||
password: kemal
|
||||
@ -8,4 +9,4 @@ db:
|
||||
port: 5432
|
||||
dbname: invidious
|
||||
full_refresh: false
|
||||
https_only: false
|
||||
https_only: false
|
||||
|
@ -4,35 +4,33 @@
|
||||
|
||||
CREATE TABLE public.channel_videos
|
||||
(
|
||||
id text COLLATE pg_catalog."default" NOT NULL,
|
||||
title text COLLATE pg_catalog."default",
|
||||
published timestamp with time zone,
|
||||
updated timestamp with time zone,
|
||||
ucid text COLLATE pg_catalog."default",
|
||||
author text COLLATE pg_catalog."default",
|
||||
CONSTRAINT channel_videos_id_key UNIQUE (id)
|
||||
)
|
||||
WITH (
|
||||
OIDS = FALSE
|
||||
)
|
||||
TABLESPACE pg_default;
|
||||
id text NOT NULL,
|
||||
title text,
|
||||
published timestamp with time zone,
|
||||
updated timestamp with time zone,
|
||||
ucid text,
|
||||
author text,
|
||||
length_seconds integer,
|
||||
CONSTRAINT channel_videos_id_key UNIQUE (id)
|
||||
);
|
||||
|
||||
GRANT ALL ON TABLE public.channel_videos TO kemal;
|
||||
|
||||
-- Index: channel_videos_published_idx
|
||||
-- Index: public.channel_videos_published_idx
|
||||
|
||||
-- DROP INDEX public.channel_videos_published_idx;
|
||||
|
||||
CREATE INDEX channel_videos_published_idx
|
||||
ON public.channel_videos USING btree
|
||||
(published)
|
||||
TABLESPACE pg_default;
|
||||
ON public.channel_videos
|
||||
USING btree
|
||||
(published);
|
||||
|
||||
-- Index: channel_videos_ucid_idx
|
||||
-- Index: public.channel_videos_ucid_idx
|
||||
|
||||
-- DROP INDEX public.channel_videos_ucid_idx;
|
||||
|
||||
CREATE INDEX channel_videos_ucid_idx
|
||||
ON public.channel_videos USING hash
|
||||
(ucid COLLATE pg_catalog."default")
|
||||
TABLESPACE pg_default;
|
||||
ON public.channel_videos
|
||||
USING hash
|
||||
(ucid COLLATE pg_catalog."default");
|
||||
|
||||
|
@ -4,23 +4,20 @@
|
||||
|
||||
CREATE TABLE public.channels
|
||||
(
|
||||
id text COLLATE pg_catalog."default" NOT NULL,
|
||||
author text COLLATE pg_catalog."default",
|
||||
updated timestamp with time zone,
|
||||
CONSTRAINT channels_id_key UNIQUE (id)
|
||||
)
|
||||
WITH (
|
||||
OIDS = FALSE
|
||||
)
|
||||
TABLESPACE pg_default;
|
||||
id text NOT NULL,
|
||||
author text,
|
||||
updated timestamp with time zone,
|
||||
CONSTRAINT channels_id_key UNIQUE (id)
|
||||
);
|
||||
|
||||
GRANT ALL ON TABLE public.channels TO kemal;
|
||||
|
||||
-- Index: channels_id_idx
|
||||
-- Index: public.channels_id_idx
|
||||
|
||||
-- DROP INDEX public.channels_id_idx;
|
||||
|
||||
CREATE INDEX channels_id_idx
|
||||
ON public.channels USING btree
|
||||
(id COLLATE pg_catalog."default")
|
||||
TABLESPACE pg_default;
|
||||
ON public.channels
|
||||
USING btree
|
||||
(id COLLATE pg_catalog."default");
|
||||
|
||||
|
14
config/sql/nonces.sql
Normal file
@ -0,0 +1,14 @@
|
||||
-- Table: public.nonces
|
||||
|
||||
-- DROP TABLE public.nonces;
|
||||
|
||||
CREATE TABLE public.nonces
|
||||
(
|
||||
nonce text,
|
||||
expire timestamp with time zone
|
||||
)
|
||||
WITH (
|
||||
OIDS=FALSE
|
||||
);
|
||||
|
||||
GRANT ALL ON TABLE public.nonces TO kemal;
|
@ -2,22 +2,28 @@
|
||||
|
||||
-- DROP TABLE public.users;
|
||||
|
||||
CREATE TABLE public.users
|
||||
CREATE TABLE public.users
|
||||
(
|
||||
id text[] COLLATE pg_catalog."default" NOT NULL,
|
||||
updated timestamp with time zone,
|
||||
notifications text[] COLLATE pg_catalog."default",
|
||||
subscriptions text[] COLLATE pg_catalog."default",
|
||||
email text COLLATE pg_catalog."default" NOT NULL,
|
||||
preferences text COLLATE pg_catalog."default",
|
||||
password text COLLATE pg_catalog."default",
|
||||
token text COLLATE pg_catalog."default",
|
||||
watched text[] COLLATE pg_catalog."default",
|
||||
CONSTRAINT users_email_key UNIQUE (email)
|
||||
)
|
||||
WITH (
|
||||
OIDS = FALSE
|
||||
)
|
||||
TABLESPACE pg_default;
|
||||
id text[] NOT NULL,
|
||||
updated timestamp with time zone,
|
||||
notifications text[],
|
||||
subscriptions text[],
|
||||
email text NOT NULL,
|
||||
preferences text,
|
||||
password text,
|
||||
token text,
|
||||
watched text[],
|
||||
CONSTRAINT users_email_key UNIQUE (email)
|
||||
);
|
||||
|
||||
GRANT ALL ON TABLE public.users TO kemal;
|
||||
|
||||
-- Index: public.email_unique_idx
|
||||
|
||||
-- DROP INDEX public.email_unique_idx;
|
||||
|
||||
CREATE UNIQUE INDEX email_unique_idx
|
||||
ON public.users
|
||||
USING btree
|
||||
(lower(email) COLLATE pg_catalog."default");
|
||||
|
||||
|
@ -4,38 +4,37 @@
|
||||
|
||||
CREATE TABLE public.videos
|
||||
(
|
||||
id text COLLATE pg_catalog."default" NOT NULL,
|
||||
info text COLLATE pg_catalog."default",
|
||||
updated timestamp with time zone,
|
||||
title text COLLATE pg_catalog."default",
|
||||
views bigint,
|
||||
likes integer,
|
||||
dislikes integer,
|
||||
wilson_score double precision,
|
||||
published timestamp with time zone,
|
||||
description text COLLATE pg_catalog."default",
|
||||
language text COLLATE pg_catalog."default",
|
||||
author text COLLATE pg_catalog."default",
|
||||
ucid text COLLATE pg_catalog."default",
|
||||
allowed_regions text[] COLLATE pg_catalog."default",
|
||||
is_family_friendly boolean,
|
||||
genre text COLLATE pg_catalog."default",
|
||||
genre_url text COLLATE pg_catalog."default",
|
||||
license text COLLATE pg_catalog."default",
|
||||
CONSTRAINT videos_pkey PRIMARY KEY (id)
|
||||
)
|
||||
WITH (
|
||||
OIDS = FALSE
|
||||
)
|
||||
TABLESPACE pg_default;
|
||||
id text NOT NULL,
|
||||
info text,
|
||||
updated timestamp with time zone,
|
||||
title text,
|
||||
views bigint,
|
||||
likes integer,
|
||||
dislikes integer,
|
||||
wilson_score double precision,
|
||||
published timestamp with time zone,
|
||||
description text,
|
||||
language text,
|
||||
author text,
|
||||
ucid text,
|
||||
allowed_regions text[],
|
||||
is_family_friendly boolean,
|
||||
genre text,
|
||||
genre_url text,
|
||||
license text,
|
||||
sub_count_text text,
|
||||
author_thumbnail text,
|
||||
CONSTRAINT videos_pkey PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
GRANT ALL ON TABLE public.videos TO kemal;
|
||||
|
||||
-- Index: id_idx
|
||||
-- Index: public.id_idx
|
||||
|
||||
-- DROP INDEX public.id_idx;
|
||||
|
||||
CREATE UNIQUE INDEX id_idx
|
||||
ON public.videos USING btree
|
||||
(id COLLATE pg_catalog."default")
|
||||
TABLESPACE pg_default;
|
||||
ON public.videos
|
||||
USING btree
|
||||
(id COLLATE pg_catalog."default");
|
||||
|
||||
|
273
locales/ar.json
Normal file
@ -0,0 +1,273 @@
|
||||
{
|
||||
"`x` subscribers": "`x` المشتركين",
|
||||
"`x` videos": "`x` الفيديوهات",
|
||||
"LIVE": "مباشر",
|
||||
"Shared `x` ago": "تم رفع الفيديو منذ `x`",
|
||||
"Unsubscribe": "إلغاء الإشتراك",
|
||||
"Subscribe": "إشتراك",
|
||||
"Login to subscribe to `x`": "سجل الدخول للإشتراك فى `x`",
|
||||
"View channel on YouTube": "زيارة القناة على موقع يوتيوب",
|
||||
"newest": "الأجدد",
|
||||
"oldest": "الأقدم",
|
||||
"popular": "الاكثر شعبية",
|
||||
"Preview page": "معاينة الصفحة",
|
||||
"Next page": "الصفحة الثانية",
|
||||
"Clear watch history?": "مسح السجل ؟",
|
||||
"Yes": "نعم",
|
||||
"No": "لا",
|
||||
"Import and Export Data": "استخراج و إضافة البيانات",
|
||||
"Import": "إضافة",
|
||||
"Import Invidious data": "إضافة بيانات Invidious",
|
||||
"Import YouTube subscriptions": "إضافةالإشتراكات من موقع يوتيوب",
|
||||
"Import FreeTube subscriptions (.db)": "إضافةالمشتركين من FreeTube (.db)",
|
||||
"Import NewPipe subscriptions (.json)": "إضافة المشتركين من NewPipe (.json)",
|
||||
"Import NewPipe data (.zip)": "إضافة بيانات NewPipe (.zip)",
|
||||
"Export": "استخراج",
|
||||
"Export subscriptions as OPML": "استخراج المشتركين كـ OPML",
|
||||
"Export subscriptions as OPML (for NewPipe & FreeTube)": "استخراج المشتركين كـ OPML (لـ NewPipe و FreeTube)",
|
||||
"Export data as JSON": "استخراج البيانات كـ JSON",
|
||||
"Delete account?": "حذف الحساب ؟",
|
||||
"History": "السجل",
|
||||
"Previous page": "الصفحة السابقة",
|
||||
"An alternative front-end to YouTube": "البديل الكامل لموقع يوتيوب",
|
||||
"JavaScript license information": "معلومات ترخيص JavaScript",
|
||||
"source": "المصدر",
|
||||
"Login": "تسجيل الدخول",
|
||||
"Login/Register": "تسجيل الدخول\\إنشاء حساب",
|
||||
"Login to Google": "تسجيل الدخول بإستخدام جوجل",
|
||||
"User ID:": "إسم المستخدم:",
|
||||
"Password:": "الرقم السرى:",
|
||||
"Time (h:mm:ss):": "(يجب ان يكتب مثل هذا التنسيق) الوقت (h(ساعات):mm(دقائق):ss(ثوانى)):",
|
||||
"Text CAPTCHA": "CAPTCHA كلامية",
|
||||
"Image CAPTCHA": "CAPTCHA صورية",
|
||||
"Sign In": "تسجيل الدخول",
|
||||
"Register": "انشاء الحساب",
|
||||
"Email:": "الإيميل:",
|
||||
"Google verification code:": "رمز تحقق جوجل:",
|
||||
"Preferences": "التفضيلات",
|
||||
"Player preferences": "التفضيلات المشغل",
|
||||
"Always loop: ": "كرر الفيديو دائما: ",
|
||||
"Autoplay: ": "تشغيل تلقائى: ",
|
||||
"Autoplay next video: ": "شغل الفيديو التالى تلقائى: ",
|
||||
"Listen by default: ": "تشغيل النسخة السمعية تلقائى: ",
|
||||
"Default speed: ": "السرعة الإفتراضية: ",
|
||||
"Preferred video quality: ": "الجودة المفضلة للفيديوهات: ",
|
||||
"Player volume: ": "صوت المشغل: ",
|
||||
"Default comments: ": "إضهار التعليقات الإفتراضية لـ: ",
|
||||
"youtube": "يوتيوب",
|
||||
"reddit": "Reddit",
|
||||
"Default captions: ": "الترجمات الإفتراضية: ",
|
||||
"Fallback captions: ": "الترجمات المصاحبة: ",
|
||||
"Show related videos? ": "عرض مقاطع الفيديو ذات الصلة؟",
|
||||
"Visual preferences": "التفضيلات المرئية",
|
||||
"Dark mode: ": "الوضع الليلى: ",
|
||||
"Thin mode: ": "الوضع الخفيف: ",
|
||||
"Subscription preferences": "تفضيلات الإشتراك",
|
||||
"Redirect homepage to feed: ": "إعادة التوجية من الصفحة الرئيسية لصفحة المشتركين (لرؤية اخر فيديوهات المشتركين): ",
|
||||
"Number of videos shown in feed: ": "عدد الفيديوهات التى ستظهر فى صفحة المشتركين: ",
|
||||
"Sort videos by: ": "ترتيب الفيديو بـ: ",
|
||||
"published": "احدث فيديو",
|
||||
"published - reverse": "احدث فيديو - عكسى",
|
||||
"alphabetically": "ترتيب ابجدى",
|
||||
"alphabetically - reverse": "ابجدى - عكسى",
|
||||
"channel name": "بإسم القناة",
|
||||
"channel name - reverse": "بإسم القناة - عكسى",
|
||||
"Only show latest video from channel: ": "فقط إظهر اخر فيديو من القناة: ",
|
||||
"Only show latest unwatched video from channel: ": "فقط اظهر اخر فيديو لم يتم رؤيتة من القناة: ",
|
||||
"Only show unwatched: ": "فقط اظهر الذى لم يتم رؤيتة: ",
|
||||
"Only show notifications (if there are any): ": "إظهار الإشعارات فقط (إذا كان هناك أي): ",
|
||||
"Data preferences": "إعدادات التفضيلات",
|
||||
"Clear watch history": "حذف سجل المشاهدة",
|
||||
"Import/Export data": "إضافة\\إستخراج البيانات",
|
||||
"Manage subscriptions": "إدارة المشتركين",
|
||||
"Watch history": "سجل المشاهدة",
|
||||
"Delete account": "حذف الحساب",
|
||||
"Save preferences": "حفظ التفضيلات",
|
||||
"Subscription manager": "مدير الإشتراكات",
|
||||
"`x` subscriptions": "`x` مشتركين",
|
||||
"Import/Export": "إضافة\\إستخراج",
|
||||
"unsubscribe": "إلغاء الإشتراك",
|
||||
"Subscriptions": "الإشتراكات",
|
||||
"`x` unseen notifications": "`x` إشعارات لم تشاهدها بعد ",
|
||||
"search": "بحث",
|
||||
"Sign out": "تسجيل الخروج",
|
||||
"Released under the AGPLv3 by Omar Roth.": "تم الإنشاء تحت AGPLv3 بواسطة عمر روث.",
|
||||
"Source available here.": "الأكواد متوفرة هنا.",
|
||||
"Liberapay: ": "ليبرباى: ",
|
||||
"Patreon: ": "باتريون: ",
|
||||
"BTC: ": "بيتكوين: ",
|
||||
"BCH: ": "بيتكوين كاش: ",
|
||||
"View JavaScript license information.": "مشاهدة معلومات حول تراخيص الجافاسكريبت.",
|
||||
"Trending": "الشائع",
|
||||
"Watch video on Youtube": "مشاهدة الفيديو على اليوتيوب",
|
||||
"Genre: ": "النوع: ",
|
||||
"License: ": "التراخيص: ",
|
||||
"Family friendly? ": "محتوى عائلى? ",
|
||||
"Wilson score: ": "درجة ويلسون: ",
|
||||
"Engagement: ": "نسبة المشاركة (عدد المشاهدات\\عدد الإعجابات): ",
|
||||
"Whitelisted regions: ": "الدول المسموح فيها هذا الفيديو: ",
|
||||
"Blacklisted regions: ": "الدول الحظور فيها هذا الفيديو: ",
|
||||
"Shared `x`": "شارك منذ `x`",
|
||||
"Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.": "اهلا! يبدو ان الجافاسكريبت معطلة. اضغط هنا لعرض التعليقات, ضع فى إعتبارك انها ستأخذ وقت اطول للعرض.",
|
||||
"View YouTube comments": "عرض تعليقات اليوتيوب",
|
||||
"View more comments on Reddit": "عرض المزيد من التعليقات على\\من موقع Reddit",
|
||||
"View `x` comments": "عرض `x` تعليقات",
|
||||
"View Reddit comments": "عرض تعليقات ريدإت Reddit",
|
||||
"Hide replies": "إخفاء الردود",
|
||||
"Show replies": "عرض الردود",
|
||||
"Incorrect password": "الرقم السرى غير صحيح",
|
||||
"Quota exceeded, try again in a few hours": "تم تجاوز عدد المرات المسموح بها, حاول مرة اخرى بعد عدة ساعات",
|
||||
"Unable to login, make sure two-factor authentication (Authenticator or SMS) is enabled.": "غير قادر على تسجيل الدخول, تأكد من تشغيل المصادقة الثنائية 2FA.",
|
||||
"Invalid TFA code": "كود مصادقة ثنائية 2FA غير صحيح",
|
||||
"Login failed. This may be because two-factor authentication is not enabled on your account.": "لم يتم تسجيل الدخول. هذا ربما بسبب ان المصادقة الثنائية 2FA معطلة فى حسابك.",
|
||||
"Invalid answer": "إجابة خاطئة",
|
||||
"Invalid CAPTCHA": "الكابتشا CAPTCHA غير صاحلة",
|
||||
"CAPTCHA is a required field": "مكان الكابتشا CAPTCHA مطلوب",
|
||||
"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": "الرقم السرى لا يتعدى 55 حرف",
|
||||
"Please sign in": "الرجاء تسجيل الدخول",
|
||||
"Invidious Private Feed for `x`": "صفحة Invidious للمشتركين الخاصة\\مخفية لـ `x`",
|
||||
"channel:`x`": "قناة:`x`",
|
||||
"Deleted or invalid channel": "قناة ممسوحة او غير صالحة",
|
||||
"This channel does not exist.": "القناة غير موجودة.",
|
||||
"Could not get channel info.": "لم يستطع الحصول على معلومات القناة.",
|
||||
"Could not fetch comments": "لم يتمكن من إحضار التعليقات",
|
||||
"View `x` replies": "عرض `x` ردود",
|
||||
"`x` ago": "`x` منذ",
|
||||
"Load more": "عرض المزيد",
|
||||
"`x` points": "`x` نقاط",
|
||||
"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` سنوات",
|
||||
"`x` months": "`x` شهور",
|
||||
"`x` weeks": "`x` اسابيع",
|
||||
"`x` days": "`x` ايام",
|
||||
"`x` hours": "`x` ساعات",
|
||||
"`x` minutes": "`x` دقائق",
|
||||
"`x` seconds": "`x` ثوانى",
|
||||
"Fallback comments: ": "التعليقات المصاحبة",
|
||||
"Popular": "الشائع",
|
||||
"Top": "الأفضل",
|
||||
"About": "حول",
|
||||
"Rating: ": "التقييم",
|
||||
"Language: ": "اللغة"
|
||||
}
|
273
locales/de.json
Normal file
@ -0,0 +1,273 @@
|
||||
{
|
||||
"`x` subscribers": "`x` Abonnenten",
|
||||
"`x` videos": "`x` Videos",
|
||||
"LIVE": "LIVE",
|
||||
"Shared `x` ago": "Vor `x` geteilt",
|
||||
"Unsubscribe": "Abbestellen",
|
||||
"Subscribe": "Abonnieren",
|
||||
"Login to subscribe to `x`": "Einloggen um `x` zu abonnieren",
|
||||
"View channel on YouTube": "Kanal auf YouTube anzeigen",
|
||||
"newest": "neueste",
|
||||
"oldest": "älteste",
|
||||
"popular": "beliebt",
|
||||
"Preview page": "Vorschau Seite",
|
||||
"Next page": "Nächste Seite",
|
||||
"Clear watch history?": "Verlauf löschen?",
|
||||
"Yes": "Ja",
|
||||
"No": "Nein",
|
||||
"Import and Export Data": "Import und Export Daten",
|
||||
"Import": "Importieren",
|
||||
"Import Invidious data": "Invidious Daten importieren",
|
||||
"Import YouTube subscriptions": "YouTube Abonnements importieren",
|
||||
"Import FreeTube subscriptions (.db)": "FreeTube Abonnements importieren (.db)",
|
||||
"Import NewPipe subscriptions (.json)": "NewPipe Abonnements importieren (.json)",
|
||||
"Import NewPipe data (.zip)": "NewPipe Daten importieren (.zip)",
|
||||
"Export": "Exportieren",
|
||||
"Export subscriptions as OPML": "Abonnements als OPML exportieren",
|
||||
"Export subscriptions as OPML (for NewPipe & FreeTube)": "Abonnements als OPML exportieren (für NewPipe & FreeTube)",
|
||||
"Export data as JSON": "Daten als JSON exportieren",
|
||||
"Delete account?": "Account löschen?",
|
||||
"History": "Verlauf",
|
||||
"Previous page": "Vorherige Seite",
|
||||
"An alternative front-end to YouTube": "Eine alternative Oberfläche für YouTube",
|
||||
"JavaScript license information": "JavaScript Lizenzinformationen",
|
||||
"source": "Quelle",
|
||||
"Login": "Einloggen",
|
||||
"Login/Register": "Einloggen/Registrieren",
|
||||
"Login to Google": "In Google einloggen",
|
||||
"User ID:": "Benutzer ID:",
|
||||
"Password:": "Passwort:",
|
||||
"Time (h:mm:ss):": "Zeit (h:mm:ss):",
|
||||
"Text CAPTCHA": "Text CAPTCHA",
|
||||
"Image CAPTCHA": "Image CAPTCHA",
|
||||
"Sign In": "Einloggen",
|
||||
"Register": "Registrieren",
|
||||
"Email:": "Email:",
|
||||
"Google verification code:": "Google Bestätigungscode:",
|
||||
"Preferences": "Einstellungen",
|
||||
"Player preferences": "Playereinstellungen",
|
||||
"Always loop: ": "Immer wiederholen: ",
|
||||
"Autoplay: ": "Automatisch abspielen: ",
|
||||
"Autoplay next video: ": "nächstes Video automatisch abspielen: ",
|
||||
"Listen by default: ": "Nur Ton als Standard: ",
|
||||
"Default speed: ": "Standardgeschwindigkeit: ",
|
||||
"Preferred video quality: ": "Bevorzugte Videoqualität: ",
|
||||
"Player volume: ": "Playerlautstärke: ",
|
||||
"Default comments: ": "Standardkommentare: ",
|
||||
"youtube": "youtube",
|
||||
"reddit": "reddit",
|
||||
"Default captions: ": "Standarduntertitel: ",
|
||||
"Fallback captions: ": "Ersatzuntertitel: ",
|
||||
"Show related videos? ": "Ähnliche Videos anzeigen? ",
|
||||
"Visual preferences": "Anzeigeeinstellungen",
|
||||
"Dark mode: ": "Nachtmodus: ",
|
||||
"Thin mode: ": "Schlanker Modus: ",
|
||||
"Subscription preferences": "Abonnementeinstellungen",
|
||||
"Redirect homepage to feed: ": "Startseite zu Feed umleiten: ",
|
||||
"Number of videos shown in feed: ": "Anzahl von Videos die im Feed angezeigt werden: ",
|
||||
"Sort videos by: ": "Videos sortieren nach: ",
|
||||
"published": "veröffentlicht",
|
||||
"published - reverse": "veröffentlicht - invertiert",
|
||||
"alphabetically": "alphabetisch",
|
||||
"alphabetically - reverse": "alphabetisch - invertiert",
|
||||
"channel name": "Kanalname",
|
||||
"channel name - reverse": "Kanalname - invertiert",
|
||||
"Only show latest video from channel: ": "Nur neueste Videos des Kanals anzeigen: ",
|
||||
"Only show latest unwatched video from channel: ": "Nur neueste ungesehene Videos des Kanals anzeigen: ",
|
||||
"Only show unwatched: ": "Nur ungesehene anzeigen: ",
|
||||
"Only show notifications (if there are any): ": "Nur Benachrichtigungen anzeigen (wenn es welche gibt): ",
|
||||
"Data preferences": "Dateneinstellungen",
|
||||
"Clear watch history": "Verlauf löschen",
|
||||
"Import/Export data": "Daten im- exportieren",
|
||||
"Manage subscriptions": "Abonnements verwalten",
|
||||
"Watch history": "Verlauf",
|
||||
"Delete account": "Account löschen",
|
||||
"Save preferences": "Einstellungen speichern",
|
||||
"Subscription manager": "Abonnementverwaltung",
|
||||
"`x` subscriptions": "`x` Abonnements",
|
||||
"Import/Export": "Importieren/Exportieren",
|
||||
"unsubscribe": "abbestellen",
|
||||
"Subscriptions": "Abonnements",
|
||||
"`x` unseen notifications": "`x` ungesehene Benachrichtigungen",
|
||||
"search": "Suchen",
|
||||
"Sign out": "Abmelden",
|
||||
"Released under the AGPLv3 by Omar Roth.": "Veröffentlicht unter AGPLv3 von Omar Roth.",
|
||||
"Source available here.": "Quellcode verfügbar hier.",
|
||||
"Liberapay: ": "Liberapay: ",
|
||||
"Patreon: ": "Patreon: ",
|
||||
"BTC: ": "BTC: ",
|
||||
"BCH: ": "BCH: ",
|
||||
"View JavaScript license information.": "Javascript Lizenzinformationen anzeigen.",
|
||||
"Trending": "Trending",
|
||||
"Watch video on Youtube": "Video auf YouTube ansehen",
|
||||
"Genre: ": "Genre: ",
|
||||
"License: ": "Lizenz: ",
|
||||
"Family friendly? ": "Familienfreundlich? ",
|
||||
"Wilson score: ": "Wilson-Score: ",
|
||||
"Engagement: ": "Engagement: ",
|
||||
"Whitelisted regions: ": "Erlaubte Regionen: ",
|
||||
"Blacklisted regions: ": "Unerlaubte Regionen: ",
|
||||
"Shared `x`": "Geteilt `x`",
|
||||
"Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.": "Hallo! Anscheinend haben Sie JavaScript deaktiviert. Klicken Sie hier um Kommentare anzuzeigen, beachten sie dass es etwas länger dauern kann um sie zu laden.",
|
||||
"View YouTube comments": "YouTube Kommentare anzeigen",
|
||||
"View more comments on Reddit": "Mehr Kommentare auf Reddit anzeigen",
|
||||
"View `x` comments": "`x` Kommentare anzeigen",
|
||||
"View Reddit comments": "Reddit Kommentare anzeigen",
|
||||
"Hide replies": "Antworten verstecken",
|
||||
"Show replies": "Antworten anzeigen",
|
||||
"Incorrect password": "Falsches Passwort",
|
||||
"Quota exceeded, try again in a few hours": "Kontingent überschritten, versuche es in ein paar Stunden erneut",
|
||||
"Unable to login, make sure two-factor authentication (Authenticator or SMS) is enabled.": "Login nicht möglich, stellen Sie sicher dass two-factor Authentifikation (Authentifizierung oder SMS) aktiviert ist.",
|
||||
"Invalid TFA code": "Ungültiger TFA Code",
|
||||
"Login failed. This may be because two-factor authentication is not enabled on your account.": "Login fehlgeschlagen. Das kann daran liegen dass two-factor Authentifizierung in ihrem Account nicht aktiviert ist.",
|
||||
"Invalid answer": "Ungültige Antwort",
|
||||
"Invalid CAPTCHA": "Ungültiges CAPTCHA",
|
||||
"CAPTCHA is a required field": "CAPTCHA ist eine erforderliche Eingabe",
|
||||
"User ID is a required field": "Benutzer ID ist eine erforderliche Eingabe",
|
||||
"Password is a required field": "Passwort ist eine erforderliche Eingabe",
|
||||
"Invalid username or password": "Ungültiger Benutzername oder Passwort",
|
||||
"Please sign in using 'Sign in with Google'": "Bitte melden sie sich mit 'Mit Google anmelden' an",
|
||||
"Password cannot be empty": "Passwort darf nicht leer sein",
|
||||
"Password cannot be longer than 55 characters": "Passwort darf nicht länger als 55 Zeichen sein",
|
||||
"Please sign in": "Bitte anmelden",
|
||||
"Invidious Private Feed for `x`": "Invidious Persönlicher Feed für `x`",
|
||||
"channel:`x`": "Kanal:`x`",
|
||||
"Deleted or invalid channel": "Gelöschter oder ungültiger Kanal",
|
||||
"This channel does not exist.": "Dieser Kanal existiert nicht.",
|
||||
"Could not get channel info.": "Kanalinformationen konnten nicht geladen werden.",
|
||||
"Could not fetch comments": "Kommentare konnten nicht geladen werden",
|
||||
"View `x` replies": "Zeige `x` Antworten",
|
||||
"`x` ago": "vor `x`",
|
||||
"Load more": "Mehr laden",
|
||||
"`x` points": "`x` Punkte",
|
||||
"Could not create mix.": "Mix konnte nicht erstellt werden.",
|
||||
"Playlist is empty": "Playlist ist leer",
|
||||
"Invalid playlist.": "Ungültige Playlist.",
|
||||
"Playlist does not exist.": "Playlist existiert nicht.",
|
||||
"Could not pull trending pages.": "Trending Seiten konnten nicht geladen werden.",
|
||||
"Hidden field \"challenge\" is a required field": "Verstecktes Feld \"challenge\" ist eine erforderliche Eingabe",
|
||||
"Hidden field \"token\" is a required field": "Verstecktes Feld \"token\" ist eine erforderliche Eingabe",
|
||||
"Invalid challenge": "Ungültiger Test",
|
||||
"Invalid token": "Ungöltige Marke",
|
||||
"Invalid user": "Ungültiger Benutzer",
|
||||
"Token is expired, please try again": "Marke ist abgelaufen, bitte erneut versuchen",
|
||||
"English": "Englisch",
|
||||
"English (auto-generated)": "Englisch (automatisch erzeugt)",
|
||||
"Afrikaans": "Afrikaans",
|
||||
"Albanian": "Albanisch",
|
||||
"Amharic": "Amharisch",
|
||||
"Arabic": "Arabisch",
|
||||
"Armenian": "Armenisch",
|
||||
"Azerbaijani": "Aserbaidschanisch",
|
||||
"Bangla": "Bengalisch",
|
||||
"Basque": "Baskisch",
|
||||
"Belarusian": "Weißrussisch",
|
||||
"Bosnian": "Bosnisch",
|
||||
"Bulgarian": "Bulgarisch",
|
||||
"Burmese": "Burmesisch",
|
||||
"Catalan": "Katalanisch",
|
||||
"Cebuano": "Cebuano",
|
||||
"Chinese (Simplified)": "Chinesisch (vereinfacht)",
|
||||
"Chinese (Traditional)": "Chinesisch (traditionell)",
|
||||
"Corsican": "Korsisch",
|
||||
"Croatian": "Kroatisch",
|
||||
"Czech": "Tschechisch",
|
||||
"Danish": "Dänisch",
|
||||
"Dutch": "Niederländisch",
|
||||
"Esperanto": "Esperanto",
|
||||
"Estonian": "Estnisch",
|
||||
"Filipino": "Philippinisch",
|
||||
"Finnish": "Finnisch",
|
||||
"French": "Französisch",
|
||||
"Galician": "Galizisch",
|
||||
"Georgian": "Georgisch",
|
||||
"German": "Deutsch",
|
||||
"Greek": "Griechisch",
|
||||
"Gujarati": "Gujarati",
|
||||
"Haitian Creole": "Haitianisches Kreolisch",
|
||||
"Hausa": "Hausa",
|
||||
"Hawaiian": "Hawaiianisch",
|
||||
"Hebrew": "Hebräisch",
|
||||
"Hindi": "Hindi",
|
||||
"Hmong": "Hmong",
|
||||
"Hungarian": "Ungarisch",
|
||||
"Icelandic": "Isländisch",
|
||||
"Igbo": "Igbo",
|
||||
"Indonesian": "Indonesisch",
|
||||
"Irish": "Irisch",
|
||||
"Italian": "Italienisch",
|
||||
"Japanese": "Japanisch",
|
||||
"Javanese": "Javanisch",
|
||||
"Kannada": "Kannada",
|
||||
"Kazakh": "Kasachisch",
|
||||
"Khmer": "Khmer",
|
||||
"Korean": "Koreanisch",
|
||||
"Kurdish": "Kurdisch",
|
||||
"Kyrgyz": "Kirgisisch",
|
||||
"Lao": "Laotisch",
|
||||
"Latin": "Lateinisch",
|
||||
"Latvian": "Lettisch",
|
||||
"Lithuanian": "Litauisch",
|
||||
"Luxembourgish": "Luxemburgisch",
|
||||
"Macedonian": "Mazedonisch",
|
||||
"Malagasy": "Madagassisch",
|
||||
"Malay": "Malaiisch",
|
||||
"Malayalam": "Malayalam",
|
||||
"Maltese": "Maltesisch",
|
||||
"Maori": "Maori",
|
||||
"Marathi": "Marathi",
|
||||
"Mongolian": "Mongolisch",
|
||||
"Nepali": "Nepalesisch",
|
||||
"Norwegian": "Norwegisch",
|
||||
"Nyanja": "Nyanja",
|
||||
"Pashto": "Paschtunisch",
|
||||
"Persian": "Persisch",
|
||||
"Polish": "Polnisch",
|
||||
"Portuguese": "Portugiesisch",
|
||||
"Punjabi": "Pandschabi",
|
||||
"Romanian": "Rumänisch",
|
||||
"Russian": "Russisch",
|
||||
"Samoan": "Samoanisch",
|
||||
"Scottish Gaelic": "Schottisches Gälisch",
|
||||
"Serbian": "Serbisch",
|
||||
"Shona": "Schona",
|
||||
"Sindhi": "Sindhi",
|
||||
"Sinhala": "Singhalesisch",
|
||||
"Slovak": "Slowakisch",
|
||||
"Slovenian": "Slowenisch",
|
||||
"Somali": "Somali",
|
||||
"Southern Sotho": "Südliches Sotho",
|
||||
"Spanish": "Spanisch",
|
||||
"Spanish (Latin America)": "Spanisch (Lateinamerika)",
|
||||
"Sundanese": "Sundanesisch",
|
||||
"Swahili": "Suaheli",
|
||||
"Swedish": "Schwedisch",
|
||||
"Tajik": "Tadschikisch",
|
||||
"Tamil": "Tamilisch",
|
||||
"Telugu": "Telugu",
|
||||
"Thai": "Thailändisch",
|
||||
"Turkish": "Türkisch",
|
||||
"Ukrainian": "Ukrainisch",
|
||||
"Urdu": "Urdu",
|
||||
"Uzbek": "Usbekisch",
|
||||
"Vietnamese": "Vietnamesisch",
|
||||
"Welsh": "Walisisch",
|
||||
"Western Frisian": "Westfriesisch",
|
||||
"Xhosa": "Xhosa",
|
||||
"Yiddish": "Jiddisch",
|
||||
"Yoruba": "Joruba",
|
||||
"Zulu": "Zulu",
|
||||
"`x` years": "`x` Jahre",
|
||||
"`x` months": "`x` Monate",
|
||||
"`x` weeks": "`x` Wochen",
|
||||
"`x` days": "`x` Tage",
|
||||
"`x` hours": "`x` Stunden",
|
||||
"`x` minutes": "`x` Minuten",
|
||||
"`x` seconds": "`x` Sekunden",
|
||||
"Fallback comments: ": "",
|
||||
"Popular": "Populär",
|
||||
"Top": "",
|
||||
"About": "Über",
|
||||
"Rating: ": "Bewertung: ",
|
||||
"Language: ": "Sprache: "
|
||||
}
|
267
locales/en-US.json
Normal file
@ -0,0 +1,267 @@
|
||||
{
|
||||
"`x` subscribers": "`x` subscribers",
|
||||
"`x` videos": "`x` videos",
|
||||
"LIVE": "LIVE",
|
||||
"Shared `x` ago": "Shared `x` ago",
|
||||
"Unsubscribe": "Unsubscribe",
|
||||
"Subscribe": "Subscribe",
|
||||
"Login to subscribe to `x`": "Login to subscribe to `x`",
|
||||
"View channel on YouTube": "View channel on YouTube",
|
||||
"newest": "newest",
|
||||
"oldest": "oldest",
|
||||
"popular": "popular",
|
||||
"Preview page": "Preview page",
|
||||
"Next page": "Next page",
|
||||
"Clear watch history?": "Clear watch history?",
|
||||
"Yes": "Yes",
|
||||
"No": "No",
|
||||
"Import and Export Data": "Import and Export Data",
|
||||
"Import": "Import",
|
||||
"Import Invidious data": "Import Invidious data",
|
||||
"Import YouTube subscriptions": "Import YouTube subscriptions",
|
||||
"Import FreeTube subscriptions (.db)": "Import FreeTube subscriptions (.db)",
|
||||
"Import NewPipe subscriptions (.json)": "Import NewPipe subscriptions (.json)",
|
||||
"Import NewPipe data (.zip)": "Import NewPipe data (.zip)",
|
||||
"Export": "Export",
|
||||
"Export subscriptions as OPML": "Export subscriptions as OPML",
|
||||
"Export subscriptions as OPML (for NewPipe & FreeTube)": "Export subscriptions as OPML (for NewPipe & FreeTube)",
|
||||
"Export data as JSON": "Export data as JSON",
|
||||
"Delete account?": "Delete account?",
|
||||
"History": "History",
|
||||
"Previous page": "Previous page",
|
||||
"An alternative front-end to YouTube": "An alternative front-end to YouTube",
|
||||
"JavaScript license information": "JavaScript license information",
|
||||
"source": "source",
|
||||
"Login": "Login",
|
||||
"Login/Register": "Login/Register",
|
||||
"Login to Google": "Login to Google",
|
||||
"User ID:": "User ID:",
|
||||
"Password:": "Password:",
|
||||
"Time (h:mm:ss):": "Time (h:mm:ss):",
|
||||
"Text CAPTCHA": "Text CAPTCHA",
|
||||
"Image CAPTCHA": "Image CAPTCHA",
|
||||
"Sign In": "Sign In",
|
||||
"Register": "Register",
|
||||
"Email:": "Email:",
|
||||
"Google verification code:": "Google verification code:",
|
||||
"Preferences": "Preferences",
|
||||
"Player preferences": "Player preferences",
|
||||
"Always loop: ": "Always loop: ",
|
||||
"Autoplay: ": "Autoplay: ",
|
||||
"Autoplay next video: ": "Autoplay next video: ",
|
||||
"Listen by default: ": "Listen by default: ",
|
||||
"Default speed: ": "Default speed: ",
|
||||
"Preferred video quality: ": "Preferred video quality: ",
|
||||
"Player volume: ": "Player volume: ",
|
||||
"Default comments: ": "Default comments: ",
|
||||
"Default captions: ": "Default captions: ",
|
||||
"Fallback captions: ": "Fallback captions: ",
|
||||
"Show related videos? ": "Show related videos? ",
|
||||
"Visual preferences": "Visual preferences",
|
||||
"Dark mode: ": "Dark mode: ",
|
||||
"Thin mode: ": "Thin mode: ",
|
||||
"Subscription preferences": "Subscription preferences",
|
||||
"Redirect homepage to feed: ": "Redirect homepage to feed: ",
|
||||
"Number of videos shown in feed: ": "Number of videos shown in feed: ",
|
||||
"Sort videos by: ": "Sort videos by: ",
|
||||
"published": "published",
|
||||
"published - reverse": "published - reverse",
|
||||
"alphabetically": "alphabetically",
|
||||
"alphabetically - reverse": "alphabetically - reverse",
|
||||
"channel name": "channel name",
|
||||
"channel name - reverse": "channel name - reverse",
|
||||
"Only show latest video from channel: ": "Only show latest video from channel: ",
|
||||
"Only show latest unwatched video from channel: ": "Only show latest unwatched video from channel: ",
|
||||
"Only show unwatched: ": "Only show unwatched: ",
|
||||
"Only show notifications (if there are any): ": "Only show notifications (if there are any): ",
|
||||
"Data preferences": "Data preferences",
|
||||
"Clear watch history": "Clear watch history",
|
||||
"Import/Export data": "Import/Export data",
|
||||
"Manage subscriptions": "Manage subscriptions",
|
||||
"Watch history": "Watch history",
|
||||
"Delete account": "Delete account",
|
||||
"Save preferences": "Save preferences",
|
||||
"Subscription manager": "Subscription manager",
|
||||
"`x` subscriptions": "`x` subscriptions",
|
||||
"Import/Export": "Import/Export",
|
||||
"unsubscribe": "unsubscribe",
|
||||
"Subscriptions": "Subscriptions",
|
||||
"`x` unseen notifications": "`x` unseen notifications",
|
||||
"search": "search",
|
||||
"Sign out": "Sign out",
|
||||
"Released under the AGPLv3 by Omar Roth.": "Released under the AGPLv3 by Omar Roth.",
|
||||
"Source available here.": "Source available here.",
|
||||
"View JavaScript license information.": "View JavaScript license information.",
|
||||
"Trending": "Trending",
|
||||
"Watch video on Youtube": "Watch video on Youtube",
|
||||
"Genre: ": "Genre: ",
|
||||
"License: ": "License: ",
|
||||
"Family friendly? ": "Family friendly? ",
|
||||
"Wilson score: ": "Wilson score: ",
|
||||
"Engagement: ": "Engagement: ",
|
||||
"Whitelisted regions: ": "Whitelisted regions: ",
|
||||
"Blacklisted regions: ": "Blacklisted regions: ",
|
||||
"Shared `x`": "Shared `x`",
|
||||
"Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.": "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": "View more comments on Reddit",
|
||||
"View `x` comments": "View `x` comments",
|
||||
"View Reddit comments": "View Reddit comments",
|
||||
"Hide replies": "Hide replies",
|
||||
"Show replies": "Show replies",
|
||||
"Incorrect password": "Incorrect password",
|
||||
"Quota exceeded, try again in a few hours": "Quota exceeded, try again in a few hours",
|
||||
"Unable to login, make sure two-factor authentication (Authenticator or SMS) is enabled.": "Unable to login, make sure two-factor authentication (Authenticator or SMS) is enabled.",
|
||||
"Invalid TFA code": "Invalid TFA code",
|
||||
"Login failed. This may be because two-factor authentication is not enabled on your account.": "Login failed. This may be because two-factor authentication is not enabled on your account.",
|
||||
"Invalid answer": "Invalid answer",
|
||||
"Invalid CAPTCHA": "Invalid CAPTCHA",
|
||||
"CAPTCHA is a required field": "CAPTCHA is a required field",
|
||||
"User ID is a required field": "User ID is a required field",
|
||||
"Password is a required field": "Password is a required field",
|
||||
"Invalid username or password": "Invalid username or password",
|
||||
"Please sign in using 'Sign in with Google'": "Please sign in using 'Sign in with Google'",
|
||||
"Password cannot be empty": "Password cannot be empty",
|
||||
"Password cannot be longer than 55 characters": "Password cannot be longer than 55 characters",
|
||||
"Please sign in": "Please sign in",
|
||||
"Invidious Private Feed for `x`": "Invidious Private Feed for `x`",
|
||||
"channel:`x`": "channel:`x`",
|
||||
"Deleted or invalid channel": "Deleted or invalid channel",
|
||||
"This channel does not exist.": "This channel does not exist.",
|
||||
"Could not get channel info.": "Could not get channel info.",
|
||||
"Could not fetch comments": "Could not fetch comments",
|
||||
"View `x` replies": "View `x` replies",
|
||||
"`x` ago": "`x` ago",
|
||||
"Load more": "Load more",
|
||||
"`x` points": "`x` points",
|
||||
"Could not create mix.": "Could not create mix.",
|
||||
"Playlist is empty": "Playlist is empty",
|
||||
"Invalid playlist.": "Invalid playlist.",
|
||||
"Playlist does not exist.": "Playlist does not exist.",
|
||||
"Could not pull trending pages.": "Could not pull trending pages.",
|
||||
"Hidden field \"challenge\" is a required field": "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": "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` years",
|
||||
"`x` months": "`x` months",
|
||||
"`x` weeks": "`x` weeks",
|
||||
"`x` days": "`x` days",
|
||||
"`x` hours": "`x` hours",
|
||||
"`x` minutes": "`x` minutes",
|
||||
"`x` seconds": "`x` seconds",
|
||||
"Fallback comments: ": "Fallback comments: ",
|
||||
"Popular": "Popular",
|
||||
"Top": "Top",
|
||||
"About": "About",
|
||||
"Rating: ": "Rating: ",
|
||||
"Language: ": "Language: "
|
||||
}
|
267
locales/nb_NO.json
Normal file
@ -0,0 +1,267 @@
|
||||
{
|
||||
"`x` subscribers": "`x` abonnenter",
|
||||
"`x` videos": "`x` videoer",
|
||||
"LIVE": "SANNTIDSVISNING",
|
||||
"Shared `x` ago": "Delt for `x` siden",
|
||||
"Unsubscribe": "Opphev abonnement",
|
||||
"Subscribe": "Abonner",
|
||||
"Login to subscribe to `x`": "Logg inn for å abonnere på `x`",
|
||||
"View channel on YouTube": "Vis kanal på YouTube",
|
||||
"newest": "nyeste",
|
||||
"oldest": "eldste",
|
||||
"popular": "populært",
|
||||
"Preview page": "Forhåndsvis side",
|
||||
"Next page": "Neste side",
|
||||
"Clear watch history?": "Tøm visningshistorikk?",
|
||||
"Yes": "Ja",
|
||||
"No": "Nei",
|
||||
"Import and Export Data": "Importer- og eksporter data",
|
||||
"Import": "Importer",
|
||||
"Import Invidious data": "Importer Invidious-data",
|
||||
"Import YouTube subscriptions": "Importer YouTube-abonnenter",
|
||||
"Import FreeTube subscriptions (.db)": "Importer FreeTube-abonnenter (.db)",
|
||||
"Import NewPipe subscriptions (.json)": "Importer NewPipe-abonnenter (.json)",
|
||||
"Import NewPipe data (.zip)": "Importer NewPipe-data (.zip)",
|
||||
"Export": "Eksporter",
|
||||
"Export subscriptions as OPML": "Eksporter abonnenter som OPML",
|
||||
"Export subscriptions as OPML (for NewPipe & FreeTube)": "Eksporter abonnenter som OPML (for NewPipe og FreeTube)",
|
||||
"Export data as JSON": "Eksporter data som JSON",
|
||||
"Delete account?": "Slett konto?",
|
||||
"History": "Historikk",
|
||||
"Previous page": "Forrige side",
|
||||
"An alternative front-end to YouTube": "En alternativ grenseflate for YouTube",
|
||||
"JavaScript license information": "JavaScript-lisensinformasjon",
|
||||
"source": "kilde",
|
||||
"Login": "Logg inn",
|
||||
"Login/Register": "Logg inn/registrer",
|
||||
"Login to Google": "Logg inn med Google",
|
||||
"User ID:": "Bruker-ID:",
|
||||
"Password:": "Passord:",
|
||||
"Time (h:mm:ss):": "Tid (h:mm:ss):",
|
||||
"Text CAPTCHA": "Tekst-CAPTCHA",
|
||||
"Image CAPTCHA": "Bilde-CAPTCHA",
|
||||
"Sign In": "Innlogging",
|
||||
"Register": "Registrer",
|
||||
"Email:": "E-post:",
|
||||
"Google verification code:": "Google-bekreftelseskode:",
|
||||
"Preferences": "Innstillinger",
|
||||
"Player preferences": "Avspillerinnstillinger",
|
||||
"Always loop: ": "Alltid gjenta: ",
|
||||
"Autoplay: ": "Autoavspilling: ",
|
||||
"Autoplay next video: ": "Autospill neste video: ",
|
||||
"Listen by default: ": "Lytt som forvalg: ",
|
||||
"Default speed: ": "Forvalgt hastighet: ",
|
||||
"Preferred video quality: ": "Foretrukket videokvalitet: ",
|
||||
"Player volume: ": "Avspillerlydstyrke: ",
|
||||
"Default comments: ": "Forvalgte kommentarer: ",
|
||||
"Default captions: ": "Forvalgte undertitler: ",
|
||||
"Fallback captions: ": "Tilbakefallsundertitler: ",
|
||||
"Show related videos? ": "Vis relaterte videoer? ",
|
||||
"Visual preferences": "Visuelle innstillinger",
|
||||
"Dark mode: ": "Mørk drakt: ",
|
||||
"Thin mode: ": "Tynt modus: ",
|
||||
"Subscription preferences": "Abonnementsinnstillinger",
|
||||
"Redirect homepage to feed: ": "Videresend hjemmeside til flyt: ",
|
||||
"Number of videos shown in feed: ": "Antall videoer å vise i flyt: ",
|
||||
"Sort videos by: ": "Sorter videoer etter: ",
|
||||
"published": "publisert",
|
||||
"published - reverse": "publisert - motsatt",
|
||||
"alphabetically": "alfabetisk",
|
||||
"alphabetically - reverse": "alfabetisk - motsatt",
|
||||
"channel name": "kanalnavn",
|
||||
"channel name - reverse": "kanalnavn - motsatt",
|
||||
"Only show latest video from channel: ": "Kun vis siste video fra kanal: ",
|
||||
"Only show latest unwatched video from channel: ": "Kun vis siste usette video fra kanal: ",
|
||||
"Only show unwatched: ": "Kun vis usette: ",
|
||||
"Only show notifications (if there are any): ": "Kun vis merknader (hvis det er noen): ",
|
||||
"Data preferences": "Datainnstillinger",
|
||||
"Clear watch history": "Tøm visningshistorikk",
|
||||
"Import/Export data": "Importer/eksporter data",
|
||||
"Manage subscriptions": "Behandle abonnementer",
|
||||
"Watch history": "Visningshistorikk",
|
||||
"Delete account": "Slett konto",
|
||||
"Save preferences": "Lagre innstillinger",
|
||||
"Subscription manager": "Abonnementsbehandler",
|
||||
"`x` subscriptions": "`x` abonnementer",
|
||||
"Import/Export": "Importer/eksporter",
|
||||
"unsubscribe": "opphev abonnement",
|
||||
"Subscriptions": "Abonnement",
|
||||
"`x` unseen notifications": "`x` usette merknader",
|
||||
"search": "søk",
|
||||
"Sign out": "Logg ut",
|
||||
"Released under the AGPLv3 by Omar Roth.": "Utgitt med AGPLv3+lisens av Omar Roth.",
|
||||
"Source available here.": "Kildekode tilgjengelig her.",
|
||||
"View JavaScript license information.": "Vis JavaScript-lisensinfo.",
|
||||
"Trending": "Trendsettende",
|
||||
"Watch video on Youtube": "Vis video på YouTube",
|
||||
"Genre: ": "Sjanger: ",
|
||||
"License: ": "Lisens: ",
|
||||
"Family friendly? ": "Familievennlig? ",
|
||||
"Wilson score: ": "Wilson-poengsum: ",
|
||||
"Engagement: ": "Engasjement: ",
|
||||
"Whitelisted regions: ": "Hvitlistede regioner: ",
|
||||
"Blacklisted regions: ": "Svartelistede regioner: ",
|
||||
"Shared `x`": "Delt `x`",
|
||||
"Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.": "Hei. Det ser ut til at du har JavaScript avslått. Klikk her for å vise kommentarer, ha i minnet at innlasting tar lengre tid.",
|
||||
"View YouTube comments": "Vis YouTube-kommentarer",
|
||||
"View more comments on Reddit": "Vis flere kommenterer på Reddit",
|
||||
"View `x` comments": "Vis `x` kommentarer",
|
||||
"View Reddit comments": "Vis Reddit-kommentarer",
|
||||
"Hide replies": "Skjul svar",
|
||||
"Show replies": "Vis svar",
|
||||
"Incorrect password": "Feil passord",
|
||||
"Quota exceeded, try again in a few hours": "Kvote overskredet, prøv igjen om et par timer",
|
||||
"Unable to login, make sure two-factor authentication (Authenticator or SMS) is enabled.": "Kunne ikke logge inn, forsikre deg om at tofaktor-identitetsbekreftelse (Authenticator eller SMS) er skrudd på.",
|
||||
"Invalid TFA code": "Ugyldig tofaktorkode",
|
||||
"Login failed. This may be because two-factor authentication is not enabled on your account.": "Innlogging mislyktes. Dette kan være fordi tofaktor-identitetsbekreftelse er skrudd av på kontoen din.",
|
||||
"Invalid answer": "Ugyldig svar",
|
||||
"Invalid CAPTCHA": "Ugyldig CAPTCHA",
|
||||
"CAPTCHA is a required field": "CAPTCHA er et påkrevd felt",
|
||||
"User ID is a required field": "Bruker-ID er et påkrevd felt",
|
||||
"Password is a required field": "Passord er et påkrevd felt",
|
||||
"Invalid username or password": "Ugyldig brukernavn eller passord",
|
||||
"Please sign in using 'Sign in with Google'": "Logg inn ved bruk av \"Google-innlogging\"",
|
||||
"Password cannot be empty": "Passordet kan ikke være tomt",
|
||||
"Password cannot be longer than 55 characters": "Passordet kan ikke være lengre enn 55 tegn",
|
||||
"Please sign in": "Logg inn",
|
||||
"Invidious Private Feed for `x`": "Ugyldig privat flyt for `x`",
|
||||
"channel:`x`": "kanal `x`",
|
||||
"Deleted or invalid channel": "Slettet eller ugyldig kanal",
|
||||
"This channel does not exist.": "Denne kanalen finnes ikke.",
|
||||
"Could not get channel info.": "Kunne ikke innhente kanalinfo.",
|
||||
"Could not fetch comments": "Kunne ikke hente kommentarer",
|
||||
"View `x` replies": "Vis `x` svar",
|
||||
"`x` ago": "`x` siden",
|
||||
"Load more": "Last inn flere",
|
||||
"`x` points": "`x` poeng",
|
||||
"Could not create mix.": "Kunne ikke opprette miks.",
|
||||
"Playlist is empty": "Spillelisten er tom",
|
||||
"Invalid playlist.": "Ugyldig spilleliste.",
|
||||
"Playlist does not exist.": "Spillelisten finnes ikke.",
|
||||
"Could not pull trending pages.": "Kunne ikke hente trendsettende sider.",
|
||||
"Hidden field \"challenge\" is a required field": "Skjult felt \"utfordring\" er et påkrevd felt",
|
||||
"Hidden field \"token\" is a required field": "Skjult felt \"symbol\" er et påkrevd felt",
|
||||
"Invalid challenge": "Ugyldig utfordring",
|
||||
"Invalid token": "Ugyldig symbol",
|
||||
"Invalid user": "Ugyldig bruker",
|
||||
"Token is expired, please try again": "Symbol utløpt, prøv igjen",
|
||||
"English": "Engelsk",
|
||||
"English (auto-generated)": "Engelsk (auto-generert)",
|
||||
"Afrikaans": "",
|
||||
"Albanian": "Albansk",
|
||||
"Amharic": "",
|
||||
"Arabic": "Arabisk",
|
||||
"Armenian": "Armensk",
|
||||
"Azerbaijani": "",
|
||||
"Bangla": "",
|
||||
"Basque": "",
|
||||
"Belarusian": "Hviterussisk",
|
||||
"Bosnian": "Bosnisk",
|
||||
"Bulgarian": "Bulgarsk",
|
||||
"Burmese": "Burmesisk",
|
||||
"Catalan": "Katalansk",
|
||||
"Cebuano": "",
|
||||
"Chinese (Simplified)": "",
|
||||
"Chinese (Traditional)": "",
|
||||
"Corsican": "",
|
||||
"Croatian": "",
|
||||
"Czech": "Tsjekkisk",
|
||||
"Danish": "Dansk",
|
||||
"Dutch": "",
|
||||
"Esperanto": "Esperanto",
|
||||
"Estonian": "",
|
||||
"Filipino": "",
|
||||
"Finnish": "Finsk",
|
||||
"French": "Fransk",
|
||||
"Galician": "",
|
||||
"Georgian": "",
|
||||
"German": "",
|
||||
"Greek": "",
|
||||
"Gujarati": "",
|
||||
"Haitian Creole": "",
|
||||
"Hausa": "",
|
||||
"Hawaiian": "",
|
||||
"Hebrew": "",
|
||||
"Hindi": "",
|
||||
"Hmong": "",
|
||||
"Hungarian": "Ungarsk",
|
||||
"Icelandic": "Islandsk",
|
||||
"Igbo": "",
|
||||
"Indonesian": "Indonesisk",
|
||||
"Irish": "Irsk",
|
||||
"Italian": "Italiensk",
|
||||
"Japanese": "Japansk",
|
||||
"Javanese": "",
|
||||
"Kannada": "",
|
||||
"Kazakh": "",
|
||||
"Khmer": "",
|
||||
"Korean": "",
|
||||
"Kurdish": "",
|
||||
"Kyrgyz": "",
|
||||
"Lao": "",
|
||||
"Latin": "",
|
||||
"Latvian": "",
|
||||
"Lithuanian": "",
|
||||
"Luxembourgish": "",
|
||||
"Macedonian": "",
|
||||
"Malagasy": "",
|
||||
"Malay": "",
|
||||
"Malayalam": "",
|
||||
"Maltese": "",
|
||||
"Maori": "",
|
||||
"Marathi": "",
|
||||
"Mongolian": "",
|
||||
"Nepali": "",
|
||||
"Norwegian": "Norsk bokmål",
|
||||
"Nyanja": "",
|
||||
"Pashto": "",
|
||||
"Persian": "",
|
||||
"Polish": "",
|
||||
"Portuguese": "",
|
||||
"Punjabi": "",
|
||||
"Romanian": "",
|
||||
"Russian": "Russisk",
|
||||
"Samoan": "",
|
||||
"Scottish Gaelic": "",
|
||||
"Serbian": "Serbisk",
|
||||
"Shona": "",
|
||||
"Sindhi": "",
|
||||
"Sinhala": "",
|
||||
"Slovak": "Slovakisk",
|
||||
"Slovenian": "Slovensk",
|
||||
"Somali": "Somali",
|
||||
"Southern Sotho": "",
|
||||
"Spanish": "Spansk",
|
||||
"Spanish (Latin America)": "",
|
||||
"Sundanese": "",
|
||||
"Swahili": "",
|
||||
"Swedish": "Svensk",
|
||||
"Tajik": "",
|
||||
"Tamil": "",
|
||||
"Telugu": "",
|
||||
"Thai": "",
|
||||
"Turkish": "Tyrkisk",
|
||||
"Ukrainian": "Ukrainsk",
|
||||
"Urdu": "",
|
||||
"Uzbek": "",
|
||||
"Vietnamese": "Vietnamesisk",
|
||||
"Welsh": "",
|
||||
"Western Frisian": "",
|
||||
"Xhosa": "",
|
||||
"Yiddish": "",
|
||||
"Yoruba": "",
|
||||
"Zulu": "",
|
||||
"`x` years": "`x` år",
|
||||
"`x` months": "`x` måneder",
|
||||
"`x` weeks": "`x` uker",
|
||||
"`x` days": "`x` dager",
|
||||
"`x` hours": "`x` timer",
|
||||
"`x` minutes": "`x` minutter",
|
||||
"`x` seconds": "`x` sekunder",
|
||||
"Fallback comments: ": "Tilbakefallskommentarer: ",
|
||||
"Popular": "Pupulært",
|
||||
"Top": "Topp",
|
||||
"About": "Om",
|
||||
"Rating: ": "Vurdering: ",
|
||||
"Language: ": "Språk: "
|
||||
}
|
267
locales/nl.json
Normal file
@ -0,0 +1,267 @@
|
||||
{
|
||||
"`x` subscribers": "`x` abonnees",
|
||||
"`x` videos": "`x` videos",
|
||||
"LIVE": "LIVE",
|
||||
"Shared `x` ago": "Gedeeld `x` geleden",
|
||||
"Unsubscribe": "Abonnement opzeggen",
|
||||
"Subscribe": "Abonneren",
|
||||
"Login to subscribe to `x`": "Log in om te abonneren op `x`",
|
||||
"View channel on YouTube": "Bekijk kanaal op Youtube",
|
||||
"newest": "nieuwste",
|
||||
"oldest": "oudste",
|
||||
"popular": "populair",
|
||||
"Preview page": "Pagina voorvertonen",
|
||||
"Next page": "Volgende pagina",
|
||||
"Clear watch history?": "Kijk geschiedenis wissen?",
|
||||
"Yes": "Ja",
|
||||
"No": "Nee",
|
||||
"Import and Export Data": "Importeer en Exporteer Gegevens",
|
||||
"Import": "Importeren",
|
||||
"Import Invidious data": "Importeer Invidious gegevens",
|
||||
"Import YouTube subscriptions": "Importeer Youtube abonnees",
|
||||
"Import FreeTube subscriptions (.db)": "Importeer FreeTube abonnees (.db)",
|
||||
"Import NewPipe subscriptions (.json)": "Importeer NewPipe abonnees (.json)",
|
||||
"Import NewPipe data (.zip)": "Importeer NewPipe gegevens (.zip)",
|
||||
"Export": "Exporteren",
|
||||
"Export subscriptions as OPML": "Exporteer abonnees als OPML",
|
||||
"Export subscriptions as OPML (for NewPipe & FreeTube)": "Exporteer abonnees als OPML (voor NewPipe & FreeTube)",
|
||||
"Export data as JSON": "Exporteer gegevens als JSON",
|
||||
"Delete account?": "Verwijder account?",
|
||||
"History": "Geschiedenis",
|
||||
"Previous page": "Vorige pagina",
|
||||
"An alternative front-end to YouTube": "Een alternatieve front-end voor YouTube",
|
||||
"JavaScript license information": "JavaScript licentie informatie",
|
||||
"source": "bron",
|
||||
"Login": "Inloggen",
|
||||
"Login/Register": "Inloggen/Registreren",
|
||||
"Login to Google": "Inloggen op Google",
|
||||
"User ID:": "Gebruiker ID:",
|
||||
"Password:": "Wachtwoord:",
|
||||
"Time (h:mm:ss):": "Tijd (h:mm:ss):",
|
||||
"Text CAPTCHA": "Tekst CAPTCHA",
|
||||
"Image CAPTCHA": "Afbeelding CAPTCHA",
|
||||
"Sign In": "Aanmelden",
|
||||
"Register": "Registreren",
|
||||
"Email:": "Email:",
|
||||
"Google verification code:": "Google verificatie code:",
|
||||
"Preferences": "Voorkeuren",
|
||||
"Player preferences": "Afspeler voorkeuren",
|
||||
"Always loop: ": "Altijd herhalen: ",
|
||||
"Autoplay: ": "Automatisch afspelen: ",
|
||||
"Autoplay next video: ": "Automatisch volgende video afspelen: ",
|
||||
"Listen by default: ": "Standaard luisteren: ",
|
||||
"Default speed: ": "Standaard snelheid: ",
|
||||
"Preferred video quality: ": "Video kwaliteit voorkeur: ",
|
||||
"Player volume: ": "Afspeler volume: ",
|
||||
"Default comments: ": "Standaard reacties: ",
|
||||
"Default captions: ": "Standaard ondertitels: ",
|
||||
"Fallback captions: ": "Alternatieve ondertitels: ",
|
||||
"Show related videos? ": "Laat gerelateerde videos zien? ",
|
||||
"Visual preferences": "Visuele voorkeuren",
|
||||
"Dark mode: ": "Donkere modus: ",
|
||||
"Thin mode: ": "Smalle modus: ",
|
||||
"Subscription preferences": "Abonnement voorkeuren",
|
||||
"Redirect homepage to feed: ": "Startpagina omleiden naar feed: ",
|
||||
"Number of videos shown in feed: ": "Aantal videos te zien in feed: ",
|
||||
"Sort videos by: ": "Sorteer videos op: ",
|
||||
"published": "gepubliceerd",
|
||||
"published - reverse": "gepubliceerd - omgekeerd",
|
||||
"alphabetically": "alfabetische volgorde",
|
||||
"alphabetically - reverse": "alfabetisch - omgekeerd",
|
||||
"channel name": "kanaal naam",
|
||||
"channel name - reverse": "kanaal naam - omgekeerd",
|
||||
"Only show latest video from channel: ": "Laat alleen laatste video van kanaal zien: ",
|
||||
"Only show latest unwatched video from channel: ": "Laat alleen de laatste onbekeken video zien van kanaal: ",
|
||||
"Only show unwatched: ": "Laat alleen onbekeken videos zien: ",
|
||||
"Only show notifications (if there are any): ": "Laat alleen notificaties zien (als die er zijn): ",
|
||||
"Data preferences": "Gegevens voorkeuren",
|
||||
"Clear watch history": "Kijkgeschiedenis wissen",
|
||||
"Import/Export data": "Importeer/Exporteer gegevens",
|
||||
"Manage subscriptions": "Abonnees beheren",
|
||||
"Watch history": "Kijkgeschiedenis",
|
||||
"Delete account": "Account verwijderen",
|
||||
"Save preferences": "Opslaan voorkeuren",
|
||||
"Subscription manager": "Abonnees beheerder",
|
||||
"`x` subscriptions": "`x` abonnees",
|
||||
"Import/Export": "Importeer/Exporteer",
|
||||
"unsubscribe": "abonnement opzeggen",
|
||||
"Subscriptions": "Abonnees",
|
||||
"`x` unseen notifications": "`x` onbekeken notificaties",
|
||||
"search": "zoeken",
|
||||
"Sign out": "Afmelden",
|
||||
"Released under the AGPLv3 by Omar Roth.": "Uitgegeven onder AGPLv3 door Omar Roth.",
|
||||
"Source available here.": "Bron beschikbaar hier.",
|
||||
"View JavaScript license information.": "Bekijk JavaScript licentie informatie.",
|
||||
"Trending": "Trending",
|
||||
"Watch video on Youtube": "Bekijk video op Youtube",
|
||||
"Genre: ": "Genre: ",
|
||||
"License: ": "Licentie: ",
|
||||
"Family friendly? ": "Gezinsvriendelijk? ",
|
||||
"Wilson score: ": "Wilson score: ",
|
||||
"Engagement: ": "Betrokkenheid: ",
|
||||
"Whitelisted regions: ": "Toegestane regio's: ",
|
||||
"Blacklisted regions: ": "Geblokkeerde regio's: ",
|
||||
"Shared `x`": "`x` gedeeld",
|
||||
"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 more comments on Reddit": "Bekijk meer reacties op Reddit",
|
||||
"View `x` comments": "`x` reacties zien",
|
||||
"View Reddit comments": "Bekijk Reddit reacties",
|
||||
"Hide replies": "Verberg antwoorden",
|
||||
"Show replies": "Laat antwoorden zien",
|
||||
"Incorrect password": "Onjuist wachtwoord",
|
||||
"Quota exceeded, try again in a few hours": "Quota overschreden, probeer het over een paar uur opnieuw",
|
||||
"Unable to login, make sure two-factor authentication (Authenticator or SMS) is enabled.": "Niet in staat om in te loggen, zorg ervoor dat two-factor authentication (Authenticator of SMS) is ingeschakeld.",
|
||||
"Invalid TFA code": "Onjuiste TFA code",
|
||||
"Login failed. This may be because two-factor authentication is not enabled on your account.": "Aanmelden mislukt. Dit kan zijn omdat two-factor authentication niet is ingeschakeld voor uw account.",
|
||||
"Invalid answer": "Onjuist antwoord",
|
||||
"Invalid CAPTCHA": "Onjuiste CAPTCHA",
|
||||
"CAPTCHA is a required field": "CAPTCHA is een vereist veld",
|
||||
"User ID is a required field": "Gebruiker ID is een vereist veld",
|
||||
"Password is a required field": "Wachtwoord is een vereist veld",
|
||||
"Invalid username or password": "Ongeldige gebruikersnaam of wachtwoord",
|
||||
"Please sign in using 'Sign in with Google'": "Meld u aan met 'Aanmelden met Google'",
|
||||
"Password cannot be empty": "Wachtwoord mag niet leeg zijn",
|
||||
"Password cannot be longer than 55 characters": "Wachtwoord mag niet langer dan 55 tekens zijn",
|
||||
"Please sign in": "Meld u aan",
|
||||
"Invidious Private Feed for `x`": "Invidious Privé Feed voor `x`",
|
||||
"channel:`x`": "kanaal:`x`",
|
||||
"Deleted or invalid channel": "Verwijderd of ongeldig kanaal",
|
||||
"This channel does not exist.": "Dit kanaal bestaat niet.",
|
||||
"Could not get channel info.": "Kan kanaal informatie niet verkrijgen.",
|
||||
"Could not fetch comments": "Kan reacties niet verkrijgen",
|
||||
"View `x` replies": "`x` antwoorden zien",
|
||||
"`x` ago": "`x` geleden",
|
||||
"Load more": "Meer laden",
|
||||
"`x` points": "`x` punten",
|
||||
"Could not create mix.": "Kon mix niet maken.",
|
||||
"Playlist is empty": "Afspeellijst is leeg",
|
||||
"Invalid playlist.": "Ongeldige afspeellijst.",
|
||||
"Playlist does not exist.": "Afspeellijst bestaat niet.",
|
||||
"Could not pull trending pages.": "Kon trending paginas niet verkrijgen.",
|
||||
"Hidden field \"challenge\" is a required field": "Verborgen veld \"uitdaging\" is een vereist veld",
|
||||
"Hidden field \"token\" is a required field": "Verborgen veld \"token\" is een vereist veld",
|
||||
"Invalid challenge": "Ongeldige uitdaging",
|
||||
"Invalid token": "Ongeldige token",
|
||||
"Invalid user": "Ongeldige gebruiker",
|
||||
"Token is expired, please try again": "Token is verlopen, probeer het opnieuw",
|
||||
"English": "",
|
||||
"English (auto-generated)": "",
|
||||
"Afrikaans": "",
|
||||
"Albanian": "",
|
||||
"Amharic": "",
|
||||
"Arabic": "",
|
||||
"Armenian": "",
|
||||
"Azerbaijani": "",
|
||||
"Bangla": "",
|
||||
"Basque": "",
|
||||
"Belarusian": "",
|
||||
"Bosnian": "",
|
||||
"Bulgarian": "",
|
||||
"Burmese": "",
|
||||
"Catalan": "",
|
||||
"Cebuano": "",
|
||||
"Chinese (Simplified)": "",
|
||||
"Chinese (Traditional)": "",
|
||||
"Corsican": "",
|
||||
"Croatian": "",
|
||||
"Czech": "",
|
||||
"Danish": "",
|
||||
"Dutch": "",
|
||||
"Esperanto": "",
|
||||
"Estonian": "",
|
||||
"Filipino": "",
|
||||
"Finnish": "",
|
||||
"French": "",
|
||||
"Galician": "",
|
||||
"Georgian": "",
|
||||
"German": "",
|
||||
"Greek": "",
|
||||
"Gujarati": "",
|
||||
"Haitian Creole": "",
|
||||
"Hausa": "",
|
||||
"Hawaiian": "",
|
||||
"Hebrew": "",
|
||||
"Hindi": "",
|
||||
"Hmong": "",
|
||||
"Hungarian": "",
|
||||
"Icelandic": "",
|
||||
"Igbo": "",
|
||||
"Indonesian": "",
|
||||
"Irish": "",
|
||||
"Italian": "",
|
||||
"Japanese": "",
|
||||
"Javanese": "",
|
||||
"Kannada": "",
|
||||
"Kazakh": "",
|
||||
"Khmer": "",
|
||||
"Korean": "",
|
||||
"Kurdish": "",
|
||||
"Kyrgyz": "",
|
||||
"Lao": "",
|
||||
"Latin": "",
|
||||
"Latvian": "",
|
||||
"Lithuanian": "",
|
||||
"Luxembourgish": "",
|
||||
"Macedonian": "",
|
||||
"Malagasy": "",
|
||||
"Malay": "",
|
||||
"Malayalam": "",
|
||||
"Maltese": "",
|
||||
"Maori": "",
|
||||
"Marathi": "",
|
||||
"Mongolian": "",
|
||||
"Nepali": "",
|
||||
"Norwegian": "",
|
||||
"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` jaar",
|
||||
"`x` months": "`x` maanden",
|
||||
"`x` weeks": "`x` weken",
|
||||
"`x` days": "`x` dagen",
|
||||
"`x` hours": "`x` uur",
|
||||
"`x` minutes": "`x` minuten",
|
||||
"`x` seconds": "`x` seconden",
|
||||
"Fallback comments: ": "",
|
||||
"Popular": "",
|
||||
"Top": "",
|
||||
"About": "",
|
||||
"Rating: ": "",
|
||||
"Language: ": ""
|
||||
}
|
267
locales/pl.json
Normal file
@ -0,0 +1,267 @@
|
||||
{
|
||||
"`x` subscribers": "`x` subskrybcji",
|
||||
"`x` videos": "`x` filmów",
|
||||
"LIVE": "NA ŻYWO",
|
||||
"Shared `x` ago": "Udostępniono `x` temu",
|
||||
"Unsubscribe": "Odsubskrybuj",
|
||||
"Subscribe": "Subskrybuj",
|
||||
"Login to subscribe to `x`": "Zaloguj się, aby subskrybować `x`",
|
||||
"View channel on YouTube": "Wyświetl kanał na YouTube",
|
||||
"newest": "najnowsze",
|
||||
"oldest": "najstarsze",
|
||||
"popular": "popularne",
|
||||
"Preview page": "Podgląd strony",
|
||||
"Next page": "Następna strona",
|
||||
"Clear watch history?": "Wyczyścić historię?",
|
||||
"Yes": "Tak",
|
||||
"No": "Nie",
|
||||
"Import and Export Data": "Import i eksport danych",
|
||||
"Import": "Import",
|
||||
"Import Invidious data": "Importuj dane Invidious",
|
||||
"Import YouTube subscriptions": "Importuj subskrybcje z YouTube",
|
||||
"Import FreeTube subscriptions (.db)": "Importuj subskrybcje z FreeTube (.db)",
|
||||
"Import NewPipe subscriptions (.json)": "Importuj subskrybcje z NewPipe (.json)",
|
||||
"Import NewPipe data (.zip)": "Importuj dane NewPipe (.zip)",
|
||||
"Export": "Eksport",
|
||||
"Export subscriptions as OPML": "Eksportuj subskrybcje jako OPML",
|
||||
"Export subscriptions as OPML (for NewPipe & FreeTube)": "Eksportuj subskrybcje jako OPML (dla NewPipe i FreeTube)",
|
||||
"Export data as JSON": "Eksportuj dane jako JSON",
|
||||
"Delete account?": "Usunąć konto?",
|
||||
"History": "Historia",
|
||||
"Previous page": "Poprzednia strona",
|
||||
"An alternative front-end to YouTube": "",
|
||||
"JavaScript license information": "Informacja o licencji JavaScript",
|
||||
"source": "źródło",
|
||||
"Login": "Zaloguj",
|
||||
"Login/Register": "Zaloguj/Zarejestruj",
|
||||
"Login to Google": "Zaloguj do Google",
|
||||
"User ID:": "ID użytkownika:",
|
||||
"Password:": "Hasło:",
|
||||
"Time (h:mm:ss):": "Godzina (h:mm:ss):",
|
||||
"Text CAPTCHA": "Tekst CAPTCHA",
|
||||
"Image CAPTCHA": "Obraz CAPTCHA",
|
||||
"Sign In": "Zaloguj się",
|
||||
"Register": "Zarejestruj się",
|
||||
"Email:": "Email:",
|
||||
"Google verification code:": "Kod weryfikacyjny Google:",
|
||||
"Preferences": "Preferencje",
|
||||
"Player preferences": "Ustawienia odtwarzacza",
|
||||
"Always loop: ": "Zawsze zapętlaj: ",
|
||||
"Autoplay: ": "Autoodtwarzanie: ",
|
||||
"Autoplay next video: ": "Odtwórz następny film: ",
|
||||
"Listen by default: ": "Tryb dźwiękowy: ",
|
||||
"Default speed: ": "Domyślna prędkość: ",
|
||||
"Preferred video quality: ": "Preferowana jakość filmów: ",
|
||||
"Player volume: ": "Głośność odtwarzacza: ",
|
||||
"Default comments: ": "Domyślne komentarze: ",
|
||||
"Default captions: ": "Domyślne napisy: ",
|
||||
"Fallback captions: ": "Rezerwowe napisy: ",
|
||||
"Show related videos? ": "Pokaż powiązane filmy? ",
|
||||
"Visual preferences": "Preferencje Wizualne",
|
||||
"Dark mode: ": "Ciemny motyw: ",
|
||||
"Thin mode: ": "Tryb minimalny: ",
|
||||
"Subscription preferences": "Preferencje subskrybcji",
|
||||
"Redirect homepage to feed: ": "Przekieruj stronę główną do subskrybcji: ",
|
||||
"Number of videos shown in feed: ": "Liczba filmów widoczna na stronie subskrybcji: ",
|
||||
"Sort videos by: ": "Sortuj filmy po: ",
|
||||
"published": "czasie publikacji",
|
||||
"published - reverse": "czasie publikacji od najstarszych",
|
||||
"alphabetically": "alfabetycznie",
|
||||
"alphabetically - reverse": "alfabetycznie od tyłu",
|
||||
"channel name": "nazwie kanału",
|
||||
"channel name - reverse": "nazwie kanału od tył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 unwatched: ": "Pokazuj tylko nie obejrzane: ",
|
||||
"Only show notifications (if there are any): ": "Pokazuj tylko powiadomienia (jeśli są): ",
|
||||
"Data preferences": "Preferencje danych",
|
||||
"Clear watch history": "Wyczyść historię",
|
||||
"Import/Export data": "Import/Eksport danych",
|
||||
"Manage subscriptions": "Organizuj subskrybcje",
|
||||
"Watch history": "Historia",
|
||||
"Delete account": "Usuń konto",
|
||||
"Save preferences": "Zapisz preferencje",
|
||||
"Subscription manager": "Manager subskrybcji",
|
||||
"`x` subscriptions": "`x` subskrybcji",
|
||||
"Import/Export": "Import/Eksport",
|
||||
"unsubscribe": "odsubskrybuj",
|
||||
"Subscriptions": "Subskrybcje",
|
||||
"`x` unseen notifications": "`x` niewidzianych powiadomień",
|
||||
"search": "szukaj",
|
||||
"Sign out": "Wyloguj",
|
||||
"Released under the AGPLv3 by Omar Roth.": "Wydano na licencji AGPLv3 przez Omar Roth.",
|
||||
"Source available here.": "Kod źródłowy dostępny tutaj.",
|
||||
"View JavaScript license information.": "Wyświetl informację o licencji JavaScript.",
|
||||
"Trending": "Na czasie",
|
||||
"Watch video on Youtube": "Zobacz film na YouTube",
|
||||
"Genre: ": "Gatunek: ",
|
||||
"License: ": "Licencja: ",
|
||||
"Family friendly? ": "Przyjazny rodzinie? ",
|
||||
"Wilson score: ": "Punktacja Wilsona: ",
|
||||
"Engagement: ": "Zaangażowanie: ",
|
||||
"Whitelisted regions: ": "Dostępny na obszarach: ",
|
||||
"Blacklisted regions: ": "Niedostępny na obszarach: ",
|
||||
"Shared `x`": "Udostępniono `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.",
|
||||
"View YouTube comments": "Wyświetl komentarze z YouTube",
|
||||
"View more comments on Reddit": "Wyświetl więcej komentarzy na Reddicie",
|
||||
"View `x` comments": "Wyświetl `x` komentarzy",
|
||||
"View Reddit comments": "Wyświetl komentarze z Redditta",
|
||||
"Hide replies": "Ukryj odpowiedzi",
|
||||
"Show replies": "Pokaż odpowiedzi",
|
||||
"Incorrect password": "Niepoprawne hasło",
|
||||
"Quota exceeded, try again in a few hours": "Przekroczony limit zapytań, spróbuj ponownie za kilka godzin",
|
||||
"Unable to login, make sure two-factor authentication (Authenticator or SMS) is enabled.": "Nie udało się zalogować, upewnij się, że dwuetapowe uwierzytelnianie (Autentykator lub SMS) jest aktywne.",
|
||||
"Invalid TFA code": "Niepoprawny kod TFA",
|
||||
"Login failed. This may be because two-factor authentication is not enabled on your account.": "Nie udało się zalogować. To może być spowodowane wyłączoną dwustopniową autoryzacją na twoim koncie.",
|
||||
"Invalid answer": "Niepoprawna odpowiedź",
|
||||
"Invalid CAPTCHA": "CAPTCHA wykonane błędnie",
|
||||
"CAPTCHA is a required field": "CAPTCHA jest polem wymaganym",
|
||||
"User ID is a required field": "ID użytkownika jest polem wymaganym",
|
||||
"Password is a required field": "Hasło jest polem wymaganym",
|
||||
"Invalid username or password": "Niepoprawny login lub hasło",
|
||||
"Please sign in using 'Sign in with Google'": "Zaloguj się używając \"Zaloguj się przez Google\"",
|
||||
"Password cannot be empty": "Hasło nie może być puste",
|
||||
"Password cannot be longer than 55 characters": "Hasło nie może być dłuższe niż 55 znaków",
|
||||
"Please sign in": "Proszę się zalogować",
|
||||
"Invidious Private Feed for `x`": "",
|
||||
"channel:`x`": "kanał:`x",
|
||||
"Deleted or invalid channel": "Usunięty lub niepoprawny kanał",
|
||||
"This channel does not exist.": "Ten kanał nie istnieje.",
|
||||
"Could not get channel info.": "Nie udało się uzyskać informacji o kanale.",
|
||||
"Could not fetch comments": "Nie udało się pobrać komentarzy",
|
||||
"View `x` replies": "Wyświetl `x` odpowiedzi",
|
||||
"`x` ago": "`x` temu",
|
||||
"Load more": "Wczytaj więcej",
|
||||
"`x` points": "`x` punktów",
|
||||
"Could not create mix.": "Nie udało się utworzyć miksu.",
|
||||
"Playlist is empty": "Lista odtwarzania jest pusta",
|
||||
"Invalid playlist.": "Niepoprawna lista.",
|
||||
"Playlist does not exist.": "Lista odtwarzania nie istnieje.",
|
||||
"Could not pull trending pages.": "Nie udało się pobrać strony na czasie.",
|
||||
"Hidden field \"challenge\" is a required field": "Ukryte pole \"wyzwanie\" jest polem wymaganym",
|
||||
"Hidden field \"token\" is a required field": "Ukryte pole \"token\" jest polem wymaganym",
|
||||
"Invalid challenge": "Niepoprawne wyzwanie",
|
||||
"Invalid token": "Niepoprawny token",
|
||||
"Invalid user": "Niepoprawny użytkownik",
|
||||
"Token is expired, please try again": "Token wygasł, spróbuj ponownie",
|
||||
"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` lat",
|
||||
"`x` months": "`x` miesięcy",
|
||||
"`x` weeks": "`x` tygodni",
|
||||
"`x` days": "`x` dni",
|
||||
"`x` hours": "`x` godzin",
|
||||
"`x` minutes": "`x` minut",
|
||||
"`x` seconds": "`x` sekund",
|
||||
"Fallback comments: ": "",
|
||||
"Popular": "",
|
||||
"Top": "",
|
||||
"About": "",
|
||||
"Rating: ": "",
|
||||
"Language: ": ""
|
||||
}
|
273
locales/ru.json
Normal file
@ -0,0 +1,273 @@
|
||||
{
|
||||
"`x` subscribers": "`x` подписчиков",
|
||||
"`x` videos": "`x` видео",
|
||||
"LIVE": "ПРЯМОЙ ЭФИР",
|
||||
"Shared `x` ago": "Опубликовано `x` назад",
|
||||
"Unsubscribe": "Отписаться",
|
||||
"Subscribe": "Подписаться",
|
||||
"Login to subscribe to `x`": "Войти, чтобы подписаться на `x`",
|
||||
"View channel on YouTube": "Канал на YouTube",
|
||||
"newest": "новые",
|
||||
"oldest": "старые",
|
||||
"popular": "популярные",
|
||||
"Preview page": "Предварительный просмотр",
|
||||
"Next page": "Следующая страница",
|
||||
"Clear watch history?": "Очистить историю просмотров?",
|
||||
"Yes": "Да",
|
||||
"No": "Нет",
|
||||
"Import and Export Data": "Импорт и экспорт данных",
|
||||
"Import": "Импорт",
|
||||
"Import Invidious data": "Импортировать данные Invidious",
|
||||
"Import YouTube subscriptions": "Импортировать YouTube подписки",
|
||||
"Import FreeTube subscriptions (.db)": "Импортировать FreeTube подписки (.db)",
|
||||
"Import NewPipe subscriptions (.json)": "Импортировать NewPipe подписки (.json)",
|
||||
"Import NewPipe data (.zip)": "Импортировать данные NewPipe (.zip)",
|
||||
"Export": "Экспорт",
|
||||
"Export subscriptions as OPML": "Экспортировать подписки в OPML",
|
||||
"Export subscriptions as OPML (for NewPipe & FreeTube)": "Экспортировать подписки в OPML (для NewPipe и FreeTube)",
|
||||
"Export data as JSON": "Экспортировать данные в JSON",
|
||||
"Delete account?": "Удалить аккаунт?",
|
||||
"History": "История",
|
||||
"Previous page": "Предыдущая страница",
|
||||
"An alternative front-end to YouTube": "Альтернативный фронтенд для YouTube",
|
||||
"JavaScript license information": "Лицензии JavaScript",
|
||||
"source": "источник",
|
||||
"Login": "Войти",
|
||||
"Login/Register": "Войти/Регистрация",
|
||||
"Login to Google": "Войти через Google",
|
||||
"User ID:": "ID пользователя:",
|
||||
"Password:": "Пароль:",
|
||||
"Time (h:mm:ss):": "Время (ч:мм:сс):",
|
||||
"Text CAPTCHA": "Текст капчи",
|
||||
"Image CAPTCHA": "Изображение капчи",
|
||||
"Sign In": "Войти",
|
||||
"Register": "Регистрация",
|
||||
"Email:": "Эл. почта:",
|
||||
"Google verification code:": "Код подтверждения Google:",
|
||||
"Preferences": "Настройки",
|
||||
"Player preferences": "Настройки проигрывателя",
|
||||
"Always loop: ": "Всегда повторять: ",
|
||||
"Autoplay: ": "Автовоспроизведение: ",
|
||||
"Autoplay next video: ": "Автовоспроизведение следующего видео: ",
|
||||
"Listen by default: ": "Режим \"только аудио\" по-умолчанию: ",
|
||||
"Default speed: ": "Скорость по-умолчанию: ",
|
||||
"Preferred video quality: ": "Предпочтительное качество видео: ",
|
||||
"Player volume: ": "Громкость воспроизведения: ",
|
||||
"Default comments: ": "Источник комментариев: ",
|
||||
"youtube": "YouTube",
|
||||
"reddit": "Reddit",
|
||||
"Default captions: ": "Субтитры по-умолчанию: ",
|
||||
"Fallback captions: ": "Резервные субтитры: ",
|
||||
"Show related videos? ": "Показывать похожие видео? ",
|
||||
"Visual preferences": "Визуальные настройки",
|
||||
"Dark mode: ": "Темная тема: ",
|
||||
"Thin mode: ": "Облегченный режим: ",
|
||||
"Subscription preferences": "Настройки подписок",
|
||||
"Redirect homepage to feed: ": "Отображать ленту вместо главной страницы: ",
|
||||
"Number of videos shown in feed: ": "Число видео в ленте: ",
|
||||
"Sort videos by: ": "Сортировать видео по: ",
|
||||
"published": "дате публикации",
|
||||
"published - reverse": "дате - обратный порядок",
|
||||
"alphabetically": "алфавиту",
|
||||
"alphabetically - reverse": "алфавиту - обратный порядок",
|
||||
"channel name": "имени канала",
|
||||
"channel name - reverse": "имени канала - обратный порядок",
|
||||
"Only show latest video from channel: ": "Отображать только последние видео с каждого канала: ",
|
||||
"Only show latest unwatched video from channel: ": "Отображать только непросмотренные видео с каждого канала: ",
|
||||
"Only show unwatched: ": "Отображать только непросмотренные видео: ",
|
||||
"Only show notifications (if there are any): ": "Отображать только оповещения (если есть): ",
|
||||
"Data preferences": "Настройки данных",
|
||||
"Clear watch history": "Очистить историю просмотра",
|
||||
"Import/Export data": "Импорт/Экспорт данных",
|
||||
"Manage subscriptions": "Управление подписками",
|
||||
"Watch history": "История просмотров",
|
||||
"Delete account": "Удалить аккаунт",
|
||||
"Save preferences": "Сохранить настройки",
|
||||
"Subscription manager": "Менеджер подписок",
|
||||
"`x` subscriptions": "`x` подписок",
|
||||
"Import/Export": "Импорт/Экспорт",
|
||||
"unsubscribe": "отписаться",
|
||||
"Subscriptions": "Подписки",
|
||||
"`x` unseen notifications": "`x` новых оповещений",
|
||||
"search": "поиск",
|
||||
"Sign out": "Выйти",
|
||||
"Released under the AGPLv3 by Omar Roth.": "Распространяется Omar Roth по AGPLv3.",
|
||||
"Source available here.": "Исходный код доступен здесь.",
|
||||
"Liberapay: ": "Liberapay: ",
|
||||
"Patreon: ": "Patreon: ",
|
||||
"BTC: ": "BTC: ",
|
||||
"BCH: ": "BCH: ",
|
||||
"View JavaScript license information.": "Посмотреть лицензии JavaScript кода.",
|
||||
"Trending": "В тренде",
|
||||
"Watch video on Youtube": "Смотреть на YouTube",
|
||||
"Genre: ": "Жанр: ",
|
||||
"License: ": "Лицензия: ",
|
||||
"Family friendly? ": "Семейный просмотр: ",
|
||||
"Wilson score: ": "Рейтинг Вильсона: ",
|
||||
"Engagement: ": "Вовлеченность: ",
|
||||
"Whitelisted regions: ": "Доступно для: ",
|
||||
"Blacklisted regions: ": "Недоступно для: ",
|
||||
"Shared `x`": "Опубликовано `x`",
|
||||
"Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.": "Похоже, что у Вас отключен JavaScript. Нажмите сюда, чтобы увидеть комментарии (учтите, что они могут загружаться дольше).",
|
||||
"View YouTube comments": "Смотреть комментарии с YouTube",
|
||||
"View more comments on Reddit": "Больше комментариев на Reddit",
|
||||
"View `x` comments": "Показать `x` комментариев",
|
||||
"View Reddit comments": "Смотреть комментарии с Reddit",
|
||||
"Hide replies": "Скрыть ответы",
|
||||
"Show replies": "Показать ответы",
|
||||
"Incorrect password": "Неправильный пароль",
|
||||
"Quota exceeded, try again in a few hours": "Превышена квота, попробуйте снова через несколько часов",
|
||||
"Unable to login, make sure two-factor authentication (Authenticator or SMS) is enabled.": "Вход не выполнен, проверьте, не включена ли двухфакторная аутентификация.",
|
||||
"Invalid TFA code": "Неправильный TFA код",
|
||||
"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'": "Пожалуйста войдите через Google",
|
||||
"Password cannot be empty": "Пароль не может быть пустым",
|
||||
"Password cannot be longer than 55 characters": "Пароль не может быть длиннее 55 символов",
|
||||
"Please sign in": "Пожалуйста, войдите",
|
||||
"Invidious Private Feed for `x`": "Приватная лента Invidious для `x`",
|
||||
"channel:`x`": "канал: `x`",
|
||||
"Deleted or invalid channel": "Канал удален или не найден",
|
||||
"This channel does not exist.": "Такой канал не существует.",
|
||||
"Could not get channel info.": "Невозможно получить информацию о канале.",
|
||||
"Could not fetch comments": "Невозможно получить комментарии",
|
||||
"View `x` replies": "Показать `x` ответов",
|
||||
"`x` ago": "`x` назад",
|
||||
"Load more": "Загрузить больше",
|
||||
"`x` points": "`x` очков",
|
||||
"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": "Необходимо заполнить скрытое поле \"challenge\"",
|
||||
"Hidden field \"token\" is a required field": "Необходимо заполнить скрытое поле \"токен\"",
|
||||
"Invalid challenge": "Неправильный ответ в \"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` лет",
|
||||
"`x` months": "`x` месяцев",
|
||||
"`x` weeks": "`x` недель",
|
||||
"`x` days": "`x` дней",
|
||||
"`x` hours": "`x` часов",
|
||||
"`x` minutes": "`x` минут",
|
||||
"`x` seconds": "`x` секунд",
|
||||
"Fallback comments: ": "Резервные комментарии: ",
|
||||
"Popular": "Популярное",
|
||||
"Top": "Топ",
|
||||
"About": "О сайте",
|
||||
"Rating: ": "Рейтинг: ",
|
||||
"Language: ": "Язык: "
|
||||
}
|
1
setup.sh
@ -7,3 +7,4 @@ 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,5 +1,5 @@
|
||||
name: invidious
|
||||
version: 0.7.0
|
||||
version: 0.12.0
|
||||
|
||||
authors:
|
||||
- Omar Roth <omarroth@hotmail.com>
|
||||
@ -13,9 +13,12 @@ dependencies:
|
||||
github: detectlanguage/detectlanguage-crystal
|
||||
kemal:
|
||||
github: kemalcr/kemal
|
||||
commit: afd17fc
|
||||
pg:
|
||||
github: will/crystal-pg
|
||||
sqlite3:
|
||||
github: crystal-lang/crystal-sqlite3
|
||||
|
||||
crystal: 0.26.1
|
||||
crystal: 0.27.0
|
||||
|
||||
license: AGPLv3
|
||||
|
1600
src/invidious.cr
@ -8,43 +8,78 @@ end
|
||||
|
||||
class ChannelVideo
|
||||
add_mapping({
|
||||
id: String,
|
||||
title: String,
|
||||
published: Time,
|
||||
updated: Time,
|
||||
ucid: String,
|
||||
author: String,
|
||||
id: String,
|
||||
title: String,
|
||||
published: Time,
|
||||
updated: Time,
|
||||
ucid: String,
|
||||
author: String,
|
||||
length_seconds: {
|
||||
type: Int32,
|
||||
default: 0,
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
def get_channel(id, client, db, refresh = true, pull_all_videos = true)
|
||||
def get_batch_channels(channels, db, refresh = false, pull_all_videos = true, max_threads = 10)
|
||||
active_threads = 0
|
||||
active_channel = Channel(String | Nil).new
|
||||
|
||||
final = [] of String
|
||||
channels.map do |ucid|
|
||||
if active_threads >= max_threads
|
||||
if response = active_channel.receive
|
||||
active_threads -= 1
|
||||
final << response
|
||||
end
|
||||
end
|
||||
|
||||
active_threads += 1
|
||||
spawn do
|
||||
begin
|
||||
get_channel(ucid, db, refresh, pull_all_videos)
|
||||
active_channel.send(ucid)
|
||||
rescue ex
|
||||
active_channel.send(nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return final
|
||||
end
|
||||
|
||||
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)
|
||||
channel = db.query_one("SELECT * FROM channels WHERE id = $1", id, as: InvidiousChannel)
|
||||
|
||||
if refresh && Time.now - channel.updated > 10.minutes
|
||||
channel = fetch_channel(id, client, db, pull_all_videos)
|
||||
channel = fetch_channel(id, client, db, pull_all_videos: pull_all_videos)
|
||||
channel_array = channel.to_a
|
||||
args = arg_array(channel_array)
|
||||
|
||||
db.exec("INSERT INTO channels VALUES (#{args}) \
|
||||
ON CONFLICT (id) DO UPDATE SET updated = $3", channel_array)
|
||||
ON CONFLICT (id) DO UPDATE SET author = $2, updated = $3", channel_array)
|
||||
end
|
||||
else
|
||||
channel = fetch_channel(id, client, db, pull_all_videos)
|
||||
args = arg_array(channel.to_a)
|
||||
db.exec("INSERT INTO channels VALUES (#{args})", channel.to_a)
|
||||
channel = fetch_channel(id, client, db, pull_all_videos: pull_all_videos)
|
||||
channel_array = channel.to_a
|
||||
args = arg_array(channel_array)
|
||||
|
||||
db.exec("INSERT INTO channels VALUES (#{args})", channel_array)
|
||||
end
|
||||
|
||||
return channel
|
||||
end
|
||||
|
||||
def fetch_channel(ucid, client, db, pull_all_videos = true)
|
||||
def fetch_channel(ucid, client, db, pull_all_videos = true, locale = nil)
|
||||
rss = client.get("/feeds/videos.xml?channel_id=#{ucid}").body
|
||||
rss = XML.parse_html(rss)
|
||||
|
||||
author = rss.xpath_node(%q(//feed/title))
|
||||
if !author
|
||||
raise "Deleted or invalid channel"
|
||||
raise translate(locale, "Deleted or invalid channel")
|
||||
end
|
||||
author = author.content
|
||||
|
||||
@ -56,6 +91,25 @@ def fetch_channel(ucid, client, db, pull_all_videos = true)
|
||||
end
|
||||
|
||||
if !pull_all_videos
|
||||
url = produce_channel_videos_url(ucid, 1, auto_generated: auto_generated)
|
||||
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")]))
|
||||
|
||||
if auto_generated
|
||||
videos = extract_videos(nodeset)
|
||||
else
|
||||
videos = extract_videos(nodeset, ucid)
|
||||
videos.each { |video| video.ucid = ucid }
|
||||
videos.each { |video| video.author = author }
|
||||
end
|
||||
end
|
||||
|
||||
videos ||= [] of ChannelVideo
|
||||
|
||||
rss.xpath_nodes("//feed/entry").each do |entry|
|
||||
video_id = entry.xpath_node("videoid").not_nil!.content
|
||||
title = entry.xpath_node("title").not_nil!.content
|
||||
@ -64,16 +118,20 @@ def fetch_channel(ucid, client, db, pull_all_videos = true)
|
||||
author = entry.xpath_node("author/name").not_nil!.content
|
||||
ucid = entry.xpath_node("channelid").not_nil!.content
|
||||
|
||||
video = ChannelVideo.new(video_id, title, published, Time.now, ucid, author)
|
||||
length_seconds = videos.select { |video| video.id == video_id }[0]?.try &.length_seconds
|
||||
length_seconds ||= 0
|
||||
|
||||
video = ChannelVideo.new(video_id, title, published, Time.now, ucid, author, length_seconds)
|
||||
|
||||
db.exec("UPDATE users SET notifications = notifications || $1 \
|
||||
WHERE updated < $2 AND $3 = ANY(subscriptions) AND $1 <> ALL(notifications)", video.id, video.published, ucid)
|
||||
|
||||
video_array = video.to_a
|
||||
args = arg_array(video_array)
|
||||
|
||||
db.exec("INSERT INTO channel_videos VALUES (#{args}) \
|
||||
ON CONFLICT (id) DO UPDATE SET title = $2, published = $3, \
|
||||
updated = $4, ucid = $5, author = $6", video_array)
|
||||
ON CONFLICT (id) DO UPDATE SET title = $2, published = $3, \
|
||||
updated = $4, ucid = $5, author = $6, length_seconds = $7", video_array)
|
||||
end
|
||||
else
|
||||
page = 1
|
||||
@ -100,7 +158,7 @@ def fetch_channel(ucid, client, db, pull_all_videos = true)
|
||||
end
|
||||
|
||||
count = nodeset.size
|
||||
videos = videos.map { |video| ChannelVideo.new(video.id, video.title, video.published, Time.now, video.ucid, video.author) }
|
||||
videos = videos.map { |video| ChannelVideo.new(video.id, video.title, video.published, Time.now, video.ucid, video.author, video.length_seconds) }
|
||||
|
||||
videos.each do |video|
|
||||
ids << video.id
|
||||
@ -112,8 +170,9 @@ def fetch_channel(ucid, client, db, pull_all_videos = true)
|
||||
|
||||
video_array = video.to_a
|
||||
args = arg_array(video_array)
|
||||
|
||||
db.exec("INSERT INTO channel_videos VALUES (#{args}) ON CONFLICT (id) DO UPDATE SET title = $2, \
|
||||
published = $3, updated = $4, ucid = $5, author = $6", video_array)
|
||||
published = $3, updated = $4, ucid = $5, author = $6, length_seconds = $7", video_array)
|
||||
end
|
||||
end
|
||||
|
||||
@ -133,16 +192,16 @@ def fetch_channel(ucid, client, db, pull_all_videos = true)
|
||||
return channel
|
||||
end
|
||||
|
||||
def produce_channel_videos_url(ucid, page = 1, auto_generated = nil)
|
||||
def produce_channel_videos_url(ucid, page = 1, auto_generated = nil, sort_by = "newest")
|
||||
if auto_generated
|
||||
seed = Time.epoch(1525757349)
|
||||
seed = Time.unix(1525757349)
|
||||
|
||||
until seed >= Time.now
|
||||
seed += 1.month
|
||||
end
|
||||
timestamp = seed - (page - 1).months
|
||||
|
||||
page = "#{timestamp.epoch}"
|
||||
page = "#{timestamp.to_unix}"
|
||||
switch = "\x36"
|
||||
else
|
||||
page = "#{page}"
|
||||
@ -160,6 +219,16 @@ def produce_channel_videos_url(ucid, page = 1, auto_generated = nil)
|
||||
meta += page.size.to_u8.unsafe_chr
|
||||
meta += page
|
||||
|
||||
case sort_by
|
||||
when "newest"
|
||||
# Empty tags can be omitted
|
||||
# meta += "\x18\x00"
|
||||
when "popular"
|
||||
meta += "\x18\x01"
|
||||
when "oldest"
|
||||
meta += "\x18\x02"
|
||||
end
|
||||
|
||||
meta = Base64.urlsafe_encode(meta)
|
||||
meta = URI.escape(meta)
|
||||
|
||||
@ -176,27 +245,41 @@ def produce_channel_videos_url(ucid, page = 1, auto_generated = nil)
|
||||
continuation = Base64.urlsafe_encode(continuation)
|
||||
continuation = URI.escape(continuation)
|
||||
|
||||
url = "/browse_ajax?continuation=#{continuation}"
|
||||
url = "/browse_ajax?continuation=#{continuation}&gl=US&hl=en"
|
||||
|
||||
return url
|
||||
end
|
||||
|
||||
def get_about_info(ucid)
|
||||
def get_about_info(ucid, locale)
|
||||
client = make_client(YT_URL)
|
||||
|
||||
about = client.get("/user/#{ucid}/about?disable_polymer=1")
|
||||
about = client.get("/channel/#{ucid}/about?disable_polymer=1&gl=US&hl=en")
|
||||
if about.status_code == 404
|
||||
about = client.get("/user/#{ucid}/about?disable_polymer=1&gl=US&hl=en")
|
||||
end
|
||||
|
||||
about = XML.parse_html(about.body)
|
||||
|
||||
if !about.xpath_node(%q(//span[@class="qualified-channel-title-text"]/a))
|
||||
about = client.get("/channel/#{ucid}/about?disable_polymer=1")
|
||||
about = XML.parse_html(about.body)
|
||||
if about.xpath_node(%q(//div[contains(@class, "channel-empty-message")]))
|
||||
error_message = translate(locale, "This channel does not exist.")
|
||||
|
||||
raise error_message
|
||||
end
|
||||
|
||||
if !about.xpath_node(%q(//span[@class="qualified-channel-title-text"]/a))
|
||||
raise "User does not exist."
|
||||
if about.xpath_node(%q(//span[contains(@class,"qualified-channel-title-text")]/a)).try &.content.empty?
|
||||
error_message = about.xpath_node(%q(//div[@class="yt-alert-content"])).try &.content.strip
|
||||
error_message ||= translate(locale, "Could not get channel info.")
|
||||
|
||||
raise error_message
|
||||
end
|
||||
|
||||
author = about.xpath_node(%q(//span[@class="qualified-channel-title-text"]/a)).not_nil!.content
|
||||
sub_count = about.xpath_node(%q(//span[contains(text(), "subscribers")]))
|
||||
if sub_count
|
||||
sub_count = sub_count.content.delete(", subscribers").to_i?
|
||||
end
|
||||
sub_count ||= 0
|
||||
|
||||
author = about.xpath_node(%q(//span[contains(@class,"qualified-channel-title-text")]/a)).not_nil!.content
|
||||
ucid = about.xpath_node(%q(//link[@rel="canonical"])).not_nil!["href"].split("/")[-1]
|
||||
|
||||
# Auto-generated channels
|
||||
@ -207,5 +290,37 @@ def get_about_info(ucid)
|
||||
auto_generated = true
|
||||
end
|
||||
|
||||
return {author, ucid, auto_generated}
|
||||
return {author, ucid, auto_generated, sub_count}
|
||||
end
|
||||
|
||||
def get_60_videos(ucid, page, auto_generated, sort_by = "newest")
|
||||
count = 0
|
||||
videos = [] of SearchVideo
|
||||
|
||||
client = make_client(YT_URL)
|
||||
|
||||
2.times do |i|
|
||||
url = produce_channel_videos_url(ucid, page * 2 + (i - 1), auto_generated: auto_generated, sort_by: sort_by)
|
||||
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")]))
|
||||
|
||||
if !json["load_more_widget_html"]?.try &.as_s.empty?
|
||||
count += 30
|
||||
end
|
||||
|
||||
if auto_generated
|
||||
videos += extract_videos(nodeset)
|
||||
else
|
||||
videos += extract_videos(nodeset, ucid)
|
||||
end
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
return videos, count
|
||||
end
|
||||
|
@ -8,11 +8,11 @@ end
|
||||
class RedditComment
|
||||
module TimeConverter
|
||||
def self.from_json(value : JSON::PullParser) : Time
|
||||
Time.epoch(value.read_float.to_i)
|
||||
Time.unix(value.read_float.to_i)
|
||||
end
|
||||
|
||||
def self.to_json(value : Time, json : JSON::Builder)
|
||||
json.number(value.epoch)
|
||||
json.number(value.to_unix)
|
||||
end
|
||||
end
|
||||
|
||||
@ -56,7 +56,222 @@ class RedditListing
|
||||
})
|
||||
end
|
||||
|
||||
def get_reddit_comments(id, client, headers)
|
||||
def fetch_youtube_comments(id, continuation, proxies, format, locale)
|
||||
client = make_client(YT_URL)
|
||||
html = client.get("/watch?v=#{id}&gl=US&hl=en&disable_polymer=1&has_verified=1&bpctr=9999999999")
|
||||
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"]
|
||||
itct = body.match(/itct=(?<itct>[^"]+)"/).not_nil!["itct"]
|
||||
ctoken = body.match(/'COMMENTS_TOKEN': "(?<ctoken>[^"]+)"/)
|
||||
|
||||
if body.match(/<meta itemprop="regionsAllowed" content="">/)
|
||||
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"
|
||||
return {"comments" => [] of String}.to_json
|
||||
else
|
||||
return {"contentHtml" => "", "commentCount" => 0}.to_json
|
||||
end
|
||||
end
|
||||
ctoken = ctoken["ctoken"]
|
||||
|
||||
if !continuation.empty?
|
||||
ctoken = continuation
|
||||
else
|
||||
continuation = ctoken
|
||||
end
|
||||
|
||||
post_req = {
|
||||
"session_token" => session_token,
|
||||
}
|
||||
post_req = HTTP::Params.encode(post_req)
|
||||
|
||||
headers["content-type"] = "application/x-www-form-urlencoded"
|
||||
|
||||
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-referer"] = "https://www.youtube.com/watch?v=#{id}&gl=US&hl=en&disable_polymer=1&has_verified=1&bpctr=9999999999"
|
||||
|
||||
headers["x-youtube-client-name"] = "1"
|
||||
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 = JSON.parse(response.body)
|
||||
|
||||
if !response["response"]["continuationContents"]?
|
||||
raise translate(locale, "Could not fetch comments")
|
||||
end
|
||||
|
||||
response = response["response"]["continuationContents"]
|
||||
if response["commentRepliesContinuation"]?
|
||||
body = response["commentRepliesContinuation"]
|
||||
else
|
||||
body = response["itemSectionContinuation"]
|
||||
end
|
||||
|
||||
contents = body["contents"]?
|
||||
if !contents
|
||||
if format == "json"
|
||||
return {"comments" => [] of String}.to_json
|
||||
else
|
||||
return {"contentHtml" => "", "commentCount" => 0}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
comments = JSON.build do |json|
|
||||
json.object do
|
||||
if body["header"]?
|
||||
comment_count = body["header"]["commentsHeaderRenderer"]["countText"]["simpleText"].as_s.delete("Comments,").to_i
|
||||
json.field "commentCount", comment_count
|
||||
end
|
||||
|
||||
json.field "comments" do
|
||||
json.array do
|
||||
contents.as_a.each do |node|
|
||||
json.object do
|
||||
if !response["commentRepliesContinuation"]?
|
||||
node = node["commentThreadRenderer"]
|
||||
end
|
||||
|
||||
if node["replies"]?
|
||||
node_replies = node["replies"]["commentRepliesRenderer"]
|
||||
end
|
||||
|
||||
if !response["commentRepliesContinuation"]?
|
||||
node_comment = node["comment"]["commentRenderer"]
|
||||
else
|
||||
node_comment = node["commentRenderer"]
|
||||
end
|
||||
|
||||
content_html = node_comment["contentText"]["simpleText"]?.try &.as_s.rchop('\ufeff')
|
||||
if content_html
|
||||
content_html = HTML.escape(content_html)
|
||||
end
|
||||
|
||||
content_html ||= content_to_comment_html(node_comment["contentText"]["runs"].as_a)
|
||||
content_html, content = html_to_content(content_html)
|
||||
|
||||
author = node_comment["authorText"]?.try &.["simpleText"]
|
||||
author ||= ""
|
||||
|
||||
json.field "author", author
|
||||
json.field "authorThumbnails" do
|
||||
json.array do
|
||||
node_comment["authorThumbnail"]["thumbnails"].as_a.each do |thumbnail|
|
||||
json.object do
|
||||
json.field "url", thumbnail["url"]
|
||||
json.field "width", thumbnail["width"]
|
||||
json.field "height", thumbnail["height"]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if node_comment["authorEndpoint"]?
|
||||
json.field "authorId", node_comment["authorEndpoint"]["browseEndpoint"]["browseId"]
|
||||
json.field "authorUrl", node_comment["authorEndpoint"]["browseEndpoint"]["canonicalBaseUrl"]
|
||||
else
|
||||
json.field "authorId", ""
|
||||
json.field "authorUrl", ""
|
||||
end
|
||||
|
||||
published = decode_date(node_comment["publishedTimeText"]["runs"][0]["text"].as_s.rchop(" (edited)"))
|
||||
|
||||
json.field "content", content
|
||||
json.field "contentHtml", content_html
|
||||
json.field "published", published.to_unix
|
||||
json.field "publishedText", translate(locale, "`x` ago", recode_date(published))
|
||||
json.field "likeCount", node_comment["likeCount"]
|
||||
json.field "commentId", node_comment["commentId"]
|
||||
|
||||
if node_replies && !response["commentRepliesContinuation"]?
|
||||
reply_count = node_replies["moreText"]["simpleText"].as_s.delete("View all reply replies,")
|
||||
if reply_count.empty?
|
||||
reply_count = 1
|
||||
else
|
||||
reply_count = reply_count.try &.to_i?
|
||||
reply_count ||= 1
|
||||
end
|
||||
|
||||
continuation = node_replies["continuations"].as_a[0]["nextContinuationData"]["continuation"].as_s
|
||||
|
||||
json.field "replies" do
|
||||
json.object do
|
||||
json.field "replyCount", reply_count
|
||||
json.field "continuation", continuation
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if body["continuations"]?
|
||||
continuation = body["continuations"][0]["nextContinuationData"]["continuation"]
|
||||
json.field "continuation", continuation
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if format == "html"
|
||||
comments = JSON.parse(comments)
|
||||
content_html = template_youtube_comments(comments, locale)
|
||||
|
||||
comments = JSON.build do |json|
|
||||
json.object do
|
||||
json.field "contentHtml", content_html
|
||||
|
||||
if comments["commentCount"]?
|
||||
json.field "commentCount", comments["commentCount"]
|
||||
else
|
||||
json.field "commentCount", 0
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return comments
|
||||
end
|
||||
|
||||
def fetch_reddit_comments(id)
|
||||
client = make_client(REDDIT_URL)
|
||||
headers = HTTP::Headers{"User-Agent" => "web:invidio.us:v0.12.0 (by /u/omarroth)"}
|
||||
|
||||
query = "(url:3D#{id}%20OR%20url:#{id})%20(site:youtube.com%20OR%20site:youtu.be)"
|
||||
search_results = client.get("/search.json?q=#{query}", headers)
|
||||
|
||||
@ -81,7 +296,7 @@ def get_reddit_comments(id, client, headers)
|
||||
return comments, thread
|
||||
end
|
||||
|
||||
def template_youtube_comments(comments)
|
||||
def template_youtube_comments(comments, locale)
|
||||
html = ""
|
||||
|
||||
root = comments["comments"].as_a
|
||||
@ -93,7 +308,7 @@ def template_youtube_comments(comments)
|
||||
<div class="pure-u-23-24">
|
||||
<p>
|
||||
<a href="javascript:void(0)" data-continuation="#{child["replies"]["continuation"]}"
|
||||
onclick="get_youtube_replies(this)">View #{child["replies"]["replyCount"]} replies</a>
|
||||
onclick="get_youtube_replies(this)">#{translate(locale, "View `x` replies", child["replies"]["replyCount"].to_s)}</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -104,21 +319,21 @@ def template_youtube_comments(comments)
|
||||
|
||||
html += <<-END_HTML
|
||||
<div class="pure-g">
|
||||
<div class="pure-u-2-24">
|
||||
<div class="pure-u-4-24 pure-u-md-2-24">
|
||||
<img style="width:90%; padding-right:1em; padding-top:1em;" src="#{author_thumbnail}">
|
||||
</div>
|
||||
<div class="pure-u-22-24">
|
||||
<div class="pure-u-20-24 pure-u-md-22-24">
|
||||
<p>
|
||||
<a href="javascript:void(0)" onclick="toggle(this)">[ - ]</a>
|
||||
<i class="icon ion-ios-thumbs-up"></i> #{child["likeCount"]}
|
||||
<b><a href="#{child["authorUrl"]}">#{child["author"]}</a></b>
|
||||
- #{recode_date(Time.epoch(child["published"].as_i64))} ago
|
||||
</p>
|
||||
<div>
|
||||
<b>
|
||||
<a href="#{child["authorUrl"]}">#{child["author"]}</a>
|
||||
</b>
|
||||
<p style="white-space:pre-wrap">#{child["contentHtml"]}</p>
|
||||
#{replies_html}
|
||||
</div>
|
||||
</div>
|
||||
#{translate(locale, "`x` ago", recode_date(Time.unix(child["published"].as_i64)))}
|
||||
|
|
||||
<i class="icon ion-ios-thumbs-up"></i> #{number_with_separator(child["likeCount"])}
|
||||
</p>
|
||||
#{replies_html}
|
||||
</div>
|
||||
</div>
|
||||
END_HTML
|
||||
end
|
||||
@ -129,7 +344,7 @@ def template_youtube_comments(comments)
|
||||
<div class="pure-u-1">
|
||||
<p>
|
||||
<a href="javascript:void(0)" data-continuation="#{comments["continuation"]}"
|
||||
onclick="get_youtube_replies(this)">Load more</a>
|
||||
onclick="get_youtube_replies(this, true)">#{translate(locale, "Load more")}</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -139,7 +354,7 @@ def template_youtube_comments(comments)
|
||||
return html
|
||||
end
|
||||
|
||||
def template_reddit_comments(root)
|
||||
def template_reddit_comments(root, locale)
|
||||
html = ""
|
||||
root.each do |child|
|
||||
if child.data.is_a?(RedditComment)
|
||||
@ -151,15 +366,15 @@ def template_reddit_comments(root)
|
||||
replies_html = ""
|
||||
if child.replies.is_a?(RedditThing)
|
||||
replies = child.replies.as(RedditThing)
|
||||
replies_html = template_reddit_comments(replies.data.as(RedditListing).children)
|
||||
replies_html = template_reddit_comments(replies.data.as(RedditListing).children, locale)
|
||||
end
|
||||
|
||||
content = <<-END_HTML
|
||||
<p>
|
||||
<a href="javascript:void(0)" onclick="toggle(this)">[ - ]</a>
|
||||
<i class="icon ion-ios-thumbs-up"></i> #{score}
|
||||
<a href="javascript:void(0)" onclick="toggle_parent(this)">[ - ]</a>
|
||||
<b><a href="https://www.reddit.com/user/#{author}">#{author}</a></b>
|
||||
- #{recode_date(child.created_utc)} ago
|
||||
#{translate(locale, "`x` points", number_with_separator(score))}
|
||||
#{translate(locale, "`x` ago", recode_date(child.created_utc))}
|
||||
</p>
|
||||
<div>
|
||||
#{body_html}
|
||||
@ -260,8 +475,7 @@ def content_to_comment_html(content)
|
||||
end
|
||||
|
||||
if run["navigationEndpoint"]?
|
||||
url = run["navigationEndpoint"]["urlEndpoint"]?.try &.["url"].as_s
|
||||
if url
|
||||
if url = run["navigationEndpoint"]["urlEndpoint"]?.try &.["url"].as_s
|
||||
url = URI.parse(url)
|
||||
|
||||
if !url.host || {"m.youtube.com", "www.youtube.com", "youtu.be"}.includes? url.host
|
||||
@ -271,11 +485,16 @@ def content_to_comment_html(content)
|
||||
url = url.full_path
|
||||
end
|
||||
end
|
||||
else
|
||||
url = run["navigationEndpoint"]["commandMetadata"]?.try &.["webCommandMetadata"]["url"].as_s
|
||||
end
|
||||
|
||||
text = %(<a href="#{url}">#{text}</a>)
|
||||
text = %(<a href="#{url}">#{text}</a>)
|
||||
elsif watch_endpoint = run["navigationEndpoint"]["watchEndpoint"]?
|
||||
length_seconds = watch_endpoint["startTimeSeconds"].as_i
|
||||
video_id = watch_endpoint["videoId"].as_s
|
||||
|
||||
text = %(<a href="javascript:void(0)" onclick="player.currentTime(#{length_seconds})">#{text}</a>)
|
||||
elsif url = run["navigationEndpoint"]["commandMetadata"]?.try &.["webCommandMetadata"]["url"].as_s
|
||||
text = %(<a href="#{url}">#{text}</a>)
|
||||
end
|
||||
end
|
||||
|
||||
text
|
||||
|
@ -2,6 +2,7 @@ class Config
|
||||
YAML.mapping({
|
||||
crawl_threads: Int32,
|
||||
channel_threads: Int32,
|
||||
feed_threads: Int32,
|
||||
video_threads: Int32,
|
||||
db: NamedTuple(
|
||||
user: String,
|
||||
@ -14,6 +15,7 @@ class Config
|
||||
https_only: Bool?,
|
||||
hmac_key: String?,
|
||||
full_refresh: Bool,
|
||||
domain: String?,
|
||||
})
|
||||
end
|
||||
|
||||
@ -127,55 +129,6 @@ def login_req(login_form, f_req)
|
||||
return HTTP::Params.encode(data)
|
||||
end
|
||||
|
||||
def generate_captcha(key)
|
||||
minute = Random::Secure.rand(12)
|
||||
minute_angle = minute * 30
|
||||
minute = minute * 5
|
||||
|
||||
hour = Random::Secure.rand(12)
|
||||
hour_angle = hour * 30 + minute_angle.to_f / 12
|
||||
if hour == 0
|
||||
hour = 12
|
||||
end
|
||||
|
||||
clock_svg = <<-END_SVG
|
||||
<svg viewBox="0 0 100 100" width="200px">
|
||||
<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="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="82.909" y="72" text-anchor="middle" fill="black" font-family="Arial" font-size="10px"> 4</text>
|
||||
<text x="69" y="85.909" text-anchor="middle" fill="black" font-family="Arial" font-size="10px"> 5</text>
|
||||
<text x="50" y="91" text-anchor="middle" fill="black" font-family="Arial" font-size="10px"> 6</text>
|
||||
<text x="31" y="85.909" text-anchor="middle" fill="black" font-family="Arial" font-size="10px"> 7</text>
|
||||
<text x="17.091" y="72" text-anchor="middle" fill="black" font-family="Arial" font-size="10px"> 8</text>
|
||||
<text x="12" y="53" text-anchor="middle" fill="black" font-family="Arial" font-size="10px"> 9</text>
|
||||
<text x="17.091" y="34" text-anchor="middle" fill="black" font-family="Arial" font-size="10px">10</text>
|
||||
<text x="31" y="20.091" text-anchor="middle" fill="black" font-family="Arial" font-size="10px">11</text>
|
||||
<text x="50" y="15" text-anchor="middle" fill="black" font-family="Arial" font-size="10px">12</text>
|
||||
|
||||
<circle cx="50" cy="50" r="3" fill="black"></circle>
|
||||
<line id="minute" transform="rotate(#{minute_angle}, 50, 50)" x1="50" y1="50" x2="50" y2="16" fill="black" stroke="black" stroke-width="2"></line>
|
||||
<line id="hour" transform="rotate(#{hour_angle}, 50, 50)" x1="50" y1="50" x2="50" y2="24" fill="black" stroke="black" stroke-width="2"></line>
|
||||
</svg>
|
||||
END_SVG
|
||||
|
||||
challenge = ""
|
||||
convert = Process.run(%(convert -density 1200 -resize 400x400 -background none svg:- png:-), shell: true,
|
||||
input: IO::Memory.new(clock_svg), output: Process::Redirect::Pipe) do |proc|
|
||||
challenge = proc.output.gets_to_end
|
||||
challenge = Base64.strict_encode(challenge)
|
||||
challenge = "data:image/png;base64,#{challenge}"
|
||||
end
|
||||
|
||||
answer = "#{hour}:#{minute.to_s.rjust(2, '0')}"
|
||||
token = OpenSSL::HMAC.digest(:sha256, key, answer)
|
||||
token = Base64.urlsafe_encode(token)
|
||||
|
||||
return {challenge: challenge, token: token}
|
||||
end
|
||||
|
||||
def html_to_content(description_html)
|
||||
if !description_html
|
||||
description = ""
|
||||
@ -296,7 +249,9 @@ def extract_items(nodeset, ucid = nil)
|
||||
)
|
||||
when .includes? "yt-lockup-channel"
|
||||
author = title.strip
|
||||
ucid = id.split("/")[-1]
|
||||
|
||||
ucid = node.xpath_node(%q(.//button[contains(@class, "yt-uix-subscription-button")])).try &.["data-channel-external-id"]?
|
||||
ucid ||= id.split("/")[-1]
|
||||
|
||||
author_thumbnail = node.xpath_node(%q(.//div/span/img)).try &.["data-thumb"]?
|
||||
author_thumbnail ||= node.xpath_node(%q(.//div/span/img)).try &.["src"]
|
||||
@ -309,13 +264,13 @@ def extract_items(nodeset, ucid = nil)
|
||||
video_count ||= 0
|
||||
|
||||
items << SearchChannel.new(
|
||||
author,
|
||||
ucid,
|
||||
author_thumbnail,
|
||||
subscriber_count,
|
||||
video_count,
|
||||
description,
|
||||
description_html
|
||||
author: author,
|
||||
ucid: ucid,
|
||||
author_thumbnail: author_thumbnail,
|
||||
subscriber_count: subscriber_count,
|
||||
video_count: video_count,
|
||||
description: description,
|
||||
description_html: description_html
|
||||
)
|
||||
else
|
||||
id = id.lchop("/watch?v=")
|
||||
@ -327,7 +282,7 @@ def extract_items(nodeset, ucid = nil)
|
||||
rescue ex
|
||||
end
|
||||
begin
|
||||
published ||= Time.epoch(metadata[0].xpath_node(%q(.//span)).not_nil!["data-timestamp"].to_i64)
|
||||
published ||= Time.unix(metadata[0].xpath_node(%q(.//span)).not_nil!["data-timestamp"].to_i64)
|
||||
rescue ex
|
||||
end
|
||||
published ||= Time.now
|
||||
@ -356,17 +311,31 @@ def extract_items(nodeset, ucid = nil)
|
||||
live_now = false
|
||||
end
|
||||
|
||||
if node.xpath_node(%q(.//span[text()="Premium"]))
|
||||
premium = true
|
||||
else
|
||||
premium = false
|
||||
end
|
||||
|
||||
if !premium || node.xpath_node(%q(.//span[contains(text(), "Free episode")]))
|
||||
paid = false
|
||||
else
|
||||
paid = true
|
||||
end
|
||||
|
||||
items << SearchVideo.new(
|
||||
title,
|
||||
id,
|
||||
author,
|
||||
author_id,
|
||||
published,
|
||||
view_count,
|
||||
description,
|
||||
description_html,
|
||||
length_seconds,
|
||||
live_now
|
||||
title: title,
|
||||
id: id,
|
||||
author: author,
|
||||
ucid: author_id,
|
||||
published: published,
|
||||
views: view_count,
|
||||
description: description,
|
||||
description_html: description_html,
|
||||
length_seconds: length_seconds,
|
||||
live_now: live_now,
|
||||
paid: paid,
|
||||
premium: premium
|
||||
)
|
||||
end
|
||||
end
|
||||
|
19
src/invidious/helpers/i18n.cr
Normal file
@ -0,0 +1,19 @@
|
||||
def load_locale(name)
|
||||
return JSON.parse(File.read("locales/#{name}.json")).as_h
|
||||
end
|
||||
|
||||
def translate(locale : Hash(String, JSON::Any) | Nil, translation : String, text : String | Nil = nil)
|
||||
# if locale && !locale[translation]?
|
||||
# puts "Could not find translation for #{translation.dump}"
|
||||
# end
|
||||
|
||||
if locale && locale[translation]? && !locale[translation].as_s.empty?
|
||||
translation = locale[translation].as_s
|
||||
end
|
||||
|
||||
if text
|
||||
translation = translation.gsub("`x`", text)
|
||||
end
|
||||
|
||||
return translation
|
||||
end
|
@ -18,16 +18,28 @@ def elapsed_text(elapsed)
|
||||
"#{(millis * 1000).round(2)}µs"
|
||||
end
|
||||
|
||||
def make_client(url)
|
||||
def make_client(url, proxies = {} of String => Array({ip: String, port: Int32}), region = nil)
|
||||
context = OpenSSL::SSL::Context::Client.new
|
||||
context.add_options(
|
||||
OpenSSL::SSL::Options::ALL |
|
||||
OpenSSL::SSL::Options::NO_SSL_V2 |
|
||||
OpenSSL::SSL::Options::NO_SSL_V3
|
||||
)
|
||||
client = HTTP::Client.new(url, context)
|
||||
client = HTTPClient.new(url, context)
|
||||
client.read_timeout = 10.seconds
|
||||
client.connect_timeout = 10.seconds
|
||||
|
||||
if region
|
||||
proxies[region]?.try &.sample(40).each do |proxy|
|
||||
begin
|
||||
proxy = HTTPProxy.new(proxy_host: proxy[:ip], proxy_port: proxy[:port])
|
||||
client.set_proxy(proxy)
|
||||
break
|
||||
rescue ex
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return client
|
||||
end
|
||||
|
||||
@ -40,6 +52,23 @@ def decode_length_seconds(string)
|
||||
return length_seconds
|
||||
end
|
||||
|
||||
def recode_length_seconds(time)
|
||||
if time <= 0
|
||||
return ""
|
||||
else
|
||||
time = time.seconds
|
||||
text = "#{time.minutes.to_s.rjust(2, '0')}:#{time.seconds.to_s.rjust(2, '0')}"
|
||||
|
||||
if time.hours > 0
|
||||
text = "#{time.hours.to_s.rjust(2, '0')}:#{text}"
|
||||
end
|
||||
|
||||
text = text.lchop('0')
|
||||
|
||||
return text
|
||||
end
|
||||
end
|
||||
|
||||
def decode_time(string)
|
||||
time = string.try &.to_f?
|
||||
|
||||
@ -138,6 +167,25 @@ def number_with_separator(number)
|
||||
number.to_s.reverse.gsub(/(\d{3})(?=\d)/, "\\1,").reverse
|
||||
end
|
||||
|
||||
def number_to_short_text(number)
|
||||
seperated = number_with_separator(number).gsub(",", ".").split("")
|
||||
text = seperated.first(2).join
|
||||
|
||||
if seperated[2]? && seperated[2] != "."
|
||||
text += seperated[2]
|
||||
end
|
||||
|
||||
text = text.rchop(".0")
|
||||
|
||||
if number / 1000000 != 0
|
||||
text += "M"
|
||||
elsif number / 1000 != 0
|
||||
text += "K"
|
||||
end
|
||||
|
||||
text
|
||||
end
|
||||
|
||||
def arg_array(array, start = 1)
|
||||
if array.size == 0
|
||||
args = "NULL"
|
||||
@ -238,3 +286,9 @@ def write_var_int(value : Int)
|
||||
|
||||
return bytes
|
||||
end
|
||||
|
||||
def sha256(text)
|
||||
digest = OpenSSL::Digest.new("SHA256")
|
||||
digest << text
|
||||
return digest.hexdigest
|
||||
end
|
||||
|
@ -71,7 +71,7 @@ def refresh_channels(db, max_threads = 1, full_refresh = false)
|
||||
client = make_client(YT_URL)
|
||||
channel = fetch_channel(id, client, db, full_refresh)
|
||||
|
||||
db.exec("UPDATE channels SET updated = $1 WHERE id = $2", Time.now, id)
|
||||
db.exec("UPDATE channels SET updated = $1, author = $2 WHERE id = $3", Time.now, channel.author, id)
|
||||
rescue ex
|
||||
STDOUT << id << " : " << ex.message << "\n"
|
||||
end
|
||||
@ -104,6 +104,44 @@ def refresh_videos(db)
|
||||
end
|
||||
end
|
||||
|
||||
def refresh_feeds(db, max_threads = 1)
|
||||
max_channel = Channel(Int32).new
|
||||
|
||||
spawn do
|
||||
max_threads = max_channel.receive
|
||||
active_threads = 0
|
||||
active_channel = Channel(Bool).new
|
||||
|
||||
loop do
|
||||
db.query("SELECT email FROM users") do |rs|
|
||||
rs.each do
|
||||
email = rs.read(String)
|
||||
view_name = "subscriptions_#{sha256(email)[0..7]}"
|
||||
|
||||
if active_threads >= max_threads
|
||||
if active_channel.receive
|
||||
active_threads -= 1
|
||||
end
|
||||
end
|
||||
|
||||
active_threads += 1
|
||||
spawn do
|
||||
begin
|
||||
db.exec("REFRESH MATERIALIZED VIEW #{view_name}")
|
||||
rescue ex
|
||||
STDOUT << "REFRESH " << email << " : " << ex.message << "\n"
|
||||
end
|
||||
|
||||
active_channel.send(true)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
max_channel.send(max_threads)
|
||||
end
|
||||
|
||||
def pull_top_videos(config, db)
|
||||
if config.dl_api_key
|
||||
DetectLanguage.configure do |dl_config|
|
||||
@ -142,6 +180,21 @@ def pull_top_videos(config, db)
|
||||
end
|
||||
end
|
||||
|
||||
def pull_popular_videos(db)
|
||||
loop do
|
||||
subscriptions = PG_DB.query_all("SELECT channel FROM \
|
||||
(SELECT UNNEST(subscriptions) AS channel FROM users) AS d \
|
||||
GROUP BY channel ORDER BY COUNT(channel) DESC LIMIT 40", as: String)
|
||||
|
||||
videos = PG_DB.query_all("SELECT DISTINCT ON (ucid) * FROM \
|
||||
channel_videos WHERE ucid IN (#{arg_array(subscriptions)}) \
|
||||
ORDER BY ucid, published DESC", subscriptions, as: ChannelVideo).sort_by { |video| video.published }.reverse
|
||||
|
||||
yield videos
|
||||
Fiber.yield
|
||||
end
|
||||
end
|
||||
|
||||
def update_decrypt_function
|
||||
loop do
|
||||
begin
|
||||
@ -151,44 +204,18 @@ def update_decrypt_function
|
||||
end
|
||||
|
||||
yield decrypt_function
|
||||
Fiber.yield
|
||||
end
|
||||
end
|
||||
|
||||
def find_working_proxies(regions)
|
||||
proxy_channel = Channel({String, Array({ip: String, port: Int32})}).new
|
||||
loop do
|
||||
regions.each do |region|
|
||||
proxies = get_proxies(region).first(20)
|
||||
proxies = proxies.map { |proxy| {ip: proxy[:ip], port: proxy[:port]} }
|
||||
# proxies = filter_proxies(proxies)
|
||||
|
||||
regions.each do |region|
|
||||
spawn do
|
||||
loop do
|
||||
begin
|
||||
proxies = get_proxies(region).first(20)
|
||||
rescue ex
|
||||
next proxy_channel.send({region, Array({ip: String, port: Int32}).new})
|
||||
end
|
||||
|
||||
proxies.select! do |proxy|
|
||||
begin
|
||||
client = HTTPClient.new(YT_URL)
|
||||
client.read_timeout = 10.seconds
|
||||
client.connect_timeout = 10.seconds
|
||||
|
||||
proxy = HTTPProxy.new(proxy_host: proxy[:ip], proxy_port: proxy[:port])
|
||||
client.set_proxy(proxy)
|
||||
|
||||
client.get("/").status_code == 200
|
||||
rescue ex
|
||||
false
|
||||
end
|
||||
end
|
||||
proxies = proxies.map { |proxy| {ip: proxy[:ip], port: proxy[:port]} }
|
||||
|
||||
proxy_channel.send({region, proxies})
|
||||
end
|
||||
yield region, proxies
|
||||
Fiber.yield
|
||||
end
|
||||
end
|
||||
|
||||
loop do
|
||||
yield proxy_channel.receive
|
||||
end
|
||||
end
|
||||
|
@ -6,6 +6,7 @@ class MixVideo
|
||||
ucid: String,
|
||||
length_seconds: Int32,
|
||||
index: Int32,
|
||||
mixes: Array(String),
|
||||
})
|
||||
end
|
||||
|
||||
@ -17,7 +18,7 @@ class Mix
|
||||
})
|
||||
end
|
||||
|
||||
def fetch_mix(rdid, video_id, cookies = nil)
|
||||
def fetch_mix(rdid, video_id, cookies = nil, locale = nil)
|
||||
client = make_client(YT_URL)
|
||||
headers = HTTP::Headers.new
|
||||
headers["User-Agent"] = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"
|
||||
@ -25,13 +26,17 @@ def fetch_mix(rdid, video_id, cookies = nil)
|
||||
if cookies
|
||||
headers = cookies.add_request_headers(headers)
|
||||
end
|
||||
response = client.get("/watch?v=#{video_id}&list=#{rdid}&bpctr=#{Time.new.epoch + 2000}&gl=US&hl=en", headers)
|
||||
response = client.get("/watch?v=#{video_id}&list=#{rdid}&gl=US&hl=en&has_verified=1&bpctr=9999999999", headers)
|
||||
|
||||
yt_data = response.body.match(/window\["ytInitialData"\] = (?<data>.*);/)
|
||||
if yt_data
|
||||
yt_data = JSON.parse(yt_data["data"].rchop(";"))
|
||||
else
|
||||
raise "Could not create mix."
|
||||
raise translate(locale, "Could not create mix.")
|
||||
end
|
||||
|
||||
if !yt_data["contents"]["twoColumnWatchNextResults"]["playlist"]?
|
||||
raise translate(locale, "Could not create mix.")
|
||||
end
|
||||
|
||||
playlist = yt_data["contents"]["twoColumnWatchNextResults"]["playlist"]["playlist"]
|
||||
@ -59,12 +64,13 @@ def fetch_mix(rdid, video_id, cookies = nil)
|
||||
author,
|
||||
ucid,
|
||||
length_seconds,
|
||||
index
|
||||
index,
|
||||
[rdid]
|
||||
)
|
||||
end
|
||||
|
||||
if !cookies
|
||||
next_page = fetch_mix(rdid, videos[-1].id, response.cookies)
|
||||
next_page = fetch_mix(rdid, videos[-1].id, response.cookies, locale)
|
||||
videos += next_page.videos
|
||||
end
|
||||
|
||||
@ -72,3 +78,37 @@ def fetch_mix(rdid, video_id, cookies = nil)
|
||||
videos = videos.first(50)
|
||||
return Mix.new(mix_title, rdid, videos)
|
||||
end
|
||||
|
||||
def template_mix(mix)
|
||||
html = <<-END_HTML
|
||||
<h3>
|
||||
<a href="/mix?list=#{mix["mixId"]}">
|
||||
#{mix["title"]}
|
||||
</a>
|
||||
</h3>
|
||||
<div class="pure-menu pure-menu-scrollable playlist-restricted">
|
||||
<ol class="pure-menu-list">
|
||||
END_HTML
|
||||
|
||||
mix["videos"].as_a.each do |video|
|
||||
html += <<-END_HTML
|
||||
<li class="pure-menu-item">
|
||||
<a href="/watch?v=#{video["videoId"]}&list=#{mix["mixId"]}">
|
||||
<img style="width:100%;" src="/vi/#{video["videoId"]}/mqdefault.jpg">
|
||||
<p style="width:100%">#{video["title"]}</p>
|
||||
<p>
|
||||
<b style="width: 100%">#{video["author"]}</b>
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
END_HTML
|
||||
end
|
||||
|
||||
html += <<-END_HTML
|
||||
</ol>
|
||||
</div>
|
||||
<hr>
|
||||
END_HTML
|
||||
|
||||
html
|
||||
end
|
||||
|
@ -26,17 +26,29 @@ class Playlist
|
||||
})
|
||||
end
|
||||
|
||||
def fetch_playlist_videos(plid, page, video_count)
|
||||
def fetch_playlist_videos(plid, page, video_count, continuation = nil, locale = nil)
|
||||
client = make_client(YT_URL)
|
||||
|
||||
if video_count > 100
|
||||
if continuation
|
||||
html = client.get("/watch?v=#{continuation}&list=#{plid}&gl=US&hl=en&disable_polymer=1&has_verified=1&bpctr=9999999999")
|
||||
html = XML.parse_html(html.body)
|
||||
|
||||
index = html.xpath_node(%q(//span[@id="playlist-current-index"])).try &.content.to_i?
|
||||
if index
|
||||
index -= 1
|
||||
end
|
||||
index ||= 0
|
||||
else
|
||||
index = (page - 1) * 100
|
||||
end
|
||||
|
||||
if video_count > 100
|
||||
url = produce_playlist_url(plid, index)
|
||||
|
||||
response = client.get(url)
|
||||
response = JSON.parse(response.body)
|
||||
if !response["content_html"]? || response["content_html"].as_s.empty?
|
||||
raise "Playlist is empty"
|
||||
raise translate(locale, "Playlist is empty")
|
||||
end
|
||||
|
||||
document = XML.parse_html(response["content_html"].as_s)
|
||||
@ -53,6 +65,12 @@ def fetch_playlist_videos(plid, page, video_count)
|
||||
nodeset = document.xpath_nodes(%q(.//tr[contains(@class, "pl-video")]))
|
||||
|
||||
videos = extract_playlist(plid, nodeset, 0)
|
||||
|
||||
if continuation
|
||||
until videos[0].id == continuation
|
||||
videos.shift
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -88,14 +106,14 @@ def extract_playlist(plid, nodeset, index)
|
||||
end
|
||||
|
||||
videos << PlaylistVideo.new(
|
||||
title,
|
||||
id,
|
||||
author,
|
||||
ucid,
|
||||
length_seconds,
|
||||
Time.now,
|
||||
[plid],
|
||||
index + offset,
|
||||
title: title,
|
||||
id: id,
|
||||
author: author,
|
||||
ucid: ucid,
|
||||
length_seconds: length_seconds,
|
||||
published: Time.now,
|
||||
playlists: [plid],
|
||||
index: index + offset,
|
||||
)
|
||||
end
|
||||
|
||||
@ -138,7 +156,7 @@ def produce_playlist_url(id, index)
|
||||
return url
|
||||
end
|
||||
|
||||
def fetch_playlist(plid)
|
||||
def fetch_playlist(plid, locale)
|
||||
client = make_client(YT_URL)
|
||||
|
||||
if plid.starts_with? "UC"
|
||||
@ -147,19 +165,15 @@ def fetch_playlist(plid)
|
||||
|
||||
response = client.get("/playlist?list=#{plid}&hl=en&disable_polymer=1")
|
||||
if response.status_code != 200
|
||||
raise "Invalid playlist."
|
||||
raise translate(locale, "Invalid playlist.")
|
||||
end
|
||||
|
||||
body = response.body.gsub(<<-END_BUTTON
|
||||
<button class="yt-uix-button yt-uix-button-size-default yt-uix-button-link yt-uix-expander-head playlist-description-expander yt-uix-inlineedit-ignore-edit" type="button" onclick=";return false;"><span class="yt-uix-button-content"> less <img alt="" src="/yts/img/pixel-vfl3z5WfW.gif">
|
||||
</span></button>
|
||||
END_BUTTON
|
||||
, "")
|
||||
body = response.body.gsub(/<button[^>]+><span[^>]+>\s*less\s*<img[^>]+>\n<\/span><\/button>/, "")
|
||||
document = XML.parse_html(body)
|
||||
|
||||
title = document.xpath_node(%q(//h1[@class="pl-header-title"]))
|
||||
if !title
|
||||
raise "Playlist does not exist."
|
||||
raise translate(locale, "Playlist does not exist.")
|
||||
end
|
||||
title = title.content.strip(" \n")
|
||||
|
||||
@ -171,7 +185,7 @@ def fetch_playlist(plid)
|
||||
author = anchor.xpath_node(%q(.//li[1]/a)).not_nil!.content
|
||||
author_thumbnail = document.xpath_node(%q(//img[@class="channel-header-profile-image"])).try &.["src"]
|
||||
author_thumbnail ||= ""
|
||||
ucid = anchor.xpath_node(%q(.//li[1]/a)).not_nil!["href"].split("/")[2]
|
||||
ucid = anchor.xpath_node(%q(.//li[1]/a)).not_nil!["href"].split("/")[-1]
|
||||
|
||||
video_count = anchor.xpath_node(%q(.//li[2])).not_nil!.content.delete("videos, ").to_i
|
||||
views = anchor.xpath_node(%q(.//li[3])).not_nil!.content.delete("No views, ")
|
||||
@ -185,17 +199,51 @@ def fetch_playlist(plid)
|
||||
updated = decode_date(updated)
|
||||
|
||||
playlist = Playlist.new(
|
||||
title,
|
||||
plid,
|
||||
author,
|
||||
author_thumbnail,
|
||||
ucid,
|
||||
description,
|
||||
description_html,
|
||||
video_count,
|
||||
views,
|
||||
updated
|
||||
title: title,
|
||||
id: plid,
|
||||
author: author,
|
||||
author_thumbnail: author_thumbnail,
|
||||
ucid: ucid,
|
||||
description: description,
|
||||
description_html: description_html,
|
||||
video_count: video_count,
|
||||
views: views,
|
||||
updated: updated
|
||||
)
|
||||
|
||||
return playlist
|
||||
end
|
||||
|
||||
def template_playlist(playlist)
|
||||
html = <<-END_HTML
|
||||
<h3>
|
||||
<a href="/playlist?list=#{playlist["playlistId"]}">
|
||||
#{playlist["title"]}
|
||||
</a>
|
||||
</h3>
|
||||
<div class="pure-menu pure-menu-scrollable playlist-restricted">
|
||||
<ol class="pure-menu-list">
|
||||
END_HTML
|
||||
|
||||
playlist["videos"].as_a.each do |video|
|
||||
html += <<-END_HTML
|
||||
<li class="pure-menu-item">
|
||||
<a href="/watch?v=#{video["videoId"]}&list=#{playlist["playlistId"]}">
|
||||
<img style="width:100%;" src="/vi/#{video["videoId"]}/mqdefault.jpg">
|
||||
<p style="width:100%">#{video["title"]}</p>
|
||||
<p>
|
||||
<b style="width: 100%">#{video["author"]}</b>
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
END_HTML
|
||||
end
|
||||
|
||||
html += <<-END_HTML
|
||||
</ol>
|
||||
</div>
|
||||
<hr>
|
||||
END_HTML
|
||||
|
||||
html
|
||||
end
|
||||
|
@ -10,6 +10,8 @@ class SearchVideo
|
||||
description_html: String,
|
||||
length_seconds: Int32,
|
||||
live_now: Bool,
|
||||
paid: Bool,
|
||||
premium: Bool,
|
||||
})
|
||||
end
|
||||
|
||||
@ -49,12 +51,12 @@ alias SearchItem = SearchVideo | SearchChannel | SearchPlaylist
|
||||
def channel_search(query, page, channel)
|
||||
client = make_client(YT_URL)
|
||||
|
||||
response = client.get("/user/#{channel}")
|
||||
response = client.get("/user/#{channel}?disable_polymer=1&hl=en&gl=US")
|
||||
document = XML.parse_html(response.body)
|
||||
canonical = document.xpath_node(%q(//link[@rel="canonical"]))
|
||||
|
||||
if !canonical
|
||||
response = client.get("/channel/#{channel}")
|
||||
response = client.get("/channel/#{channel}?disable_polymer=1&hl=en&gl=US")
|
||||
document = XML.parse_html(response.body)
|
||||
canonical = document.xpath_node(%q(//link[@rel="canonical"]))
|
||||
end
|
||||
|
@ -1,15 +1,15 @@
|
||||
def fetch_decrypt_function(id = "CvFH_6DNRCY")
|
||||
client = make_client(YT_URL)
|
||||
document = client.get("/watch?v=#{id}").body
|
||||
url = document.match(/src="(?<url>\/yts\/jsbin\/player-.{9}\/en_US\/base.js)"/).not_nil!["url"]
|
||||
document = client.get("/watch?v=#{id}&gl=US&hl=en&disable_polymer=1").body
|
||||
url = document.match(/src="(?<url>\/yts\/jsbin\/player_ias-.{9}\/en_US\/base.js)"/).not_nil!["url"]
|
||||
player = client.get(url).body
|
||||
|
||||
function_name = player.match(/^(?<name>[^=]+)=function\(a\){a=a\.split\(""\)/m).not_nil!["name"]
|
||||
function_body = player.match(/^#{function_name}=function\(a\){(?<body>[^}]+)}/m).not_nil!["body"]
|
||||
function_body = player.match(/^#{Regex.escape(function_name)}=function\(a\){(?<body>[^}]+)}/m).not_nil!["body"]
|
||||
function_body = function_body.split(";")[1..-2]
|
||||
|
||||
var_name = function_body[0][0, 2]
|
||||
var_body = player.delete("\n").match(/var #{var_name}={(?<body>(.*?))};/).not_nil!["body"]
|
||||
var_body = player.delete("\n").match(/var #{Regex.escape(var_name)}={(?<body>(.*?))};/).not_nil!["body"]
|
||||
|
||||
operations = {} of String => String
|
||||
var_body.split("},").each do |operation|
|
||||
|
41
src/invidious/trending.cr
Normal file
@ -0,0 +1,41 @@
|
||||
def fetch_trending(trending_type, proxies, region, locale)
|
||||
client = make_client(YT_URL)
|
||||
headers = HTTP::Headers.new
|
||||
headers["User-Agent"] = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
|
||||
|
||||
region ||= "US"
|
||||
region = region.upcase
|
||||
|
||||
trending = ""
|
||||
if trending_type && trending_type != "Default"
|
||||
trending_type = trending_type.downcase.capitalize
|
||||
|
||||
response = client.get("/feed/trending?gl=#{region}&hl=en", headers).body
|
||||
|
||||
yt_data = response.match(/window\["ytInitialData"\] = (?<data>.*);/)
|
||||
if yt_data
|
||||
yt_data = JSON.parse(yt_data["data"].rchop(";"))
|
||||
else
|
||||
raise translate(locale, "Could not pull trending pages.")
|
||||
end
|
||||
|
||||
tabs = yt_data["contents"]["twoColumnBrowseResultsRenderer"]["tabs"][0]["tabRenderer"]["content"]["sectionListRenderer"]["subMenu"]["channelListSubMenuRenderer"]["contents"].as_a
|
||||
url = tabs.select { |tab| tab["channelListSubMenuAvatarRenderer"]["title"]["simpleText"] == trending_type }[0]?
|
||||
|
||||
if url
|
||||
url = url["channelListSubMenuAvatarRenderer"]["navigationEndpoint"]["commandMetadata"]["webCommandMetadata"]["url"].as_s
|
||||
url += "&disable_polymer=1&gl=#{region}&hl=en"
|
||||
trending = client.get(url).body
|
||||
else
|
||||
trending = client.get("/feed/trending?gl=#{region}&hl=en&disable_polymer=1").body
|
||||
end
|
||||
else
|
||||
trending = client.get("/feed/trending?gl=#{region}&hl=en&disable_polymer=1").body
|
||||
end
|
||||
|
||||
trending = XML.parse_html(trending)
|
||||
nodeset = trending.xpath_nodes(%q(//ul/li[@class="expanded-shelf-content-item-wrapper"]))
|
||||
trending = extract_videos(nodeset)
|
||||
|
||||
return trending
|
||||
end
|
@ -1,3 +1,5 @@
|
||||
require "crypto/bcrypt/password"
|
||||
|
||||
class User
|
||||
module PreferencesConverter
|
||||
def self.from_rs(rs)
|
||||
@ -27,20 +29,25 @@ class User
|
||||
end
|
||||
|
||||
DEFAULT_USER_PREFERENCES = Preferences.from_json({
|
||||
"video_loop" => false,
|
||||
"autoplay" => false,
|
||||
"speed" => 1.0,
|
||||
"quality" => "hd720",
|
||||
"volume" => 100,
|
||||
"comments" => ["youtube", ""],
|
||||
"captions" => ["", "", ""],
|
||||
"related_videos" => true,
|
||||
"dark_mode" => false,
|
||||
"thin_mode" => false,
|
||||
"max_results" => 40,
|
||||
"sort" => "published",
|
||||
"latest_only" => false,
|
||||
"unseen_only" => false,
|
||||
"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
|
||||
@ -70,10 +77,18 @@ class Preferences
|
||||
JSON.mapping({
|
||||
video_loop: Bool,
|
||||
autoplay: Bool,
|
||||
speed: Float32,
|
||||
quality: String,
|
||||
volume: Int32,
|
||||
comments: {
|
||||
continue: {
|
||||
type: Bool,
|
||||
default: false,
|
||||
},
|
||||
listen: {
|
||||
type: Bool,
|
||||
default: false,
|
||||
},
|
||||
speed: Float32,
|
||||
quality: String,
|
||||
volume: Int32,
|
||||
comments: {
|
||||
type: Array(String),
|
||||
default: ["youtube", ""],
|
||||
converter: StringToArray,
|
||||
@ -103,15 +118,19 @@ class Preferences
|
||||
type: Bool,
|
||||
default: false,
|
||||
},
|
||||
locale: {
|
||||
type: String,
|
||||
default: "en-US",
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
def get_user(sid, client, 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)
|
||||
user = db.query_one("SELECT * FROM users WHERE $1 = ANY(id)", sid, as: User)
|
||||
|
||||
if refresh && Time.now - user.updated > 1.minute
|
||||
user = fetch_user(sid, client, headers, db)
|
||||
user = fetch_user(sid, headers, db)
|
||||
user_array = user.to_a
|
||||
|
||||
user_array[5] = user_array[5].to_json
|
||||
@ -119,9 +138,18 @@ def get_user(sid, client, headers, db, refresh = true)
|
||||
|
||||
db.exec("INSERT INTO users VALUES (#{args}) \
|
||||
ON CONFLICT (email) DO UPDATE SET id = users.id || $1, updated = $2, subscriptions = $4", user_array)
|
||||
|
||||
begin
|
||||
view_name = "subscriptions_#{sha256(user.email)[0..7]}"
|
||||
PG_DB.exec("CREATE MATERIALIZED VIEW #{view_name} AS \
|
||||
SELECT * FROM channel_videos WHERE \
|
||||
ucid = ANY ((SELECT subscriptions FROM users WHERE email = '#{user.email}')::text[]) \
|
||||
ORDER BY published DESC;")
|
||||
rescue ex
|
||||
end
|
||||
end
|
||||
else
|
||||
user = fetch_user(sid, client, headers, db)
|
||||
user = fetch_user(sid, headers, db)
|
||||
user_array = user.to_a
|
||||
|
||||
user_array[5] = user_array[5].to_json
|
||||
@ -129,29 +157,36 @@ def get_user(sid, client, headers, db, refresh = true)
|
||||
|
||||
db.exec("INSERT INTO users VALUES (#{args}) \
|
||||
ON CONFLICT (email) DO UPDATE SET id = users.id || $1, updated = $2, subscriptions = $4", user_array)
|
||||
|
||||
begin
|
||||
view_name = "subscriptions_#{sha256(user.email)[0..7]}"
|
||||
PG_DB.exec("CREATE MATERIALIZED VIEW #{view_name} AS \
|
||||
SELECT * FROM channel_videos WHERE \
|
||||
ucid = ANY ((SELECT subscriptions FROM users WHERE email = '#{user.email}')::text[]) \
|
||||
ORDER BY published DESC;")
|
||||
rescue ex
|
||||
end
|
||||
end
|
||||
|
||||
return user
|
||||
end
|
||||
|
||||
def fetch_user(sid, client, headers, db)
|
||||
def fetch_user(sid, headers, db)
|
||||
client = make_client(YT_URL)
|
||||
feed = client.get("/subscription_manager?disable_polymer=1", headers)
|
||||
feed = XML.parse_html(feed.body)
|
||||
|
||||
channels = [] of String
|
||||
feed.xpath_nodes(%q(//ul[@id="guide-channels"]/li/a)).each do |channel|
|
||||
if !{"Popular on YouTube", "Music", "Sports", "Gaming"}.includes? channel["title"]
|
||||
channel_id = channel["href"].lstrip("/channel/")
|
||||
|
||||
begin
|
||||
channel = get_channel(channel_id, client, db, false, false)
|
||||
channels << channel.id
|
||||
rescue ex
|
||||
next
|
||||
end
|
||||
channels = feed.xpath_nodes(%q(//ul[@id="guide-channels"]/li/a)).compact_map do |channel|
|
||||
if {"Popular on YouTube", "Music", "Sports", "Gaming"}.includes? channel["title"]
|
||||
nil
|
||||
else
|
||||
channel["href"].lstrip("/channel/")
|
||||
end
|
||||
end
|
||||
|
||||
channels = get_batch_channels(channels, db, false, false)
|
||||
|
||||
email = feed.xpath_node(%q(//a[@class="yt-masthead-picker-header yt-masthead-picker-active-account"]))
|
||||
if email
|
||||
email = email.content.strip
|
||||
@ -173,3 +208,117 @@ def create_user(sid, email, password)
|
||||
|
||||
return user
|
||||
end
|
||||
|
||||
def create_response(user_id, operation, key, db, expire = 6.hours)
|
||||
expire = Time.now + expire
|
||||
nonce = Random::Secure.hex(16)
|
||||
db.exec("INSERT INTO nonces VALUES ($1, $2) ON CONFLICT DO NOTHING", nonce, expire)
|
||||
|
||||
challenge = "#{expire.to_unix}-#{nonce}-#{user_id}-#{operation}"
|
||||
token = OpenSSL::HMAC.digest(:sha256, key, challenge)
|
||||
|
||||
challenge = Base64.urlsafe_encode(challenge)
|
||||
token = Base64.urlsafe_encode(token)
|
||||
|
||||
return challenge, token
|
||||
end
|
||||
|
||||
def validate_response(challenge, token, user_id, operation, key, db, locale)
|
||||
if !challenge
|
||||
raise translate(locale, "Hidden field \"challenge\" is a required field")
|
||||
end
|
||||
|
||||
if !token
|
||||
raise translate(locale, "Hidden field \"token\" is a required field")
|
||||
end
|
||||
|
||||
challenge = Base64.decode_string(challenge)
|
||||
if challenge.split("-").size == 4
|
||||
expire, nonce, challenge_user_id, challenge_operation = challenge.split("-")
|
||||
|
||||
expire = expire.to_i?
|
||||
expire ||= 0
|
||||
else
|
||||
raise translate(locale, "Invalid challenge")
|
||||
end
|
||||
|
||||
challenge = OpenSSL::HMAC.digest(:sha256, HMAC_KEY, challenge)
|
||||
challenge = Base64.urlsafe_encode(challenge)
|
||||
|
||||
if db.query_one?("SELECT EXISTS (SELECT true FROM nonces WHERE nonce = $1)", nonce, as: Bool)
|
||||
db.exec("DELETE FROM nonces * WHERE nonce = $1", nonce)
|
||||
else
|
||||
raise translate(locale, "Invalid token")
|
||||
end
|
||||
|
||||
if challenge != token
|
||||
raise translate(locale, "Invalid token")
|
||||
end
|
||||
|
||||
if challenge_operation != operation
|
||||
raise translate(locale, "Invalid token")
|
||||
end
|
||||
|
||||
if challenge_user_id != user_id
|
||||
raise translate(locale, "Invalid user")
|
||||
end
|
||||
|
||||
if expire < Time.now.to_unix
|
||||
raise translate(locale, "Token is expired, please try again")
|
||||
end
|
||||
end
|
||||
|
||||
def generate_captcha(key, db)
|
||||
second = Random::Secure.rand(12)
|
||||
second_angle = second * 30
|
||||
second = second * 5
|
||||
|
||||
minute = Random::Secure.rand(12)
|
||||
minute_angle = minute * 30
|
||||
minute = minute * 5
|
||||
|
||||
hour = Random::Secure.rand(12)
|
||||
hour_angle = hour * 30 + minute_angle.to_f / 12
|
||||
if hour == 0
|
||||
hour = 12
|
||||
end
|
||||
|
||||
clock_svg = <<-END_SVG
|
||||
<svg viewBox="0 0 100 100" width="200px">
|
||||
<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="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="82.909" y="72" text-anchor="middle" fill="black" font-family="Arial" font-size="10px"> 4</text>
|
||||
<text x="69" y="85.909" text-anchor="middle" fill="black" font-family="Arial" font-size="10px"> 5</text>
|
||||
<text x="50" y="91" text-anchor="middle" fill="black" font-family="Arial" font-size="10px"> 6</text>
|
||||
<text x="31" y="85.909" text-anchor="middle" fill="black" font-family="Arial" font-size="10px"> 7</text>
|
||||
<text x="17.091" y="72" text-anchor="middle" fill="black" font-family="Arial" font-size="10px"> 8</text>
|
||||
<text x="12" y="53" text-anchor="middle" fill="black" font-family="Arial" font-size="10px"> 9</text>
|
||||
<text x="17.091" y="34" text-anchor="middle" fill="black" font-family="Arial" font-size="10px">10</text>
|
||||
<text x="31" y="20.091" text-anchor="middle" fill="black" font-family="Arial" font-size="10px">11</text>
|
||||
<text x="50" y="15" text-anchor="middle" fill="black" font-family="Arial" font-size="10px">12</text>
|
||||
|
||||
<circle cx="50" cy="50" r="3" fill="black"></circle>
|
||||
<line id="second" transform="rotate(#{second_angle}, 50, 50)" x1="50" y1="50" x2="50" y2="12" fill="black" stroke="black" stroke-width="1"></line>
|
||||
<line id="minute" transform="rotate(#{minute_angle}, 50, 50)" x1="50" y1="50" x2="50" y2="16" fill="black" stroke="black" stroke-width="2"></line>
|
||||
<line id="hour" transform="rotate(#{hour_angle}, 50, 50)" x1="50" y1="50" x2="50" y2="24" fill="black" stroke="black" stroke-width="2"></line>
|
||||
</svg>
|
||||
END_SVG
|
||||
|
||||
image = ""
|
||||
convert = Process.run(%(convert -density 1200 -resize 400x400 -background none svg:- png:-), shell: true,
|
||||
input: IO::Memory.new(clock_svg), output: Process::Redirect::Pipe) do |proc|
|
||||
image = proc.output.gets_to_end
|
||||
image = Base64.strict_encode(image)
|
||||
image = "data:image/png;base64,#{image}"
|
||||
end
|
||||
|
||||
answer = "#{hour}:#{minute.to_s.rjust(2, '0')}:#{second.to_s.rjust(2, '0')}"
|
||||
answer = OpenSSL::HMAC.hexdigest(:sha256, key, answer)
|
||||
|
||||
challenge, token = create_response(answer, "sign_in", key, db)
|
||||
|
||||
return {image: image, challenge: challenge, token: token}
|
||||
end
|
||||
|
@ -262,6 +262,13 @@ class Video
|
||||
end
|
||||
end
|
||||
|
||||
def keywords
|
||||
keywords = self.player_response["videoDetails"]["keywords"]?.try &.as_a
|
||||
keywords ||= [] of String
|
||||
|
||||
return keywords
|
||||
end
|
||||
|
||||
def fmt_stream(decrypt_function)
|
||||
streams = [] of HTTP::Params
|
||||
self.info["url_encoded_fmt_stream_map"].split(",") do |string|
|
||||
@ -312,7 +319,7 @@ class Video
|
||||
clen = url.match(/clen\/(?<clen>\d+)/).try &.["clen"]
|
||||
clen ||= "0"
|
||||
lmt = url.match(/lmt\/(?<lmt>\d+)/).try &.["lmt"]
|
||||
lmt ||= "#{((Time.now + 1.hour).epoch_f.to_f64 * 1000000).to_i64}"
|
||||
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))
|
||||
@ -407,6 +414,23 @@ class Video
|
||||
return @player_json.not_nil!
|
||||
end
|
||||
|
||||
def paid
|
||||
reason = self.player_response["playabilityStatus"]?.try &.["reason"]?
|
||||
|
||||
if reason == "This video requires payment to watch."
|
||||
paid = true
|
||||
else
|
||||
paid = false
|
||||
end
|
||||
|
||||
return paid
|
||||
end
|
||||
|
||||
def premium
|
||||
premium = self.player_response.to_s.includes? "Get YouTube without the ads."
|
||||
return premium
|
||||
end
|
||||
|
||||
def captions
|
||||
captions = [] of Caption
|
||||
if player_response["captions"]?
|
||||
@ -434,6 +458,10 @@ class Video
|
||||
return description
|
||||
end
|
||||
|
||||
def length_seconds
|
||||
return self.info["length_seconds"].to_i
|
||||
end
|
||||
|
||||
add_mapping({
|
||||
id: String,
|
||||
info: {
|
||||
@ -456,10 +484,9 @@ class Video
|
||||
is_family_friendly: Bool,
|
||||
genre: String,
|
||||
genre_url: String,
|
||||
license: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
license: String,
|
||||
sub_count_text: String,
|
||||
author_thumbnail: String,
|
||||
})
|
||||
end
|
||||
|
||||
@ -477,21 +504,24 @@ class CaptionName
|
||||
)
|
||||
end
|
||||
|
||||
def get_video(id, db, proxies = {} of String => Array({ip: String, port: Int32}), refresh = true)
|
||||
if db.query_one?("SELECT EXISTS (SELECT true FROM videos WHERE id = $1)", id, as: Bool)
|
||||
class VideoRedirect < Exception
|
||||
end
|
||||
|
||||
def get_video(id, db, proxies = {} of String => Array({ip: String, port: Int32}), refresh = true, region = nil)
|
||||
if db.query_one?("SELECT EXISTS (SELECT true FROM videos WHERE id = $1)", id, as: Bool) && !region
|
||||
video = db.query_one("SELECT * FROM videos WHERE id = $1", id, as: Video)
|
||||
|
||||
# If record was last updated over 10 minutes ago, refresh (expire param in response lasts for 6 hours)
|
||||
if refresh && Time.now - video.updated > 10.minutes
|
||||
begin
|
||||
video = fetch_video(id, proxies)
|
||||
video = fetch_video(id, proxies, region)
|
||||
video_array = video.to_a
|
||||
|
||||
args = arg_array(video_array[1..-1], 2)
|
||||
|
||||
db.exec("UPDATE videos SET (info,updated,title,views,likes,dislikes,wilson_score,\
|
||||
published,description,language,author,ucid, allowed_regions, is_family_friendly,\
|
||||
genre, genre_url, license)\
|
||||
published,description,language,author,ucid,allowed_regions,is_family_friendly,\
|
||||
genre,genre_url,license,sub_count_text,author_thumbnail)\
|
||||
= (#{args}) WHERE id = $1", video_array)
|
||||
rescue ex
|
||||
db.exec("DELETE FROM videos * WHERE id = $1", id)
|
||||
@ -499,31 +529,37 @@ def get_video(id, db, proxies = {} of String => Array({ip: String, port: Int32})
|
||||
end
|
||||
end
|
||||
else
|
||||
video = fetch_video(id, proxies)
|
||||
video = fetch_video(id, proxies, region)
|
||||
video_array = video.to_a
|
||||
|
||||
args = arg_array(video_array)
|
||||
|
||||
db.exec("INSERT INTO videos VALUES (#{args}) ON CONFLICT (id) DO NOTHING", video_array)
|
||||
if !region
|
||||
db.exec("INSERT INTO videos VALUES (#{args}) ON CONFLICT (id) DO NOTHING", video_array)
|
||||
end
|
||||
end
|
||||
|
||||
return video
|
||||
end
|
||||
|
||||
def fetch_video(id, proxies)
|
||||
html_channel = Channel(XML::Node).new
|
||||
def fetch_video(id, proxies, region)
|
||||
html_channel = Channel(XML::Node | String).new
|
||||
info_channel = Channel(HTTP::Params).new
|
||||
|
||||
spawn do
|
||||
client = make_client(YT_URL)
|
||||
html = client.get("/watch?v=#{id}&bpctr=#{Time.new.epoch + 2000}&gl=US&hl=en&disable_polymer=1")
|
||||
html = XML.parse_html(html.body)
|
||||
client = make_client(YT_URL, proxies, region)
|
||||
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
|
||||
|
||||
spawn do
|
||||
client = make_client(YT_URL)
|
||||
client = make_client(YT_URL, proxies, region)
|
||||
info = client.get("/get_video_info?video_id=#{id}&el=detailpage&ps=default&eurl=&gl=US&hl=en&disable_polymer=1")
|
||||
info = HTTP::Params.parse(info.body)
|
||||
|
||||
@ -536,57 +572,43 @@ def fetch_video(id, proxies)
|
||||
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
|
||||
|
||||
if info["reason"]? && info["reason"].includes? "your country"
|
||||
bypass_channel = Channel(HTTPProxy | Nil).new
|
||||
bypass_channel = Channel({HTTPClient, String} | Nil).new
|
||||
|
||||
proxies.each do |region, list|
|
||||
proxies.each do |proxy_region, list|
|
||||
spawn do
|
||||
list.each do |proxy|
|
||||
begin
|
||||
client = HTTPClient.new(YT_URL)
|
||||
client.read_timeout = 10.seconds
|
||||
client.connect_timeout = 10.seconds
|
||||
client = make_client(YT_URL, proxies, proxy_region)
|
||||
|
||||
proxy = HTTPProxy.new(proxy_host: proxy[:ip], proxy_port: proxy[:port])
|
||||
client.set_proxy(proxy)
|
||||
|
||||
info = HTTP::Params.parse(client.get("/get_video_info?video_id=#{id}&ps=default&eurl=&gl=US&hl=en&disable_polymer=1").body)
|
||||
if !info["reason"]?
|
||||
bypass_channel.send(proxy)
|
||||
else
|
||||
bypass_channel.send(nil)
|
||||
end
|
||||
|
||||
break
|
||||
rescue ex
|
||||
end
|
||||
info = HTTP::Params.parse(client.get("/get_video_info?video_id=#{id}&ps=default&eurl=&gl=US&hl=en&disable_polymer=1").body)
|
||||
if !info["reason"]?
|
||||
bypass_channel.send({client, proxy_region})
|
||||
else
|
||||
bypass_channel.send(nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
proxies.size.times do
|
||||
proxy = bypass_channel.receive
|
||||
if proxy
|
||||
response = bypass_channel.receive
|
||||
if response
|
||||
begin
|
||||
client = HTTPClient.new(YT_URL)
|
||||
client.read_timeout = 10.seconds
|
||||
client.connect_timeout = 10.seconds
|
||||
client.set_proxy(proxy)
|
||||
client, proxy_region = response
|
||||
|
||||
html = XML.parse_html(client.get("/watch?v=#{id}&bpctr=#{Time.new.epoch + 2000}&gl=US&hl=en&disable_polymer=1").body)
|
||||
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
|
||||
|
||||
proxy = {ip: proxy.proxy_host, port: proxy.proxy_port}
|
||||
region = proxies.select { |region, list| list.includes? proxy }
|
||||
if !region.empty?
|
||||
info["region"] = region.keys[0]
|
||||
end
|
||||
info["region"] = proxy_region
|
||||
|
||||
break
|
||||
rescue ex
|
||||
@ -596,20 +618,35 @@ def fetch_video(id, proxies)
|
||||
end
|
||||
|
||||
if info["reason"]?
|
||||
raise info["reason"]
|
||||
html_info = html.to_s.match(/ytplayer\.config = (?<info>.*?);ytplayer\.load/).try &.["info"]
|
||||
if html_info
|
||||
html_info = JSON.parse(html_info)["args"].as_h
|
||||
info.delete("reason")
|
||||
|
||||
html_info.each do |k, v|
|
||||
info[k] = v.to_s
|
||||
end
|
||||
end
|
||||
|
||||
if info["reason"]?
|
||||
raise info["reason"]
|
||||
end
|
||||
end
|
||||
|
||||
title = info["title"]
|
||||
views = info["view_count"].to_i64
|
||||
author = info["author"]
|
||||
ucid = info["ucid"]
|
||||
|
||||
views = html.xpath_node(%q(//meta[@itemprop="interactionCount"]))
|
||||
views = views.try &.["content"].to_i64?
|
||||
views ||= 0_i64
|
||||
|
||||
likes = html.xpath_node(%q(//button[@title="I like this"]/span))
|
||||
likes = likes.try &.content.delete(",").try &.to_i
|
||||
likes = likes.try &.content.delete(",").try &.to_i?
|
||||
likes ||= 0
|
||||
|
||||
dislikes = html.xpath_node(%q(//button[@title="I dislike this"]/span))
|
||||
dislikes = dislikes.try &.content.delete(",").try &.to_i
|
||||
dislikes = dislikes.try &.content.delete(",").try &.to_i?
|
||||
dislikes ||= 0
|
||||
|
||||
description = html.xpath_node(%q(//p[@id="eow-description"]))
|
||||
@ -617,7 +654,8 @@ def fetch_video(id, proxies)
|
||||
|
||||
wilson_score = ci_lower_bound(likes, likes + dislikes)
|
||||
|
||||
published = html.xpath_node(%q(//meta[@itemprop="datePublished"])).not_nil!["content"]
|
||||
published = html.xpath_node(%q(//meta[@itemprop="datePublished"])).try &.["content"]
|
||||
published ||= Time.now.to_s("%Y-%m-%d")
|
||||
published = Time.parse(published, "%Y-%m-%d", Time::Location.local)
|
||||
|
||||
allowed_regions = html.xpath_node(%q(//meta[@itemprop="regionsAllowed"])).try &.["content"].split(",")
|
||||
@ -625,15 +663,16 @@ def fetch_video(id, proxies)
|
||||
is_family_friendly = html.xpath_node(%q(//meta[@itemprop="isFamilyFriendly"])).try &.["content"] == "True"
|
||||
is_family_friendly ||= true
|
||||
|
||||
genre = html.xpath_node(%q(//meta[@itemprop="genre"])).not_nil!["content"]
|
||||
genre = html.xpath_node(%q(//meta[@itemprop="genre"])).try &.["content"]
|
||||
genre ||= ""
|
||||
|
||||
genre_url = html.xpath_node(%(//a[text()="#{genre}"])).try &.["href"]
|
||||
case genre
|
||||
when "Movies"
|
||||
genre_url = "/channel/UClgRkhTL3_hImCAmdLfDE4g"
|
||||
when "Education"
|
||||
# Education channel is linked but does not exist
|
||||
# genre_url = "/channel/UC3yA8nDwraeOfnYfBWun83g"
|
||||
genre_url = ""
|
||||
genre_url = "/channel/UC3yA8nDwraeOfnYfBWun83g"
|
||||
end
|
||||
genre_url ||= ""
|
||||
|
||||
@ -641,11 +680,25 @@ def fetch_video(id, proxies)
|
||||
if license
|
||||
license = license.content
|
||||
else
|
||||
license ||= ""
|
||||
license = ""
|
||||
end
|
||||
|
||||
sub_count_text = html.xpath_node(%q(//span[contains(@class, "yt-subscriber-count")]))
|
||||
if sub_count_text
|
||||
sub_count_text = sub_count_text["title"]
|
||||
else
|
||||
sub_count_text = "0"
|
||||
end
|
||||
|
||||
author_thumbnail = html.xpath_node(%(//span[@class="yt-thumb-clip"]/img))
|
||||
if author_thumbnail
|
||||
author_thumbnail = author_thumbnail["data-thumb"]
|
||||
else
|
||||
author_thumbnail = ""
|
||||
end
|
||||
|
||||
video = Video.new(id, info, Time.now, title, views, likes, dislikes, wilson_score, published, description,
|
||||
nil, author, ucid, allowed_regions, is_family_friendly, genre, genre_url, license)
|
||||
nil, author, ucid, allowed_regions, is_family_friendly, genre, genre_url, license, sub_count_text, author_thumbnail)
|
||||
|
||||
return video
|
||||
end
|
||||
@ -656,14 +709,20 @@ end
|
||||
|
||||
def process_video_params(query, preferences)
|
||||
autoplay = query["autoplay"]?.try &.to_i?
|
||||
continue = query["continue"]?.try &.to_i?
|
||||
listen = query["listen"]? && (query["listen"] == "true" || query["listen"] == "1").to_unsafe
|
||||
preferred_captions = query["subtitles"]?.try &.split(",").map { |a| a.downcase }
|
||||
quality = query["quality"]?
|
||||
region = query["region"]?
|
||||
speed = query["speed"]?.try &.to_f?
|
||||
video_loop = query["loop"]?.try &.to_i?
|
||||
volume = query["volume"]?.try &.to_i?
|
||||
|
||||
if preferences
|
||||
# region ||= preferences.region
|
||||
autoplay ||= preferences.autoplay.to_unsafe
|
||||
continue ||= preferences.continue.to_unsafe
|
||||
listen ||= preferences.listen.to_unsafe
|
||||
preferred_captions ||= preferences.captions
|
||||
quality ||= preferences.quality
|
||||
speed ||= preferences.speed
|
||||
@ -672,6 +731,8 @@ def process_video_params(query, preferences)
|
||||
end
|
||||
|
||||
autoplay ||= 0
|
||||
continue ||= 0
|
||||
listen ||= 0
|
||||
preferred_captions ||= [] of String
|
||||
quality ||= "hd720"
|
||||
speed ||= 1
|
||||
@ -679,6 +740,8 @@ def process_video_params(query, preferences)
|
||||
volume ||= 100
|
||||
|
||||
autoplay = autoplay == 1
|
||||
continue = continue == 1
|
||||
listen = listen == 1
|
||||
video_loop = video_loop == 1
|
||||
|
||||
if query["t"]?
|
||||
@ -698,11 +761,6 @@ def process_video_params(query, preferences)
|
||||
end
|
||||
video_end ||= -1
|
||||
|
||||
if query["listen"]? && (query["listen"] == "true" || query["listen"] == "1")
|
||||
listen = true
|
||||
end
|
||||
listen ||= false
|
||||
|
||||
raw = query["raw"]?.try &.to_i?
|
||||
raw ||= 0
|
||||
raw = raw == 1
|
||||
@ -713,11 +771,13 @@ def process_video_params(query, preferences)
|
||||
|
||||
params = {
|
||||
autoplay: autoplay,
|
||||
continue: continue,
|
||||
controls: controls,
|
||||
listen: listen,
|
||||
preferred_captions: preferred_captions,
|
||||
quality: quality,
|
||||
raw: raw,
|
||||
region: region,
|
||||
speed: speed,
|
||||
video_end: video_end,
|
||||
video_loop: video_loop,
|
||||
|
@ -13,46 +13,124 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="h-box">
|
||||
<div class="h-box">
|
||||
<% if user %>
|
||||
<% if subscriptions.includes? ucid %>
|
||||
<a href="/subscription_ajax?action_remove_subscriptions=1&c=<%= ucid %>&referer=<%= env.get("current_page") %>">
|
||||
<b>Unsubscribe from <%= author %></b>
|
||||
</a>
|
||||
<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 %>
|
||||
<a href="/subscription_ajax?action_create_subscription_to_channel=1&c=<%= ucid %>&referer=<%= env.get("current_page") %>">
|
||||
<b>Subscribe to <%= author %></b>
|
||||
</a>
|
||||
<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 %>
|
||||
<a href="/login?referer=<%= env.get("current_page") %>">
|
||||
<b>Login to subscribe to <%= author %></b>
|
||||
</a>
|
||||
<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 %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p class="h-box">
|
||||
<a href="https://www.youtube.com/channel/<%= ucid %>">View channel on YouTube</a>
|
||||
</p>
|
||||
<div class="pure-g h-box">
|
||||
<div class="pure-u-1-3">
|
||||
<a href="https://www.youtube.com/channel/<%= ucid %>"><%= translate(locale, "View channel on YouTube") %></a>
|
||||
</div>
|
||||
<div class="pure-u-1-3">
|
||||
</div>
|
||||
<div class="pure-u-1-3">
|
||||
<div class="pure-g" style="text-align:right;">
|
||||
<% {"newest", "oldest", "popular"}.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 %>?page=<%= page %>&sort_by=<%= sort %>">
|
||||
<%= translate(locale, sort) %>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="h-box">
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<% videos.each_slice(4) do |slice| %>
|
||||
<div class="pure-g">
|
||||
<% videos.each_slice(4) do |slice| %>
|
||||
<% slice.each do |item| %>
|
||||
<%= rendered "components/item" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="pure-g h-box">
|
||||
<div class="pure-u-1 pure-u-md-1-5">
|
||||
<% if page >= 2 %>
|
||||
<a href="/channel/<%= ucid %>?page=<%= page - 1 %>">Previous page</a>
|
||||
<a href="/channel/<%= ucid %>?page=<%= page - 1 %><% if sort_by != "newest" %>&sort_by=<%= sort_by %><% end %>">
|
||||
<%= translate(locale, "Previous page") %>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-md-3-5"></div>
|
||||
<div style="text-align:right;" class="pure-u-1 pure-u-md-1-5">
|
||||
<% if videos.size == 60 %>
|
||||
<a href="/channel/<%= ucid %>?page=<%= page + 1 %>">Next page</a>
|
||||
<% if count == 60 %>
|
||||
<a href="/channel/<%= ucid %>?page=<%= page + 1 %><% if sort_by != "newest" %>&sort_by=<%= sort_by %><% end %>">
|
||||
<%= translate(locale, "Next page") %>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.getElementById("subscribe")["href"] = "javascript:void(0)"
|
||||
|
||||
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>
|
||||
|
25
src/invidious/views/clear_watch_history.ecr
Normal file
@ -0,0 +1,25 @@
|
||||
<% content_for "header" do %>
|
||||
<title><%= translate(locale, "Clear watch history") %> - Invidious</title>
|
||||
<% end %>
|
||||
|
||||
<div class="h-box">
|
||||
<form class="pure-form pure-form-aligned" action="/clear_watch_history?referer=<%= URI.escape(referer) %>" method="post">
|
||||
<legend><%= translate(locale, "Clear watch history?") %></legend>
|
||||
|
||||
<div class="pure-g">
|
||||
<div class="pure-u-1-2">
|
||||
<button type="submit" name="submit" value="clear_watch_history" class="pure-button pure-button-primary">
|
||||
<%= translate(locale, "Yes") %>
|
||||
</button>
|
||||
</div>
|
||||
<div class="pure-u-1-2">
|
||||
<a class="pure-button" href="<%= referer %>">
|
||||
<%= translate(locale, "No") %>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="token" value="<%= token %>">
|
||||
<input type="hidden" name="challenge" value="<%= challenge %>">
|
||||
</form>
|
||||
</div>
|
@ -11,7 +11,8 @@
|
||||
<% end %>
|
||||
<p><%= item.author %></p>
|
||||
</a>
|
||||
<p><%= number_with_separator(item.subscriber_count) %> subscribers</p>
|
||||
<p><%= translate(locale, "`x` subscribers", number_with_separator(item.subscriber_count)) %></p>
|
||||
<p><%= translate(locale, "`x` videos", number_with_separator(item.video_count)) %></p>
|
||||
<h5><%= item.description_html %></h5>
|
||||
<% when SearchPlaylist %>
|
||||
<% if item.id.starts_with? "RD" %>
|
||||
@ -22,48 +23,84 @@
|
||||
<a style="width:100%;" href="<%= url %>">
|
||||
<% if env.get?("user") && env.get("user").as(User).preferences.thin_mode %>
|
||||
<% else %>
|
||||
<img style="width:100%;" src="/vi/<%= item.videos[0]?.try &.id %>/mqdefault.jpg"/>
|
||||
<div class="thumbnail">
|
||||
<img class="thumbnail" src="/vi/<%= item.videos[0]?.try &.id %>/mqdefault.jpg"/>
|
||||
<p class="length"><%= number_with_separator(item.video_count) %> videos</p>
|
||||
</div>
|
||||
<% end %>
|
||||
<p><%= item.title %></p>
|
||||
</a>
|
||||
<p>
|
||||
<b><a style="width:100%;" href="/channel/<%= item.ucid %>"><%= item.author %></a></b>
|
||||
</p>
|
||||
<p><%= number_with_separator(item.video_count) %> videos</p>
|
||||
<p>PLAYLIST</p>
|
||||
<% when MixVideo %>
|
||||
<a style="width:100%;" href="/watch?v=<%= item.id %>">
|
||||
<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 %>
|
||||
<% else %>
|
||||
<img style="width:100%;" src="/vi/<%= item.id %>/mqdefault.jpg"/>
|
||||
<div class="thumbnail">
|
||||
<img class="thumbnail" src="/vi/<%= item.id %>/mqdefault.jpg"/>
|
||||
<p class="length"><%= recode_length_seconds(item.length_seconds) %></p>
|
||||
</div>
|
||||
<% end %>
|
||||
<p><%= item.title %></p>
|
||||
</a>
|
||||
<p>
|
||||
<b><a style="width:100%;" href="/channel/<%= item.ucid %>"><%= item.author %></a></b>
|
||||
</p>
|
||||
<% else %>
|
||||
<% if item.responds_to?(:playlists) && !item.playlists.empty? %>
|
||||
<% params = "&list=#{item.playlists[0]}" %>
|
||||
<% else %>
|
||||
<% params = nil %>
|
||||
<% end %>
|
||||
<a style="width:100%;" href="/watch?v=<%= item.id %><%= params %>">
|
||||
<% when PlaylistVideo %>
|
||||
<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 %>
|
||||
<% else %>
|
||||
<img style="width:100%;" src="/vi/<%= item.id %>/mqdefault.jpg"/>
|
||||
<div class="thumbnail">
|
||||
<img class="thumbnail" src="/vi/<%= item.id %>/mqdefault.jpg"/>
|
||||
<p class="length"><%= recode_length_seconds(item.length_seconds) %></p>
|
||||
</div>
|
||||
<% end %>
|
||||
<p><%= item.title %></p>
|
||||
</a>
|
||||
<% if item.responds_to?(:live_now) && item.live_now %>
|
||||
<p>LIVE</p>
|
||||
<p><%= translate(locale, "LIVE") %></p>
|
||||
<% end %>
|
||||
<p>
|
||||
<b><a style="width:100%;" href="/channel/<%= item.ucid %>"><%= item.author %></a></b>
|
||||
</p>
|
||||
|
||||
<% if Time.now - item.published > 1.minute %>
|
||||
<h5>Shared <%= recode_date(item.published) %> ago</h5>
|
||||
<h5><%= translate(locale, "Shared `x` ago", recode_date(item.published)) %></h5>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% if env.get?("user") && env.get("user").as(User).preferences.thin_mode %>
|
||||
<% else %>
|
||||
<a style="width:100%;" href="/watch?v=<%= item.id %>">
|
||||
<div class="thumbnail">
|
||||
<img class="thumbnail" src="/vi/<%= item.id %>/mqdefault.jpg"/>
|
||||
<% if env.get? "show_watched" %>
|
||||
<p class="watched">
|
||||
<a onclick="mark_watched(this)"
|
||||
data-id="<%= item.id %>"
|
||||
onmouseenter='this["href"]="javascript:void(0)"'
|
||||
href="/mark_watched?id=<%= item.id %>">
|
||||
<i onmouseenter='this.setAttribute("class", "icon ion-ios-eye-off")'
|
||||
onmouseleave='this.setAttribute("class", "icon ion-ios-eye")'
|
||||
class="icon ion-ios-eye">
|
||||
</i>
|
||||
</a>
|
||||
</p>
|
||||
<% end %>
|
||||
<p class="length"><%= recode_length_seconds(item.length_seconds) %></p>
|
||||
</div>
|
||||
</a>
|
||||
<% end %>
|
||||
<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>
|
||||
<b><a style="width:100%;" href="/channel/<%= item.ucid %>"><%= item.author %></a></b>
|
||||
</p>
|
||||
|
||||
<% if Time.now - item.published > 1.minute %>
|
||||
<h5><%= translate(locale, "Shared `x` ago", recode_date(item.published)) %></h5>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
@ -1,5 +1,8 @@
|
||||
<video style="width:100%" playsinline poster="<%= thumbnail %>" title="<%= HTML.escape(video.title) %>"
|
||||
id="player" class="video-js"
|
||||
onmouseenter='this["data-title"]=this["title"];this["title"]=""'
|
||||
onmouseleave='this["title"]=this["data-title"];this["data-title"]=""'
|
||||
oncontextmenu='this["title"]=this["data-title"]'
|
||||
<% if params[:autoplay] %>autoplay<% end %>
|
||||
<% if params[:video_loop] %>loop<% end %>
|
||||
<% if params[:controls] %>controls<% end %>>
|
||||
@ -24,12 +27,12 @@
|
||||
<% end %>
|
||||
|
||||
<% preferred_captions.each_with_index do |caption, i| %>
|
||||
<track kind="captions" src="/api/v1/captions/<%= video.id %>?label=<%= caption.name.simpleText %>"
|
||||
<track kind="captions" src="/api/v1/captions/<%= video.id %>?label=<%= caption.name.simpleText %>&hl=<%= env.get("locale").as(String) %>"
|
||||
label="<%= caption.name.simpleText %>" <% if i == 0 %>default<% end %>>
|
||||
<% end %>
|
||||
|
||||
<% captions.each do |caption| %>
|
||||
<track kind="captions" src="/api/v1/captions/<%= video.id %>?label=<%= caption.name.simpleText %>"
|
||||
<track kind="captions" src="/api/v1/captions/<%= video.id %>?label=<%= caption.name.simpleText %>&hl=<%= env.get("locale").as(String) %>"
|
||||
label="<%= caption.name.simpleText %>">
|
||||
<% end %>
|
||||
<% end %>
|
||||
@ -137,18 +140,29 @@ player.markers({
|
||||
player.currentTime(<%= params[:video_start] %>);
|
||||
<% end %>
|
||||
|
||||
<% if !params[:listen] %>
|
||||
var currentSources = player.currentSources();
|
||||
for (var i = 0; i < currentSources.length; i++) {
|
||||
if (player.canPlayType(currentSources[i]["type"].split(";")[0]) === "") {
|
||||
currentSources.splice(i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
player.src(currentSources);
|
||||
<% end %>
|
||||
|
||||
player.volume(<%= params[:volume].to_f / 100 %>);
|
||||
player.playbackRate(<%= params[:speed] %>);
|
||||
|
||||
<% if params[:autoplay] %>
|
||||
var bpb = player.getChild('bigPlayButton');
|
||||
|
||||
if (bpb) {
|
||||
bpb.hide();
|
||||
|
||||
player.ready(function() {
|
||||
new Promise(function(resolve, reject) {
|
||||
setTimeout(() => resolve(1), 1);
|
||||
}).then(function(result) {
|
||||
var promise = player.play();
|
||||
|
||||
if (promise !== undefined) {
|
||||
promise.then(_ => {
|
||||
}).catch(error => {
|
||||
bpb.show();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
<% end %>
|
||||
</script>
|
||||
|
@ -1,54 +1,57 @@
|
||||
<% content_for "header" do %>
|
||||
<title>Import and Export Data - Invidious</title>
|
||||
<title><%= translate(locale, "Import and Export Data") %> - Invidious</title>
|
||||
<% end %>
|
||||
|
||||
<div class="h-box">
|
||||
<form class="pure-form pure-form-aligned" enctype="multipart/form-data" action="/data_control?referer=<%= referer %>" method="post">
|
||||
<fieldset>
|
||||
<legend>Import</legend>
|
||||
<legend><%= translate(locale, "Import") %></legend>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="import_youtube">Import Invidious data</label>
|
||||
<label for="import_youtube"><%= translate(locale, "Import Invidious data") %></label>
|
||||
<input type="file" id="import_invidious" name="import_invidious">
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="import_youtube">Import <a rel="noopener" target="_blank"
|
||||
href="https://support.google.com/youtube/answer/6224202?hl=en-GB">YouTube subscriptions</a></label>
|
||||
<label for="import_youtube">
|
||||
<a rel="noopener" target="_blank" href="https://support.google.com/youtube/answer/6224202?hl=en">
|
||||
<%= translate(locale, "Import YouTube subscriptions") %>
|
||||
</a>
|
||||
</label>
|
||||
<input type="file" id="import_youtube" name="import_youtube">
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="import_freetube">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">
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="import_newpipe_subscriptions">Import NewPipe subscriptions (.json)</label>
|
||||
<label for="import_newpipe_subscriptions"><%= translate(locale, "Import NewPipe subscriptions (.json)") %></label>
|
||||
<input type="file" id="import_newpipe_subscriptions" name="import_newpipe_subscriptions">
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="import_newpipe">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">
|
||||
</div>
|
||||
|
||||
<div class="pure-controls">
|
||||
<button type="submit" class="pure-button pure-button-primary">Import</button>
|
||||
<button type="submit" class="pure-button pure-button-primary"><%= translate(locale, "Import") %></button>
|
||||
</div>
|
||||
|
||||
<legend>Export</legend>
|
||||
<legend><%= translate(locale, "Export") %></legend>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<a href="/subscription_manager?action_takeout=1">Export subscriptions as OPML</a>
|
||||
<a href="/subscription_manager?action_takeout=1"><%= translate(locale, "Export subscriptions as OPML") %></a>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<a href="/subscription_manager?action_takeout=1&format=newpipe">Export subscriptions as OPML (for NewPipe & FreeTube)</a>
|
||||
<a href="/subscription_manager?action_takeout=1&format=newpipe"><%= translate(locale, "Export subscriptions as OPML (for NewPipe & FreeTube)") %></a>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<a href="/subscription_manager?action_takeout=1&format=json">Export data as JSON</a>
|
||||
<a href="/subscription_manager?action_takeout=1&format=json"><%= translate(locale, "Export data as JSON") %></a>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
25
src/invidious/views/delete_account.ecr
Normal file
@ -0,0 +1,25 @@
|
||||
<% content_for "header" do %>
|
||||
<title><%= translate(locale, "Delete account") %> - Invidious</title>
|
||||
<% end %>
|
||||
|
||||
<div class="h-box">
|
||||
<form class="pure-form pure-form-aligned" action="/delete_account?referer=<%= URI.escape(referer) %>" method="post">
|
||||
<legend><%= translate(locale, "Delete account?") %></legend>
|
||||
|
||||
<div class="pure-g">
|
||||
<div class="pure-u-1-2">
|
||||
<button type="submit" name="submit" value="delete_account" class="pure-button pure-button-primary">
|
||||
<%= translate(locale, "Yes") %>
|
||||
</button>
|
||||
</div>
|
||||
<div class="pure-u-1-2">
|
||||
<a class="pure-button" href="<%= referer %>">
|
||||
<%= translate(locale, "No") %>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="token" value="<%= token %>">
|
||||
<input type="hidden" name="challenge" value="<%= challenge %>">
|
||||
</form>
|
||||
</div>
|
85
src/invidious/views/history.ecr
Normal file
@ -0,0 +1,85 @@
|
||||
<% content_for "header" do %>
|
||||
<title><%= translate(locale, "History") %> - Invidious</title>
|
||||
<% end %>
|
||||
|
||||
<div class="pure-g h-box">
|
||||
<div class="pure-u-2-3">
|
||||
<h3><%= translate(locale, "`x` videos", %(<span id="count">#{user.watched.size}</span>)) %></h3>
|
||||
</div>
|
||||
<div class="pure-u-1-3" style="text-align:right;">
|
||||
<h3>
|
||||
<a href="/clear_watch_history"><%= translate(locale, "Clear watch history") %></a>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pure-g">
|
||||
<% watched.each_slice(4) do |slice| %>
|
||||
<% slice.each do |item| %>
|
||||
<div class="pure-u-1 pure-u-md-1-4">
|
||||
<div class="h-box">
|
||||
<a style="width:100%;" href="/watch?v=<%= item %>">
|
||||
<% if env.get?("user") && env.get("user").as(User).preferences.thin_mode %>
|
||||
<% else %>
|
||||
<div class="thumbnail">
|
||||
<img class="thumbnail" src="/vi/<%= item %>/mqdefault.jpg"/>
|
||||
<p class="watched">
|
||||
<a onclick="mark_unwatched(this)"
|
||||
data-id="<%= item %>"
|
||||
onmouseenter='this["href"]="javascript:void(0)"'
|
||||
href="/mark_unwatched?id=<%= item %>">
|
||||
<i class="icon ion-md-trash"></i>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<p></p>
|
||||
<% end %>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function mark_unwatched(target) {
|
||||
var tile = target.parentNode.parentNode.parentNode.parentNode;
|
||||
tile.style.display = "none";
|
||||
var count = document.getElementById("count")
|
||||
count.innerText = count.innerText - 1;
|
||||
|
||||
var url = "/mark_unwatched?redirect=false&id=" + target.getAttribute("data-id");
|
||||
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) {
|
||||
count.innerText = count.innerText - 1 + 2;
|
||||
tile.style.display = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="pure-g h-box">
|
||||
<div class="pure-u-1 pure-u-md-1-5">
|
||||
<% if page >= 2 %>
|
||||
<a href="/feed/history?page=<%= page - 1 %>">
|
||||
<%= translate(locale, "Previous page") %>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-md-3-5"></div>
|
||||
<div style="text-align:right;" class="pure-u-1 pure-u-md-1-5">
|
||||
<% if watched.size >= limit %>
|
||||
<a href="/feed/history?page=<%= page + 1 %>">
|
||||
<%= translate(locale, "Next page") %>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
@ -1,11 +1,36 @@
|
||||
<% 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| %>
|
||||
<div class="pure-g">
|
||||
<% slice.each do |item| %>
|
||||
<%= rendered "components/item" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
153
src/invidious/views/licenses.ecr
Normal file
@ -0,0 +1,153 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1><%= translate(locale, "JavaScript license information") %></h1>
|
||||
<table id="jslicense-labels1">
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/js/dash.mediaplayer.min.js">dash.mediaplayer.min.js</a>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="http://directory.fsf.org/wiki/License:BSD_3Clause">Modified-BSD</a>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="https://unpkg.com/dashjs@2.9.0/dist/dash.mediaplayer.debug.js"><%= translate(locale, "source") %></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/js/silvermine-videojs-quality-selector.min.js">silvermine-videojs-quality-selector.min.js</a>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="http://www.jclark.com/xml/copying.txt">Expat</a>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="/js/silvermine-videojs-quality-selector.js"><%= translate(locale, "source") %></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/js/video.min.js">video.min.js</a>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="http://www.apache.org/licenses/LICENSE-2.0">Apache-2.0-only</a>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="https://unpkg.com/video.js@6.12.1/dist/video.js"><%= translate(locale, "source") %></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/js/videojs-contrib-quality-levels.min.js">videojs-contrib-quality-levels.min.js</a>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="http://www.apache.org/licenses/LICENSE-2.0">Apache-2.0-only</a>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="https://unpkg.com/videojs-contrib-quality-levels@2.0.7/dist/videojs-contrib-quality-levels.js"><%= translate(locale, "source") %></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/js/videojs-dash.min.js">videojs-dash.min.js</a>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="http://www.apache.org/licenses/LICENSE-2.0">Apache-2.0-only</a>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="https://unpkg.com/videojs-contrib-dash@2.8.2/dist/videojs-dash.js"><%= translate(locale, "source") %></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/js/videojs-http-streaming.min.js">videojs-http-streaming.min.js</a>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="http://www.apache.org/licenses/LICENSE-2.0">Apache-2.0-only</a>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="https://unpkg.com/@videojs/http-streaming@1.2.2/dist/videojs-http-streaming.js"><%= translate(locale, "source") %></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/js/videojs-markers.min.js">videojs-markers.min.js</a>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="http://www.jclark.com/xml/copying.txt">Expat</a>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="https://unpkg.com/videojs-markers@1.0.1/dist/videojs-markers.js"><%= translate(locale, "source") %></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/js/videojs-share.min.js">videojs-share.min.js</a>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="http://www.jclark.com/xml/copying.txt">Expat</a>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="https://unpkg.com/videojs-share@2.0.1/dist/videojs-share.js"><%= translate(locale, "source") %></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/js/videojs.hotkeys.min.js">videojs.hotkeys.min.js</a>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="http://www.apache.org/licenses/LICENSE-2.0">Apache-2.0-only</a>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="/js/videojs.hotkeys.js"><%= translate(locale, "source") %></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/js/watch.js">watch.js</a>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="https://www.gnu.org/licenses/agpl-3.0.html">AGPL-3.0</a>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="/js/watch.js"><%= translate(locale, "source") %></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
@ -1,5 +1,5 @@
|
||||
<% content_for "header" do %>
|
||||
<title>Login - Invidious</title>
|
||||
<title><%= translate(locale, "Login") %> - Invidious</title>
|
||||
<% end %>
|
||||
|
||||
<div class="pure-g">
|
||||
@ -8,46 +8,72 @@
|
||||
<div class="h-box">
|
||||
<div class="pure-g">
|
||||
<div class="pure-u-1-2">
|
||||
<a class="pure-button <% if account_type == "invidious" %>pure-button-disabled<% end %>" href="/login">Login/Register</a>
|
||||
<a class="pure-button <% if account_type == "invidious" %>pure-button-disabled<% end %>" href="/login">
|
||||
<%= translate(locale, "Login/Register") %>
|
||||
</a>
|
||||
</div>
|
||||
<div class="pure-u-1-2">
|
||||
<a class="pure-button <% if account_type == "google" %>pure-button-disabled<% end %>" href="/login?type=google">Login to Google</a>
|
||||
<a class="pure-button <% if account_type == "google" %>pure-button-disabled<% end %>" href="/login?type=google">
|
||||
<%= translate(locale, "Login to Google") %>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<% if account_type == "invidious" %>
|
||||
<form class="pure-form pure-form-stacked" action="/login?referer=<%= URI.escape(referer) %>&type=invidious" method="post">
|
||||
<fieldset>
|
||||
<label for="email">User ID:</label>
|
||||
<label for="email"><%= translate(locale, "User ID:") %></label>
|
||||
<input required class="pure-input-1" name="email" type="text" placeholder="User ID">
|
||||
|
||||
<label for="password">Password:</label>
|
||||
<label for="password"><%= translate(locale, "Password:") %></label>
|
||||
<input required class="pure-input-1" name="password" type="password" placeholder="Password">
|
||||
|
||||
<img style="width:100%" src='<%= captcha.not_nil![:challenge] %>'/>
|
||||
<% if captcha_type == "image" %>
|
||||
<img style="width:100%" src='<%= captcha.not_nil![:image] %>'/>
|
||||
<input type="hidden" name="token" value="<%= captcha.not_nil![:token] %>">
|
||||
<label for="challenge_response">Time (h:mm):</label>
|
||||
<input required type="text" name="challenge_response" type="text>" placeholder="hh:mm">
|
||||
<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 %>
|
||||
<label for="text_answer"><%= text_captcha.not_nil![:question] %></label>
|
||||
<input required type="text" name="text_answer" type="text" placeholder="Answer">
|
||||
|
||||
<button type="submit" name="action" value="signin" class="pure-button pure-button-primary">Sign In</button>
|
||||
<button type="submit" name="action" value="register" class="pure-button pure-button-primary">Register</button>
|
||||
<label>
|
||||
<a href="/login?referer=<%= URI.escape(referer) %>&type=invidious">
|
||||
<%= translate(locale, "Image CAPTCHA") %>
|
||||
</a>
|
||||
</label>
|
||||
<% 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>
|
||||
</form>
|
||||
<% elsif account_type == "google" %>
|
||||
<form class="pure-form pure-form-stacked" action="/login?referer=<%= URI.escape(referer) %>" method="post">
|
||||
<fieldset>
|
||||
<label for="email">Email:</label>
|
||||
<label for="email"><%= translate(locale, "Email:") %></label>
|
||||
<input required class="pure-input-1" name="email" type="email" placeholder="Email">
|
||||
|
||||
<label for="password">Password:</label>
|
||||
<label for="password"><%= translate(locale, "Password:") %></label>
|
||||
<input required class="pure-input-1" name="password" type="password" placeholder="Password">
|
||||
|
||||
<% if tfa %>
|
||||
<label for="tfa">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">
|
||||
<% end %>
|
||||
|
||||
<button type="submit" class="pure-button pure-button-primary">Sign in</button>
|
||||
<button type="submit" class="pure-button pure-button-primary"><%= translate(locale, "Sign In") %></button>
|
||||
</fieldset>
|
||||
</form>
|
||||
<% end %>
|
||||
|
@ -13,10 +13,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% mix.videos.each_slice(4) do |slice| %>
|
||||
<div class="pure-g">
|
||||
<% mix.videos.each_slice(4) do |slice| %>
|
||||
<% slice.each do |item| %>
|
||||
<%= rendered "components/item" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
@ -24,24 +24,28 @@
|
||||
<p><%= playlist.description_html %></p>
|
||||
</div>
|
||||
|
||||
<% videos.each_slice(4) do |slice| %>
|
||||
<div class="pure-g">
|
||||
<% videos.each_slice(4) do |slice| %>
|
||||
<% slice.each do |item| %>
|
||||
<%= rendered "components/item" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="pure-g h-box">
|
||||
<div class="pure-u-1 pure-u-md-1-5">
|
||||
<% if page >= 2 %>
|
||||
<a href="/playlist?list=<%= playlist.id %>&page=<%= page - 1 %>">Previous page</a>
|
||||
<a href="/playlist?list=<%= playlist.id %>&page=<%= page - 1 %>">
|
||||
<%= translate(locale, "Previous page") %>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-md-3-5"></div>
|
||||
<div style="text-align:right;" class="pure-u-1 pure-u-md-1-5">
|
||||
<% if videos.size == 100 %>
|
||||
<a href="/playlist?list=<%= playlist.id %>&page=<%= page + 1 %>">Next page</a>
|
||||
<a href="/playlist?list=<%= playlist.id %>&page=<%= page + 1 %>">
|
||||
<%= translate(locale, "Next page") %>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
11
src/invidious/views/popular.ecr
Normal file
@ -0,0 +1,11 @@
|
||||
<% content_for "header" do %>
|
||||
<title><%= translate(locale, "Popular") %> - Invidious</title>
|
||||
<% end %>
|
||||
|
||||
<div class="pure-g">
|
||||
<% popular_videos.each_slice(4) do |slice| %>
|
||||
<% slice.each do |item| %>
|
||||
<%= rendered "components/item" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
@ -1,5 +1,5 @@
|
||||
<% content_for "header" do %>
|
||||
<title>Preferences - Invidious</title>
|
||||
<title><%= translate(locale, "Preferences") %> - Invidious</title>
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
@ -11,20 +11,30 @@ function update_value(element) {
|
||||
<div class="h-box">
|
||||
<form class="pure-form pure-form-aligned" action="/preferences?referer=<%= referer %>" method="post">
|
||||
<fieldset>
|
||||
<legend>Player preferences</legend>
|
||||
<legend><%= translate(locale, "Player preferences") %></legend>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="video_loop">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 %>>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="autoplay">Autoplay: </label>
|
||||
<label for="autoplay"><%= translate(locale, "Autoplay: ") %></label>
|
||||
<input name="autoplay" id="autoplay" type="checkbox" <% if user.preferences.autoplay %>checked<% end %>>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="speed">Default speed: </label>
|
||||
<label for="continue"><%= translate(locale, "Autoplay next video: ") %></label>
|
||||
<input name="continue" id="continue" type="checkbox" <% if user.preferences.continue %>checked<% end %>>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="listen"><%= translate(locale, "Listen by default: ") %></label>
|
||||
<input name="listen" id="listen" type="checkbox" <% if user.preferences.listen %>checked<% end %>>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="speed"><%= translate(locale, "Default speed: ") %></label>
|
||||
<select name="speed" id="speed">
|
||||
<% {2.0, 1.5, 1.0, 0.5}.each do |option| %>
|
||||
<option <% if user.preferences.speed == option %> selected <% end %>><%= option %></option>
|
||||
@ -33,131 +43,148 @@ function update_value(element) {
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="quality">Preferred video quality: </label>
|
||||
<label for="quality"><%= translate(locale, "Preferred video quality: ") %></label>
|
||||
<select name="quality" id="quality">
|
||||
<% {"dash", "hd720", "medium", "small"}.each do |option| %>
|
||||
<option <% if user.preferences.quality == option %> selected <% end %>><%= option %></option>
|
||||
<option value="<%= option %>" <% if user.preferences.quality == option %> selected <% end %>><%= translate(locale, option) %></option>
|
||||
<% end %>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="volume">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 %>">
|
||||
<span class="pure-form-message-inline" id="volume-value"><%= user.preferences.volume %></span>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="comments_0">Default comments: </label>
|
||||
<label for="comments_0"><%= translate(locale, "Default comments: ") %></label>
|
||||
<select name="comments_0" id="comments_0">
|
||||
<% {"", "youtube", "reddit"}.each do |option| %>
|
||||
<option <% if user.preferences.comments[0] == option %> selected <% end %>><%= option %></option>
|
||||
<option value="<%= option %>" <% if user.preferences.comments[0] == option %> selected <% end %>><%= translate(locale, option) %></option>
|
||||
<% end %>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="comments_1">Fallback comments: </label>
|
||||
<label for="comments_1"><%= translate(locale, "Fallback comments: ") %></label>
|
||||
<select name="comments_1" id="comments_1">
|
||||
<% {"", "youtube", "reddit"}.each do |option| %>
|
||||
<option <% if user.preferences.comments[1] == option %> selected <% end %>><%= option %></option>
|
||||
<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">Default captions: </label>
|
||||
<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| %>
|
||||
<option <% if user.preferences.captions[0] == option %> selected <% end %>><%= option %></option>
|
||||
<option value="<%= option %>" <% if user.preferences.captions[0] == option %> selected <% end %>><%= translate(locale, option) %></option>
|
||||
<% end %>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="captions_fallback">Fallback captions: </label>
|
||||
<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 <% if user.preferences.captions[1] == option %> selected <% end %>><%= option %></option>
|
||||
<option value="<%= option %>" <% if user.preferences.captions[1] == option %> selected <% end %>><%= translate(locale, option) %></option>
|
||||
<% end %>
|
||||
</select>
|
||||
|
||||
<select class="pure-u-1-5" name="captions_2" id="captions_2">
|
||||
<% CAPTION_LANGUAGES.each do |option| %>
|
||||
<option <% if user.preferences.captions[2] == option %> selected <% end %>><%= option %></option>
|
||||
<option value="<%= option %>" <% if user.preferences.captions[2] == option %> selected <% end %>><%= translate(locale, option) %></option>
|
||||
<% end %>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="related_videos">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 %>>
|
||||
</div>
|
||||
|
||||
<legend>Visual preferences</legend>
|
||||
<legend><%= translate(locale, "Visual preferences") %></legend>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="dark_mode">Dark mode: </label>
|
||||
<label for="locale"><%= translate(locale, "Language: ") %></label>
|
||||
<select name="locale" id="locale">
|
||||
<% LOCALES.each_key do |option| %>
|
||||
<option value="<%= option %>" <% if user.preferences.locale == option %> selected <% end %>><%= option %></option>
|
||||
<% end %>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<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 %>>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="thin_mode">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 %>>
|
||||
</div>
|
||||
|
||||
<legend>Subscription preferences</legend>
|
||||
<legend><%= translate(locale, "Subscription preferences") %></legend>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="redirect_feed">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 %>>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="max_results">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 %>">
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="sort">Sort videos by: </label>
|
||||
<label for="sort"><%= translate(locale, "Sort videos by: ") %></label>
|
||||
<select name="sort" id="sort">
|
||||
<% ["published", "alphabetically", "alphabetically - reverse", "channel name", "channel name - reverse"].each do |option| %>
|
||||
<option <% if user.preferences.sort == option %> selected <% end %>><%= option %></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>
|
||||
<% end %>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="latest_only">Only show latest <% if user.preferences.unseen_only %>unseen<% end %> video from channel: </label>
|
||||
<label for="latest_only">Only show latest <% if user.preferences.unseen_only %>unwatched<% end %> video from channel: </label>
|
||||
<input name="latest_only" id="latest_only" type="checkbox" <% if user.preferences.latest_only %>checked<% end %>>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="unseen_only">Only show unseen: </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 %>>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="notifications_only">Only show notifications: </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 %>>
|
||||
</div>
|
||||
|
||||
<legend>Data preferences</legend>
|
||||
<legend><%= translate(locale, "Data preferences") %></legend>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<a href="/clear_watch_history?referer=<%= referer %>">Clear watch history</a>
|
||||
<a href="/clear_watch_history?referer=<%= URI.escape(referer) %>"><%= translate(locale, "Clear watch history") %></a>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<a href="/data_control?referer=<%= referer %>">Import/Export data</a>
|
||||
<a href="/data_control?referer=<%= URI.escape(referer) %>"><%= translate(locale, "Import/Export data") %></a>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<a href="/subscription_manager">Manage subscriptions</a>
|
||||
<a href="/subscription_manager"><%= translate(locale, "Manage subscriptions") %></a>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<a href="/feed/history"><%= translate(locale, "Watch history") %></a>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<a href="/delete_account?referer=<%= URI.escape(referer) %>"><%= translate(locale, "Delete account") %></a>
|
||||
</div>
|
||||
|
||||
<div class="pure-controls">
|
||||
<button type="submit" class="pure-button pure-button-primary">Save preferences</button>
|
||||
<button type="submit" class="pure-button pure-button-primary"><%= translate(locale, "Save preferences") %></button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
@ -1,25 +1,29 @@
|
||||
<% content_for "header" do %>
|
||||
<title><%= search_query.not_nil!.size > 30 ? query.not_nil![0,30].rstrip(".") + "..." : query.not_nil! %> - Invidious</title>
|
||||
<title><%= search_query.not_nil!.size > 30 ? HTML.escape(query.not_nil![0,30].rstrip(".") + "...") : HTML.escape(query.not_nil!) %> - Invidious</title>
|
||||
<% end %>
|
||||
|
||||
<% videos.each_slice(4) do |slice| %>
|
||||
<div class="pure-g">
|
||||
<% videos.each_slice(4) do |slice| %>
|
||||
<% slice.each do |item| %>
|
||||
<%= rendered "components/item" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="pure-g h-box">
|
||||
<div class="pure-u-1 pure-u-md-1-5">
|
||||
<% if page >= 2 %>
|
||||
<a href="/search?q=<%= query %>&page=<%= page - 1 %>">Previous page</a>
|
||||
<a href="/search?q=<%= HTML.escape(query.not_nil!) %>&page=<%= page - 1 %>">
|
||||
<%= translate(locale, "Previous page") %>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-md-3-5"></div>
|
||||
<div style="text-align:right;" class="pure-u-1 pure-u-md-1-5">
|
||||
<% if count >= 20 %>
|
||||
<a href="/search?q=<%= query %>&page=<%= page + 1 %>">Next page</a>
|
||||
<a href="/search?q=<%= HTML.escape(query.not_nil!) %>&page=<%= page + 1 %>">
|
||||
<%= translate(locale, "Next page") %>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,14 +1,19 @@
|
||||
<% content_for "header" do %>
|
||||
<title>Subscription manager - Invidious</title>
|
||||
<title><%= translate(locale, "Subscription manager") %> - Invidious</title>
|
||||
<% end %>
|
||||
|
||||
<div class="pure-g h-box">
|
||||
<div class="pure-u-2-3">
|
||||
<h3><%= subscriptions.size %> subscriptions</h3>
|
||||
<div class="pure-u-1-3">
|
||||
<h3><%= translate(locale, "`x` subscriptions", %(<span id="count">#{subscriptions.size}</span>)) %></h3>
|
||||
</div>
|
||||
<div class="pure-u-1-3" style="text-align:center;">
|
||||
<h3>
|
||||
<a href="/feed/history"><%= translate(locale, "Watch history") %></a>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="pure-u-1-3" style="text-align:right;">
|
||||
<h3>
|
||||
<a href="/data_control?referer=<%= referer %>">Import/Export</a>
|
||||
<a href="/data_control?referer=<%= referer %>"><%= translate(locale, "Import/Export") %></a>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
@ -24,7 +29,12 @@
|
||||
<div class="pure-u-2-5"></div>
|
||||
<div class="pure-u-1-5" style="text-align: right;">
|
||||
<h3>
|
||||
<a href="/subscription_ajax?action_remove_subscriptions=1&c=<%= channel.id %>">unsubscribe</a>
|
||||
<a onclick="remove_subscription(this)"
|
||||
data-id="<%= channel.id %>"
|
||||
onmouseenter='this["href"]="javascript:void(0)"'
|
||||
href="/subscription_ajax?action_remove_subscriptions=1&c=<%= channel.id %>">
|
||||
<%= translate(locale, "unsubscribe") %>
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
@ -34,3 +44,28 @@
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
function remove_subscription(target) {
|
||||
var row = target.parentNode.parentNode.parentNode.parentNode;
|
||||
row.style.display = "none";
|
||||
var count = document.getElementById("count")
|
||||
count.innerText = count.innerText - 1;
|
||||
|
||||
var url = "/subscription_ajax?action_remove_subscriptions=1&redirect=false&c=" + target.getAttribute("data-id");
|
||||
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) {
|
||||
count.innerText = count.innerText - 1 + 2;
|
||||
row.style.display = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,11 +1,16 @@
|
||||
<% content_for "header" do %>
|
||||
<title>Subscriptions - Invidious</title>
|
||||
<title><%= translate(locale, "Subscriptions") %> - Invidious</title>
|
||||
<% end %>
|
||||
|
||||
<div class="pure-g h-box">
|
||||
<div class="pure-u-2-3">
|
||||
<div class="pure-u-1-3">
|
||||
<h3>
|
||||
<a href="/subscription_manager">Manage subscriptions</a>
|
||||
<a href="/subscription_manager"><%= translate(locale, "Manage subscriptions") %></a>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="pure-u-1-3" style="text-align:center;">
|
||||
<h3>
|
||||
<a href="/feed/history"><%= translate(locale, "Watch history") %></a>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="pure-u-1-3" style="text-align:right;">
|
||||
@ -15,7 +20,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<center><%= notifications.size %> unseen notifications</center>
|
||||
<center><%= translate(locale, "`x` unseen notifications", "#{notifications.size}") %></center>
|
||||
|
||||
<% if !notifications.empty? %>
|
||||
<div class="h-box">
|
||||
@ -23,36 +28,62 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="pure-g">
|
||||
<% notifications.each_slice(4) do |slice| %>
|
||||
<div class="pure-g">
|
||||
<% slice.each do |item| %>
|
||||
<%= rendered "components/item" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="h-box">
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<div class="pure-g">
|
||||
<% videos.each_slice(4) do |slice| %>
|
||||
<div class="pure-g">
|
||||
<% slice.each do |item| %>
|
||||
<%= rendered "components/item" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function mark_watched(target) {
|
||||
var tile = target.parentNode.parentNode.parentNode.parentNode;
|
||||
tile.style.display = "none";
|
||||
|
||||
var url = "/mark_watched?redirect=false&id=" + target.getAttribute("data-id");
|
||||
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) {
|
||||
tile.style.display = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="pure-g">
|
||||
<div class="pure-u-1 pure-u-md-1-5">
|
||||
<% if page >= 2 %>
|
||||
<a href="/feed/subscriptions?max_results=<%= max_results %>&page=<%= page - 1 %>">Previous page</a>
|
||||
<a href="/feed/subscriptions?max_results=<%= max_results %>&page=<%= page - 1 %>">
|
||||
<%= translate(locale, "Previous page") %>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-md-3-5"></div>
|
||||
<div style="text-align:right;" class="pure-u-1 pure-u-md-1-5">
|
||||
<% if (videos.size + notifications.size) == max_results %>
|
||||
<a href="/feed/subscriptions?max_results=<%= max_results %>&page=<%= page + 1 %>">Next page</a>
|
||||
<a href="/feed/subscriptions?max_results=<%= max_results %>&page=<%= page + 1 %>">
|
||||
<%= translate(locale, "Next page") %>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -6,6 +6,14 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="referrer" content="no-referrer">
|
||||
<%= yield_content "header" %>
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
|
||||
<link rel="manifest" href="/site.webmanifest">
|
||||
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#575757">
|
||||
<meta name="msapplication-TileColor" content="#575757">
|
||||
<meta name="theme-color" content="#575757">
|
||||
<link title="Invidious" type="application/opensearchdescription+xml" rel="search" href="/opensearch.xml">
|
||||
<link rel="stylesheet" href="/css/pure-min.css">
|
||||
<link rel="stylesheet" href="/css/grids-responsive-min.css">
|
||||
<link rel="stylesheet" href="/css/ionicons.min.css">
|
||||
@ -17,6 +25,8 @@
|
||||
<% end %>
|
||||
</head>
|
||||
|
||||
<% locale = LOCALES[env.get("locale").as(String)]? %>
|
||||
|
||||
<body>
|
||||
<div class="pure-g">
|
||||
<div class="pure-u-1 pure-u-md-2-24"></div>
|
||||
@ -28,7 +38,7 @@
|
||||
<div class="pure-u-1 pure-u-md-12-24 searchbar">
|
||||
<form class="pure-form" action="/search" method="get">
|
||||
<fieldset>
|
||||
<input type="search" style="width:100%;" name="q" placeholder="search" value="<%= env.params.query["q"]?.try {|x| HTML.escape(x)} || env.get?("search").try {|x| HTML.escape(x.as(String)) } %>">
|
||||
<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)} %>">
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
@ -60,34 +70,50 @@
|
||||
</a>
|
||||
</div>
|
||||
<div class="pure-u-1-4">
|
||||
<a href="/signout?referer=<%= env.get?("current_page") %>" class="pure-menu-heading">Sign out</a>
|
||||
<a href="/signout?referer=<%= env.get?("current_page") %>&token=<%= env.get?("token") %>&challenge=<%= env.get?("challenge") %>" class="pure-menu-heading">
|
||||
<%= translate(locale, "Sign out") %>
|
||||
</a>
|
||||
</div>
|
||||
<% else %>
|
||||
<a href="/login?referer=<%= env.get?("current_page") %>" class="pure-menu-heading">Login</a>
|
||||
<a href="/login?referer=<%= env.get?("current_page") %>" class="pure-menu-heading">
|
||||
<%= translate(locale, "Login") %>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<%= content %>
|
||||
<div class="footer">
|
||||
Released under AGPLv3 by <a href="https://github.com/omarroth">Omar
|
||||
Roth</a>.
|
||||
Source available <a
|
||||
href="https://github.com/omarroth/invidious">here</a>.
|
||||
<p>Liberapay:
|
||||
<p>
|
||||
<a href="https://github.com/omarroth">
|
||||
<%= translate(locale, "Released under the AGPLv3 by Omar Roth.") %>
|
||||
</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="https://github.com/omarroth/invidious">
|
||||
<%= translate(locale, "Source available here.") %>
|
||||
</a>
|
||||
</p>
|
||||
<p><%= translate(locale, "Liberapay: ") %>
|
||||
<a href="https://liberapay.com/omarroth">
|
||||
https://liberapay.com/omarroth
|
||||
</a>
|
||||
</p>
|
||||
<p>Patreon:
|
||||
<p><%= translate(locale, "Patreon: ") %>
|
||||
<a href="https://patreon.com/omarroth">
|
||||
https://patreon.com/omarroth
|
||||
</a>
|
||||
</p>
|
||||
<p>BTC: 356DpZyMXu6rYd55Yqzjs29n79kGKWcYrY</p>
|
||||
<p>BCH: qq4ptclkzej5eza6a50et5ggc58hxsq5aylqut2npk</p>
|
||||
<p><%= translate(locale, "BTC: ") %>356DpZyMXu6rYd55Yqzjs29n79kGKWcYrY</p>
|
||||
<p><%= translate(locale, "BCH: ") %>qq4ptclkzej5eza6a50et5ggc58hxsq5aylqut2npk</p>
|
||||
<p>
|
||||
<a rel="jslicense" href="/licenses">
|
||||
<%= translate(locale, "View JavaScript license information.") %>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-md-2-24"></div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
11
src/invidious/views/top.ecr
Normal file
@ -0,0 +1,11 @@
|
||||
<% content_for "header" do %>
|
||||
<title><%= translate(locale, "Top") %> - Invidious</title>
|
||||
<% end %>
|
||||
|
||||
<div class="pure-g">
|
||||
<% top_videos.each_slice(4) do |slice| %>
|
||||
<% slice.each do |item| %>
|
||||
<%= rendered "components/item" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
37
src/invidious/views/trending.ecr
Normal file
@ -0,0 +1,37 @@
|
||||
<% content_for "header" do %>
|
||||
<title><%= translate(locale, "Trending") %> - Invidious</title>
|
||||
<% end %>
|
||||
|
||||
<div class="pure-g h-box">
|
||||
<div class="pure-u-2-3">
|
||||
<form class="pure-form pure-form-aligned" action="/feed/trending" method="get">
|
||||
</form>
|
||||
</div>
|
||||
<div class="pure-u-1-3">
|
||||
<div class="pure-g" style="text-align:right;">
|
||||
<% {"Default", "Music", "Gaming", "News", "Movies"}.each do |option| %>
|
||||
<div class="pure-u-1 pure-md-1-3">
|
||||
<% if trending_type == option %>
|
||||
<b><%= translate(locale, option) %></b>
|
||||
<% else %>
|
||||
<a href="/feed/trending?type=<%= option %>®ion=<%= region %>">
|
||||
<%= translate(locale, option) %>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="h-box">
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<div class="pure-g">
|
||||
<% trending.each_slice(4) do |slice| %>
|
||||
<% slice.each do |item| %>
|
||||
<%= rendered "components/item" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
@ -1,7 +1,7 @@
|
||||
<% content_for "header" do %>
|
||||
<meta name="thumbnail" content="<%= thumbnail %>">
|
||||
<meta name="description" content="<%= description %>">
|
||||
<meta name="keywords" content="<%= video.info["keywords"] %>">
|
||||
<meta name="keywords" content="<%= video.keywords.join(",") %>">
|
||||
<meta property="og:site_name" content="Invidious">
|
||||
<meta property="og:url" content="<%= host_url %>/watch?v=<%= video.id %>">
|
||||
<meta property="og:title" content="<%= HTML.escape(video.title) %>">
|
||||
@ -18,10 +18,11 @@
|
||||
<meta name="twitter:url" content="<%= host_url %>/watch?v=<%= video.id %>">
|
||||
<meta name="twitter:title" content="<%= HTML.escape(video.title) %>">
|
||||
<meta name="twitter:description" content="<%= description %>">
|
||||
<meta name="twitter:image" content="<%= thumbnail %>">
|
||||
<meta name="twitter:image" content="/vi/<%= video.id %>/hqdefault.jpg">
|
||||
<meta name="twitter:player" content="<%= host_url %>/embed/<%= video.id %>">
|
||||
<meta name="twitter:player:width" content="1280">
|
||||
<meta name="twitter:player:height" content="720">
|
||||
<script src="/js/watch.js"></script>
|
||||
<%= rendered "components/player_sources" %>
|
||||
<title><%= HTML.escape(video.title) %> - Invidious</title>
|
||||
<% end %>
|
||||
@ -34,7 +35,7 @@
|
||||
<h1>
|
||||
<%= HTML.escape(video.title) %>
|
||||
<% if params[:listen] %>
|
||||
<a href="/watch?<%= env.params.query %>">
|
||||
<a href="/watch?<%= env.params.query %>&listen=0">
|
||||
<i class="icon ion-ios-videocam"></i>
|
||||
</a>
|
||||
<% else %>
|
||||
@ -51,11 +52,11 @@
|
||||
<div class="pure-g">
|
||||
<div class="pure-u-1 pure-u-md-1-5">
|
||||
<div class="h-box">
|
||||
<p><a href="https://www.youtube.com/watch?v=<%= video.id %>">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>
|
||||
<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-down"></i> <%= number_with_separator(video.dislikes) %></p>
|
||||
<p id="Genre">Genre:
|
||||
<p id="Genre"><%= translate(locale, "Genre: ") %>
|
||||
<% if video.genre_url.empty? %>
|
||||
<%= video.genre %>
|
||||
<% else %>
|
||||
@ -63,25 +64,25 @@
|
||||
<% end %>
|
||||
</p>
|
||||
<% if !video.license.empty? %>
|
||||
<p id="License">License: <%= video.license %></p>
|
||||
<p id="License"><%= translate(locale, "License: ") %><%= video.license %></p>
|
||||
<% end %>
|
||||
<p id="FamilyFriendly">Family Friendly? <%= video.is_family_friendly %></p>
|
||||
<p id="Wilson">Wilson Score: <%= video.wilson_score.round(4) %></p>
|
||||
<p id="Rating">Rating: <%= rating.round(4) %> / 5</p>
|
||||
<p id="Engagement">Engagement: <%= engagement.round(2) %>%</p>
|
||||
<p id="FamilyFriendly"><%= translate(locale, "Family friendly? ") %><%= video.is_family_friendly %></p>
|
||||
<p id="Wilson"><%= translate(locale, "Wilson score: ") %><%= video.wilson_score.round(4) %></p>
|
||||
<p id="Rating"><%= translate(locale, "Rating: ") %><%= rating.round(4) %> / 5</p>
|
||||
<p id="Engagement"><%= translate(locale, "Engagement: ") %><%= engagement.round(2) %>%</p>
|
||||
<% if video.allowed_regions.size != REGIONS.size %>
|
||||
<p id="AllowedRegions">
|
||||
<% if video.allowed_regions.size < REGIONS.size / 2 %>
|
||||
Whitelisted regions: <%= video.allowed_regions.join(", ") %>
|
||||
<%= translate(locale, "Whitelisted regions: ") %><%= video.allowed_regions.join(", ") %>
|
||||
<% else %>
|
||||
Blacklisted regions: <%= (REGIONS.to_a - video.allowed_regions).join(", ") %>
|
||||
<%= translate(locale, "Blacklisted regions: ") %><%= (REGIONS.to_a - video.allowed_regions).join(", ") %>
|
||||
<% end %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-3-5">
|
||||
<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="h-box">
|
||||
<p>
|
||||
<a href="/channel/<%= video.ucid %>">
|
||||
@ -91,45 +92,76 @@
|
||||
<% if user %>
|
||||
<% if subscriptions.includes? video.ucid %>
|
||||
<p>
|
||||
<a href="/subscription_ajax?action_remove_subscriptions=1&c=<%= video.ucid %>&referer=<%= env.get("current_page") %>">
|
||||
<b>Unsubscribe from <%= video.author %></b>
|
||||
<a id="subscribe" onclick="unsubscribe()" class="pure-button pure-button-primary"
|
||||
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 href="/subscription_ajax?action_create_subscription_to_channel=1&c=<%= video.ucid %>&referer=<%= env.get("current_page") %>">
|
||||
<b>Subscribe to <%= video.author %></b>
|
||||
<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 href="/login?referer=<%= env.get("current_page") %>">
|
||||
<b>Login to subscribe to <%= video.author %></b>
|
||||
<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>
|
||||
<b>Shared <%= video.published.to_s("%B %-d, %Y") %></b>
|
||||
<b><%= translate(locale, "Shared `x`", video.published.to_s("%B %-d, %Y")) %></b>
|
||||
</p>
|
||||
<div>
|
||||
<%= video.description %>
|
||||
</div>
|
||||
<hr>
|
||||
<div id="comments">
|
||||
<h3><center class="loading"><i class="icon ion-ios-refresh"></i></center></h3>
|
||||
<% if nojs %>
|
||||
<%= comment_html %>
|
||||
<% else %>
|
||||
<noscript>
|
||||
<a href="/watch?<%= env.params.query %>&nojs=1">
|
||||
<%= translate(locale, "Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.") %>
|
||||
</a>
|
||||
</noscript>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% if preferences && preferences.related_videos || plid %>
|
||||
<div class="pure-u-1 pure-u-md-1-5">
|
||||
<% if plid %>
|
||||
<div id="playlist" class="h-box">
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if !preferences || preferences && preferences.related_videos %>
|
||||
<div class="h-box">
|
||||
|
||||
<% if !rvs.empty? %>
|
||||
<div id="continue" <% if plid %>style="display:none"<% end %>>
|
||||
<div class="pure-control-group">
|
||||
<label for="continue"><%= translate(locale, "Autoplay next video: ") %></label>
|
||||
<input name="continue" onclick="continue_autoplay(this)" id="continue" type="checkbox" <% if params[:continue] %>checked<% end %>>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% rvs.each do |rv| %>
|
||||
<% if rv.has_key?("id") %>
|
||||
<% if rv["id"]? %>
|
||||
<a href="/watch?v=<%= rv["id"] %>">
|
||||
<% if preferences && preferences.thin_mode %>
|
||||
<% else %>
|
||||
<img style="width:100%;" src="/vi/<%= rv["id"] %>/mqdefault.jpg">
|
||||
<div class="thumbnail">
|
||||
<img class="thumbnail" src="/vi/<%= rv["id"] %>/mqdefault.jpg">
|
||||
<p class="length"><%= recode_length_seconds(rv["length_seconds"]?.try &.to_i? || 0) %></p>
|
||||
</div>
|
||||
<% end %>
|
||||
<p style="width:100%"><%= rv["title"] %></p>
|
||||
<p>
|
||||
@ -141,41 +173,170 @@
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function toggle(target) {
|
||||
body = target.parentNode.parentNode.children[1];
|
||||
if (body.style.display === null || body.style.display === "") {
|
||||
target.innerHTML = "[ + ]";
|
||||
body.style.display = "none";
|
||||
} else {
|
||||
target.innerHTML = "[ - ]";
|
||||
body.style.display = "";
|
||||
}
|
||||
<% if !rvs.empty? && !plid && params[:continue] %>
|
||||
player.on('ended', function() {
|
||||
window.location.replace("/watch?v="
|
||||
+ "<%= rvs.select { |rv| rv["id"]? }[0]?.try &.["id"] %>"
|
||||
+ "&continue=1"
|
||||
<% if params[:listen] %>
|
||||
+ "&listen=1"
|
||||
<% end %>
|
||||
<% if params[:autoplay] %>
|
||||
+ "&autoplay=1"
|
||||
<% end %>
|
||||
<% if params[:speed] %>
|
||||
+ "&speed=<%= params[:speed] %>"
|
||||
<% end %>
|
||||
);
|
||||
});
|
||||
<% end %>
|
||||
|
||||
function continue_autoplay(target) {
|
||||
if (target.checked) {
|
||||
player.on('ended', function() {
|
||||
window.location.replace("/watch?v="
|
||||
+ "<%= rvs.select { |rv| rv["id"]? }[0]?.try &.["id"] %>"
|
||||
+ "&continue=1"
|
||||
<% if params[:listen] %>
|
||||
+ "&listen=1"
|
||||
<% end %>
|
||||
<% if params[:autoplay] %>
|
||||
+ "&autoplay=1"
|
||||
<% end %>
|
||||
<% if params[:speed] %>
|
||||
+ "&speed=<%= params[:speed] %>"
|
||||
<% end %>
|
||||
);
|
||||
});
|
||||
} else {
|
||||
player.off('ended');
|
||||
}
|
||||
}
|
||||
|
||||
function toggle_comments(target) {
|
||||
body = target.parentNode.parentNode.parentNode.children[1];
|
||||
if (body.style.display === null || body.style.display === "") {
|
||||
target.innerHTML = "[ + ]";
|
||||
body.style.display = "none";
|
||||
} else {
|
||||
target.innerHTML = "[ - ]";
|
||||
body.style.display = "";
|
||||
function number_with_separator(val) {
|
||||
while (/(\d+)(\d{3})/.test(val.toString())) {
|
||||
val = val.toString().replace(/(\d+)(\d{3})/, "$1" + "," + "$2");
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
function get_youtube_replies(target) {
|
||||
var continuation = target.getAttribute("data-continuation");
|
||||
subscribe_button = document.getElementById("subscribe");
|
||||
if (subscribe_button.getAttribute('onclick')) {
|
||||
subscribe_button["href"] = "javascript:void(0)";
|
||||
}
|
||||
|
||||
var body = target.parentNode.parentNode;
|
||||
var fallback = body.innerHTML;
|
||||
body.innerHTML =
|
||||
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 %>
|
||||
function get_playlist() {
|
||||
playlist = document.getElementById("playlist");
|
||||
playlist.innerHTML = ' \
|
||||
<h3><center class="loading"><i class="icon ion-ios-refresh"></i></center></h3> \
|
||||
<hr>'
|
||||
|
||||
var plid = "<%= plid %>"
|
||||
|
||||
if (plid.startsWith("RD")) {
|
||||
var plid_url = "/api/v1/mixes/<%= plid %>?continuation=<%= video.id %>&format=html&hl=<%= env.get("locale").as(String) %>";
|
||||
} else {
|
||||
var plid_url = "/api/v1/playlists/<%= plid %>?continuation=<%= video.id %>&format=html&hl=<%= env.get("locale").as(String) %>";
|
||||
}
|
||||
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.responseType = "json";
|
||||
xhr.timeout = 20000;
|
||||
xhr.open("GET", plid_url, true);
|
||||
xhr.send();
|
||||
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState == 4) {
|
||||
if (xhr.status == 200) {
|
||||
playlist.innerHTML = xhr.response.playlistHtml;
|
||||
|
||||
if (xhr.response.nextVideo) {
|
||||
player.on('ended', function() {
|
||||
window.location.replace("/watch?v="
|
||||
+ xhr.response.nextVideo
|
||||
+ "&list=<%= plid %>"
|
||||
<% if params[:listen] %>
|
||||
+ "&listen=1"
|
||||
<% end %>
|
||||
<% if params[:autoplay] %>
|
||||
+ "&autoplay=1"
|
||||
<% end %>
|
||||
<% if params[:speed] %>
|
||||
+ "&speed=<%= params[:speed] %>"
|
||||
<% end %>
|
||||
);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
playlist.innerHTML = "";
|
||||
document.getElementById('continue').style.display = "";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
xhr.ontimeout = function() {
|
||||
console.log("Pulling playlist timed out.");
|
||||
|
||||
comments = document.getElementById("playlist");
|
||||
comments.innerHTML =
|
||||
'<h3><center class="loading"><i class="icon ion-ios-refresh"></i></center></h3><hr>';
|
||||
get_playlist();
|
||||
};
|
||||
}
|
||||
|
||||
get_playlist();
|
||||
<% end %>
|
||||
|
||||
function get_reddit_comments() {
|
||||
comments = document.getElementById("comments");
|
||||
var fallback = comments.innerHTML;
|
||||
comments.innerHTML =
|
||||
'<h3><center class="loading"><i class="icon ion-ios-refresh"></i></center></h3>';
|
||||
|
||||
var url =
|
||||
"/api/v1/comments/<%= video.id %>?format=html&continuation=" + continuation;
|
||||
var url = "/api/v1/comments/<%= video.id %>?source=reddit&format=html&hl=<%= env.get("locale").as(String) %>";
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.responseType = "json";
|
||||
xhr.timeout = 20000;
|
||||
@ -185,40 +346,21 @@ function get_youtube_replies(target) {
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState == 4) {
|
||||
if (xhr.status == 200) {
|
||||
body.innerHTML = xhr.response.contentHtml;
|
||||
} else {
|
||||
body.innerHTML = fallback;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
xhr.ontimeout = function() {
|
||||
console.log("Pulling comments timed out.");
|
||||
|
||||
body.innerHTML = fallback;
|
||||
};
|
||||
}
|
||||
|
||||
function get_reddit_comments() {
|
||||
var url = "/api/v1/comments/<%= video.id %>?source=reddit&format=html";
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.responseType = "json";
|
||||
xhr.timeout = 20000;
|
||||
xhr.open("GET", url, true);
|
||||
xhr.send();
|
||||
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState == 4)
|
||||
if (xhr.status == 200) {
|
||||
comments = document.getElementById("comments");
|
||||
comments.innerHTML = ' \
|
||||
<div> \
|
||||
<h3> \
|
||||
<a href="javascript:void(0)" onclick="toggle_comments(this)">[ - ]</a> \
|
||||
{title} \
|
||||
</h3> \
|
||||
<p> \
|
||||
<b> \
|
||||
<a href="javascript:void(0)" onclick="swap_comments(\'youtube\')"> \
|
||||
<%= translate(locale, "View YouTube comments") %> \
|
||||
</a> \
|
||||
</b> \
|
||||
</p> \
|
||||
<b> \
|
||||
<a rel="noopener" target="_blank" href="https://reddit.com{permalink}">View more comments on Reddit</a> \
|
||||
<a rel="noopener" target="_blank" href="https://reddit.com{permalink}"><%= translate(locale, "View more comments on Reddit") %></a> \
|
||||
</b> \
|
||||
</div> \
|
||||
<div>{contentHtml}</div> \
|
||||
@ -231,10 +373,10 @@ function get_reddit_comments() {
|
||||
<% if preferences && preferences.comments[1] == "youtube" %>
|
||||
get_youtube_comments();
|
||||
<% else %>
|
||||
comments = document.getElementById("comments");
|
||||
comments.innerHTML = "";
|
||||
comments.innerHTML = fallback;
|
||||
<% end %>
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
xhr.ontimeout = function() {
|
||||
@ -245,7 +387,12 @@ function get_reddit_comments() {
|
||||
}
|
||||
|
||||
function get_youtube_comments() {
|
||||
var url = "/api/v1/comments/<%= video.id %>?format=html";
|
||||
comments = document.getElementById("comments");
|
||||
var fallback = comments.innerHTML;
|
||||
comments.innerHTML =
|
||||
'<h3><center class="loading"><i class="icon ion-ios-refresh"></i></center></h3>';
|
||||
|
||||
var url = "/api/v1/comments/<%= video.id %>?format=html&hl=<%= env.get("locale").as(String) %>";
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.responseType = "json";
|
||||
xhr.timeout = 20000;
|
||||
@ -253,21 +400,25 @@ function get_youtube_comments() {
|
||||
xhr.send();
|
||||
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState == 4)
|
||||
if (xhr.readyState == 4) {
|
||||
if (xhr.status == 200) {
|
||||
comments = document.getElementById("comments");
|
||||
if (xhr.response.commentCount > 0) {
|
||||
comments.innerHTML = ' \
|
||||
<div> \
|
||||
<h3> \
|
||||
<a href="javascript:void(0)" onclick="toggle_comments(this)">[ - ]</a> \
|
||||
View {commentCount} comments \
|
||||
<%= translate(locale, "View `x` comments", "{commentCount}") %> \
|
||||
</h3> \
|
||||
<b> \
|
||||
<a href="javascript:void(0)" onclick="swap_comments(\'reddit\')"> \
|
||||
<%= translate(locale, "View Reddit comments") %> \
|
||||
</a> \
|
||||
</b> \
|
||||
</div> \
|
||||
<div>{contentHtml}</div> \
|
||||
<hr>'.supplant({
|
||||
contentHtml: xhr.response.contentHtml,
|
||||
commentCount: commaSeparateNumber(xhr.response.commentCount)
|
||||
commentCount: number_with_separator(xhr.response.commentCount)
|
||||
});
|
||||
} else {
|
||||
comments.innerHTML = "";
|
||||
@ -276,35 +427,65 @@ function get_youtube_comments() {
|
||||
<% if preferences && preferences.comments[1] == "youtube" %>
|
||||
get_youtube_comments();
|
||||
<% else %>
|
||||
comments = document.getElementById("comments");
|
||||
comments.innerHTML = "";
|
||||
<% end %>
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
xhr.ontimeout = function() {
|
||||
console.log("Pulling comments timed out.");
|
||||
|
||||
comments = document.getElementById("comments");
|
||||
comments.innerHTML =
|
||||
'<h3><center class="loading"><i class="icon ion-ios-refresh"></i></center></h3>';
|
||||
get_youtube_comments();
|
||||
};
|
||||
}
|
||||
|
||||
function commaSeparateNumber(val){
|
||||
while (/(\d+)(\d{3})/.test(val.toString())){
|
||||
val = val.toString().replace(/(\d+)(\d{3})/, '$1'+','+'$2');
|
||||
}
|
||||
return val;
|
||||
}
|
||||
function get_youtube_replies(target, load_more) {
|
||||
var continuation = target.getAttribute('data-continuation');
|
||||
|
||||
String.prototype.supplant = function(o) {
|
||||
return this.replace(/{([^{}]*)}/g, function(a, b) {
|
||||
var r = o[b];
|
||||
return typeof r === "string" || typeof r === "number" ? r : a;
|
||||
});
|
||||
};
|
||||
var body = target.parentNode.parentNode;
|
||||
var fallback = body.innerHTML;
|
||||
body.innerHTML =
|
||||
'<h3><center class="loading"><i class="icon ion-ios-refresh"></i></center></h3>';
|
||||
|
||||
var url = '/api/v1/comments/<%= video.id %>?format=html&hl=<%= env.get("locale").as(String) %>&continuation=' +
|
||||
continuation;
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.responseType = 'json';
|
||||
xhr.timeout = 20000;
|
||||
xhr.open('GET', url, true);
|
||||
xhr.send();
|
||||
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState == 4) {
|
||||
if (xhr.status == 200) {
|
||||
if (load_more) {
|
||||
body = body.parentNode.parentNode;
|
||||
body.removeChild(body.lastElementChild);
|
||||
body.innerHTML += xhr.response.contentHtml;
|
||||
} else {
|
||||
body.innerHTML = ' \
|
||||
<p><a href="javascript:void(0)" \
|
||||
onclick="hide_youtube_replies(this)"><%= translate(locale, "Hide replies") %> \
|
||||
</a></p> \
|
||||
<div>{contentHtml}</div>'.supplant({
|
||||
contentHtml: xhr.response.contentHtml,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
body.innerHTML = fallback;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
xhr.ontimeout = function() {
|
||||
console.log('Pulling comments timed out.');
|
||||
|
||||
body.innerHTML = fallback;
|
||||
};
|
||||
}
|
||||
|
||||
<% if preferences %>
|
||||
<% if preferences.comments[0] == "youtube" %>
|
||||
@ -324,5 +505,4 @@ String.prototype.supplant = function(o) {
|
||||
<% else %>
|
||||
get_youtube_comments();
|
||||
<% end %>
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|