mirror of
				https://github.com/iv-org/invidious.git
				synced 2025-11-03 21:58:29 -06:00 
			
		
		
		
	Merge branch 'master' into api-only
This commit is contained in:
		
						commit
						6722f14b72
					
				
							
								
								
									
										159
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						
									
										159
									
								
								CHANGELOG.md
									
									
									
									
									
								
							@ -1,3 +1,122 @@
 | 
				
			|||||||
 | 
					# 0.17.0 (2019-05-06)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Version 0.17.0: Player and Authentication API
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Hello everyone! This past month there have been [130 commits](https://github.com/omarroth/invidious/compare/0.16.0..0.17.0) from 11 contributors. Large focus has been on improving the player as well as adding API access for other projects to make use of Invidious.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					There have also been significant changes in preparation of native notifications (see [#195](https://github.com/omarroth/invidious/issues/195), [#469](https://github.com/omarroth/invidious/issues/469), [#473](https://github.com/omarroth/invidious/issues/473), and [#502](https://github.com/omarroth/invidious/issues/502)), and playlists. I expect to see both of these to be added in the next release.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					I'm quite happy to mention that new translations have been added for Esperanto (`eo`) and Ukranian (`uk`). Support for pluralization has also been added, so it should now be possible to make a more native experience for speakers in other languages. The system currently in place is a bit cumbersome, so for any help using this feature please get in touch!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## For Administrators
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					A `check_tables` option has been added to automatically migrate without the use of custom scripts. This method will likely prove to be much more robust, and is currently enabled for the official instance. To prevent any unintended changes to the DB, `check_tables` is disabled by default and will print commands before executing. Having this makes features that require schema changes much easier to implement, and also makes it easier to upgrade from older instances.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					As part of [#303](https://github.com/omarroth/invidious/issues/303), a `cache_annotations` option has been added to speed up access from `/api/v1/annotations/:id`. This vastly improves the experience for videos with annotations. Currently, only videos that contain legacy annotations will be cached, which should help keep down the size of the cache. `cache_annotations` is disabled by default.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## For Developers
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					An authorization API has been added which allows other applications to read and modify user subscriptions and preferences (see [#473](https://github.com/omarroth/invidious/issues/473)). Support for accessing user feeds and notifications is also planned. I believe this feature is a large step forward in supporting syncing subscriptions and preferences with other services, and I'm excited to see what other developers do with this functionality.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Support for server-to-client push notifications is currently underway. This allows Invidious users, as well as applications using the Invidious API, to receive notifications about uploads in near real-time (see #469). An `/api/v1/auth/notifications` endpoint is currently available. I'm very excited for this to be integrated into the site, and to see how other developers use it in their own projects.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					An `/api/v1/storyboards/:id` endpoint has been added for accessing storyboard URLs, which allows developers to add video previews to their players (see below).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Player
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Support for annotations has been merged into master with [#303](https://github.com/omarroth/invidious/issues/303), thanks @glmdgrielson! Annotations can be enabled by default or only for subscribed channels, and can also be toggled per video. I'm extremely proud of the progress made here, and I'm so thankful to everyone that has made this possible. I expect this to be the last update with regards to supporting annotations, but I do plan on continuing to improve the experience as much as possible.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The Invidious player now supports video previews and a corresponding API endpoint `/api/v1/storyboards/:id` has been added for developers looking to add similar functionality to their own players. Not much else to say here. Overall it's a very nice quality of life improvement and an attractive addition to the site.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					It is now possible to select specific sources for videos provided using DASH (see [#34](https://github.com/omarroth/invidious/issues/34)). I would consider support largely feature complete, although there are still several issues to be fixed before I would consider it ready for larger rollout. You can watch videos in 1080p by setting `Default quality` to `dash` in your preferences, or by adding `&quality=dash` to the end of video URLs.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Finances
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Donations
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- [Patreon](https://www.patreon.com/omarroth) : \$49.73
 | 
				
			||||||
 | 
					- [Liberapay](https://liberapay.com/omarroth) : \$63.03
 | 
				
			||||||
 | 
					- Crypto : ~\$0.00 (converted from BCH, BTC)
 | 
				
			||||||
 | 
					- Total : \$112.76
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Expenses
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- invidious-load1 (nyc1) : \$10.00 (load balancer)
 | 
				
			||||||
 | 
					- invidious-update1 (s-1vcpu-1gb) : \$5.00 (updates feeds)
 | 
				
			||||||
 | 
					- invidious-node1 (s-1vcpu-1gb) : \$5.00 (web server)
 | 
				
			||||||
 | 
					- invidious-node2 (s-1vcpu-1gb) : \$5.00 (web server)
 | 
				
			||||||
 | 
					- invidious-node3 (s-1vcpu-1gb) : \$5.00 (web server)
 | 
				
			||||||
 | 
					- invidious-node4 (s-1vcpu-1gb) : \$5.00 (web server)
 | 
				
			||||||
 | 
					- invidious-node5 (s-1vcpu-1gb) : \$5.00 (web server)
 | 
				
			||||||
 | 
					- invidious-db1 (s-4vcpu-8gb) : \$40.00 (database)
 | 
				
			||||||
 | 
					- Total : \$80.00
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					That's all for now. Thanks!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# 0.16.0 (2019-04-06)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Version 0.16.0: API Improvements and Annotations
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Hello again! This past month has seen [116 commits](https://github.com/omarroth/invidious/compare/0.15.0..0.16.0) from 13 contributors and a couple important changes I'd like to announce.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					A privacy policy is now available [here](https://invidio.us/privacy). I've done my best to explain things as clearly as possible without oversimplifying, and would very much recommend reading it if you're concerned about your privacy and want to learn more about how Invidious uses your data. Please let me know if there is anything that needs clarification.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					I'm also very happy to announce that a Spanish translation has been added to the site. You can use it with `?hl=es` or by setting `es` as your default locale. As always I'm extremely grateful to translators for making the site accessible to more people.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## For Administrators
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Invidious now supports server-to-server [push notifications](https://developers.google.com/youtube/v3/guides/push_notifications). This uses [PubSubHubbub](https://pubsubhubbub.github.io/PubSubHubbub/pubsubhubbub-core-0.4.html) to automatically handle new videos sent to an instance, which is less resource intensive and generally faster. Note that it will not pull all videos from a subscribed channel, so recommended usage is in addition to `channel_threads`. Using PubSub requires a valid `domain` that updates can be sent to, and a random string that can be used to sign updates sent to the instance. You can enable it by adding `use_pubsub_feeds: true` to your `config.yml`. See [Configuration](https://github.com/omarroth/invidious/wiki/Configuration) for more info.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unfortunately there are a couple necessary changes to the DB to support `liveNow` and `premiereTimestamp` in subscription feeds. Migration scripts have been provided that should be used automatically if following the instructions [here](https://github.com/omarroth/invidious/wiki/Updating).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					You can now configure default user preferences for your instance. This allows you to set default locale, player preferences, and more. See [#415](https://github.com/omarroth/invidious/issues/415) for more details and example usage.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## For Developers
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The [fields](https://developers.google.com/youtube/v3/getting-started#fields) API has been added with [#429](https://github.com/omarroth/invidious/pull/429) and is now supported on all JSON endpoints, thanks [**@afrmtbl**](https://github.com/afrmtbl)! Synax is straight-forward and can be used to reduce data transfer and create a simpler response for debugging. You can see an example [here](https://invidio.us/api/v1/videos/CvFH_6DNRCY?pretty=1&fields=title,recommendedVideos/title). I've been quite happy using it and hope it is similarly useful for others.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					An `/api/v1/annotations/:id` endpoint has been added for pulling legacy annotation data from [this](https://archive.org/details/youtubeannotations) archive, see below for more details. You can also access annotation data available on YouTube using `?source=youtube`, although this will only return card data as legacy annotations were deleted on January 15th.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					A couple minor changes to existing endpoints:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- A `premiereTimestamp` field has been added to `/api/v1/videos/:id`
 | 
				
			||||||
 | 
					- A `sort_by` param has been added to `/api/v1/comments/:id`, supports `new`, `top`.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					More info is available in the [documentation](https://github.com/omarroth/invidious/wiki/API).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Annotations
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					I'm pleased to announce that annotation data is finally available from the roughly 1.4 billion videos archived as part of [this](https://www.reddit.com/r/DataHoarder/comments/aa6czg/youtube_annotation_archive/) project. They are accessible from the Internet Archive [here](https://archive.org/details/youtubeannotations) or as a 355GB torrent, see [here](https://www.reddit.com/r/DataHoarder/comments/b7imx9/youtube_annotation_archive_annotation_data_from/) for more details. A corresponding `/api/v1/annotations/:id` endpoint has been added to Invidious which uses the collection from IA to provide legacy annotations.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Support for them in the player is possible thanks to [this](https://github.com/afrmtbl/videojs-youtube-annotations) plugin developed by [**@afrmtbl**](https://github.com/afrmtbl). A PR for adding support to the site is available as [#303](https://github.com/omarroth/invidious/pull/303). There's also an [extension](https://github.com/afrmtbl/AnnotationsRestored) for overlaying them on top of the YouTube player (again thanks to [**@afrmtbl**](https://github.com/afrmtbl)), and an [extension](https://tech234a.bitbucket.io/AnnotationsReloaded?src=invidious) for hooking into code still present in the YouTube player itself, developed by [**@tech234a**](https://github.com/tech234a).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					I would recommend reading the [official announcement](https://www.reddit.com/r/DataHoarder/comments/b7imx9/youtube_annotation_archive_annotation_data_from/) for more details. I would like to again thank everyone that helped contribute to this project.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Finances
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Donations
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- [Patreon](https://www.patreon.com/omarroth) : \$42.42
 | 
				
			||||||
 | 
					- [Liberapay](https://liberapay.com/omarroth) : \$70.11
 | 
				
			||||||
 | 
					- Crypto : ~\$1.76 (converted from BCH, BTC, BSV)
 | 
				
			||||||
 | 
					- Total : \$114.29
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Expenses
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- invidious-load1 (nyc1) : \$10.00 (load balancer)
 | 
				
			||||||
 | 
					- invidious-update1 (s-1vcpu-1gb) : \$5.00 (updates feeds)
 | 
				
			||||||
 | 
					- invidious-node1 (s-1vcpu-1gb) : \$5.00 (web server)
 | 
				
			||||||
 | 
					- invidious-node2 (s-1vcpu-1gb) : \$5.00 (web server)
 | 
				
			||||||
 | 
					- invidious-node3 (s-1vcpu-1gb) : \$5.00 (web server)
 | 
				
			||||||
 | 
					- invidious-node4 (s-1vcpu-1gb) : \$5.00 (web server)
 | 
				
			||||||
 | 
					- invidious-node5 (s-1vcpu-1gb) : \$5.00 (web server)
 | 
				
			||||||
 | 
					- invidious-db1 (s-4vcpu-8gb) : \$40.00 (database)
 | 
				
			||||||
 | 
					- Total : \$80.00
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					This past month the site saw a couple abnormal peaks in traffic, so an additional webserver has been added to match the increased load. The goal on Patreon has been updated to match the above expenses.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Thanks everyone!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# 0.15.0 (2019-03-06)
 | 
					# 0.15.0 (2019-03-06)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Version 0.15.0: Preferences and Channel Playlists
 | 
					## Version 0.15.0: Preferences and Channel Playlists
 | 
				
			||||||
@ -42,21 +161,21 @@ There's also more discussion on improving Invidious for streaming music in [#304
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
### Donations
 | 
					### Donations
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[Patreon](https://www.patreon.com/omarroth) : \$42.42  
 | 
					- [Patreon](https://www.patreon.com/omarroth) : \$42.42
 | 
				
			||||||
[Liberapay](https://liberapay.com/omarroth) : \$30.97  
 | 
					- [Liberapay](https://liberapay.com/omarroth) : \$30.97
 | 
				
			||||||
Crypto : ~\$0.00 (converted from BCH, BTC)  
 | 
					- Crypto : ~\$0.00 (converted from BCH, BTC)
 | 
				
			||||||
Total : \$73.39
 | 
					- Total : \$73.39
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Expenses
 | 
					### Expenses
 | 
				
			||||||
 | 
					
 | 
				
			||||||
invidious-load1 (nyc1) : \$10.00 (load balancer)  
 | 
					- invidious-load1 (nyc1) : \$10.00 (load balancer)
 | 
				
			||||||
invidious-update1 (s-1vcpu-1gb) : \$5.00 (updates feeds)  
 | 
					- invidious-update1 (s-1vcpu-1gb) : \$5.00 (updates feeds)
 | 
				
			||||||
invidious-node1 (s-1vcpu-1gb) : \$5.00 (web server)  
 | 
					- invidious-node1 (s-1vcpu-1gb) : \$5.00 (web server)
 | 
				
			||||||
invidious-node2 (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-node3 (s-1vcpu-1gb) : \$5.00 (web server)
 | 
				
			||||||
invidious-node4 (s-1vcpu-1gb) : \$5.00 (web server)  
 | 
					- invidious-node4 (s-1vcpu-1gb) : \$5.00 (web server)
 | 
				
			||||||
invidious-db1 (s-4vcpu-8gb) : \$40.00 (database)  
 | 
					- invidious-db1 (s-4vcpu-8gb) : \$40.00 (database)
 | 
				
			||||||
Total : \$75.00
 | 
					- Total : \$75.00
 | 
				
			||||||
 | 
					
 | 
				
			||||||
It's been very humbling to see how fast the project has grown, and I look forward to making the site even better. Thank you everyone.
 | 
					It's been very humbling to see how fast the project has grown, and I look forward to making the site even better. Thank you everyone.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -121,14 +240,14 @@ Organizing this project has unfortunately taken up quite a bit of my time, and I
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
### Expenses
 | 
					### Expenses
 | 
				
			||||||
 | 
					
 | 
				
			||||||
invidious-load1 (nyc1) : $10.00 (load balancer)
 | 
					- invidious-load1 (nyc1) : \$10.00 (load balancer)
 | 
				
			||||||
invidious-update1 (s-1vcpu-1gb) : $5.00 (updates feeds)
 | 
					- invidious-update1 (s-1vcpu-1gb) : \$5.00 (updates feeds)
 | 
				
			||||||
invidious-node1 (s-1vcpu-1gb) : $5.00 (web server)
 | 
					- invidious-node1 (s-1vcpu-1gb) : \$5.00 (web server)
 | 
				
			||||||
invidious-node2 (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-node3 (s-1vcpu-1gb) : \$5.00 (web server)
 | 
				
			||||||
invidious-node4 (s-1vcpu-1gb) : $5.00 (web server)
 | 
					- invidious-node4 (s-1vcpu-1gb) : \$5.00 (web server)
 | 
				
			||||||
invidious-db1 (s-4vcpu-8gb) : $40.00 (database)
 | 
					- invidious-db1 (s-4vcpu-8gb) : \$40.00 (database)
 | 
				
			||||||
Total : $75.00
 | 
					- Total : \$75.00
 | 
				
			||||||
 | 
					
 | 
				
			||||||
As always I'm grateful for everyone's contributions and support. I'll see you all in March.
 | 
					As always I'm grateful for everyone's contributions and support. I'll see you all in March.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										40
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										40
									
								
								README.md
									
									
									
									
									
								
							@ -101,14 +101,15 @@ $ exit
 | 
				
			|||||||
$ sudo systemctl enable postgresql
 | 
					$ sudo systemctl enable postgresql
 | 
				
			||||||
$ sudo systemctl start postgresql
 | 
					$ sudo systemctl start postgresql
 | 
				
			||||||
$ sudo -i -u postgres
 | 
					$ sudo -i -u postgres
 | 
				
			||||||
$ psql -c "CREATE USER kemal WITH PASSWORD 'kemal';"
 | 
					$ psql -c "CREATE USER kemal WITH PASSWORD 'kemal';" # Change 'kemal' here to a stronger password, and update `password` in config/config.yml
 | 
				
			||||||
$ createdb -O kemal invidious
 | 
					$ createdb -O kemal invidious
 | 
				
			||||||
$ psql invidious < /home/invidious/invidious/config/sql/channels.sql
 | 
					$ psql invidious kemal < /home/invidious/invidious/config/sql/channels.sql
 | 
				
			||||||
$ psql invidious < /home/invidious/invidious/config/sql/videos.sql
 | 
					$ psql invidious kemal < /home/invidious/invidious/config/sql/videos.sql
 | 
				
			||||||
$ psql invidious < /home/invidious/invidious/config/sql/channel_videos.sql
 | 
					$ psql invidious kemal < /home/invidious/invidious/config/sql/channel_videos.sql
 | 
				
			||||||
$ psql invidious < /home/invidious/invidious/config/sql/users.sql
 | 
					$ psql invidious kemal < /home/invidious/invidious/config/sql/users.sql
 | 
				
			||||||
$ psql invidious < /home/invidious/invidious/config/sql/session_ids.sql
 | 
					$ psql invidious kemal < /home/invidious/invidious/config/sql/session_ids.sql
 | 
				
			||||||
$ psql invidious < /home/invidious/invidious/config/sql/nonces.sql
 | 
					$ psql invidious kemal < /home/invidious/invidious/config/sql/nonces.sql
 | 
				
			||||||
 | 
					$ psql invidious kemal < /home/invidious/invidious/config/sql/annotations.sql
 | 
				
			||||||
$ exit
 | 
					$ exit
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -143,14 +144,15 @@ $ brew install shards crystal-lang postgres imagemagick librsvg
 | 
				
			|||||||
$ git clone https://github.com/omarroth/invidious
 | 
					$ git clone https://github.com/omarroth/invidious
 | 
				
			||||||
$ cd invidious
 | 
					$ cd invidious
 | 
				
			||||||
$ brew services start postgresql
 | 
					$ brew services start postgresql
 | 
				
			||||||
$ psql -c "CREATE ROLE kemal WITH LOGIN PASSWORD 'kemal';"
 | 
					$ psql -c "CREATE ROLE kemal WITH PASSWORD 'kemal';" # Change 'kemal' here to a stronger password, and update `password` in config/config.yml
 | 
				
			||||||
$ createdb invidious -U kemal
 | 
					$ createdb -O kemal invidious
 | 
				
			||||||
$ psql invidious < config/sql/channels.sql
 | 
					$ psql invidious kemal < config/sql/channels.sql
 | 
				
			||||||
$ psql invidious < config/sql/videos.sql
 | 
					$ psql invidious kemal < config/sql/videos.sql
 | 
				
			||||||
$ psql invidious < config/sql/channel_videos.sql
 | 
					$ psql invidious kemal < config/sql/channel_videos.sql
 | 
				
			||||||
$ psql invidious < config/sql/users.sql
 | 
					$ psql invidious kemal < config/sql/users.sql
 | 
				
			||||||
$ psql invidious < config/sql/session_ids.sql
 | 
					$ psql invidious kemal < config/sql/session_ids.sql
 | 
				
			||||||
$ psql invidious < config/sql/nonces.sql
 | 
					$ psql invidious kemal < config/sql/nonces.sql
 | 
				
			||||||
 | 
					$ psql invidious kemal < config/sql/annotations.sql
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Setup Invidious
 | 
					# Setup Invidious
 | 
				
			||||||
$ shards update && shards install
 | 
					$ shards update && shards install
 | 
				
			||||||
@ -172,15 +174,12 @@ Usage: invidious [arguments]
 | 
				
			|||||||
    --ssl-key-file FILE              SSL key file
 | 
					    --ssl-key-file FILE              SSL key file
 | 
				
			||||||
    --ssl-cert-file FILE             SSL certificate file
 | 
					    --ssl-cert-file FILE             SSL certificate file
 | 
				
			||||||
    -h, --help                       Shows this help
 | 
					    -h, --help                       Shows this help
 | 
				
			||||||
    -t THREADS, --crawl-threads=THREADS
 | 
					 | 
				
			||||||
                                     Number of threads for crawling YouTube (default: 0)
 | 
					 | 
				
			||||||
    -c THREADS, --channel-threads=THREADS
 | 
					    -c THREADS, --channel-threads=THREADS
 | 
				
			||||||
                                     Number of threads for refreshing channels (default: 1)
 | 
					                                     Number of threads for refreshing channels (default: 1)
 | 
				
			||||||
    -f THREADS, --feed-threads=THREADS
 | 
					    -f THREADS, --feed-threads=THREADS
 | 
				
			||||||
                                     Number of threads for refreshing feeds (default: 1)
 | 
					                                     Number of threads for refreshing feeds (default: 1)
 | 
				
			||||||
    -v THREADS, --video-threads=THREADS
 | 
					 | 
				
			||||||
                                     Number of threads for refreshing videos (default: 0)
 | 
					 | 
				
			||||||
    -o OUTPUT, --output=OUTPUT       Redirect output (default: STDOUT)
 | 
					    -o OUTPUT, --output=OUTPUT       Redirect output (default: STDOUT)
 | 
				
			||||||
 | 
					    -v, --version                    Print version
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Or for development:
 | 
					Or for development:
 | 
				
			||||||
@ -188,6 +187,7 @@ Or for development:
 | 
				
			|||||||
```bash
 | 
					```bash
 | 
				
			||||||
$ curl -fsSLo- https://raw.githubusercontent.com/samueleaton/sentry/master/install.cr | crystal eval
 | 
					$ curl -fsSLo- https://raw.githubusercontent.com/samueleaton/sentry/master/install.cr | crystal eval
 | 
				
			||||||
$ ./sentry
 | 
					$ ./sentry
 | 
				
			||||||
 | 
					🤖  Your SentryBot is vigilant. beep-boop...
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Documentation
 | 
					## Documentation
 | 
				
			||||||
@ -201,7 +201,7 @@ $ ./sentry
 | 
				
			|||||||
## Made with Invidious
 | 
					## Made with Invidious
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- [FreeTube](https://github.com/FreeTubeApp/FreeTube): An Open Source YouTube app for privacy.
 | 
					- [FreeTube](https://github.com/FreeTubeApp/FreeTube): An Open Source YouTube app for privacy.
 | 
				
			||||||
- [CloudTube](https://github.com/cloudrac3r/cadencegq): Website featuring pastebin, image host, and YouTube player
 | 
					- [CloudTube](https://cadence.moe/cloudtube/subscriptions): A JS-rich alternate YouTube player
 | 
				
			||||||
- [PeerTubeify](https://gitlab.com/Ealhad/peertubeify): On YouTube, displays a link to the same video on PeerTube, if it exists.
 | 
					- [PeerTubeify](https://gitlab.com/Ealhad/peertubeify): On YouTube, displays a link to the same video on PeerTube, if it exists.
 | 
				
			||||||
- [MusicPiped](https://github.com/deep-gaurav/MusicPiped): A materialistic music player that streams music from YouTube.
 | 
					- [MusicPiped](https://github.com/deep-gaurav/MusicPiped): A materialistic music player that streams music from YouTube.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
FROM archlinux/base
 | 
					FROM archlinux/base
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RUN pacman -Sy --noconfirm shards crystal imagemagick librsvg \
 | 
					RUN pacman -Sy --noconfirm shards crystal imagemagick librsvg \
 | 
				
			||||||
    which pkgconf gcc ttf-liberation
 | 
					    which pkgconf gcc ttf-liberation glibc
 | 
				
			||||||
# base-devel contains many other basic packages, that are normally assumed to already exist on a clean arch system
 | 
					# base-devel contains many other basic packages, that are normally assumed to already exist on a clean arch system
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ADD . /invidious
 | 
					ADD . /invidious
 | 
				
			||||||
 | 
				
			|||||||
@ -12,12 +12,13 @@ if [ ! -f /var/lib/postgresql/data/setupFinished ]; then
 | 
				
			|||||||
    >&2 echo "### importing table schemas"
 | 
					    >&2 echo "### importing table schemas"
 | 
				
			||||||
    su postgres -c 'createdb invidious'
 | 
					    su postgres -c 'createdb invidious'
 | 
				
			||||||
    su postgres -c 'psql -c "CREATE USER kemal WITH PASSWORD '"'kemal'"'"'
 | 
					    su postgres -c 'psql -c "CREATE USER kemal WITH PASSWORD '"'kemal'"'"'
 | 
				
			||||||
    su postgres -c 'psql invidious < config/sql/channels.sql'
 | 
					    su postgres -c 'psql invidious kemal < config/sql/channels.sql'
 | 
				
			||||||
    su postgres -c 'psql invidious < config/sql/videos.sql'
 | 
					    su postgres -c 'psql invidious kemal < config/sql/videos.sql'
 | 
				
			||||||
    su postgres -c 'psql invidious < config/sql/channel_videos.sql'
 | 
					    su postgres -c 'psql invidious kemal < config/sql/channel_videos.sql'
 | 
				
			||||||
    su postgres -c 'psql invidious < config/sql/users.sql'
 | 
					    su postgres -c 'psql invidious kemal < config/sql/users.sql'
 | 
				
			||||||
    su postgres -c 'psql invidious < config/sql/session_ids.sql'
 | 
					    su postgres -c 'psql invidious kemal < config/sql/session_ids.sql'
 | 
				
			||||||
    su postgres -c 'psql invidious < config/sql/nonces.sql'
 | 
					    su postgres -c 'psql invidious kemal < config/sql/nonces.sql'
 | 
				
			||||||
 | 
					    su postgres -c 'psql invidious kemal < config/sql/annotations.sql'
 | 
				
			||||||
    touch /var/lib/postgresql/data/setupFinished
 | 
					    touch /var/lib/postgresql/data/setupFinished
 | 
				
			||||||
    echo "### invidious database setup finished"
 | 
					    echo "### invidious database setup finished"
 | 
				
			||||||
    exit
 | 
					    exit
 | 
				
			||||||
 | 
				
			|||||||
@ -5,15 +5,20 @@
 | 
				
			|||||||
    "Shared `x` ago": "تم رفع الفيديو منذ `x`",
 | 
					    "Shared `x` ago": "تم رفع الفيديو منذ `x`",
 | 
				
			||||||
    "Unsubscribe": "إلغاء الإشتراك",
 | 
					    "Unsubscribe": "إلغاء الإشتراك",
 | 
				
			||||||
    "Subscribe": "إشتراك",
 | 
					    "Subscribe": "إشتراك",
 | 
				
			||||||
  "Login to subscribe to `x`": "سجل الدخول للإشتراك فى `x`",
 | 
					 | 
				
			||||||
    "View channel on YouTube": "زيارة القناة على موقع يوتيوب",
 | 
					    "View channel on YouTube": "زيارة القناة على موقع يوتيوب",
 | 
				
			||||||
 | 
					    "View playlist on YouTube": "",
 | 
				
			||||||
    "newest": "الأجدد",
 | 
					    "newest": "الأجدد",
 | 
				
			||||||
    "oldest": "الأقدم",
 | 
					    "oldest": "الأقدم",
 | 
				
			||||||
    "popular": "الاكثر شعبية",
 | 
					    "popular": "الاكثر شعبية",
 | 
				
			||||||
  "last": "اخر الفيديوهات المعدلة",
 | 
					    "last": "اخر قوائم التشغيل المعدلة",
 | 
				
			||||||
    "Next page": "الصفحة الثانية",
 | 
					    "Next page": "الصفحة الثانية",
 | 
				
			||||||
    "Previous page": "الصفحة السابقة",
 | 
					    "Previous page": "الصفحة السابقة",
 | 
				
			||||||
    "Clear watch history?": "مسح السجل ؟",
 | 
					    "Clear watch history?": "مسح السجل ؟",
 | 
				
			||||||
 | 
					    "New password": "الرقم السرى الجديد",
 | 
				
			||||||
 | 
					    "New passwords must match": "الأرقام السرية يجب ان تكون متطابقة",
 | 
				
			||||||
 | 
					    "Cannot change password for Google accounts": "لا يستطيع تغيير الرقم السرى لحساب جوجل",
 | 
				
			||||||
 | 
					    "Authorize token?": "رمز الإذن ؟",
 | 
				
			||||||
 | 
					    "Authorize token for `x`?": "رمز الإذن لـ `x` ?",
 | 
				
			||||||
    "Yes": "نعم",
 | 
					    "Yes": "نعم",
 | 
				
			||||||
    "No": "لا",
 | 
					    "No": "لا",
 | 
				
			||||||
    "Import and Export Data": "استخراج و إضافة البيانات",
 | 
					    "Import and Export Data": "استخراج و إضافة البيانات",
 | 
				
			||||||
@ -32,23 +37,24 @@
 | 
				
			|||||||
    "An alternative front-end to YouTube": "البديل الكامل لموقع يوتيوب",
 | 
					    "An alternative front-end to YouTube": "البديل الكامل لموقع يوتيوب",
 | 
				
			||||||
    "JavaScript license information": "معلومات ترخيص JavaScript",
 | 
					    "JavaScript license information": "معلومات ترخيص JavaScript",
 | 
				
			||||||
    "source": "المصدر",
 | 
					    "source": "المصدر",
 | 
				
			||||||
  "Login": "تسجيل الدخول",
 | 
					    "Log in": "تسجيل الدخول",
 | 
				
			||||||
  "Login/Register": "تسجيل الدخول\\إنشاء حساب",
 | 
					    "Log in/register": "تسجيل الدخول\\إنشاء حساب",
 | 
				
			||||||
  "Login to Google": "تسجيل الدخول بإستخدام جوجل",
 | 
					    "Log in with Google": "تسجيل الدخول بإستخدام جوجل",
 | 
				
			||||||
  "User ID:": "إسم المستخدم:",
 | 
					    "User ID": "إسم المستخدم",
 | 
				
			||||||
  "Password:": "الرقم السرى:",
 | 
					    "Password": "الرقم السرى",
 | 
				
			||||||
    "Time (h:mm:ss):": "(يجب ان يكتب مثل هذا التنسيق) الوقت (h(ساعات):mm(دقائق):ss(ثوانى)):",
 | 
					    "Time (h:mm:ss):": "(يجب ان يكتب مثل هذا التنسيق) الوقت (h(ساعات):mm(دقائق):ss(ثوانى)):",
 | 
				
			||||||
    "Text CAPTCHA": "CAPTCHA كلامية",
 | 
					    "Text CAPTCHA": "CAPTCHA كلامية",
 | 
				
			||||||
    "Image CAPTCHA": "CAPTCHA صورية",
 | 
					    "Image CAPTCHA": "CAPTCHA صورية",
 | 
				
			||||||
    "Sign In": "تسجيل الدخول",
 | 
					    "Sign In": "تسجيل الدخول",
 | 
				
			||||||
    "Register": "انشاء الحساب",
 | 
					    "Register": "انشاء الحساب",
 | 
				
			||||||
  "Email:": "الإيميل:",
 | 
					    "E-mail": "الإيميل",
 | 
				
			||||||
  "Google verification code:": "رمز تحقق جوجل:",
 | 
					    "Google verification code": "رمز تحقق جوجل",
 | 
				
			||||||
    "Preferences": "التفضيلات",
 | 
					    "Preferences": "التفضيلات",
 | 
				
			||||||
    "Player preferences": "التفضيلات المشغل",
 | 
					    "Player preferences": "التفضيلات المشغل",
 | 
				
			||||||
    "Always loop: ": "كرر الفيديو دائما: ",
 | 
					    "Always loop: ": "كرر الفيديو دائما: ",
 | 
				
			||||||
    "Autoplay: ": "تشغيل تلقائى: ",
 | 
					    "Autoplay: ": "تشغيل تلقائى: ",
 | 
				
			||||||
  "Autoplay next video: ": "شغل الفيديو التالى تلقائى: ",
 | 
					    "Play next by default: ": "شغل الفيديو التالى تلقائيا",
 | 
				
			||||||
 | 
					    "Autoplay next video: ": " شغل الفيديو التالى تلقائيا (فى قوائم التشغيل)",
 | 
				
			||||||
    "Listen by default: ": "تشغيل النسخة السمعية تلقائى: ",
 | 
					    "Listen by default: ": "تشغيل النسخة السمعية تلقائى: ",
 | 
				
			||||||
    "Proxy videos? ": "عرض الفيديوهات عن طريق الوكيل(proxy) ؟",
 | 
					    "Proxy videos? ": "عرض الفيديوهات عن طريق الوكيل(proxy) ؟",
 | 
				
			||||||
    "Default speed: ": "السرعة الإفتراضية: ",
 | 
					    "Default speed: ": "السرعة الإفتراضية: ",
 | 
				
			||||||
@ -60,10 +66,12 @@
 | 
				
			|||||||
    "Default captions: ": "الترجمات الإفتراضية: ",
 | 
					    "Default captions: ": "الترجمات الإفتراضية: ",
 | 
				
			||||||
    "Fallback captions: ": "الترجمات المصاحبة: ",
 | 
					    "Fallback captions: ": "الترجمات المصاحبة: ",
 | 
				
			||||||
    "Show related videos? ": "عرض مقاطع الفيديو ذات الصلة؟",
 | 
					    "Show related videos? ": "عرض مقاطع الفيديو ذات الصلة؟",
 | 
				
			||||||
 | 
					    "Show annotations by default? ": "عرض الملاحظات فى الفيديو تلقائيا ؟",
 | 
				
			||||||
    "Visual preferences": "التفضيلات المرئية",
 | 
					    "Visual preferences": "التفضيلات المرئية",
 | 
				
			||||||
    "Dark mode: ": "الوضع الليلى: ",
 | 
					    "Dark mode: ": "الوضع الليلى: ",
 | 
				
			||||||
    "Thin mode: ": "الوضع الخفيف: ",
 | 
					    "Thin mode: ": "الوضع الخفيف: ",
 | 
				
			||||||
    "Subscription preferences": "تفضيلات الإشتراك",
 | 
					    "Subscription preferences": "تفضيلات الإشتراك",
 | 
				
			||||||
 | 
					    "Show annotations by default for subscribed channels? ": "عرض الملاحظات فى الفيديوهات تلقائيا فى القنوات المشترك بها فقط ؟",
 | 
				
			||||||
    "Redirect homepage to feed: ": "إعادة التوجية من الصفحة الرئيسية لصفحة المشتركين (لرؤية اخر فيديوهات المشتركين): ",
 | 
					    "Redirect homepage to feed: ": "إعادة التوجية من الصفحة الرئيسية لصفحة المشتركين (لرؤية اخر فيديوهات المشتركين): ",
 | 
				
			||||||
    "Number of videos shown in feed: ": "عدد الفيديوهات التى ستظهر فى صفحة المشتركين: ",
 | 
					    "Number of videos shown in feed: ": "عدد الفيديوهات التى ستظهر فى صفحة المشتركين: ",
 | 
				
			||||||
    "Sort videos by: ": "ترتيب الفيديو بـ: ",
 | 
					    "Sort videos by: ": "ترتيب الفيديو بـ: ",
 | 
				
			||||||
@ -79,8 +87,10 @@
 | 
				
			|||||||
    "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": "إضافة\\إستخراج البيانات",
 | 
				
			||||||
 | 
					    "Change password": "غير الرقم السرى",
 | 
				
			||||||
    "Manage subscriptions": "إدارة المشتركين",
 | 
					    "Manage subscriptions": "إدارة المشتركين",
 | 
				
			||||||
 | 
					    "Manage tokens": "إدارة الرموز",
 | 
				
			||||||
    "Watch history": "سجل المشاهدة",
 | 
					    "Watch history": "سجل المشاهدة",
 | 
				
			||||||
    "Delete account": "حذف الحساب",
 | 
					    "Delete account": "حذف الحساب",
 | 
				
			||||||
    "Administrator preferences": "إعدادات المدير",
 | 
					    "Administrator preferences": "إعدادات المدير",
 | 
				
			||||||
@ -93,20 +103,26 @@
 | 
				
			|||||||
    "Report statistics? ": "إبلاغ الإحصائيات",
 | 
					    "Report statistics? ": "إبلاغ الإحصائيات",
 | 
				
			||||||
    "Save preferences": "حفظ التفضيلات",
 | 
					    "Save preferences": "حفظ التفضيلات",
 | 
				
			||||||
    "Subscription manager": "مدير الإشتراكات",
 | 
					    "Subscription manager": "مدير الإشتراكات",
 | 
				
			||||||
 | 
					    "Token manager": "إداره الرمز",
 | 
				
			||||||
 | 
					    "Token": "الرمز",
 | 
				
			||||||
    "`x` subscriptions": "`x` مشتركين",
 | 
					    "`x` subscriptions": "`x` مشتركين",
 | 
				
			||||||
  "Import/Export": "إضافة\\إستخراج",
 | 
					    "`x` tokens": "`x` رموز",
 | 
				
			||||||
 | 
					    "Import/export": "إضافة\\إستخراج",
 | 
				
			||||||
    "unsubscribe": "إلغاء الإشتراك",
 | 
					    "unsubscribe": "إلغاء الإشتراك",
 | 
				
			||||||
 | 
					    "revoke": "مسح",
 | 
				
			||||||
    "Subscriptions": "الإشتراكات",
 | 
					    "Subscriptions": "الإشتراكات",
 | 
				
			||||||
    "`x` unseen notifications": "`x` إشعارات لم تشاهدها بعد ",
 | 
					    "`x` unseen notifications": "`x` إشعارات لم تشاهدها بعد ",
 | 
				
			||||||
    "search": "بحث",
 | 
					    "search": "بحث",
 | 
				
			||||||
  "Sign out": "تسجيل الخروج",
 | 
					    "Log out": "تسجيل الخروج",
 | 
				
			||||||
    "Released under the AGPLv3 by Omar Roth.": "تم الإنشاء تحت AGPLv3 بواسطة عمر روث.",
 | 
					    "Released under the AGPLv3 by Omar Roth.": "تم الإنشاء تحت AGPLv3 بواسطة عمر روث.",
 | 
				
			||||||
    "Source available here.": "الأكواد متوفرة هنا.",
 | 
					    "Source available here.": "الأكواد متوفرة هنا.",
 | 
				
			||||||
    "View JavaScript license information.": "مشاهدة معلومات حول تراخيص الجافاسكريبت.",
 | 
					    "View JavaScript license information.": "مشاهدة معلومات حول تراخيص الجافاسكريبت.",
 | 
				
			||||||
    "View privacy policy.": "عرض سياسة الخصوصية",
 | 
					    "View privacy policy.": "عرض سياسة الخصوصية",
 | 
				
			||||||
    "Trending": "الشائع",
 | 
					    "Trending": "الشائع",
 | 
				
			||||||
    "Unlisted": "غير مصنف",
 | 
					    "Unlisted": "غير مصنف",
 | 
				
			||||||
  "Watch video on Youtube": "مشاهدة الفيديو على اليوتيوب",
 | 
					    "Watch on YouTube": "مشاهدة الفيديو على اليوتيوب",
 | 
				
			||||||
 | 
					    "Hide annotations": "إخفاء الملاحظات فى الفيديو",
 | 
				
			||||||
 | 
					    "Show annotations": "عرض الملاحظات فى الفيديو",
 | 
				
			||||||
    "Genre: ": "النوع: ",
 | 
					    "Genre: ": "النوع: ",
 | 
				
			||||||
    "License: ": "التراخيص: ",
 | 
					    "License: ": "التراخيص: ",
 | 
				
			||||||
    "Family friendly? ": "محتوى عائلى? ",
 | 
					    "Family friendly? ": "محتوى عائلى? ",
 | 
				
			||||||
@ -115,8 +131,9 @@
 | 
				
			|||||||
    "Whitelisted regions: ": "الدول المسموح فيها هذا الفيديو: ",
 | 
					    "Whitelisted regions: ": "الدول المسموح فيها هذا الفيديو: ",
 | 
				
			||||||
    "Blacklisted regions: ": "الدول الحظور فيها هذا الفيديو: ",
 | 
					    "Blacklisted regions: ": "الدول الحظور فيها هذا الفيديو: ",
 | 
				
			||||||
    "Shared `x`": "شارك منذ `x`",
 | 
					    "Shared `x`": "شارك منذ `x`",
 | 
				
			||||||
  "Premieres in `x`": "يعرض فى 'x'",
 | 
					    "`x` views": "`x` مشاهدون",
 | 
				
			||||||
  "Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.": "اهلا! يبدو ان الجافاسكريبت معطلة. اضغط هنا لعرض التعليقات, ضع فى إعتبارك انها ستأخذ وقت اطول للعرض.",
 | 
					    "Premieres in `x`": "يعرض فى `x`",
 | 
				
			||||||
 | 
					    "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.": "اهلا! يبدو ان الجافاسكريبت معطلة. اضغط هنا لعرض التعليقات, ضع فى إعتبارك انها ستأخذ وقت اطول للعرض.",
 | 
				
			||||||
    "View YouTube comments": "عرض تعليقات اليوتيوب",
 | 
					    "View YouTube comments": "عرض تعليقات اليوتيوب",
 | 
				
			||||||
    "View more comments on Reddit": "عرض المزيد من التعليقات على\\من موقع Reddit",
 | 
					    "View more comments on Reddit": "عرض المزيد من التعليقات على\\من موقع Reddit",
 | 
				
			||||||
    "View `x` comments": "عرض `x` تعليقات",
 | 
					    "View `x` comments": "عرض `x` تعليقات",
 | 
				
			||||||
@ -125,19 +142,19 @@
 | 
				
			|||||||
    "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.": "غير قادر على تسجيل الدخول, تأكد من تشغيل المصادقة الثنائية 2FA.",
 | 
					    "Unable to log in, make sure two-factor authentication (Authenticator or SMS) is turned on.": "غير قادر على تسجيل الدخول, تأكد من تشغيل المصادقة الثنائية 2FA.",
 | 
				
			||||||
    "Invalid TFA code": "كود مصادقة ثنائية 2FA غير صحيح",
 | 
					    "Invalid TFA code": "كود مصادقة ثنائية 2FA غير صحيح",
 | 
				
			||||||
  "Login failed. This may be because two-factor authentication is not enabled on your account.": "لم يتم تسجيل الدخول. هذا ربما بسبب ان المصادقة الثنائية 2FA معطلة فى حسابك.",
 | 
					    "Login failed. This may be because two-factor authentication is not turned on for your account.": "لم يتم تسجيل الدخول. هذا ربما بسبب ان المصادقة الثنائية 2FA معطلة فى حسابك.",
 | 
				
			||||||
  "Invalid answer": "إجابة خاطئة",
 | 
					    "Wrong answer": "إجابة خاطئة",
 | 
				
			||||||
  "Invalid CAPTCHA": "الكابتشا CAPTCHA غير صاحلة",
 | 
					    "Erroneous CAPTCHA": "الكابتشا CAPTCHA غير صاحلة",
 | 
				
			||||||
    "CAPTCHA is a required field": "مكان الكابتشا CAPTCHA مطلوب",
 | 
					    "CAPTCHA is a required field": "مكان الكابتشا CAPTCHA مطلوب",
 | 
				
			||||||
    "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": "إسم المستخدم او الرقم السرى غير صحيح",
 | 
					    "Wrong username or password": "إسم المستخدم او الرقم السرى غير صحيح",
 | 
				
			||||||
  "Please sign in using 'Sign in with Google'": "الرجاء تسجيل الدخول 'تسجيل الدخول بواسطة جوجل'",
 | 
					    "Please sign in using 'Log in with Google'": "الرجاء تسجيل الدخول 'تسجيل الدخول بواسطة جوجل'",
 | 
				
			||||||
    "Password cannot be empty": "الرقم السرى لايمكن ان يكون فارغ",
 | 
					    "Password cannot be empty": "الرقم السرى لايمكن ان يكون فارغ",
 | 
				
			||||||
    "Password cannot be longer than 55 characters": "الرقم السرى لا يتعدى 55 حرف",
 | 
					    "Password cannot be longer than 55 characters": "الرقم السرى لا يتعدى 55 حرف",
 | 
				
			||||||
  "Please sign in": "الرجاء تسجيل الدخول",
 | 
					    "Please log in": "الرجاء تسجيل الدخول",
 | 
				
			||||||
    "Invidious Private Feed for `x`": "صفحة Invidious للمشتركين الخاصة\\مخفية لـ `x`",
 | 
					    "Invidious Private Feed for `x`": "صفحة Invidious للمشتركين الخاصة\\مخفية لـ `x`",
 | 
				
			||||||
    "channel:`x`": "قناة:`x`",
 | 
					    "channel:`x`": "قناة:`x`",
 | 
				
			||||||
    "Deleted or invalid channel": "قناة ممسوحة او غير صالحة",
 | 
					    "Deleted or invalid channel": "قناة ممسوحة او غير صالحة",
 | 
				
			||||||
@ -149,15 +166,15 @@
 | 
				
			|||||||
    "Load more": "عرض المزيد",
 | 
					    "Load more": "عرض المزيد",
 | 
				
			||||||
    "`x` points": "`x` نقاط",
 | 
					    "`x` points": "`x` نقاط",
 | 
				
			||||||
    "Could not create mix.": "لم يستطع عمل خلط.",
 | 
					    "Could not create mix.": "لم يستطع عمل خلط.",
 | 
				
			||||||
  "Playlist is empty": "قائمة التشغيل فارغة",
 | 
					    "Empty playlist": "قائمة التشغيل فارغة",
 | 
				
			||||||
  "Invalid playlist.": "قائمة التشغيل غير صالحة.",
 | 
					    "Not a 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": "تحدى غير صالح",
 | 
					    "Erroneous challenge": "تحدى غير صالح",
 | 
				
			||||||
  "Invalid token": "روز غير صالح",
 | 
					    "Erroneous token": "روز غير صالح",
 | 
				
			||||||
  "Invalid user": "مستخدم غير صالح",
 | 
					    "No such user": "مستخدم غير صالح",
 | 
				
			||||||
    "Token is expired, please try again": "الرمز منتهى الصلاحية , الرجاء المحاولة مرة اخرى",
 | 
					    "Token is expired, please try again": "الرمز منتهى الصلاحية , الرجاء المحاولة مرة اخرى",
 | 
				
			||||||
    "English": "إنجليزى",
 | 
					    "English": "إنجليزى",
 | 
				
			||||||
    "English (auto-generated)": "إنجليزى (تم إنشائة تلقائى)",
 | 
					    "English (auto-generated)": "إنجليزى (تم إنشائة تلقائى)",
 | 
				
			||||||
@ -226,7 +243,7 @@
 | 
				
			|||||||
    "Marathi": "المهاراتية",
 | 
					    "Marathi": "المهاراتية",
 | 
				
			||||||
    "Mongolian": "المنغولية",
 | 
					    "Mongolian": "المنغولية",
 | 
				
			||||||
    "Nepali": "النيبالية",
 | 
					    "Nepali": "النيبالية",
 | 
				
			||||||
  "Norwegian": "النرويجية",
 | 
					    "Norwegian Bokmål": "النرويجية",
 | 
				
			||||||
    "Nyanja": "نيانجا",
 | 
					    "Nyanja": "نيانجا",
 | 
				
			||||||
    "Pashto": "الباشتو",
 | 
					    "Pashto": "الباشتو",
 | 
				
			||||||
    "Persian": "الفارسية",
 | 
					    "Persian": "الفارسية",
 | 
				
			||||||
@ -278,17 +295,18 @@
 | 
				
			|||||||
    "About": "حول",
 | 
					    "About": "حول",
 | 
				
			||||||
    "Rating: ": "التقييم",
 | 
					    "Rating: ": "التقييم",
 | 
				
			||||||
    "Language: ": "اللغة",
 | 
					    "Language: ": "اللغة",
 | 
				
			||||||
 | 
					    "View as playlist": "عرض كا قائمة التشغيل",
 | 
				
			||||||
    "Default": "الكل",
 | 
					    "Default": "الكل",
 | 
				
			||||||
    "Music": "الاغانى",
 | 
					    "Music": "الاغانى",
 | 
				
			||||||
    "Gaming": "الألعاب",
 | 
					    "Gaming": "الألعاب",
 | 
				
			||||||
    "News": "الأخبار",
 | 
					    "News": "الأخبار",
 | 
				
			||||||
    "Movies": "الأفلام",
 | 
					    "Movies": "الأفلام",
 | 
				
			||||||
  "Download as: ": "تحميل كـ",
 | 
					    "Download": "تحميل كـ",
 | 
				
			||||||
  "Download": "تحميل",
 | 
					    "Download as: ": "تحميل",
 | 
				
			||||||
    "%A %B %-d, %Y": "",
 | 
					    "%A %B %-d, %Y": "",
 | 
				
			||||||
    "(edited)": "(تم تعديلة)",
 | 
					    "(edited)": "(تم تعديلة)",
 | 
				
			||||||
  "Youtube permalink of the comment": "رابط التعليق على اليوتيوب",
 | 
					    "YouTube comment permalink": "رابط التعليق على اليوتيوب",
 | 
				
			||||||
  "`x` marked it with a ❤": "'x' اعجب بهذا",
 | 
					    "`x` marked it with a ❤": "`x` اعجب بهذا",
 | 
				
			||||||
    "Audio mode": "الوضع الصوتى",
 | 
					    "Audio mode": "الوضع الصوتى",
 | 
				
			||||||
    "Video mode": "وضع الفيديو",
 | 
					    "Video mode": "وضع الفيديو",
 | 
				
			||||||
    "Videos": "الفيديوهات",
 | 
					    "Videos": "الفيديوهات",
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										128
									
								
								locales/de.json
									
									
									
									
									
								
							
							
						
						
									
										128
									
								
								locales/de.json
									
									
									
									
									
								
							@ -5,15 +5,20 @@
 | 
				
			|||||||
    "Shared `x` ago": "Vor `x` geteilt",
 | 
					    "Shared `x` ago": "Vor `x` geteilt",
 | 
				
			||||||
    "Unsubscribe": "Abbestellen",
 | 
					    "Unsubscribe": "Abbestellen",
 | 
				
			||||||
    "Subscribe": "Abonnieren",
 | 
					    "Subscribe": "Abonnieren",
 | 
				
			||||||
  "Login to subscribe to `x`": "Einloggen um `x` zu abonnieren",
 | 
					 | 
				
			||||||
    "View channel on YouTube": "Kanal auf YouTube anzeigen",
 | 
					    "View channel on YouTube": "Kanal auf YouTube anzeigen",
 | 
				
			||||||
 | 
					    "View playlist on YouTube": "",
 | 
				
			||||||
    "newest": "neueste",
 | 
					    "newest": "neueste",
 | 
				
			||||||
    "oldest": "älteste",
 | 
					    "oldest": "älteste",
 | 
				
			||||||
    "popular": "beliebt",
 | 
					    "popular": "beliebt",
 | 
				
			||||||
  "last": "",
 | 
					    "last": "letzte",
 | 
				
			||||||
    "Next page": "Nächste Seite",
 | 
					    "Next page": "Nächste Seite",
 | 
				
			||||||
    "Previous page": "Vorherige Seite",
 | 
					    "Previous page": "Vorherige Seite",
 | 
				
			||||||
    "Clear watch history?": "Verlauf löschen?",
 | 
					    "Clear watch history?": "Verlauf löschen?",
 | 
				
			||||||
 | 
					    "New password": "Neues Passwort",
 | 
				
			||||||
 | 
					    "New passwords must match": "Neue Passwörter müssen übereinstimmen",
 | 
				
			||||||
 | 
					    "Cannot change password for Google accounts": "Das Passwort für Google -Konten kann nicht geändert werden",
 | 
				
			||||||
 | 
					    "Authorize token?": "Token autorisieren?",
 | 
				
			||||||
 | 
					    "Authorize token for `x`?": "Token für `x` autorisieren?",
 | 
				
			||||||
    "Yes": "Ja",
 | 
					    "Yes": "Ja",
 | 
				
			||||||
    "No": "Nein",
 | 
					    "No": "Nein",
 | 
				
			||||||
    "Import and Export Data": "Import und Export Daten",
 | 
					    "Import and Export Data": "Import und Export Daten",
 | 
				
			||||||
@ -32,25 +37,26 @@
 | 
				
			|||||||
    "An alternative front-end to YouTube": "Eine alternative Oberfläche für YouTube",
 | 
					    "An alternative front-end to YouTube": "Eine alternative Oberfläche für YouTube",
 | 
				
			||||||
    "JavaScript license information": "JavaScript Lizenzinformationen",
 | 
					    "JavaScript license information": "JavaScript Lizenzinformationen",
 | 
				
			||||||
    "source": "Quelle",
 | 
					    "source": "Quelle",
 | 
				
			||||||
  "Login": "Einloggen",
 | 
					    "Log in": "Einloggen",
 | 
				
			||||||
  "Login/Register": "Einloggen/Registrieren",
 | 
					    "Log in/register": "Einloggen/Registrieren",
 | 
				
			||||||
  "Login to Google": "In Google einloggen",
 | 
					    "Log in with Google": "In Google einloggen",
 | 
				
			||||||
  "User ID:": "Benutzer ID:",
 | 
					    "User ID": "Benutzer ID",
 | 
				
			||||||
  "Password:": "Passwort:",
 | 
					    "Password": "Passwort",
 | 
				
			||||||
    "Time (h:mm:ss):": "Zeit (h:mm:ss):",
 | 
					    "Time (h:mm:ss):": "Zeit (h:mm:ss):",
 | 
				
			||||||
    "Text CAPTCHA": "Text CAPTCHA",
 | 
					    "Text CAPTCHA": "Text CAPTCHA",
 | 
				
			||||||
    "Image CAPTCHA": "Image CAPTCHA",
 | 
					    "Image CAPTCHA": "Image CAPTCHA",
 | 
				
			||||||
    "Sign In": "Einloggen",
 | 
					    "Sign In": "Einloggen",
 | 
				
			||||||
    "Register": "Registrieren",
 | 
					    "Register": "Registrieren",
 | 
				
			||||||
  "Email:": "Email:",
 | 
					    "E-mail": "Email",
 | 
				
			||||||
  "Google verification code:": "Google Bestätigungscode:",
 | 
					    "Google verification code": "Google Bestätigungscode",
 | 
				
			||||||
    "Preferences": "Einstellungen",
 | 
					    "Preferences": "Einstellungen",
 | 
				
			||||||
    "Player preferences": "Playereinstellungen",
 | 
					    "Player preferences": "Playereinstellungen",
 | 
				
			||||||
    "Always loop: ": "Immer wiederholen: ",
 | 
					    "Always loop: ": "Immer wiederholen: ",
 | 
				
			||||||
    "Autoplay: ": "Automatisch abspielen: ",
 | 
					    "Autoplay: ": "Automatisch abspielen: ",
 | 
				
			||||||
 | 
					    "Play next by default: ": "Standardmäßig als nächstes abspielen: ",
 | 
				
			||||||
    "Autoplay next video: ": "nächstes Video automatisch abspielen: ",
 | 
					    "Autoplay next video: ": "nächstes Video automatisch abspielen: ",
 | 
				
			||||||
    "Listen by default: ": "Nur Ton als Standard: ",
 | 
					    "Listen by default: ": "Nur Ton als Standard: ",
 | 
				
			||||||
  "Proxy videos? ": "",
 | 
					    "Proxy videos? ": "Proxy-Videos? ",
 | 
				
			||||||
    "Default speed: ": "Standardgeschwindigkeit: ",
 | 
					    "Default speed: ": "Standardgeschwindigkeit: ",
 | 
				
			||||||
    "Preferred video quality: ": "Bevorzugte Videoqualität: ",
 | 
					    "Preferred video quality: ": "Bevorzugte Videoqualität: ",
 | 
				
			||||||
    "Player volume: ": "Playerlautstärke: ",
 | 
					    "Player volume: ": "Playerlautstärke: ",
 | 
				
			||||||
@ -60,10 +66,12 @@
 | 
				
			|||||||
    "Default captions: ": "Standarduntertitel: ",
 | 
					    "Default captions: ": "Standarduntertitel: ",
 | 
				
			||||||
    "Fallback captions: ": "Ersatzuntertitel: ",
 | 
					    "Fallback captions: ": "Ersatzuntertitel: ",
 | 
				
			||||||
    "Show related videos? ": "Ähnliche Videos anzeigen? ",
 | 
					    "Show related videos? ": "Ähnliche Videos anzeigen? ",
 | 
				
			||||||
 | 
					    "Show annotations by default? ": "Standardmäßig Anmerkungen anzeigen? ",
 | 
				
			||||||
    "Visual preferences": "Anzeigeeinstellungen",
 | 
					    "Visual preferences": "Anzeigeeinstellungen",
 | 
				
			||||||
    "Dark mode: ": "Nachtmodus: ",
 | 
					    "Dark mode: ": "Nachtmodus: ",
 | 
				
			||||||
    "Thin mode: ": "Schlanker Modus: ",
 | 
					    "Thin mode: ": "Schlanker Modus: ",
 | 
				
			||||||
    "Subscription preferences": "Abonnementeinstellungen",
 | 
					    "Subscription preferences": "Abonnementeinstellungen",
 | 
				
			||||||
 | 
					    "Show annotations by default for subscribed channels? ": "Anmerkungen für abonnierte Kanäle standardmäßig anzeigen? ",
 | 
				
			||||||
    "Redirect homepage to feed: ": "Startseite zu Feed umleiten: ",
 | 
					    "Redirect homepage to feed: ": "Startseite zu Feed umleiten: ",
 | 
				
			||||||
    "Number of videos shown in feed: ": "Anzahl von Videos die im Feed angezeigt werden: ",
 | 
					    "Number of videos shown in feed: ": "Anzahl von Videos die im Feed angezeigt werden: ",
 | 
				
			||||||
    "Sort videos by: ": "Videos sortieren nach: ",
 | 
					    "Sort videos by: ": "Videos sortieren nach: ",
 | 
				
			||||||
@ -79,34 +87,42 @@
 | 
				
			|||||||
    "Only show notifications (if there are any): ": "Nur Benachrichtigungen anzeigen (wenn es welche gibt): ",
 | 
					    "Only show notifications (if there are any): ": "Nur Benachrichtigungen anzeigen (wenn es welche gibt): ",
 | 
				
			||||||
    "Data preferences": "Dateneinstellungen",
 | 
					    "Data preferences": "Dateneinstellungen",
 | 
				
			||||||
    "Clear watch history": "Verlauf löschen",
 | 
					    "Clear watch history": "Verlauf löschen",
 | 
				
			||||||
  "Import/Export data": "Daten im- exportieren",
 | 
					    "Import/export data": "Daten im- exportieren",
 | 
				
			||||||
 | 
					    "Change password": "Passwort ändern",
 | 
				
			||||||
    "Manage subscriptions": "Abonnements verwalten",
 | 
					    "Manage subscriptions": "Abonnements verwalten",
 | 
				
			||||||
 | 
					    "Manage tokens": "Token verwalten",
 | 
				
			||||||
    "Watch history": "Verlauf",
 | 
					    "Watch history": "Verlauf",
 | 
				
			||||||
    "Delete account": "Account löschen",
 | 
					    "Delete account": "Account löschen",
 | 
				
			||||||
  "Administrator preferences": "",
 | 
					    "Administrator preferences": "Administratoreinstellungen",
 | 
				
			||||||
  "Default homepage: ": "",
 | 
					    "Default homepage: ": "Standard-Homepage: ",
 | 
				
			||||||
  "Feed menu: ": "",
 | 
					    "Feed menu: ": "Feed-Menü: ",
 | 
				
			||||||
  "Top enabled? ": "",
 | 
					    "Top enabled? ": "Top aktiviert? ",
 | 
				
			||||||
  "CAPTCHA enabled? ": "",
 | 
					    "CAPTCHA enabled? ": "CAPTCHA aktiviert? ",
 | 
				
			||||||
  "Login enabled? ": "",
 | 
					    "Login enabled? ": "Login aktiviert? ",
 | 
				
			||||||
  "Registration enabled? ": "",
 | 
					    "Registration enabled? ": "Registrierung aktiviert? ",
 | 
				
			||||||
  "Report statistics? ": "",
 | 
					    "Report statistics? ": "Statistiken berichten? ",
 | 
				
			||||||
    "Save preferences": "Einstellungen speichern",
 | 
					    "Save preferences": "Einstellungen speichern",
 | 
				
			||||||
    "Subscription manager": "Abonnementverwaltung",
 | 
					    "Subscription manager": "Abonnementverwaltung",
 | 
				
			||||||
 | 
					    "Token manager": "Token-Manager",
 | 
				
			||||||
 | 
					    "Token": "Token",
 | 
				
			||||||
    "`x` subscriptions": "`x` Abonnements",
 | 
					    "`x` subscriptions": "`x` Abonnements",
 | 
				
			||||||
  "Import/Export": "Importieren/Exportieren",
 | 
					    "`x` tokens": "`x` Tokens",
 | 
				
			||||||
 | 
					    "Import/export": "Importieren/Exportieren",
 | 
				
			||||||
    "unsubscribe": "abbestellen",
 | 
					    "unsubscribe": "abbestellen",
 | 
				
			||||||
 | 
					    "revoke": "widerrufen",
 | 
				
			||||||
    "Subscriptions": "Abonnements",
 | 
					    "Subscriptions": "Abonnements",
 | 
				
			||||||
    "`x` unseen notifications": "`x` ungesehene Benachrichtigungen",
 | 
					    "`x` unseen notifications": "`x` ungesehene Benachrichtigungen",
 | 
				
			||||||
    "search": "Suchen",
 | 
					    "search": "Suchen",
 | 
				
			||||||
  "Sign out": "Abmelden",
 | 
					    "Log out": "Abmelden",
 | 
				
			||||||
    "Released under the AGPLv3 by Omar Roth.": "Veröffentlicht unter AGPLv3 von Omar Roth.",
 | 
					    "Released under the AGPLv3 by Omar Roth.": "Veröffentlicht unter AGPLv3 von Omar Roth.",
 | 
				
			||||||
    "Source available here.": "Quellcode verfügbar hier.",
 | 
					    "Source available here.": "Quellcode verfügbar hier.",
 | 
				
			||||||
    "View JavaScript license information.": "Javascript Lizenzinformationen anzeigen.",
 | 
					    "View JavaScript license information.": "Javascript Lizenzinformationen anzeigen.",
 | 
				
			||||||
  "View privacy policy.": "",
 | 
					    "View privacy policy.": "Datenschutzerklärung einsehen.",
 | 
				
			||||||
    "Trending": "Trending",
 | 
					    "Trending": "Trending",
 | 
				
			||||||
  "Unlisted": "",
 | 
					    "Unlisted": "Nicht aufgeführt",
 | 
				
			||||||
  "Watch video on Youtube": "Video auf YouTube ansehen",
 | 
					    "Watch on YouTube": "Video auf YouTube ansehen",
 | 
				
			||||||
 | 
					    "Hide annotations": "Anmerkungen ausblenden",
 | 
				
			||||||
 | 
					    "Show annotations": "Anmerkungen anzeigen",
 | 
				
			||||||
    "Genre: ": "Genre: ",
 | 
					    "Genre: ": "Genre: ",
 | 
				
			||||||
    "License: ": "Lizenz: ",
 | 
					    "License: ": "Lizenz: ",
 | 
				
			||||||
    "Family friendly? ": "Familienfreundlich? ",
 | 
					    "Family friendly? ": "Familienfreundlich? ",
 | 
				
			||||||
@ -115,8 +131,9 @@
 | 
				
			|||||||
    "Whitelisted regions: ": "Erlaubte Regionen: ",
 | 
					    "Whitelisted regions: ": "Erlaubte Regionen: ",
 | 
				
			||||||
    "Blacklisted regions: ": "Unerlaubte Regionen: ",
 | 
					    "Blacklisted regions: ": "Unerlaubte Regionen: ",
 | 
				
			||||||
    "Shared `x`": "Geteilt `x`",
 | 
					    "Shared `x`": "Geteilt `x`",
 | 
				
			||||||
  "Premieres in `x`": "",
 | 
					    "`x` views": "`x` Ansichten",
 | 
				
			||||||
  "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.",
 | 
					    "Premieres in `x`": "Premieren in `x`",
 | 
				
			||||||
 | 
					    "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.": "Hallo! Anscheinend haben Sie JavaScript deaktiviert. Klicken Sie hier um Kommentare anzuzeigen, beachten sie dass es etwas länger dauern kann um sie zu laden.",
 | 
				
			||||||
    "View YouTube comments": "YouTube Kommentare anzeigen",
 | 
					    "View YouTube comments": "YouTube Kommentare anzeigen",
 | 
				
			||||||
    "View more comments on Reddit": "Mehr Kommentare auf Reddit anzeigen",
 | 
					    "View more comments on Reddit": "Mehr Kommentare auf Reddit anzeigen",
 | 
				
			||||||
    "View `x` comments": "`x` Kommentare anzeigen",
 | 
					    "View `x` comments": "`x` Kommentare anzeigen",
 | 
				
			||||||
@ -125,19 +142,19 @@
 | 
				
			|||||||
    "Show replies": "Antworten anzeigen",
 | 
					    "Show replies": "Antworten anzeigen",
 | 
				
			||||||
    "Incorrect password": "Falsches Passwort",
 | 
					    "Incorrect password": "Falsches Passwort",
 | 
				
			||||||
    "Quota exceeded, try again in a few hours": "Kontingent überschritten, versuche es in ein paar Stunden erneut",
 | 
					    "Quota exceeded, try again in a few hours": "Kontingent überschritten, versuche es in ein paar Stunden erneut",
 | 
				
			||||||
  "Unable to login, make sure two-factor authentication (Authenticator or SMS) is enabled.": "Login nicht möglich, stellen Sie sicher dass two-factor Authentifikation (Authentifizierung oder SMS) aktiviert ist.",
 | 
					    "Unable to log in, make sure two-factor authentication (Authenticator or SMS) is turned on.": "Login nicht möglich, stellen Sie sicher dass two-factor Authentifikation (Authentifizierung oder SMS) aktiviert ist.",
 | 
				
			||||||
    "Invalid TFA code": "Ungültiger TFA Code",
 | 
					    "Invalid TFA code": "Ungültiger TFA Code",
 | 
				
			||||||
  "Login failed. This may be because two-factor authentication is not enabled on your account.": "Login fehlgeschlagen. Das kann daran liegen dass two-factor Authentifizierung in ihrem Account nicht aktiviert ist.",
 | 
					    "Login failed. This may be because two-factor authentication is not turned on for your account.": "Login fehlgeschlagen. Das kann daran liegen dass two-factor Authentifizierung in ihrem Account nicht aktiviert ist.",
 | 
				
			||||||
  "Invalid answer": "Ungültige Antwort",
 | 
					    "Wrong answer": "Ungültige Antwort",
 | 
				
			||||||
  "Invalid CAPTCHA": "Ungültiges CAPTCHA",
 | 
					    "Erroneous CAPTCHA": "Ungültiges CAPTCHA",
 | 
				
			||||||
    "CAPTCHA is a required field": "CAPTCHA ist eine erforderliche Eingabe",
 | 
					    "CAPTCHA is a required field": "CAPTCHA ist eine erforderliche Eingabe",
 | 
				
			||||||
    "User ID is a required field": "Benutzer ID ist eine erforderliche Eingabe",
 | 
					    "User ID is a required field": "Benutzer ID ist eine erforderliche Eingabe",
 | 
				
			||||||
    "Password is a required field": "Passwort ist eine erforderliche Eingabe",
 | 
					    "Password is a required field": "Passwort ist eine erforderliche Eingabe",
 | 
				
			||||||
  "Invalid username or password": "Ungültiger Benutzername oder Passwort",
 | 
					    "Wrong username or password": "Ungültiger Benutzername oder Passwort",
 | 
				
			||||||
  "Please sign in using 'Sign in with Google'": "Bitte melden sie sich mit 'Mit Google anmelden' an",
 | 
					    "Please sign in using 'Log in with Google'": "Bitte melden sie sich mit 'Mit Google anmelden' an",
 | 
				
			||||||
    "Password cannot be empty": "Passwort darf nicht leer sein",
 | 
					    "Password cannot be empty": "Passwort darf nicht leer sein",
 | 
				
			||||||
    "Password cannot be longer than 55 characters": "Passwort darf nicht länger als 55 Zeichen sein",
 | 
					    "Password cannot be longer than 55 characters": "Passwort darf nicht länger als 55 Zeichen sein",
 | 
				
			||||||
  "Please sign in": "Bitte anmelden",
 | 
					    "Please log in": "Bitte anmelden",
 | 
				
			||||||
    "Invidious Private Feed for `x`": "Invidious Persönlicher Feed für `x`",
 | 
					    "Invidious Private Feed for `x`": "Invidious Persönlicher Feed für `x`",
 | 
				
			||||||
    "channel:`x`": "Kanal:`x`",
 | 
					    "channel:`x`": "Kanal:`x`",
 | 
				
			||||||
    "Deleted or invalid channel": "Gelöschter oder ungültiger Kanal",
 | 
					    "Deleted or invalid channel": "Gelöschter oder ungültiger Kanal",
 | 
				
			||||||
@ -149,15 +166,15 @@
 | 
				
			|||||||
    "Load more": "Mehr laden",
 | 
					    "Load more": "Mehr laden",
 | 
				
			||||||
    "`x` points": "`x` Punkte",
 | 
					    "`x` points": "`x` Punkte",
 | 
				
			||||||
    "Could not create mix.": "Mix konnte nicht erstellt werden.",
 | 
					    "Could not create mix.": "Mix konnte nicht erstellt werden.",
 | 
				
			||||||
  "Playlist is empty": "Playlist ist leer",
 | 
					    "Empty playlist": "Playlist ist leer",
 | 
				
			||||||
  "Invalid playlist.": "Ungültige Playlist.",
 | 
					    "Not a playlist.": "Ungültige Playlist.",
 | 
				
			||||||
    "Playlist does not exist.": "Playlist existiert nicht.",
 | 
					    "Playlist does not exist.": "Playlist existiert nicht.",
 | 
				
			||||||
    "Could not pull trending pages.": "Trending Seiten konnten nicht geladen werden.",
 | 
					    "Could not pull trending pages.": "Trending Seiten konnten nicht geladen werden.",
 | 
				
			||||||
    "Hidden field \"challenge\" is a required field": "Verstecktes Feld \"challenge\" ist eine erforderliche Eingabe",
 | 
					    "Hidden field \"challenge\" is a required field": "Verstecktes Feld \"challenge\" ist eine erforderliche Eingabe",
 | 
				
			||||||
    "Hidden field \"token\" is a required field": "Verstecktes Feld \"token\" ist eine erforderliche Eingabe",
 | 
					    "Hidden field \"token\" is a required field": "Verstecktes Feld \"token\" ist eine erforderliche Eingabe",
 | 
				
			||||||
  "Invalid challenge": "Ungültiger Test",
 | 
					    "Erroneous challenge": "Ungültiger Test",
 | 
				
			||||||
  "Invalid token": "Ungöltige Marke",
 | 
					    "Erroneous token": "Ungöltige Marke",
 | 
				
			||||||
  "Invalid user": "Ungültiger Benutzer",
 | 
					    "No such user": "Ungültiger Benutzer",
 | 
				
			||||||
    "Token is expired, please try again": "Marke ist abgelaufen, bitte erneut versuchen",
 | 
					    "Token is expired, please try again": "Marke ist abgelaufen, bitte erneut versuchen",
 | 
				
			||||||
    "English": "Englisch",
 | 
					    "English": "Englisch",
 | 
				
			||||||
    "English (auto-generated)": "Englisch (automatisch erzeugt)",
 | 
					    "English (auto-generated)": "Englisch (automatisch erzeugt)",
 | 
				
			||||||
@ -226,7 +243,7 @@
 | 
				
			|||||||
    "Marathi": "Marathi",
 | 
					    "Marathi": "Marathi",
 | 
				
			||||||
    "Mongolian": "Mongolisch",
 | 
					    "Mongolian": "Mongolisch",
 | 
				
			||||||
    "Nepali": "Nepalesisch",
 | 
					    "Nepali": "Nepalesisch",
 | 
				
			||||||
  "Norwegian": "Norwegisch",
 | 
					    "Norwegian Bokmål": "Norwegisch",
 | 
				
			||||||
    "Nyanja": "Nyanja",
 | 
					    "Nyanja": "Nyanja",
 | 
				
			||||||
    "Pashto": "Paschtunisch",
 | 
					    "Pashto": "Paschtunisch",
 | 
				
			||||||
    "Persian": "Persisch",
 | 
					    "Persian": "Persisch",
 | 
				
			||||||
@ -278,20 +295,21 @@
 | 
				
			|||||||
    "About": "Über",
 | 
					    "About": "Über",
 | 
				
			||||||
    "Rating: ": "Bewertung: ",
 | 
					    "Rating: ": "Bewertung: ",
 | 
				
			||||||
    "Language: ": "Sprache: ",
 | 
					    "Language: ": "Sprache: ",
 | 
				
			||||||
  "Default": "",
 | 
					    "View as playlist": "Als Wiedergabeliste anzeigen",
 | 
				
			||||||
  "Music": "",
 | 
					    "Default": "Standard",
 | 
				
			||||||
  "Gaming": "",
 | 
					    "Music": "Musik",
 | 
				
			||||||
  "News": "",
 | 
					    "Gaming": "Videospiele",
 | 
				
			||||||
  "Movies": "",
 | 
					    "News": "Neuigkeiten",
 | 
				
			||||||
  "Download": "",
 | 
					    "Movies": "Filme",
 | 
				
			||||||
  "Download as: ": "",
 | 
					    "Download": "Herunterladen",
 | 
				
			||||||
  "%A %B %-d, %Y": "",
 | 
					    "Download as: ": "Herunterladen als: ",
 | 
				
			||||||
  "(edited)": "",
 | 
					    "%A %B %-d, %Y": "%A %B %-d, %Y",
 | 
				
			||||||
  "Youtube permalink of the comment": "",
 | 
					    "(edited)": "(editiert)",
 | 
				
			||||||
  "`x` marked it with a ❤": "",
 | 
					    "YouTube comment permalink": "YouTube-Kommentar Permalink",
 | 
				
			||||||
  "Audio mode": "",
 | 
					    "`x` marked it with a ❤": "`x` markierte es mit einem ❤",
 | 
				
			||||||
  "Video mode": "",
 | 
					    "Audio mode": "Audiomodus",
 | 
				
			||||||
  "Videos": "",
 | 
					    "Video mode": "Videomodus",
 | 
				
			||||||
  "Playlists": "",
 | 
					    "Videos": "Videos",
 | 
				
			||||||
  "Current version: ": ""
 | 
					    "Playlists": "Wiedergabelisten",
 | 
				
			||||||
 | 
					    "Current version: ": "Aktuelle Version: "
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
							
								
								
									
										360
									
								
								locales/el.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										360
									
								
								locales/el.json
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,360 @@
 | 
				
			|||||||
 | 
					{
 | 
				
			||||||
 | 
					    "`x` subscribers": {
 | 
				
			||||||
 | 
					        "(\\D|^)1(\\D|$)": "`x` συνδρομητής",
 | 
				
			||||||
 | 
					        "": "`x` συνδρομητές"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "`x` videos": {
 | 
				
			||||||
 | 
					        "(\\D|^)1(\\D|$)": "`x` βίντεο",
 | 
				
			||||||
 | 
					        "": "`x` βίντεο"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "LIVE": "ΖΩΝΤΑΝΑ",
 | 
				
			||||||
 | 
					    "Shared `x` ago": "Μοιράστηκε πριν `x`",
 | 
				
			||||||
 | 
					    "Unsubscribe": "Απεγγραφή",
 | 
				
			||||||
 | 
					    "Subscribe": "Εγγραφή",
 | 
				
			||||||
 | 
					    "View channel on YouTube": "Προβολή καναλιού στο YouTube",
 | 
				
			||||||
 | 
					    "View playlist on YouTube": "",
 | 
				
			||||||
 | 
					    "newest": "νεότερα",
 | 
				
			||||||
 | 
					    "oldest": "παλιότερα",
 | 
				
			||||||
 | 
					    "popular": "δημοφιλή",
 | 
				
			||||||
 | 
					    "last": "τελευταία",
 | 
				
			||||||
 | 
					    "Next page": "Επόμενη σελίδα",
 | 
				
			||||||
 | 
					    "Previous page": "Προηγούμενη σελίδα",
 | 
				
			||||||
 | 
					    "Clear watch history?": "Διαγραφή ιστορικού προβολής;",
 | 
				
			||||||
 | 
					    "New password": "Νέος κωδικός πρόσβασης",
 | 
				
			||||||
 | 
					    "New passwords must match": "Οι νέοι κωδικοί πρόσβασης πρέπει να ταιριάζουν",
 | 
				
			||||||
 | 
					    "Cannot change password for Google accounts": "Δεν επιτρέπεται η αλλαγή κωδικού πρόσβασης λογαριασμών Google",
 | 
				
			||||||
 | 
					    "Authorize token?": "Εξουσιοδότηση διασύνδεσης;",
 | 
				
			||||||
 | 
					    "Authorize token for `x`?": "Εξουσιοδότηση διασύνδεσης με `x`;",
 | 
				
			||||||
 | 
					    "Yes": "Ναι",
 | 
				
			||||||
 | 
					    "No": "Όχι",
 | 
				
			||||||
 | 
					    "Import and Export Data": "Εισαγωγή και Εξαγωγή Δεδομένων",
 | 
				
			||||||
 | 
					    "Import": "Εισαγωγή",
 | 
				
			||||||
 | 
					    "Import Invidious data": "Εισαγωγή δεδομένων Invidious",
 | 
				
			||||||
 | 
					    "Import YouTube subscriptions": "Εισαγωγή συνδρομών YouTube",
 | 
				
			||||||
 | 
					    "Import FreeTube subscriptions (.db)": "Εισαγωγή συνδρομών FreeTube (.db)",
 | 
				
			||||||
 | 
					    "Import NewPipe subscriptions (.json)": "Εισαγωγή συνδρομών NewPipe (.json)",
 | 
				
			||||||
 | 
					    "Import NewPipe data (.zip)": "Εισαγωγή δεδομένων NewPipe (.zip)",
 | 
				
			||||||
 | 
					    "Export": "Εξαγωγή",
 | 
				
			||||||
 | 
					    "Export subscriptions as OPML": "Εξαγωγή συνδρομών ως OPML",
 | 
				
			||||||
 | 
					    "Export subscriptions as OPML (for NewPipe & FreeTube)": "Εξαγωγή συνδρομών ως OPML (για NewPipe & FreeTube)",
 | 
				
			||||||
 | 
					    "Export data as JSON": "Εξαγωγή δεδομένων ως JSON",
 | 
				
			||||||
 | 
					    "Delete account?": "Διαγραφή λογαριασμού;",
 | 
				
			||||||
 | 
					    "History": "Ιστορικό",
 | 
				
			||||||
 | 
					    "An alternative front-end to YouTube": "Μία εναλλακτική πλατφόρμα για το YouTube",
 | 
				
			||||||
 | 
					    "JavaScript license information": "Πληροφορίες άδειας JavaScript",
 | 
				
			||||||
 | 
					    "source": "πηγή",
 | 
				
			||||||
 | 
					    "Log in": "Σύνδεση",
 | 
				
			||||||
 | 
					    "Log in/register": "Σύνδεση/εγγραφή",
 | 
				
			||||||
 | 
					    "Log in with Google": "Σύνδεση με Google",
 | 
				
			||||||
 | 
					    "User ID": "Ταυτότητα χρήστη",
 | 
				
			||||||
 | 
					    "Password": "Κωδικός πρόσβασης",
 | 
				
			||||||
 | 
					    "Time (h:mm:ss):": "Ώρα (ω:λλ:δδ):",
 | 
				
			||||||
 | 
					    "Text CAPTCHA": "Κείμενο CAPTCHA",
 | 
				
			||||||
 | 
					    "Image CAPTCHA": "Εικόνα CAPTCHA",
 | 
				
			||||||
 | 
					    "Sign In": "Σύνδεση",
 | 
				
			||||||
 | 
					    "Register": "Εγγραφή",
 | 
				
			||||||
 | 
					    "E-mail": "E-mail",
 | 
				
			||||||
 | 
					    "Google verification code": "Κωδικός επαλήθευσης Google",
 | 
				
			||||||
 | 
					    "Preferences": "Προτιμήσεις",
 | 
				
			||||||
 | 
					    "Player preferences": "Προτιμήσεις αναπαραγωγής",
 | 
				
			||||||
 | 
					    "Always loop: ": "Αυτόματη επανάληψη: ",
 | 
				
			||||||
 | 
					    "Autoplay: ": "Αυτόματη αναπαραγωγή: ",
 | 
				
			||||||
 | 
					    "Play next by default: ": "Αναπαραγωγή επόμενου: ",
 | 
				
			||||||
 | 
					    "Autoplay next video: ": "Αυτόματη αναπαραγωγή επόμενου: ",
 | 
				
			||||||
 | 
					    "Listen by default: ": "Φόρτωση μόνο ήχου: ",
 | 
				
			||||||
 | 
					    "Proxy videos? ": "Αναπαραγωγή με διακομιστή μεσολάβησης (proxy): ",
 | 
				
			||||||
 | 
					    "Default speed: ": "Προεπιλεγμένη ταχύτητα: ",
 | 
				
			||||||
 | 
					    "Preferred video quality: ": "Προτιμώμενη ανάλυση: ",
 | 
				
			||||||
 | 
					    "Player volume: ": "Ένταση αναπαραγωγής: ",
 | 
				
			||||||
 | 
					    "Default comments: ": "Προεπιλεγμένα σχόλια: ",
 | 
				
			||||||
 | 
					    "youtube": "youtube",
 | 
				
			||||||
 | 
					    "reddit": "reddit",
 | 
				
			||||||
 | 
					    "Default captions: ": "Προεπιλεγμένοι υπότιτλοι: ",
 | 
				
			||||||
 | 
					    "Fallback captions: ": "Εναλλακτικοί υπότιτλοι: ",
 | 
				
			||||||
 | 
					    "Show related videos? ": "Προβολή σχετικών βίντεο; ",
 | 
				
			||||||
 | 
					    "Show annotations by default? ": "Αυτόματη προβολή σημειώσεων; :",
 | 
				
			||||||
 | 
					    "Visual preferences": "Προτιμήσεις εμφάνισης",
 | 
				
			||||||
 | 
					    "Dark mode: ": "Σκοτεινή λειτουργία: ",
 | 
				
			||||||
 | 
					    "Thin mode: ": "Ελαφριά λειτουργία: ",
 | 
				
			||||||
 | 
					    "Subscription preferences": "Προτιμήσεις συνδρομών",
 | 
				
			||||||
 | 
					    "Show annotations by default for subscribed channels? ": "Προβολή σημειώσεων μόνο για κανάλια στα οποία είστε συνδρομητής; ",
 | 
				
			||||||
 | 
					    "Redirect homepage to feed: ": "Ανακατεύθυνση αρχικής στη ροή συνδρομών: ",
 | 
				
			||||||
 | 
					    "Number of videos shown in feed: ": "Αριθμός βίντεο ανά σελίδα ροής συνδρομών: ",
 | 
				
			||||||
 | 
					    "Sort videos by: ": "Ταξινόμηση ανά: ",
 | 
				
			||||||
 | 
					    "published": "ημερομηνία δημοσίευσης",
 | 
				
			||||||
 | 
					    "published - reverse": "ημερομηνία δημοσίευσης - ανάποδα",
 | 
				
			||||||
 | 
					    "alphabetically": "αλφαβητικά",
 | 
				
			||||||
 | 
					    "alphabetically - reverse": "αλφαβητικά - ανάποδα",
 | 
				
			||||||
 | 
					    "channel name": "όνομα καναλιού",
 | 
				
			||||||
 | 
					    "channel name - reverse": "όνομα καναλιού - ανάποδα",
 | 
				
			||||||
 | 
					    "Only show latest video from channel: ": "Προβολή μόνο του τελευταίου βίντεο του καναλιού: ",
 | 
				
			||||||
 | 
					    "Only show latest unwatched video from channel: ": "Προβολή μόνο του τελευταίου μη-προβεβλημένου βίντεο του καναλιού: ",
 | 
				
			||||||
 | 
					    "Only show unwatched: ": "Προβολή μόνο μη-προβεβλημένων: ",
 | 
				
			||||||
 | 
					    "Only show notifications (if there are any): ": "Προβολή μόνο ειδοποιήσεων (αν υπάρχουν): ",
 | 
				
			||||||
 | 
					    "Data preferences": "Προτιμήσεις δεδομένων",
 | 
				
			||||||
 | 
					    "Clear watch history": "Εκκαθάριση ιστορικού προβολής",
 | 
				
			||||||
 | 
					    "Import/export data": "Εισαγωγή/εξαγωγή δεδομένων",
 | 
				
			||||||
 | 
					    "Change password": "Αλλαγή κωδικού πρόσβασης",
 | 
				
			||||||
 | 
					    "Manage subscriptions": "Διαχείριση συνδρομών",
 | 
				
			||||||
 | 
					    "Manage tokens": "Διαχείριση διασυνδέσεων",
 | 
				
			||||||
 | 
					    "Watch history": "Ιστορικό προβολής",
 | 
				
			||||||
 | 
					    "Delete account": "Διαγραφή λογαριασμού",
 | 
				
			||||||
 | 
					    "Administrator preferences": "Προτιμήσεις διαχειριστή",
 | 
				
			||||||
 | 
					    "Default homepage: ": "Προεπιλεγμένη αρχική: ",
 | 
				
			||||||
 | 
					    "Feed menu: ": "Μενού ροής συνδρομών: ",
 | 
				
			||||||
 | 
					    "Top enabled? ": "Ενεργοποίηση κορυφαίων; ",
 | 
				
			||||||
 | 
					    "CAPTCHA enabled? ": "Ενεργοποίηση CAPTCHA; ",
 | 
				
			||||||
 | 
					    "Login enabled? ": "Ενεργοποίηση σύνδεσης; ",
 | 
				
			||||||
 | 
					    "Registration enabled? ": "Ενεργοποίηση εγγραφής; ",
 | 
				
			||||||
 | 
					    "Report statistics? ": "Αναφορά στατιστικών; ",
 | 
				
			||||||
 | 
					    "Save preferences": "Αποθήκευση προτιμήσεων",
 | 
				
			||||||
 | 
					    "Subscription manager": "Διαχειριστής συνδρομών",
 | 
				
			||||||
 | 
					    "Token manager": "Διαχειριστής διασυνδέσεων",
 | 
				
			||||||
 | 
					    "Token": "Διασύνδεση",
 | 
				
			||||||
 | 
					    "`x` subscriptions": {
 | 
				
			||||||
 | 
					        "(\\D|^)1(\\D|$)": "`x` συνδρομή",
 | 
				
			||||||
 | 
					        "": "`x` συνδρομές"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "`x` tokens": {
 | 
				
			||||||
 | 
					        "(\\D|^)1(\\D|$)": "`x` διασύνδεση",
 | 
				
			||||||
 | 
					        "": "`x` διασυνδέσεις"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "Import/export": "Εισαγωγή/εξαγωγή",
 | 
				
			||||||
 | 
					    "unsubscribe": "κατάργηση συνδρομής",
 | 
				
			||||||
 | 
					    "revoke": "ανάκληση",
 | 
				
			||||||
 | 
					    "Subscriptions": "Συνδρομές",
 | 
				
			||||||
 | 
					    "`x` unseen notifications": {
 | 
				
			||||||
 | 
					        "(\\D|^)1(\\D|$)": "`x` καινούρια ειδοποίηση",
 | 
				
			||||||
 | 
					        "": "`x` καινούριες ειδοποιήσεις"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "search": "αναζήτηση",
 | 
				
			||||||
 | 
					    "Log out": "Αποσύνδεση",
 | 
				
			||||||
 | 
					    "Released under the AGPLv3 by Omar Roth.": "Κυκλοφορεί υπό την άδεια AGPLv3 από τον Omar Roth.",
 | 
				
			||||||
 | 
					    "Source available here.": "Προβολή πηγαίου κώδικα εδώ.",
 | 
				
			||||||
 | 
					    "View JavaScript license information.": "Προβολή πληροφοριών άδειας JavaScript.",
 | 
				
			||||||
 | 
					    "View privacy policy.": "Προβολή πολιτικής απορρήτου.",
 | 
				
			||||||
 | 
					    "Trending": "Τάσεις",
 | 
				
			||||||
 | 
					    "Unlisted": "Κρυφό",
 | 
				
			||||||
 | 
					    "Watch on YouTube": "Προβολή στο YouTube",
 | 
				
			||||||
 | 
					    "Hide annotations": "Απόκρυψη σημειώσεων",
 | 
				
			||||||
 | 
					    "Show annotations": "Προβολή σημειώσεων",
 | 
				
			||||||
 | 
					    "Genre: ": "Είδος: ",
 | 
				
			||||||
 | 
					    "License: ": "Άδεια: ",
 | 
				
			||||||
 | 
					    "Family friendly? ": "Φιλικό προς την οικογένεια; ",
 | 
				
			||||||
 | 
					    "Wilson score: ": "Wilson score: ",
 | 
				
			||||||
 | 
					    "Engagement: ": "Ενδιαφέρον: ",
 | 
				
			||||||
 | 
					    "Whitelisted regions: ": "Επιτρεπτές περιοχές: ",
 | 
				
			||||||
 | 
					    "Blacklisted regions: ": "Μη-επιτρεπτές περιοχές: ",
 | 
				
			||||||
 | 
					    "Shared `x`": "Μοιράστηκε το `x`",
 | 
				
			||||||
 | 
					    "`x` views": {
 | 
				
			||||||
 | 
					        "(\\D|^)1(\\D|$)": "`x` προβολή",
 | 
				
			||||||
 | 
					        "": "`x` προβολές"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "Premieres in `x`": "Πρώτη προβολή σε `x`",
 | 
				
			||||||
 | 
					    "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.": "Γεια! Φαίνεται πως έχετε απενεργοποιήσει το JavaScript. Πατήστε εδώ για προβολή σχολίων, αλλά έχετε υπ'όψιν σας πως ίσως φορτώσουν πιο αργά. ",
 | 
				
			||||||
 | 
					    "View YouTube comments": "Προβολή σχολίων από το YouTube",
 | 
				
			||||||
 | 
					    "View more comments on Reddit": "Προβολή περισσότερων σχολίων στο Reddit",
 | 
				
			||||||
 | 
					    "View `x` comments": "Προβολή `x` σχολίων",
 | 
				
			||||||
 | 
					    "View Reddit comments": "Προβολή σχολίων από το Reddit",
 | 
				
			||||||
 | 
					    "Hide replies": "Απόκρυψη απαντήσεων",
 | 
				
			||||||
 | 
					    "Show replies": "Προβολή απαντήσεων",
 | 
				
			||||||
 | 
					    "Incorrect password": "Λανθασμένος κωδικός πρόσβασης",
 | 
				
			||||||
 | 
					    "Quota exceeded, try again in a few hours": "Έχετε υπερβεί το όριο προσπαθειών, δοκιμάστε ξανα σε λίγες ώρες",
 | 
				
			||||||
 | 
					    "Unable to log in, make sure two-factor authentication (Authenticator or SMS) is turned on.": "Αδυναμία σύνδεσης, βεβαιωθείτε πως ο έλεγχος ταυτότητας δύο παραγόντων (με Authenticator ή SMS) είναι ενεργοποιημένος.",
 | 
				
			||||||
 | 
					    "Invalid TFA code": "Μη έγκυρος κωδικός ελέγχου ταυτότητας δύο παραγόντων",
 | 
				
			||||||
 | 
					    "Login failed. This may be because two-factor authentication is not turned on for your account.": "Αποτυχία σύνδεσης. Ίσως ευθύνεται η έλλειψη ελέγχου ταυτότητας δύο παραγόντων για το λογαριασμό σας.",
 | 
				
			||||||
 | 
					    "Wrong answer": "Λανθασμένη απάντηση",
 | 
				
			||||||
 | 
					    "Erroneous CAPTCHA": "Λανθασμένο CAPTCHA",
 | 
				
			||||||
 | 
					    "CAPTCHA is a required field": "Το CAPTCHA είναι απαιτούμενο πεδίο",
 | 
				
			||||||
 | 
					    "User ID is a required field": "Η ταυτότητα χρήστη είναι απαιτούμενο πεδίο",
 | 
				
			||||||
 | 
					    "Password is a required field": "Ο κωδικός πρόσβασης είναι απαιτούμενο πεδίο",
 | 
				
			||||||
 | 
					    "Wrong username or password": "Λανθασμένο όνομα χρήστη ή κωδικός πρόσβασης",
 | 
				
			||||||
 | 
					    "Please sign in using 'Log in with Google'": "Συνδεθείτε με την επιλογή 'Σύνδεση με Google'",
 | 
				
			||||||
 | 
					    "Password cannot be empty": "Ο κωδικός πρόσβασης δεν γίνεται να είναι κενός",
 | 
				
			||||||
 | 
					    "Password cannot be longer than 55 characters": "Ο κωδικός πρόσβασης δεν γίνεται να υπερβαίνει τους 55 χαρακτήρες",
 | 
				
			||||||
 | 
					    "Please log in": "Συνδεθείτε",
 | 
				
			||||||
 | 
					    "Invidious Private Feed for `x`": "Ροή RSS του Invidious για το χρήστη `x`",
 | 
				
			||||||
 | 
					    "channel:`x`": "κανάλι:`x`",
 | 
				
			||||||
 | 
					    "Deleted or invalid channel": "Διαγραμμένο ή μη έγκυρο κανάλι",
 | 
				
			||||||
 | 
					    "This channel does not exist.": "Αυτό το κανάλι δεν υπάρχει.",
 | 
				
			||||||
 | 
					    "Could not get channel info.": "Αδύναμια εύρεσης πληροφοριών καναλιού.",
 | 
				
			||||||
 | 
					    "Could not fetch comments": "Αδυναμία λήψης σχολίων",
 | 
				
			||||||
 | 
					    "View `x` replies": {
 | 
				
			||||||
 | 
					        "(\\D|^)1(\\D|$)": "Προβολή `x` απάντησης",
 | 
				
			||||||
 | 
					        "": "Προβολή `x` απαντήσεων"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "`x` ago": "Πριν `x`",
 | 
				
			||||||
 | 
					    "Load more": "Φόρτωση περισσότερων",
 | 
				
			||||||
 | 
					    "`x` points": {
 | 
				
			||||||
 | 
					        "(\\D|^)1(\\D|$)": "`x` βαθμός",
 | 
				
			||||||
 | 
					        "": "`x` βαθμοί"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "Could not create mix.": "Αδυναμία δημιουργίας μίξης.",
 | 
				
			||||||
 | 
					    "Empty playlist": "Κενή λίστα αναπαραγωγής",
 | 
				
			||||||
 | 
					    "Not a playlist.": "Μη έγκυρη λίστα αναπαραγωγής",
 | 
				
			||||||
 | 
					    "Playlist does not exist.": "Μη υπαρκτή λίστα αναπαραγωγής.",
 | 
				
			||||||
 | 
					    "Could not pull trending pages.": "Αδυναμία λήψης σελίδας τάσεων.",
 | 
				
			||||||
 | 
					    "Hidden field \"challenge\" is a required field": "Το Κρυφό πεδίο \"δοκιμασία\" είναι απαραίτητο",
 | 
				
			||||||
 | 
					    "Hidden field \"token\" is a required field": "Το κρυφό πεδίο \"αναγνωριστικό διασύνδεσης\" είναι απαραίτητο",
 | 
				
			||||||
 | 
					    "Erroneous challenge": "Λανθασμένη δοκιμασία",
 | 
				
			||||||
 | 
					    "Erroneous token": "Λανθασμένο αναγνωριστικό διασύνδεσης",
 | 
				
			||||||
 | 
					    "No such user": "Μη υπαρκτός χρήστης",
 | 
				
			||||||
 | 
					    "Token is expired, please try again": "Το αναγνωριστικό διασύνδεσης έχει λήξει, παρακαλώ ξαναπροσπαθήστε",
 | 
				
			||||||
 | 
					    "English": "Αγγλικά",
 | 
				
			||||||
 | 
					    "English (auto-generated)": "Αγγλικά (αυτόματα)",
 | 
				
			||||||
 | 
					    "Afrikaans": "Αφρικάανς",
 | 
				
			||||||
 | 
					    "Albanian": "Αλβανικά",
 | 
				
			||||||
 | 
					    "Amharic": "Αμχαρικά",
 | 
				
			||||||
 | 
					    "Arabic": "Αραβικά",
 | 
				
			||||||
 | 
					    "Armenian": "Αρμένικα",
 | 
				
			||||||
 | 
					    "Azerbaijani": "Αζερικά",
 | 
				
			||||||
 | 
					    "Bangla": "Μπενγκάλι",
 | 
				
			||||||
 | 
					    "Basque": "Βασκικά",
 | 
				
			||||||
 | 
					    "Belarusian": "Λευκορωσικά",
 | 
				
			||||||
 | 
					    "Bosnian": "Βοσνιακά",
 | 
				
			||||||
 | 
					    "Bulgarian": "Βουλγάρικα",
 | 
				
			||||||
 | 
					    "Burmese": "Βιρμανικά",
 | 
				
			||||||
 | 
					    "Catalan": "Καταλανικά",
 | 
				
			||||||
 | 
					    "Cebuano": "Κεμπουάνο",
 | 
				
			||||||
 | 
					    "Chinese (Simplified)": "Κινέζικα (Απλοποιημένα)",
 | 
				
			||||||
 | 
					    "Chinese (Traditional)": "Κινέζικα (Παραδοσιακά)",
 | 
				
			||||||
 | 
					    "Corsican": "Κορσικανικά",
 | 
				
			||||||
 | 
					    "Croatian": "Κροατικά",
 | 
				
			||||||
 | 
					    "Czech": "Τσέχικα",
 | 
				
			||||||
 | 
					    "Danish": "Δανέζικα",
 | 
				
			||||||
 | 
					    "Dutch": "Ολλανδικά",
 | 
				
			||||||
 | 
					    "Esperanto": "Εσπεράντο",
 | 
				
			||||||
 | 
					    "Estonian": "Εσθονικά",
 | 
				
			||||||
 | 
					    "Filipino": "Φιλιππινέζικα",
 | 
				
			||||||
 | 
					    "Finnish": "Φινλανδικά",
 | 
				
			||||||
 | 
					    "French": "Γαλλικά",
 | 
				
			||||||
 | 
					    "Galician": "Γαλικιακά",
 | 
				
			||||||
 | 
					    "Georgian": "Γεωργιανά",
 | 
				
			||||||
 | 
					    "German": "Γερμανικά",
 | 
				
			||||||
 | 
					    "Greek": "Ελληνικά",
 | 
				
			||||||
 | 
					    "Gujarati": "Γκουτζαρατικά",
 | 
				
			||||||
 | 
					    "Haitian Creole": "Κρεόλ Αϊτής",
 | 
				
			||||||
 | 
					    "Hausa": "Χάουσα",
 | 
				
			||||||
 | 
					    "Hawaiian": "Χαβανέζικα",
 | 
				
			||||||
 | 
					    "Hebrew": "Εβραϊκά",
 | 
				
			||||||
 | 
					    "Hindi": "Χίντι",
 | 
				
			||||||
 | 
					    "Hmong": "Χμονγκ",
 | 
				
			||||||
 | 
					    "Hungarian": "Ουγγαρέζικα",
 | 
				
			||||||
 | 
					    "Icelandic": "Ισλανδικά",
 | 
				
			||||||
 | 
					    "Igbo": "Ιγκμπό",
 | 
				
			||||||
 | 
					    "Indonesian": "Ινδονησιακά",
 | 
				
			||||||
 | 
					    "Irish": "Ιρλανδικά",
 | 
				
			||||||
 | 
					    "Italian": "Ιταλικά",
 | 
				
			||||||
 | 
					    "Japanese": "Ιαπωνικά",
 | 
				
			||||||
 | 
					    "Javanese": "Ιαβανέζικα",
 | 
				
			||||||
 | 
					    "Kannada": "Κανάντα",
 | 
				
			||||||
 | 
					    "Kazakh": "Καζακικά",
 | 
				
			||||||
 | 
					    "Khmer": "Χμερ",
 | 
				
			||||||
 | 
					    "Korean": "Κορεάτικα",
 | 
				
			||||||
 | 
					    "Kurdish": "Κούρδικα",
 | 
				
			||||||
 | 
					    "Kyrgyz": "Κιργιστανικά",
 | 
				
			||||||
 | 
					    "Lao": "Lao",
 | 
				
			||||||
 | 
					    "Latin": "Λατινικά",
 | 
				
			||||||
 | 
					    "Latvian": "Λετονικά",
 | 
				
			||||||
 | 
					    "Lithuanian": "Λιθουανικά",
 | 
				
			||||||
 | 
					    "Luxembourgish": "Λουξεμβουργιανά",
 | 
				
			||||||
 | 
					    "Macedonian": "Μακεδονικά",
 | 
				
			||||||
 | 
					    "Malagasy": "Μαλαγασικά",
 | 
				
			||||||
 | 
					    "Malay": "Μαλαισιανά",
 | 
				
			||||||
 | 
					    "Malayalam": "Μαλαγιαλάμ",
 | 
				
			||||||
 | 
					    "Maltese": "Μαλτέζικα",
 | 
				
			||||||
 | 
					    "Maori": "Μαορί",
 | 
				
			||||||
 | 
					    "Marathi": "Μαράτι",
 | 
				
			||||||
 | 
					    "Mongolian": "Μογγολικά",
 | 
				
			||||||
 | 
					    "Nepali": "Νεπαλικά",
 | 
				
			||||||
 | 
					    "Norwegian Bokmål": "Νορβηγικά Μποκμάλ",
 | 
				
			||||||
 | 
					    "Nyanja": "Νιάντζα",
 | 
				
			||||||
 | 
					    "Pashto": "Αφγανικά",
 | 
				
			||||||
 | 
					    "Persian": "Περσικά",
 | 
				
			||||||
 | 
					    "Polish": "Πολωνικά",
 | 
				
			||||||
 | 
					    "Portuguese": "Πορτογαλικά",
 | 
				
			||||||
 | 
					    "Punjabi": "Παντζάμπι",
 | 
				
			||||||
 | 
					    "Romanian": "Ρουμανικά",
 | 
				
			||||||
 | 
					    "Russian": "Ρώσικα",
 | 
				
			||||||
 | 
					    "Samoan": "Σαμόα",
 | 
				
			||||||
 | 
					    "Scottish Gaelic": "Σκωτικά Γαελικά",
 | 
				
			||||||
 | 
					    "Serbian": "Σέρβικα",
 | 
				
			||||||
 | 
					    "Shona": "Σόνα",
 | 
				
			||||||
 | 
					    "Sindhi": "Σίντι",
 | 
				
			||||||
 | 
					    "Sinhala": "Σιναλεζικά",
 | 
				
			||||||
 | 
					    "Slovak": "Σλοβακικά",
 | 
				
			||||||
 | 
					    "Slovenian": "ΣΛοβενικά",
 | 
				
			||||||
 | 
					    "Somali": "Σομαλικά",
 | 
				
			||||||
 | 
					    "Southern Sotho": "Νότια Σούτου",
 | 
				
			||||||
 | 
					    "Spanish": "Ισπανικά",
 | 
				
			||||||
 | 
					    "Spanish (Latin America)": "Ισπανικά (Λατινική Αμερική)",
 | 
				
			||||||
 | 
					    "Sundanese": "Σουντανέζικα",
 | 
				
			||||||
 | 
					    "Swahili": "Σουαχίλι",
 | 
				
			||||||
 | 
					    "Swedish": "Σουηδικά",
 | 
				
			||||||
 | 
					    "Tajik": "Τατζικικά",
 | 
				
			||||||
 | 
					    "Tamil": "Ταμίλ",
 | 
				
			||||||
 | 
					    "Telugu": "Τελούγκου",
 | 
				
			||||||
 | 
					    "Thai": "Ταϊλανδικά",
 | 
				
			||||||
 | 
					    "Turkish": "Τούρκικα",
 | 
				
			||||||
 | 
					    "Ukrainian": "Ουκρανικά",
 | 
				
			||||||
 | 
					    "Urdu": "Ουρντού",
 | 
				
			||||||
 | 
					    "Uzbek": "Ουζμπεκικά",
 | 
				
			||||||
 | 
					    "Vietnamese": "Βιετναμέζικα",
 | 
				
			||||||
 | 
					    "Welsh": "Ουαλικά",
 | 
				
			||||||
 | 
					    "Western Frisian": "Δυτική Φριζική",
 | 
				
			||||||
 | 
					    "Xhosa": "Xhosa",
 | 
				
			||||||
 | 
					    "Yiddish": "Γίντις",
 | 
				
			||||||
 | 
					    "Yoruba": "Γιορούμπα",
 | 
				
			||||||
 | 
					    "Zulu": "Ζουλού",
 | 
				
			||||||
 | 
					    "`x` years": {
 | 
				
			||||||
 | 
					        "(\\D|^)1(\\D|$)": "`x` χρόνο",
 | 
				
			||||||
 | 
					        "": "`x` χρόνια"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "`x` months": {
 | 
				
			||||||
 | 
					        "(\\D|^)1(\\D|$)": "`x` μήνα",
 | 
				
			||||||
 | 
					        "": "`x` μήνες"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "`x` weeks": {
 | 
				
			||||||
 | 
					        "(\\D|^)1(\\D|$)": "`x` εβδομάδα",
 | 
				
			||||||
 | 
					        "": "`x` εβδομάδες"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "`x` days": {
 | 
				
			||||||
 | 
					        "(\\D|^)1(\\D|$)": "`x` ημέρα",
 | 
				
			||||||
 | 
					        "": "`x` ημέρες"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "`x` hours": {
 | 
				
			||||||
 | 
					        "(\\D|^)1(\\D|$)": "`x` ώρα",
 | 
				
			||||||
 | 
					        "": "`x` ώρες"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "`x` minutes": {
 | 
				
			||||||
 | 
					        "(\\D|^)1(\\D|$)": "`x` λεπτό",
 | 
				
			||||||
 | 
					        "": "`x` λεπτά"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "`x` seconds": {
 | 
				
			||||||
 | 
					        "(\\D|^)1(\\D|$)": "`x` δευτερόλεπτο",
 | 
				
			||||||
 | 
					        "": "`x` δευτερόλεπτα"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "Fallback comments: ": "Εναλλακτικά σχόλια: ",
 | 
				
			||||||
 | 
					    "Popular": "Δημοφιλή",
 | 
				
			||||||
 | 
					    "Top": "Κορυφαία",
 | 
				
			||||||
 | 
					    "About": "Σχετικά",
 | 
				
			||||||
 | 
					    "Rating: ": "Aξιολόγηση: ",
 | 
				
			||||||
 | 
					    "Language: ": "Γλώσσα: ",
 | 
				
			||||||
 | 
					    "View as playlist": "Προβολή ως λίστα αναπαραγωγής",
 | 
				
			||||||
 | 
					    "Default": "Προεπιλογή",
 | 
				
			||||||
 | 
					    "Music": "Μουσική",
 | 
				
			||||||
 | 
					    "Gaming": "Παιχνίδια",
 | 
				
			||||||
 | 
					    "News": "Ειδήσεις",
 | 
				
			||||||
 | 
					    "Movies": "Ταινίες",
 | 
				
			||||||
 | 
					    "Download": "Λήψη",
 | 
				
			||||||
 | 
					    "Download as: ": "Λήψη ως: ",
 | 
				
			||||||
 | 
					    "%A %B %-d, %Y": "%A %B %-d, %Y",
 | 
				
			||||||
 | 
					    "(edited)": "(τροποποιημένο)",
 | 
				
			||||||
 | 
					    "YouTube comment permalink": "Σύνδεσμος YouTube σχολίου",
 | 
				
			||||||
 | 
					    "`x` marked it with a ❤": "Ο χρηστης `x` έβαλε ❤",
 | 
				
			||||||
 | 
					    "Audio mode": "Λειτουργία ήχου",
 | 
				
			||||||
 | 
					    "Video mode": "Λειτουργία βίντεο",
 | 
				
			||||||
 | 
					    "Videos": "Βίντεο",
 | 
				
			||||||
 | 
					    "Playlists": "Λίστες Αναπαραγωγής",
 | 
				
			||||||
 | 
					    "Current version: ": "Τρέχουσα έκδοση: "
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -1,12 +1,18 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  "`x` subscribers": "`x` subscribers",
 | 
					    "`x` subscribers": {
 | 
				
			||||||
  "`x` videos": "`x` videos",
 | 
					        "(\\D|^)1(\\D|$)": "`x` subscriber",
 | 
				
			||||||
 | 
					        "": "`x` subscribers"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "`x` videos": {
 | 
				
			||||||
 | 
					        "(\\D|^)1(\\D|$)": "`x` video",
 | 
				
			||||||
 | 
					        "": "`x` videos"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "LIVE": "LIVE",
 | 
					    "LIVE": "LIVE",
 | 
				
			||||||
    "Shared `x` ago": "Shared `x` ago",
 | 
					    "Shared `x` ago": "Shared `x` ago",
 | 
				
			||||||
    "Unsubscribe": "Unsubscribe",
 | 
					    "Unsubscribe": "Unsubscribe",
 | 
				
			||||||
    "Subscribe": "Subscribe",
 | 
					    "Subscribe": "Subscribe",
 | 
				
			||||||
  "Login to subscribe to `x`": "Login to subscribe to `x`",
 | 
					 | 
				
			||||||
    "View channel on YouTube": "View channel on YouTube",
 | 
					    "View channel on YouTube": "View channel on YouTube",
 | 
				
			||||||
 | 
					    "View playlist on YouTube": "View playlist on YouTube",
 | 
				
			||||||
    "newest": "newest",
 | 
					    "newest": "newest",
 | 
				
			||||||
    "oldest": "oldest",
 | 
					    "oldest": "oldest",
 | 
				
			||||||
    "popular": "popular",
 | 
					    "popular": "popular",
 | 
				
			||||||
@ -14,6 +20,11 @@
 | 
				
			|||||||
    "Next page": "Next page",
 | 
					    "Next page": "Next page",
 | 
				
			||||||
    "Previous page": "Previous page",
 | 
					    "Previous page": "Previous page",
 | 
				
			||||||
    "Clear watch history?": "Clear watch history?",
 | 
					    "Clear watch history?": "Clear watch history?",
 | 
				
			||||||
 | 
					    "New password": "New password",
 | 
				
			||||||
 | 
					    "New passwords must match": "New passwords must match",
 | 
				
			||||||
 | 
					    "Cannot change password for Google accounts": "Cannot change password for Google accounts",
 | 
				
			||||||
 | 
					    "Authorize token?": "Authorize token?",
 | 
				
			||||||
 | 
					    "Authorize token for `x`?": "Authorize token for `x`?",
 | 
				
			||||||
    "Yes": "Yes",
 | 
					    "Yes": "Yes",
 | 
				
			||||||
    "No": "No",
 | 
					    "No": "No",
 | 
				
			||||||
    "Import and Export Data": "Import and Export Data",
 | 
					    "Import and Export Data": "Import and Export Data",
 | 
				
			||||||
@ -32,22 +43,23 @@
 | 
				
			|||||||
    "An alternative front-end to YouTube": "An alternative front-end to YouTube",
 | 
					    "An alternative front-end to YouTube": "An alternative front-end to YouTube",
 | 
				
			||||||
    "JavaScript license information": "JavaScript license information",
 | 
					    "JavaScript license information": "JavaScript license information",
 | 
				
			||||||
    "source": "source",
 | 
					    "source": "source",
 | 
				
			||||||
  "Login": "Login",
 | 
					    "Log in": "Log in",
 | 
				
			||||||
  "Login/Register": "Login/Register",
 | 
					    "Log in/register": "Log in/register",
 | 
				
			||||||
  "Login to Google": "Login to Google",
 | 
					    "Log in with Google": "Log in with Google",
 | 
				
			||||||
  "User ID:": "User ID:",
 | 
					    "User ID": "User ID",
 | 
				
			||||||
  "Password:": "Password:",
 | 
					    "Password": "Password",
 | 
				
			||||||
    "Time (h:mm:ss):": "Time (h:mm:ss):",
 | 
					    "Time (h:mm:ss):": "Time (h:mm:ss):",
 | 
				
			||||||
    "Text CAPTCHA": "Text CAPTCHA",
 | 
					    "Text CAPTCHA": "Text CAPTCHA",
 | 
				
			||||||
    "Image CAPTCHA": "Image CAPTCHA",
 | 
					    "Image CAPTCHA": "Image CAPTCHA",
 | 
				
			||||||
    "Sign In": "Sign In",
 | 
					    "Sign In": "Sign In",
 | 
				
			||||||
    "Register": "Register",
 | 
					    "Register": "Register",
 | 
				
			||||||
  "Email:": "Email:",
 | 
					    "E-mail": "E-mail",
 | 
				
			||||||
  "Google verification code:": "Google verification code:",
 | 
					    "Google verification code": "Google verification code",
 | 
				
			||||||
    "Preferences": "Preferences",
 | 
					    "Preferences": "Preferences",
 | 
				
			||||||
    "Player preferences": "Player preferences",
 | 
					    "Player preferences": "Player preferences",
 | 
				
			||||||
    "Always loop: ": "Always loop: ",
 | 
					    "Always loop: ": "Always loop: ",
 | 
				
			||||||
    "Autoplay: ": "Autoplay: ",
 | 
					    "Autoplay: ": "Autoplay: ",
 | 
				
			||||||
 | 
					    "Play next by default: ": "Play next by default: ",
 | 
				
			||||||
    "Autoplay next video: ": "Autoplay next video: ",
 | 
					    "Autoplay next video: ": "Autoplay next video: ",
 | 
				
			||||||
    "Listen by default: ": "Listen by default: ",
 | 
					    "Listen by default: ": "Listen by default: ",
 | 
				
			||||||
    "Proxy videos? ": "Proxy videos? ",
 | 
					    "Proxy videos? ": "Proxy videos? ",
 | 
				
			||||||
@ -55,13 +67,17 @@
 | 
				
			|||||||
    "Preferred video quality: ": "Preferred video quality: ",
 | 
					    "Preferred video quality: ": "Preferred video quality: ",
 | 
				
			||||||
    "Player volume: ": "Player volume: ",
 | 
					    "Player volume: ": "Player volume: ",
 | 
				
			||||||
    "Default comments: ": "Default comments: ",
 | 
					    "Default comments: ": "Default comments: ",
 | 
				
			||||||
 | 
					    "youtube": "youtube",
 | 
				
			||||||
 | 
					    "reddit": "reddit",
 | 
				
			||||||
    "Default captions: ": "Default captions: ",
 | 
					    "Default captions: ": "Default captions: ",
 | 
				
			||||||
    "Fallback captions: ": "Fallback captions: ",
 | 
					    "Fallback captions: ": "Fallback captions: ",
 | 
				
			||||||
    "Show related videos? ": "Show related videos? ",
 | 
					    "Show related videos? ": "Show related videos? ",
 | 
				
			||||||
 | 
					    "Show annotations by default? ": "Show annotations by default? ",
 | 
				
			||||||
    "Visual preferences": "Visual preferences",
 | 
					    "Visual preferences": "Visual preferences",
 | 
				
			||||||
    "Dark mode: ": "Dark mode: ",
 | 
					    "Dark mode: ": "Dark mode: ",
 | 
				
			||||||
    "Thin mode: ": "Thin mode: ",
 | 
					    "Thin mode: ": "Thin mode: ",
 | 
				
			||||||
    "Subscription preferences": "Subscription preferences",
 | 
					    "Subscription preferences": "Subscription preferences",
 | 
				
			||||||
 | 
					    "Show annotations by default for subscribed channels? ": "Show annotations by default for subscribed channels? ",
 | 
				
			||||||
    "Redirect homepage to feed: ": "Redirect homepage to feed: ",
 | 
					    "Redirect homepage to feed: ": "Redirect homepage to feed: ",
 | 
				
			||||||
    "Number of videos shown in feed: ": "Number of videos shown in feed: ",
 | 
					    "Number of videos shown in feed: ": "Number of videos shown in feed: ",
 | 
				
			||||||
    "Sort videos by: ": "Sort videos by: ",
 | 
					    "Sort videos by: ": "Sort videos by: ",
 | 
				
			||||||
@ -77,8 +93,10 @@
 | 
				
			|||||||
    "Only show notifications (if there are any): ": "Only show notifications (if there are any): ",
 | 
					    "Only show notifications (if there are any): ": "Only show notifications (if there are any): ",
 | 
				
			||||||
    "Data preferences": "Data preferences",
 | 
					    "Data preferences": "Data preferences",
 | 
				
			||||||
    "Clear watch history": "Clear watch history",
 | 
					    "Clear watch history": "Clear watch history",
 | 
				
			||||||
  "Import/Export data": "Import/Export data",
 | 
					    "Import/export data": "Import/export data",
 | 
				
			||||||
 | 
					    "Change password": "Change password",
 | 
				
			||||||
    "Manage subscriptions": "Manage subscriptions",
 | 
					    "Manage subscriptions": "Manage subscriptions",
 | 
				
			||||||
 | 
					    "Manage tokens": "Manage tokens",
 | 
				
			||||||
    "Watch history": "Watch history",
 | 
					    "Watch history": "Watch history",
 | 
				
			||||||
    "Delete account": "Delete account",
 | 
					    "Delete account": "Delete account",
 | 
				
			||||||
    "Administrator preferences": "Administrator preferences",
 | 
					    "Administrator preferences": "Administrator preferences",
 | 
				
			||||||
@ -91,20 +109,35 @@
 | 
				
			|||||||
    "Report statistics? ": "Report statistics? ",
 | 
					    "Report statistics? ": "Report statistics? ",
 | 
				
			||||||
    "Save preferences": "Save preferences",
 | 
					    "Save preferences": "Save preferences",
 | 
				
			||||||
    "Subscription manager": "Subscription manager",
 | 
					    "Subscription manager": "Subscription manager",
 | 
				
			||||||
  "`x` subscriptions": "`x` subscriptions",
 | 
					    "Token manager": "Token manager",
 | 
				
			||||||
  "Import/Export": "Import/Export",
 | 
					    "Token": "Token",
 | 
				
			||||||
 | 
					    "`x` subscriptions": {
 | 
				
			||||||
 | 
					        "(\\D|^)1(\\D|$)": "`x` subscription",
 | 
				
			||||||
 | 
					        "": "`x` subscriptions"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "`x` tokens": {
 | 
				
			||||||
 | 
					        "(\\D|^)1(\\D|$)": "`x` token",
 | 
				
			||||||
 | 
					        "": "`x` tokens"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "Import/export": "Import/export",
 | 
				
			||||||
    "unsubscribe": "unsubscribe",
 | 
					    "unsubscribe": "unsubscribe",
 | 
				
			||||||
 | 
					    "revoke": "revoke",
 | 
				
			||||||
    "Subscriptions": "Subscriptions",
 | 
					    "Subscriptions": "Subscriptions",
 | 
				
			||||||
  "`x` unseen notifications": "`x` unseen notifications",
 | 
					    "`x` unseen notifications": {
 | 
				
			||||||
 | 
					        "(\\D|^)1(\\D|$)": "`x` unseen notification",
 | 
				
			||||||
 | 
					        "": "`x` unseen notifications"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "search": "search",
 | 
					    "search": "search",
 | 
				
			||||||
  "Sign out": "Sign out",
 | 
					    "Log out": "Log out",
 | 
				
			||||||
    "Released under the AGPLv3 by Omar Roth.": "Released under the AGPLv3 by Omar Roth.",
 | 
					    "Released under the AGPLv3 by Omar Roth.": "Released under the AGPLv3 by Omar Roth.",
 | 
				
			||||||
    "Source available here.": "Source available here.",
 | 
					    "Source available here.": "Source available here.",
 | 
				
			||||||
    "View JavaScript license information.": "View JavaScript license information.",
 | 
					    "View JavaScript license information.": "View JavaScript license information.",
 | 
				
			||||||
    "View privacy policy.": "View privacy policy.",
 | 
					    "View privacy policy.": "View privacy policy.",
 | 
				
			||||||
    "Trending": "Trending",
 | 
					    "Trending": "Trending",
 | 
				
			||||||
  "Unlisted": "",
 | 
					    "Unlisted": "Unlisted",
 | 
				
			||||||
  "Watch video on Youtube": "Watch video on Youtube",
 | 
					    "Watch on YouTube": "Watch on YouTube",
 | 
				
			||||||
 | 
					    "Hide annotations": "Hide annotations",
 | 
				
			||||||
 | 
					    "Show annotations": "Show annotations",
 | 
				
			||||||
    "Genre: ": "Genre: ",
 | 
					    "Genre: ": "Genre: ",
 | 
				
			||||||
    "License: ": "License: ",
 | 
					    "License: ": "License: ",
 | 
				
			||||||
    "Family friendly? ": "Family friendly? ",
 | 
					    "Family friendly? ": "Family friendly? ",
 | 
				
			||||||
@ -113,8 +146,12 @@
 | 
				
			|||||||
    "Whitelisted regions: ": "Whitelisted regions: ",
 | 
					    "Whitelisted regions: ": "Whitelisted regions: ",
 | 
				
			||||||
    "Blacklisted regions: ": "Blacklisted regions: ",
 | 
					    "Blacklisted regions: ": "Blacklisted regions: ",
 | 
				
			||||||
    "Shared `x`": "Shared `x`",
 | 
					    "Shared `x`": "Shared `x`",
 | 
				
			||||||
  "Premieres in `x`": "",
 | 
					    "`x` views": {
 | 
				
			||||||
  "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.",
 | 
					        "(\\D|^)1(\\D|$)": "`x` views",
 | 
				
			||||||
 | 
					        "": "`x` views"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "Premieres in `x`": "Premieres in `x`",
 | 
				
			||||||
 | 
					    "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.": "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.",
 | 
				
			||||||
    "View YouTube comments": "View YouTube comments",
 | 
					    "View YouTube comments": "View YouTube comments",
 | 
				
			||||||
    "View more comments on Reddit": "View more comments on Reddit",
 | 
					    "View more comments on Reddit": "View more comments on Reddit",
 | 
				
			||||||
    "View `x` comments": "View `x` comments",
 | 
					    "View `x` comments": "View `x` comments",
 | 
				
			||||||
@ -123,39 +160,45 @@
 | 
				
			|||||||
    "Show replies": "Show replies",
 | 
					    "Show replies": "Show replies",
 | 
				
			||||||
    "Incorrect password": "Incorrect password",
 | 
					    "Incorrect password": "Incorrect password",
 | 
				
			||||||
    "Quota exceeded, try again in a few hours": "Quota exceeded, try again in a few hours",
 | 
					    "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.",
 | 
					    "Unable to log in, make sure two-factor authentication (Authenticator or SMS) is turned on.": "Unable to log in, make sure two-factor authentication (Authenticator or SMS) is turned on.",
 | 
				
			||||||
    "Invalid TFA code": "Invalid TFA code",
 | 
					    "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.",
 | 
					    "Login failed. This may be because two-factor authentication is not turned on for your account.": "Login failed. This may be because two-factor authentication is not turned on for your account.",
 | 
				
			||||||
  "Invalid answer": "Invalid answer",
 | 
					    "Wrong answer": "Wrong answer",
 | 
				
			||||||
  "Invalid CAPTCHA": "Invalid CAPTCHA",
 | 
					    "Erroneous CAPTCHA": "Erroneous CAPTCHA",
 | 
				
			||||||
    "CAPTCHA is a required field": "CAPTCHA is a required field",
 | 
					    "CAPTCHA is a required field": "CAPTCHA is a required field",
 | 
				
			||||||
    "User ID is a required field": "User ID 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",
 | 
					    "Password is a required field": "Password is a required field",
 | 
				
			||||||
  "Invalid username or password": "Invalid username or password",
 | 
					    "Wrong username or password": "Wrong username or password",
 | 
				
			||||||
  "Please sign in using 'Sign in with Google'": "Please sign in using 'Sign in with Google'",
 | 
					    "Please sign in using 'Log in with Google'": "Please sign in using 'Log in with Google'",
 | 
				
			||||||
    "Password cannot be empty": "Password cannot be empty",
 | 
					    "Password cannot be empty": "Password cannot be empty",
 | 
				
			||||||
    "Password cannot be longer than 55 characters": "Password cannot be longer than 55 characters",
 | 
					    "Password cannot be longer than 55 characters": "Password cannot be longer than 55 characters",
 | 
				
			||||||
  "Please sign in": "Please sign in",
 | 
					    "Please log in": "Please log in",
 | 
				
			||||||
    "Invidious Private Feed for `x`": "Invidious Private Feed for `x`",
 | 
					    "Invidious Private Feed for `x`": "Invidious Private Feed for `x`",
 | 
				
			||||||
    "channel:`x`": "channel:`x`",
 | 
					    "channel:`x`": "channel:`x`",
 | 
				
			||||||
    "Deleted or invalid channel": "Deleted or invalid channel",
 | 
					    "Deleted or invalid channel": "Deleted or invalid channel",
 | 
				
			||||||
    "This channel does not exist.": "This channel does not exist.",
 | 
					    "This channel does not exist.": "This channel does not exist.",
 | 
				
			||||||
    "Could not get channel info.": "Could not get channel info.",
 | 
					    "Could not get channel info.": "Could not get channel info.",
 | 
				
			||||||
    "Could not fetch comments": "Could not fetch comments",
 | 
					    "Could not fetch comments": "Could not fetch comments",
 | 
				
			||||||
  "View `x` replies": "View `x` replies",
 | 
					    "View `x` replies": {
 | 
				
			||||||
 | 
					        "(\\D|^)1(\\D|$)": "View `x` reply",
 | 
				
			||||||
 | 
					        "": "View `x` replies"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "`x` ago": "`x` ago",
 | 
					    "`x` ago": "`x` ago",
 | 
				
			||||||
    "Load more": "Load more",
 | 
					    "Load more": "Load more",
 | 
				
			||||||
  "`x` points": "`x` points",
 | 
					    "`x` points": {
 | 
				
			||||||
 | 
					        "(\\D|^)1(\\D|$)": "`x` point",
 | 
				
			||||||
 | 
					        "": "`x` points"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "Could not create mix.": "Could not create mix.",
 | 
					    "Could not create mix.": "Could not create mix.",
 | 
				
			||||||
  "Playlist is empty": "Playlist is empty",
 | 
					    "Empty playlist": "Empty playlist",
 | 
				
			||||||
  "Invalid playlist.": "Invalid playlist.",
 | 
					    "Not a playlist.": "Not a playlist.",
 | 
				
			||||||
    "Playlist does not exist.": "Playlist does not exist.",
 | 
					    "Playlist does not exist.": "Playlist does not exist.",
 | 
				
			||||||
    "Could not pull trending pages.": "Could not pull trending pages.",
 | 
					    "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 \"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",
 | 
					    "Hidden field \"token\" is a required field": "Hidden field \"token\" is a required field",
 | 
				
			||||||
  "Invalid challenge": "Invalid challenge",
 | 
					    "Erroneous challenge": "Erroneous challenge",
 | 
				
			||||||
  "Invalid token": "Invalid token",
 | 
					    "Erroneous token": "Erroneous token",
 | 
				
			||||||
  "Invalid user": "Invalid user",
 | 
					    "No such user": "No such user",
 | 
				
			||||||
    "Token is expired, please try again": "Token is expired, please try again",
 | 
					    "Token is expired, please try again": "Token is expired, please try again",
 | 
				
			||||||
    "English": "English",
 | 
					    "English": "English",
 | 
				
			||||||
    "English (auto-generated)": "English (auto-generated)",
 | 
					    "English (auto-generated)": "English (auto-generated)",
 | 
				
			||||||
@ -224,7 +267,7 @@
 | 
				
			|||||||
    "Marathi": "Marathi",
 | 
					    "Marathi": "Marathi",
 | 
				
			||||||
    "Mongolian": "Mongolian",
 | 
					    "Mongolian": "Mongolian",
 | 
				
			||||||
    "Nepali": "Nepali",
 | 
					    "Nepali": "Nepali",
 | 
				
			||||||
  "Norwegian": "Norwegian",
 | 
					    "Norwegian Bokmål": "Norwegian Bokmål",
 | 
				
			||||||
    "Nyanja": "Nyanja",
 | 
					    "Nyanja": "Nyanja",
 | 
				
			||||||
    "Pashto": "Pashto",
 | 
					    "Pashto": "Pashto",
 | 
				
			||||||
    "Persian": "Persian",
 | 
					    "Persian": "Persian",
 | 
				
			||||||
@ -263,19 +306,41 @@
 | 
				
			|||||||
    "Yiddish": "Yiddish",
 | 
					    "Yiddish": "Yiddish",
 | 
				
			||||||
    "Yoruba": "Yoruba",
 | 
					    "Yoruba": "Yoruba",
 | 
				
			||||||
    "Zulu": "Zulu",
 | 
					    "Zulu": "Zulu",
 | 
				
			||||||
  "`x` years": "`x` years",
 | 
					    "`x` years": {
 | 
				
			||||||
  "`x` months": "`x` months",
 | 
					        "(\\D|^)1(\\D|$)": "`x` year",
 | 
				
			||||||
  "`x` weeks": "`x` weeks",
 | 
					        "": "`x` years"
 | 
				
			||||||
  "`x` days": "`x` days",
 | 
					    },
 | 
				
			||||||
  "`x` hours": "`x` hours",
 | 
					    "`x` months": {
 | 
				
			||||||
  "`x` minutes": "`x` minutes",
 | 
					        "(\\D|^)1(\\D|$)": "`x` month",
 | 
				
			||||||
  "`x` seconds": "`x` seconds",
 | 
					        "": "`x` months"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "`x` weeks": {
 | 
				
			||||||
 | 
					        "(\\D|^)1(\\D|$)": "`x` week",
 | 
				
			||||||
 | 
					        "": "`x` weeks"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "`x` days": {
 | 
				
			||||||
 | 
					        "(\\D|^)1(\\D|$)": "`x` day",
 | 
				
			||||||
 | 
					        "": "`x` days"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "`x` hours": {
 | 
				
			||||||
 | 
					        "(\\D|^)1(\\D|$)": "`x` hour",
 | 
				
			||||||
 | 
					        "": "`x` hours"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "`x` minutes": {
 | 
				
			||||||
 | 
					        "(\\D|^)1(\\D|$)": "`x` minute",
 | 
				
			||||||
 | 
					        "": "`x` minutes"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "`x` seconds": {
 | 
				
			||||||
 | 
					        "(\\D|^)1(\\D|$)": "`x` second",
 | 
				
			||||||
 | 
					        "": "`x` seconds"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "Fallback comments: ": "Fallback comments: ",
 | 
					    "Fallback comments: ": "Fallback comments: ",
 | 
				
			||||||
    "Popular": "Popular",
 | 
					    "Popular": "Popular",
 | 
				
			||||||
    "Top": "Top",
 | 
					    "Top": "Top",
 | 
				
			||||||
    "About": "About",
 | 
					    "About": "About",
 | 
				
			||||||
    "Rating: ": "Rating: ",
 | 
					    "Rating: ": "Rating: ",
 | 
				
			||||||
    "Language: ": "Language: ",
 | 
					    "Language: ": "Language: ",
 | 
				
			||||||
 | 
					    "View as playlist": "View as playlist",
 | 
				
			||||||
    "Default": "Default",
 | 
					    "Default": "Default",
 | 
				
			||||||
    "Music": "Music",
 | 
					    "Music": "Music",
 | 
				
			||||||
    "Gaming": "Gaming",
 | 
					    "Gaming": "Gaming",
 | 
				
			||||||
@ -285,7 +350,7 @@
 | 
				
			|||||||
    "Download as: ": "Download as: ",
 | 
					    "Download as: ": "Download as: ",
 | 
				
			||||||
    "%A %B %-d, %Y": "%A %B %-d, %Y",
 | 
					    "%A %B %-d, %Y": "%A %B %-d, %Y",
 | 
				
			||||||
    "(edited)": "(edited)",
 | 
					    "(edited)": "(edited)",
 | 
				
			||||||
  "Youtube permalink of the comment": "Youtube permalink of the comment",
 | 
					    "YouTube comment permalink": "YouTube comment permalink",
 | 
				
			||||||
    "`x` marked it with a ❤": "`x` marked it with a ❤",
 | 
					    "`x` marked it with a ❤": "`x` marked it with a ❤",
 | 
				
			||||||
    "Audio mode": "Audio mode",
 | 
					    "Audio mode": "Audio mode",
 | 
				
			||||||
    "Video mode": "Video mode",
 | 
					    "Video mode": "Video mode",
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										315
									
								
								locales/eo.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										315
									
								
								locales/eo.json
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,315 @@
 | 
				
			|||||||
 | 
					{
 | 
				
			||||||
 | 
					    "`x` subscribers": "`x` abonantoj",
 | 
				
			||||||
 | 
					    "`x` videos": "`x` videoj",
 | 
				
			||||||
 | 
					    "LIVE": "NUNA",
 | 
				
			||||||
 | 
					    "Shared `x` ago": "Konigita antaŭ `x`",
 | 
				
			||||||
 | 
					    "Unsubscribe": "Malaboni",
 | 
				
			||||||
 | 
					    "Subscribe": "Aboni",
 | 
				
			||||||
 | 
					    "View channel on YouTube": "Vidi kanalon en YouTube",
 | 
				
			||||||
 | 
					    "View playlist on YouTube": "",
 | 
				
			||||||
 | 
					    "newest": "pli novaj",
 | 
				
			||||||
 | 
					    "oldest": "pli malnovaj",
 | 
				
			||||||
 | 
					    "popular": "popularaj",
 | 
				
			||||||
 | 
					    "last": "lasta",
 | 
				
			||||||
 | 
					    "Next page": "Sekva paĝo",
 | 
				
			||||||
 | 
					    "Previous page": "Antaŭa paĝo",
 | 
				
			||||||
 | 
					    "Clear watch history?": "Ĉu forigi vidohistorion?",
 | 
				
			||||||
 | 
					    "New password": "Nova pasvorto",
 | 
				
			||||||
 | 
					    "New passwords must match": "Novaj pasvortoj devas kongrui",
 | 
				
			||||||
 | 
					    "Cannot change password for Google accounts": "Ne eblas ŝanĝi pasvorton por kontoj de Google",
 | 
				
			||||||
 | 
					    "Authorize token?": "Ĉu rajtigi ĵetonon?",
 | 
				
			||||||
 | 
					    "Authorize token for `x`?": "Ĉu rajtigi ĵetonon por `x`?",
 | 
				
			||||||
 | 
					    "Yes": "Jes",
 | 
				
			||||||
 | 
					    "No": "Ne",
 | 
				
			||||||
 | 
					    "Import and Export Data": "Importi kaj Eksporti Datumojn",
 | 
				
			||||||
 | 
					    "Import": "Importi",
 | 
				
			||||||
 | 
					    "Import Invidious data": "Importi datumojn de Invidious",
 | 
				
			||||||
 | 
					    "Import YouTube subscriptions": "Importi abonojn de YouTube",
 | 
				
			||||||
 | 
					    "Import FreeTube subscriptions (.db)": "Importi abonojn de FreeTube (.db)",
 | 
				
			||||||
 | 
					    "Import NewPipe subscriptions (.json)": "Importi abonojn de NewPipe (.json)",
 | 
				
			||||||
 | 
					    "Import NewPipe data (.zip)": "Importi datumojn de NewPipe (.zip)",
 | 
				
			||||||
 | 
					    "Export": "Eksporti",
 | 
				
			||||||
 | 
					    "Export subscriptions as OPML": "Eksporti abonojn kiel OPML",
 | 
				
			||||||
 | 
					    "Export subscriptions as OPML (for NewPipe & FreeTube)": "Eksporti abonojn kiel OPML (por NewPipe kaj FreeTube)",
 | 
				
			||||||
 | 
					    "Export data as JSON": "Eksporti datumojn kiel JSON",
 | 
				
			||||||
 | 
					    "Delete account?": "Ĉu forigi konton?",
 | 
				
			||||||
 | 
					    "History": "Historio",
 | 
				
			||||||
 | 
					    "An alternative front-end to YouTube": "Alternativa fasado al YouTube",
 | 
				
			||||||
 | 
					    "JavaScript license information": "Ĝavoskripta licenca informo",
 | 
				
			||||||
 | 
					    "source": "fonto",
 | 
				
			||||||
 | 
					    "Log in": "Ensaluti",
 | 
				
			||||||
 | 
					    "Log in/register": "Ensaluti/Registriĝi",
 | 
				
			||||||
 | 
					    "Log in with Google": "Ensaluti al Google",
 | 
				
			||||||
 | 
					    "User ID": "Uzula identigilo",
 | 
				
			||||||
 | 
					    "Password": "Pasvorto",
 | 
				
			||||||
 | 
					    "Time (h:mm:ss):": "Horo (h:mm:ss):",
 | 
				
			||||||
 | 
					    "Text CAPTCHA": "Teksta CAPTCHA",
 | 
				
			||||||
 | 
					    "Image CAPTCHA": "Bilda CAPTCHA",
 | 
				
			||||||
 | 
					    "Sign In": "Ensaluti",
 | 
				
			||||||
 | 
					    "Register": "Registriĝi",
 | 
				
			||||||
 | 
					    "E-mail": "Retpoŝto",
 | 
				
			||||||
 | 
					    "Google verification code": "Kontrolkodo de Google",
 | 
				
			||||||
 | 
					    "Preferences": "Agordoj",
 | 
				
			||||||
 | 
					    "Player preferences": "Spektilaj agordoj",
 | 
				
			||||||
 | 
					    "Always loop: ": "Ĉiam ripeti: ",
 | 
				
			||||||
 | 
					    "Autoplay: ": "Aŭtomate ludi: ",
 | 
				
			||||||
 | 
					    "Play next by default: ": "Ludi sekvan defaŭlte: ",
 | 
				
			||||||
 | 
					    "Autoplay next video: ": "Aŭtomate ludi sekvan videon: ",
 | 
				
			||||||
 | 
					    "Listen by default: ": "Aŭskulti defaŭlte: ",
 | 
				
			||||||
 | 
					    "Proxy videos? ": "Ĉu uzi prokuran servilon por videoj? ",
 | 
				
			||||||
 | 
					    "Default speed: ": "Defaŭlta rapido: ",
 | 
				
			||||||
 | 
					    "Preferred video quality: ": "Preferita videkvalito: ",
 | 
				
			||||||
 | 
					    "Player volume: ": "Ludila sonforteco: ",
 | 
				
			||||||
 | 
					    "Default comments: ": "Defaŭltaj komentoj: ",
 | 
				
			||||||
 | 
					    "youtube": "youtube",
 | 
				
			||||||
 | 
					    "reddit": "reddit",
 | 
				
			||||||
 | 
					    "Default captions: ": "Defaŭltaj subtekstoj: ",
 | 
				
			||||||
 | 
					    "Fallback captions: ": "Retrodefaŭltaj subtekstoj: ",
 | 
				
			||||||
 | 
					    "Show related videos? ": "Ĉu montri rilatajn videojn? ",
 | 
				
			||||||
 | 
					    "Show annotations by default? ": "Ĉu montri prinotojn defaŭlte? ",
 | 
				
			||||||
 | 
					    "Visual preferences": "Vidaj preferoj",
 | 
				
			||||||
 | 
					    "Dark mode: ": "Malhela reĝimo: ",
 | 
				
			||||||
 | 
					    "Thin mode: ": "Maldika reĝimo: ",
 | 
				
			||||||
 | 
					    "Subscription preferences": "Abonaj agordoj",
 | 
				
			||||||
 | 
					    "Show annotations by default for subscribed channels? ": "Ĉu montri prinotojn defaŭlte por abonitaj kanaloj? ",
 | 
				
			||||||
 | 
					    "Redirect homepage to feed: ": "Alidirekti hejmpâgon al fluo: ",
 | 
				
			||||||
 | 
					    "Number of videos shown in feed: ": "Nombro da videoj montritaj en fluo: ",
 | 
				
			||||||
 | 
					    "Sort videos by: ": "Ordi videojn laŭ: ",
 | 
				
			||||||
 | 
					    "published": "publikigo",
 | 
				
			||||||
 | 
					    "published - reverse": "publitigo - renverse",
 | 
				
			||||||
 | 
					    "alphabetically": "alfabete",
 | 
				
			||||||
 | 
					    "alphabetically - reverse": "alfabete - renverse",
 | 
				
			||||||
 | 
					    "channel name": "kanala nombro",
 | 
				
			||||||
 | 
					    "channel name - reverse": "kanala nombro - renverse",
 | 
				
			||||||
 | 
					    "Only show latest video from channel: ": "Nur montri pli novan videon el kanalo: ",
 | 
				
			||||||
 | 
					    "Only show latest unwatched video from channel: ": "Nur montri pli novan malviditan videon el kanalo: ",
 | 
				
			||||||
 | 
					    "Only show unwatched: ": "Nur montri malviditajn: ",
 | 
				
			||||||
 | 
					    "Only show notifications (if there are any): ": "Nur montri sciigojn (se estas): ",
 | 
				
			||||||
 | 
					    "Data preferences": "Datumagordoj",
 | 
				
			||||||
 | 
					    "Clear watch history": "Forigi vidohistorion",
 | 
				
			||||||
 | 
					    "Import/export data": "Importi/Eksporti datumojn",
 | 
				
			||||||
 | 
					    "Change password": "Ŝanĝi pasvorton",
 | 
				
			||||||
 | 
					    "Manage subscriptions": "Administri abonojn",
 | 
				
			||||||
 | 
					    "Manage tokens": "Administri ĵetonojn",
 | 
				
			||||||
 | 
					    "Watch history": "Vidohistorio",
 | 
				
			||||||
 | 
					    "Delete account": "Forigi konton",
 | 
				
			||||||
 | 
					    "Administrator preferences": "Agordoj de administranto",
 | 
				
			||||||
 | 
					    "Default homepage: ": "Defaŭlta hejmpaĝo: ",
 | 
				
			||||||
 | 
					    "Feed menu: ": "Flua menuo: ",
 | 
				
			||||||
 | 
					    "Top enabled? ": "Ĉu pli bonaj ŝaltitaj? ",
 | 
				
			||||||
 | 
					    "CAPTCHA enabled? ": "Ĉu CAPTCHA ŝaltita? ",
 | 
				
			||||||
 | 
					    "Login enabled? ": "Ĉu ensaluto aktivita? ",
 | 
				
			||||||
 | 
					    "Registration enabled? ": "Ĉu registriĝo aktivita? ",
 | 
				
			||||||
 | 
					    "Report statistics? ": "Ĉu raporti statistikojn? ",
 | 
				
			||||||
 | 
					    "Save preferences": "Konservi agordojn",
 | 
				
			||||||
 | 
					    "Subscription manager": "Administrilo de abonoj",
 | 
				
			||||||
 | 
					    "Token manager": "Ĵetona administrilo",
 | 
				
			||||||
 | 
					    "Token": "Ĵetono",
 | 
				
			||||||
 | 
					    "`x` subscriptions": "`x` abonoj",
 | 
				
			||||||
 | 
					    "`x` tokens": "`x` ĵetonoj",
 | 
				
			||||||
 | 
					    "Import/export": "Importi/Eksporti",
 | 
				
			||||||
 | 
					    "unsubscribe": "malaboni",
 | 
				
			||||||
 | 
					    "revoke": "senvalidigi",
 | 
				
			||||||
 | 
					    "Subscriptions": "Abonoj",
 | 
				
			||||||
 | 
					    "`x` unseen notifications": "`x` neviditaj sciigoj",
 | 
				
			||||||
 | 
					    "search": "serĉi",
 | 
				
			||||||
 | 
					    "Log out": "Elsaluti",
 | 
				
			||||||
 | 
					    "Released under the AGPLv3 by Omar Roth.": "Eldonita sub la AGPLv3 de Omar Roth.",
 | 
				
			||||||
 | 
					    "Source available here.": "Fonto havebla ĉi tie.",
 | 
				
			||||||
 | 
					    "View JavaScript license information.": "Vidi Ĝavoskriptan licencan informon.",
 | 
				
			||||||
 | 
					    "View privacy policy.": "Vidi regularon pri privateco.",
 | 
				
			||||||
 | 
					    "Trending": "Tendencoj",
 | 
				
			||||||
 | 
					    "Unlisted": "Ne listigita",
 | 
				
			||||||
 | 
					    "Watch on YouTube": "Vidi videon en Youtube",
 | 
				
			||||||
 | 
					    "Hide annotations": "Kaŝi prinotojn",
 | 
				
			||||||
 | 
					    "Show annotations": "Montri prinotojn",
 | 
				
			||||||
 | 
					    "Genre: ": "Ĝenro: ",
 | 
				
			||||||
 | 
					    "License: ": "Licenco: ",
 | 
				
			||||||
 | 
					    "Family friendly? ": "Ĉu familie amika? ",
 | 
				
			||||||
 | 
					    "Wilson score: ": "Poentaro de Wilson: ",
 | 
				
			||||||
 | 
					    "Engagement: ": "Intereso: ",
 | 
				
			||||||
 | 
					    "Whitelisted regions: ": "Regionoj listigitaj en blanka listo: ",
 | 
				
			||||||
 | 
					    "Blacklisted regions: ": "Regionoj listigitaj en nigra listo: ",
 | 
				
			||||||
 | 
					    "Shared `x`": "Konigita `x`",
 | 
				
			||||||
 | 
					    "`x` views": "`x` spektaĵoj",
 | 
				
			||||||
 | 
					    "Premieres in `x`": "Premieras en `x`",
 | 
				
			||||||
 | 
					    "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.": "Saluton! Ŝajnas, ke vi havas Ĝavoskripton malebligitan. Klaku ĉi tie por vidi komentojn, memoru, ke la ŝargado povus daŭri iom pli.",
 | 
				
			||||||
 | 
					    "View YouTube comments": "Vidi komentojn de YouTube",
 | 
				
			||||||
 | 
					    "View more comments on Reddit": "Vidi pli komentoj en Reddit",
 | 
				
			||||||
 | 
					    "View `x` comments": "Vidi `x` komentojn",
 | 
				
			||||||
 | 
					    "View Reddit comments": "Vidi komentojn de Reddit",
 | 
				
			||||||
 | 
					    "Hide replies": "Kaŝi respondojn",
 | 
				
			||||||
 | 
					    "Show replies": "Montri respondojn",
 | 
				
			||||||
 | 
					    "Incorrect password": "Malbona pasvorto",
 | 
				
			||||||
 | 
					    "Quota exceeded, try again in a few hours": "Kvoto transpasita, provu denove post iuj horoj",
 | 
				
			||||||
 | 
					    "Unable to log in, make sure two-factor authentication (Authenticator or SMS) is turned on.": "Ne povas ensaluti, certigu, ke dufaktora aŭtentigo (Authenticator aŭ SMS) estas ebligita.",
 | 
				
			||||||
 | 
					    "Invalid TFA code": "Nevalida TFA-kodo",
 | 
				
			||||||
 | 
					    "Login failed. This may be because two-factor authentication is not turned on for your account.": "Ensalutado fiaskis. Eble ĉar la dufaktora aŭtentigo estas malebligita en via konto.",
 | 
				
			||||||
 | 
					    "Wrong answer": "Nevalida respondo",
 | 
				
			||||||
 | 
					    "Erroneous CAPTCHA": "Nevalida CAPTCHA",
 | 
				
			||||||
 | 
					    "CAPTCHA is a required field": "CAPTCHA estas deviga kampo",
 | 
				
			||||||
 | 
					    "User ID is a required field": "Uzula identigilo estas deviga kampo",
 | 
				
			||||||
 | 
					    "Password is a required field": "Pasvorto estas deviga kampo",
 | 
				
			||||||
 | 
					    "Wrong username or password": "Nevalida uzantnomo aŭ pasvorto",
 | 
				
			||||||
 | 
					    "Please sign in using 'Log in with Google'": "Bonvolu ensaluti per 'Ensaluti per Google'",
 | 
				
			||||||
 | 
					    "Password cannot be empty": "Pasvorto ne povas esti malplena",
 | 
				
			||||||
 | 
					    "Password cannot be longer than 55 characters": "Pasvorto ne povas esti pli longa ol 55 signoj",
 | 
				
			||||||
 | 
					    "Please log in": "Bonvolu ensaluti",
 | 
				
			||||||
 | 
					    "Invidious Private Feed for `x`": "Privata Fluo de Invidious por `x`",
 | 
				
			||||||
 | 
					    "channel:`x`": "kanalo:`x`",
 | 
				
			||||||
 | 
					    "Deleted or invalid channel": "Forigita aŭ nevalida kanalo",
 | 
				
			||||||
 | 
					    "This channel does not exist.": "Ĉi tiu kanalo ne ekzistas.",
 | 
				
			||||||
 | 
					    "Could not get channel info.": "Ne povis havigi kanalan informon.",
 | 
				
			||||||
 | 
					    "Could not fetch comments": "Ne povis venigi komentojn",
 | 
				
			||||||
 | 
					    "View `x` replies": "Vidi `x` respondojn",
 | 
				
			||||||
 | 
					    "`x` ago": "antaŭ `x`",
 | 
				
			||||||
 | 
					    "Load more": "Ŝarĝi pli",
 | 
				
			||||||
 | 
					    "`x` points": "`x` poentoj",
 | 
				
			||||||
 | 
					    "Could not create mix.": "Ne povis krei mikson.",
 | 
				
			||||||
 | 
					    "Empty playlist": "Ludlisto estas malplena",
 | 
				
			||||||
 | 
					    "Not a playlist.": "Nevalida ludlisto.",
 | 
				
			||||||
 | 
					    "Playlist does not exist.": "Ludlisto ne ekzistas.",
 | 
				
			||||||
 | 
					    "Could not pull trending pages.": "Ne povis venigi tendencajn paĝojn.",
 | 
				
			||||||
 | 
					    "Hidden field \"challenge\" is a required field": "Kaŝita kampo \"challenge\" estas deviga kampo",
 | 
				
			||||||
 | 
					    "Hidden field \"token\" is a required field": "Kaŝita kampo \"token\" estas deviga kampo",
 | 
				
			||||||
 | 
					    "Erroneous challenge": "Nevalida defio",
 | 
				
			||||||
 | 
					    "Erroneous token": "Nevalida ĵetono",
 | 
				
			||||||
 | 
					    "No such user": "Nevalida uzanto",
 | 
				
			||||||
 | 
					    "Token is expired, please try again": "Ĵetono senvalidiĝis, bonvolu provi denove",
 | 
				
			||||||
 | 
					    "English": "Angla",
 | 
				
			||||||
 | 
					    "English (auto-generated)": "Angla (aŭtomate generita)",
 | 
				
			||||||
 | 
					    "Afrikaans": "Afrikansa",
 | 
				
			||||||
 | 
					    "Albanian": "Albana",
 | 
				
			||||||
 | 
					    "Amharic": "Amhara",
 | 
				
			||||||
 | 
					    "Arabic": "Araba",
 | 
				
			||||||
 | 
					    "Armenian": "Armena",
 | 
				
			||||||
 | 
					    "Azerbaijani": "Azerbajĝana",
 | 
				
			||||||
 | 
					    "Bangla": "Bengala",
 | 
				
			||||||
 | 
					    "Basque": "Eŭska",
 | 
				
			||||||
 | 
					    "Belarusian": "Belorusa",
 | 
				
			||||||
 | 
					    "Bosnian": "Bosna",
 | 
				
			||||||
 | 
					    "Bulgarian": "Bulgara",
 | 
				
			||||||
 | 
					    "Burmese": "Birma",
 | 
				
			||||||
 | 
					    "Catalan": "Kataluna",
 | 
				
			||||||
 | 
					    "Cebuano": "Cebua",
 | 
				
			||||||
 | 
					    "Chinese (Simplified)": "Ĉina (simpligita)",
 | 
				
			||||||
 | 
					    "Chinese (Traditional)": "Ĉina (tradicia)",
 | 
				
			||||||
 | 
					    "Corsican": "Korsika",
 | 
				
			||||||
 | 
					    "Croatian": "Kroata",
 | 
				
			||||||
 | 
					    "Czech": "Ĉeĥa",
 | 
				
			||||||
 | 
					    "Danish": "Dana",
 | 
				
			||||||
 | 
					    "Dutch": "Nederlanda",
 | 
				
			||||||
 | 
					    "Esperanto": "Esperanto",
 | 
				
			||||||
 | 
					    "Estonian": "Estona",
 | 
				
			||||||
 | 
					    "Filipino": "Filipina",
 | 
				
			||||||
 | 
					    "Finnish": "Finna",
 | 
				
			||||||
 | 
					    "French": "Franca",
 | 
				
			||||||
 | 
					    "Galician": "Galega",
 | 
				
			||||||
 | 
					    "Georgian": "Kartvela",
 | 
				
			||||||
 | 
					    "German": "Germana",
 | 
				
			||||||
 | 
					    "Greek": "Greka",
 | 
				
			||||||
 | 
					    "Gujarati": "Guĝarata",
 | 
				
			||||||
 | 
					    "Haitian Creole": "Haitia kreola",
 | 
				
			||||||
 | 
					    "Hausa": "Haŭsa",
 | 
				
			||||||
 | 
					    "Hawaiian": "Havaja",
 | 
				
			||||||
 | 
					    "Hebrew": "Hebrea",
 | 
				
			||||||
 | 
					    "Hindi": "Hindia",
 | 
				
			||||||
 | 
					    "Hmong": "Miaa",
 | 
				
			||||||
 | 
					    "Hungarian": "Hungara",
 | 
				
			||||||
 | 
					    "Icelandic": "Islanda",
 | 
				
			||||||
 | 
					    "Igbo": "Igba",
 | 
				
			||||||
 | 
					    "Indonesian": "Indonezia",
 | 
				
			||||||
 | 
					    "Irish": "Irlanda",
 | 
				
			||||||
 | 
					    "Italian": "Itala",
 | 
				
			||||||
 | 
					    "Japanese": "Japana",
 | 
				
			||||||
 | 
					    "Javanese": "Java",
 | 
				
			||||||
 | 
					    "Kannada": "Kanara",
 | 
				
			||||||
 | 
					    "Kazakh": "Kazaĥa",
 | 
				
			||||||
 | 
					    "Khmer": "Kmera",
 | 
				
			||||||
 | 
					    "Korean": "Korea",
 | 
				
			||||||
 | 
					    "Kurdish": "Kurda",
 | 
				
			||||||
 | 
					    "Kyrgyz": "Kirgiza",
 | 
				
			||||||
 | 
					    "Lao": "Laosa",
 | 
				
			||||||
 | 
					    "Latin": "Latina",
 | 
				
			||||||
 | 
					    "Latvian": "Latva",
 | 
				
			||||||
 | 
					    "Lithuanian": "Litova",
 | 
				
			||||||
 | 
					    "Luxembourgish": "Luksemburga",
 | 
				
			||||||
 | 
					    "Macedonian": "Makedona",
 | 
				
			||||||
 | 
					    "Malagasy": "Malagasa",
 | 
				
			||||||
 | 
					    "Malay": "Malaja",
 | 
				
			||||||
 | 
					    "Malayalam": "Malajala",
 | 
				
			||||||
 | 
					    "Maltese": "Malta",
 | 
				
			||||||
 | 
					    "Maori": "Maoria",
 | 
				
			||||||
 | 
					    "Marathi": "Marata",
 | 
				
			||||||
 | 
					    "Mongolian": "Mongola",
 | 
				
			||||||
 | 
					    "Nepali": "Nepala",
 | 
				
			||||||
 | 
					    "Norwegian Bokmål": "Norvega",
 | 
				
			||||||
 | 
					    "Nyanja": "Njanĝa",
 | 
				
			||||||
 | 
					    "Pashto": "Paŝtuna",
 | 
				
			||||||
 | 
					    "Persian": "Persa",
 | 
				
			||||||
 | 
					    "Polish": "Pola",
 | 
				
			||||||
 | 
					    "Portuguese": "Portugala",
 | 
				
			||||||
 | 
					    "Punjabi": "Panĝaba",
 | 
				
			||||||
 | 
					    "Romanian": "Rumana",
 | 
				
			||||||
 | 
					    "Russian": "Rusa",
 | 
				
			||||||
 | 
					    "Samoan": "Samoa",
 | 
				
			||||||
 | 
					    "Scottish Gaelic": "Skotgaela",
 | 
				
			||||||
 | 
					    "Serbian": "Serba",
 | 
				
			||||||
 | 
					    "Shona": "Ŝona",
 | 
				
			||||||
 | 
					    "Sindhi": "Sinda",
 | 
				
			||||||
 | 
					    "Sinhala": "Sinhala",
 | 
				
			||||||
 | 
					    "Slovak": "Slovaka",
 | 
				
			||||||
 | 
					    "Slovenian": "Slovena",
 | 
				
			||||||
 | 
					    "Somali": "Somala",
 | 
				
			||||||
 | 
					    "Southern Sotho": "Sota",
 | 
				
			||||||
 | 
					    "Spanish": "Hispana",
 | 
				
			||||||
 | 
					    "Spanish (Latin America)": "Hispana (Latinameriko)",
 | 
				
			||||||
 | 
					    "Sundanese": "Sunda",
 | 
				
			||||||
 | 
					    "Swahili": "Svahila",
 | 
				
			||||||
 | 
					    "Swedish": "Sveda",
 | 
				
			||||||
 | 
					    "Tajik": "Taĝika",
 | 
				
			||||||
 | 
					    "Tamil": "Tamila",
 | 
				
			||||||
 | 
					    "Telugu": "Telugua",
 | 
				
			||||||
 | 
					    "Thai": "Taja",
 | 
				
			||||||
 | 
					    "Turkish": "Turka",
 | 
				
			||||||
 | 
					    "Ukrainian": "Ukraina",
 | 
				
			||||||
 | 
					    "Urdu": "Urduo",
 | 
				
			||||||
 | 
					    "Uzbek": "Uzbeka",
 | 
				
			||||||
 | 
					    "Vietnamese": "Vjetnama",
 | 
				
			||||||
 | 
					    "Welsh": "Kimra",
 | 
				
			||||||
 | 
					    "Western Frisian": "Okcidentfrisa",
 | 
				
			||||||
 | 
					    "Xhosa": "Kosa",
 | 
				
			||||||
 | 
					    "Yiddish": "Jida",
 | 
				
			||||||
 | 
					    "Yoruba": "Joruba",
 | 
				
			||||||
 | 
					    "Zulu": "Zulua",
 | 
				
			||||||
 | 
					    "`x` years": "`x` jaroj",
 | 
				
			||||||
 | 
					    "`x` months": "`x` monatoj",
 | 
				
			||||||
 | 
					    "`x` weeks": "`x` semajnoj",
 | 
				
			||||||
 | 
					    "`x` days": "`x` tagoj",
 | 
				
			||||||
 | 
					    "`x` hours": "`x` horoj",
 | 
				
			||||||
 | 
					    "`x` minutes": "`x` minutoj",
 | 
				
			||||||
 | 
					    "`x` seconds": "`x` sekundoj",
 | 
				
			||||||
 | 
					    "Fallback comments: ": "Retrodefaŭltaj komentoj: ",
 | 
				
			||||||
 | 
					    "Popular": "Popularaj",
 | 
				
			||||||
 | 
					    "Top": "Supraj",
 | 
				
			||||||
 | 
					    "About": "Pri",
 | 
				
			||||||
 | 
					    "Rating: ": "Takso: ",
 | 
				
			||||||
 | 
					    "Language: ": "Lingvo: ",
 | 
				
			||||||
 | 
					    "View as playlist": "Vidi kiel ludlisto",
 | 
				
			||||||
 | 
					    "Default": "Defaŭlte",
 | 
				
			||||||
 | 
					    "Music": "Musiko",
 | 
				
			||||||
 | 
					    "Gaming": "Komputiloludoj",
 | 
				
			||||||
 | 
					    "News": "Novaĵoj",
 | 
				
			||||||
 | 
					    "Movies": "Filmoj",
 | 
				
			||||||
 | 
					    "Download": "Elŝuti",
 | 
				
			||||||
 | 
					    "Download as: ": "Elŝuti kiel: ",
 | 
				
			||||||
 | 
					    "%A %B %-d, %Y": "%A %-d de %B %Y",
 | 
				
			||||||
 | 
					    "(edited)": "(redaktita)",
 | 
				
			||||||
 | 
					    "YouTube comment permalink": "Fiksligilo de la komento en YouTube",
 | 
				
			||||||
 | 
					    "`x` marked it with a ❤": "`x` markis ĝin per ❤",
 | 
				
			||||||
 | 
					    "Audio mode": "Aŭda reĝimo",
 | 
				
			||||||
 | 
					    "Video mode": "Videa reĝimo",
 | 
				
			||||||
 | 
					    "Videos": "Videoj",
 | 
				
			||||||
 | 
					    "Playlists": "Ludlistoj",
 | 
				
			||||||
 | 
					    "Current version: ": "Nuna versio: "
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										315
									
								
								locales/es.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										315
									
								
								locales/es.json
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,315 @@
 | 
				
			|||||||
 | 
					{
 | 
				
			||||||
 | 
					    "`x` subscribers": "`x` suscriptores",
 | 
				
			||||||
 | 
					    "`x` videos": "`x` vídeos",
 | 
				
			||||||
 | 
					    "LIVE": "DIRECTO",
 | 
				
			||||||
 | 
					    "Shared `x` ago": "Compartido hace `x`",
 | 
				
			||||||
 | 
					    "Unsubscribe": "Desuscribirse",
 | 
				
			||||||
 | 
					    "Subscribe": "Suscribirse",
 | 
				
			||||||
 | 
					    "View channel on YouTube": "Ver el canal en YouTube",
 | 
				
			||||||
 | 
					    "View playlist on YouTube": "",
 | 
				
			||||||
 | 
					    "newest": "más nuevos",
 | 
				
			||||||
 | 
					    "oldest": "más viejos",
 | 
				
			||||||
 | 
					    "popular": "populares",
 | 
				
			||||||
 | 
					    "last": "último",
 | 
				
			||||||
 | 
					    "Next page": "Página siguiente",
 | 
				
			||||||
 | 
					    "Previous page": "Página anterior",
 | 
				
			||||||
 | 
					    "Clear watch history?": "¿Quiere borrar el historial de reproducción?",
 | 
				
			||||||
 | 
					    "New password": "Nueva contraseña",
 | 
				
			||||||
 | 
					    "New passwords must match": "Las nuevas contraseñas deben coincidir",
 | 
				
			||||||
 | 
					    "Cannot change password for Google accounts": "No se puede cambiar la contraseña de la cuenta de Google",
 | 
				
			||||||
 | 
					    "Authorize token?": "¿Autorizar el token?",
 | 
				
			||||||
 | 
					    "Authorize token for `x`?": "¿Autorizar el token para `x`?",
 | 
				
			||||||
 | 
					    "Yes": "Sí",
 | 
				
			||||||
 | 
					    "No": "No",
 | 
				
			||||||
 | 
					    "Import and Export Data": "Importación y exportación de datos",
 | 
				
			||||||
 | 
					    "Import": "Importar",
 | 
				
			||||||
 | 
					    "Import Invidious data": "Importar datos de Invidious",
 | 
				
			||||||
 | 
					    "Import YouTube subscriptions": "Importar suscripciones de YouTube",
 | 
				
			||||||
 | 
					    "Import FreeTube subscriptions (.db)": "Importar suscripciones de FreeTube (.db)",
 | 
				
			||||||
 | 
					    "Import NewPipe subscriptions (.json)": "Importar suscripciones de NewPipe (.json)",
 | 
				
			||||||
 | 
					    "Import NewPipe data (.zip)": "Importar datos de NewPipe (.zip)",
 | 
				
			||||||
 | 
					    "Export": "Exportar",
 | 
				
			||||||
 | 
					    "Export subscriptions as OPML": "Exportar suscripciones como OPML",
 | 
				
			||||||
 | 
					    "Export subscriptions as OPML (for NewPipe & FreeTube)": "Exportar suscripciones como OPML (para NewPipe y FreeTube)",
 | 
				
			||||||
 | 
					    "Export data as JSON": "Exportar datos como JSON",
 | 
				
			||||||
 | 
					    "Delete account?": "¿Quiere borrar la cuenta?",
 | 
				
			||||||
 | 
					    "History": "Historial",
 | 
				
			||||||
 | 
					    "An alternative front-end to YouTube": "Una interfaz alternativa para YouTube",
 | 
				
			||||||
 | 
					    "JavaScript license information": "Información de licencia de JavaScript",
 | 
				
			||||||
 | 
					    "source": "código fuente",
 | 
				
			||||||
 | 
					    "Log in": "Iniciar sesión",
 | 
				
			||||||
 | 
					    "Log in/register": "Iniciar sesión/Registrarse",
 | 
				
			||||||
 | 
					    "Log in with Google": "Iniciar sesión en Google",
 | 
				
			||||||
 | 
					    "User ID": "Nombre",
 | 
				
			||||||
 | 
					    "Password": "Contraseña",
 | 
				
			||||||
 | 
					    "Time (h:mm:ss):": "Hora (h:mm:ss):",
 | 
				
			||||||
 | 
					    "Text CAPTCHA": "CAPTCHA en texto",
 | 
				
			||||||
 | 
					    "Image CAPTCHA": "CAPTCHA en imagen",
 | 
				
			||||||
 | 
					    "Sign In": "Iniciar sesión",
 | 
				
			||||||
 | 
					    "Register": "Registrarse",
 | 
				
			||||||
 | 
					    "E-mail": "Correo",
 | 
				
			||||||
 | 
					    "Google verification code": "Código de verificación de Google",
 | 
				
			||||||
 | 
					    "Preferences": "Preferencias",
 | 
				
			||||||
 | 
					    "Player preferences": "Preferencias del reproductor",
 | 
				
			||||||
 | 
					    "Always loop: ": "Repetir siempre: ",
 | 
				
			||||||
 | 
					    "Autoplay: ": "Reproducción automática: ",
 | 
				
			||||||
 | 
					    "Play next by default: ": "Reproducir siguiente por defecto: ",
 | 
				
			||||||
 | 
					    "Autoplay next video: ": "Reproducir automáticamente el vídeo siguiente: ",
 | 
				
			||||||
 | 
					    "Listen by default: ": "Activar el sonido por defecto: ",
 | 
				
			||||||
 | 
					    "Proxy videos? ": "¿Usar un proxy para los vídeos? ",
 | 
				
			||||||
 | 
					    "Default speed: ": "Velocidad por defecto: ",
 | 
				
			||||||
 | 
					    "Preferred video quality: ": "Calidad de vídeo preferida: ",
 | 
				
			||||||
 | 
					    "Player volume: ": "Volumen del reproductor: ",
 | 
				
			||||||
 | 
					    "Default comments: ": "Comentarios por defecto: ",
 | 
				
			||||||
 | 
					    "youtube": "YouTube",
 | 
				
			||||||
 | 
					    "reddit": "Reddit",
 | 
				
			||||||
 | 
					    "Default captions: ": "Subtítulos por defecto: ",
 | 
				
			||||||
 | 
					    "Fallback captions: ": "Subtítulos alternativos: ",
 | 
				
			||||||
 | 
					    "Show related videos? ": "¿Mostrar vídeos relacionados? ",
 | 
				
			||||||
 | 
					    "Show annotations by default? ": "¿Mostrar anotaciones por defecto? ",
 | 
				
			||||||
 | 
					    "Visual preferences": "Preferencias visuales",
 | 
				
			||||||
 | 
					    "Dark mode: ": "Modo oscuro: ",
 | 
				
			||||||
 | 
					    "Thin mode: ": "Modo compacto: ",
 | 
				
			||||||
 | 
					    "Subscription preferences": "Preferencias de la suscripción",
 | 
				
			||||||
 | 
					    "Show annotations by default for subscribed channels? ": "¿Mostrar anotaciones por defecto para los canales suscritos? ",
 | 
				
			||||||
 | 
					    "Redirect homepage to feed: ": "Redirigir la página de inicio a la fuente: ",
 | 
				
			||||||
 | 
					    "Number of videos shown in feed: ": "Número de vídeos mostrados en la fuente: ",
 | 
				
			||||||
 | 
					    "Sort videos by: ": "Ordenar los vídeos por: ",
 | 
				
			||||||
 | 
					    "published": "fecha de publicación",
 | 
				
			||||||
 | 
					    "published - reverse": "fecha de publicación: orden inverso",
 | 
				
			||||||
 | 
					    "alphabetically": "alfabéticamente",
 | 
				
			||||||
 | 
					    "alphabetically - reverse": "alfabéticamente: orden inverso",
 | 
				
			||||||
 | 
					    "channel name": "nombre del canal",
 | 
				
			||||||
 | 
					    "channel name - reverse": "nombre del canal: orden inverso",
 | 
				
			||||||
 | 
					    "Only show latest video from channel: ": "Mostrar solo el último vídeo del canal: ",
 | 
				
			||||||
 | 
					    "Only show latest unwatched video from channel: ": "Mostrar solo el último vídeo sin ver del canal: ",
 | 
				
			||||||
 | 
					    "Only show unwatched: ": "Mostrar solo los no vistos: ",
 | 
				
			||||||
 | 
					    "Only show notifications (if there are any): ": "Mostrar solo notificaciones (si hay alguna): ",
 | 
				
			||||||
 | 
					    "Data preferences": "Preferencias de los datos",
 | 
				
			||||||
 | 
					    "Clear watch history": "Borrar el historial de reproducción",
 | 
				
			||||||
 | 
					    "Import/export data": "Importar/Exportar datos",
 | 
				
			||||||
 | 
					    "Change password": "Cambiar contraseña",
 | 
				
			||||||
 | 
					    "Manage subscriptions": "Gestionar las suscripciones",
 | 
				
			||||||
 | 
					    "Manage tokens": "Gestionar tokens",
 | 
				
			||||||
 | 
					    "Watch history": "Historial de reproducción",
 | 
				
			||||||
 | 
					    "Delete account": "Borrar cuenta",
 | 
				
			||||||
 | 
					    "Administrator preferences": "Preferencias de administrador",
 | 
				
			||||||
 | 
					    "Default homepage: ": "Página de inicio por defecto: ",
 | 
				
			||||||
 | 
					    "Feed menu: ": "Menú de fuentes: ",
 | 
				
			||||||
 | 
					    "Top enabled? ": "¿Habilitar los destacados? ",
 | 
				
			||||||
 | 
					    "CAPTCHA enabled? ": "¿Habilitar los CAPTCHA? ",
 | 
				
			||||||
 | 
					    "Login enabled? ": "¿Habilitar el inicio de sesión? ",
 | 
				
			||||||
 | 
					    "Registration enabled? ": "¿Habilitar el registro? ",
 | 
				
			||||||
 | 
					    "Report statistics? ": "¿Enviar estadísticas? ",
 | 
				
			||||||
 | 
					    "Save preferences": "Guardar las preferencias",
 | 
				
			||||||
 | 
					    "Subscription manager": "Gestor de suscripciones",
 | 
				
			||||||
 | 
					    "Token manager": "Gestor de tokens",
 | 
				
			||||||
 | 
					    "Token": "Token",
 | 
				
			||||||
 | 
					    "`x` subscriptions": "`x` suscripciones",
 | 
				
			||||||
 | 
					    "`x` tokens": "`x` tokens",
 | 
				
			||||||
 | 
					    "Import/export": "Importar/Exportar",
 | 
				
			||||||
 | 
					    "unsubscribe": "Desuscribirse",
 | 
				
			||||||
 | 
					    "revoke": "revocar",
 | 
				
			||||||
 | 
					    "Subscriptions": "Suscripciones",
 | 
				
			||||||
 | 
					    "`x` unseen notifications": "`x` notificaciones sin ver",
 | 
				
			||||||
 | 
					    "search": "buscar",
 | 
				
			||||||
 | 
					    "Log out": "Cerrar la sesión",
 | 
				
			||||||
 | 
					    "Released under the AGPLv3 by Omar Roth.": "Publicado bajo licencia AGPLv3 por Omar Roth.",
 | 
				
			||||||
 | 
					    "Source available here.": "Código fuente disponible aquí.",
 | 
				
			||||||
 | 
					    "View JavaScript license information.": "Ver información de licencia de JavaScript.",
 | 
				
			||||||
 | 
					    "View privacy policy.": "Ver la política de privacidad.",
 | 
				
			||||||
 | 
					    "Trending": "Tendencias",
 | 
				
			||||||
 | 
					    "Unlisted": "No listado",
 | 
				
			||||||
 | 
					    "Watch on YouTube": "Ver el vídeo en Youtube",
 | 
				
			||||||
 | 
					    "Hide annotations": "Ocultar anotaciones",
 | 
				
			||||||
 | 
					    "Show annotations": "Mostrar anotaciones",
 | 
				
			||||||
 | 
					    "Genre: ": "Género: ",
 | 
				
			||||||
 | 
					    "License: ": "Licencia: ",
 | 
				
			||||||
 | 
					    "Family friendly? ": "¿Filtrar contenidos? ",
 | 
				
			||||||
 | 
					    "Wilson score: ": "Puntuación Wilson: ",
 | 
				
			||||||
 | 
					    "Engagement: ": "Compromiso: ",
 | 
				
			||||||
 | 
					    "Whitelisted regions: ": "Regiones permitidas: ",
 | 
				
			||||||
 | 
					    "Blacklisted regions: ": "Regiones bloqueadas: ",
 | 
				
			||||||
 | 
					    "Shared `x`": "Compartido `x`",
 | 
				
			||||||
 | 
					    "`x` views": "`x` visualizaciones",
 | 
				
			||||||
 | 
					    "Premieres in `x`": "Se estrena en `x`",
 | 
				
			||||||
 | 
					    "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.": "¡Hola! Parece que tiene JavaScript desactivado. Haga clic aquí para ver los comentarios, pero tenga en cuenta que pueden tardar un poco más en cargarse.",
 | 
				
			||||||
 | 
					    "View YouTube comments": "Ver los comentarios de YouTube",
 | 
				
			||||||
 | 
					    "View more comments on Reddit": "Ver más comentarios en Reddit",
 | 
				
			||||||
 | 
					    "View `x` comments": "Ver `x` comentarios",
 | 
				
			||||||
 | 
					    "View Reddit comments": "Ver los comentarios de Reddit",
 | 
				
			||||||
 | 
					    "Hide replies": "Ocultar las respuestas",
 | 
				
			||||||
 | 
					    "Show replies": "Mostrar las respuestas",
 | 
				
			||||||
 | 
					    "Incorrect password": "Contraseña incorrecta",
 | 
				
			||||||
 | 
					    "Quota exceeded, try again in a few hours": "Cuota excedida, pruebe otra vez en unas horas",
 | 
				
			||||||
 | 
					    "Unable to log in, make sure two-factor authentication (Authenticator or SMS) is turned on.": "No se puede iniciar sesión, asegúrese de que la autentificación de dos factores (autentificador o SMS) esté habilitada.",
 | 
				
			||||||
 | 
					    "Invalid TFA code": "Código TFA no válido",
 | 
				
			||||||
 | 
					    "Login failed. This may be because two-factor authentication is not turned on for your account.": "Error de inicio de sesion. Puede deberse a que la autentificación de dos factores no está habilitada en su cuenta.",
 | 
				
			||||||
 | 
					    "Wrong answer": "Respuesta no válida",
 | 
				
			||||||
 | 
					    "Erroneous CAPTCHA": "CAPTCHA no válido",
 | 
				
			||||||
 | 
					    "CAPTCHA is a required field": "El CAPTCHA es un campo obligatorio",
 | 
				
			||||||
 | 
					    "User ID is a required field": "El nombre es un campo obligatorio",
 | 
				
			||||||
 | 
					    "Password is a required field": "La contraseña es un campo obligatorio",
 | 
				
			||||||
 | 
					    "Wrong username or password": "Nombre o contraseña incorrecto",
 | 
				
			||||||
 | 
					    "Please sign in using 'Log in with Google'": "Inicie sesión con «Iniciar sesión con Google»",
 | 
				
			||||||
 | 
					    "Password cannot be empty": "La contraseña no puede estar en blanco",
 | 
				
			||||||
 | 
					    "Password cannot be longer than 55 characters": "La contraseña no puede tener más de 55 caracteres",
 | 
				
			||||||
 | 
					    "Please log in": "Inicie sesión, por favor",
 | 
				
			||||||
 | 
					    "Invidious Private Feed for `x`": "Fuente privada de Invidious para `x`",
 | 
				
			||||||
 | 
					    "channel:`x`": "canal: `x`",
 | 
				
			||||||
 | 
					    "Deleted or invalid channel": "El canal no es válido o ha sido borrado",
 | 
				
			||||||
 | 
					    "This channel does not exist.": "El canal no existe.",
 | 
				
			||||||
 | 
					    "Could not get channel info.": "No se ha podido obtener información del canal.",
 | 
				
			||||||
 | 
					    "Could not fetch comments": "No se han podido recuperar los comentarios",
 | 
				
			||||||
 | 
					    "View `x` replies": "Ver `x` respuestas",
 | 
				
			||||||
 | 
					    "`x` ago": "hace `x`",
 | 
				
			||||||
 | 
					    "Load more": "Cargar más",
 | 
				
			||||||
 | 
					    "`x` points": "`x` puntos",
 | 
				
			||||||
 | 
					    "Could not create mix.": "No se ha podido crear la mezcla.",
 | 
				
			||||||
 | 
					    "Empty playlist": "La lista de reproducción está vacía",
 | 
				
			||||||
 | 
					    "Not a playlist.": "Lista de reproducción no válida.",
 | 
				
			||||||
 | 
					    "Playlist does not exist.": "La lista de reproducción no existe.",
 | 
				
			||||||
 | 
					    "Could not pull trending pages.": "No se han podido obtener las páginas de tendencias.",
 | 
				
			||||||
 | 
					    "Hidden field \"challenge\" is a required field": "El campo oculto «desafío» es un campo obligatorio",
 | 
				
			||||||
 | 
					    "Hidden field \"token\" is a required field": "El campo oculto «símbolo» es un campo obligatorio",
 | 
				
			||||||
 | 
					    "Erroneous challenge": "Desafío no válido",
 | 
				
			||||||
 | 
					    "Erroneous token": "Símbolo no válido",
 | 
				
			||||||
 | 
					    "No such user": "Usuario no válido",
 | 
				
			||||||
 | 
					    "Token is expired, please try again": "El símbolo ha caducado, inténtelo de nuevo",
 | 
				
			||||||
 | 
					    "English": "Inglés",
 | 
				
			||||||
 | 
					    "English (auto-generated)": "Inglés (autogenerado)",
 | 
				
			||||||
 | 
					    "Afrikaans": "Afrikáans",
 | 
				
			||||||
 | 
					    "Albanian": "Albanés",
 | 
				
			||||||
 | 
					    "Amharic": "Amárico",
 | 
				
			||||||
 | 
					    "Arabic": "Árabe",
 | 
				
			||||||
 | 
					    "Armenian": "Armenio",
 | 
				
			||||||
 | 
					    "Azerbaijani": "Azerbaiyano",
 | 
				
			||||||
 | 
					    "Bangla": "Bengalí",
 | 
				
			||||||
 | 
					    "Basque": "Euskera",
 | 
				
			||||||
 | 
					    "Belarusian": "Bielorruso",
 | 
				
			||||||
 | 
					    "Bosnian": "Bosnio",
 | 
				
			||||||
 | 
					    "Bulgarian": "Búlgaro",
 | 
				
			||||||
 | 
					    "Burmese": "Birmano",
 | 
				
			||||||
 | 
					    "Catalan": "Catalán",
 | 
				
			||||||
 | 
					    "Cebuano": "Cebuano",
 | 
				
			||||||
 | 
					    "Chinese (Simplified)": "Chino (simplificado)",
 | 
				
			||||||
 | 
					    "Chinese (Traditional)": "Chino (tradicional)",
 | 
				
			||||||
 | 
					    "Corsican": "Corso",
 | 
				
			||||||
 | 
					    "Croatian": "Croata",
 | 
				
			||||||
 | 
					    "Czech": "Checo",
 | 
				
			||||||
 | 
					    "Danish": "Danés",
 | 
				
			||||||
 | 
					    "Dutch": "Holandés",
 | 
				
			||||||
 | 
					    "Esperanto": "Esperanto",
 | 
				
			||||||
 | 
					    "Estonian": "Estonio",
 | 
				
			||||||
 | 
					    "Filipino": "Filipino",
 | 
				
			||||||
 | 
					    "Finnish": "Finés",
 | 
				
			||||||
 | 
					    "French": "Francés",
 | 
				
			||||||
 | 
					    "Galician": "Gallego",
 | 
				
			||||||
 | 
					    "Georgian": "Georgiano",
 | 
				
			||||||
 | 
					    "German": "Alemán",
 | 
				
			||||||
 | 
					    "Greek": "Griego",
 | 
				
			||||||
 | 
					    "Gujarati": "Guyaratí",
 | 
				
			||||||
 | 
					    "Haitian Creole": "Criollo haitiano",
 | 
				
			||||||
 | 
					    "Hausa": "Hausa",
 | 
				
			||||||
 | 
					    "Hawaiian": "Hawaiano",
 | 
				
			||||||
 | 
					    "Hebrew": "Hebreo",
 | 
				
			||||||
 | 
					    "Hindi": "Hindi",
 | 
				
			||||||
 | 
					    "Hmong": "Hmong",
 | 
				
			||||||
 | 
					    "Hungarian": "Húngaro",
 | 
				
			||||||
 | 
					    "Icelandic": "Islandés",
 | 
				
			||||||
 | 
					    "Igbo": "Igbo",
 | 
				
			||||||
 | 
					    "Indonesian": "Indonesio",
 | 
				
			||||||
 | 
					    "Irish": "Irlandés",
 | 
				
			||||||
 | 
					    "Italian": "Italiano",
 | 
				
			||||||
 | 
					    "Japanese": "Japonés",
 | 
				
			||||||
 | 
					    "Javanese": "Javanés",
 | 
				
			||||||
 | 
					    "Kannada": "Canarés",
 | 
				
			||||||
 | 
					    "Kazakh": "Kazajo",
 | 
				
			||||||
 | 
					    "Khmer": "Camboyano",
 | 
				
			||||||
 | 
					    "Korean": "Coreano",
 | 
				
			||||||
 | 
					    "Kurdish": "Kurdo",
 | 
				
			||||||
 | 
					    "Kyrgyz": "Kirguís",
 | 
				
			||||||
 | 
					    "Lao": "Laosiano",
 | 
				
			||||||
 | 
					    "Latin": "Latín",
 | 
				
			||||||
 | 
					    "Latvian": "Letón",
 | 
				
			||||||
 | 
					    "Lithuanian": "Lituano",
 | 
				
			||||||
 | 
					    "Luxembourgish": "Luxemburgués",
 | 
				
			||||||
 | 
					    "Macedonian": "Macedonio",
 | 
				
			||||||
 | 
					    "Malagasy": "Malgache",
 | 
				
			||||||
 | 
					    "Malay": "Malayo",
 | 
				
			||||||
 | 
					    "Malayalam": "Malabar",
 | 
				
			||||||
 | 
					    "Maltese": "Maltés",
 | 
				
			||||||
 | 
					    "Maori": "Maorí",
 | 
				
			||||||
 | 
					    "Marathi": "Maratí",
 | 
				
			||||||
 | 
					    "Mongolian": "Mongol",
 | 
				
			||||||
 | 
					    "Nepali": "Nepalí",
 | 
				
			||||||
 | 
					    "Norwegian Bokmål": "Noruego",
 | 
				
			||||||
 | 
					    "Nyanja": "Chichewa",
 | 
				
			||||||
 | 
					    "Pashto": "Pastún",
 | 
				
			||||||
 | 
					    "Persian": "Persa",
 | 
				
			||||||
 | 
					    "Polish": "Polaco",
 | 
				
			||||||
 | 
					    "Portuguese": "Portugués",
 | 
				
			||||||
 | 
					    "Punjabi": "Panyabí",
 | 
				
			||||||
 | 
					    "Romanian": "Rumano",
 | 
				
			||||||
 | 
					    "Russian": "Ruso",
 | 
				
			||||||
 | 
					    "Samoan": "Samoano",
 | 
				
			||||||
 | 
					    "Scottish Gaelic": "Gaélico escocés",
 | 
				
			||||||
 | 
					    "Serbian": "Serbio",
 | 
				
			||||||
 | 
					    "Shona": "Shona",
 | 
				
			||||||
 | 
					    "Sindhi": "Sindi",
 | 
				
			||||||
 | 
					    "Sinhala": "Cingalés",
 | 
				
			||||||
 | 
					    "Slovak": "Eslovaco",
 | 
				
			||||||
 | 
					    "Slovenian": "Esloveno",
 | 
				
			||||||
 | 
					    "Somali": "Somalí",
 | 
				
			||||||
 | 
					    "Southern Sotho": "Sesoto",
 | 
				
			||||||
 | 
					    "Spanish": "Español",
 | 
				
			||||||
 | 
					    "Spanish (Latin America)": "Español (Hispanoamérica)",
 | 
				
			||||||
 | 
					    "Sundanese": "Sondanés",
 | 
				
			||||||
 | 
					    "Swahili": "Suajili",
 | 
				
			||||||
 | 
					    "Swedish": "Sueco",
 | 
				
			||||||
 | 
					    "Tajik": "Tayiko",
 | 
				
			||||||
 | 
					    "Tamil": "Tamil",
 | 
				
			||||||
 | 
					    "Telugu": "Telugu",
 | 
				
			||||||
 | 
					    "Thai": "Tailandés",
 | 
				
			||||||
 | 
					    "Turkish": "Turco",
 | 
				
			||||||
 | 
					    "Ukrainian": "Ucraniano",
 | 
				
			||||||
 | 
					    "Urdu": "Urdu",
 | 
				
			||||||
 | 
					    "Uzbek": "Uzbeko",
 | 
				
			||||||
 | 
					    "Vietnamese": "Vietnamita",
 | 
				
			||||||
 | 
					    "Welsh": "Galés",
 | 
				
			||||||
 | 
					    "Western Frisian": "Frisón",
 | 
				
			||||||
 | 
					    "Xhosa": "Xhosa",
 | 
				
			||||||
 | 
					    "Yiddish": "Yidis",
 | 
				
			||||||
 | 
					    "Yoruba": "Yoruba",
 | 
				
			||||||
 | 
					    "Zulu": "Zulú",
 | 
				
			||||||
 | 
					    "`x` years": "`x` años",
 | 
				
			||||||
 | 
					    "`x` months": "`x` meses",
 | 
				
			||||||
 | 
					    "`x` weeks": "`x` semanas",
 | 
				
			||||||
 | 
					    "`x` days": "`x` días",
 | 
				
			||||||
 | 
					    "`x` hours": "`x` horas",
 | 
				
			||||||
 | 
					    "`x` minutes": "`x` minutos",
 | 
				
			||||||
 | 
					    "`x` seconds": "`x` segundos",
 | 
				
			||||||
 | 
					    "Fallback comments: ": "Comentarios alternativos: ",
 | 
				
			||||||
 | 
					    "Popular": "Populares",
 | 
				
			||||||
 | 
					    "Top": "Destacados",
 | 
				
			||||||
 | 
					    "About": "Acerca de",
 | 
				
			||||||
 | 
					    "Rating: ": "Valoración: ",
 | 
				
			||||||
 | 
					    "Language: ": "Idioma: ",
 | 
				
			||||||
 | 
					    "View as playlist": "Ver como lista de reproducción",
 | 
				
			||||||
 | 
					    "Default": "Por defecto",
 | 
				
			||||||
 | 
					    "Music": "Música",
 | 
				
			||||||
 | 
					    "Gaming": "Videojuegos",
 | 
				
			||||||
 | 
					    "News": "Noticias",
 | 
				
			||||||
 | 
					    "Movies": "Películas",
 | 
				
			||||||
 | 
					    "Download": "Descargar",
 | 
				
			||||||
 | 
					    "Download as: ": "Descargar como: ",
 | 
				
			||||||
 | 
					    "%A %B %-d, %Y": "%A %B %-d, %Y",
 | 
				
			||||||
 | 
					    "(edited)": "(editado)",
 | 
				
			||||||
 | 
					    "YouTube comment permalink": "Enlace permanente de YouTube del comentario",
 | 
				
			||||||
 | 
					    "`x` marked it with a ❤": "`x` lo ha marcado con un ❤",
 | 
				
			||||||
 | 
					    "Audio mode": "Modo de audio",
 | 
				
			||||||
 | 
					    "Video mode": "Modo de vídeo",
 | 
				
			||||||
 | 
					    "Videos": "Vídeos",
 | 
				
			||||||
 | 
					    "Playlists": "Listas de reproducción",
 | 
				
			||||||
 | 
					    "Current version: ": "Versión actual: "
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -5,15 +5,20 @@
 | 
				
			|||||||
    "Shared `x` ago": "Duela `x` partekatua",
 | 
					    "Shared `x` ago": "Duela `x` partekatua",
 | 
				
			||||||
    "Unsubscribe": "Harpidetza kendu",
 | 
					    "Unsubscribe": "Harpidetza kendu",
 | 
				
			||||||
    "Subscribe": "Harpidetu",
 | 
					    "Subscribe": "Harpidetu",
 | 
				
			||||||
  "Login to subscribe to `x`": "Saioa hasi `x`(e)ra harpidetzeko",
 | 
					 | 
				
			||||||
    "View channel on YouTube": "Ikusi kanala YouTuben",
 | 
					    "View channel on YouTube": "Ikusi kanala YouTuben",
 | 
				
			||||||
 | 
					    "View playlist on YouTube": "",
 | 
				
			||||||
    "newest": "berrienak",
 | 
					    "newest": "berrienak",
 | 
				
			||||||
    "oldest": "zaharrenak",
 | 
					    "oldest": "zaharrenak",
 | 
				
			||||||
    "popular": "ospetsuenak",
 | 
					    "popular": "ospetsuenak",
 | 
				
			||||||
  "last": "",
 | 
					    "last": "azkena",
 | 
				
			||||||
    "Next page": "Hurrengo orria",
 | 
					    "Next page": "Hurrengo orria",
 | 
				
			||||||
    "Previous page": "Aurreko orria",
 | 
					    "Previous page": "Aurreko orria",
 | 
				
			||||||
    "Clear watch history?": "Garbitu ikusitakoen historia?",
 | 
					    "Clear watch history?": "Garbitu ikusitakoen historia?",
 | 
				
			||||||
 | 
					    "New password": "Pasahitz berria",
 | 
				
			||||||
 | 
					    "New passwords must match": "",
 | 
				
			||||||
 | 
					    "Cannot change password for Google accounts": "",
 | 
				
			||||||
 | 
					    "Authorize token?": "",
 | 
				
			||||||
 | 
					    "Authorize token for `x`?": "",
 | 
				
			||||||
    "Yes": "Bai",
 | 
					    "Yes": "Bai",
 | 
				
			||||||
    "No": "Ez",
 | 
					    "No": "Ez",
 | 
				
			||||||
    "Import and Export Data": "Datuak inportatu eta esportatu",
 | 
					    "Import and Export Data": "Datuak inportatu eta esportatu",
 | 
				
			||||||
@ -32,22 +37,23 @@
 | 
				
			|||||||
    "An alternative front-end to YouTube": "YouTuberako interfaze alternatibo bat",
 | 
					    "An alternative front-end to YouTube": "YouTuberako interfaze alternatibo bat",
 | 
				
			||||||
    "JavaScript license information": "JavaScript lizentzia informazioa",
 | 
					    "JavaScript license information": "JavaScript lizentzia informazioa",
 | 
				
			||||||
    "source": "iturburua",
 | 
					    "source": "iturburua",
 | 
				
			||||||
  "Login": "Saioa hasi",
 | 
					    "Log in": "Saioa hasi",
 | 
				
			||||||
  "Login/Register": "Saioa hasi/Izena eman",
 | 
					    "Log in/register": "Saioa hasi/Izena eman",
 | 
				
			||||||
  "Login to Google": "Googlekin hasi saioa",
 | 
					    "Log in with Google": "Googlekin hasi saioa",
 | 
				
			||||||
  "User ID:": "Erabiltzaile IDa:",
 | 
					    "User ID": "Erabiltzaile IDa",
 | 
				
			||||||
  "Password:": "Pasahitza:",
 | 
					    "Password": "Pasahitza",
 | 
				
			||||||
    "Time (h:mm:ss):": "Denbora (o:mm:ss):",
 | 
					    "Time (h:mm:ss):": "Denbora (o:mm:ss):",
 | 
				
			||||||
    "Text CAPTCHA": "Testu CAPTCHA",
 | 
					    "Text CAPTCHA": "Testu CAPTCHA",
 | 
				
			||||||
    "Image CAPTCHA": "Irudi CAPTCHA",
 | 
					    "Image CAPTCHA": "Irudi CAPTCHA",
 | 
				
			||||||
    "Sign In": "",
 | 
					    "Sign In": "",
 | 
				
			||||||
    "Register": "",
 | 
					    "Register": "",
 | 
				
			||||||
  "Email:": "",
 | 
					    "E-mail": "",
 | 
				
			||||||
  "Google verification code:": "",
 | 
					    "Google verification code": "",
 | 
				
			||||||
    "Preferences": "",
 | 
					    "Preferences": "",
 | 
				
			||||||
    "Player preferences": "",
 | 
					    "Player preferences": "",
 | 
				
			||||||
    "Always loop: ": "",
 | 
					    "Always loop: ": "",
 | 
				
			||||||
    "Autoplay: ": "",
 | 
					    "Autoplay: ": "",
 | 
				
			||||||
 | 
					    "Play next by default: ": "",
 | 
				
			||||||
    "Autoplay next video: ": "",
 | 
					    "Autoplay next video: ": "",
 | 
				
			||||||
    "Listen by default: ": "",
 | 
					    "Listen by default: ": "",
 | 
				
			||||||
    "Proxy videos? ": "",
 | 
					    "Proxy videos? ": "",
 | 
				
			||||||
@ -55,13 +61,17 @@
 | 
				
			|||||||
    "Preferred video quality: ": "",
 | 
					    "Preferred video quality: ": "",
 | 
				
			||||||
    "Player volume: ": "",
 | 
					    "Player volume: ": "",
 | 
				
			||||||
    "Default comments: ": "",
 | 
					    "Default comments: ": "",
 | 
				
			||||||
 | 
					    "youtube": "",
 | 
				
			||||||
 | 
					    "reddit": "",
 | 
				
			||||||
    "Default captions: ": "",
 | 
					    "Default captions: ": "",
 | 
				
			||||||
    "Fallback captions: ": "",
 | 
					    "Fallback captions: ": "",
 | 
				
			||||||
    "Show related videos? ": "",
 | 
					    "Show related videos? ": "",
 | 
				
			||||||
 | 
					    "Show annotations by default? ": "",
 | 
				
			||||||
    "Visual preferences": "",
 | 
					    "Visual preferences": "",
 | 
				
			||||||
    "Dark mode: ": "",
 | 
					    "Dark mode: ": "",
 | 
				
			||||||
    "Thin mode: ": "",
 | 
					    "Thin mode: ": "",
 | 
				
			||||||
    "Subscription preferences": "",
 | 
					    "Subscription preferences": "",
 | 
				
			||||||
 | 
					    "Show annotations by default for subscribed channels? ": "",
 | 
				
			||||||
    "Redirect homepage to feed: ": "",
 | 
					    "Redirect homepage to feed: ": "",
 | 
				
			||||||
    "Number of videos shown in feed: ": "",
 | 
					    "Number of videos shown in feed: ": "",
 | 
				
			||||||
    "Sort videos by: ": "",
 | 
					    "Sort videos by: ": "",
 | 
				
			||||||
@ -77,8 +87,10 @@
 | 
				
			|||||||
    "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": "",
 | 
				
			||||||
 | 
					    "Change password": "",
 | 
				
			||||||
    "Manage subscriptions": "",
 | 
					    "Manage subscriptions": "",
 | 
				
			||||||
 | 
					    "Manage tokens": "",
 | 
				
			||||||
    "Watch history": "",
 | 
					    "Watch history": "",
 | 
				
			||||||
    "Delete account": "",
 | 
					    "Delete account": "",
 | 
				
			||||||
    "Administrator preferences": "",
 | 
					    "Administrator preferences": "",
 | 
				
			||||||
@ -91,20 +103,26 @@
 | 
				
			|||||||
    "Report statistics? ": "",
 | 
					    "Report statistics? ": "",
 | 
				
			||||||
    "Save preferences": "",
 | 
					    "Save preferences": "",
 | 
				
			||||||
    "Subscription manager": "",
 | 
					    "Subscription manager": "",
 | 
				
			||||||
 | 
					    "Token manager": "",
 | 
				
			||||||
 | 
					    "Token": "",
 | 
				
			||||||
    "`x` subscriptions": "",
 | 
					    "`x` subscriptions": "",
 | 
				
			||||||
  "Import/Export": "",
 | 
					    "`x` tokens": "",
 | 
				
			||||||
 | 
					    "Import/export": "",
 | 
				
			||||||
    "unsubscribe": "",
 | 
					    "unsubscribe": "",
 | 
				
			||||||
 | 
					    "revoke": "",
 | 
				
			||||||
    "Subscriptions": "",
 | 
					    "Subscriptions": "",
 | 
				
			||||||
    "`x` unseen notifications": "",
 | 
					    "`x` unseen notifications": "",
 | 
				
			||||||
    "search": "",
 | 
					    "search": "",
 | 
				
			||||||
  "Sign out": "",
 | 
					    "Log 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.": "",
 | 
				
			||||||
    "View privacy policy.": "",
 | 
					    "View privacy policy.": "",
 | 
				
			||||||
  "Unlisted": "",
 | 
					 | 
				
			||||||
    "Trending": "",
 | 
					    "Trending": "",
 | 
				
			||||||
  "Watch video on Youtube": "",
 | 
					    "Unlisted": "",
 | 
				
			||||||
 | 
					    "Watch on YouTube": "",
 | 
				
			||||||
 | 
					    "Hide annotations": "",
 | 
				
			||||||
 | 
					    "Show annotations": "",
 | 
				
			||||||
    "Genre: ": "",
 | 
					    "Genre: ": "",
 | 
				
			||||||
    "License: ": "",
 | 
					    "License: ": "",
 | 
				
			||||||
    "Family friendly? ": "",
 | 
					    "Family friendly? ": "",
 | 
				
			||||||
@ -113,8 +131,9 @@
 | 
				
			|||||||
    "Whitelisted regions: ": "",
 | 
					    "Whitelisted regions: ": "",
 | 
				
			||||||
    "Blacklisted regions: ": "",
 | 
					    "Blacklisted regions: ": "",
 | 
				
			||||||
    "Shared `x`": "",
 | 
					    "Shared `x`": "",
 | 
				
			||||||
 | 
					    "`x` views": "",
 | 
				
			||||||
    "Premieres in `x`": "",
 | 
					    "Premieres in `x`": "",
 | 
				
			||||||
  "Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.": "",
 | 
					    "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.": "",
 | 
				
			||||||
    "View YouTube comments": "",
 | 
					    "View YouTube comments": "",
 | 
				
			||||||
    "View more comments on Reddit": "",
 | 
					    "View more comments on Reddit": "",
 | 
				
			||||||
    "View `x` comments": "",
 | 
					    "View `x` comments": "",
 | 
				
			||||||
@ -123,19 +142,19 @@
 | 
				
			|||||||
    "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 log in, make sure two-factor authentication (Authenticator or SMS) is turned on.": "",
 | 
				
			||||||
    "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 turned on for your account.": "",
 | 
				
			||||||
  "Invalid answer": "",
 | 
					    "Wrong answer": "",
 | 
				
			||||||
  "Invalid CAPTCHA": "",
 | 
					    "Erroneous 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": "",
 | 
					    "Wrong username or password": "",
 | 
				
			||||||
  "Please sign in using 'Sign in with Google'": "",
 | 
					    "Please sign in using 'Log 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 log in": "",
 | 
				
			||||||
    "Invidious Private Feed for `x`": "",
 | 
					    "Invidious Private Feed for `x`": "",
 | 
				
			||||||
    "channel:`x`": "",
 | 
					    "channel:`x`": "",
 | 
				
			||||||
    "Deleted or invalid channel": "",
 | 
					    "Deleted or invalid channel": "",
 | 
				
			||||||
@ -147,15 +166,15 @@
 | 
				
			|||||||
    "Load more": "",
 | 
					    "Load more": "",
 | 
				
			||||||
    "`x` points": "",
 | 
					    "`x` points": "",
 | 
				
			||||||
    "Could not create mix.": "",
 | 
					    "Could not create mix.": "",
 | 
				
			||||||
  "Playlist is empty": "",
 | 
					    "Empty playlist": "",
 | 
				
			||||||
  "Invalid playlist.": "",
 | 
					    "Not a 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": "",
 | 
					    "Erroneous challenge": "",
 | 
				
			||||||
  "Invalid token": "",
 | 
					    "Erroneous token": "",
 | 
				
			||||||
  "Invalid user": "",
 | 
					    "No such user": "",
 | 
				
			||||||
    "Token is expired, please try again": "",
 | 
					    "Token is expired, please try again": "",
 | 
				
			||||||
    "English": "",
 | 
					    "English": "",
 | 
				
			||||||
    "English (auto-generated)": "",
 | 
					    "English (auto-generated)": "",
 | 
				
			||||||
@ -224,7 +243,7 @@
 | 
				
			|||||||
    "Marathi": "",
 | 
					    "Marathi": "",
 | 
				
			||||||
    "Mongolian": "",
 | 
					    "Mongolian": "",
 | 
				
			||||||
    "Nepali": "",
 | 
					    "Nepali": "",
 | 
				
			||||||
  "Norwegian": "",
 | 
					    "Norwegian Bokmål": "",
 | 
				
			||||||
    "Nyanja": "",
 | 
					    "Nyanja": "",
 | 
				
			||||||
    "Pashto": "",
 | 
					    "Pashto": "",
 | 
				
			||||||
    "Persian": "",
 | 
					    "Persian": "",
 | 
				
			||||||
@ -276,6 +295,7 @@
 | 
				
			|||||||
    "About": "",
 | 
					    "About": "",
 | 
				
			||||||
    "Rating: ": "",
 | 
					    "Rating: ": "",
 | 
				
			||||||
    "Language: ": "",
 | 
					    "Language: ": "",
 | 
				
			||||||
 | 
					    "View as playlist": "",
 | 
				
			||||||
    "Default": "",
 | 
					    "Default": "",
 | 
				
			||||||
    "Music": "",
 | 
					    "Music": "",
 | 
				
			||||||
    "Gaming": "",
 | 
					    "Gaming": "",
 | 
				
			||||||
@ -285,11 +305,9 @@
 | 
				
			|||||||
    "Download as: ": "",
 | 
					    "Download as: ": "",
 | 
				
			||||||
    "%A %B %-d, %Y": "",
 | 
					    "%A %B %-d, %Y": "",
 | 
				
			||||||
    "(edited)": "",
 | 
					    "(edited)": "",
 | 
				
			||||||
  "Youtube permalink of the comment": "",
 | 
					    "YouTube comment permalink": "",
 | 
				
			||||||
    "`x` marked it with a ❤": "",
 | 
					    "`x` marked it with a ❤": "",
 | 
				
			||||||
    "Audio mode": "",
 | 
					    "Audio mode": "",
 | 
				
			||||||
    "Video mode": "",
 | 
					    "Video mode": "",
 | 
				
			||||||
  "Videos": "",
 | 
					    "Videos": ""
 | 
				
			||||||
  "Playlists": "",
 | 
					 | 
				
			||||||
  "Current version: ": ""
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -5,8 +5,8 @@
 | 
				
			|||||||
    "Shared `x` ago": "Ajoutée il y a `x`",
 | 
					    "Shared `x` ago": "Ajoutée il y a `x`",
 | 
				
			||||||
    "Unsubscribe": "Se désabonner",
 | 
					    "Unsubscribe": "Se désabonner",
 | 
				
			||||||
    "Subscribe": "S'abonner",
 | 
					    "Subscribe": "S'abonner",
 | 
				
			||||||
  "Login to subscribe to `x`": "Vous devez vous connecter pour vous abonner à `x`",
 | 
					 | 
				
			||||||
    "View channel on YouTube": "Voir la chaîne sur YouTube",
 | 
					    "View channel on YouTube": "Voir la chaîne sur YouTube",
 | 
				
			||||||
 | 
					    "View playlist on YouTube": "",
 | 
				
			||||||
    "newest": "Date d'ajout (la plus récente)",
 | 
					    "newest": "Date d'ajout (la plus récente)",
 | 
				
			||||||
    "oldest": "Date d'ajout (la plus ancienne)",
 | 
					    "oldest": "Date d'ajout (la plus ancienne)",
 | 
				
			||||||
    "popular": "Les plus populaires",
 | 
					    "popular": "Les plus populaires",
 | 
				
			||||||
@ -14,6 +14,11 @@
 | 
				
			|||||||
    "Next page": "Page suivante",
 | 
					    "Next page": "Page suivante",
 | 
				
			||||||
    "Previous page": "Page précédente",
 | 
					    "Previous page": "Page précédente",
 | 
				
			||||||
    "Clear watch history?": "Êtes-vous sûr de vouloir supprimer l'historique des vidéos regardées ?",
 | 
					    "Clear watch history?": "Êtes-vous sûr de vouloir supprimer l'historique des vidéos regardées ?",
 | 
				
			||||||
 | 
					    "New password": "Nouveau mot de passe",
 | 
				
			||||||
 | 
					    "New passwords must match": "Les nouveaux mots de passe doivent être identiques",
 | 
				
			||||||
 | 
					    "Cannot change password for Google accounts": "Le mot de passe d'un compte Google ne peut pas être changé",
 | 
				
			||||||
 | 
					    "Authorize token?": "Autoriser le token ?",
 | 
				
			||||||
 | 
					    "Authorize token for `x`?": "Autoriser le token pour `x` ?",
 | 
				
			||||||
    "Yes": "Oui",
 | 
					    "Yes": "Oui",
 | 
				
			||||||
    "No": "Non",
 | 
					    "No": "Non",
 | 
				
			||||||
    "Import and Export Data": "Importer et exporter des données",
 | 
					    "Import and Export Data": "Importer et exporter des données",
 | 
				
			||||||
@ -32,22 +37,23 @@
 | 
				
			|||||||
    "An alternative front-end to YouTube": "Un front-end alternatif à YouTube",
 | 
					    "An alternative front-end to YouTube": "Un front-end alternatif à YouTube",
 | 
				
			||||||
    "JavaScript license information": "Informations sur les licences JavaScript",
 | 
					    "JavaScript license information": "Informations sur les licences JavaScript",
 | 
				
			||||||
    "source": "source",
 | 
					    "source": "source",
 | 
				
			||||||
  "Login": "Se connecter",
 | 
					    "Log in": "Se connecter",
 | 
				
			||||||
  "Login/Register": "Se connecter/Créer un compte",
 | 
					    "Log in/register": "Se connecter/Créer un compte",
 | 
				
			||||||
  "Login to Google": "Se connecter avec Google",
 | 
					    "Log in with Google": "Se connecter avec Google",
 | 
				
			||||||
  "User ID:": "Identifiant utilisateur :",
 | 
					    "User ID": "Identifiant utilisateur",
 | 
				
			||||||
  "Password:": "Mot de passe :",
 | 
					    "Password": "Mot de passe",
 | 
				
			||||||
    "Time (h:mm:ss):": "Heure (h:mm:ss) :",
 | 
					    "Time (h:mm:ss):": "Heure (h:mm:ss) :",
 | 
				
			||||||
    "Text CAPTCHA": "CAPTCHA Texte",
 | 
					    "Text CAPTCHA": "CAPTCHA Texte",
 | 
				
			||||||
    "Image CAPTCHA": "CAPTCHA Image",
 | 
					    "Image CAPTCHA": "CAPTCHA Image",
 | 
				
			||||||
    "Sign In": "Se connecter",
 | 
					    "Sign In": "Se connecter",
 | 
				
			||||||
    "Register": "S'inscrire",
 | 
					    "Register": "S'inscrire",
 | 
				
			||||||
  "Email:": "E-mail :",
 | 
					    "E-mail": "E-mail",
 | 
				
			||||||
  "Google verification code:": "Code de vérification Google :",
 | 
					    "Google verification code": "Code de vérification Google",
 | 
				
			||||||
    "Preferences": "Préférences",
 | 
					    "Preferences": "Préférences",
 | 
				
			||||||
    "Player preferences": "Préférences du lecteur",
 | 
					    "Player preferences": "Préférences du lecteur",
 | 
				
			||||||
    "Always loop: ": "Lire en boucle : ",
 | 
					    "Always loop: ": "Lire en boucle : ",
 | 
				
			||||||
    "Autoplay: ": "Lire automatiquement : ",
 | 
					    "Autoplay: ": "Lire automatiquement : ",
 | 
				
			||||||
 | 
					    "Play next by default: ": "Jouer suirvante par défaut : ",
 | 
				
			||||||
    "Autoplay next video: ": "Lire automatiquement la vidéo suivante : ",
 | 
					    "Autoplay next video: ": "Lire automatiquement la vidéo suivante : ",
 | 
				
			||||||
    "Listen by default: ": "Audio uniquement : ",
 | 
					    "Listen by default: ": "Audio uniquement : ",
 | 
				
			||||||
    "Proxy videos? ": "Charger les vidéos à travers un proxy ? ",
 | 
					    "Proxy videos? ": "Charger les vidéos à travers un proxy ? ",
 | 
				
			||||||
@ -55,18 +61,22 @@
 | 
				
			|||||||
    "Preferred video quality: ": "Qualité vidéo souhaitée : ",
 | 
					    "Preferred video quality: ": "Qualité vidéo souhaitée : ",
 | 
				
			||||||
    "Player volume: ": "Volume du lecteur : ",
 | 
					    "Player volume: ": "Volume du lecteur : ",
 | 
				
			||||||
    "Default comments: ": "Source des commentaires : ",
 | 
					    "Default comments: ": "Source des commentaires : ",
 | 
				
			||||||
 | 
					    "youtube": "YouTube",
 | 
				
			||||||
 | 
					    "reddit": "Reddit",
 | 
				
			||||||
    "Default captions: ": "Sous-titres par défaut : ",
 | 
					    "Default captions: ": "Sous-titres par défaut : ",
 | 
				
			||||||
  "Fallback captions: ": "Fallback captions: ",
 | 
					    "Fallback captions: ": "Sous-titres de repli : ",
 | 
				
			||||||
    "Show related videos? ": "Voir les vidéos liées ? ",
 | 
					    "Show related videos? ": "Voir les vidéos liées ? ",
 | 
				
			||||||
 | 
					    "Show annotations by default? ": "Voir les annotations par défaut ? ",
 | 
				
			||||||
    "Visual preferences": "Préférences du site",
 | 
					    "Visual preferences": "Préférences du site",
 | 
				
			||||||
    "Dark mode: ": "Mode Sombre : ",
 | 
					    "Dark mode: ": "Mode Sombre : ",
 | 
				
			||||||
    "Thin mode: ": "Mode Simplifié : ",
 | 
					    "Thin mode: ": "Mode Simplifié : ",
 | 
				
			||||||
    "Subscription preferences": "Préférences de la page d'abonnements",
 | 
					    "Subscription preferences": "Préférences de la page d'abonnements",
 | 
				
			||||||
 | 
					    "Show annotations by default for subscribed channels? ": "Voir les annotations par défaut sur les chaînes suivies ? ",
 | 
				
			||||||
    "Redirect homepage to feed: ": "Rediriger la page d'accueil vers la page d'abonnements : ",
 | 
					    "Redirect homepage to feed: ": "Rediriger la page d'accueil vers la page d'abonnements : ",
 | 
				
			||||||
    "Number of videos shown in feed: ": "Nombre de vidéos montrées dans la page d'abonnements : ",
 | 
					    "Number of videos shown in feed: ": "Nombre de vidéos montrées dans la page d'abonnements : ",
 | 
				
			||||||
    "Sort videos by: ": "Trier les vidéos par : ",
 | 
					    "Sort videos by: ": "Trier les vidéos par : ",
 | 
				
			||||||
  "published": "publication",
 | 
					    "published": "date de publication",
 | 
				
			||||||
  "published - reverse": "publication - inversé",
 | 
					    "published - reverse": "date de publication - inversé",
 | 
				
			||||||
    "alphabetically": "alphabétiquement",
 | 
					    "alphabetically": "alphabétiquement",
 | 
				
			||||||
    "alphabetically - reverse": "alphabétiquement - inversé",
 | 
					    "alphabetically - reverse": "alphabétiquement - inversé",
 | 
				
			||||||
    "channel name": "nom de la chaîne",
 | 
					    "channel name": "nom de la chaîne",
 | 
				
			||||||
@ -77,8 +87,10 @@
 | 
				
			|||||||
    "Only show notifications (if there are any): ": "Afficher uniquement les notifications (s'il y en a) : ",
 | 
					    "Only show notifications (if there are any): ": "Afficher uniquement les notifications (s'il y en a) : ",
 | 
				
			||||||
    "Data preferences": "Préférences liées aux données",
 | 
					    "Data preferences": "Préférences liées aux données",
 | 
				
			||||||
    "Clear watch history": "Supprimer l'historique des vidéos regardées",
 | 
					    "Clear watch history": "Supprimer l'historique des vidéos regardées",
 | 
				
			||||||
  "Import/Export data": "Importer/exporter les données",
 | 
					    "Import/export data": "Importer/exporter les données",
 | 
				
			||||||
 | 
					    "Change password": "Modifier le mot de passe",
 | 
				
			||||||
    "Manage subscriptions": "Gérer les abonnements",
 | 
					    "Manage subscriptions": "Gérer les abonnements",
 | 
				
			||||||
 | 
					    "Manage tokens": "Gérer les tokens",
 | 
				
			||||||
    "Watch history": "Historique de visionnage",
 | 
					    "Watch history": "Historique de visionnage",
 | 
				
			||||||
    "Delete account": "Supprimer votre compte",
 | 
					    "Delete account": "Supprimer votre compte",
 | 
				
			||||||
    "Administrator preferences": "Préferences d'Administrateur",
 | 
					    "Administrator preferences": "Préferences d'Administrateur",
 | 
				
			||||||
@ -91,20 +103,26 @@
 | 
				
			|||||||
    "Report statistics? ": "Télémétrie activé ? ",
 | 
					    "Report statistics? ": "Télémétrie activé ? ",
 | 
				
			||||||
    "Save preferences": "Enregistrer les préférences",
 | 
					    "Save preferences": "Enregistrer les préférences",
 | 
				
			||||||
    "Subscription manager": "Gestionnaire d'abonnement",
 | 
					    "Subscription manager": "Gestionnaire d'abonnement",
 | 
				
			||||||
 | 
					    "Token manager": "Gestionnaire de tokens",
 | 
				
			||||||
 | 
					    "Token": "Token",
 | 
				
			||||||
    "`x` subscriptions": "`x` abonnements",
 | 
					    "`x` subscriptions": "`x` abonnements",
 | 
				
			||||||
  "Import/Export": "Importer/Exporter",
 | 
					    "`x` tokens": "`x` tokens",
 | 
				
			||||||
 | 
					    "Import/export": "Importer/Exporter",
 | 
				
			||||||
    "unsubscribe": "se désabonner",
 | 
					    "unsubscribe": "se désabonner",
 | 
				
			||||||
 | 
					    "revoke": "annuler",
 | 
				
			||||||
    "Subscriptions": "Abonnements",
 | 
					    "Subscriptions": "Abonnements",
 | 
				
			||||||
    "`x` unseen notifications": "`x` notifications non vues",
 | 
					    "`x` unseen notifications": "`x` notifications non vues",
 | 
				
			||||||
    "search": "Rechercher",
 | 
					    "search": "Rechercher",
 | 
				
			||||||
  "Sign out": "Déconnexion",
 | 
					    "Log out": "Déconnexion",
 | 
				
			||||||
    "Released under the AGPLv3 by Omar Roth.": "Publié sous licence AGPLv3 par Omar Roth.",
 | 
					    "Released under the AGPLv3 by Omar Roth.": "Publié sous licence AGPLv3 par Omar Roth.",
 | 
				
			||||||
    "Source available here.": "Code Source.",
 | 
					    "Source available here.": "Code Source.",
 | 
				
			||||||
    "View JavaScript license information.": "Voir les informations des licences JavaScript.",
 | 
					    "View JavaScript license information.": "Voir les informations des licences JavaScript.",
 | 
				
			||||||
  "View privacy policy.": "Politique de confidentialité",
 | 
					    "View privacy policy.": "Voir la politique de confidentialité.",
 | 
				
			||||||
    "Trending": "Tendances",
 | 
					    "Trending": "Tendances",
 | 
				
			||||||
    "Unlisted": "Non répertoriée",
 | 
					    "Unlisted": "Non répertoriée",
 | 
				
			||||||
  "Watch video on Youtube": "Voir la vidéo sur Youtube",
 | 
					    "Watch on YouTube": "Voir la vidéo sur Youtube",
 | 
				
			||||||
 | 
					    "Hide annotations": "Masquer les annotations",
 | 
				
			||||||
 | 
					    "Show annotations": "Afficher les annotations",
 | 
				
			||||||
    "Genre: ": "Genre : ",
 | 
					    "Genre: ": "Genre : ",
 | 
				
			||||||
    "License: ": "Licence : ",
 | 
					    "License: ": "Licence : ",
 | 
				
			||||||
    "Family friendly? ": "Tout Public ? ",
 | 
					    "Family friendly? ": "Tout Public ? ",
 | 
				
			||||||
@ -113,8 +131,9 @@
 | 
				
			|||||||
    "Whitelisted regions: ": "Régions en liste blanche : ",
 | 
					    "Whitelisted regions: ": "Régions en liste blanche : ",
 | 
				
			||||||
    "Blacklisted regions: ": "Régions sur liste noire : ",
 | 
					    "Blacklisted regions: ": "Régions sur liste noire : ",
 | 
				
			||||||
    "Shared `x`": "Ajoutée le `x`",
 | 
					    "Shared `x`": "Ajoutée le `x`",
 | 
				
			||||||
 | 
					    "`x` views": "`x` vues",
 | 
				
			||||||
    "Premieres in `x`": "Première dans `x`",
 | 
					    "Premieres in `x`": "Première dans `x`",
 | 
				
			||||||
  "Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.": "Il semblerait que JavaScript soit désactivé. Cliquez ici pour voir les commentaires sans. Gardez à l'esprit que le chargement peut prendre plus de temps.",
 | 
					    "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.": "Il semblerait que JavaScript soit désactivé. Cliquez ici pour voir les commentaires sans. Gardez à l'esprit que le chargement peut prendre plus de temps.",
 | 
				
			||||||
    "View YouTube comments": "Voir les commentaires YouTube",
 | 
					    "View YouTube comments": "Voir les commentaires YouTube",
 | 
				
			||||||
    "View more comments on Reddit": "Voir plus de commentaires sur Reddit",
 | 
					    "View more comments on Reddit": "Voir plus de commentaires sur Reddit",
 | 
				
			||||||
    "View `x` comments": "Voir `x` commentaires",
 | 
					    "View `x` comments": "Voir `x` commentaires",
 | 
				
			||||||
@ -123,19 +142,19 @@
 | 
				
			|||||||
    "Show replies": "Afficher les réponses",
 | 
					    "Show replies": "Afficher les réponses",
 | 
				
			||||||
    "Incorrect password": "Mot de passe incorrect",
 | 
					    "Incorrect password": "Mot de passe incorrect",
 | 
				
			||||||
    "Quota exceeded, try again in a few hours": "Nombre de tentative de connexion dépassé, réessayez dans quelques heures",
 | 
					    "Quota exceeded, try again in a few hours": "Nombre de tentative de connexion dépassé, réessayez dans quelques heures",
 | 
				
			||||||
  "Unable to login, make sure two-factor authentication (Authenticator or SMS) is enabled.": "Si vous ne parvenez pas à vous connecter, assurez-vous que l'authentification à deux facteurs (Authenticator ou SMS) est activée.",
 | 
					    "Unable to log in, make sure two-factor authentication (Authenticator or SMS) is turned on.": "Si vous ne parvenez pas à vous connecter, assurez-vous que l'authentification à deux facteurs (Authenticator ou SMS) est activée.",
 | 
				
			||||||
    "Invalid TFA code": "Code d'authentification à deux facteurs invalide",
 | 
					    "Invalid TFA code": "Code d'authentification à deux facteurs invalide",
 | 
				
			||||||
  "Login failed. This may be because two-factor authentication is not enabled on your account.": "La connexion a échoué. Cela peut être dû au fait que l'authentification à deux facteurs n'est pas activée sur votre compte.",
 | 
					    "Login failed. This may be because two-factor authentication is not turned on for your account.": "La connexion a échoué. Cela peut être dû au fait que l'authentification à deux facteurs n'est pas activée sur votre compte.",
 | 
				
			||||||
  "Invalid answer": "Réponse invalide",
 | 
					    "Wrong answer": "Réponse invalide",
 | 
				
			||||||
  "Invalid CAPTCHA": "CAPTCHA invalide",
 | 
					    "Erroneous CAPTCHA": "CAPTCHA invalide",
 | 
				
			||||||
    "CAPTCHA is a required field": "Veuillez entrer un CAPTCHA",
 | 
					    "CAPTCHA is a required field": "Veuillez entrer un CAPTCHA",
 | 
				
			||||||
    "User ID is a required field": "Veuillez entrer un Identifiant Utilisateur",
 | 
					    "User ID is a required field": "Veuillez entrer un Identifiant Utilisateur",
 | 
				
			||||||
    "Password is a required field": "Veuillez entrer un Mot de passe",
 | 
					    "Password is a required field": "Veuillez entrer un Mot de passe",
 | 
				
			||||||
  "Invalid username or password": "Nom d'utilisateur ou mot de passe invalide",
 | 
					    "Wrong username or password": "Nom d'utilisateur ou mot de passe invalide",
 | 
				
			||||||
  "Please sign in using 'Sign in with Google'": "Veuillez vous connecter en utilisant \"Se connecter avec Google\"",
 | 
					    "Please sign in using 'Log in with Google'": "Veuillez vous connecter en utilisant \"Se connecter avec Google\"",
 | 
				
			||||||
    "Password cannot be empty": "Le mot de passe ne peut pas être vide",
 | 
					    "Password cannot be empty": "Le mot de passe ne peut pas être vide",
 | 
				
			||||||
    "Password cannot be longer than 55 characters": "Le mot de passe ne doit pas comporter plus de 55 caractères",
 | 
					    "Password cannot be longer than 55 characters": "Le mot de passe ne doit pas comporter plus de 55 caractères",
 | 
				
			||||||
  "Please sign in": "Veuillez vous connecter",
 | 
					    "Please log in": "Veuillez vous connecter",
 | 
				
			||||||
    "Invidious Private Feed for `x`": "Flux RSS privé pour `x`",
 | 
					    "Invidious Private Feed for `x`": "Flux RSS privé pour `x`",
 | 
				
			||||||
    "channel:`x`": "chaîne:`x`",
 | 
					    "channel:`x`": "chaîne:`x`",
 | 
				
			||||||
    "Deleted or invalid channel": "Chaîne supprimée ou invalide",
 | 
					    "Deleted or invalid channel": "Chaîne supprimée ou invalide",
 | 
				
			||||||
@ -147,15 +166,15 @@
 | 
				
			|||||||
    "Load more": "Charger plus",
 | 
					    "Load more": "Charger plus",
 | 
				
			||||||
    "`x` points": "`x` points",
 | 
					    "`x` points": "`x` points",
 | 
				
			||||||
    "Could not create mix.": "Impossible de charger cette liste de lecture.",
 | 
					    "Could not create mix.": "Impossible de charger cette liste de lecture.",
 | 
				
			||||||
  "Playlist is empty": "La liste de lecture est vide",
 | 
					    "Empty playlist": "La liste de lecture est vide",
 | 
				
			||||||
  "Invalid playlist.": "Liste de lecture invalide.",
 | 
					    "Not a playlist.": "Liste de lecture invalide.",
 | 
				
			||||||
    "Playlist does not exist.": "La liste de lecture n'existe pas.",
 | 
					    "Playlist does not exist.": "La liste de lecture n'existe pas.",
 | 
				
			||||||
    "Could not pull trending pages.": "Impossible de charger les pages de tendances.",
 | 
					    "Could not pull trending pages.": "Impossible de charger les pages de tendances.",
 | 
				
			||||||
    "Hidden field \"challenge\" is a required field": "Hidden field \"challenge\" is a required field",
 | 
					    "Hidden field \"challenge\" is a required field": "Hidden field \"challenge\" is a required field",
 | 
				
			||||||
    "Hidden field \"token\" is a required field": "Hidden field \"token\" is a required field",
 | 
					    "Hidden field \"token\" is a required field": "Hidden field \"token\" is a required field",
 | 
				
			||||||
  "Invalid challenge": "Invalid challenge",
 | 
					    "Erroneous challenge": "Erroneous challenge",
 | 
				
			||||||
  "Invalid token": "Invalid token",
 | 
					    "Erroneous token": "Erroneous token",
 | 
				
			||||||
  "Invalid user": "Invalid user",
 | 
					    "No such user": "No such user",
 | 
				
			||||||
    "Token is expired, please try again": "Token is expired, please try again",
 | 
					    "Token is expired, please try again": "Token is expired, please try again",
 | 
				
			||||||
    "English": "Anglais",
 | 
					    "English": "Anglais",
 | 
				
			||||||
    "English (auto-generated)": "Anglais (générés automatiquement)",
 | 
					    "English (auto-generated)": "Anglais (générés automatiquement)",
 | 
				
			||||||
@ -224,7 +243,7 @@
 | 
				
			|||||||
    "Marathi": "Marathi",
 | 
					    "Marathi": "Marathi",
 | 
				
			||||||
    "Mongolian": "Mongol",
 | 
					    "Mongolian": "Mongol",
 | 
				
			||||||
    "Nepali": "Népalais",
 | 
					    "Nepali": "Népalais",
 | 
				
			||||||
  "Norwegian": "Norvégien",
 | 
					    "Norwegian Bokmål": "Norvégien",
 | 
				
			||||||
    "Nyanja": "Nyanja",
 | 
					    "Nyanja": "Nyanja",
 | 
				
			||||||
    "Pashto": "Pachtou",
 | 
					    "Pashto": "Pachtou",
 | 
				
			||||||
    "Persian": "Persan",
 | 
					    "Persian": "Persan",
 | 
				
			||||||
@ -273,9 +292,10 @@
 | 
				
			|||||||
    "Fallback comments: ": "Fallback comments: ",
 | 
					    "Fallback comments: ": "Fallback comments: ",
 | 
				
			||||||
    "Popular": "Populaire",
 | 
					    "Popular": "Populaire",
 | 
				
			||||||
    "Top": "Top",
 | 
					    "Top": "Top",
 | 
				
			||||||
  "About": "A Propos",
 | 
					    "About": "À propos",
 | 
				
			||||||
    "Rating: ": "Évaluation : ",
 | 
					    "Rating: ": "Évaluation : ",
 | 
				
			||||||
    "Language: ": "Langue : ",
 | 
					    "Language: ": "Langue : ",
 | 
				
			||||||
 | 
					    "View as playlist": "Voir en tant que liste de lecture",
 | 
				
			||||||
    "Default": "Défaut",
 | 
					    "Default": "Défaut",
 | 
				
			||||||
    "Music": "Musique",
 | 
					    "Music": "Musique",
 | 
				
			||||||
    "Gaming": "Jeux Vidéo",
 | 
					    "Gaming": "Jeux Vidéo",
 | 
				
			||||||
@ -285,11 +305,11 @@
 | 
				
			|||||||
    "Download as: ": "Télécharger en : ",
 | 
					    "Download as: ": "Télécharger en : ",
 | 
				
			||||||
    "%A %B %-d, %Y": "%A %-d %B %Y",
 | 
					    "%A %B %-d, %Y": "%A %-d %B %Y",
 | 
				
			||||||
    "(edited)": "(modifié)",
 | 
					    "(edited)": "(modifié)",
 | 
				
			||||||
  "Youtube permalink of the comment": "Lien YouTube permanent vers le commentaire",
 | 
					    "YouTube comment permalink": "Lien YouTube permanent vers le commentaire",
 | 
				
			||||||
    "`x` marked it with a ❤": "`x` l'a marqué d'un ❤",
 | 
					    "`x` marked it with a ❤": "`x` l'a marqué d'un ❤",
 | 
				
			||||||
    "Audio mode": "Mode Audio",
 | 
					    "Audio mode": "Mode Audio",
 | 
				
			||||||
    "Video mode": "Mode Vidéo",
 | 
					    "Video mode": "Mode Vidéo",
 | 
				
			||||||
    "Videos": "Vidéos",
 | 
					    "Videos": "Vidéos",
 | 
				
			||||||
    "Playlists": "Liste de lecture",
 | 
					    "Playlists": "Liste de lecture",
 | 
				
			||||||
  "Current version: ": "Version :"
 | 
					    "Current version: ": "Version actuelle : "
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -5,15 +5,20 @@
 | 
				
			|||||||
    "Shared `x` ago": "Condiviso `x` fa",
 | 
					    "Shared `x` ago": "Condiviso `x` fa",
 | 
				
			||||||
    "Unsubscribe": "Disiscriviti",
 | 
					    "Unsubscribe": "Disiscriviti",
 | 
				
			||||||
    "Subscribe": "Iscriviti",
 | 
					    "Subscribe": "Iscriviti",
 | 
				
			||||||
  "Login to subscribe to `x`": "Accedi per iscriverti a `x`",
 | 
					 | 
				
			||||||
    "View channel on YouTube": "Vedi canale su YouTube",
 | 
					    "View channel on YouTube": "Vedi canale su YouTube",
 | 
				
			||||||
 | 
					    "View playlist on YouTube": "",
 | 
				
			||||||
    "newest": "Data di aggiunta (più recente)",
 | 
					    "newest": "Data di aggiunta (più recente)",
 | 
				
			||||||
    "oldest": "Data di aggiunta (più vecchia)",
 | 
					    "oldest": "Data di aggiunta (più vecchia)",
 | 
				
			||||||
    "popular": "Tendenze",
 | 
					    "popular": "Tendenze",
 | 
				
			||||||
  "last": "",
 | 
					    "last": "durare",
 | 
				
			||||||
    "Next page": "Pagina successiva",
 | 
					    "Next page": "Pagina successiva",
 | 
				
			||||||
    "Previous page": "Pagina precedente",
 | 
					    "Previous page": "Pagina precedente",
 | 
				
			||||||
    "Clear watch history?": "Sei sicuro di voler cancellare la cronologia dei video guardati?",
 | 
					    "Clear watch history?": "Sei sicuro di voler cancellare la cronologia dei video guardati?",
 | 
				
			||||||
 | 
					    "New password": "Nuova password",
 | 
				
			||||||
 | 
					    "New passwords must match": "Le nuove password devono corrispondere",
 | 
				
			||||||
 | 
					    "Cannot change password for Google accounts": "Non è possibile modificare la password per gli account Google",
 | 
				
			||||||
 | 
					    "Authorize token?": "Autorizzare gettone?",
 | 
				
			||||||
 | 
					    "Authorize token for `x`?": "",
 | 
				
			||||||
    "Yes": "Si",
 | 
					    "Yes": "Si",
 | 
				
			||||||
    "No": "No",
 | 
					    "No": "No",
 | 
				
			||||||
    "Import and Export Data": "Importazione ed esportazione dati",
 | 
					    "Import and Export Data": "Importazione ed esportazione dati",
 | 
				
			||||||
@ -32,22 +37,23 @@
 | 
				
			|||||||
    "An alternative front-end to YouTube": "Un'interfaccia alternativa per YouTube",
 | 
					    "An alternative front-end to YouTube": "Un'interfaccia alternativa per YouTube",
 | 
				
			||||||
    "JavaScript license information": "Info licenze JavaScript",
 | 
					    "JavaScript license information": "Info licenze JavaScript",
 | 
				
			||||||
    "source": "sorgente",
 | 
					    "source": "sorgente",
 | 
				
			||||||
  "Login": "Entra",
 | 
					    "Log in": "Entra",
 | 
				
			||||||
  "Login/Register": "Entra/Registrati",
 | 
					    "Log in/register": "Entra/Registrati",
 | 
				
			||||||
  "Login to Google": "Entra con Google",
 | 
					    "Log in with Google": "Entra con Google",
 | 
				
			||||||
  "User ID:": "ID utente:",
 | 
					    "User ID": "ID utente",
 | 
				
			||||||
  "Password:": "Password:",
 | 
					    "Password": "Password",
 | 
				
			||||||
    "Time (h:mm:ss):": "Orario (h:mm:ss):",
 | 
					    "Time (h:mm:ss):": "Orario (h:mm:ss):",
 | 
				
			||||||
    "Text CAPTCHA": "Testo del CAPTCHA",
 | 
					    "Text CAPTCHA": "Testo del CAPTCHA",
 | 
				
			||||||
    "Image CAPTCHA": "Immagine CAPTCHA",
 | 
					    "Image CAPTCHA": "Immagine CAPTCHA",
 | 
				
			||||||
    "Sign In": "Entra",
 | 
					    "Sign In": "Entra",
 | 
				
			||||||
    "Register": "Registrati",
 | 
					    "Register": "Registrati",
 | 
				
			||||||
  "Email:": "Email:",
 | 
					    "E-mail": "Email",
 | 
				
			||||||
  "Google verification code:": "Codice di verifica Google:",
 | 
					    "Google verification code": "Codice di verifica Google",
 | 
				
			||||||
    "Preferences": "Preferenze",
 | 
					    "Preferences": "Preferenze",
 | 
				
			||||||
    "Player preferences": "Preferenze del riproduttore",
 | 
					    "Player preferences": "Preferenze del riproduttore",
 | 
				
			||||||
    "Always loop: ": "Ripeti sempre: ",
 | 
					    "Always loop: ": "Ripeti sempre: ",
 | 
				
			||||||
    "Autoplay: ": "Riproduzione automatica: ",
 | 
					    "Autoplay: ": "Riproduzione automatica: ",
 | 
				
			||||||
 | 
					    "Play next by default: ": "Riproduzione successiva per impostazione predefinita: ",
 | 
				
			||||||
    "Autoplay next video: ": "Riproduci automaticamente il prossimo video: ",
 | 
					    "Autoplay next video: ": "Riproduci automaticamente il prossimo video: ",
 | 
				
			||||||
    "Listen by default: ": "Modalità solo audio come predefinita: ",
 | 
					    "Listen by default: ": "Modalità solo audio come predefinita: ",
 | 
				
			||||||
    "Proxy videos? ": "",
 | 
					    "Proxy videos? ": "",
 | 
				
			||||||
@ -55,13 +61,17 @@
 | 
				
			|||||||
    "Preferred video quality: ": "Preferenza sulla qualità video: ",
 | 
					    "Preferred video quality: ": "Preferenza sulla qualità video: ",
 | 
				
			||||||
    "Player volume: ": "Volume di riproduzione: ",
 | 
					    "Player volume: ": "Volume di riproduzione: ",
 | 
				
			||||||
    "Default comments: ": "Origine dei commenti: ",
 | 
					    "Default comments: ": "Origine dei commenti: ",
 | 
				
			||||||
 | 
					    "youtube": "",
 | 
				
			||||||
 | 
					    "reddit": "",
 | 
				
			||||||
    "Default captions: ": "Sottotitoli predefiniti: ",
 | 
					    "Default captions: ": "Sottotitoli predefiniti: ",
 | 
				
			||||||
    "Fallback captions: ": "Sottotitoli alternativi: ",
 | 
					    "Fallback captions: ": "Sottotitoli alternativi: ",
 | 
				
			||||||
    "Show related videos? ": "Mostra video correlati? ",
 | 
					    "Show related videos? ": "Mostra video correlati? ",
 | 
				
			||||||
 | 
					    "Show annotations by default? ": "Mostra le annotazioni per impostazione predefinita? ",
 | 
				
			||||||
    "Visual preferences": "Preferenze grafiche",
 | 
					    "Visual preferences": "Preferenze grafiche",
 | 
				
			||||||
    "Dark mode: ": "Tema scuro: ",
 | 
					    "Dark mode: ": "Tema scuro: ",
 | 
				
			||||||
    "Thin mode: ": "Modalità per connessioni lente: ",
 | 
					    "Thin mode: ": "Modalità per connessioni lente: ",
 | 
				
			||||||
    "Subscription preferences": "Preferenze iscrizioni",
 | 
					    "Subscription preferences": "Preferenze iscrizioni",
 | 
				
			||||||
 | 
					    "Show annotations by default for subscribed channels? ": "",
 | 
				
			||||||
    "Redirect homepage to feed: ": "Reindirizza la pagina principale a quella delle iscrizioni: ",
 | 
					    "Redirect homepage to feed: ": "Reindirizza la pagina principale a quella delle iscrizioni: ",
 | 
				
			||||||
    "Number of videos shown in feed: ": "Numero di video da mostrare nelle iscrizioni: ",
 | 
					    "Number of videos shown in feed: ": "Numero di video da mostrare nelle iscrizioni: ",
 | 
				
			||||||
    "Sort videos by: ": "Ordinare i video per: ",
 | 
					    "Sort videos by: ": "Ordinare i video per: ",
 | 
				
			||||||
@ -77,8 +87,10 @@
 | 
				
			|||||||
    "Only show notifications (if there are any): ": "Mostra solo le notifiche (se presenti): ",
 | 
					    "Only show notifications (if there are any): ": "Mostra solo le notifiche (se presenti): ",
 | 
				
			||||||
    "Data preferences": "Preferenze dati",
 | 
					    "Data preferences": "Preferenze dati",
 | 
				
			||||||
    "Clear watch history": "Cancella la cronologia dei video guardati",
 | 
					    "Clear watch history": "Cancella la cronologia dei video guardati",
 | 
				
			||||||
  "Import/Export data": "Importazione/esportazione dati",
 | 
					    "Import/export data": "Importazione/esportazione dati",
 | 
				
			||||||
 | 
					    "Change password": "",
 | 
				
			||||||
    "Manage subscriptions": "Gestisci le iscrizioni",
 | 
					    "Manage subscriptions": "Gestisci le iscrizioni",
 | 
				
			||||||
 | 
					    "Manage tokens": "",
 | 
				
			||||||
    "Watch history": "Cronologia dei video",
 | 
					    "Watch history": "Cronologia dei video",
 | 
				
			||||||
    "Delete account": "Elimina l'account",
 | 
					    "Delete account": "Elimina l'account",
 | 
				
			||||||
    "Administrator preferences": "",
 | 
					    "Administrator preferences": "",
 | 
				
			||||||
@ -91,20 +103,26 @@
 | 
				
			|||||||
    "Report statistics? ": "",
 | 
					    "Report statistics? ": "",
 | 
				
			||||||
    "Save preferences": "Salva le preferenze",
 | 
					    "Save preferences": "Salva le preferenze",
 | 
				
			||||||
    "Subscription manager": "Gestisci le iscrizioni",
 | 
					    "Subscription manager": "Gestisci le iscrizioni",
 | 
				
			||||||
 | 
					    "Token manager": "",
 | 
				
			||||||
 | 
					    "Token": "",
 | 
				
			||||||
    "`x` subscriptions": "`x` iscrizioni",
 | 
					    "`x` subscriptions": "`x` iscrizioni",
 | 
				
			||||||
  "Import/Export": "Importa/esporta",
 | 
					    "`x` tokens": "",
 | 
				
			||||||
 | 
					    "Import/export": "Importa/esporta",
 | 
				
			||||||
    "unsubscribe": "disiscriviti",
 | 
					    "unsubscribe": "disiscriviti",
 | 
				
			||||||
 | 
					    "revoke": "",
 | 
				
			||||||
    "Subscriptions": "Iscrizioni",
 | 
					    "Subscriptions": "Iscrizioni",
 | 
				
			||||||
    "`x` unseen notifications": "`x` notifiche non visualizzate",
 | 
					    "`x` unseen notifications": "`x` notifiche non visualizzate",
 | 
				
			||||||
    "search": "Cerca",
 | 
					    "search": "Cerca",
 | 
				
			||||||
  "Sign out": "Esci",
 | 
					    "Log out": "Esci",
 | 
				
			||||||
    "Released under the AGPLv3 by Omar Roth.": "Pubblicato con licenza AGPLv3 da Omar Roth.",
 | 
					    "Released under the AGPLv3 by Omar Roth.": "Pubblicato con licenza AGPLv3 da Omar Roth.",
 | 
				
			||||||
    "Source available here.": "Codice sorgente.",
 | 
					    "Source available here.": "Codice sorgente.",
 | 
				
			||||||
    "View JavaScript license information.": "Guarda le informazioni di licenza del codice JavaScript.",
 | 
					    "View JavaScript license information.": "Guarda le informazioni di licenza del codice JavaScript.",
 | 
				
			||||||
    "View privacy policy.": "",
 | 
					    "View privacy policy.": "",
 | 
				
			||||||
    "Trending": "Tendenze",
 | 
					    "Trending": "Tendenze",
 | 
				
			||||||
    "Unlisted": "",
 | 
					    "Unlisted": "",
 | 
				
			||||||
  "Watch video on Youtube": "Guarda il video su YouTube",
 | 
					    "Watch on YouTube": "Guarda il video su YouTube",
 | 
				
			||||||
 | 
					    "Hide annotations": "",
 | 
				
			||||||
 | 
					    "Show annotations": "",
 | 
				
			||||||
    "Genre: ": "Genere: ",
 | 
					    "Genre: ": "Genere: ",
 | 
				
			||||||
    "License: ": "Licenza: ",
 | 
					    "License: ": "Licenza: ",
 | 
				
			||||||
    "Family friendly? ": "Per tutti? ",
 | 
					    "Family friendly? ": "Per tutti? ",
 | 
				
			||||||
@ -113,8 +131,9 @@
 | 
				
			|||||||
    "Whitelisted regions: ": "Regioni nella lista bianca: ",
 | 
					    "Whitelisted regions: ": "Regioni nella lista bianca: ",
 | 
				
			||||||
    "Blacklisted regions: ": "Regioni nella lista nera: ",
 | 
					    "Blacklisted regions: ": "Regioni nella lista nera: ",
 | 
				
			||||||
    "Shared `x`": "Condiviso `x`",
 | 
					    "Shared `x`": "Condiviso `x`",
 | 
				
			||||||
 | 
					    "`x` views": "",
 | 
				
			||||||
    "Premieres in `x`": "",
 | 
					    "Premieres in `x`": "",
 | 
				
			||||||
  "Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.": "Ciao! Sembra che tu abbia disattivato JavaScript. Clicca qui per visualizzare i commenti. Considera che potrebbe volerci più tempo.",
 | 
					    "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.": "Ciao! Sembra che tu abbia disattivato JavaScript. Clicca qui per visualizzare i commenti. Considera che potrebbe volerci più tempo.",
 | 
				
			||||||
    "View YouTube comments": "Visualizza i commenti da YouTube",
 | 
					    "View YouTube comments": "Visualizza i commenti da YouTube",
 | 
				
			||||||
    "View more comments on Reddit": "Visualizza più commenti su Reddit",
 | 
					    "View more comments on Reddit": "Visualizza più commenti su Reddit",
 | 
				
			||||||
    "View `x` comments": "Visualizza `x` commenti",
 | 
					    "View `x` comments": "Visualizza `x` commenti",
 | 
				
			||||||
@ -123,19 +142,19 @@
 | 
				
			|||||||
    "Show replies": "Mostra le risposte",
 | 
					    "Show replies": "Mostra le risposte",
 | 
				
			||||||
    "Incorrect password": "Password sbagliata",
 | 
					    "Incorrect password": "Password sbagliata",
 | 
				
			||||||
    "Quota exceeded, try again in a few hours": "Limite superato, prova di nuovo fra qualche ora",
 | 
					    "Quota exceeded, try again in a few hours": "Limite superato, prova di nuovo fra qualche ora",
 | 
				
			||||||
  "Unable to login, make sure two-factor authentication (Authenticator or SMS) is enabled.": "Impossibile autenticarsi, controlla che l'autenticazione in due passaggi (Authenticator o SMS) sia attiva.",
 | 
					    "Unable to log in, make sure two-factor authentication (Authenticator or SMS) is turned on.": "Impossibile autenticarsi, controlla che l'autenticazione in due passaggi (Authenticator o SMS) sia attiva.",
 | 
				
			||||||
    "Invalid TFA code": "Codice di autenticazione a due fattori non valido",
 | 
					    "Invalid TFA code": "Codice di autenticazione a due fattori non valido",
 | 
				
			||||||
  "Login failed. This may be because two-factor authentication is not enabled on your account.": "Login fallito. L'errore potrebbe essere causato dal fatto che la verifica in due passaggi non è attiva sul tuo account.",
 | 
					    "Login failed. This may be because two-factor authentication is not turned on for your account.": "Login fallito. L'errore potrebbe essere causato dal fatto che la verifica in due passaggi non è attiva sul tuo account.",
 | 
				
			||||||
  "Invalid answer": "Risposta errata",
 | 
					    "Wrong answer": "Risposta errata",
 | 
				
			||||||
  "Invalid CAPTCHA": "CAPTCHA errato",
 | 
					    "Erroneous CAPTCHA": "CAPTCHA errato",
 | 
				
			||||||
    "CAPTCHA is a required field": "Il CAPTCHA è un campo obbligatorio",
 | 
					    "CAPTCHA is a required field": "Il CAPTCHA è un campo obbligatorio",
 | 
				
			||||||
    "User ID is a required field": "L'ID utente è obbligatorio",
 | 
					    "User ID is a required field": "L'ID utente è obbligatorio",
 | 
				
			||||||
    "Password is a required field": "La password è un campo obbligatorio",
 | 
					    "Password is a required field": "La password è un campo obbligatorio",
 | 
				
			||||||
  "Invalid username or password": "Nome utente o password errati",
 | 
					    "Wrong username or password": "Nome utente o password errati",
 | 
				
			||||||
  "Please sign in using 'Sign in with Google'": "Per favore accedi con \"Entra con Google\"",
 | 
					    "Please sign in using 'Log in with Google'": "Per favore accedi con \"Entra con Google\"",
 | 
				
			||||||
    "Password cannot be empty": "La password non può essere vuota",
 | 
					    "Password cannot be empty": "La password non può essere vuota",
 | 
				
			||||||
    "Password cannot be longer than 55 characters": "La password non può contenere più di 55 caratteri",
 | 
					    "Password cannot be longer than 55 characters": "La password non può contenere più di 55 caratteri",
 | 
				
			||||||
  "Please sign in": "Per favore, entra",
 | 
					    "Please log in": "Per favore, entra",
 | 
				
			||||||
    "Invidious Private Feed for `x`": "Feed privato Invidious per `x`",
 | 
					    "Invidious Private Feed for `x`": "Feed privato Invidious per `x`",
 | 
				
			||||||
    "channel:`x`": "canale:`x`",
 | 
					    "channel:`x`": "canale:`x`",
 | 
				
			||||||
    "Deleted or invalid channel": "Canale cancellato o invalido",
 | 
					    "Deleted or invalid channel": "Canale cancellato o invalido",
 | 
				
			||||||
@ -147,15 +166,15 @@
 | 
				
			|||||||
    "Load more": "Carica altro",
 | 
					    "Load more": "Carica altro",
 | 
				
			||||||
    "`x` points": "`x` punti",
 | 
					    "`x` points": "`x` punti",
 | 
				
			||||||
    "Could not create mix.": "Impossibile creare il mix.",
 | 
					    "Could not create mix.": "Impossibile creare il mix.",
 | 
				
			||||||
  "Playlist is empty": "Playlist vuota",
 | 
					    "Empty playlist": "Playlist vuota",
 | 
				
			||||||
  "Invalid playlist.": "Playlist invalida.",
 | 
					    "Not a playlist.": "Playlist invalida.",
 | 
				
			||||||
    "Playlist does not exist.": "Playlist inesistente.",
 | 
					    "Playlist does not exist.": "Playlist inesistente.",
 | 
				
			||||||
    "Could not pull trending pages.": "Impossibile recuperare le tendenze.",
 | 
					    "Could not pull trending pages.": "Impossibile recuperare le tendenze.",
 | 
				
			||||||
    "Hidden field \"challenge\" is a required field": "Il campo nascosto \"challenge\" è obbligatorio",
 | 
					    "Hidden field \"challenge\" is a required field": "Il campo nascosto \"challenge\" è obbligatorio",
 | 
				
			||||||
    "Hidden field \"token\" is a required field": "Il campo nascosto \"token\" è obbligatorio",
 | 
					    "Hidden field \"token\" is a required field": "Il campo nascosto \"token\" è obbligatorio",
 | 
				
			||||||
  "Invalid challenge": "Campo \"challenge\" invalido",
 | 
					    "Erroneous challenge": "Campo \"challenge\" invalido",
 | 
				
			||||||
  "Invalid token": "Campo \"token\" invalido",
 | 
					    "Erroneous token": "Campo \"token\" invalido",
 | 
				
			||||||
  "Invalid user": "Utente invalido",
 | 
					    "No such user": "Utente invalido",
 | 
				
			||||||
    "Token is expired, please try again": "Token scaduto, riprova",
 | 
					    "Token is expired, please try again": "Token scaduto, riprova",
 | 
				
			||||||
    "English": "Inglese",
 | 
					    "English": "Inglese",
 | 
				
			||||||
    "English (auto-generated)": "Inglese (generati automaticamente)",
 | 
					    "English (auto-generated)": "Inglese (generati automaticamente)",
 | 
				
			||||||
@ -224,7 +243,7 @@
 | 
				
			|||||||
    "Marathi": "Marathi",
 | 
					    "Marathi": "Marathi",
 | 
				
			||||||
    "Mongolian": "Mongolo",
 | 
					    "Mongolian": "Mongolo",
 | 
				
			||||||
    "Nepali": "Nepalese",
 | 
					    "Nepali": "Nepalese",
 | 
				
			||||||
  "Norwegian": "Norvegese",
 | 
					    "Norwegian Bokmål": "Norvegese",
 | 
				
			||||||
    "Nyanja": "Nyanja",
 | 
					    "Nyanja": "Nyanja",
 | 
				
			||||||
    "Pashto": "Lingua pashtu",
 | 
					    "Pashto": "Lingua pashtu",
 | 
				
			||||||
    "Persian": "Persiano",
 | 
					    "Persian": "Persiano",
 | 
				
			||||||
@ -276,6 +295,7 @@
 | 
				
			|||||||
    "About": "A proposito",
 | 
					    "About": "A proposito",
 | 
				
			||||||
    "Rating: ": "Punteggio: ",
 | 
					    "Rating: ": "Punteggio: ",
 | 
				
			||||||
    "Language: ": "Lingua: ",
 | 
					    "Language: ": "Lingua: ",
 | 
				
			||||||
 | 
					    "View as playlist": "",
 | 
				
			||||||
    "Default": "Predefinito",
 | 
					    "Default": "Predefinito",
 | 
				
			||||||
    "Music": "Musica",
 | 
					    "Music": "Musica",
 | 
				
			||||||
    "Gaming": "Videogiochi",
 | 
					    "Gaming": "Videogiochi",
 | 
				
			||||||
@ -285,7 +305,7 @@
 | 
				
			|||||||
    "Download as: ": "Scarica come: ",
 | 
					    "Download as: ": "Scarica come: ",
 | 
				
			||||||
    "%A %B %-d, %Y": "%A %-d %B %Y",
 | 
					    "%A %B %-d, %Y": "%A %-d %B %Y",
 | 
				
			||||||
    "(edited)": "(modificato)",
 | 
					    "(edited)": "(modificato)",
 | 
				
			||||||
  "Youtube permalink of the comment": "Link permanente al commento di YouTube",
 | 
					    "YouTube comment permalink": "Link permanente al commento di YouTube",
 | 
				
			||||||
    "`x` marked it with a ❤": "`x` l'ha contrassegnato con un ❤",
 | 
					    "`x` marked it with a ❤": "`x` l'ha contrassegnato con un ❤",
 | 
				
			||||||
    "Audio mode": "Modalità audio",
 | 
					    "Audio mode": "Modalità audio",
 | 
				
			||||||
    "Video mode": "Modalità video",
 | 
					    "Video mode": "Modalità video",
 | 
				
			||||||
 | 
				
			|||||||
@ -5,8 +5,8 @@
 | 
				
			|||||||
    "Shared `x` ago": "Delt for `x` siden",
 | 
					    "Shared `x` ago": "Delt for `x` siden",
 | 
				
			||||||
    "Unsubscribe": "Opphev abonnement",
 | 
					    "Unsubscribe": "Opphev abonnement",
 | 
				
			||||||
    "Subscribe": "Abonner",
 | 
					    "Subscribe": "Abonner",
 | 
				
			||||||
  "Login to subscribe to `x`": "Logg inn for å abonnere på `x`",
 | 
					 | 
				
			||||||
    "View channel on YouTube": "Vis kanal på YouTube",
 | 
					    "View channel on YouTube": "Vis kanal på YouTube",
 | 
				
			||||||
 | 
					    "View playlist on YouTube": "",
 | 
				
			||||||
    "newest": "nyeste",
 | 
					    "newest": "nyeste",
 | 
				
			||||||
    "oldest": "eldste",
 | 
					    "oldest": "eldste",
 | 
				
			||||||
    "popular": "populært",
 | 
					    "popular": "populært",
 | 
				
			||||||
@ -14,6 +14,11 @@
 | 
				
			|||||||
    "Next page": "Neste side",
 | 
					    "Next page": "Neste side",
 | 
				
			||||||
    "Previous page": "Forrige side",
 | 
					    "Previous page": "Forrige side",
 | 
				
			||||||
    "Clear watch history?": "Tøm visningshistorikk?",
 | 
					    "Clear watch history?": "Tøm visningshistorikk?",
 | 
				
			||||||
 | 
					    "New password": "Nytt passord",
 | 
				
			||||||
 | 
					    "New passwords must match": "Nye passordfelter må stemme overens",
 | 
				
			||||||
 | 
					    "Cannot change password for Google accounts": "Kan ikke endre passord for Google-kontoer",
 | 
				
			||||||
 | 
					    "Authorize token?": "Identitetsbekreft symbol?",
 | 
				
			||||||
 | 
					    "Authorize token for `x`?": "Identitetsbekreft symbol for `x`?",
 | 
				
			||||||
    "Yes": "Ja",
 | 
					    "Yes": "Ja",
 | 
				
			||||||
    "No": "Nei",
 | 
					    "No": "Nei",
 | 
				
			||||||
    "Import and Export Data": "Importer- og eksporter data",
 | 
					    "Import and Export Data": "Importer- og eksporter data",
 | 
				
			||||||
@ -32,36 +37,41 @@
 | 
				
			|||||||
    "An alternative front-end to YouTube": "En alternativ grenseflate for YouTube",
 | 
					    "An alternative front-end to YouTube": "En alternativ grenseflate for YouTube",
 | 
				
			||||||
    "JavaScript license information": "JavaScript-lisensinformasjon",
 | 
					    "JavaScript license information": "JavaScript-lisensinformasjon",
 | 
				
			||||||
    "source": "kilde",
 | 
					    "source": "kilde",
 | 
				
			||||||
  "Login": "Logg inn",
 | 
					    "Log in": "Logg inn",
 | 
				
			||||||
  "Login/Register": "Logg inn/registrer",
 | 
					    "Log in/register": "Logg inn/registrer",
 | 
				
			||||||
  "Login to Google": "Logg inn med Google",
 | 
					    "Log in with Google": "Logg inn med Google",
 | 
				
			||||||
  "User ID:": "Bruker-ID:",
 | 
					    "User ID": "Bruker-ID",
 | 
				
			||||||
  "Password:": "Passord:",
 | 
					    "Password": "Passord",
 | 
				
			||||||
    "Time (h:mm:ss):": "Tid (h:mm:ss):",
 | 
					    "Time (h:mm:ss):": "Tid (h:mm:ss):",
 | 
				
			||||||
    "Text CAPTCHA": "Tekst-CAPTCHA",
 | 
					    "Text CAPTCHA": "Tekst-CAPTCHA",
 | 
				
			||||||
    "Image CAPTCHA": "Bilde-CAPTCHA",
 | 
					    "Image CAPTCHA": "Bilde-CAPTCHA",
 | 
				
			||||||
    "Sign In": "Innlogging",
 | 
					    "Sign In": "Innlogging",
 | 
				
			||||||
    "Register": "Registrer",
 | 
					    "Register": "Registrer",
 | 
				
			||||||
  "Email:": "E-post:",
 | 
					    "E-mail": "E-post",
 | 
				
			||||||
  "Google verification code:": "Google-bekreftelseskode:",
 | 
					    "Google verification code": "Google-bekreftelseskode",
 | 
				
			||||||
    "Preferences": "Innstillinger",
 | 
					    "Preferences": "Innstillinger",
 | 
				
			||||||
    "Player preferences": "Avspillerinnstillinger",
 | 
					    "Player preferences": "Avspillerinnstillinger",
 | 
				
			||||||
    "Always loop: ": "Alltid gjenta: ",
 | 
					    "Always loop: ": "Alltid gjenta: ",
 | 
				
			||||||
    "Autoplay: ": "Autoavspilling: ",
 | 
					    "Autoplay: ": "Autoavspilling: ",
 | 
				
			||||||
 | 
					    "Play next by default: ": "Spill neste som forvalg: ",
 | 
				
			||||||
    "Autoplay next video: ": "Autospill neste video: ",
 | 
					    "Autoplay next video: ": "Autospill neste video: ",
 | 
				
			||||||
    "Listen by default: ": "Lytt som forvalg: ",
 | 
					    "Listen by default: ": "Lytt som forvalg: ",
 | 
				
			||||||
  "Proxy videos? ": "",
 | 
					    "Proxy videos? ": "Mellomtjen videoer? ",
 | 
				
			||||||
    "Default speed: ": "Forvalgt hastighet: ",
 | 
					    "Default speed: ": "Forvalgt hastighet: ",
 | 
				
			||||||
    "Preferred video quality: ": "Foretrukket videokvalitet: ",
 | 
					    "Preferred video quality: ": "Foretrukket videokvalitet: ",
 | 
				
			||||||
    "Player volume: ": "Avspillerlydstyrke: ",
 | 
					    "Player volume: ": "Avspillerlydstyrke: ",
 | 
				
			||||||
    "Default comments: ": "Forvalgte kommentarer: ",
 | 
					    "Default comments: ": "Forvalgte kommentarer: ",
 | 
				
			||||||
 | 
					    "youtube": "YouTube",
 | 
				
			||||||
 | 
					    "reddit": "Reddit",
 | 
				
			||||||
    "Default captions: ": "Forvalgte undertitler: ",
 | 
					    "Default captions: ": "Forvalgte undertitler: ",
 | 
				
			||||||
    "Fallback captions: ": "Tilbakefallsundertitler: ",
 | 
					    "Fallback captions: ": "Tilbakefallsundertitler: ",
 | 
				
			||||||
    "Show related videos? ": "Vis relaterte videoer? ",
 | 
					    "Show related videos? ": "Vis relaterte videoer? ",
 | 
				
			||||||
 | 
					    "Show annotations by default? ": "Vis merknader som forvalg? ",
 | 
				
			||||||
    "Visual preferences": "Visuelle innstillinger",
 | 
					    "Visual preferences": "Visuelle innstillinger",
 | 
				
			||||||
    "Dark mode: ": "Mørk drakt: ",
 | 
					    "Dark mode: ": "Mørk drakt: ",
 | 
				
			||||||
    "Thin mode: ": "Tynt modus: ",
 | 
					    "Thin mode: ": "Tynt modus: ",
 | 
				
			||||||
    "Subscription preferences": "Abonnementsinnstillinger",
 | 
					    "Subscription preferences": "Abonnementsinnstillinger",
 | 
				
			||||||
 | 
					    "Show annotations by default for subscribed channels? ": "Vis merknader som forvalg for kanaler det abonneres på? ",
 | 
				
			||||||
    "Redirect homepage to feed: ": "Videresend hjemmeside til flyt: ",
 | 
					    "Redirect homepage to feed: ": "Videresend hjemmeside til flyt: ",
 | 
				
			||||||
    "Number of videos shown in feed: ": "Antall videoer å vise i flyt: ",
 | 
					    "Number of videos shown in feed: ": "Antall videoer å vise i flyt: ",
 | 
				
			||||||
    "Sort videos by: ": "Sorter videoer etter: ",
 | 
					    "Sort videos by: ": "Sorter videoer etter: ",
 | 
				
			||||||
@ -77,8 +87,10 @@
 | 
				
			|||||||
    "Only show notifications (if there are any): ": "Kun vis merknader (hvis det er noen): ",
 | 
					    "Only show notifications (if there are any): ": "Kun vis merknader (hvis det er noen): ",
 | 
				
			||||||
    "Data preferences": "Datainnstillinger",
 | 
					    "Data preferences": "Datainnstillinger",
 | 
				
			||||||
    "Clear watch history": "Tøm visningshistorikk",
 | 
					    "Clear watch history": "Tøm visningshistorikk",
 | 
				
			||||||
  "Import/Export data": "Importer/eksporter data",
 | 
					    "Import/export data": "Importer/eksporter data",
 | 
				
			||||||
 | 
					    "Change password": "Endre passord",
 | 
				
			||||||
    "Manage subscriptions": "Behandle abonnementer",
 | 
					    "Manage subscriptions": "Behandle abonnementer",
 | 
				
			||||||
 | 
					    "Manage tokens": "Behandle symboler",
 | 
				
			||||||
    "Watch history": "Visningshistorikk",
 | 
					    "Watch history": "Visningshistorikk",
 | 
				
			||||||
    "Delete account": "Slett konto",
 | 
					    "Delete account": "Slett konto",
 | 
				
			||||||
    "Administrator preferences": "Administratorinnstillinger",
 | 
					    "Administrator preferences": "Administratorinnstillinger",
 | 
				
			||||||
@ -91,20 +103,26 @@
 | 
				
			|||||||
    "Report statistics? ": "Innrapporter statistikk? ",
 | 
					    "Report statistics? ": "Innrapporter statistikk? ",
 | 
				
			||||||
    "Save preferences": "Lagre innstillinger",
 | 
					    "Save preferences": "Lagre innstillinger",
 | 
				
			||||||
    "Subscription manager": "Abonnementsbehandler",
 | 
					    "Subscription manager": "Abonnementsbehandler",
 | 
				
			||||||
 | 
					    "Token manager": "Symbolbehandler",
 | 
				
			||||||
 | 
					    "Token": "Symbol",
 | 
				
			||||||
    "`x` subscriptions": "`x` abonnementer",
 | 
					    "`x` subscriptions": "`x` abonnementer",
 | 
				
			||||||
  "Import/Export": "Importer/eksporter",
 | 
					    "`x` tokens": "`x` symboler",
 | 
				
			||||||
 | 
					    "Import/export": "Importer/eksporter",
 | 
				
			||||||
    "unsubscribe": "opphev abonnement",
 | 
					    "unsubscribe": "opphev abonnement",
 | 
				
			||||||
 | 
					    "revoke": "tilbakekall",
 | 
				
			||||||
    "Subscriptions": "Abonnement",
 | 
					    "Subscriptions": "Abonnement",
 | 
				
			||||||
    "`x` unseen notifications": "`x` usette merknader",
 | 
					    "`x` unseen notifications": "`x` usette merknader",
 | 
				
			||||||
    "search": "søk",
 | 
					    "search": "søk",
 | 
				
			||||||
  "Sign out": "Logg ut",
 | 
					    "Log out": "Logg ut",
 | 
				
			||||||
    "Released under the AGPLv3 by Omar Roth.": "Utgitt med AGPLv3+lisens av Omar Roth.",
 | 
					    "Released under the AGPLv3 by Omar Roth.": "Utgitt med AGPLv3+lisens av Omar Roth.",
 | 
				
			||||||
    "Source available here.": "Kildekode tilgjengelig her.",
 | 
					    "Source available here.": "Kildekode tilgjengelig her.",
 | 
				
			||||||
    "View JavaScript license information.": "Vis JavaScript-lisensinfo.",
 | 
					    "View JavaScript license information.": "Vis JavaScript-lisensinfo.",
 | 
				
			||||||
  "View privacy policy.": "",
 | 
					    "View privacy policy.": "Vis personvernspraksis.",
 | 
				
			||||||
    "Trending": "Trendsettende",
 | 
					    "Trending": "Trendsettende",
 | 
				
			||||||
  "Unlisted": "",
 | 
					    "Unlisted": "Ulistet",
 | 
				
			||||||
  "Watch video on Youtube": "Vis video på YouTube",
 | 
					    "Watch on YouTube": "Vis video på YouTube",
 | 
				
			||||||
 | 
					    "Hide annotations": "Skjul merknader",
 | 
				
			||||||
 | 
					    "Show annotations": "Vis merknader",
 | 
				
			||||||
    "Genre: ": "Sjanger: ",
 | 
					    "Genre: ": "Sjanger: ",
 | 
				
			||||||
    "License: ": "Lisens: ",
 | 
					    "License: ": "Lisens: ",
 | 
				
			||||||
    "Family friendly? ": "Familievennlig? ",
 | 
					    "Family friendly? ": "Familievennlig? ",
 | 
				
			||||||
@ -113,8 +131,9 @@
 | 
				
			|||||||
    "Whitelisted regions: ": "Hvitlistede regioner: ",
 | 
					    "Whitelisted regions: ": "Hvitlistede regioner: ",
 | 
				
			||||||
    "Blacklisted regions: ": "Svartelistede regioner: ",
 | 
					    "Blacklisted regions: ": "Svartelistede regioner: ",
 | 
				
			||||||
    "Shared `x`": "Delt `x`",
 | 
					    "Shared `x`": "Delt `x`",
 | 
				
			||||||
  "Premieres in `x`": "",
 | 
					    "`x` views": "`x` visninger",
 | 
				
			||||||
  "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.",
 | 
					    "Premieres in `x`": "Premiere om `x`",
 | 
				
			||||||
 | 
					    "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.": "Hei. Det ser ut til at du har JavaScript avslått. Klikk her for å vise kommentarer, ha i minnet at innlasting tar lengre tid.",
 | 
				
			||||||
    "View YouTube comments": "Vis YouTube-kommentarer",
 | 
					    "View YouTube comments": "Vis YouTube-kommentarer",
 | 
				
			||||||
    "View more comments on Reddit": "Vis flere kommenterer på Reddit",
 | 
					    "View more comments on Reddit": "Vis flere kommenterer på Reddit",
 | 
				
			||||||
    "View `x` comments": "Vis `x` kommentarer",
 | 
					    "View `x` comments": "Vis `x` kommentarer",
 | 
				
			||||||
@ -123,19 +142,19 @@
 | 
				
			|||||||
    "Show replies": "Vis svar",
 | 
					    "Show replies": "Vis svar",
 | 
				
			||||||
    "Incorrect password": "Feil passord",
 | 
					    "Incorrect password": "Feil passord",
 | 
				
			||||||
    "Quota exceeded, try again in a few hours": "Kvote overskredet, prøv igjen om et par timer",
 | 
					    "Quota exceeded, try again in a few hours": "Kvote overskredet, prøv igjen om et par timer",
 | 
				
			||||||
  "Unable to login, make sure two-factor authentication (Authenticator or SMS) is enabled.": "Kunne ikke logge inn, forsikre deg om at tofaktor-identitetsbekreftelse (Authenticator eller SMS) er skrudd på.",
 | 
					    "Unable to log in, make sure two-factor authentication (Authenticator or SMS) is turned on.": "Kunne ikke logge inn, forsikre deg om at tofaktor-identitetsbekreftelse (Authenticator eller SMS) er skrudd på.",
 | 
				
			||||||
    "Invalid TFA code": "Ugyldig tofaktorkode",
 | 
					    "Invalid TFA code": "Ugyldig tofaktorkode",
 | 
				
			||||||
  "Login failed. This may be because two-factor authentication is not enabled on your account.": "Innlogging mislyktes. Dette kan være fordi tofaktor-identitetsbekreftelse er skrudd av på kontoen din.",
 | 
					    "Login failed. This may be because two-factor authentication is not turned on for your account.": "Innlogging mislyktes. Dette kan være fordi tofaktor-identitetsbekreftelse er skrudd av på kontoen din.",
 | 
				
			||||||
  "Invalid answer": "Ugyldig svar",
 | 
					    "Wrong answer": "Ugyldig svar",
 | 
				
			||||||
  "Invalid CAPTCHA": "Ugyldig CAPTCHA",
 | 
					    "Erroneous CAPTCHA": "Ugyldig CAPTCHA",
 | 
				
			||||||
    "CAPTCHA is a required field": "CAPTCHA er et påkrevd felt",
 | 
					    "CAPTCHA is a required field": "CAPTCHA er et påkrevd felt",
 | 
				
			||||||
    "User ID is a required field": "Bruker-ID er et påkrevd felt",
 | 
					    "User ID is a required field": "Bruker-ID er et påkrevd felt",
 | 
				
			||||||
    "Password is a required field": "Passord er et påkrevd felt",
 | 
					    "Password is a required field": "Passord er et påkrevd felt",
 | 
				
			||||||
  "Invalid username or password": "Ugyldig brukernavn eller passord",
 | 
					    "Wrong username or password": "Ugyldig brukernavn eller passord",
 | 
				
			||||||
  "Please sign in using 'Sign in with Google'": "Logg inn ved bruk av \"Google-innlogging\"",
 | 
					    "Please sign in using 'Log in with Google'": "Logg inn ved bruk av \"Google-innlogging\"",
 | 
				
			||||||
    "Password cannot be empty": "Passordet kan ikke være tomt",
 | 
					    "Password cannot be empty": "Passordet kan ikke være tomt",
 | 
				
			||||||
    "Password cannot be longer than 55 characters": "Passordet kan ikke være lengre enn 55 tegn",
 | 
					    "Password cannot be longer than 55 characters": "Passordet kan ikke være lengre enn 55 tegn",
 | 
				
			||||||
  "Please sign in": "Logg inn",
 | 
					    "Please log in": "Logg inn",
 | 
				
			||||||
    "Invidious Private Feed for `x`": "Ugyldig privat flyt for `x`",
 | 
					    "Invidious Private Feed for `x`": "Ugyldig privat flyt for `x`",
 | 
				
			||||||
    "channel:`x`": "kanal `x`",
 | 
					    "channel:`x`": "kanal `x`",
 | 
				
			||||||
    "Deleted or invalid channel": "Slettet eller ugyldig kanal",
 | 
					    "Deleted or invalid channel": "Slettet eller ugyldig kanal",
 | 
				
			||||||
@ -147,15 +166,15 @@
 | 
				
			|||||||
    "Load more": "Last inn flere",
 | 
					    "Load more": "Last inn flere",
 | 
				
			||||||
    "`x` points": "`x` poeng",
 | 
					    "`x` points": "`x` poeng",
 | 
				
			||||||
    "Could not create mix.": "Kunne ikke opprette miks.",
 | 
					    "Could not create mix.": "Kunne ikke opprette miks.",
 | 
				
			||||||
  "Playlist is empty": "Spillelisten er tom",
 | 
					    "Empty playlist": "Spillelisten er tom",
 | 
				
			||||||
  "Invalid playlist.": "Ugyldig spilleliste.",
 | 
					    "Not a playlist.": "Ugyldig spilleliste.",
 | 
				
			||||||
    "Playlist does not exist.": "Spillelisten finnes ikke.",
 | 
					    "Playlist does not exist.": "Spillelisten finnes ikke.",
 | 
				
			||||||
    "Could not pull trending pages.": "Kunne ikke hente trendsettende sider.",
 | 
					    "Could not pull trending pages.": "Kunne ikke hente trendsettende sider.",
 | 
				
			||||||
    "Hidden field \"challenge\" is a required field": "Skjult felt \"utfordring\" er et påkrevd felt",
 | 
					    "Hidden field \"challenge\" is a required field": "Skjult felt \"utfordring\" er et påkrevd felt",
 | 
				
			||||||
    "Hidden field \"token\" is a required field": "Skjult felt \"symbol\" er et påkrevd felt",
 | 
					    "Hidden field \"token\" is a required field": "Skjult felt \"symbol\" er et påkrevd felt",
 | 
				
			||||||
  "Invalid challenge": "Ugyldig utfordring",
 | 
					    "Erroneous challenge": "Ugyldig utfordring",
 | 
				
			||||||
  "Invalid token": "Ugyldig symbol",
 | 
					    "Erroneous token": "Ugyldig symbol",
 | 
				
			||||||
  "Invalid user": "Ugyldig bruker",
 | 
					    "No such user": "Ugyldig bruker",
 | 
				
			||||||
    "Token is expired, please try again": "Symbol utløpt, prøv igjen",
 | 
					    "Token is expired, please try again": "Symbol utløpt, prøv igjen",
 | 
				
			||||||
    "English": "Engelsk",
 | 
					    "English": "Engelsk",
 | 
				
			||||||
    "English (auto-generated)": "Engelsk (auto-generert)",
 | 
					    "English (auto-generated)": "Engelsk (auto-generert)",
 | 
				
			||||||
@ -224,7 +243,7 @@
 | 
				
			|||||||
    "Marathi": "",
 | 
					    "Marathi": "",
 | 
				
			||||||
    "Mongolian": "",
 | 
					    "Mongolian": "",
 | 
				
			||||||
    "Nepali": "",
 | 
					    "Nepali": "",
 | 
				
			||||||
  "Norwegian": "Norsk bokmål",
 | 
					    "Norwegian Bokmål": "Norsk bokmål",
 | 
				
			||||||
    "Nyanja": "",
 | 
					    "Nyanja": "",
 | 
				
			||||||
    "Pashto": "",
 | 
					    "Pashto": "",
 | 
				
			||||||
    "Persian": "",
 | 
					    "Persian": "",
 | 
				
			||||||
@ -276,6 +295,7 @@
 | 
				
			|||||||
    "About": "Om",
 | 
					    "About": "Om",
 | 
				
			||||||
    "Rating: ": "Vurdering: ",
 | 
					    "Rating: ": "Vurdering: ",
 | 
				
			||||||
    "Language: ": "Språk: ",
 | 
					    "Language: ": "Språk: ",
 | 
				
			||||||
 | 
					    "View as playlist": "Vis som spilleliste",
 | 
				
			||||||
    "Default": "Forvalg",
 | 
					    "Default": "Forvalg",
 | 
				
			||||||
    "Music": "Musikk",
 | 
					    "Music": "Musikk",
 | 
				
			||||||
    "Gaming": "Spill",
 | 
					    "Gaming": "Spill",
 | 
				
			||||||
@ -285,7 +305,7 @@
 | 
				
			|||||||
    "Download as: ": "Last ned som: ",
 | 
					    "Download as: ": "Last ned som: ",
 | 
				
			||||||
    "%A %B %-d, %Y": "",
 | 
					    "%A %B %-d, %Y": "",
 | 
				
			||||||
    "(edited)": "(redigert)",
 | 
					    "(edited)": "(redigert)",
 | 
				
			||||||
  "Youtube permalink of the comment": "Permanent YouTube-lenke til innholdet",
 | 
					    "YouTube comment permalink": "Permanent YouTube-lenke til innholdet",
 | 
				
			||||||
    "`x` marked it with a ❤": "`x` levnet et ❤",
 | 
					    "`x` marked it with a ❤": "`x` levnet et ❤",
 | 
				
			||||||
    "Audio mode": "Lydmodus",
 | 
					    "Audio mode": "Lydmodus",
 | 
				
			||||||
    "Video mode": "Video-modus",
 | 
					    "Video mode": "Video-modus",
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										512
									
								
								locales/nl.json
									
									
									
									
									
								
							
							
						
						
									
										512
									
								
								locales/nl.json
									
									
									
									
									
								
							@ -1,268 +1,287 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    "`x` subscribers": "`x` abonnees",
 | 
					    "`x` subscribers": "`x` abonnees",
 | 
				
			||||||
  "`x` videos": "`x` videos",
 | 
					    "`x` videos": "`x` video's",
 | 
				
			||||||
    "LIVE": "LIVE",
 | 
					    "LIVE": "LIVE",
 | 
				
			||||||
  "Shared `x` ago": "Gedeeld `x` geleden",
 | 
					    "Shared `x` ago": "Gedeeld: `x` geleden",
 | 
				
			||||||
  "Unsubscribe": "Abonnement opzeggen",
 | 
					    "Unsubscribe": "Deabonneren",
 | 
				
			||||||
    "Subscribe": "Abonneren",
 | 
					    "Subscribe": "Abonneren",
 | 
				
			||||||
  "Login to subscribe to `x`": "Log in om te abonneren op `x`",
 | 
					    "View channel on YouTube": "Bekijk kanaal op YouTube",
 | 
				
			||||||
  "View channel on YouTube": "Bekijk kanaal op Youtube",
 | 
					    "View playlist on YouTube": "Bekijk afspeellijst op YouTube",
 | 
				
			||||||
    "newest": "nieuwste",
 | 
					    "newest": "nieuwste",
 | 
				
			||||||
    "oldest": "oudste",
 | 
					    "oldest": "oudste",
 | 
				
			||||||
    "popular": "populair",
 | 
					    "popular": "populair",
 | 
				
			||||||
  "last": "",
 | 
					    "last": "laatste",
 | 
				
			||||||
    "Next page": "Volgende pagina",
 | 
					    "Next page": "Volgende pagina",
 | 
				
			||||||
    "Previous page": "Vorige pagina",
 | 
					    "Previous page": "Vorige pagina",
 | 
				
			||||||
  "Clear watch history?": "Kijk geschiedenis wissen?",
 | 
					    "Clear watch history?": "Wil je de kijkgeschiedenis wissen?",
 | 
				
			||||||
 | 
					    "New password": "Nieuw wachtwoord",
 | 
				
			||||||
 | 
					    "New passwords must match": "De nieuwe wachtwoorden moeten overeenkomen",
 | 
				
			||||||
 | 
					    "Cannot change password for Google accounts": "Kan het wachtwoord van Google-accounts niet wijzigen",
 | 
				
			||||||
 | 
					    "Authorize token?": "Wil je de toegangssleutel machtigen?",
 | 
				
			||||||
 | 
					    "Authorize token for `x`?": "Wil je de toegangssleutel machtigen voor `x`?",
 | 
				
			||||||
    "Yes": "Ja",
 | 
					    "Yes": "Ja",
 | 
				
			||||||
    "No": "Nee",
 | 
					    "No": "Nee",
 | 
				
			||||||
  "Import and Export Data": "Importeer en Exporteer Gegevens",
 | 
					    "Import and Export Data": "Gegevens im- en exporteren",
 | 
				
			||||||
    "Import": "Importeren",
 | 
					    "Import": "Importeren",
 | 
				
			||||||
  "Import Invidious data": "Importeer Invidious gegevens",
 | 
					    "Import Invidious data": "Invidious-gegevens importeren",
 | 
				
			||||||
  "Import YouTube subscriptions": "Importeer Youtube abonnees",
 | 
					    "Import YouTube subscriptions": "YouTube-abonnementen importeren",
 | 
				
			||||||
  "Import FreeTube subscriptions (.db)": "Importeer FreeTube abonnees (.db)",
 | 
					    "Import FreeTube subscriptions (.db)": "FreeTube-abonnementen importeren (.db)",
 | 
				
			||||||
  "Import NewPipe subscriptions (.json)": "Importeer NewPipe abonnees (.json)",
 | 
					    "Import NewPipe subscriptions (.json)": "NewPipe-abonnementen importeren (.json)",
 | 
				
			||||||
  "Import NewPipe data (.zip)": "Importeer NewPipe gegevens (.zip)",
 | 
					    "Import NewPipe data (.zip)": "NewPipe-gegevens importeren (.zip)",
 | 
				
			||||||
    "Export": "Exporteren",
 | 
					    "Export": "Exporteren",
 | 
				
			||||||
  "Export subscriptions as OPML": "Exporteer abonnees als OPML",
 | 
					    "Export subscriptions as OPML": "Abonnementen exporteren als OPML",
 | 
				
			||||||
  "Export subscriptions as OPML (for NewPipe & FreeTube)": "Exporteer abonnees als OPML (voor NewPipe & FreeTube)",
 | 
					    "Export subscriptions as OPML (for NewPipe & FreeTube)": "Abonnementen exporteren als OPML (voor NewPipe en FreeTube)",
 | 
				
			||||||
  "Export data as JSON": "Exporteer gegevens als JSON",
 | 
					    "Export data as JSON": "Gegevens exporteren als JSON",
 | 
				
			||||||
  "Delete account?": "Verwijder account?",
 | 
					    "Delete account?": "Wil je je account verwijderen?",
 | 
				
			||||||
    "History": "Geschiedenis",
 | 
					    "History": "Geschiedenis",
 | 
				
			||||||
  "An alternative front-end to YouTube": "Een alternatieve front-end voor YouTube",
 | 
					    "An alternative front-end to YouTube": "Een alternatief front-end voor YouTube",
 | 
				
			||||||
  "JavaScript license information": "JavaScript licentie informatie",
 | 
					    "JavaScript license information": "JavaScript-licentieinformatie",
 | 
				
			||||||
    "source": "bron",
 | 
					    "source": "bron",
 | 
				
			||||||
  "Login": "Inloggen",
 | 
					    "Log in": "Inloggen",
 | 
				
			||||||
  "Login/Register": "Inloggen/Registreren",
 | 
					    "Log in/register": "Inloggen/Registreren",
 | 
				
			||||||
  "Login to Google": "Inloggen op Google",
 | 
					    "Log in with Google": "Inloggen met Google",
 | 
				
			||||||
  "User ID:": "Gebruiker ID:",
 | 
					    "User ID": "Gebruikers-id",
 | 
				
			||||||
  "Password:": "Wachtwoord:",
 | 
					    "Password": "Wachtwoord",
 | 
				
			||||||
    "Time (h:mm:ss):": "Tijd (h:mm:ss):",
 | 
					    "Time (h:mm:ss):": "Tijd (h:mm:ss):",
 | 
				
			||||||
  "Text CAPTCHA": "Tekst CAPTCHA",
 | 
					    "Text CAPTCHA": "Tekst-CAPTCHA",
 | 
				
			||||||
  "Image CAPTCHA": "Afbeelding CAPTCHA",
 | 
					    "Image CAPTCHA": "Afbeelding-CAPTCHA",
 | 
				
			||||||
  "Sign In": "Aanmelden",
 | 
					    "Sign In": "Inloggen",
 | 
				
			||||||
    "Register": "Registreren",
 | 
					    "Register": "Registreren",
 | 
				
			||||||
  "Email:": "Email:",
 | 
					    "E-mail": "E-mailadres",
 | 
				
			||||||
  "Google verification code:": "Google verificatie code:",
 | 
					    "Google verification code": "Google-verificatiecode",
 | 
				
			||||||
  "Preferences": "Voorkeuren",
 | 
					    "Preferences": "Instellingen",
 | 
				
			||||||
  "Player preferences": "Afspeler voorkeuren",
 | 
					    "Player preferences": "Spelerinstellingen",
 | 
				
			||||||
    "Always loop: ": "Altijd herhalen: ",
 | 
					    "Always loop: ": "Altijd herhalen: ",
 | 
				
			||||||
    "Autoplay: ": "Automatisch afspelen: ",
 | 
					    "Autoplay: ": "Automatisch afspelen: ",
 | 
				
			||||||
  "Autoplay next video: ": "Automatisch volgende video afspelen: ",
 | 
					    "Play next by default: ": "Standaard volgende video afspelen: ",
 | 
				
			||||||
 | 
					    "Autoplay next video: ": "Volgende video automatisch afspelen: ",
 | 
				
			||||||
    "Listen by default: ": "Standaard luisteren: ",
 | 
					    "Listen by default: ": "Standaard luisteren: ",
 | 
				
			||||||
  "Proxy videos? ": "",
 | 
					    "Proxy videos? ": "Video's afspelen via proxy? ",
 | 
				
			||||||
  "Default speed: ": "Standaard snelheid: ",
 | 
					    "Default speed: ": "Standaard afspeelsnelheid: ",
 | 
				
			||||||
  "Preferred video quality: ": "Video kwaliteit voorkeur: ",
 | 
					    "Preferred video quality: ": "Voorkeurskwaliteit: ",
 | 
				
			||||||
  "Player volume: ": "Afspeler volume: ",
 | 
					    "Player volume: ": "Spelervolume: ",
 | 
				
			||||||
  "Default comments: ": "Standaard reacties: ",
 | 
					    "Default comments: ": "Reacties tonen van: ",
 | 
				
			||||||
  "Default captions: ": "Standaard ondertitels: ",
 | 
					    "youtube": "YouTube",
 | 
				
			||||||
  "Fallback captions: ": "Alternatieve ondertitels: ",
 | 
					    "reddit": "Reddit",
 | 
				
			||||||
  "Show related videos? ": "Laat gerelateerde videos zien? ",
 | 
					    "Default captions: ": "Standaard ondertiteling: ",
 | 
				
			||||||
  "Visual preferences": "Visuele voorkeuren",
 | 
					    "Fallback captions: ": "Alternatieve ondertiteling: ",
 | 
				
			||||||
 | 
					    "Show related videos? ": "Gerelateerde video's tonen? ",
 | 
				
			||||||
 | 
					    "Show annotations by default? ": "Standaard annotaties tonen? ",
 | 
				
			||||||
 | 
					    "Visual preferences": "Visuele instellingen",
 | 
				
			||||||
    "Dark mode: ": "Donkere modus: ",
 | 
					    "Dark mode: ": "Donkere modus: ",
 | 
				
			||||||
    "Thin mode: ": "Smalle modus: ",
 | 
					    "Thin mode: ": "Smalle modus: ",
 | 
				
			||||||
  "Subscription preferences": "Abonnement voorkeuren",
 | 
					    "Subscription preferences": "Abonnementsinstellingen",
 | 
				
			||||||
 | 
					    "Show annotations by default for subscribed channels? ": "Standaard annotaties tonen voor geabonneerde kanalen? ",
 | 
				
			||||||
    "Redirect homepage to feed: ": "Startpagina omleiden naar feed: ",
 | 
					    "Redirect homepage to feed: ": "Startpagina omleiden naar feed: ",
 | 
				
			||||||
  "Number of videos shown in feed: ": "Aantal videos te zien in feed: ",
 | 
					    "Number of videos shown in feed: ": "Aantal te tonen video's in feed: ",
 | 
				
			||||||
  "Sort videos by: ": "Sorteer videos op: ",
 | 
					    "Sort videos by: ": "Video's sorteren op: ",
 | 
				
			||||||
  "published": "gepubliceerd",
 | 
					    "published": "publicatiedatum",
 | 
				
			||||||
  "published - reverse": "gepubliceerd - omgekeerd",
 | 
					    "published - reverse": "publicatiedatum - omgekeerd",
 | 
				
			||||||
    "alphabetically": "alfabetische volgorde",
 | 
					    "alphabetically": "alfabetische volgorde",
 | 
				
			||||||
  "alphabetically - reverse": "alfabetisch - omgekeerd",
 | 
					    "alphabetically - reverse": "alfabetische volgorde - omgekeerd",
 | 
				
			||||||
  "channel name": "kanaal naam",
 | 
					    "channel name": "kanaalnaam",
 | 
				
			||||||
  "channel name - reverse": "kanaal naam - omgekeerd",
 | 
					    "channel name - reverse": "kanaalnaam - omgekeerd",
 | 
				
			||||||
  "Only show latest video from channel: ": "Laat alleen laatste video van kanaal zien: ",
 | 
					    "Only show latest video from channel: ": "Alleen nieuwste video van kanaal tonen: ",
 | 
				
			||||||
  "Only show latest unwatched video from channel: ": "Laat alleen de laatste onbekeken video zien van kanaal: ",
 | 
					    "Only show latest unwatched video from channel: ": "Alleen nieuwste niet-bekeken video van kanaal tonen: ",
 | 
				
			||||||
  "Only show unwatched: ": "Laat alleen onbekeken videos zien: ",
 | 
					    "Only show unwatched: ": "Alleen niet-bekeken videos tonen: ",
 | 
				
			||||||
  "Only show notifications (if there are any): ": "Laat alleen notificaties zien (als die er zijn): ",
 | 
					    "Only show notifications (if there are any): ": "Alleen meldingen tonen (als die er zijn): ",
 | 
				
			||||||
  "Data preferences": "Gegevens voorkeuren",
 | 
					    "Data preferences": "Gegevensinstellingen",
 | 
				
			||||||
    "Clear watch history": "Kijkgeschiedenis wissen",
 | 
					    "Clear watch history": "Kijkgeschiedenis wissen",
 | 
				
			||||||
  "Import/Export data": "Importeer/Exporteer gegevens",
 | 
					    "Import/export data": "Gegevens im-/exporteren",
 | 
				
			||||||
  "Manage subscriptions": "Abonnees beheren",
 | 
					    "Change password": "Wachtwoord wijzigen",
 | 
				
			||||||
 | 
					    "Manage subscriptions": "Abonnementen beheren",
 | 
				
			||||||
 | 
					    "Manage tokens": "Toegangssleutels beheren",
 | 
				
			||||||
    "Watch history": "Kijkgeschiedenis",
 | 
					    "Watch history": "Kijkgeschiedenis",
 | 
				
			||||||
    "Delete account": "Account verwijderen",
 | 
					    "Delete account": "Account verwijderen",
 | 
				
			||||||
  "Administrator preferences": "",
 | 
					    "Administrator preferences": "Beheerdersinstellingen",
 | 
				
			||||||
  "Default homepage: ": "",
 | 
					    "Default homepage: ": "Standaard startpagina: ",
 | 
				
			||||||
  "Feed menu: ": "",
 | 
					    "Feed menu: ": "Feedmenu:",
 | 
				
			||||||
  "Top enabled? ": "",
 | 
					    "Top enabled? ": "Bovenkant inschakelen? ",
 | 
				
			||||||
  "CAPTCHA enabled? ": "",
 | 
					    "CAPTCHA enabled? ": "CAPTCHA gebruiken? ",
 | 
				
			||||||
  "Login enabled? ": "",
 | 
					    "Login enabled? ": "Inloggen toestaan? ",
 | 
				
			||||||
  "Registration enabled? ": "",
 | 
					    "Registration enabled? ": "Registratie toestaan? ",
 | 
				
			||||||
  "Report statistics? ": "",
 | 
					    "Report statistics? ": "Statistieken bijhouden? ",
 | 
				
			||||||
  "Save preferences": "Opslaan voorkeuren",
 | 
					    "Save preferences": "Instellingen opslaan",
 | 
				
			||||||
  "Subscription manager": "Abonnees beheerder",
 | 
					    "Subscription manager": "Abonnementen beheren",
 | 
				
			||||||
  "`x` subscriptions": "`x` abonnees",
 | 
					    "Token manager": "Toegangssleutels beheren",
 | 
				
			||||||
  "Import/Export": "Importeer/Exporteer",
 | 
					    "Token": "Toegangssleutel",
 | 
				
			||||||
  "unsubscribe": "abonnement opzeggen",
 | 
					    "`x` subscriptions": "`x` abonnementen",
 | 
				
			||||||
  "Subscriptions": "Abonnees",
 | 
					    "`x` tokens": "`x` toegangssleutels",
 | 
				
			||||||
  "`x` unseen notifications": "`x` onbekeken notificaties",
 | 
					    "Import/export": "Importeren/Exporteren",
 | 
				
			||||||
 | 
					    "unsubscribe": "Deabonneren",
 | 
				
			||||||
 | 
					    "revoke": "Intrekken",
 | 
				
			||||||
 | 
					    "Subscriptions": "Abonnementen",
 | 
				
			||||||
 | 
					    "`x` unseen notifications": "`x` ongelezen meldingen",
 | 
				
			||||||
    "search": "zoeken",
 | 
					    "search": "zoeken",
 | 
				
			||||||
  "Sign out": "Afmelden",
 | 
					    "Log out": "Uitloggen",
 | 
				
			||||||
  "Released under the AGPLv3 by Omar Roth.": "Uitgegeven onder AGPLv3 door Omar Roth.",
 | 
					    "Released under the AGPLv3 by Omar Roth.": "Uitgegeven onder de AGPLv3-licentie door Omar Roth.",
 | 
				
			||||||
  "Source available here.": "Bron beschikbaar hier.",
 | 
					    "Source available here.": "De broncode is hier beschikbaar.",
 | 
				
			||||||
  "View JavaScript license information.": "Bekijk JavaScript licentie informatie.",
 | 
					    "View JavaScript license information.": "JavaScript-licentieinformatie tonen.",
 | 
				
			||||||
  "View privacy policy.": "",
 | 
					    "View privacy policy.": "Privacybeleid tonen",
 | 
				
			||||||
  "Trending": "Trending",
 | 
					    "Trending": "Uitgelicht",
 | 
				
			||||||
  "Unlisted": "",
 | 
					    "Unlisted": "Verborgen",
 | 
				
			||||||
  "Watch video on Youtube": "Bekijk video op Youtube",
 | 
					    "Watch on YouTube": "Bekijk video op YouTube",
 | 
				
			||||||
 | 
					    "Hide annotations": "Annotaties verbergen",
 | 
				
			||||||
 | 
					    "Show annotations": "Annotaties tonen",
 | 
				
			||||||
    "Genre: ": "Genre: ",
 | 
					    "Genre: ": "Genre: ",
 | 
				
			||||||
    "License: ": "Licentie: ",
 | 
					    "License: ": "Licentie: ",
 | 
				
			||||||
    "Family friendly? ": "Gezinsvriendelijk? ",
 | 
					    "Family friendly? ": "Gezinsvriendelijk? ",
 | 
				
			||||||
  "Wilson score: ": "Wilson score: ",
 | 
					    "Wilson score: ": "Wilson-score: ",
 | 
				
			||||||
    "Engagement: ": "Betrokkenheid: ",
 | 
					    "Engagement: ": "Betrokkenheid: ",
 | 
				
			||||||
    "Whitelisted regions: ": "Toegestane regio's: ",
 | 
					    "Whitelisted regions: ": "Toegestane regio's: ",
 | 
				
			||||||
    "Blacklisted regions: ": "Geblokkeerde regio's: ",
 | 
					    "Blacklisted regions: ": "Geblokkeerde regio's: ",
 | 
				
			||||||
    "Shared `x`": "`x` gedeeld",
 | 
					    "Shared `x`": "`x` gedeeld",
 | 
				
			||||||
  "Premieres in `x`": "",
 | 
					    "`x` views": "`x` weergaven",
 | 
				
			||||||
  "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.",
 | 
					    "Premieres in `x`": "Verschijnt over `x`",
 | 
				
			||||||
  "View YouTube comments": "Bekijk YouTube reacties",
 | 
					    "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.": "Hoi! Het lijkt erop dat je JavaScript hebt uitgeschakeld. Klik hier om de reacties te bekijken. Let op: het laden duurt wat langer.",
 | 
				
			||||||
  "View more comments on Reddit": "Bekijk meer reacties op Reddit",
 | 
					    "View YouTube comments": "YouTube-reacties tonen",
 | 
				
			||||||
  "View `x` comments": "`x` reacties zien",
 | 
					    "View more comments on Reddit": "Meer reacties bekijken op Reddit",
 | 
				
			||||||
  "View Reddit comments": "Bekijk Reddit reacties",
 | 
					    "View `x` comments": "`x` reacties tonen",
 | 
				
			||||||
  "Hide replies": "Verberg antwoorden",
 | 
					    "View Reddit comments": "Reddit-reacties tonen",
 | 
				
			||||||
  "Show replies": "Laat antwoorden zien",
 | 
					    "Hide replies": "Antwoorden verbergen",
 | 
				
			||||||
  "Incorrect password": "Onjuist wachtwoord",
 | 
					    "Show replies": "Antwoorden tonen",
 | 
				
			||||||
  "Quota exceeded, try again in a few hours": "Quota overschreden, probeer het over een paar uur opnieuw",
 | 
					    "Incorrect password": "Wachtwoord is onjuist",
 | 
				
			||||||
  "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.",
 | 
					    "Quota exceeded, try again in a few hours": "Quota overschreden; probeer het over een paar uur opnieuw",
 | 
				
			||||||
  "Invalid TFA code": "Onjuiste TFA code",
 | 
					    "Unable to log in, make sure two-factor authentication (Authenticator or SMS) is turned on.": "Kan niet inloggen. Zorg ervoor dat authenticatie in twee stappen (Authenticator of sms) is ingeschakeld.",
 | 
				
			||||||
  "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 TFA code": "Onjuiste TFA-code",
 | 
				
			||||||
  "Invalid answer": "Onjuist antwoord",
 | 
					    "Login failed. This may be because two-factor authentication is not turned on for your account.": "Inloggen mislukt. Wellicht is authenticatie in twee stappen niet ingeschakeld op je account.",
 | 
				
			||||||
  "Invalid CAPTCHA": "Onjuiste CAPTCHA",
 | 
					    "Wrong answer": "Onjuist antwoord",
 | 
				
			||||||
  "CAPTCHA is a required field": "CAPTCHA is een vereist veld",
 | 
					    "Erroneous CAPTCHA": "Onjuiste CAPTCHA",
 | 
				
			||||||
  "User ID is a required field": "Gebruiker ID is een vereist veld",
 | 
					    "CAPTCHA is a required field": "CAPTCHA is vereist",
 | 
				
			||||||
  "Password is a required field": "Wachtwoord is een vereist veld",
 | 
					    "User ID is a required field": "Gebruikers-id is vereist",
 | 
				
			||||||
  "Invalid username or password": "Ongeldige gebruikersnaam of wachtwoord",
 | 
					    "Password is a required field": "Wachtwoord is vereist",
 | 
				
			||||||
  "Please sign in using 'Sign in with Google'": "Meld u aan met 'Aanmelden met Google'",
 | 
					    "Wrong username or password": "Onjuiste gebruikersnaam of wachtwoord",
 | 
				
			||||||
  "Password cannot be empty": "Wachtwoord mag niet leeg zijn",
 | 
					    "Please sign in using 'Log in with Google'": "Log in via 'Inloggen met Google'",
 | 
				
			||||||
  "Password cannot be longer than 55 characters": "Wachtwoord mag niet langer dan 55 tekens zijn",
 | 
					    "Password cannot be empty": "Het wachtwoordveld mag niet leeg zijn",
 | 
				
			||||||
  "Please sign in": "Meld u aan",
 | 
					    "Password cannot be longer than 55 characters": "Het wachtwoord mag niet langer dan 55 tekens zijn",
 | 
				
			||||||
  "Invidious Private Feed for `x`": "Invidious Privé Feed voor `x`",
 | 
					    "Please log in": "Log in",
 | 
				
			||||||
 | 
					    "Invidious Private Feed for `x`": "Invidious-privéfeed van `x`",
 | 
				
			||||||
    "channel:`x`": "kanaal:`x`",
 | 
					    "channel:`x`": "kanaal:`x`",
 | 
				
			||||||
  "Deleted or invalid channel": "Verwijderd of ongeldig kanaal",
 | 
					    "Deleted or invalid channel": "Verwijderd of niet-bestaand kanaal",
 | 
				
			||||||
    "This channel does not exist.": "Dit kanaal bestaat niet.",
 | 
					    "This channel does not exist.": "Dit kanaal bestaat niet.",
 | 
				
			||||||
  "Could not get channel info.": "Kan kanaal informatie niet verkrijgen.",
 | 
					    "Could not get channel info.": "Kan geen kanaalinformatie ophalen.",
 | 
				
			||||||
  "Could not fetch comments": "Kan reacties niet verkrijgen",
 | 
					    "Could not fetch comments": "Kan reacties niet ophalen",
 | 
				
			||||||
  "View `x` replies": "`x` antwoorden zien",
 | 
					    "View `x` replies": "`x` antwoorden tonen",
 | 
				
			||||||
    "`x` ago": "`x` geleden",
 | 
					    "`x` ago": "`x` geleden",
 | 
				
			||||||
    "Load more": "Meer laden",
 | 
					    "Load more": "Meer laden",
 | 
				
			||||||
    "`x` points": "`x` punten",
 | 
					    "`x` points": "`x` punten",
 | 
				
			||||||
  "Could not create mix.": "Kon mix niet maken.",
 | 
					    "Could not create mix.": "Kan geen mix maken.",
 | 
				
			||||||
  "Playlist is empty": "Afspeellijst is leeg",
 | 
					    "Empty playlist": "Lege afspeellijst",
 | 
				
			||||||
  "Invalid playlist.": "Ongeldige afspeellijst.",
 | 
					    "Not a playlist.": "Ongeldige afspeellijst.",
 | 
				
			||||||
    "Playlist does not exist.": "Afspeellijst bestaat niet.",
 | 
					    "Playlist does not exist.": "Afspeellijst bestaat niet.",
 | 
				
			||||||
  "Could not pull trending pages.": "Kon trending paginas niet verkrijgen.",
 | 
					    "Could not pull trending pages.": "Kan uitgelichte pagina's niet ophalen.",
 | 
				
			||||||
  "Hidden field \"challenge\" is a required field": "Verborgen veld \"uitdaging\" is een vereist veld",
 | 
					    "Hidden field \"challenge\" is a required field": "Verborgen veld \"uitdaging\" is vereist",
 | 
				
			||||||
  "Hidden field \"token\" is a required field": "Verborgen veld \"token\" is een vereist veld",
 | 
					    "Hidden field \"token\" is a required field": "Verborgen veld \"toegangssleutel\" is vereist",
 | 
				
			||||||
  "Invalid challenge": "Ongeldige uitdaging",
 | 
					    "Erroneous challenge": "Ongeldige uitdaging",
 | 
				
			||||||
  "Invalid token": "Ongeldige token",
 | 
					    "Erroneous token": "Ongeldige toegangssleutel",
 | 
				
			||||||
  "Invalid user": "Ongeldige gebruiker",
 | 
					    "No such user": "Gebruiker bestaat niet",
 | 
				
			||||||
  "Token is expired, please try again": "Token is verlopen, probeer het opnieuw",
 | 
					    "Token is expired, please try again": "Toegangssleutel verlopen; probeer het opnieuw",
 | 
				
			||||||
  "English": "",
 | 
					    "English": "Engels",
 | 
				
			||||||
  "English (auto-generated)": "",
 | 
					    "English (auto-generated)": "Engels (automatisch gegenereerd)",
 | 
				
			||||||
  "Afrikaans": "",
 | 
					    "Afrikaans": "Afrikaans",
 | 
				
			||||||
  "Albanian": "",
 | 
					    "Albanian": "Albanees",
 | 
				
			||||||
  "Amharic": "",
 | 
					    "Amharic": "Amhaars",
 | 
				
			||||||
  "Arabic": "",
 | 
					    "Arabic": "Arabisch",
 | 
				
			||||||
  "Armenian": "",
 | 
					    "Armenian": "Armeens",
 | 
				
			||||||
  "Azerbaijani": "",
 | 
					    "Azerbaijani": "Azerbeidzjaans",
 | 
				
			||||||
  "Bangla": "",
 | 
					    "Bangla": "Bangla",
 | 
				
			||||||
  "Basque": "",
 | 
					    "Basque": "Baskisch",
 | 
				
			||||||
  "Belarusian": "",
 | 
					    "Belarusian": "Wit-Rrussisch",
 | 
				
			||||||
  "Bosnian": "",
 | 
					    "Bosnian": "Bosnisch",
 | 
				
			||||||
  "Bulgarian": "",
 | 
					    "Bulgarian": "Bulgaars",
 | 
				
			||||||
  "Burmese": "",
 | 
					    "Burmese": "Birmaans",
 | 
				
			||||||
  "Catalan": "",
 | 
					    "Catalan": "Catalaans",
 | 
				
			||||||
  "Cebuano": "",
 | 
					    "Cebuano": "Cebuano",
 | 
				
			||||||
  "Chinese (Simplified)": "",
 | 
					    "Chinese (Simplified)": "Chinees (Veereenvoudigd)",
 | 
				
			||||||
  "Chinese (Traditional)": "",
 | 
					    "Chinese (Traditional)": "Chinees (Traditioneel)",
 | 
				
			||||||
  "Corsican": "",
 | 
					    "Corsican": "Corsicaans",
 | 
				
			||||||
  "Croatian": "",
 | 
					    "Croatian": "Kroatisch",
 | 
				
			||||||
  "Czech": "",
 | 
					    "Czech": "Tsjechisch",
 | 
				
			||||||
  "Danish": "",
 | 
					    "Danish": "Deens",
 | 
				
			||||||
  "Dutch": "",
 | 
					    "Dutch": "Nederlands",
 | 
				
			||||||
  "Esperanto": "",
 | 
					    "Esperanto": "Esperanto",
 | 
				
			||||||
  "Estonian": "",
 | 
					    "Estonian": "Ests",
 | 
				
			||||||
  "Filipino": "",
 | 
					    "Filipino": "Filipijns",
 | 
				
			||||||
  "Finnish": "",
 | 
					    "Finnish": "Fins",
 | 
				
			||||||
  "French": "",
 | 
					    "French": "Frans",
 | 
				
			||||||
  "Galician": "",
 | 
					    "Galician": "Galicisch",
 | 
				
			||||||
  "Georgian": "",
 | 
					    "Georgian": "Georgisch",
 | 
				
			||||||
  "German": "",
 | 
					    "German": "Duits",
 | 
				
			||||||
  "Greek": "",
 | 
					    "Greek": "Grieks",
 | 
				
			||||||
  "Gujarati": "",
 | 
					    "Gujarati": "Gujarati",
 | 
				
			||||||
  "Haitian Creole": "",
 | 
					    "Haitian Creole": "Creools",
 | 
				
			||||||
  "Hausa": "",
 | 
					    "Hausa": "Hausa",
 | 
				
			||||||
  "Hawaiian": "",
 | 
					    "Hawaiian": "Hawaïaans",
 | 
				
			||||||
  "Hebrew": "",
 | 
					    "Hebrew": "Heebreeuws",
 | 
				
			||||||
  "Hindi": "",
 | 
					    "Hindi": "Hindi",
 | 
				
			||||||
  "Hmong": "",
 | 
					    "Hmong": "Hmong",
 | 
				
			||||||
  "Hungarian": "",
 | 
					    "Hungarian": "Hongaars",
 | 
				
			||||||
  "Icelandic": "",
 | 
					    "Icelandic": "IJslands",
 | 
				
			||||||
  "Igbo": "",
 | 
					    "Igbo": "Igbo",
 | 
				
			||||||
  "Indonesian": "",
 | 
					    "Indonesian": "Indonesisch",
 | 
				
			||||||
  "Irish": "",
 | 
					    "Irish": "Iers",
 | 
				
			||||||
  "Italian": "",
 | 
					    "Italian": "Italiaans",
 | 
				
			||||||
  "Japanese": "",
 | 
					    "Japanese": "Japans",
 | 
				
			||||||
  "Javanese": "",
 | 
					    "Javanese": "Javaans",
 | 
				
			||||||
  "Kannada": "",
 | 
					    "Kannada": "Kannada",
 | 
				
			||||||
  "Kazakh": "",
 | 
					    "Kazakh": "Kazachs",
 | 
				
			||||||
  "Khmer": "",
 | 
					    "Khmer": "Khmer",
 | 
				
			||||||
  "Korean": "",
 | 
					    "Korean": "Koreaans",
 | 
				
			||||||
  "Kurdish": "",
 | 
					    "Kurdish": "Koerdisch",
 | 
				
			||||||
  "Kyrgyz": "",
 | 
					    "Kyrgyz": "Kirgizisch",
 | 
				
			||||||
  "Lao": "",
 | 
					    "Lao": "Laotiaans",
 | 
				
			||||||
  "Latin": "",
 | 
					    "Latin": "Latijns",
 | 
				
			||||||
  "Latvian": "",
 | 
					    "Latvian": "Lets",
 | 
				
			||||||
  "Lithuanian": "",
 | 
					    "Lithuanian": "Litouws",
 | 
				
			||||||
  "Luxembourgish": "",
 | 
					    "Luxembourgish": "Luxemburgs",
 | 
				
			||||||
  "Macedonian": "",
 | 
					    "Macedonian": "Macedonisch",
 | 
				
			||||||
  "Malagasy": "",
 | 
					    "Malagasy": "Malagassisch",
 | 
				
			||||||
  "Malay": "",
 | 
					    "Malay": "Maleisisch",
 | 
				
			||||||
  "Malayalam": "",
 | 
					    "Malayalam": "Malayalam",
 | 
				
			||||||
  "Maltese": "",
 | 
					    "Maltese": "Maltees",
 | 
				
			||||||
  "Maori": "",
 | 
					    "Maori": "Maorisch",
 | 
				
			||||||
  "Marathi": "",
 | 
					    "Marathi": "Marathi",
 | 
				
			||||||
  "Mongolian": "",
 | 
					    "Mongolian": "Mongools",
 | 
				
			||||||
  "Nepali": "",
 | 
					    "Nepali": "Nepalees",
 | 
				
			||||||
  "Norwegian": "",
 | 
					    "Norwegian Bokmål": "Noors (Bokmål)",
 | 
				
			||||||
  "Nyanja": "",
 | 
					    "Nyanja": "Nyanja",
 | 
				
			||||||
  "Pashto": "",
 | 
					    "Pashto": "Pashto",
 | 
				
			||||||
  "Persian": "",
 | 
					    "Persian": "Perzisch",
 | 
				
			||||||
  "Polish": "",
 | 
					    "Polish": "Pools",
 | 
				
			||||||
  "Portuguese": "",
 | 
					    "Portuguese": "Portugees",
 | 
				
			||||||
  "Punjabi": "",
 | 
					    "Punjabi": "Punjabi",
 | 
				
			||||||
  "Romanian": "",
 | 
					    "Romanian": "Roemeens",
 | 
				
			||||||
  "Russian": "",
 | 
					    "Russian": "Russisch",
 | 
				
			||||||
  "Samoan": "",
 | 
					    "Samoan": "Samoaans",
 | 
				
			||||||
  "Scottish Gaelic": "",
 | 
					    "Scottish Gaelic": "Schots-Gaelisch",
 | 
				
			||||||
  "Serbian": "",
 | 
					    "Serbian": "Servisch",
 | 
				
			||||||
  "Shona": "",
 | 
					    "Shona": "Shona",
 | 
				
			||||||
  "Sindhi": "",
 | 
					    "Sindhi": "Sindhi",
 | 
				
			||||||
  "Sinhala": "",
 | 
					    "Sinhala": "Sinhala",
 | 
				
			||||||
  "Slovak": "",
 | 
					    "Slovak": "Slowaaks",
 | 
				
			||||||
  "Slovenian": "",
 | 
					    "Slovenian": "Sloveens",
 | 
				
			||||||
  "Somali": "",
 | 
					    "Somali": "Somalisch",
 | 
				
			||||||
  "Southern Sotho": "",
 | 
					    "Southern Sotho": "Zuid-Sotho",
 | 
				
			||||||
  "Spanish": "",
 | 
					    "Spanish": "Spaans",
 | 
				
			||||||
  "Spanish (Latin America)": "",
 | 
					    "Spanish (Latin America)": "Spaans (Latijns-Amerika)",
 | 
				
			||||||
  "Sundanese": "",
 | 
					    "Sundanese": "Soedanees",
 | 
				
			||||||
  "Swahili": "",
 | 
					    "Swahili": "Swahili",
 | 
				
			||||||
  "Swedish": "",
 | 
					    "Swedish": "Zweeds",
 | 
				
			||||||
  "Tajik": "",
 | 
					    "Tajik": "Tajik",
 | 
				
			||||||
  "Tamil": "",
 | 
					    "Tamil": "Tamil",
 | 
				
			||||||
  "Telugu": "",
 | 
					    "Telugu": "Telugu",
 | 
				
			||||||
  "Thai": "",
 | 
					    "Thai": "Thaïs",
 | 
				
			||||||
  "Turkish": "",
 | 
					    "Turkish": "Turks",
 | 
				
			||||||
  "Ukrainian": "",
 | 
					    "Ukrainian": "Oekraïens",
 | 
				
			||||||
  "Urdu": "",
 | 
					    "Urdu": "Urdu",
 | 
				
			||||||
  "Uzbek": "",
 | 
					    "Uzbek": "Oezbeeks",
 | 
				
			||||||
  "Vietnamese": "",
 | 
					    "Vietnamese": "Vietnamees",
 | 
				
			||||||
  "Welsh": "",
 | 
					    "Welsh": "Welsh",
 | 
				
			||||||
  "Western Frisian": "",
 | 
					    "Western Frisian": "Fries",
 | 
				
			||||||
  "Xhosa": "",
 | 
					    "Xhosa": "Xhosa",
 | 
				
			||||||
  "Yiddish": "",
 | 
					    "Yiddish": "Joods",
 | 
				
			||||||
  "Yoruba": "",
 | 
					    "Yoruba": "Yoruba",
 | 
				
			||||||
  "Zulu": "",
 | 
					    "Zulu": "Zulu",
 | 
				
			||||||
    "`x` years": "`x` jaar",
 | 
					    "`x` years": "`x` jaar",
 | 
				
			||||||
    "`x` months": "`x` maanden",
 | 
					    "`x` months": "`x` maanden",
 | 
				
			||||||
    "`x` weeks": "`x` weken",
 | 
					    "`x` weeks": "`x` weken",
 | 
				
			||||||
@ -270,26 +289,27 @@
 | 
				
			|||||||
    "`x` hours": "`x` uur",
 | 
					    "`x` hours": "`x` uur",
 | 
				
			||||||
    "`x` minutes": "`x` minuten",
 | 
					    "`x` minutes": "`x` minuten",
 | 
				
			||||||
    "`x` seconds": "`x` seconden",
 | 
					    "`x` seconds": "`x` seconden",
 | 
				
			||||||
  "Fallback comments: ": "",
 | 
					    "Fallback comments: ": "Terugvallen op",
 | 
				
			||||||
  "Popular": "",
 | 
					    "Popular": "Populair",
 | 
				
			||||||
  "Top": "",
 | 
					    "Top": "Top",
 | 
				
			||||||
  "About": "",
 | 
					    "About": "Over",
 | 
				
			||||||
  "Rating: ": "",
 | 
					    "Rating: ": "Waardering",
 | 
				
			||||||
  "Language: ": "",
 | 
					    "Language: ": "Taal",
 | 
				
			||||||
  "Default": "",
 | 
					    "View as playlist": "Tonen als afspeellijst",
 | 
				
			||||||
  "Music": "",
 | 
					    "Default": "Standaard",
 | 
				
			||||||
  "Gaming": "",
 | 
					    "Music": "Muziek",
 | 
				
			||||||
  "News": "",
 | 
					    "Gaming": "Gaming",
 | 
				
			||||||
  "Movies": "",
 | 
					    "News": "Nieuws",
 | 
				
			||||||
  "Download": "",
 | 
					    "Movies": "Films",
 | 
				
			||||||
  "Download as: ": "",
 | 
					    "Download": "Downloaden",
 | 
				
			||||||
  "%A %B %-d, %Y": "",
 | 
					    "Download as: ": "Downloaden als: ",
 | 
				
			||||||
  "(edited)": "",
 | 
					    "%A %B %-d, %Y": "%A %B %-d, %Y",
 | 
				
			||||||
  "Youtube permalink of the comment": "",
 | 
					    "(edited)": "(bewerkt)",
 | 
				
			||||||
  "`x` marked it with a ❤": "",
 | 
					    "YouTube comment permalink": "Link naar YouTube-reactie",
 | 
				
			||||||
  "Audio mode": "",
 | 
					    "`x` marked it with a ❤": "`x` heeft dit gemarkeerd met ❤",
 | 
				
			||||||
  "Video mode": "",
 | 
					    "Audio mode": "Audiomodus",
 | 
				
			||||||
  "Videos": "",
 | 
					    "Video mode": "Videomodus",
 | 
				
			||||||
  "Playlists": "",
 | 
					    "Videos": "Video's",
 | 
				
			||||||
  "Current version: ": ""
 | 
					    "Playlists": "Afspeellijsten",
 | 
				
			||||||
 | 
					    "Current version: ": "Huidige versie: "
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -5,8 +5,8 @@
 | 
				
			|||||||
    "Shared `x` ago": "Udostępniono `x` temu",
 | 
					    "Shared `x` ago": "Udostępniono `x` temu",
 | 
				
			||||||
    "Unsubscribe": "Odsubskrybuj",
 | 
					    "Unsubscribe": "Odsubskrybuj",
 | 
				
			||||||
    "Subscribe": "Subskrybuj",
 | 
					    "Subscribe": "Subskrybuj",
 | 
				
			||||||
  "Login to subscribe to `x`": "Zaloguj się, aby subskrybować `x`",
 | 
					 | 
				
			||||||
    "View channel on YouTube": "Wyświetl kanał na YouTube",
 | 
					    "View channel on YouTube": "Wyświetl kanał na YouTube",
 | 
				
			||||||
 | 
					    "View playlist on YouTube": "",
 | 
				
			||||||
    "newest": "najnowsze",
 | 
					    "newest": "najnowsze",
 | 
				
			||||||
    "oldest": "najstarsze",
 | 
					    "oldest": "najstarsze",
 | 
				
			||||||
    "popular": "popularne",
 | 
					    "popular": "popularne",
 | 
				
			||||||
@ -14,6 +14,11 @@
 | 
				
			|||||||
    "Next page": "Następna strona",
 | 
					    "Next page": "Następna strona",
 | 
				
			||||||
    "Previous page": "Poprzednia strona",
 | 
					    "Previous page": "Poprzednia strona",
 | 
				
			||||||
    "Clear watch history?": "Wyczyścić historię?",
 | 
					    "Clear watch history?": "Wyczyścić historię?",
 | 
				
			||||||
 | 
					    "New password": "",
 | 
				
			||||||
 | 
					    "New passwords must match": "",
 | 
				
			||||||
 | 
					    "Cannot change password for Google accounts": "",
 | 
				
			||||||
 | 
					    "Authorize token?": "",
 | 
				
			||||||
 | 
					    "Authorize token for `x`?": "",
 | 
				
			||||||
    "Yes": "Tak",
 | 
					    "Yes": "Tak",
 | 
				
			||||||
    "No": "Nie",
 | 
					    "No": "Nie",
 | 
				
			||||||
    "Import and Export Data": "Import i eksport danych",
 | 
					    "Import and Export Data": "Import i eksport danych",
 | 
				
			||||||
@ -32,22 +37,23 @@
 | 
				
			|||||||
    "An alternative front-end to YouTube": "Alternatywny front-end dla YouTube",
 | 
					    "An alternative front-end to YouTube": "Alternatywny front-end dla YouTube",
 | 
				
			||||||
    "JavaScript license information": "Informacja o licencji JavaScript",
 | 
					    "JavaScript license information": "Informacja o licencji JavaScript",
 | 
				
			||||||
    "source": "źródło",
 | 
					    "source": "źródło",
 | 
				
			||||||
  "Login": "Zaloguj",
 | 
					    "Log in": "Zaloguj",
 | 
				
			||||||
  "Login/Register": "Zaloguj/Zarejestruj",
 | 
					    "Log in/register": "Zaloguj/Zarejestruj",
 | 
				
			||||||
  "Login to Google": "Zaloguj do Google",
 | 
					    "Log in with Google": "Zaloguj do Google",
 | 
				
			||||||
  "User ID:": "ID użytkownika:",
 | 
					    "User ID": "ID użytkownika",
 | 
				
			||||||
  "Password:": "Hasło:",
 | 
					    "Password": "Hasło",
 | 
				
			||||||
    "Time (h:mm:ss):": "Godzina (h:mm:ss):",
 | 
					    "Time (h:mm:ss):": "Godzina (h:mm:ss):",
 | 
				
			||||||
    "Text CAPTCHA": "Tekst CAPTCHA",
 | 
					    "Text CAPTCHA": "Tekst CAPTCHA",
 | 
				
			||||||
    "Image CAPTCHA": "Obraz CAPTCHA",
 | 
					    "Image CAPTCHA": "Obraz CAPTCHA",
 | 
				
			||||||
    "Sign In": "Zaloguj się",
 | 
					    "Sign In": "Zaloguj się",
 | 
				
			||||||
    "Register": "Zarejestruj się",
 | 
					    "Register": "Zarejestruj się",
 | 
				
			||||||
  "Email:": "Email:",
 | 
					    "E-mail": "Email",
 | 
				
			||||||
  "Google verification code:": "Kod weryfikacyjny Google:",
 | 
					    "Google verification code": "Kod weryfikacyjny Google",
 | 
				
			||||||
    "Preferences": "Preferencje",
 | 
					    "Preferences": "Preferencje",
 | 
				
			||||||
    "Player preferences": "Ustawienia odtwarzacza",
 | 
					    "Player preferences": "Ustawienia odtwarzacza",
 | 
				
			||||||
    "Always loop: ": "Zawsze zapętlaj: ",
 | 
					    "Always loop: ": "Zawsze zapętlaj: ",
 | 
				
			||||||
    "Autoplay: ": "Autoodtwarzanie: ",
 | 
					    "Autoplay: ": "Autoodtwarzanie: ",
 | 
				
			||||||
 | 
					    "Play next by default: ": "",
 | 
				
			||||||
    "Autoplay next video: ": "Odtwórz następny film: ",
 | 
					    "Autoplay next video: ": "Odtwórz następny film: ",
 | 
				
			||||||
    "Listen by default: ": "Tryb dźwiękowy: ",
 | 
					    "Listen by default: ": "Tryb dźwiękowy: ",
 | 
				
			||||||
    "Proxy videos? ": "Filmy przez proxy? ",
 | 
					    "Proxy videos? ": "Filmy przez proxy? ",
 | 
				
			||||||
@ -55,13 +61,17 @@
 | 
				
			|||||||
    "Preferred video quality: ": "Preferowana jakość filmów: ",
 | 
					    "Preferred video quality: ": "Preferowana jakość filmów: ",
 | 
				
			||||||
    "Player volume: ": "Głośność odtwarzacza: ",
 | 
					    "Player volume: ": "Głośność odtwarzacza: ",
 | 
				
			||||||
    "Default comments: ": "Domyślne komentarze: ",
 | 
					    "Default comments: ": "Domyślne komentarze: ",
 | 
				
			||||||
 | 
					    "youtube": "",
 | 
				
			||||||
 | 
					    "reddit": "",
 | 
				
			||||||
    "Default captions: ": "Domyślne napisy: ",
 | 
					    "Default captions: ": "Domyślne napisy: ",
 | 
				
			||||||
    "Fallback captions: ": "Zastępcze napisy: ",
 | 
					    "Fallback captions: ": "Zastępcze napisy: ",
 | 
				
			||||||
    "Show related videos? ": "Pokaż powiązane filmy? ",
 | 
					    "Show related videos? ": "Pokaż powiązane filmy? ",
 | 
				
			||||||
 | 
					    "Show annotations by default? ": "",
 | 
				
			||||||
    "Visual preferences": "Preferencje Wizualne",
 | 
					    "Visual preferences": "Preferencje Wizualne",
 | 
				
			||||||
    "Dark mode: ": "Ciemny motyw: ",
 | 
					    "Dark mode: ": "Ciemny motyw: ",
 | 
				
			||||||
    "Thin mode: ": "Tryb minimalny: ",
 | 
					    "Thin mode: ": "Tryb minimalny: ",
 | 
				
			||||||
    "Subscription preferences": "Preferencje subskrybcji",
 | 
					    "Subscription preferences": "Preferencje subskrybcji",
 | 
				
			||||||
 | 
					    "Show annotations by default for subscribed channels? ": "",
 | 
				
			||||||
    "Redirect homepage to feed: ": "Przekieruj stronę główną do subskrybcji: ",
 | 
					    "Redirect homepage to feed: ": "Przekieruj stronę główną do subskrybcji: ",
 | 
				
			||||||
    "Number of videos shown in feed: ": "Liczba filmów widoczna na stronie subskrybcji: ",
 | 
					    "Number of videos shown in feed: ": "Liczba filmów widoczna na stronie subskrybcji: ",
 | 
				
			||||||
    "Sort videos by: ": "Sortuj filmy: ",
 | 
					    "Sort videos by: ": "Sortuj filmy: ",
 | 
				
			||||||
@ -77,8 +87,10 @@
 | 
				
			|||||||
    "Only show notifications (if there are any): ": "Pokazuj tylko powiadomienia (jeśli są): ",
 | 
					    "Only show notifications (if there are any): ": "Pokazuj tylko powiadomienia (jeśli są): ",
 | 
				
			||||||
    "Data preferences": "Preferencje danych",
 | 
					    "Data preferences": "Preferencje danych",
 | 
				
			||||||
    "Clear watch history": "Wyczyść historię",
 | 
					    "Clear watch history": "Wyczyść historię",
 | 
				
			||||||
  "Import/Export data": "Import/Eksport danych",
 | 
					    "Import/export data": "Import/Eksport danych",
 | 
				
			||||||
 | 
					    "Change password": "",
 | 
				
			||||||
    "Manage subscriptions": "Organizuj subskrybcje",
 | 
					    "Manage subscriptions": "Organizuj subskrybcje",
 | 
				
			||||||
 | 
					    "Manage tokens": "",
 | 
				
			||||||
    "Watch history": "Historia",
 | 
					    "Watch history": "Historia",
 | 
				
			||||||
    "Delete account": "Usuń konto",
 | 
					    "Delete account": "Usuń konto",
 | 
				
			||||||
    "Administrator preferences": "Preferencje administratora",
 | 
					    "Administrator preferences": "Preferencje administratora",
 | 
				
			||||||
@ -91,20 +103,26 @@
 | 
				
			|||||||
    "Report statistics? ": "Raportować statystyki? ",
 | 
					    "Report statistics? ": "Raportować statystyki? ",
 | 
				
			||||||
    "Save preferences": "Zapisz preferencje",
 | 
					    "Save preferences": "Zapisz preferencje",
 | 
				
			||||||
    "Subscription manager": "Manager subskrybcji",
 | 
					    "Subscription manager": "Manager subskrybcji",
 | 
				
			||||||
 | 
					    "Token manager": "",
 | 
				
			||||||
 | 
					    "Token": "",
 | 
				
			||||||
    "`x` subscriptions": "`x` subskrybcji",
 | 
					    "`x` subscriptions": "`x` subskrybcji",
 | 
				
			||||||
  "Import/Export": "Import/Eksport",
 | 
					    "`x` tokens": "",
 | 
				
			||||||
 | 
					    "Import/export": "Import/Eksport",
 | 
				
			||||||
    "unsubscribe": "odsubskrybuj",
 | 
					    "unsubscribe": "odsubskrybuj",
 | 
				
			||||||
 | 
					    "revoke": "",
 | 
				
			||||||
    "Subscriptions": "Subskrybcje",
 | 
					    "Subscriptions": "Subskrybcje",
 | 
				
			||||||
  "`x` unseen notifications": "`x` niewidzianych powiadomień",
 | 
					    "`x` unseen notifications": "`x` nowych powiadomień",
 | 
				
			||||||
    "search": "szukaj",
 | 
					    "search": "szukaj",
 | 
				
			||||||
  "Sign out": "Wyloguj",
 | 
					    "Log out": "Wyloguj",
 | 
				
			||||||
    "Released under the AGPLv3 by Omar Roth.": "Wydano na licencji AGPLv3 przez Omar Roth.",
 | 
					    "Released under the AGPLv3 by Omar Roth.": "Wydano na licencji AGPLv3 przez Omar Roth.",
 | 
				
			||||||
    "Source available here.": "Kod źródłowy dostępny tutaj.",
 | 
					    "Source available here.": "Kod źródłowy dostępny tutaj.",
 | 
				
			||||||
    "View JavaScript license information.": "Wyświetl informację o licencji JavaScript.",
 | 
					    "View JavaScript license information.": "Wyświetl informację o licencji JavaScript.",
 | 
				
			||||||
    "View privacy policy.": "Polityka prywatności.",
 | 
					    "View privacy policy.": "Polityka prywatności.",
 | 
				
			||||||
    "Trending": "Na czasie",
 | 
					    "Trending": "Na czasie",
 | 
				
			||||||
    "Unlisted": "",
 | 
					    "Unlisted": "",
 | 
				
			||||||
  "Watch video on Youtube": "Zobacz film na YouTube",
 | 
					    "Watch on YouTube": "Zobacz film na YouTube",
 | 
				
			||||||
 | 
					    "Hide annotations": "",
 | 
				
			||||||
 | 
					    "Show annotations": "",
 | 
				
			||||||
    "Genre: ": "Gatunek: ",
 | 
					    "Genre: ": "Gatunek: ",
 | 
				
			||||||
    "License: ": "Licencja: ",
 | 
					    "License: ": "Licencja: ",
 | 
				
			||||||
    "Family friendly? ": "Przyjazny rodzinie? ",
 | 
					    "Family friendly? ": "Przyjazny rodzinie? ",
 | 
				
			||||||
@ -113,8 +131,9 @@
 | 
				
			|||||||
    "Whitelisted regions: ": "Dostępny na obszarach: ",
 | 
					    "Whitelisted regions: ": "Dostępny na obszarach: ",
 | 
				
			||||||
    "Blacklisted regions: ": "Niedostępny na obszarach: ",
 | 
					    "Blacklisted regions: ": "Niedostępny na obszarach: ",
 | 
				
			||||||
    "Shared `x`": "Udostępniono `x`",
 | 
					    "Shared `x`": "Udostępniono `x`",
 | 
				
			||||||
  "Premieres in `x`": "",
 | 
					    "`x` views": "`x` wyświetleń",
 | 
				
			||||||
  "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.",
 | 
					    "Premieres in `x`": "Publikacja za `x`",
 | 
				
			||||||
 | 
					    "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.": "Cześć! Wygląda na to, że masz wyłączoną obsługę JavaScriptu. Kliknij tutaj, żeby zobaczyć komentarze. Pamiętaj, że wczytywanie może potrwać dłużej.",
 | 
				
			||||||
    "View YouTube comments": "Wyświetl komentarze z YouTube",
 | 
					    "View YouTube comments": "Wyświetl komentarze z YouTube",
 | 
				
			||||||
    "View more comments on Reddit": "Wyświetl więcej komentarzy na Reddicie",
 | 
					    "View more comments on Reddit": "Wyświetl więcej komentarzy na Reddicie",
 | 
				
			||||||
    "View `x` comments": "Wyświetl `x` komentarzy",
 | 
					    "View `x` comments": "Wyświetl `x` komentarzy",
 | 
				
			||||||
@ -123,19 +142,19 @@
 | 
				
			|||||||
    "Show replies": "Pokaż odpowiedzi",
 | 
					    "Show replies": "Pokaż odpowiedzi",
 | 
				
			||||||
    "Incorrect password": "Niepoprawne hasło",
 | 
					    "Incorrect password": "Niepoprawne hasło",
 | 
				
			||||||
    "Quota exceeded, try again in a few hours": "Przekroczony limit zapytań, spróbuj ponownie za kilka godzin",
 | 
					    "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.",
 | 
					    "Unable to log in, make sure two-factor authentication (Authenticator or SMS) is turned on.": "Nie udało się zalogować, upewnij się, że dwuetapowe uwierzytelnianie (Autentykator lub SMS) jest aktywne.",
 | 
				
			||||||
    "Invalid TFA code": "Niepoprawny kod TFA",
 | 
					    "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.",
 | 
					    "Login failed. This may be because two-factor authentication is not turned on for your account.": "Nie udało się zalogować. To może być spowodowane wyłączoną dwustopniową autoryzacją na twoim koncie.",
 | 
				
			||||||
  "Invalid answer": "Niepoprawna odpowiedź",
 | 
					    "Wrong answer": "Niepoprawna odpowiedź",
 | 
				
			||||||
  "Invalid CAPTCHA": "CAPTCHA wykonane błędnie",
 | 
					    "Erroneous CAPTCHA": "CAPTCHA wykonane błędnie",
 | 
				
			||||||
    "CAPTCHA is a required field": "CAPTCHA jest polem wymaganym",
 | 
					    "CAPTCHA is a required field": "CAPTCHA jest polem wymaganym",
 | 
				
			||||||
    "User ID is a required field": "ID użytkownika 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",
 | 
					    "Password is a required field": "Hasło jest polem wymaganym",
 | 
				
			||||||
  "Invalid username or password": "Niepoprawny login lub hasło",
 | 
					    "Wrong 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\"",
 | 
					    "Please sign in using 'Log 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 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",
 | 
					    "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ć",
 | 
					    "Please log in": "Proszę się zalogować",
 | 
				
			||||||
    "Invidious Private Feed for `x`": "",
 | 
					    "Invidious Private Feed for `x`": "",
 | 
				
			||||||
    "channel:`x`": "kanał:`x",
 | 
					    "channel:`x`": "kanał:`x",
 | 
				
			||||||
    "Deleted or invalid channel": "Usunięty lub niepoprawny kanał",
 | 
					    "Deleted or invalid channel": "Usunięty lub niepoprawny kanał",
 | 
				
			||||||
@ -147,15 +166,15 @@
 | 
				
			|||||||
    "Load more": "Wczytaj więcej",
 | 
					    "Load more": "Wczytaj więcej",
 | 
				
			||||||
    "`x` points": "`x` punktów",
 | 
					    "`x` points": "`x` punktów",
 | 
				
			||||||
    "Could not create mix.": "Nie udało się utworzyć miksu.",
 | 
					    "Could not create mix.": "Nie udało się utworzyć miksu.",
 | 
				
			||||||
  "Playlist is empty": "Lista odtwarzania jest pusta",
 | 
					    "Empty playlist": "Lista odtwarzania jest pusta",
 | 
				
			||||||
  "Invalid playlist.": "Niepoprawna lista.",
 | 
					    "Not a playlist.": "Niepoprawna lista.",
 | 
				
			||||||
    "Playlist does not exist.": "Lista odtwarzania nie istnieje.",
 | 
					    "Playlist does not exist.": "Lista odtwarzania nie istnieje.",
 | 
				
			||||||
    "Could not pull trending pages.": "Nie udało się pobrać strony na czasie.",
 | 
					    "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 \"challenge\" is a required field": "Ukryte pole \"wyzwanie\" jest polem wymaganym",
 | 
				
			||||||
    "Hidden field \"token\" is a required field": "Ukryte pole \"token\" jest polem wymaganym",
 | 
					    "Hidden field \"token\" is a required field": "Ukryte pole \"token\" jest polem wymaganym",
 | 
				
			||||||
  "Invalid challenge": "Niepoprawne wyzwanie",
 | 
					    "Erroneous challenge": "Niepoprawne wyzwanie",
 | 
				
			||||||
  "Invalid token": "Niepoprawny token",
 | 
					    "Erroneous token": "Niepoprawny token",
 | 
				
			||||||
  "Invalid user": "Niepoprawny użytkownik",
 | 
					    "No such user": "Niepoprawny użytkownik",
 | 
				
			||||||
    "Token is expired, please try again": "Token wygasł, spróbuj ponownie",
 | 
					    "Token is expired, please try again": "Token wygasł, spróbuj ponownie",
 | 
				
			||||||
    "English": "angielski",
 | 
					    "English": "angielski",
 | 
				
			||||||
    "English (auto-generated)": "angielski (automatycznie generowane)",
 | 
					    "English (auto-generated)": "angielski (automatycznie generowane)",
 | 
				
			||||||
@ -224,7 +243,7 @@
 | 
				
			|||||||
    "Marathi": "marathi",
 | 
					    "Marathi": "marathi",
 | 
				
			||||||
    "Mongolian": "mongolski",
 | 
					    "Mongolian": "mongolski",
 | 
				
			||||||
    "Nepali": "nepalski",
 | 
					    "Nepali": "nepalski",
 | 
				
			||||||
  "Norwegian": "norweski",
 | 
					    "Norwegian Bokmål": "norweski",
 | 
				
			||||||
    "Nyanja": "njandża",
 | 
					    "Nyanja": "njandża",
 | 
				
			||||||
    "Pashto": "paszto",
 | 
					    "Pashto": "paszto",
 | 
				
			||||||
    "Persian": "perski",
 | 
					    "Persian": "perski",
 | 
				
			||||||
@ -276,6 +295,7 @@
 | 
				
			|||||||
    "About": "Informacje",
 | 
					    "About": "Informacje",
 | 
				
			||||||
    "Rating: ": "Ocena: ",
 | 
					    "Rating: ": "Ocena: ",
 | 
				
			||||||
    "Language: ": "Język: ",
 | 
					    "Language: ": "Język: ",
 | 
				
			||||||
 | 
					    "View as playlist": "Obejrzyj w playliście",
 | 
				
			||||||
    "Default": "Domyślnie",
 | 
					    "Default": "Domyślnie",
 | 
				
			||||||
    "Music": "Muzyka",
 | 
					    "Music": "Muzyka",
 | 
				
			||||||
    "Gaming": "Gry",
 | 
					    "Gaming": "Gry",
 | 
				
			||||||
@ -285,8 +305,8 @@
 | 
				
			|||||||
    "Download as: ": "Pobierz jako: ",
 | 
					    "Download as: ": "Pobierz jako: ",
 | 
				
			||||||
    "%A %B %-d, %Y": "",
 | 
					    "%A %B %-d, %Y": "",
 | 
				
			||||||
    "(edited)": "(edytowany)",
 | 
					    "(edited)": "(edytowany)",
 | 
				
			||||||
  "Youtube permalink of the comment": "Odnośnik bezpośredni do komentarza na YouTube",
 | 
					    "YouTube comment permalink": "Odnośnik bezpośredni do komentarza na YouTube",
 | 
				
			||||||
  "`x` marked it with a ❤": "'x' oznaczonych ❤",
 | 
					    "`x` marked it with a ❤": "`x` oznaczonych ❤",
 | 
				
			||||||
    "Audio mode": "Tryb audio",
 | 
					    "Audio mode": "Tryb audio",
 | 
				
			||||||
    "Video mode": "Tryb wideo",
 | 
					    "Video mode": "Tryb wideo",
 | 
				
			||||||
    "Videos": "Filmy",
 | 
					    "Videos": "Filmy",
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										206
									
								
								locales/ru.json
									
									
									
									
									
								
							
							
						
						
									
										206
									
								
								locales/ru.json
									
									
									
									
									
								
							@ -5,160 +5,177 @@
 | 
				
			|||||||
    "Shared `x` ago": "Опубликовано `x` назад",
 | 
					    "Shared `x` ago": "Опубликовано `x` назад",
 | 
				
			||||||
    "Unsubscribe": "Отписаться",
 | 
					    "Unsubscribe": "Отписаться",
 | 
				
			||||||
    "Subscribe": "Подписаться",
 | 
					    "Subscribe": "Подписаться",
 | 
				
			||||||
  "Login to subscribe to `x`": "Войти, чтобы подписаться на `x`",
 | 
					    "View channel on YouTube": "Смотреть канал на YouTube",
 | 
				
			||||||
  "View channel on YouTube": "Канал на YouTube",
 | 
					    "View playlist on YouTube": "",
 | 
				
			||||||
  "newest": "новые",
 | 
					    "newest": "самые свежие",
 | 
				
			||||||
  "oldest": "старые",
 | 
					    "oldest": "самые старые",
 | 
				
			||||||
    "popular": "популярные",
 | 
					    "popular": "популярные",
 | 
				
			||||||
  "last": "недавно обновленные",
 | 
					    "last": "недавние",
 | 
				
			||||||
    "Next page": "Следующая страница",
 | 
					    "Next page": "Следующая страница",
 | 
				
			||||||
    "Previous page": "Предыдущая страница",
 | 
					    "Previous page": "Предыдущая страница",
 | 
				
			||||||
    "Clear watch history?": "Очистить историю просмотров?",
 | 
					    "Clear watch history?": "Очистить историю просмотров?",
 | 
				
			||||||
 | 
					    "New password": "Новый пароль",
 | 
				
			||||||
 | 
					    "New passwords must match": "Новые пароли не совпадают",
 | 
				
			||||||
 | 
					    "Cannot change password for Google accounts": "Изменить пароль аккаунта Google невозможно",
 | 
				
			||||||
 | 
					    "Authorize token?": "Авторизовать токен?",
 | 
				
			||||||
 | 
					    "Authorize token for `x`?": "Авторизовать токен для `x`?",
 | 
				
			||||||
    "Yes": "Да",
 | 
					    "Yes": "Да",
 | 
				
			||||||
    "No": "Нет",
 | 
					    "No": "Нет",
 | 
				
			||||||
    "Import and Export Data": "Импорт и экспорт данных",
 | 
					    "Import and Export Data": "Импорт и экспорт данных",
 | 
				
			||||||
    "Import": "Импорт",
 | 
					    "Import": "Импорт",
 | 
				
			||||||
    "Import Invidious data": "Импортировать данные Invidious",
 | 
					    "Import Invidious data": "Импортировать данные Invidious",
 | 
				
			||||||
  "Import YouTube subscriptions": "Импортировать YouTube подписки",
 | 
					    "Import YouTube subscriptions": "Импортировать подписки из YouTube",
 | 
				
			||||||
  "Import FreeTube subscriptions (.db)": "Импортировать FreeTube подписки (.db)",
 | 
					    "Import FreeTube subscriptions (.db)": "Импортировать подписки из FreeTube (.db)",
 | 
				
			||||||
  "Import NewPipe subscriptions (.json)": "Импортировать NewPipe подписки (.json)",
 | 
					    "Import NewPipe subscriptions (.json)": "Импортировать подписки из NewPipe (.json)",
 | 
				
			||||||
  "Import NewPipe data (.zip)": "Импортировать данные NewPipe (.zip)",
 | 
					    "Import NewPipe data (.zip)": "Импортировать данные из NewPipe (.zip)",
 | 
				
			||||||
    "Export": "Экспорт",
 | 
					    "Export": "Экспорт",
 | 
				
			||||||
  "Export subscriptions as OPML": "Экспортировать подписки в OPML",
 | 
					    "Export subscriptions as OPML": "Экспортировать подписки в формате OPML",
 | 
				
			||||||
  "Export subscriptions as OPML (for NewPipe & FreeTube)": "Экспортировать подписки в OPML (для NewPipe и FreeTube)",
 | 
					    "Export subscriptions as OPML (for NewPipe & FreeTube)": "Экспортировать подписки в формате OPML (для NewPipe и FreeTube)",
 | 
				
			||||||
  "Export data as JSON": "Экспортировать данные в JSON",
 | 
					    "Export data as JSON": "Экспортировать данные в формате JSON",
 | 
				
			||||||
    "Delete account?": "Удалить аккаунт?",
 | 
					    "Delete account?": "Удалить аккаунт?",
 | 
				
			||||||
    "History": "История",
 | 
					    "History": "История",
 | 
				
			||||||
    "An alternative front-end to YouTube": "Альтернативный фронтенд для YouTube",
 | 
					    "An alternative front-end to YouTube": "Альтернативный фронтенд для YouTube",
 | 
				
			||||||
  "JavaScript license information": "Лицензии JavaScript",
 | 
					    "JavaScript license information": "Информация о лицензиях JavaScript",
 | 
				
			||||||
    "source": "источник",
 | 
					    "source": "источник",
 | 
				
			||||||
  "Login": "Войти",
 | 
					    "Log in": "Войти",
 | 
				
			||||||
  "Login/Register": "Войти/Регистрация",
 | 
					    "Log in/register": "Войти или зарегистрироваться",
 | 
				
			||||||
  "Login to Google": "Войти через Google",
 | 
					    "Log in with Google": "Войти через Google",
 | 
				
			||||||
  "User ID:": "ID пользователя:",
 | 
					    "User ID": "ID пользователя",
 | 
				
			||||||
  "Password:": "Пароль:",
 | 
					    "Password": "Пароль",
 | 
				
			||||||
    "Time (h:mm:ss):": "Время (ч:мм:сс):",
 | 
					    "Time (h:mm:ss):": "Время (ч:мм:сс):",
 | 
				
			||||||
    "Text CAPTCHA": "Текст капчи",
 | 
					    "Text CAPTCHA": "Текст капчи",
 | 
				
			||||||
    "Image CAPTCHA": "Изображение капчи",
 | 
					    "Image CAPTCHA": "Изображение капчи",
 | 
				
			||||||
    "Sign In": "Войти",
 | 
					    "Sign In": "Войти",
 | 
				
			||||||
  "Register": "Регистрация",
 | 
					    "Register": "Зарегистрироваться",
 | 
				
			||||||
  "Email:": "Эл. почта:",
 | 
					    "E-mail": "Электронная почта",
 | 
				
			||||||
  "Google verification code:": "Код подтверждения Google:",
 | 
					    "Google verification code": "Код подтверждения Google",
 | 
				
			||||||
    "Preferences": "Настройки",
 | 
					    "Preferences": "Настройки",
 | 
				
			||||||
    "Player preferences": "Настройки проигрывателя",
 | 
					    "Player preferences": "Настройки проигрывателя",
 | 
				
			||||||
    "Always loop: ": "Всегда повторять: ",
 | 
					    "Always loop: ": "Всегда повторять: ",
 | 
				
			||||||
    "Autoplay: ": "Автовоспроизведение: ",
 | 
					    "Autoplay: ": "Автовоспроизведение: ",
 | 
				
			||||||
  "Autoplay next video: ": "Автовоспроизведение следующего видео: ",
 | 
					    "Play next by default: ": "Всегда включать следующее видео? ",
 | 
				
			||||||
  "Listen by default: ": "Режим \"только аудио\" по-умолчанию: ",
 | 
					    "Autoplay next video: ": "Автопроигрывание следующего видео: ",
 | 
				
			||||||
  "Proxy videos? ": "Проксировать видео? ",
 | 
					    "Listen by default: ": "Режим «только аудио» по умолчанию: ",
 | 
				
			||||||
  "Default speed: ": "Скорость по-умолчанию: ",
 | 
					    "Proxy videos? ": "Проигрывать видео через прокси? ",
 | 
				
			||||||
 | 
					    "Default speed: ": "Скорость видео по умолчанию: ",
 | 
				
			||||||
    "Preferred video quality: ": "Предпочтительное качество видео: ",
 | 
					    "Preferred video quality: ": "Предпочтительное качество видео: ",
 | 
				
			||||||
  "Player volume: ": "Громкость воспроизведения: ",
 | 
					    "Player volume: ": "Громкость видео: ",
 | 
				
			||||||
    "Default comments: ": "Источник комментариев: ",
 | 
					    "Default comments: ": "Источник комментариев: ",
 | 
				
			||||||
    "youtube": "YouTube",
 | 
					    "youtube": "YouTube",
 | 
				
			||||||
    "reddit": "Reddit",
 | 
					    "reddit": "Reddit",
 | 
				
			||||||
  "Default captions: ": "Субтитры по-умолчанию: ",
 | 
					    "Default captions: ": "Основной язык субтитров: ",
 | 
				
			||||||
  "Fallback captions: ": "Резервные субтитры: ",
 | 
					    "Fallback captions: ": "Дополнительный язык субтитров: ",
 | 
				
			||||||
    "Show related videos? ": "Показывать похожие видео? ",
 | 
					    "Show related videos? ": "Показывать похожие видео? ",
 | 
				
			||||||
  "Visual preferences": "Визуальные настройки",
 | 
					    "Show annotations by default? ": "Всегда показывать аннотации? ",
 | 
				
			||||||
  "Dark mode: ": "Темная тема: ",
 | 
					    "Visual preferences": "Настройки сайта",
 | 
				
			||||||
  "Thin mode: ": "Облегченный режим: ",
 | 
					    "Dark mode: ": "Тёмное оформление: ",
 | 
				
			||||||
 | 
					    "Thin mode: ": "Облегчённое оформление: ",
 | 
				
			||||||
    "Subscription preferences": "Настройки подписок",
 | 
					    "Subscription preferences": "Настройки подписок",
 | 
				
			||||||
  "Redirect homepage to feed: ": "Отображать ленту вместо главной страницы: ",
 | 
					    "Show annotations by default for subscribed channels? ": "Всегда показывать аннотации в видео каналов, на которые вы подписаны? ",
 | 
				
			||||||
  "Number of videos shown in feed: ": "Число видео в ленте: ",
 | 
					    "Redirect homepage to feed: ": "Отображать видео с каналов, на которые вы подписаны, как главную страницу: ",
 | 
				
			||||||
  "Sort videos by: ": "Сортировать видео по: ",
 | 
					    "Number of videos shown in feed: ": "Число видео, на которые вы подписаны, в ленте: ",
 | 
				
			||||||
  "published": "дате публикации",
 | 
					    "Sort videos by: ": "Сортировать видео: ",
 | 
				
			||||||
  "published - reverse": "дате - обратный порядок",
 | 
					    "published": "по дате публикации",
 | 
				
			||||||
  "alphabetically": "алфавиту",
 | 
					    "published - reverse": "по дате публикации в обратном порядке",
 | 
				
			||||||
  "alphabetically - reverse": "алфавиту - обратный порядок",
 | 
					    "alphabetically": "по алфавиту",
 | 
				
			||||||
  "channel name": "имени канала",
 | 
					    "alphabetically - reverse": "по алфавиту в обратном порядке",
 | 
				
			||||||
  "channel name - reverse": "имени канала - обратный порядок",
 | 
					    "channel name": "по названию канала",
 | 
				
			||||||
  "Only show latest video from channel: ": "Отображать только последние видео с каждого канала: ",
 | 
					    "channel name - reverse": "по названию канала в обратном порядке",
 | 
				
			||||||
  "Only show latest unwatched video from channel: ": "Отображать только непросмотренные видео с каждого канала: ",
 | 
					    "Only show latest video from channel: ": "Показывать только последние видео с каналов: ",
 | 
				
			||||||
  "Only show unwatched: ": "Отображать только непросмотренные видео: ",
 | 
					    "Only show latest unwatched video from channel: ": "Показывать только непросмотренные видео с каналов: ",
 | 
				
			||||||
  "Only show notifications (if there are any): ": "Отображать только оповещения (если есть): ",
 | 
					    "Only show unwatched: ": "Показывать только непросмотренные видео: ",
 | 
				
			||||||
 | 
					    "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": "Управление подписками",
 | 
					    "Change password": "Изменить пароль",
 | 
				
			||||||
 | 
					    "Manage subscriptions": "Управлять подписками",
 | 
				
			||||||
 | 
					    "Manage tokens": "Управлять токенами",
 | 
				
			||||||
    "Watch history": "История просмотров",
 | 
					    "Watch history": "История просмотров",
 | 
				
			||||||
    "Delete account": "Удалить аккаунт",
 | 
					    "Delete account": "Удалить аккаунт",
 | 
				
			||||||
  "Administrator preferences": "Настройки администратора",
 | 
					    "Administrator preferences": "Администраторские настройки",
 | 
				
			||||||
    "Default homepage: ": "Главная страница по умолчанию: ",
 | 
					    "Default homepage: ": "Главная страница по умолчанию: ",
 | 
				
			||||||
  "Feed menu: ": "Меню ленты: ",
 | 
					    "Feed menu: ": "Меню ленты видео: ",
 | 
				
			||||||
  "Top enabled? ": "Включить ТОП? ",
 | 
					    "Top enabled? ": "Включить топ видео? ",
 | 
				
			||||||
    "CAPTCHA enabled? ": "Включить капчу? ",
 | 
					    "CAPTCHA enabled? ": "Включить капчу? ",
 | 
				
			||||||
  "Login enabled? ": "Включить логин? ",
 | 
					    "Login enabled? ": "Включить авторизацию? ",
 | 
				
			||||||
    "Registration enabled? ": "Включить регистрацию? ",
 | 
					    "Registration enabled? ": "Включить регистрацию? ",
 | 
				
			||||||
  "Report statistics? ": "Отображать статистику? ",
 | 
					    "Report statistics? ": "Сообщать статистику? ",
 | 
				
			||||||
    "Save preferences": "Сохранить настройки",
 | 
					    "Save preferences": "Сохранить настройки",
 | 
				
			||||||
    "Subscription manager": "Менеджер подписок",
 | 
					    "Subscription manager": "Менеджер подписок",
 | 
				
			||||||
 | 
					    "Token manager": "Менеджер токенов",
 | 
				
			||||||
 | 
					    "Token": "Токен",
 | 
				
			||||||
    "`x` subscriptions": "`x` подписок",
 | 
					    "`x` subscriptions": "`x` подписок",
 | 
				
			||||||
  "Import/Export": "Импорт/Экспорт",
 | 
					    "`x` tokens": "`x` токенов",
 | 
				
			||||||
 | 
					    "Import/export": "Импорт и экспорт",
 | 
				
			||||||
    "unsubscribe": "отписаться",
 | 
					    "unsubscribe": "отписаться",
 | 
				
			||||||
 | 
					    "revoke": "отозвать",
 | 
				
			||||||
    "Subscriptions": "Подписки",
 | 
					    "Subscriptions": "Подписки",
 | 
				
			||||||
  "`x` unseen notifications": "`x` новых оповещений",
 | 
					    "`x` unseen notifications": "`x` непросмотренных оповещений",
 | 
				
			||||||
    "search": "поиск",
 | 
					    "search": "поиск",
 | 
				
			||||||
  "Sign out": "Выйти",
 | 
					    "Log out": "Выйти",
 | 
				
			||||||
  "Released under the AGPLv3 by Omar Roth.": "Распространяется Omar Roth по AGPLv3.",
 | 
					    "Released under the AGPLv3 by Omar Roth.": "Реализовано Омаром Ротом по лицензии AGPLv3.",
 | 
				
			||||||
    "Source available here.": "Исходный код доступен здесь.",
 | 
					    "Source available here.": "Исходный код доступен здесь.",
 | 
				
			||||||
  "View JavaScript license information.": "Посмотреть лицензии JavaScript кода.",
 | 
					    "View JavaScript license information.": "Посмотреть информацию по лицензии JavaScript.",
 | 
				
			||||||
  "View privacy policy.": "См. политику конфиденциальности.",
 | 
					    "View privacy policy.": "Посмотреть политику конфиденциальности.",
 | 
				
			||||||
    "Trending": "В тренде",
 | 
					    "Trending": "В тренде",
 | 
				
			||||||
  "Unlisted": "",
 | 
					    "Unlisted": "Нет в списке",
 | 
				
			||||||
  "Watch video on Youtube": "Смотреть на YouTube",
 | 
					    "Watch on YouTube": "Смотреть на YouTube",
 | 
				
			||||||
 | 
					    "Hide annotations": "Скрыть аннотации",
 | 
				
			||||||
 | 
					    "Show annotations": "Показать аннотации",
 | 
				
			||||||
    "Genre: ": "Жанр: ",
 | 
					    "Genre: ": "Жанр: ",
 | 
				
			||||||
    "License: ": "Лицензия: ",
 | 
					    "License: ": "Лицензия: ",
 | 
				
			||||||
    "Family friendly? ": "Семейный просмотр: ",
 | 
					    "Family friendly? ": "Семейный просмотр: ",
 | 
				
			||||||
  "Wilson score: ": "Рейтинг Вильсона: ",
 | 
					    "Wilson score: ": "Рейтинг Уилсона: ",
 | 
				
			||||||
  "Engagement: ": "Вовлеченность: ",
 | 
					    "Engagement: ": "Вовлечённость: ",
 | 
				
			||||||
  "Whitelisted regions: ": "Доступно для: ",
 | 
					    "Whitelisted regions: ": "Доступно в регионах: ",
 | 
				
			||||||
  "Blacklisted regions: ": "Недоступно для: ",
 | 
					    "Blacklisted regions: ": "Недоступно в регионах: ",
 | 
				
			||||||
    "Shared `x`": "Опубликовано `x`",
 | 
					    "Shared `x`": "Опубликовано `x`",
 | 
				
			||||||
  "Premieres in `x`": "",
 | 
					    "`x` views": "`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. Нажмите сюда, чтобы увидеть комментарии (учтите, что они могут загружаться дольше).",
 | 
					    "Premieres in `x`": "Премьера через `x`",
 | 
				
			||||||
 | 
					    "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.": "Похоже, у вас отключён JavaScript. Чтобы увидить комментарии, нажмите сюда, но учтите: они могут загружаться немного медленнее.",
 | 
				
			||||||
    "View YouTube comments": "Смотреть комментарии с YouTube",
 | 
					    "View YouTube comments": "Смотреть комментарии с YouTube",
 | 
				
			||||||
  "View more comments on Reddit": "Больше комментариев на Reddit",
 | 
					    "View more comments on Reddit": "Посмотреть больше комментариев на Reddit",
 | 
				
			||||||
    "View `x` comments": "Показать `x` комментариев",
 | 
					    "View `x` comments": "Показать `x` комментариев",
 | 
				
			||||||
    "View Reddit comments": "Смотреть комментарии с Reddit",
 | 
					    "View Reddit comments": "Смотреть комментарии с Reddit",
 | 
				
			||||||
    "Hide replies": "Скрыть ответы",
 | 
					    "Hide replies": "Скрыть ответы",
 | 
				
			||||||
    "Show replies": "Показать ответы",
 | 
					    "Show replies": "Показать ответы",
 | 
				
			||||||
    "Incorrect password": "Неправильный пароль",
 | 
					    "Incorrect password": "Неправильный пароль",
 | 
				
			||||||
  "Quota exceeded, try again in a few hours": "Превышена квота, попробуйте снова через несколько часов",
 | 
					    "Quota exceeded, try again in a few hours": "Лимит превышен, попробуйте снова через несколько часов",
 | 
				
			||||||
  "Unable to login, make sure two-factor authentication (Authenticator or SMS) is enabled.": "Вход не выполнен, проверьте, не включена ли двухфакторная аутентификация.",
 | 
					    "Unable to log in, make sure two-factor authentication (Authenticator or SMS) is turned on.": "Войти не удаётся. Проверьте, не включена ли двухфакторная аутентификация (по коду или смс).",
 | 
				
			||||||
  "Invalid TFA code": "Неправильный TFA код",
 | 
					    "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 turned on for your account.": "Не удаётся войти. Это может быть из-за того, что в вашем аккаунте не включена двухфакторная аутентификация.",
 | 
				
			||||||
  "Invalid answer": "Неверный ответ",
 | 
					    "Wrong answer": "Неправильный ответ",
 | 
				
			||||||
  "Invalid CAPTCHA": "Неверная капча",
 | 
					    "Erroneous CAPTCHA": "Неправильная капча",
 | 
				
			||||||
  "CAPTCHA is a required field": "Необходимо ввести капчу",
 | 
					    "CAPTCHA is a required field": "Необходимо пройти капчу",
 | 
				
			||||||
  "User ID is a required field": "Необходимо ввести идентификатор пользователя",
 | 
					    "User ID is a required field": "Необходимо ввести ID пользователя",
 | 
				
			||||||
    "Password is a required field": "Необходимо ввести пароль",
 | 
					    "Password is a required field": "Необходимо ввести пароль",
 | 
				
			||||||
  "Invalid username or password": "Недопустимый пароль или имя пользователя",
 | 
					    "Wrong username or password": "Неправильный логин или пароль",
 | 
				
			||||||
  "Please sign in using 'Sign in with Google'": "Пожалуйста войдите через Google",
 | 
					    "Please sign in using 'Log in with Google'": "Пожалуйста, нажмите «Войти через Google»",
 | 
				
			||||||
    "Password cannot be empty": "Пароль не может быть пустым",
 | 
					    "Password cannot be empty": "Пароль не может быть пустым",
 | 
				
			||||||
    "Password cannot be longer than 55 characters": "Пароль не может быть длиннее 55 символов",
 | 
					    "Password cannot be longer than 55 characters": "Пароль не может быть длиннее 55 символов",
 | 
				
			||||||
  "Please sign in": "Пожалуйста, войдите",
 | 
					    "Please log in": "Пожалуйста, войдите",
 | 
				
			||||||
    "Invidious Private Feed for `x`": "Приватная лента Invidious для `x`",
 | 
					    "Invidious Private Feed for `x`": "Приватная лента Invidious для `x`",
 | 
				
			||||||
    "channel:`x`": "канал: `x`",
 | 
					    "channel:`x`": "канал: `x`",
 | 
				
			||||||
  "Deleted or invalid channel": "Канал удален или не найден",
 | 
					    "Deleted or invalid channel": "Канал удалён или не найден",
 | 
				
			||||||
  "This channel does not exist.": "Такой канал не существует.",
 | 
					    "This channel does not exist.": "Такого канала не существует.",
 | 
				
			||||||
  "Could not get channel info.": "Невозможно получить информацию о канале.",
 | 
					    "Could not get channel info.": "Не удаётся получить информацию об этом канале.",
 | 
				
			||||||
  "Could not fetch comments": "Невозможно получить комментарии",
 | 
					    "Could not fetch comments": "Не удаётся загрузить комментарии",
 | 
				
			||||||
    "View `x` replies": "Показать `x` ответов",
 | 
					    "View `x` replies": "Показать `x` ответов",
 | 
				
			||||||
    "`x` ago": "`x` назад",
 | 
					    "`x` ago": "`x` назад",
 | 
				
			||||||
    "Load more": "Загрузить больше",
 | 
					    "Load more": "Загрузить больше",
 | 
				
			||||||
    "`x` points": "`x` очков",
 | 
					    "`x` points": "`x` очков",
 | 
				
			||||||
  "Could not create mix.": "Невозможно создать \"микс\".",
 | 
					    "Could not create mix.": "Не удаётся создать микс.",
 | 
				
			||||||
  "Playlist is empty": "Плейлист пуст",
 | 
					    "Empty playlist": "Плейлист пуст",
 | 
				
			||||||
  "Invalid playlist.": "Некорректный плейлист.",
 | 
					    "Not a playlist.": "Некорректный плейлист.",
 | 
				
			||||||
    "Playlist does not exist.": "Плейлист не существует.",
 | 
					    "Playlist does not exist.": "Плейлист не существует.",
 | 
				
			||||||
  "Could not pull trending pages.": "Невозможно получить страницы \"в тренде\".",
 | 
					    "Could not pull trending pages.": "Не удаётся загрузить страницы «в тренде».",
 | 
				
			||||||
  "Hidden field \"challenge\" is a required field": "Необходимо заполнить скрытое поле \"challenge\"",
 | 
					    "Hidden field \"challenge\" is a required field": "Необходимо заполнить скрытое поле «challenge»",
 | 
				
			||||||
  "Hidden field \"token\" is a required field": "Необходимо заполнить скрытое поле \"токен\"",
 | 
					    "Hidden field \"token\" is a required field": "Необходимо заполнить скрытое поле «токен»",
 | 
				
			||||||
  "Invalid challenge": "Неправильный ответ в \"challenge\"",
 | 
					    "Erroneous challenge": "Неправильный ответ в «challenge»",
 | 
				
			||||||
  "Invalid token": "Неправильный токен",
 | 
					    "Erroneous token": "Неправильный токен",
 | 
				
			||||||
  "Invalid user": "Недопустимое имя пользователя",
 | 
					    "No such user": "Недопустимое имя пользователя",
 | 
				
			||||||
  "Token is expired, please try again": "Срок действия токена истек, попробуйте позже",
 | 
					    "Token is expired, please try again": "Срок действия токена истёк, попробуйте позже",
 | 
				
			||||||
    "English": "Английский",
 | 
					    "English": "Английский",
 | 
				
			||||||
    "English (auto-generated)": "Английский (созданы автоматически)",
 | 
					    "English (auto-generated)": "Английский (созданы автоматически)",
 | 
				
			||||||
    "Afrikaans": "Африкаанс",
 | 
					    "Afrikaans": "Африкаанс",
 | 
				
			||||||
@ -226,7 +243,7 @@
 | 
				
			|||||||
    "Marathi": "Маратхи",
 | 
					    "Marathi": "Маратхи",
 | 
				
			||||||
    "Mongolian": "Монгольская",
 | 
					    "Mongolian": "Монгольская",
 | 
				
			||||||
    "Nepali": "Непальский",
 | 
					    "Nepali": "Непальский",
 | 
				
			||||||
  "Norwegian": "Норвежский",
 | 
					    "Norwegian Bokmål": "Норвежский",
 | 
				
			||||||
    "Nyanja": "Ньянджа",
 | 
					    "Nyanja": "Ньянджа",
 | 
				
			||||||
    "Pashto": "Пушту",
 | 
					    "Pashto": "Пушту",
 | 
				
			||||||
    "Persian": "Персидский",
 | 
					    "Persian": "Персидский",
 | 
				
			||||||
@ -278,6 +295,7 @@
 | 
				
			|||||||
    "About": "О сайте",
 | 
					    "About": "О сайте",
 | 
				
			||||||
    "Rating: ": "Рейтинг: ",
 | 
					    "Rating: ": "Рейтинг: ",
 | 
				
			||||||
    "Language: ": "Язык: ",
 | 
					    "Language: ": "Язык: ",
 | 
				
			||||||
 | 
					    "View as playlist": "Смотреть как плейлист",
 | 
				
			||||||
    "Default": "По-умолчанию",
 | 
					    "Default": "По-умолчанию",
 | 
				
			||||||
    "Music": "Музыка",
 | 
					    "Music": "Музыка",
 | 
				
			||||||
    "Gaming": "Игры",
 | 
					    "Gaming": "Игры",
 | 
				
			||||||
@ -287,7 +305,7 @@
 | 
				
			|||||||
    "Download as: ": "Скачать как: ",
 | 
					    "Download as: ": "Скачать как: ",
 | 
				
			||||||
    "%A %B %-d, %Y": "%-d %B %Y, %A",
 | 
					    "%A %B %-d, %Y": "%-d %B %Y, %A",
 | 
				
			||||||
    "(edited)": "(изменено)",
 | 
					    "(edited)": "(изменено)",
 | 
				
			||||||
  "Youtube permalink of the comment": "Прямая ссылка на YouTube",
 | 
					    "YouTube comment permalink": "Прямая ссылка на YouTube",
 | 
				
			||||||
    "`x` marked it with a ❤": "❤ от автора канала \"`x`\"",
 | 
					    "`x` marked it with a ❤": "❤ от автора канала \"`x`\"",
 | 
				
			||||||
    "Audio mode": "Аудио режим",
 | 
					    "Audio mode": "Аудио режим",
 | 
				
			||||||
    "Video mode": "Видео режим",
 | 
					    "Video mode": "Видео режим",
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										315
									
								
								locales/uk.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										315
									
								
								locales/uk.json
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,315 @@
 | 
				
			|||||||
 | 
					{
 | 
				
			||||||
 | 
					    "`x` subscribers": "`x` підписників",
 | 
				
			||||||
 | 
					    "`x` videos": "`x` відео",
 | 
				
			||||||
 | 
					    "LIVE": "ПРЯМИЙ ЕФІР",
 | 
				
			||||||
 | 
					    "Shared `x` ago": "Розміщено `x` назад",
 | 
				
			||||||
 | 
					    "Unsubscribe": "Відписатися",
 | 
				
			||||||
 | 
					    "Subscribe": "Підписатися",
 | 
				
			||||||
 | 
					    "View channel on YouTube": "Подивитися канал на YouTube",
 | 
				
			||||||
 | 
					    "View playlist on YouTube": "",
 | 
				
			||||||
 | 
					    "newest": "найновіше",
 | 
				
			||||||
 | 
					    "oldest": "найстаріше",
 | 
				
			||||||
 | 
					    "popular": "популярне",
 | 
				
			||||||
 | 
					    "last": "останнє",
 | 
				
			||||||
 | 
					    "Next page": "Наступна сторінка",
 | 
				
			||||||
 | 
					    "Previous page": "Попередня сторінка",
 | 
				
			||||||
 | 
					    "Clear watch history?": "Очистити історію переглядів?",
 | 
				
			||||||
 | 
					    "New password": "Новий пароль",
 | 
				
			||||||
 | 
					    "New passwords must match": "Нові паролі не співпадають",
 | 
				
			||||||
 | 
					    "Cannot change password for Google accounts": "Змінити пароль обліківки Google неможливо",
 | 
				
			||||||
 | 
					    "Authorize token?": "Авторизувати токен?",
 | 
				
			||||||
 | 
					    "Authorize token for `x`?": "Авторизувати токен для `x`?",
 | 
				
			||||||
 | 
					    "Yes": "Так",
 | 
				
			||||||
 | 
					    "No": "Ні",
 | 
				
			||||||
 | 
					    "Import and Export Data": "Імпорт і експорт даних",
 | 
				
			||||||
 | 
					    "Import": "Імпорт",
 | 
				
			||||||
 | 
					    "Import Invidious data": "Імпортувати дані Invidious",
 | 
				
			||||||
 | 
					    "Import YouTube subscriptions": "Імпортувати підписки з YouTube",
 | 
				
			||||||
 | 
					    "Import FreeTube subscriptions (.db)": "Імпортувати підписки з FreeTube (.db)",
 | 
				
			||||||
 | 
					    "Import NewPipe subscriptions (.json)": "Імпортувати підписки з NewPipe (.json)",
 | 
				
			||||||
 | 
					    "Import NewPipe data (.zip)": "Імпортувати дані з NewPipe (.zip)",
 | 
				
			||||||
 | 
					    "Export": "Експорт",
 | 
				
			||||||
 | 
					    "Export subscriptions as OPML": "Експортувати підписки у форматі OPML",
 | 
				
			||||||
 | 
					    "Export subscriptions as OPML (for NewPipe & FreeTube)": "Експортувати підписки у форматі OPML (для NewPipe та FreeTube)",
 | 
				
			||||||
 | 
					    "Export data as JSON": "Експортувати дані у форматі JSON",
 | 
				
			||||||
 | 
					    "Delete account?": "Видалити обліківку?",
 | 
				
			||||||
 | 
					    "History": "Історія",
 | 
				
			||||||
 | 
					    "An alternative front-end to YouTube": "Альтернативний фронтенд до YouTube",
 | 
				
			||||||
 | 
					    "JavaScript license information": "Інформація щодо ліцензій JavaScript",
 | 
				
			||||||
 | 
					    "source": "джерело",
 | 
				
			||||||
 | 
					    "Log in": "Увійти",
 | 
				
			||||||
 | 
					    "Log in/register": "Увійти або зареєструватися",
 | 
				
			||||||
 | 
					    "Log in with Google": "Увійти через Google",
 | 
				
			||||||
 | 
					    "User ID": "ID користувача",
 | 
				
			||||||
 | 
					    "Password": "Пароль",
 | 
				
			||||||
 | 
					    "Time (h:mm:ss):": "Час (г:мм:сс):",
 | 
				
			||||||
 | 
					    "Text CAPTCHA": "Текст капчі",
 | 
				
			||||||
 | 
					    "Image CAPTCHA": "Зображення капчі",
 | 
				
			||||||
 | 
					    "Sign In": "Увійти",
 | 
				
			||||||
 | 
					    "Register": "Зареєструватися",
 | 
				
			||||||
 | 
					    "E-mail": "Електронна пошта",
 | 
				
			||||||
 | 
					    "Google verification code": "Код підтвердження Google",
 | 
				
			||||||
 | 
					    "Preferences": "Налаштування",
 | 
				
			||||||
 | 
					    "Player preferences": "Налаштування програвача",
 | 
				
			||||||
 | 
					    "Always loop: ": "Завжди повторювати: ",
 | 
				
			||||||
 | 
					    "Autoplay: ": "Автовідтворення: ",
 | 
				
			||||||
 | 
					    "Play next by default: ": "Завжди вмикати наступне відео: ",
 | 
				
			||||||
 | 
					    "Autoplay next video: ": "Автовідтворення наступного відео: ",
 | 
				
			||||||
 | 
					    "Listen by default: ": "Режим «тільки звук» як усталений: ",
 | 
				
			||||||
 | 
					    "Proxy videos? ": "Програвати відео через проксі? ",
 | 
				
			||||||
 | 
					    "Default speed: ": "Усталена швидкість відео: ",
 | 
				
			||||||
 | 
					    "Preferred video quality: ": "Пріорітетна якість відео: ",
 | 
				
			||||||
 | 
					    "Player volume: ": "Гучність відео: ",
 | 
				
			||||||
 | 
					    "Default comments: ": "Джерело коментарів: ",
 | 
				
			||||||
 | 
					    "youtube": "YouTube",
 | 
				
			||||||
 | 
					    "reddit": "Reddit",
 | 
				
			||||||
 | 
					    "Default captions: ": "Основна мова субтитрів: ",
 | 
				
			||||||
 | 
					    "Fallback captions: ": "Запасна мова субтитрів: ",
 | 
				
			||||||
 | 
					    "Show related videos? ": "Показувати схожі відео? ",
 | 
				
			||||||
 | 
					    "Show annotations by default? ": "Завжди показувати анотації? ",
 | 
				
			||||||
 | 
					    "Visual preferences": "Налаштування сайту",
 | 
				
			||||||
 | 
					    "Dark mode: ": "Темне оформлення: ",
 | 
				
			||||||
 | 
					    "Thin mode: ": "Полегшене оформлення: ",
 | 
				
			||||||
 | 
					    "Subscription preferences": "Налаштування підписок",
 | 
				
			||||||
 | 
					    "Show annotations by default for subscribed channels? ": "Завжди показувати анотації у відео каналів, на які ви підписані? ",
 | 
				
			||||||
 | 
					    "Redirect homepage to feed: ": "Показувати відео з каналів, на які підписані, як головну сторінку: ",
 | 
				
			||||||
 | 
					    "Number of videos shown in feed: ": "Кількість відео з каналів, на які підписані, у потоці: ",
 | 
				
			||||||
 | 
					    "Sort videos by: ": "Сортувати відео: ",
 | 
				
			||||||
 | 
					    "published": "за датою розміщення",
 | 
				
			||||||
 | 
					    "published - reverse": "за датою розміщення в зворотному порядку",
 | 
				
			||||||
 | 
					    "alphabetically": "за абеткою",
 | 
				
			||||||
 | 
					    "alphabetically - reverse": "за абеткою в зворотному порядку",
 | 
				
			||||||
 | 
					    "channel name": "за назвою каналу",
 | 
				
			||||||
 | 
					    "channel name - reverse": "за назвою каналу в зворотному порядку",
 | 
				
			||||||
 | 
					    "Only show latest video from channel: ": "Показувати тільки останнє відео з каналів: ",
 | 
				
			||||||
 | 
					    "Only show latest unwatched video from channel: ": "Показувати тільки непереглянуті відео з каналів: ",
 | 
				
			||||||
 | 
					    "Only show unwatched: ": "Показувати тільки непереглянуті відео: ",
 | 
				
			||||||
 | 
					    "Only show notifications (if there are any): ": "Показувати лише сповіщення, якщо вони є: ",
 | 
				
			||||||
 | 
					    "Data preferences": "Налаштування даних",
 | 
				
			||||||
 | 
					    "Clear watch history": "Очистити історію переглядів",
 | 
				
			||||||
 | 
					    "Import/export data": "Імпорт і експорт даних",
 | 
				
			||||||
 | 
					    "Change password": "Змінити пароль",
 | 
				
			||||||
 | 
					    "Manage subscriptions": "Керування підписками",
 | 
				
			||||||
 | 
					    "Manage tokens": "Керувати токенами",
 | 
				
			||||||
 | 
					    "Watch history": "Історія переглядів",
 | 
				
			||||||
 | 
					    "Delete account": "Видалити обліківку",
 | 
				
			||||||
 | 
					    "Administrator preferences": "Адміністраторські налаштування",
 | 
				
			||||||
 | 
					    "Default homepage: ": "Усталена домашня сторінка: ",
 | 
				
			||||||
 | 
					    "Feed menu: ": "Меню потоку з відео: ",
 | 
				
			||||||
 | 
					    "Top enabled? ": "Увімкнути топ відео? ",
 | 
				
			||||||
 | 
					    "CAPTCHA enabled? ": "Увімкнути капчу? ",
 | 
				
			||||||
 | 
					    "Login enabled? ": "Увімкнути авторизацію? ",
 | 
				
			||||||
 | 
					    "Registration enabled? ": "Увімкнути реєстрацію? ",
 | 
				
			||||||
 | 
					    "Report statistics? ": "Повідомляти статистику? ",
 | 
				
			||||||
 | 
					    "Save preferences": "Зберегти налаштування",
 | 
				
			||||||
 | 
					    "Subscription manager": "Менеджер підписок",
 | 
				
			||||||
 | 
					    "Token manager": "Менеджер токенів",
 | 
				
			||||||
 | 
					    "Token": "Токен",
 | 
				
			||||||
 | 
					    "`x` subscriptions": "`x` підписка / підписок / підписки",
 | 
				
			||||||
 | 
					    "`x` tokens": "`x` токенів",
 | 
				
			||||||
 | 
					    "Import/export": "Імпорт і експорт",
 | 
				
			||||||
 | 
					    "unsubscribe": "відписатися",
 | 
				
			||||||
 | 
					    "revoke": "скасувати",
 | 
				
			||||||
 | 
					    "Subscriptions": "Підписки",
 | 
				
			||||||
 | 
					    "`x` unseen notifications": "`x` непереглянуте сповіщення / непереглянутих сповіщень / непереглянутих сповіщення",
 | 
				
			||||||
 | 
					    "search": "пошук",
 | 
				
			||||||
 | 
					    "Log out": "Вийти",
 | 
				
			||||||
 | 
					    "Released under the AGPLv3 by Omar Roth.": "Реалізовано Омаром Ротом за ліцензією AGPLv3.",
 | 
				
			||||||
 | 
					    "Source available here.": "Програмний код доступний тут.",
 | 
				
			||||||
 | 
					    "View JavaScript license information.": "Переглянути інформацію щодо ліцензії JavaScript.",
 | 
				
			||||||
 | 
					    "View privacy policy.": "Переглянути політику приватності.",
 | 
				
			||||||
 | 
					    "Trending": "У тренді",
 | 
				
			||||||
 | 
					    "Unlisted": "Немає в списку",
 | 
				
			||||||
 | 
					    "Watch on YouTube": "Дивитися на YouTube",
 | 
				
			||||||
 | 
					    "Hide annotations": "Приховати анотації",
 | 
				
			||||||
 | 
					    "Show annotations": "Показати анотації",
 | 
				
			||||||
 | 
					    "Genre: ": "Жанр: ",
 | 
				
			||||||
 | 
					    "License: ": "Ліцензія: ",
 | 
				
			||||||
 | 
					    "Family friendly? ": "Перегляд із родиною? ",
 | 
				
			||||||
 | 
					    "Wilson score: ": "Рейтинг Вілсона: ",
 | 
				
			||||||
 | 
					    "Engagement: ": "Залученість: ",
 | 
				
			||||||
 | 
					    "Whitelisted regions: ": "Доступно у регіонах: ",
 | 
				
			||||||
 | 
					    "Blacklisted regions: ": "Недоступно у регіонах: ",
 | 
				
			||||||
 | 
					    "Shared `x`": "Розміщено `x`",
 | 
				
			||||||
 | 
					    "`x` views": "`x` переглядів",
 | 
				
			||||||
 | 
					    "Premieres in `x`": "Прем’єра через `x`",
 | 
				
			||||||
 | 
					    "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.": "Схоже, у вас відключений JavaScript. Щоб побачити коментарі, натисніть сюда, але майте на увазі, що вони можуть завантажуватися трохи довше.",
 | 
				
			||||||
 | 
					    "View YouTube comments": "Переглянути коментарі з YouTube",
 | 
				
			||||||
 | 
					    "View more comments on Reddit": "Переглянути більше коментарів на Reddit",
 | 
				
			||||||
 | 
					    "View `x` comments": "Переглянути `x` коментар / коментарів / коментаря",
 | 
				
			||||||
 | 
					    "View Reddit comments": "Переглянути коментарі з Reddit",
 | 
				
			||||||
 | 
					    "Hide replies": "Сховати відповіді",
 | 
				
			||||||
 | 
					    "Show replies": "Показати відповіді",
 | 
				
			||||||
 | 
					    "Incorrect password": "Неправильний пароль",
 | 
				
			||||||
 | 
					    "Quota exceeded, try again in a few hours": "Ліміт перевищено, спробуйте знову за декілька годин",
 | 
				
			||||||
 | 
					    "Unable to log in, make sure two-factor authentication (Authenticator or SMS) is turned on.": "Не вдається увійти. Перевірте, чи не ввімкнена двофакторна аутентифікація (за кодом чи смс).",
 | 
				
			||||||
 | 
					    "Invalid TFA code": "Неправильний код двофакторної аутентифікації",
 | 
				
			||||||
 | 
					    "Login failed. This may be because two-factor authentication is not turned on for your account.": "Не вдається увійти. Це може бути через те, що у вашій обліківці не ввімкнена двофакторна аутентифікація.",
 | 
				
			||||||
 | 
					    "Wrong answer": "Неправильна відповідь",
 | 
				
			||||||
 | 
					    "Erroneous CAPTCHA": "Неправильна капча",
 | 
				
			||||||
 | 
					    "CAPTCHA is a required field": "Необхідно пройти капчу",
 | 
				
			||||||
 | 
					    "User ID is a required field": "Необхідно ввести ID користувача",
 | 
				
			||||||
 | 
					    "Password is a required field": "Необхідно ввести пароль",
 | 
				
			||||||
 | 
					    "Wrong username or password": "Неправильний логін чи пароль",
 | 
				
			||||||
 | 
					    "Please sign in using 'Log in with Google'": "Будь ласка, натисніть «Увійти через Google»",
 | 
				
			||||||
 | 
					    "Password cannot be empty": "Пароль не може бути порожнім",
 | 
				
			||||||
 | 
					    "Password cannot be longer than 55 characters": "Пароль не може бути довшим за 55 знаків",
 | 
				
			||||||
 | 
					    "Please log in": "Будь ласка, увійдіть",
 | 
				
			||||||
 | 
					    "Invidious Private Feed for `x`": "Приватний поток відео Invidious для `x`",
 | 
				
			||||||
 | 
					    "channel:`x`": "канал: `x`",
 | 
				
			||||||
 | 
					    "Deleted or invalid channel": "Канал видалено або не знайдено",
 | 
				
			||||||
 | 
					    "This channel does not exist.": "Такого каналу не існує.",
 | 
				
			||||||
 | 
					    "Could not get channel info.": "Не вдається отримати інформацію щодо цього каналу.",
 | 
				
			||||||
 | 
					    "Could not fetch comments": "Не вдається завантажити коментарі",
 | 
				
			||||||
 | 
					    "View `x` replies": "Переглянути `x` відповідь / відповідей / відповіді",
 | 
				
			||||||
 | 
					    "`x` ago": "`x` тому",
 | 
				
			||||||
 | 
					    "Load more": "Завантажити більше",
 | 
				
			||||||
 | 
					    "`x` points": "`x` очко / очок / очка",
 | 
				
			||||||
 | 
					    "Could not create mix.": "Не вдається створити мікс.",
 | 
				
			||||||
 | 
					    "Empty playlist": "Плейлист порожній",
 | 
				
			||||||
 | 
					    "Not a playlist.": "Недійсний плейлист.",
 | 
				
			||||||
 | 
					    "Playlist does not exist.": "Плейлист не існує.",
 | 
				
			||||||
 | 
					    "Could not pull trending pages.": "Не вдається завантажити сторінки «у тренді».",
 | 
				
			||||||
 | 
					    "Hidden field \"challenge\" is a required field": "Необхідно заповнити приховане поле «challenge»",
 | 
				
			||||||
 | 
					    "Hidden field \"token\" is a required field": "Необхідно заповнити приховане поле «token»",
 | 
				
			||||||
 | 
					    "Erroneous challenge": "Неправильна відповідь у «challenge»",
 | 
				
			||||||
 | 
					    "Erroneous token": "Недійсний токен",
 | 
				
			||||||
 | 
					    "No such user": "Недопустиме ім’я користувача",
 | 
				
			||||||
 | 
					    "Token is expired, please try again": "Термін дії токена закінчився, спробуйте пізніше",
 | 
				
			||||||
 | 
					    "English": "Англійська",
 | 
				
			||||||
 | 
					    "English (auto-generated)": "Англійська (сгенеровано автоматично)",
 | 
				
			||||||
 | 
					    "Afrikaans": "Африкаанс",
 | 
				
			||||||
 | 
					    "Albanian": "Албанська",
 | 
				
			||||||
 | 
					    "Amharic": "Амхарська",
 | 
				
			||||||
 | 
					    "Arabic": "Арабська",
 | 
				
			||||||
 | 
					    "Armenian": "Вірменська",
 | 
				
			||||||
 | 
					    "Azerbaijani": "Азербайджанська",
 | 
				
			||||||
 | 
					    "Bangla": "Бенгальска",
 | 
				
			||||||
 | 
					    "Basque": "Баскська",
 | 
				
			||||||
 | 
					    "Belarusian": "Білоруська",
 | 
				
			||||||
 | 
					    "Bosnian": "Боснійська",
 | 
				
			||||||
 | 
					    "Bulgarian": "Болгарська",
 | 
				
			||||||
 | 
					    "Burmese": "Бірманська",
 | 
				
			||||||
 | 
					    "Catalan": "Каталонська",
 | 
				
			||||||
 | 
					    "Cebuano": "Себуанська",
 | 
				
			||||||
 | 
					    "Chinese (Simplified)": "Китайська (спрощена)",
 | 
				
			||||||
 | 
					    "Chinese (Traditional)": "Китайська (традиційна)",
 | 
				
			||||||
 | 
					    "Corsican": "Корсиканська",
 | 
				
			||||||
 | 
					    "Croatian": "Хорватська",
 | 
				
			||||||
 | 
					    "Czech": "Чеська",
 | 
				
			||||||
 | 
					    "Danish": "Данська",
 | 
				
			||||||
 | 
					    "Dutch": "Нідерландська",
 | 
				
			||||||
 | 
					    "Esperanto": "Есперанто",
 | 
				
			||||||
 | 
					    "Estonian": "Естонська",
 | 
				
			||||||
 | 
					    "Filipino": "Філіппінська",
 | 
				
			||||||
 | 
					    "Finnish": "Фінська",
 | 
				
			||||||
 | 
					    "French": "Французька",
 | 
				
			||||||
 | 
					    "Galician": "Галісійська",
 | 
				
			||||||
 | 
					    "Georgian": "Грузинська",
 | 
				
			||||||
 | 
					    "German": "Німецька",
 | 
				
			||||||
 | 
					    "Greek": "Грецька",
 | 
				
			||||||
 | 
					    "Gujarati": "Гуджаратська",
 | 
				
			||||||
 | 
					    "Haitian Creole": "Гаїтянська креольська",
 | 
				
			||||||
 | 
					    "Hausa": "Хауса",
 | 
				
			||||||
 | 
					    "Hawaiian": "Гавайська",
 | 
				
			||||||
 | 
					    "Hebrew": "Іврит",
 | 
				
			||||||
 | 
					    "Hindi": "Гінді",
 | 
				
			||||||
 | 
					    "Hmong": "Хмонгська",
 | 
				
			||||||
 | 
					    "Hungarian": "Угорська",
 | 
				
			||||||
 | 
					    "Icelandic": "Ісландська",
 | 
				
			||||||
 | 
					    "Igbo": "Ігбо",
 | 
				
			||||||
 | 
					    "Indonesian": "Індонезійська",
 | 
				
			||||||
 | 
					    "Irish": "Ірландська",
 | 
				
			||||||
 | 
					    "Italian": "Італійська",
 | 
				
			||||||
 | 
					    "Japanese": "Японська",
 | 
				
			||||||
 | 
					    "Javanese": "Яванська",
 | 
				
			||||||
 | 
					    "Kannada": "Каннада",
 | 
				
			||||||
 | 
					    "Kazakh": "Казахська",
 | 
				
			||||||
 | 
					    "Khmer": "Кхмерська",
 | 
				
			||||||
 | 
					    "Korean": "Корейська",
 | 
				
			||||||
 | 
					    "Kurdish": "Курдська",
 | 
				
			||||||
 | 
					    "Kyrgyz": "Киргизька",
 | 
				
			||||||
 | 
					    "Lao": "Лаоська",
 | 
				
			||||||
 | 
					    "Latin": "Латинська",
 | 
				
			||||||
 | 
					    "Latvian": "Латиська",
 | 
				
			||||||
 | 
					    "Lithuanian": "Литовська",
 | 
				
			||||||
 | 
					    "Luxembourgish": "Люксембурзька",
 | 
				
			||||||
 | 
					    "Macedonian": "Македонська",
 | 
				
			||||||
 | 
					    "Malagasy": "Малагасійська",
 | 
				
			||||||
 | 
					    "Malay": "Малайська",
 | 
				
			||||||
 | 
					    "Malayalam": "Малаялам",
 | 
				
			||||||
 | 
					    "Maltese": "Мальтійська",
 | 
				
			||||||
 | 
					    "Maori": "Маорі",
 | 
				
			||||||
 | 
					    "Marathi": "Маратхі",
 | 
				
			||||||
 | 
					    "Mongolian": "Монгольська",
 | 
				
			||||||
 | 
					    "Nepali": "Непальська",
 | 
				
			||||||
 | 
					    "Norwegian Bokmål": "Норвезька",
 | 
				
			||||||
 | 
					    "Nyanja": "Ньянджа",
 | 
				
			||||||
 | 
					    "Pashto": "Пушту",
 | 
				
			||||||
 | 
					    "Persian": "Перська",
 | 
				
			||||||
 | 
					    "Polish": "Польська",
 | 
				
			||||||
 | 
					    "Portuguese": "Португальська",
 | 
				
			||||||
 | 
					    "Punjabi": "Пенджабська",
 | 
				
			||||||
 | 
					    "Romanian": "Румунська",
 | 
				
			||||||
 | 
					    "Russian": "Російська",
 | 
				
			||||||
 | 
					    "Samoan": "Самоанська",
 | 
				
			||||||
 | 
					    "Scottish Gaelic": "Шотландська ґельська",
 | 
				
			||||||
 | 
					    "Serbian": "Сербська",
 | 
				
			||||||
 | 
					    "Shona": "Шона",
 | 
				
			||||||
 | 
					    "Sindhi": "Сіндгі",
 | 
				
			||||||
 | 
					    "Sinhala": "Сингальська",
 | 
				
			||||||
 | 
					    "Slovak": "Словацька",
 | 
				
			||||||
 | 
					    "Slovenian": "Словенська",
 | 
				
			||||||
 | 
					    "Somali": "Сомалійська",
 | 
				
			||||||
 | 
					    "Southern Sotho": "Сесото (південна сото)",
 | 
				
			||||||
 | 
					    "Spanish": "Іспанська",
 | 
				
			||||||
 | 
					    "Spanish (Latin America)": "Испанська (Латинська Америка)",
 | 
				
			||||||
 | 
					    "Sundanese": "Сунданська",
 | 
				
			||||||
 | 
					    "Swahili": "Суахілі",
 | 
				
			||||||
 | 
					    "Swedish": "Шведська",
 | 
				
			||||||
 | 
					    "Tajik": "Таджицька",
 | 
				
			||||||
 | 
					    "Tamil": "Тамільська",
 | 
				
			||||||
 | 
					    "Telugu": "Телугу",
 | 
				
			||||||
 | 
					    "Thai": "Тайська",
 | 
				
			||||||
 | 
					    "Turkish": "Турецька",
 | 
				
			||||||
 | 
					    "Ukrainian": "Українська",
 | 
				
			||||||
 | 
					    "Urdu": "Урду",
 | 
				
			||||||
 | 
					    "Uzbek": "Узбецька",
 | 
				
			||||||
 | 
					    "Vietnamese": "В’єтнамська",
 | 
				
			||||||
 | 
					    "Welsh": "Валлійська",
 | 
				
			||||||
 | 
					    "Western Frisian": "Західнофризька",
 | 
				
			||||||
 | 
					    "Xhosa": "Коса",
 | 
				
			||||||
 | 
					    "Yiddish": "Їдиш",
 | 
				
			||||||
 | 
					    "Yoruba": "Йоруба",
 | 
				
			||||||
 | 
					    "Zulu": "Зулу",
 | 
				
			||||||
 | 
					    "`x` years": "`x` років",
 | 
				
			||||||
 | 
					    "`x` months": "`x` місяців",
 | 
				
			||||||
 | 
					    "`x` weeks": "`x` тижнів",
 | 
				
			||||||
 | 
					    "`x` days": "`x` днів",
 | 
				
			||||||
 | 
					    "`x` hours": "`x` годин",
 | 
				
			||||||
 | 
					    "`x` minutes": "`x` хвилин",
 | 
				
			||||||
 | 
					    "`x` seconds": "`x` секунд",
 | 
				
			||||||
 | 
					    "Fallback comments: ": "Резервні коментарі: ",
 | 
				
			||||||
 | 
					    "Popular": "Популярне",
 | 
				
			||||||
 | 
					    "Top": "Топ",
 | 
				
			||||||
 | 
					    "About": "Про сайт",
 | 
				
			||||||
 | 
					    "Rating: ": "Рейтинг: ",
 | 
				
			||||||
 | 
					    "Language: ": "Мова: ",
 | 
				
			||||||
 | 
					    "View as playlist": "Дивитися як плейлист",
 | 
				
			||||||
 | 
					    "Default": "Усталено",
 | 
				
			||||||
 | 
					    "Music": "Музика",
 | 
				
			||||||
 | 
					    "Gaming": "Ігри",
 | 
				
			||||||
 | 
					    "News": "Новини",
 | 
				
			||||||
 | 
					    "Movies": "Фільми",
 | 
				
			||||||
 | 
					    "Download": "Завантажити",
 | 
				
			||||||
 | 
					    "Download as: ": "Завантажити як: ",
 | 
				
			||||||
 | 
					    "%A %B %-d, %Y": "%-d %B %Y, %A",
 | 
				
			||||||
 | 
					    "(edited)": "(змінено)",
 | 
				
			||||||
 | 
					    "YouTube comment permalink": "Пряме посилання на коментар в YouTube",
 | 
				
			||||||
 | 
					    "`x` marked it with a ❤": "❤ цьому від каналу `x`",
 | 
				
			||||||
 | 
					    "Audio mode": "Аудіорежим",
 | 
				
			||||||
 | 
					    "Video mode": "Відеорежим",
 | 
				
			||||||
 | 
					    "Videos": "Відео",
 | 
				
			||||||
 | 
					    "Playlists": "Плейлисти",
 | 
				
			||||||
 | 
					    "Current version: ": "Поточна версія: "
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -1,5 +1,5 @@
 | 
				
			|||||||
name: invidious
 | 
					name: invidious
 | 
				
			||||||
version: 0.15.0
 | 
					version: 0.17.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
authors:
 | 
					authors:
 | 
				
			||||||
  - Omar Roth <omarroth@protonmail.com>
 | 
					  - Omar Roth <omarroth@protonmail.com>
 | 
				
			||||||
@ -16,6 +16,6 @@ dependencies:
 | 
				
			|||||||
  sqlite3:
 | 
					  sqlite3:
 | 
				
			||||||
    github: crystal-lang/crystal-sqlite3
 | 
					    github: crystal-lang/crystal-sqlite3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
crystal: 0.27.2
 | 
					crystal: 0.28.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
license: AGPLv3
 | 
					license: AGPLv3
 | 
				
			||||||
 | 
				
			|||||||
@ -1,13 +1,16 @@
 | 
				
			|||||||
require "kemal"
 | 
					require "kemal"
 | 
				
			||||||
 | 
					require "openssl/hmac"
 | 
				
			||||||
require "pg"
 | 
					require "pg"
 | 
				
			||||||
require "spec"
 | 
					require "spec"
 | 
				
			||||||
require "yaml"
 | 
					require "yaml"
 | 
				
			||||||
require "../src/invidious/helpers/*"
 | 
					require "../src/invidious/helpers/*"
 | 
				
			||||||
require "../src/invidious/channels"
 | 
					require "../src/invidious/channels"
 | 
				
			||||||
 | 
					require "../src/invidious/comments"
 | 
				
			||||||
require "../src/invidious/playlists"
 | 
					require "../src/invidious/playlists"
 | 
				
			||||||
require "../src/invidious/search"
 | 
					require "../src/invidious/search"
 | 
				
			||||||
 | 
					require "../src/invidious/users"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe "Helpers" do
 | 
					describe "Helper" do
 | 
				
			||||||
  describe "#produce_channel_videos_url" do
 | 
					  describe "#produce_channel_videos_url" do
 | 
				
			||||||
    it "correctly produces url for requesting page `x` of a channel's videos" do
 | 
					    it "correctly produces url for requesting page `x` of a channel's videos" do
 | 
				
			||||||
      produce_channel_videos_url(ucid: "UCXuqSBlHAE6Xw-yeJA0Tunw").should eq("/browse_ajax?continuation=4qmFsgI8EhhVQ1h1cVNCbEhBRTZYdy15ZUpBMFR1bncaIEVnWjJhV1JsYjNNd0FqZ0JZQUZxQUxnQkFDQUFlZ0V4&gl=US&hl=en")
 | 
					      produce_channel_videos_url(ucid: "UCXuqSBlHAE6Xw-yeJA0Tunw").should eq("/browse_ajax?continuation=4qmFsgI8EhhVQ1h1cVNCbEhBRTZYdy15ZUpBMFR1bncaIEVnWjJhV1JsYjNNd0FqZ0JZQUZxQUxnQkFDQUFlZ0V4&gl=US&hl=en")
 | 
				
			||||||
@ -16,9 +19,7 @@ describe "Helpers" do
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      produce_channel_videos_url(ucid: "UCXuqSBlHAE6Xw-yeJA0Tunw", page: 20).should eq("/browse_ajax?continuation=4qmFsgJEEhhVQ1h1cVNCbEhBRTZYdy15ZUpBMFR1bncaKEVnWjJhV1JsYjNNd0FqZ0JZQUZxQUxnQkFDQUFlZ0l5TUElM0QlM0Q%3D&gl=US&hl=en")
 | 
					      produce_channel_videos_url(ucid: "UCXuqSBlHAE6Xw-yeJA0Tunw", page: 20).should eq("/browse_ajax?continuation=4qmFsgJEEhhVQ1h1cVNCbEhBRTZYdy15ZUpBMFR1bncaKEVnWjJhV1JsYjNNd0FqZ0JZQUZxQUxnQkFDQUFlZ0l5TUElM0QlM0Q%3D&gl=US&hl=en")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      produce_channel_videos_url(ucid: "UC-9-kyTW8ZkZNDHQJ6FgpwQ", auto_generated: true).should eq("/browse_ajax?continuation=4qmFsgJIEhhVQy05LWt5VFc4WmtaTkRIUUo2Rmdwd1EaLEVnWjJhV1JsYjNNd0FqZ0JZQUZxQUxnQkFDQTJlZ294TlRVeU1ESXlPVFE1&gl=US&hl=en")
 | 
					      produce_channel_videos_url(ucid: "UC-9-kyTW8ZkZNDHQJ6FgpwQ", page: 20, sort_by: "popular").should eq("/browse_ajax?continuation=4qmFsgJAEhhVQy05LWt5VFc4WmtaTkRIUUo2Rmdwd1EaJEVnWjJhV1JsYjNNd0FqZ0JZQUZxQUxnQkFDQUFlZ0l5TUJnQg%3D%3D&gl=US&hl=en")
 | 
				
			||||||
 | 
					 | 
				
			||||||
      produce_channel_videos_url(ucid: "UC-9-kyTW8ZkZNDHQJ6FgpwQ", page: 20, auto_generated: true, sort_by: "popular").should eq("/browse_ajax?continuation=4qmFsgJOEhhVQy05LWt5VFc4WmtaTkRIUUo2Rmdwd1EaMkVnWjJhV1JsYjNNd0FqZ0JZQUZxQUxnQkFDQTJlZ294TlRBeU1UY3dNVFE1R0FFJTNE&gl=US&hl=en")
 | 
					 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -59,4 +60,49 @@ describe "Helpers" do
 | 
				
			|||||||
      produce_search_params(content_type: "channel").should eq("CAASAhAC")
 | 
					      produce_search_params(content_type: "channel").should eq("CAASAhAC")
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  describe "#produce_comment_continuation" do
 | 
				
			||||||
 | 
					    it "correctly produces a continuation token for comments" do
 | 
				
			||||||
 | 
					      produce_comment_continuation("_cE8xSu6swE", "ADSJ_i2qvJeFtL0htmS5_K5Ctj3eGFVBMWL9Wd42o3kmUL6_mAzdLp85-liQZL0mYr_16BhaggUqX652Sv9JqV6VXinShSP-ZT6rL4NolPBaPXVtJsO5_rA_qE3GubAuLFw9uzIIXU2-HnpXbdgPLWTFavfX206hqWmmpHwUOrmxQV_OX6tYkM3ux3rPAKCDrT8eWL7MU3bLiNcnbgkW8o0h8KYLL_8BPa8LcHbTv8pAoNkjerlX1x7K4pqxaXPoyz89qNlnh6rRx6AXgAzzoHH1dmcyQ8CIBeOHg-m4i8ZxdX4dP88XWrIFg-jJGhpGP8JUMDgZgavxVx225hUEYZMyrLGler5em4FgbG62YWC51moLDLeYEA").should eq("EiYSC19jRTh4U3U2c3dFwAEByAEB4AEBogINKP___________wFAABgGMowDCvYCQURTSl9pMnF2SmVGdEwwaHRtUzVfSzVDdGozZUdGVkJNV0w5V2Q0Mm8za21VTDZfbUF6ZExwODUtbGlRWkwwbVlyXzE2QmhhZ2dVcVg2NTJTdjlKcVY2VlhpblNoU1AtWlQ2ckw0Tm9sUEJhUFhWdEpzTzVfckFfcUUzR3ViQXVMRnc5dXpJSVhVMi1IbnBYYmRnUExXVEZhdmZYMjA2aHFXbW1wSHdVT3JteFFWX09YNnRZa00zdXgzclBBS0NEclQ4ZVdMN01VM2JMaU5jbmJna1c4bzBoOEtZTExfOEJQYThMY0hiVHY4cEFvTmtqZXJsWDF4N0s0cHF4YVhQb3l6ODlxTmxuaDZyUng2QVhnQXp6b0hIMWRtY3lROENJQmVPSGctbTRpOFp4ZFg0ZFA4OFhXcklGZy1qSkdocEdQOEpVTURnWmdhdnhWeDIyNWhVRVlaTXlyTEdsZXI1ZW00RmdiRzYyWVdDNTFtb0xETGVZRUEiDyILX2NFOHhTdTZzd0UwACgU")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      produce_comment_continuation("_cE8xSu6swE", "ADSJ_i1yz21HI4xrtsYXVC-2_kfZ6kx1yjYQumXAAxqH3CAd7ZxKxfLdZS1__fqhCtOASRbbpSBGH_tH1J96Dxux-Qfjk-lUbupMqv08Q3aHzGu7p70VoUMHhI2-GoJpnbpmcOxkGzeIuenRS_ym2Y8fkDowhqLPFgsS0n4djnZ2UmC17F3Ch3N1S1UYf1ZVOc991qOC1iW9kJDzyvRQTWCPsJUPneSaAKW-Rr97pdesOkR4i8cNvHZRnQKe2HEfsvlJOb2C3lF1dJBfJeNfnQYeh5hv6_fZN7bt3-JL1Xk3Qc9NXNxmmbDpwAC_yFR8dthFfUJdyIO9Nu1D79MLYeR-H5HxqUJokkJiGIz4lTE_CXXbhAI").should eq("EiYSC19jRTh4U3U2c3dFwAEByAEB4AEBogINKP___________wFAABgGMokDCvMCQURTSl9pMXl6MjFISTR4cnRzWVhWQy0yX2tmWjZreDF5allRdW1YQUF4cUgzQ0FkN1p4S3hmTGRaUzFfX2ZxaEN0T0FTUmJicFNCR0hfdEgxSjk2RHh1eC1RZmprLWxVYnVwTXF2MDhRM2FIekd1N3A3MFZvVU1IaEkyLUdvSnBuYnBtY094a0d6ZUl1ZW5SU195bTJZOGZrRG93aHFMUEZnc1MwbjRkam5aMlVtQzE3RjNDaDNOMVMxVVlmMVpWT2M5OTFxT0MxaVc5a0pEenl2UlFUV0NQc0pVUG5lU2FBS1ctUnI5N3BkZXNPa1I0aThjTnZIWlJuUUtlMkhFZnN2bEpPYjJDM2xGMWRKQmZKZU5mblFZZWg1aHY2X2ZaTjdidDMtSkwxWGszUWM5TlhOeG1tYkRwd0FDX3lGUjhkdGhGZlVKZHlJTzlOdTFENzlNTFllUi1INUh4cVVKb2trSmlHSXo0bFRFX0NYWGJoQUkiDyILX2NFOHhTdTZzd0UwACgU")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      produce_comment_continuation("29-q7YnyUmY", "").should eq("EiYSCzI5LXE3WW55VW1ZwAEByAEB4AEBogINKP___________wFAABgGMhMiDyILMjktcTdZbnlVbVkwAHgC")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      produce_comment_continuation("CvFH_6DNRCY", "").should eq("EiYSC0N2RkhfNkROUkNZwAEByAEB4AEBogINKP___________wFAABgGMhMiDyILQ3ZGSF82RE5SQ1kwAHgC")
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  describe "#produce_comment_reply_continuation" do
 | 
				
			||||||
 | 
					    it "correctly produces a continuation token for replies to a given comment" do
 | 
				
			||||||
 | 
					      produce_comment_reply_continuation("cIHQWOoJeag", "UCq6VFHwMzcMXbuKyG7SQYIg", "Ugx1IP_wGVv3WtGWcdV4AaABAg").should eq("EiYSC2NJSFFXT29KZWFnwAEByAEB4AEBogINKP___________wFAABgGMk0aSxIaVWd4MUlQX3dHVnYzV3RHV2NkVjRBYUFCQWciAggAKhhVQ3E2VkZId016Y01YYnVLeUc3U1FZSWcyC2NJSFFXT29KZWFnQAFICg%3D%3D")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      produce_comment_reply_continuation("cIHQWOoJeag", "UCq6VFHwMzcMXbuKyG7SQYIg", "Ugza62y_TlmTu9o2RfF4AaABAg").should eq("EiYSC2NJSFFXT29KZWFnwAEByAEB4AEBogINKP___________wFAABgGMk0aSxIaVWd6YTYyeV9UbG1UdTlvMlJmRjRBYUFCQWciAggAKhhVQ3E2VkZId016Y01YYnVLeUc3U1FZSWcyC2NJSFFXT29KZWFnQAFICg%3D%3D")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      produce_comment_reply_continuation("_cE8xSu6swE", "UC1AZY74-dGVPe6bfxFwwEMg", "UgyBUaRGHB9Jmt1dsUZ4AaABAg").should eq("EiYSC19jRTh4U3U2c3dFwAEByAEB4AEBogINKP___________wFAABgGMk0aSxIaVWd5QlVhUkdIQjlKbXQxZHNVWjRBYUFCQWciAggAKhhVQzFBWlk3NC1kR1ZQZTZiZnhGd3dFTWcyC19jRTh4U3U2c3dFQAFICg%3D%3D")
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  describe "#sign_token" do
 | 
				
			||||||
 | 
					    it "correctly signs a given hash" do
 | 
				
			||||||
 | 
					      token = {
 | 
				
			||||||
 | 
					        "session" => "v1:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
 | 
				
			||||||
 | 
					        "expires" => 1554680038,
 | 
				
			||||||
 | 
					        "scopes"  => [
 | 
				
			||||||
 | 
					          ":notifications",
 | 
				
			||||||
 | 
					          ":subscriptions/*",
 | 
				
			||||||
 | 
					          "GET:tokens*",
 | 
				
			||||||
 | 
					        ],
 | 
				
			||||||
 | 
					        "signature" => "f__2hS20th8pALF305PJFK-D2aVtvefNnQheILHD2vU=",
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      sign_token("SECRET_KEY", token).should eq(token["signature"])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      token = {
 | 
				
			||||||
 | 
					        "session"   => "v1:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
 | 
				
			||||||
 | 
					        "scopes"    => [":notifications", "POST:subscriptions/*"],
 | 
				
			||||||
 | 
					        "signature" => "fNvXoT0MRAL9eE6lTE33CEg8HitYJDOL9a22rSN2Ihg=",
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      sign_token("SECRET_KEY", token).should eq(token["signature"])
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										681
									
								
								src/invidious.cr
									
									
									
									
									
								
							
							
						
						
									
										681
									
								
								src/invidious.cr
									
									
									
									
									
								
							@ -31,6 +31,46 @@ require "./invidious/*"
 | 
				
			|||||||
CONFIG   = Config.from_yaml(File.read("config/config.yml"))
 | 
					CONFIG   = Config.from_yaml(File.read("config/config.yml"))
 | 
				
			||||||
HMAC_KEY = CONFIG.hmac_key || Random::Secure.hex(32)
 | 
					HMAC_KEY = CONFIG.hmac_key || Random::Secure.hex(32)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ARCHIVE_URL     = URI.parse("https://archive.org")
 | 
				
			||||||
 | 
					LOGIN_URL       = URI.parse("https://accounts.google.com")
 | 
				
			||||||
 | 
					PUBSUB_URL      = URI.parse("https://pubsubhubbub.appspot.com")
 | 
				
			||||||
 | 
					REDDIT_URL      = URI.parse("https://www.reddit.com")
 | 
				
			||||||
 | 
					TEXTCAPTCHA_URL = URI.parse("http://textcaptcha.com")
 | 
				
			||||||
 | 
					YT_URL          = URI.parse("https://www.youtube.com")
 | 
				
			||||||
 | 
					CHARS_SAFE      = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"
 | 
				
			||||||
 | 
					TEST_IDS        = {"AgbeGFYluEA", "BaW_jenozKc", "a9LDPn-MO4I", "ddFvjfvPnqk", "iqKdEhx-dD4"}
 | 
				
			||||||
 | 
					CURRENT_BRANCH  = {{ "#{`git branch | sed -n '/\* /s///p'`.strip}" }}
 | 
				
			||||||
 | 
					CURRENT_COMMIT  = {{ "#{`git rev-list HEAD --max-count=1 --abbrev-commit`.strip}" }}
 | 
				
			||||||
 | 
					CURRENT_VERSION = {{ "#{`git describe --tags --abbrev=0`.strip}" }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# This is used to determine the `?v=` on the end of file URLs (for cache busting). We
 | 
				
			||||||
 | 
					# only need to expire modified assets, so we can use this to find the last commit that changes
 | 
				
			||||||
 | 
					# any assets
 | 
				
			||||||
 | 
					ASSET_COMMIT = {{ "#{`git rev-list HEAD --max-count=1 --abbrev-commit -- assets`.strip}" }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					SOFTWARE = {
 | 
				
			||||||
 | 
					  "name"    => "invidious",
 | 
				
			||||||
 | 
					  "version" => "#{CURRENT_VERSION}-#{CURRENT_COMMIT}",
 | 
				
			||||||
 | 
					  "branch"  => "#{CURRENT_BRANCH}",
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					LOCALES = {
 | 
				
			||||||
 | 
					  "ar"    => load_locale("ar"),
 | 
				
			||||||
 | 
					  "de"    => load_locale("de"),
 | 
				
			||||||
 | 
					  "el"    => load_locale("el"),
 | 
				
			||||||
 | 
					  "en-US" => load_locale("en-US"),
 | 
				
			||||||
 | 
					  "eo"    => load_locale("eo"),
 | 
				
			||||||
 | 
					  "es"    => load_locale("es"),
 | 
				
			||||||
 | 
					  "eu"    => load_locale("eu"),
 | 
				
			||||||
 | 
					  "fr"    => load_locale("fr"),
 | 
				
			||||||
 | 
					  "it"    => load_locale("it"),
 | 
				
			||||||
 | 
					  "nb_NO" => load_locale("nb_NO"),
 | 
				
			||||||
 | 
					  "nl"    => load_locale("nl"),
 | 
				
			||||||
 | 
					  "pl"    => load_locale("pl"),
 | 
				
			||||||
 | 
					  "ru"    => load_locale("ru"),
 | 
				
			||||||
 | 
					  "uk"    => load_locale("uk"),
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
config = CONFIG
 | 
					config = CONFIG
 | 
				
			||||||
logger = Invidious::LogHandler.new
 | 
					logger = Invidious::LogHandler.new
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -56,32 +96,14 @@ Kemal.config.extra_options do |parser|
 | 
				
			|||||||
    FileUtils.mkdir_p(File.dirname(output))
 | 
					    FileUtils.mkdir_p(File.dirname(output))
 | 
				
			||||||
    logger = Invidious::LogHandler.new(File.open(output, mode: "a"))
 | 
					    logger = Invidious::LogHandler.new(File.open(output, mode: "a"))
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					  parser.on("-v", "--version", "Print version") do |output|
 | 
				
			||||||
 | 
					    puts SOFTWARE.to_pretty_json
 | 
				
			||||||
 | 
					    exit
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Kemal::CLI.new ARGV
 | 
					Kemal::CLI.new ARGV
 | 
				
			||||||
 | 
					
 | 
				
			||||||
YT_URL          = URI.parse("https://www.youtube.com")
 | 
					 | 
				
			||||||
REDDIT_URL      = URI.parse("https://www.reddit.com")
 | 
					 | 
				
			||||||
LOGIN_URL       = URI.parse("https://accounts.google.com")
 | 
					 | 
				
			||||||
PUBSUB_URL      = URI.parse("https://pubsubhubbub.appspot.com")
 | 
					 | 
				
			||||||
TEXTCAPTCHA_URL = URI.parse("http://textcaptcha.com/omarroth@protonmail.com.json")
 | 
					 | 
				
			||||||
CURRENT_BRANCH  = {{ "#{`git branch | sed -n '/\* /s///p'`.strip}" }}
 | 
					 | 
				
			||||||
CURRENT_COMMIT  = {{ "#{`git rev-list HEAD --max-count=1 --abbrev-commit`.strip}" }}
 | 
					 | 
				
			||||||
CURRENT_VERSION = {{ "#{`git describe --tags --abbrev=0`.strip}" }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
LOCALES = {
 | 
					 | 
				
			||||||
  "ar"    => load_locale("ar"),
 | 
					 | 
				
			||||||
  "de"    => load_locale("de"),
 | 
					 | 
				
			||||||
  "en-US" => load_locale("en-US"),
 | 
					 | 
				
			||||||
  "eu"    => load_locale("eu"),
 | 
					 | 
				
			||||||
  "fr"    => load_locale("fr"),
 | 
					 | 
				
			||||||
  "it"    => load_locale("it"),
 | 
					 | 
				
			||||||
  "nb_NO" => load_locale("nb_NO"),
 | 
					 | 
				
			||||||
  "nl"    => load_locale("nl"),
 | 
					 | 
				
			||||||
  "pl"    => load_locale("pl"),
 | 
					 | 
				
			||||||
  "ru"    => load_locale("ru"),
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
statistics = {
 | 
					statistics = {
 | 
				
			||||||
  "error" => "Statistics are not availabile.",
 | 
					  "error" => "Statistics are not availabile.",
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -99,7 +121,7 @@ before_all do |env|
 | 
				
			|||||||
  env.response.headers["X-XSS-Protection"] = "1; mode=block;"
 | 
					  env.response.headers["X-XSS-Protection"] = "1; mode=block;"
 | 
				
			||||||
  env.response.headers["X-Content-Type-Options"] = "nosniff"
 | 
					  env.response.headers["X-Content-Type-Options"] = "nosniff"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  preferences = DEFAULT_USER_PREFERENCES.dup
 | 
					  preferences = CONFIG.default_user_preferences.dup
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  locale = env.params.query["hl"]?
 | 
					  locale = env.params.query["hl"]?
 | 
				
			||||||
  locale ||= "en-US"
 | 
					  locale ||= "en-US"
 | 
				
			||||||
@ -128,6 +150,86 @@ get "/api/v1/stats" do |env|
 | 
				
			|||||||
  statistics.to_json
 | 
					  statistics.to_json
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# YouTube provides "storyboards", which are sprites containing x * y
 | 
				
			||||||
 | 
					# preview thumbnails for individual scenes in a video.
 | 
				
			||||||
 | 
					# See https://support.jwplayer.com/articles/how-to-add-preview-thumbnails
 | 
				
			||||||
 | 
					get "/api/v1/storyboards/:id" do |env|
 | 
				
			||||||
 | 
					  locale = LOCALES[env.get("preferences").as(Preferences).locale]?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  env.response.content_type = "application/json"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  id = env.params.url["id"]
 | 
				
			||||||
 | 
					  region = env.params.query["region"]?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  client = make_client(YT_URL)
 | 
				
			||||||
 | 
					  begin
 | 
				
			||||||
 | 
					    video = fetch_video(id, proxies, region: region)
 | 
				
			||||||
 | 
					  rescue ex : VideoRedirect
 | 
				
			||||||
 | 
					    next env.redirect "/api/v1/storyboards/#{ex.message}"
 | 
				
			||||||
 | 
					  rescue ex
 | 
				
			||||||
 | 
					    env.response.status_code = 500
 | 
				
			||||||
 | 
					    next
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  storyboards = video.storyboards
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  width = env.params.query["width"]?
 | 
				
			||||||
 | 
					  height = env.params.query["height"]?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if !width && !height
 | 
				
			||||||
 | 
					    response = JSON.build do |json|
 | 
				
			||||||
 | 
					      json.object do
 | 
				
			||||||
 | 
					        json.field "storyboards" do
 | 
				
			||||||
 | 
					          generate_storyboards(json, id, storyboards, config, Kemal.config)
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    next response
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  env.response.content_type = "text/vtt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  storyboard = storyboards.select { |storyboard| width == "#{storyboard[:width]}" || height == "#{storyboard[:height]}" }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if storyboard.empty?
 | 
				
			||||||
 | 
					    env.response.status_code = 404
 | 
				
			||||||
 | 
					    next
 | 
				
			||||||
 | 
					  else
 | 
				
			||||||
 | 
					    storyboard = storyboard[0]
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  webvtt = <<-END_VTT
 | 
				
			||||||
 | 
					  WEBVTT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  END_VTT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  start_time = 0.milliseconds
 | 
				
			||||||
 | 
					  end_time = storyboard[:interval].milliseconds
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  storyboard[:storyboard_count].times do |i|
 | 
				
			||||||
 | 
					    host_url = make_host_url(config, Kemal.config)
 | 
				
			||||||
 | 
					    url = storyboard[:url].gsub("$M", i).gsub("https://i9.ytimg.com", host_url)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    storyboard[:storyboard_height].times do |j|
 | 
				
			||||||
 | 
					      storyboard[:storyboard_width].times do |k|
 | 
				
			||||||
 | 
					        webvtt += <<-END_CUE
 | 
				
			||||||
 | 
					        #{start_time}.000 --> #{end_time}.000
 | 
				
			||||||
 | 
					        #{url}#xywh=#{storyboard[:width] * k},#{storyboard[:height] * j},#{storyboard[:width]},#{storyboard[:height]}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        END_CUE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        start_time += storyboard[:interval].milliseconds
 | 
				
			||||||
 | 
					        end_time += storyboard[:interval].milliseconds
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  webvtt
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
get "/api/v1/captions/:id" do |env|
 | 
					get "/api/v1/captions/:id" do |env|
 | 
				
			||||||
  locale = LOCALES[env.get("preferences").as(Preferences).locale]?
 | 
					  locale = LOCALES[env.get("preferences").as(Preferences).locale]?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -136,6 +238,14 @@ get "/api/v1/captions/:id" do |env|
 | 
				
			|||||||
  id = env.params.url["id"]
 | 
					  id = env.params.url["id"]
 | 
				
			||||||
  region = env.params.query["region"]?
 | 
					  region = env.params.query["region"]?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # See https://github.com/ytdl-org/youtube-dl/blob/6ab30ff50bf6bd0585927cb73c7421bef184f87a/youtube_dl/extractor/youtube.py#L1354
 | 
				
			||||||
 | 
					  # It is possible to use `/api/timedtext?type=list&v=#{id}` and
 | 
				
			||||||
 | 
					  # `/api/timedtext?type=track&v=#{id}&lang=#{lang_code}` directly,
 | 
				
			||||||
 | 
					  # but this does not provide links for auto-generated captions.
 | 
				
			||||||
 | 
					  #
 | 
				
			||||||
 | 
					  # In future this should be investigated as an alternative, since it does not require
 | 
				
			||||||
 | 
					  # getting video info.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  client = make_client(YT_URL)
 | 
					  client = make_client(YT_URL)
 | 
				
			||||||
  begin
 | 
					  begin
 | 
				
			||||||
    video = fetch_video(id, proxies, region: region)
 | 
					    video = fetch_video(id, proxies, region: region)
 | 
				
			||||||
@ -172,7 +282,7 @@ get "/api/v1/captions/:id" do |env|
 | 
				
			|||||||
    next response
 | 
					    next response
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  env.response.content_type = "text/vtt"
 | 
					  env.response.content_type = "text/vtt; charset=UTF-8"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  caption = captions.select { |caption| caption.name.simpleText == label }
 | 
					  caption = captions.select { |caption| caption.name.simpleText == label }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -187,7 +297,12 @@ get "/api/v1/captions/:id" do |env|
 | 
				
			|||||||
    caption = caption[0]
 | 
					    caption = caption[0]
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  caption_xml = client.get(caption.baseUrl + "&tlang=#{tlang}").body
 | 
					  url = caption.baseUrl + "&tlang=#{tlang}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # Auto-generated captions often have cues that aren't aligned properly with the video,
 | 
				
			||||||
 | 
					  # as well as some other markup that makes it cumbersome, so we try to fix that here
 | 
				
			||||||
 | 
					  if caption.name.simpleText.includes? "auto-generated"
 | 
				
			||||||
 | 
					    caption_xml = client.get(url).body
 | 
				
			||||||
    caption_xml = XML.parse(caption_xml)
 | 
					    caption_xml = XML.parse(caption_xml)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    webvtt = <<-END_VTT
 | 
					    webvtt = <<-END_VTT
 | 
				
			||||||
@ -220,13 +335,22 @@ get "/api/v1/captions/:id" do |env|
 | 
				
			|||||||
        text = "<v #{md["name"]}>#{md["text"]}</v>"
 | 
					        text = "<v #{md["name"]}>#{md["text"]}</v>"
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    webvtt = webvtt + <<-END_CUE
 | 
					      webvtt += <<-END_CUE
 | 
				
			||||||
    #{start_time} --> #{end_time}
 | 
					    #{start_time} --> #{end_time}
 | 
				
			||||||
    #{text}
 | 
					    #{text}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    END_CUE
 | 
					    END_CUE
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					  else
 | 
				
			||||||
 | 
					    url += "&format=vtt"
 | 
				
			||||||
 | 
					    webvtt = client.get(url).body
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if title = env.params.query["title"]?
 | 
				
			||||||
 | 
					    # https://blog.fastmail.com/2011/06/24/download-non-english-filenames/
 | 
				
			||||||
 | 
					    env.response.headers["Content-Disposition"] = "attachment; filename=\"#{URI.escape(title)}\"; filename*=UTF-8''#{URI.escape(title)}"
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  webvtt
 | 
					  webvtt
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
@ -249,10 +373,13 @@ get "/api/v1/comments/:id" do |env|
 | 
				
			|||||||
  format ||= "json"
 | 
					  format ||= "json"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  continuation = env.params.query["continuation"]?
 | 
					  continuation = env.params.query["continuation"]?
 | 
				
			||||||
 | 
					  sort_by = env.params.query["sort_by"]?.try &.downcase
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if source == "youtube"
 | 
					  if source == "youtube"
 | 
				
			||||||
 | 
					    sort_by ||= "top"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    begin
 | 
					    begin
 | 
				
			||||||
      comments = fetch_youtube_comments(id, continuation, proxies, format, locale, thin_mode, region)
 | 
					      comments = fetch_youtube_comments(id, continuation, proxies, format, locale, thin_mode, region, sort_by: sort_by)
 | 
				
			||||||
    rescue ex
 | 
					    rescue ex
 | 
				
			||||||
      error_message = {"error" => ex.message}.to_json
 | 
					      error_message = {"error" => ex.message}.to_json
 | 
				
			||||||
      env.response.status_code = 500
 | 
					      env.response.status_code = 500
 | 
				
			||||||
@ -261,8 +388,10 @@ get "/api/v1/comments/:id" do |env|
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    next comments
 | 
					    next comments
 | 
				
			||||||
  elsif source == "reddit"
 | 
					  elsif source == "reddit"
 | 
				
			||||||
 | 
					    sort_by ||= "confidence"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    begin
 | 
					    begin
 | 
				
			||||||
      comments, reddit_thread = fetch_reddit_comments(id)
 | 
					      comments, reddit_thread = fetch_reddit_comments(id, sort_by: sort_by)
 | 
				
			||||||
      content_html = template_reddit_comments(comments, locale)
 | 
					      content_html = template_reddit_comments(comments, locale)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      content_html = fill_links(content_html, "https", "www.reddit.com")
 | 
					      content_html = fill_links(content_html, "https", "www.reddit.com")
 | 
				
			||||||
@ -383,6 +512,71 @@ get "/api/v1/insights/:id" do |env|
 | 
				
			|||||||
  next response.to_json
 | 
					  next response.to_json
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					get "/api/v1/annotations/:id" do |env|
 | 
				
			||||||
 | 
					  locale = LOCALES[env.get("preferences").as(Preferences).locale]?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  env.response.content_type = "text/xml"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  id = env.params.url["id"]
 | 
				
			||||||
 | 
					  source = env.params.query["source"]?
 | 
				
			||||||
 | 
					  source ||= "archive"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if !id.match(/[a-zA-Z0-9_-]{11}/)
 | 
				
			||||||
 | 
					    env.response.status_code = 400
 | 
				
			||||||
 | 
					    next
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  annotations = ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  case source
 | 
				
			||||||
 | 
					  when "archive"
 | 
				
			||||||
 | 
					    index = CHARS_SAFE.index(id[0]).not_nil!.to_s.rjust(2, '0')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # IA doesn't handle leading hyphens,
 | 
				
			||||||
 | 
					    # so we use https://archive.org/details/youtubeannotations_64
 | 
				
			||||||
 | 
					    if index == "62"
 | 
				
			||||||
 | 
					      index = "64"
 | 
				
			||||||
 | 
					      id = id.sub(/^-/, 'A')
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    file = URI.escape("#{id[0, 3]}/#{id}.xml")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    client = make_client(ARCHIVE_URL)
 | 
				
			||||||
 | 
					    location = client.get("/download/youtubeannotations_#{index}/#{id[0, 2]}.tar/#{file}")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if !location.headers["Location"]?
 | 
				
			||||||
 | 
					      env.response.status_code = location.status_code
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    response = make_client(URI.parse(location.headers["Location"])).get(location.headers["Location"])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if response.body.empty?
 | 
				
			||||||
 | 
					      env.response.status_code = 404
 | 
				
			||||||
 | 
					      next
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if response.status_code != 200
 | 
				
			||||||
 | 
					      env.response.status_code = response.status_code
 | 
				
			||||||
 | 
					      next
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    annotations = response.body
 | 
				
			||||||
 | 
					  when "youtube"
 | 
				
			||||||
 | 
					    client = make_client(YT_URL)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    response = client.get("/annotations_invideo?video_id=#{id}")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if response.status_code != 200
 | 
				
			||||||
 | 
					      env.response.status_code = response.status_code
 | 
				
			||||||
 | 
					      next
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    annotations = response.body
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  annotations
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
get "/api/v1/videos/:id" do |env|
 | 
					get "/api/v1/videos/:id" do |env|
 | 
				
			||||||
  locale = LOCALES[env.get("preferences").as(Preferences).locale]?
 | 
					  locale = LOCALES[env.get("preferences").as(Preferences).locale]?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -401,192 +595,7 @@ get "/api/v1/videos/:id" do |env|
 | 
				
			|||||||
    next error_message
 | 
					    next error_message
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  fmt_stream = video.fmt_stream(decrypt_function)
 | 
					  video.to_json(locale, config, Kemal.config, decrypt_function)
 | 
				
			||||||
  adaptive_fmts = video.adaptive_fmts(decrypt_function)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  captions = video.captions
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  video_info = JSON.build do |json|
 | 
					 | 
				
			||||||
    json.object do
 | 
					 | 
				
			||||||
      json.field "title", video.title
 | 
					 | 
				
			||||||
      json.field "videoId", video.id
 | 
					 | 
				
			||||||
      json.field "videoThumbnails" do
 | 
					 | 
				
			||||||
        generate_thumbnails(json, video.id, config, Kemal.config)
 | 
					 | 
				
			||||||
      end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      video.description, description = html_to_content(video.description)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      json.field "description", description
 | 
					 | 
				
			||||||
      json.field "descriptionHtml", video.description
 | 
					 | 
				
			||||||
      json.field "published", video.published.to_unix
 | 
					 | 
				
			||||||
      json.field "publishedText", translate(locale, "`x` ago", recode_date(video.published, locale))
 | 
					 | 
				
			||||||
      json.field "keywords", video.keywords
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      json.field "viewCount", video.views
 | 
					 | 
				
			||||||
      json.field "likeCount", video.likes
 | 
					 | 
				
			||||||
      json.field "dislikeCount", video.dislikes
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      json.field "paid", video.paid
 | 
					 | 
				
			||||||
      json.field "premium", video.premium
 | 
					 | 
				
			||||||
      json.field "isFamilyFriendly", video.is_family_friendly
 | 
					 | 
				
			||||||
      json.field "allowedRegions", video.allowed_regions
 | 
					 | 
				
			||||||
      json.field "genre", video.genre
 | 
					 | 
				
			||||||
      json.field "genreUrl", video.genre_url
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      json.field "author", video.author
 | 
					 | 
				
			||||||
      json.field "authorId", video.ucid
 | 
					 | 
				
			||||||
      json.field "authorUrl", "/channel/#{video.ucid}"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      json.field "authorThumbnails" do
 | 
					 | 
				
			||||||
        json.array do
 | 
					 | 
				
			||||||
          qualities = {32, 48, 76, 100, 176, 512}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          qualities.each do |quality|
 | 
					 | 
				
			||||||
            json.object do
 | 
					 | 
				
			||||||
              json.field "url", video.author_thumbnail.gsub("=s48-", "=s#{quality}-")
 | 
					 | 
				
			||||||
              json.field "width", quality
 | 
					 | 
				
			||||||
              json.field "height", quality
 | 
					 | 
				
			||||||
            end
 | 
					 | 
				
			||||||
          end
 | 
					 | 
				
			||||||
        end
 | 
					 | 
				
			||||||
      end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      json.field "subCountText", video.sub_count_text
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      json.field "lengthSeconds", video.info["length_seconds"].to_i
 | 
					 | 
				
			||||||
      json.field "allowRatings", video.allow_ratings
 | 
					 | 
				
			||||||
      json.field "rating", video.info["avg_rating"].to_f32
 | 
					 | 
				
			||||||
      json.field "isListed", video.is_listed
 | 
					 | 
				
			||||||
      json.field "liveNow", video.live_now
 | 
					 | 
				
			||||||
      json.field "isUpcoming", video.is_upcoming
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      if video.premiere_timestamp
 | 
					 | 
				
			||||||
        json.field "premiereTimestamp", video.premiere_timestamp.not_nil!.to_unix
 | 
					 | 
				
			||||||
      end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      if video.player_response["streamingData"]?.try &.["hlsManifestUrl"]?
 | 
					 | 
				
			||||||
        host_url = make_host_url(config, Kemal.config)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        host_params = env.request.query_params
 | 
					 | 
				
			||||||
        host_params.delete_all("v")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        hlsvp = video.player_response["streamingData"]["hlsManifestUrl"].as_s
 | 
					 | 
				
			||||||
        hlsvp = hlsvp.gsub("https://manifest.googlevideo.com", host_url)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        json.field "hlsUrl", hlsvp
 | 
					 | 
				
			||||||
      end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      json.field "adaptiveFormats" do
 | 
					 | 
				
			||||||
        json.array do
 | 
					 | 
				
			||||||
          adaptive_fmts.each do |fmt|
 | 
					 | 
				
			||||||
            json.object do
 | 
					 | 
				
			||||||
              json.field "index", fmt["index"]
 | 
					 | 
				
			||||||
              json.field "bitrate", fmt["bitrate"]
 | 
					 | 
				
			||||||
              json.field "init", fmt["init"]
 | 
					 | 
				
			||||||
              json.field "url", fmt["url"]
 | 
					 | 
				
			||||||
              json.field "itag", fmt["itag"]
 | 
					 | 
				
			||||||
              json.field "type", fmt["type"]
 | 
					 | 
				
			||||||
              json.field "clen", fmt["clen"]
 | 
					 | 
				
			||||||
              json.field "lmt", fmt["lmt"]
 | 
					 | 
				
			||||||
              json.field "projectionType", fmt["projection_type"]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
              fmt_info = itag_to_metadata?(fmt["itag"])
 | 
					 | 
				
			||||||
              if fmt_info
 | 
					 | 
				
			||||||
                fps = fmt_info["fps"]?.try &.to_i || fmt["fps"]?.try &.to_i || 30
 | 
					 | 
				
			||||||
                json.field "fps", fps
 | 
					 | 
				
			||||||
                json.field "container", fmt_info["ext"]
 | 
					 | 
				
			||||||
                json.field "encoding", fmt_info["vcodec"]? || fmt_info["acodec"]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                if fmt_info["height"]?
 | 
					 | 
				
			||||||
                  json.field "resolution", "#{fmt_info["height"]}p"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                  quality_label = "#{fmt_info["height"]}p"
 | 
					 | 
				
			||||||
                  if fps > 30
 | 
					 | 
				
			||||||
                    quality_label += "60"
 | 
					 | 
				
			||||||
                  end
 | 
					 | 
				
			||||||
                  json.field "qualityLabel", quality_label
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                  if fmt_info["width"]?
 | 
					 | 
				
			||||||
                    json.field "size", "#{fmt_info["width"]}x#{fmt_info["height"]}"
 | 
					 | 
				
			||||||
                  end
 | 
					 | 
				
			||||||
                end
 | 
					 | 
				
			||||||
              end
 | 
					 | 
				
			||||||
            end
 | 
					 | 
				
			||||||
          end
 | 
					 | 
				
			||||||
        end
 | 
					 | 
				
			||||||
      end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      json.field "formatStreams" do
 | 
					 | 
				
			||||||
        json.array do
 | 
					 | 
				
			||||||
          fmt_stream.each do |fmt|
 | 
					 | 
				
			||||||
            json.object do
 | 
					 | 
				
			||||||
              json.field "url", fmt["url"]
 | 
					 | 
				
			||||||
              json.field "itag", fmt["itag"]
 | 
					 | 
				
			||||||
              json.field "type", fmt["type"]
 | 
					 | 
				
			||||||
              json.field "quality", fmt["quality"]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
              fmt_info = itag_to_metadata?(fmt["itag"])
 | 
					 | 
				
			||||||
              if fmt_info
 | 
					 | 
				
			||||||
                fps = fmt_info["fps"]?.try &.to_i || fmt["fps"]?.try &.to_i || 30
 | 
					 | 
				
			||||||
                json.field "fps", fps
 | 
					 | 
				
			||||||
                json.field "container", fmt_info["ext"]
 | 
					 | 
				
			||||||
                json.field "encoding", fmt_info["vcodec"]? || fmt_info["acodec"]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                if fmt_info["height"]?
 | 
					 | 
				
			||||||
                  json.field "resolution", "#{fmt_info["height"]}p"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                  quality_label = "#{fmt_info["height"]}p"
 | 
					 | 
				
			||||||
                  if fps > 30
 | 
					 | 
				
			||||||
                    quality_label += "60"
 | 
					 | 
				
			||||||
                  end
 | 
					 | 
				
			||||||
                  json.field "qualityLabel", quality_label
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                  if fmt_info["width"]?
 | 
					 | 
				
			||||||
                    json.field "size", "#{fmt_info["width"]}x#{fmt_info["height"]}"
 | 
					 | 
				
			||||||
                  end
 | 
					 | 
				
			||||||
                end
 | 
					 | 
				
			||||||
              end
 | 
					 | 
				
			||||||
            end
 | 
					 | 
				
			||||||
          end
 | 
					 | 
				
			||||||
        end
 | 
					 | 
				
			||||||
      end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      json.field "captions" do
 | 
					 | 
				
			||||||
        json.array do
 | 
					 | 
				
			||||||
          captions.each do |caption|
 | 
					 | 
				
			||||||
            json.object do
 | 
					 | 
				
			||||||
              json.field "label", caption.name.simpleText
 | 
					 | 
				
			||||||
              json.field "languageCode", caption.languageCode
 | 
					 | 
				
			||||||
              json.field "url", "/api/v1/captions/#{id}?label=#{URI.escape(caption.name.simpleText)}"
 | 
					 | 
				
			||||||
            end
 | 
					 | 
				
			||||||
          end
 | 
					 | 
				
			||||||
        end
 | 
					 | 
				
			||||||
      end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      json.field "recommendedVideos" do
 | 
					 | 
				
			||||||
        json.array do
 | 
					 | 
				
			||||||
          video.info["rvs"]?.try &.split(",").each do |rv|
 | 
					 | 
				
			||||||
            rv = HTTP::Params.parse(rv)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            if rv["id"]?
 | 
					 | 
				
			||||||
              json.object do
 | 
					 | 
				
			||||||
                json.field "videoId", rv["id"]
 | 
					 | 
				
			||||||
                json.field "title", rv["title"]
 | 
					 | 
				
			||||||
                json.field "videoThumbnails" do
 | 
					 | 
				
			||||||
                  generate_thumbnails(json, rv["id"], config, Kemal.config)
 | 
					 | 
				
			||||||
                end
 | 
					 | 
				
			||||||
                json.field "author", rv["author"]
 | 
					 | 
				
			||||||
                json.field "lengthSeconds", rv["length_seconds"].to_i
 | 
					 | 
				
			||||||
                json.field "viewCountText", rv["short_view_count_text"]
 | 
					 | 
				
			||||||
              end
 | 
					 | 
				
			||||||
            end
 | 
					 | 
				
			||||||
          end
 | 
					 | 
				
			||||||
        end
 | 
					 | 
				
			||||||
      end
 | 
					 | 
				
			||||||
    end
 | 
					 | 
				
			||||||
  end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  video_info
 | 
					 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
get "/api/v1/trending" do |env|
 | 
					get "/api/v1/trending" do |env|
 | 
				
			||||||
@ -598,7 +607,7 @@ get "/api/v1/trending" do |env|
 | 
				
			|||||||
  trending_type = env.params.query["type"]?
 | 
					  trending_type = env.params.query["type"]?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  begin
 | 
					  begin
 | 
				
			||||||
    trending = fetch_trending(trending_type, proxies, region, locale)
 | 
					    trending, plid = fetch_trending(trending_type, proxies, region, locale)
 | 
				
			||||||
  rescue ex
 | 
					  rescue ex
 | 
				
			||||||
    error_message = {"error" => ex.message}.to_json
 | 
					    error_message = {"error" => ex.message}.to_json
 | 
				
			||||||
    env.response.status_code = 500
 | 
					    env.response.status_code = 500
 | 
				
			||||||
@ -714,9 +723,9 @@ get "/api/v1/channels/:ucid" do |env|
 | 
				
			|||||||
  metadata.each do |item|
 | 
					  metadata.each do |item|
 | 
				
			||||||
    case item.content
 | 
					    case item.content
 | 
				
			||||||
    when .includes? "views"
 | 
					    when .includes? "views"
 | 
				
			||||||
      total_views = item.content.delete("views •,").to_i64
 | 
					      total_views = item.content.gsub(/\D/, "").to_i64
 | 
				
			||||||
    when .includes? "subscribers"
 | 
					    when .includes? "subscribers"
 | 
				
			||||||
      sub_count = item.content.delete("subscribers").delete(",").to_i64
 | 
					      sub_count = item.content.delete("subscribers").gsub(/\D/, "").to_i64
 | 
				
			||||||
    when .includes? "Joined"
 | 
					    when .includes? "Joined"
 | 
				
			||||||
      joined = Time.parse(item.content.lchop("Joined "), "%b %-d, %Y", Time::Location.local)
 | 
					      joined = Time.parse(item.content.lchop("Joined "), "%b %-d, %Y", Time::Location.local)
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
@ -844,7 +853,7 @@ get "/api/v1/channels/:ucid" do |env|
 | 
				
			|||||||
  channel_info
 | 
					  channel_info
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
["/api/v1/channels/:ucid/videos", "/api/v1/channels/videos/:ucid"].each do |route|
 | 
					{"/api/v1/channels/:ucid/videos", "/api/v1/channels/videos/:ucid"}.each do |route|
 | 
				
			||||||
  get route do |env|
 | 
					  get route do |env|
 | 
				
			||||||
    locale = LOCALES[env.get("preferences").as(Preferences).locale]?
 | 
					    locale = LOCALES[env.get("preferences").as(Preferences).locale]?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -913,7 +922,7 @@ end
 | 
				
			|||||||
  end
 | 
					  end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
["/api/v1/channels/:ucid/latest", "/api/v1/channels/latest/:ucid"].each do |route|
 | 
					{"/api/v1/channels/:ucid/latest", "/api/v1/channels/latest/:ucid"}.each do |route|
 | 
				
			||||||
  get route do |env|
 | 
					  get route do |env|
 | 
				
			||||||
    locale = LOCALES[env.get("preferences").as(Preferences).locale]?
 | 
					    locale = LOCALES[env.get("preferences").as(Preferences).locale]?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -929,7 +938,7 @@ end
 | 
				
			|||||||
      next error_message
 | 
					      next error_message
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    response = JSON.build do |json|
 | 
					    JSON.build do |json|
 | 
				
			||||||
      json.array do
 | 
					      json.array do
 | 
				
			||||||
        videos.each do |video|
 | 
					        videos.each do |video|
 | 
				
			||||||
          json.object do
 | 
					          json.object do
 | 
				
			||||||
@ -957,12 +966,10 @@ end
 | 
				
			|||||||
        end
 | 
					        end
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					 | 
				
			||||||
    response
 | 
					 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
["/api/v1/channels/:ucid/playlists", "/api/v1/channels/playlists/:ucid"].each do |route|
 | 
					{"/api/v1/channels/:ucid/playlists", "/api/v1/channels/playlists/:ucid"}.each do |route|
 | 
				
			||||||
  get route do |env|
 | 
					  get route do |env|
 | 
				
			||||||
    locale = LOCALES[env.get("preferences").as(Preferences).locale]?
 | 
					    locale = LOCALES[env.get("preferences").as(Preferences).locale]?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1429,11 +1436,13 @@ get "/api/v1/mixes/:rdid" do |env|
 | 
				
			|||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
get "/api/manifest/dash/id/videoplayback" do |env|
 | 
					get "/api/manifest/dash/id/videoplayback" do |env|
 | 
				
			||||||
 | 
					  env.response.headers.delete("Content-Type")
 | 
				
			||||||
  env.response.headers["Access-Control-Allow-Origin"] = "*"
 | 
					  env.response.headers["Access-Control-Allow-Origin"] = "*"
 | 
				
			||||||
  env.redirect "/videoplayback?#{env.params.query}"
 | 
					  env.redirect "/videoplayback?#{env.params.query}"
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
get "/api/manifest/dash/id/videoplayback/*" do |env|
 | 
					get "/api/manifest/dash/id/videoplayback/*" do |env|
 | 
				
			||||||
 | 
					  env.response.headers.delete("Content-Type")
 | 
				
			||||||
  env.response.headers["Access-Control-Allow-Origin"] = "*"
 | 
					  env.response.headers["Access-Control-Allow-Origin"] = "*"
 | 
				
			||||||
  env.redirect env.request.path.lchop("/api/manifest/dash/id")
 | 
					  env.redirect env.request.path.lchop("/api/manifest/dash/id")
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
@ -1486,16 +1495,19 @@ get "/api/manifest/dash/id/:id" do |env|
 | 
				
			|||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  audio_streams = video.audio_streams(adaptive_fmts).select { |stream| stream["type"].starts_with? "audio/mp4" }
 | 
					  audio_streams = video.audio_streams(adaptive_fmts)
 | 
				
			||||||
  video_streams = video.video_streams(adaptive_fmts).select { |stream| stream["type"].starts_with? "video/mp4" }.uniq { |stream| stream["size"] }
 | 
					  video_streams = video.video_streams(adaptive_fmts)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  manifest = XML.build(indent: "  ", encoding: "UTF-8") do |xml|
 | 
					  XML.build(indent: "  ", encoding: "UTF-8") do |xml|
 | 
				
			||||||
    xml.element("MPD", "xmlns": "urn:mpeg:dash:schema:mpd:2011",
 | 
					    xml.element("MPD", "xmlns": "urn:mpeg:dash:schema:mpd:2011",
 | 
				
			||||||
      "profiles": "urn:mpeg:dash:profile:isoff-live:2011", minBufferTime: "PT1.5S", type: "static",
 | 
					      "profiles": "urn:mpeg:dash:profile:isoff-live:2011", minBufferTime: "PT1.5S", type: "static",
 | 
				
			||||||
      mediaPresentationDuration: "PT#{video.info["length_seconds"]}S") do
 | 
					      mediaPresentationDuration: "PT#{video.info["length_seconds"]}S") do
 | 
				
			||||||
      xml.element("Period") do
 | 
					      xml.element("Period") do
 | 
				
			||||||
        xml.element("AdaptationSet", mimeType: "audio/mp4", startWithSAP: 1, subsegmentAlignment: true) do
 | 
					        i = 0
 | 
				
			||||||
          audio_streams.each do |fmt|
 | 
					
 | 
				
			||||||
 | 
					        {"audio/mp4", "audio/webm"}.each do |mime_type|
 | 
				
			||||||
 | 
					          xml.element("AdaptationSet", id: i, mimeType: mime_type, startWithSAP: 1, subsegmentAlignment: true) do
 | 
				
			||||||
 | 
					            audio_streams.select { |stream| stream["type"].starts_with? mime_type }.each do |fmt|
 | 
				
			||||||
              codecs = fmt["type"].split("codecs=")[1].strip('"')
 | 
					              codecs = fmt["type"].split("codecs=")[1].strip('"')
 | 
				
			||||||
              bandwidth = fmt["bitrate"]
 | 
					              bandwidth = fmt["bitrate"]
 | 
				
			||||||
              itag = fmt["itag"]
 | 
					              itag = fmt["itag"]
 | 
				
			||||||
@ -1512,14 +1524,20 @@ get "/api/manifest/dash/id/:id" do |env|
 | 
				
			|||||||
            end
 | 
					            end
 | 
				
			||||||
          end
 | 
					          end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        xml.element("AdaptationSet", mimeType: "video/mp4", startWithSAP: 1, subsegmentAlignment: true,
 | 
					          i += 1
 | 
				
			||||||
          scanType: "progressive") do
 | 
					        end
 | 
				
			||||||
          video_streams.each do |fmt|
 | 
					
 | 
				
			||||||
 | 
					        {"video/mp4", "video/webm"}.each do |mime_type|
 | 
				
			||||||
 | 
					          xml.element("AdaptationSet", id: i, mimeType: mime_type, startWithSAP: 1, subsegmentAlignment: true, scanType: "progressive") do
 | 
				
			||||||
 | 
					            video_streams.select { |stream| stream["type"].starts_with? mime_type }.each do |fmt|
 | 
				
			||||||
              codecs = fmt["type"].split("codecs=")[1].strip('"')
 | 
					              codecs = fmt["type"].split("codecs=")[1].strip('"')
 | 
				
			||||||
              bandwidth = fmt["bitrate"]
 | 
					              bandwidth = fmt["bitrate"]
 | 
				
			||||||
              itag = fmt["itag"]
 | 
					              itag = fmt["itag"]
 | 
				
			||||||
              url = fmt["url"]
 | 
					              url = fmt["url"]
 | 
				
			||||||
            height, width = fmt["size"].split("x")
 | 
					              width, height = fmt["size"].split("x").map { |i| i.to_i }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              # Resolutions reported by YouTube player (may not accurately reflect source)
 | 
				
			||||||
 | 
					              height = [4320, 2160, 1440, 1080, 720, 480, 360, 240, 144].sort_by { |i| (height - i).abs }[0]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
              xml.element("Representation", id: itag, codecs: codecs, width: width, height: height,
 | 
					              xml.element("Representation", id: itag, codecs: codecs, width: width, height: height,
 | 
				
			||||||
                startWithSAP: "1", maxPlayoutRate: "1",
 | 
					                startWithSAP: "1", maxPlayoutRate: "1",
 | 
				
			||||||
@ -1531,13 +1549,12 @@ get "/api/manifest/dash/id/:id" do |env|
 | 
				
			|||||||
              end
 | 
					              end
 | 
				
			||||||
            end
 | 
					            end
 | 
				
			||||||
          end
 | 
					          end
 | 
				
			||||||
      end
 | 
					 | 
				
			||||||
    end
 | 
					 | 
				
			||||||
  end
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  manifest = manifest.gsub(%(<?xml version="1.0" encoding="UTF-8U"?>), %(<?xml version="1.0" encoding="UTF-8"?>))
 | 
					          i += 1
 | 
				
			||||||
  manifest = manifest.gsub(%(<?xml version="1.0" encoding="UTF-8V"?>), %(<?xml version="1.0" encoding="UTF-8"?>))
 | 
					        end
 | 
				
			||||||
  manifest
 | 
					      end
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
get "/api/manifest/hls_variant/*" do |env|
 | 
					get "/api/manifest/hls_variant/*" do |env|
 | 
				
			||||||
@ -1549,13 +1566,21 @@ get "/api/manifest/hls_variant/*" do |env|
 | 
				
			|||||||
    next
 | 
					    next
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  local = env.params.query["local"]?.try &.== "true"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  env.response.content_type = "application/x-mpegURL"
 | 
					  env.response.content_type = "application/x-mpegURL"
 | 
				
			||||||
  env.response.headers.add("Access-Control-Allow-Origin", "*")
 | 
					  env.response.headers.add("Access-Control-Allow-Origin", "*")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  host_url = make_host_url(config, Kemal.config)
 | 
					  host_url = make_host_url(config, Kemal.config)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  manifest = manifest.body
 | 
					  manifest = manifest.body
 | 
				
			||||||
  manifest.gsub("https://www.youtube.com", host_url)
 | 
					
 | 
				
			||||||
 | 
					  if local
 | 
				
			||||||
 | 
					    manifest = manifest.gsub("https://www.youtube.com", host_url)
 | 
				
			||||||
 | 
					    manifest = manifest.gsub("index.m3u8", "index.m3u8?local=true")
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  manifest
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
get "/api/manifest/hls_playlist/*" do |env|
 | 
					get "/api/manifest/hls_playlist/*" do |env|
 | 
				
			||||||
@ -1567,15 +1592,24 @@ get "/api/manifest/hls_playlist/*" do |env|
 | 
				
			|||||||
    next
 | 
					    next
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  host_url = make_host_url(config, Kemal.config)
 | 
					  local = env.params.query["local"]?.try &.== "true"
 | 
				
			||||||
 | 
					 | 
				
			||||||
  manifest = manifest.body.gsub("https://www.youtube.com", host_url)
 | 
					 | 
				
			||||||
  manifest = manifest.gsub(/https:\/\/r\d---.{11}\.c\.youtube\.com/, host_url)
 | 
					 | 
				
			||||||
  fvip = manifest.match(/hls_chunk_host\/r(?<fvip>\d)---/).not_nil!["fvip"]
 | 
					 | 
				
			||||||
  manifest = manifest.gsub("seg.ts", "seg.ts/fvip/#{fvip}")
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  env.response.content_type = "application/x-mpegURL"
 | 
					  env.response.content_type = "application/x-mpegURL"
 | 
				
			||||||
  env.response.headers.add("Access-Control-Allow-Origin", "*")
 | 
					  env.response.headers.add("Access-Control-Allow-Origin", "*")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  host_url = make_host_url(config, Kemal.config)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  manifest = manifest.body
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if local
 | 
				
			||||||
 | 
					    manifest = manifest.gsub("https://www.youtube.com", host_url)
 | 
				
			||||||
 | 
					    manifest = manifest.gsub(/https:\/\/r\d---.{11}\.c\.youtube\.com/, host_url)
 | 
				
			||||||
 | 
					    manifest = manifest.gsub("seg.ts", "seg.ts?local=true")
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  fvip = manifest.match(/hls_chunk_host\/r(?<fvip>\d+)---/).not_nil!["fvip"]
 | 
				
			||||||
 | 
					  manifest = manifest.gsub("seg.ts", "seg.ts/fvip/#{fvip}")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  manifest
 | 
					  manifest
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1584,11 +1618,18 @@ end
 | 
				
			|||||||
get "/latest_version" do |env|
 | 
					get "/latest_version" do |env|
 | 
				
			||||||
  if env.params.query["download_widget"]?
 | 
					  if env.params.query["download_widget"]?
 | 
				
			||||||
    download_widget = JSON.parse(env.params.query["download_widget"])
 | 
					    download_widget = JSON.parse(env.params.query["download_widget"])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    id = download_widget["id"].as_s
 | 
					    id = download_widget["id"].as_s
 | 
				
			||||||
    itag = download_widget["itag"].as_s
 | 
					 | 
				
			||||||
    title = download_widget["title"].as_s
 | 
					    title = download_widget["title"].as_s
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if label = download_widget["label"]?
 | 
				
			||||||
 | 
					      env.redirect "/api/v1/captions/#{id}?label=#{label}&title=#{title}"
 | 
				
			||||||
 | 
					      next
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					      itag = download_widget["itag"].as_s
 | 
				
			||||||
      local = "true"
 | 
					      local = "true"
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  id ||= env.params.query["id"]?
 | 
					  id ||= env.params.query["id"]?
 | 
				
			||||||
  itag ||= env.params.query["itag"]?
 | 
					  itag ||= env.params.query["itag"]?
 | 
				
			||||||
@ -1631,24 +1672,28 @@ get "/latest_version" do |env|
 | 
				
			|||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
options "/videoplayback" do |env|
 | 
					options "/videoplayback" do |env|
 | 
				
			||||||
 | 
					  env.response.headers.delete("Content-Type")
 | 
				
			||||||
  env.response.headers["Access-Control-Allow-Origin"] = "*"
 | 
					  env.response.headers["Access-Control-Allow-Origin"] = "*"
 | 
				
			||||||
  env.response.headers["Access-Control-Allow-Methods"] = "GET, OPTIONS"
 | 
					  env.response.headers["Access-Control-Allow-Methods"] = "GET, OPTIONS"
 | 
				
			||||||
  env.response.headers["Access-Control-Allow-Headers"] = "Content-Type, Range"
 | 
					  env.response.headers["Access-Control-Allow-Headers"] = "Content-Type, Range"
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
options "/videoplayback/*" do |env|
 | 
					options "/videoplayback/*" do |env|
 | 
				
			||||||
 | 
					  env.response.headers.delete("Content-Type")
 | 
				
			||||||
  env.response.headers["Access-Control-Allow-Origin"] = "*"
 | 
					  env.response.headers["Access-Control-Allow-Origin"] = "*"
 | 
				
			||||||
  env.response.headers["Access-Control-Allow-Methods"] = "GET, OPTIONS"
 | 
					  env.response.headers["Access-Control-Allow-Methods"] = "GET, OPTIONS"
 | 
				
			||||||
  env.response.headers["Access-Control-Allow-Headers"] = "Content-Type, Range"
 | 
					  env.response.headers["Access-Control-Allow-Headers"] = "Content-Type, Range"
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
options "/api/manifest/dash/id/videoplayback" do |env|
 | 
					options "/api/manifest/dash/id/videoplayback" do |env|
 | 
				
			||||||
 | 
					  env.response.headers.delete("Content-Type")
 | 
				
			||||||
  env.response.headers["Access-Control-Allow-Origin"] = "*"
 | 
					  env.response.headers["Access-Control-Allow-Origin"] = "*"
 | 
				
			||||||
  env.response.headers["Access-Control-Allow-Methods"] = "GET, OPTIONS"
 | 
					  env.response.headers["Access-Control-Allow-Methods"] = "GET, OPTIONS"
 | 
				
			||||||
  env.response.headers["Access-Control-Allow-Headers"] = "Content-Type, Range"
 | 
					  env.response.headers["Access-Control-Allow-Headers"] = "Content-Type, Range"
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
options "/api/manifest/dash/id/videoplayback/*" do |env|
 | 
					options "/api/manifest/dash/id/videoplayback/*" do |env|
 | 
				
			||||||
 | 
					  env.response.headers.delete("Content-Type")
 | 
				
			||||||
  env.response.headers["Access-Control-Allow-Origin"] = "*"
 | 
					  env.response.headers["Access-Control-Allow-Origin"] = "*"
 | 
				
			||||||
  env.response.headers["Access-Control-Allow-Methods"] = "GET, OPTIONS"
 | 
					  env.response.headers["Access-Control-Allow-Methods"] = "GET, OPTIONS"
 | 
				
			||||||
  env.response.headers["Access-Control-Allow-Headers"] = "Content-Type, Range"
 | 
					  env.response.headers["Access-Control-Allow-Headers"] = "Content-Type, Range"
 | 
				
			||||||
@ -1689,7 +1734,8 @@ get "/videoplayback" do |env|
 | 
				
			|||||||
  query_params = env.params.query
 | 
					  query_params = env.params.query
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  fvip = query_params["fvip"]? || "3"
 | 
					  fvip = query_params["fvip"]? || "3"
 | 
				
			||||||
  mns = query_params["mn"].split(",")
 | 
					  mns = query_params["mn"]?.try &.split(",")
 | 
				
			||||||
 | 
					  mns ||= [] of String
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if query_params["region"]?
 | 
					  if query_params["region"]?
 | 
				
			||||||
    region = query_params["region"]
 | 
					    region = query_params["region"]
 | 
				
			||||||
@ -1706,7 +1752,7 @@ get "/videoplayback" do |env|
 | 
				
			|||||||
  url = "/videoplayback?#{query_params.to_s}"
 | 
					  url = "/videoplayback?#{query_params.to_s}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  headers = HTTP::Headers.new
 | 
					  headers = HTTP::Headers.new
 | 
				
			||||||
  {"Accept", "Accept-Encoding", "Connection", "Range"}.each do |header|
 | 
					  {"Accept", "Accept-Encoding", "Cache-Control", "Connection", "If-None-Match", "Range"}.each do |header|
 | 
				
			||||||
    if env.request.headers[header]?
 | 
					    if env.request.headers[header]?
 | 
				
			||||||
      headers[header] = env.request.headers[header]
 | 
					      headers[header] = env.request.headers[header]
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
@ -1750,17 +1796,21 @@ get "/videoplayback" do |env|
 | 
				
			|||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  client = make_client(URI.parse(host), proxies, region)
 | 
					  client = make_client(URI.parse(host), proxies, region)
 | 
				
			||||||
 | 
					  begin
 | 
				
			||||||
    client.get(url, headers) do |response|
 | 
					    client.get(url, headers) do |response|
 | 
				
			||||||
      env.response.status_code = response.status_code
 | 
					      env.response.status_code = response.status_code
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      response.headers.each do |key, value|
 | 
					      response.headers.each do |key, value|
 | 
				
			||||||
 | 
					        if !{"Access-Control-Allow-Origin", "Alt-Svc", "Server"}.includes? key
 | 
				
			||||||
          env.response.headers[key] = value
 | 
					          env.response.headers[key] = value
 | 
				
			||||||
        end
 | 
					        end
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      env.response.headers["Access-Control-Allow-Origin"] = "*"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      if response.headers["Location"]?
 | 
					      if response.headers["Location"]?
 | 
				
			||||||
        url = URI.parse(response.headers["Location"])
 | 
					        url = URI.parse(response.headers["Location"])
 | 
				
			||||||
        host = url.host
 | 
					        host = url.host
 | 
				
			||||||
      env.response.headers["Access-Control-Allow-Origin"] = "*"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        url = url.full_path
 | 
					        url = url.full_path
 | 
				
			||||||
        url += "&host=#{host}"
 | 
					        url += "&host=#{host}"
 | 
				
			||||||
@ -1777,19 +1827,9 @@ get "/videoplayback" do |env|
 | 
				
			|||||||
        env.response.headers["Content-Disposition"] = "attachment; filename=\"#{URI.escape(title)}\"; filename*=UTF-8''#{URI.escape(title)}"
 | 
					        env.response.headers["Content-Disposition"] = "attachment; filename=\"#{URI.escape(title)}\"; filename*=UTF-8''#{URI.escape(title)}"
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    env.response.headers["Access-Control-Allow-Origin"] = "*"
 | 
					      proxy_file(response, env)
 | 
				
			||||||
 | 
					 | 
				
			||||||
    begin
 | 
					 | 
				
			||||||
      chunk_size = 4096
 | 
					 | 
				
			||||||
      size = 1
 | 
					 | 
				
			||||||
      while size > 0
 | 
					 | 
				
			||||||
        size = IO.copy(response.body_io, env.response.output, chunk_size)
 | 
					 | 
				
			||||||
        env.response.flush
 | 
					 | 
				
			||||||
        Fiber.yield
 | 
					 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
  rescue ex
 | 
					  rescue ex
 | 
				
			||||||
      break
 | 
					 | 
				
			||||||
    end
 | 
					 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1803,44 +1843,78 @@ get "/ggpht/*" do |env|
 | 
				
			|||||||
  url = env.request.path.lchop("/ggpht")
 | 
					  url = env.request.path.lchop("/ggpht")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  headers = HTTP::Headers.new
 | 
					  headers = HTTP::Headers.new
 | 
				
			||||||
  {"Range", "Accept", "Accept-Encoding"}.each do |header|
 | 
					  {"Accept", "Accept-Encoding", "Cache-Control", "Connection", "If-None-Match", "Range"}.each do |header|
 | 
				
			||||||
    if env.request.headers[header]?
 | 
					    if env.request.headers[header]?
 | 
				
			||||||
      headers[header] = env.request.headers[header]
 | 
					      headers[header] = env.request.headers[header]
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  begin
 | 
				
			||||||
    client.get(url, headers) do |response|
 | 
					    client.get(url, headers) do |response|
 | 
				
			||||||
    env.response.status_code = response.status_code
 | 
					 | 
				
			||||||
      response.headers.each do |key, value|
 | 
					      response.headers.each do |key, value|
 | 
				
			||||||
 | 
					        if !{"Access-Control-Allow-Origin", "Alt-Svc", "Server"}.includes? key
 | 
				
			||||||
          env.response.headers[key] = value
 | 
					          env.response.headers[key] = value
 | 
				
			||||||
        end
 | 
					        end
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      if response.status_code == 304
 | 
					      if response.status_code == 304
 | 
				
			||||||
        break
 | 
					        break
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    chunk_size = 4096
 | 
					      env.response.headers["Access-Control-Allow-Origin"] = "*"
 | 
				
			||||||
    size = 1
 | 
					
 | 
				
			||||||
    if response.headers.includes_word?("Content-Encoding", "gzip")
 | 
					      proxy_file(response, env)
 | 
				
			||||||
      Gzip::Writer.open(env.response) do |deflate|
 | 
					 | 
				
			||||||
        until size == 0
 | 
					 | 
				
			||||||
          size = IO.copy(response.body_io, deflate)
 | 
					 | 
				
			||||||
          env.response.flush
 | 
					 | 
				
			||||||
        end
 | 
					 | 
				
			||||||
      end
 | 
					 | 
				
			||||||
    elsif response.headers.includes_word?("Content-Encoding", "deflate")
 | 
					 | 
				
			||||||
      Flate::Writer.open(env.response) do |deflate|
 | 
					 | 
				
			||||||
        until size == 0
 | 
					 | 
				
			||||||
          size = IO.copy(response.body_io, deflate)
 | 
					 | 
				
			||||||
          env.response.flush
 | 
					 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					  rescue ex
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					options "/sb/:id/:storyboard/:index" do |env|
 | 
				
			||||||
 | 
					  env.response.headers.delete("Content-Type")
 | 
				
			||||||
 | 
					  env.response.headers["Access-Control-Allow-Origin"] = "*"
 | 
				
			||||||
 | 
					  env.response.headers["Access-Control-Allow-Methods"] = "GET, OPTIONS"
 | 
				
			||||||
 | 
					  env.response.headers["Access-Control-Allow-Headers"] = "Content-Type, Range"
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					get "/sb/:id/:storyboard/:index" do |env|
 | 
				
			||||||
 | 
					  id = env.params.url["id"]
 | 
				
			||||||
 | 
					  storyboard = env.params.url["storyboard"]
 | 
				
			||||||
 | 
					  index = env.params.url["index"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if storyboard.starts_with? "storyboard_live"
 | 
				
			||||||
 | 
					    host = "https://i.ytimg.com"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
      until size == 0
 | 
					    host = "https://i9.ytimg.com"
 | 
				
			||||||
        size = IO.copy(response.body_io, env.response, chunk_size)
 | 
					  end
 | 
				
			||||||
        env.response.flush
 | 
					  client = make_client(URI.parse(host))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  url = "/sb/#{id}/#{storyboard}/#{index}?#{env.params.query}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  headers = HTTP::Headers.new
 | 
				
			||||||
 | 
					  {"Accept", "Accept-Encoding", "Cache-Control", "Connection", "If-None-Match", "Range"}.each do |header|
 | 
				
			||||||
 | 
					    if env.request.headers[header]?
 | 
				
			||||||
 | 
					      headers[header] = env.request.headers[header]
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  begin
 | 
				
			||||||
 | 
					    client.get(url, headers) do |response|
 | 
				
			||||||
 | 
					      env.response.status_code = response.status_code
 | 
				
			||||||
 | 
					      response.headers.each do |key, value|
 | 
				
			||||||
 | 
					        if !{"Access-Control-Allow-Origin", "Alt-Svc", "Server"}.includes? key
 | 
				
			||||||
 | 
					          env.response.headers[key] = value
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      if response.status_code >= 400
 | 
				
			||||||
 | 
					        break
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      env.response.headers["Access-Control-Allow-Origin"] = "*"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      proxy_file(response, env)
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  rescue ex
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1862,44 +1936,30 @@ get "/vi/:id/:name" do |env|
 | 
				
			|||||||
  url = "/vi/#{id}/#{name}"
 | 
					  url = "/vi/#{id}/#{name}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  headers = HTTP::Headers.new
 | 
					  headers = HTTP::Headers.new
 | 
				
			||||||
  {"Range", "Accept", "Accept-Encoding"}.each do |header|
 | 
					  {"Accept", "Accept-Encoding", "Cache-Control", "Connection", "If-None-Match", "Range"}.each do |header|
 | 
				
			||||||
    if env.request.headers[header]?
 | 
					    if env.request.headers[header]?
 | 
				
			||||||
      headers[header] = env.request.headers[header]
 | 
					      headers[header] = env.request.headers[header]
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  begin
 | 
				
			||||||
    client.get(url, headers) do |response|
 | 
					    client.get(url, headers) do |response|
 | 
				
			||||||
      env.response.status_code = response.status_code
 | 
					      env.response.status_code = response.status_code
 | 
				
			||||||
      response.headers.each do |key, value|
 | 
					      response.headers.each do |key, value|
 | 
				
			||||||
 | 
					        if !{"Access-Control-Allow-Origin", "Alt-Svc", "Server"}.includes? key
 | 
				
			||||||
          env.response.headers[key] = value
 | 
					          env.response.headers[key] = value
 | 
				
			||||||
        end
 | 
					        end
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      if response.status_code == 304
 | 
					      if response.status_code == 304
 | 
				
			||||||
        break
 | 
					        break
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    chunk_size = 4096
 | 
					      env.response.headers["Access-Control-Allow-Origin"] = "*"
 | 
				
			||||||
    size = 1
 | 
					
 | 
				
			||||||
    if response.headers.includes_word?("Content-Encoding", "gzip")
 | 
					      proxy_file(response, env)
 | 
				
			||||||
      Gzip::Writer.open(env.response) do |deflate|
 | 
					 | 
				
			||||||
        until size == 0
 | 
					 | 
				
			||||||
          size = IO.copy(response.body_io, deflate)
 | 
					 | 
				
			||||||
          env.response.flush
 | 
					 | 
				
			||||||
        end
 | 
					 | 
				
			||||||
      end
 | 
					 | 
				
			||||||
    elsif response.headers.includes_word?("Content-Encoding", "deflate")
 | 
					 | 
				
			||||||
      Flate::Writer.open(env.response) do |deflate|
 | 
					 | 
				
			||||||
        until size == 0
 | 
					 | 
				
			||||||
          size = IO.copy(response.body_io, deflate)
 | 
					 | 
				
			||||||
          env.response.flush
 | 
					 | 
				
			||||||
        end
 | 
					 | 
				
			||||||
      end
 | 
					 | 
				
			||||||
    else
 | 
					 | 
				
			||||||
      until size == 0
 | 
					 | 
				
			||||||
        size = IO.copy(response.body_io, env.response, chunk_size)
 | 
					 | 
				
			||||||
        env.response.flush
 | 
					 | 
				
			||||||
      end
 | 
					 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					  rescue ex
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1920,13 +1980,17 @@ end
 | 
				
			|||||||
# Add redirect if SSL is enabled
 | 
					# Add redirect if SSL is enabled
 | 
				
			||||||
if Kemal.config.ssl
 | 
					if Kemal.config.ssl
 | 
				
			||||||
  spawn do
 | 
					  spawn do
 | 
				
			||||||
    server = HTTP::Server.new do |context|
 | 
					    server = HTTP::Server.new do |env|
 | 
				
			||||||
      redirect_url = "https://#{context.request.host}#{context.request.path}"
 | 
					      redirect_url = "https://#{env.request.host}#{env.request.path}"
 | 
				
			||||||
      if context.request.query
 | 
					      if env.request.query
 | 
				
			||||||
        redirect_url += "?#{context.request.query}"
 | 
					        redirect_url += "?#{env.request.query}"
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
      context.response.headers.add("Location", redirect_url)
 | 
					
 | 
				
			||||||
      context.response.status_code = 301
 | 
					      if config.hsts
 | 
				
			||||||
 | 
					        env.response.headers["Strict-Transport-Security"] = "max-age=31536000; includeSubDomains; preload"
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					      env.response.headers["Location"] = redirect_url
 | 
				
			||||||
 | 
					      env.response.status_code = 301
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    server.bind_tcp "0.0.0.0", 80
 | 
					    server.bind_tcp "0.0.0.0", 80
 | 
				
			||||||
@ -1938,8 +2002,9 @@ Kemal.config.powered_by_header = false
 | 
				
			|||||||
add_handler FilteredCompressHandler.new
 | 
					add_handler FilteredCompressHandler.new
 | 
				
			||||||
add_handler APIHandler.new
 | 
					add_handler APIHandler.new
 | 
				
			||||||
add_handler DenyFrame.new
 | 
					add_handler DenyFrame.new
 | 
				
			||||||
add_context_storage_type(User)
 | 
					add_context_storage_type(Array(String))
 | 
				
			||||||
add_context_storage_type(Preferences)
 | 
					add_context_storage_type(Preferences)
 | 
				
			||||||
 | 
					add_context_storage_type(User)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Kemal.config.logger = logger
 | 
					Kemal.config.logger = logger
 | 
				
			||||||
Kemal.run
 | 
					Kemal.run
 | 
				
			||||||
 | 
				
			|||||||
@ -1,5 +1,5 @@
 | 
				
			|||||||
struct InvidiousChannel
 | 
					struct InvidiousChannel
 | 
				
			||||||
  add_mapping({
 | 
					  db_mapping({
 | 
				
			||||||
    id:         String,
 | 
					    id:         String,
 | 
				
			||||||
    author:     String,
 | 
					    author:     String,
 | 
				
			||||||
    updated:    Time,
 | 
					    updated:    Time,
 | 
				
			||||||
@ -9,7 +9,37 @@ struct InvidiousChannel
 | 
				
			|||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct ChannelVideo
 | 
					struct ChannelVideo
 | 
				
			||||||
  add_mapping({
 | 
					  def to_json(locale, config, kemal_config, json : JSON::Builder)
 | 
				
			||||||
 | 
					    json.object do
 | 
				
			||||||
 | 
					      json.field "title", self.title
 | 
				
			||||||
 | 
					      json.field "videoId", self.id
 | 
				
			||||||
 | 
					      json.field "videoThumbnails" do
 | 
				
			||||||
 | 
					        generate_thumbnails(json, self.id, config, Kemal.config)
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      json.field "lengthSeconds", self.length_seconds
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      json.field "author", self.author
 | 
				
			||||||
 | 
					      json.field "authorId", self.ucid
 | 
				
			||||||
 | 
					      json.field "authorUrl", "/channel/#{self.ucid}"
 | 
				
			||||||
 | 
					      json.field "published", self.published.to_unix
 | 
				
			||||||
 | 
					      json.field "publishedText", translate(locale, "`x` ago", recode_date(self.published, locale))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      json.field "viewCount", self.views
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  def to_json(locale, config, kemal_config, json : JSON::Builder | Nil = nil)
 | 
				
			||||||
 | 
					    if json
 | 
				
			||||||
 | 
					      to_json(locale, config, kemal_config, json)
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					      JSON.build do |json|
 | 
				
			||||||
 | 
					        to_json(locale, config, kemal_config, json)
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  db_mapping({
 | 
				
			||||||
    id:                 String,
 | 
					    id:                 String,
 | 
				
			||||||
    title:              String,
 | 
					    title:              String,
 | 
				
			||||||
    published:          Time,
 | 
					    published:          Time,
 | 
				
			||||||
@ -19,32 +49,43 @@ struct ChannelVideo
 | 
				
			|||||||
    length_seconds:     {type: Int32, default: 0},
 | 
					    length_seconds:     {type: Int32, default: 0},
 | 
				
			||||||
    live_now:           {type: Bool, default: false},
 | 
					    live_now:           {type: Bool, default: false},
 | 
				
			||||||
    premiere_timestamp: {type: Time?, default: nil},
 | 
					    premiere_timestamp: {type: Time?, default: nil},
 | 
				
			||||||
 | 
					    views:              {type: Int64?, default: nil},
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def get_batch_channels(channels, db, refresh = false, pull_all_videos = true, max_threads = 10)
 | 
					def get_batch_channels(channels, db, refresh = false, pull_all_videos = true, max_threads = 10)
 | 
				
			||||||
  active_threads = 0
 | 
					  finished_channel = Channel(String | Nil).new
 | 
				
			||||||
  active_channel = Channel(String | Nil).new
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  final = [] of String
 | 
					  spawn do
 | 
				
			||||||
  channels.map do |ucid|
 | 
					    active_threads = 0
 | 
				
			||||||
 | 
					    active_channel = Channel(Nil).new
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    channels.each do |ucid|
 | 
				
			||||||
      if active_threads >= max_threads
 | 
					      if active_threads >= max_threads
 | 
				
			||||||
      if response = active_channel.receive
 | 
					        active_channel.receive
 | 
				
			||||||
        active_threads -= 1
 | 
					        active_threads -= 1
 | 
				
			||||||
        final << response
 | 
					 | 
				
			||||||
      end
 | 
					 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      active_threads += 1
 | 
					      active_threads += 1
 | 
				
			||||||
      spawn do
 | 
					      spawn do
 | 
				
			||||||
        begin
 | 
					        begin
 | 
				
			||||||
          get_channel(ucid, db, refresh, pull_all_videos)
 | 
					          get_channel(ucid, db, refresh, pull_all_videos)
 | 
				
			||||||
        active_channel.send(ucid)
 | 
					          finished_channel.send(ucid)
 | 
				
			||||||
        rescue ex
 | 
					        rescue ex
 | 
				
			||||||
 | 
					          finished_channel.send(nil)
 | 
				
			||||||
 | 
					        ensure
 | 
				
			||||||
          active_channel.send(nil)
 | 
					          active_channel.send(nil)
 | 
				
			||||||
        end
 | 
					        end
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  final = [] of String
 | 
				
			||||||
 | 
					  channels.size.times do
 | 
				
			||||||
 | 
					    if ucid = finished_channel.receive
 | 
				
			||||||
 | 
					      final << ucid
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return final
 | 
					  return final
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
@ -91,8 +132,9 @@ def fetch_channel(ucid, db, pull_all_videos = true, locale = nil)
 | 
				
			|||||||
    auto_generated = true
 | 
					    auto_generated = true
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if !pull_all_videos
 | 
					  page = 1
 | 
				
			||||||
    url = produce_channel_videos_url(ucid, 1, auto_generated: auto_generated)
 | 
					
 | 
				
			||||||
 | 
					  url = produce_channel_videos_url(ucid, page, auto_generated: auto_generated)
 | 
				
			||||||
  response = client.get(url)
 | 
					  response = client.get(url)
 | 
				
			||||||
  json = JSON.parse(response.body)
 | 
					  json = JSON.parse(response.body)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -103,9 +145,7 @@ def fetch_channel(ucid, db, pull_all_videos = true, locale = nil)
 | 
				
			|||||||
    if auto_generated
 | 
					    if auto_generated
 | 
				
			||||||
      videos = extract_videos(nodeset)
 | 
					      videos = extract_videos(nodeset)
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
        videos = extract_videos(nodeset, ucid)
 | 
					      videos = extract_videos(nodeset, ucid, author)
 | 
				
			||||||
        videos.each { |video| video.ucid = ucid }
 | 
					 | 
				
			||||||
        videos.each { |video| video.author = author }
 | 
					 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -118,6 +158,8 @@ def fetch_channel(ucid, db, pull_all_videos = true, locale = nil)
 | 
				
			|||||||
    updated = Time.parse_rfc3339(entry.xpath_node("updated").not_nil!.content)
 | 
					    updated = Time.parse_rfc3339(entry.xpath_node("updated").not_nil!.content)
 | 
				
			||||||
    author = entry.xpath_node("author/name").not_nil!.content
 | 
					    author = entry.xpath_node("author/name").not_nil!.content
 | 
				
			||||||
    ucid = entry.xpath_node("channelid").not_nil!.content
 | 
					    ucid = entry.xpath_node("channelid").not_nil!.content
 | 
				
			||||||
 | 
					    views = entry.xpath_node("group/community/statistics").try &.["views"]?.try &.to_i64?
 | 
				
			||||||
 | 
					    views ||= 0_i64
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    channel_video = videos.select { |video| video.id == video_id }[0]?
 | 
					    channel_video = videos.select { |video| video.id == video_id }[0]?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -130,32 +172,44 @@ def fetch_channel(ucid, db, pull_all_videos = true, locale = nil)
 | 
				
			|||||||
    premiere_timestamp = channel_video.try &.premiere_timestamp
 | 
					    premiere_timestamp = channel_video.try &.premiere_timestamp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    video = ChannelVideo.new(
 | 
					    video = ChannelVideo.new(
 | 
				
			||||||
        video_id,
 | 
					      id: video_id,
 | 
				
			||||||
        title,
 | 
					      title: title,
 | 
				
			||||||
        published,
 | 
					      published: published,
 | 
				
			||||||
        Time.now,
 | 
					      updated: Time.now,
 | 
				
			||||||
        ucid,
 | 
					      ucid: ucid,
 | 
				
			||||||
        author,
 | 
					      author: author,
 | 
				
			||||||
        length_seconds,
 | 
					      length_seconds: length_seconds,
 | 
				
			||||||
        live_now,
 | 
					      live_now: live_now,
 | 
				
			||||||
        premiere_timestamp
 | 
					      premiere_timestamp: premiere_timestamp,
 | 
				
			||||||
 | 
					      views: views,
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      db.exec("UPDATE users SET notifications = notifications || $1 \
 | 
					    users = db.query_all("UPDATE users SET notifications = notifications || $1 \
 | 
				
			||||||
        WHERE updated < $2 AND $3 = ANY(subscriptions) AND $1 <> ALL(notifications)", video.id, video.published, ucid)
 | 
					      WHERE updated < $2 AND $3 = ANY(subscriptions) AND $1 <> ALL(notifications) RETURNING email",
 | 
				
			||||||
 | 
					      video.id, video.published, ucid, as: String)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    video_array = video.to_a
 | 
					    video_array = video.to_a
 | 
				
			||||||
    args = arg_array(video_array)
 | 
					    args = arg_array(video_array)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      # We don't include the 'premire_timestamp' here because channel pages don't include them,
 | 
					    # We don't include the 'premiere_timestamp' here because channel pages don't include them,
 | 
				
			||||||
    # meaning the above timestamp is always null
 | 
					    # meaning the above timestamp is always null
 | 
				
			||||||
    db.exec("INSERT INTO channel_videos VALUES (#{args}) \
 | 
					    db.exec("INSERT INTO channel_videos VALUES (#{args}) \
 | 
				
			||||||
      ON CONFLICT (id) DO UPDATE SET title = $2, published = $3, \
 | 
					      ON CONFLICT (id) DO UPDATE SET title = $2, published = $3, \
 | 
				
			||||||
      updated = $4, ucid = $5, author = $6, length_seconds = $7, \
 | 
					      updated = $4, ucid = $5, author = $6, length_seconds = $7, \
 | 
				
			||||||
      live_now = $8", video_array)
 | 
					      live_now = $8, views = $10", video_array)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    users.each do |user|
 | 
				
			||||||
 | 
					      payload = {
 | 
				
			||||||
 | 
					        "email"  => user,
 | 
				
			||||||
 | 
					        "action" => "refresh",
 | 
				
			||||||
 | 
					      }.to_json
 | 
				
			||||||
 | 
					      PG_DB.exec("NOTIFY feeds, E'#{payload}'")
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
  else
 | 
					  end
 | 
				
			||||||
    page = 1
 | 
					
 | 
				
			||||||
 | 
					  if pull_all_videos
 | 
				
			||||||
 | 
					    page += 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ids = [] of String
 | 
					    ids = [] of String
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    loop do
 | 
					    loop do
 | 
				
			||||||
@ -170,48 +224,59 @@ def fetch_channel(ucid, db, pull_all_videos = true, locale = nil)
 | 
				
			|||||||
        break
 | 
					        break
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      nodeset = nodeset.not_nil!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      if auto_generated
 | 
					      if auto_generated
 | 
				
			||||||
        videos = extract_videos(nodeset)
 | 
					        videos = extract_videos(nodeset)
 | 
				
			||||||
      else
 | 
					      else
 | 
				
			||||||
        videos = extract_videos(nodeset, ucid)
 | 
					        videos = extract_videos(nodeset, ucid, author)
 | 
				
			||||||
        videos.each { |video| video.ucid = ucid }
 | 
					 | 
				
			||||||
        videos.each { |video| video.author = author }
 | 
					 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      count = nodeset.size
 | 
					      count = nodeset.size
 | 
				
			||||||
      videos = videos.map { |video| ChannelVideo.new(
 | 
					      videos = videos.map { |video| ChannelVideo.new(
 | 
				
			||||||
        video.id,
 | 
					        id: video.id,
 | 
				
			||||||
        video.title,
 | 
					        title: video.title,
 | 
				
			||||||
        video.published,
 | 
					        published: video.published,
 | 
				
			||||||
        Time.now,
 | 
					        updated: Time.now,
 | 
				
			||||||
        video.ucid,
 | 
					        ucid: video.ucid,
 | 
				
			||||||
        video.author,
 | 
					        author: video.author,
 | 
				
			||||||
        video.length_seconds,
 | 
					        length_seconds: video.length_seconds,
 | 
				
			||||||
        video.live_now,
 | 
					        live_now: video.live_now,
 | 
				
			||||||
        video.premiere_timestamp
 | 
					        premiere_timestamp: video.premiere_timestamp,
 | 
				
			||||||
 | 
					        views: video.views
 | 
				
			||||||
      ) }
 | 
					      ) }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      videos.each do |video|
 | 
					      videos.each do |video|
 | 
				
			||||||
        ids << video.id
 | 
					        ids << video.id
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # FIXME: Red videos don't provide published date, so the best we can do is ignore them
 | 
					        # We are notified of Red videos elsewhere (PubSub), which includes a correct published date,
 | 
				
			||||||
 | 
					        # so since they don't provide a published date here we can safely ignore them.
 | 
				
			||||||
        if Time.now - video.published > 1.minute
 | 
					        if Time.now - video.published > 1.minute
 | 
				
			||||||
          db.exec("UPDATE users SET notifications = notifications || $1 \
 | 
					          users = db.query_all("UPDATE users SET notifications = notifications || $1 \
 | 
				
			||||||
          WHERE updated < $2 AND $3 = ANY(subscriptions) AND $1 <> ALL(notifications)", video.id, video.published, video.ucid)
 | 
					            WHERE updated < $2 AND $3 = ANY(subscriptions) AND $1 <> ALL(notifications) RETURNING email",
 | 
				
			||||||
 | 
					            video.id, video.published, video.ucid, as: String)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          video_array = video.to_a
 | 
					          video_array = video.to_a
 | 
				
			||||||
          args = arg_array(video_array)
 | 
					          args = arg_array(video_array)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          # We don't include the 'premire_timestamp' here because channel pages don't include them,
 | 
					          # We don't update the 'premire_timestamp' here because channel pages don't include them
 | 
				
			||||||
          # meaning the above timestamp is always null
 | 
					 | 
				
			||||||
          db.exec("INSERT INTO channel_videos VALUES (#{args}) \
 | 
					          db.exec("INSERT INTO channel_videos VALUES (#{args}) \
 | 
				
			||||||
            ON CONFLICT (id) DO UPDATE SET title = $2, published = $3, \
 | 
					            ON CONFLICT (id) DO UPDATE SET title = $2, published = $3, \
 | 
				
			||||||
            updated = $4, ucid = $5, author = $6, length_seconds = $7, \
 | 
					            updated = $4, ucid = $5, author = $6, length_seconds = $7, \
 | 
				
			||||||
          live_now = $8", video_array)
 | 
					            live_now = $8, views = $10", video_array)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          # Update all users affected by insert
 | 
				
			||||||
 | 
					          users.each do |user|
 | 
				
			||||||
 | 
					            payload = {
 | 
				
			||||||
 | 
					              "email"  => user,
 | 
				
			||||||
 | 
					              "action" => "refresh",
 | 
				
			||||||
 | 
					            }.to_json
 | 
				
			||||||
 | 
					            PG_DB.exec("NOTIFY feeds, E'#{payload}'")
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
        end
 | 
					        end
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      if count < 30
 | 
					      if count < 25
 | 
				
			||||||
        break
 | 
					        break
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -56,15 +56,14 @@ class RedditListing
 | 
				
			|||||||
  })
 | 
					  })
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def fetch_youtube_comments(id, continuation, proxies, format, locale, thin_mode, region)
 | 
					def fetch_youtube_comments(id, continuation, proxies, format, locale, thin_mode, region, sort_by = "top")
 | 
				
			||||||
  video = fetch_video(id, proxies, region: region)
 | 
					  video = fetch_video(id, proxies, region: region)
 | 
				
			||||||
 | 
					 | 
				
			||||||
  session_token = video.info["session_token"]?
 | 
					  session_token = video.info["session_token"]?
 | 
				
			||||||
  itct = video.info["itct"]?
 | 
					
 | 
				
			||||||
  ctoken = video.info["ctoken"]?
 | 
					  ctoken = produce_comment_continuation(id, cursor: "", sort_by: sort_by)
 | 
				
			||||||
  continuation ||= ctoken
 | 
					  continuation ||= ctoken
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if !continuation || !itct || !session_token
 | 
					  if !continuation || !session_token
 | 
				
			||||||
    if format == "json"
 | 
					    if format == "json"
 | 
				
			||||||
      return {"comments" => [] of String}.to_json
 | 
					      return {"comments" => [] of String}.to_json
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
@ -73,7 +72,7 @@ def fetch_youtube_comments(id, continuation, proxies, format, locale, thin_mode,
 | 
				
			|||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  post_req = {
 | 
					  post_req = {
 | 
				
			||||||
    "session_token" => session_token.not_nil!,
 | 
					    "session_token" => session_token,
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  post_req = HTTP::Params.encode(post_req)
 | 
					  post_req = HTTP::Params.encode(post_req)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -90,7 +89,7 @@ def fetch_youtube_comments(id, continuation, proxies, format, locale, thin_mode,
 | 
				
			|||||||
  headers["x-youtube-client-name"] = "1"
 | 
					  headers["x-youtube-client-name"] = "1"
 | 
				
			||||||
  headers["x-youtube-client-version"] = "2.20180719"
 | 
					  headers["x-youtube-client-version"] = "2.20180719"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  response = client.post("/comment_service_ajax?action_get_comments=1&pbj=1&ctoken=#{continuation}&continuation=#{continuation}&itct=#{itct}&hl=en&gl=US", headers, post_req)
 | 
					  response = client.post("/comment_service_ajax?action_get_comments=1&ctoken=#{continuation}&continuation=#{continuation}&hl=en&gl=US", headers, post_req)
 | 
				
			||||||
  response = JSON.parse(response.body)
 | 
					  response = JSON.parse(response.body)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if !response["response"]["continuationContents"]?
 | 
					  if !response["response"]["continuationContents"]?
 | 
				
			||||||
@ -250,7 +249,7 @@ def fetch_youtube_comments(id, continuation, proxies, format, locale, thin_mode,
 | 
				
			|||||||
  return comments
 | 
					  return comments
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def fetch_reddit_comments(id)
 | 
					def fetch_reddit_comments(id, sort_by = "confidence")
 | 
				
			||||||
  client = make_client(REDDIT_URL)
 | 
					  client = make_client(REDDIT_URL)
 | 
				
			||||||
  headers = HTTP::Headers{"User-Agent" => "web:invidious:v#{CURRENT_VERSION} (by /u/omarroth)"}
 | 
					  headers = HTTP::Headers{"User-Agent" => "web:invidious:v#{CURRENT_VERSION} (by /u/omarroth)"}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -260,12 +259,16 @@ def fetch_reddit_comments(id)
 | 
				
			|||||||
  if search_results.status_code == 200
 | 
					  if search_results.status_code == 200
 | 
				
			||||||
    search_results = RedditThing.from_json(search_results.body)
 | 
					    search_results = RedditThing.from_json(search_results.body)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # For videos that have more than one thread, choose the one with the highest score
 | 
				
			||||||
    thread = search_results.data.as(RedditListing).children.sort_by { |child| child.data.as(RedditLink).score }[-1]
 | 
					    thread = search_results.data.as(RedditListing).children.sort_by { |child| child.data.as(RedditLink).score }[-1]
 | 
				
			||||||
    thread = thread.data.as(RedditLink)
 | 
					    thread = thread.data.as(RedditLink)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    result = client.get("/r/#{thread.subreddit}/comments/#{thread.id}.json?limit=100&sort=top", headers).body
 | 
					    result = client.get("/r/#{thread.subreddit}/comments/#{thread.id}.json?limit=100&sort=#{sort_by}", headers).body
 | 
				
			||||||
    result = Array(RedditThing).from_json(result)
 | 
					    result = Array(RedditThing).from_json(result)
 | 
				
			||||||
  elsif search_results.status_code == 302
 | 
					  elsif search_results.status_code == 302
 | 
				
			||||||
 | 
					    # Previously, if there was only one result then the API would redirect to that result.
 | 
				
			||||||
 | 
					    # Now, it appears it will still return a listing so this section is likely unnecessary.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    result = client.get(search_results.headers["Location"], headers).body
 | 
					    result = client.get(search_results.headers["Location"], headers).body
 | 
				
			||||||
    result = Array(RedditThing).from_json(result)
 | 
					    result = Array(RedditThing).from_json(result)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -306,7 +309,7 @@ def template_youtube_comments(comments, locale, thin_mode)
 | 
				
			|||||||
    html += <<-END_HTML
 | 
					    html += <<-END_HTML
 | 
				
			||||||
    <div class="pure-g">
 | 
					    <div class="pure-g">
 | 
				
			||||||
      <div class="pure-u-4-24 pure-u-md-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}">
 | 
					        <img style="width:90%;padding-right:1em;padding-top:1em" src="#{author_thumbnail}">
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
      <div class="pure-u-20-24 pure-u-md-22-24">
 | 
					      <div class="pure-u-20-24 pure-u-md-22-24">
 | 
				
			||||||
        <p>
 | 
					        <p>
 | 
				
			||||||
@ -316,7 +319,7 @@ def template_youtube_comments(comments, locale, thin_mode)
 | 
				
			|||||||
          <p style="white-space:pre-wrap">#{child["contentHtml"]}</p>
 | 
					          <p style="white-space:pre-wrap">#{child["contentHtml"]}</p>
 | 
				
			||||||
          <span title="#{Time.unix(child["published"].as_i64).to_s(translate(locale, "%A %B %-d, %Y"))}">#{translate(locale, "`x` ago", recode_date(Time.unix(child["published"].as_i64), locale))} #{child["isEdited"] == true ? translate(locale, "(edited)") : ""}</span>
 | 
					          <span title="#{Time.unix(child["published"].as_i64).to_s(translate(locale, "%A %B %-d, %Y"))}">#{translate(locale, "`x` ago", recode_date(Time.unix(child["published"].as_i64), locale))} #{child["isEdited"] == true ? translate(locale, "(edited)") : ""}</span>
 | 
				
			||||||
          |
 | 
					          |
 | 
				
			||||||
          <a href="https://www.youtube.com/watch?v=#{comments["videoId"]}&lc=#{child["commentId"]}" title="#{translate(locale, "Youtube permalink of the comment")}">[YT]</a>
 | 
					          <a href="https://www.youtube.com/watch?v=#{comments["videoId"]}&lc=#{child["commentId"]}" title="#{translate(locale, "YouTube comment permalink")}">[YT]</a>
 | 
				
			||||||
          |
 | 
					          |
 | 
				
			||||||
          <i class="icon ion-ios-thumbs-up"></i> #{number_with_separator(child["likeCount"])}
 | 
					          <i class="icon ion-ios-thumbs-up"></i> #{number_with_separator(child["likeCount"])}
 | 
				
			||||||
    END_HTML
 | 
					    END_HTML
 | 
				
			||||||
@ -442,8 +445,12 @@ def replace_links(html)
 | 
				
			|||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  html = html.to_xml(options: XML::SaveOptions::NO_DECL)
 | 
					  html = html.xpath_node(%q(//body)).not_nil!
 | 
				
			||||||
  return html
 | 
					  if node = html.xpath_node(%q(./p))
 | 
				
			||||||
 | 
					    html = node
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  return html.to_xml(options: XML::SaveOptions::NO_DECL)
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def fill_links(html, scheme, host)
 | 
					def fill_links(html, scheme, host)
 | 
				
			||||||
@ -460,12 +467,10 @@ def fill_links(html, scheme, host)
 | 
				
			|||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if host == "www.youtube.com"
 | 
					  if host == "www.youtube.com"
 | 
				
			||||||
    html = html.xpath_node(%q(//body)).not_nil!.to_xml
 | 
					    html = html.xpath_node(%q(//body/p)).not_nil!
 | 
				
			||||||
  else
 | 
					 | 
				
			||||||
    html = html.to_xml(options: XML::SaveOptions::NO_DECL)
 | 
					 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return html
 | 
					  return html.to_xml(options: XML::SaveOptions::NO_DECL)
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def content_to_comment_html(content)
 | 
					def content_to_comment_html(content)
 | 
				
			||||||
@ -516,3 +521,111 @@ def content_to_comment_html(content)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  return comment_html
 | 
					  return comment_html
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def produce_comment_continuation(video_id, cursor = "", sort_by = "top")
 | 
				
			||||||
 | 
					  continuation = IO::Memory.new
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  continuation.write(Bytes[0x12, 0x26])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  continuation.write(Bytes[0x12, video_id.size])
 | 
				
			||||||
 | 
					  continuation.print(video_id)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  continuation.write(Bytes[0xc0, 0x01, 0x01])
 | 
				
			||||||
 | 
					  continuation.write(Bytes[0xc8, 0x01, 0x01])
 | 
				
			||||||
 | 
					  continuation.write(Bytes[0xe0, 0x01, 0x01])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  continuation.write(Bytes[0xa2, 0x02, 0x0d])
 | 
				
			||||||
 | 
					  continuation.write(Bytes[0x28, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  continuation.write(Bytes[0x40, 0x00])
 | 
				
			||||||
 | 
					  continuation.write(Bytes[0x18, 0x06])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if cursor.empty?
 | 
				
			||||||
 | 
					    continuation.write(Bytes[0x32])
 | 
				
			||||||
 | 
					    continuation.write(write_var_int(video_id.size + 8))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    continuation.write(Bytes[0x22, video_id.size + 4])
 | 
				
			||||||
 | 
					    continuation.write(Bytes[0x22, video_id.size])
 | 
				
			||||||
 | 
					    continuation.print(video_id)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    case sort_by
 | 
				
			||||||
 | 
					    when "top"
 | 
				
			||||||
 | 
					      continuation.write(Bytes[0x30, 0x00])
 | 
				
			||||||
 | 
					    when "new", "newest"
 | 
				
			||||||
 | 
					      continuation.write(Bytes[0x30, 0x01])
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    continuation.write(Bytes[0x78, 0x02])
 | 
				
			||||||
 | 
					  else
 | 
				
			||||||
 | 
					    continuation.write(Bytes[0x32])
 | 
				
			||||||
 | 
					    continuation.write(write_var_int(cursor.size + video_id.size + 11))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    continuation.write(Bytes[0x0a])
 | 
				
			||||||
 | 
					    continuation.write(write_var_int(cursor.size))
 | 
				
			||||||
 | 
					    continuation.print(cursor)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    continuation.write(Bytes[0x22, video_id.size + 4])
 | 
				
			||||||
 | 
					    continuation.write(Bytes[0x22, video_id.size])
 | 
				
			||||||
 | 
					    continuation.print(video_id)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    case sort_by
 | 
				
			||||||
 | 
					    when "top"
 | 
				
			||||||
 | 
					      continuation.write(Bytes[0x30, 0x00])
 | 
				
			||||||
 | 
					    when "new", "newest"
 | 
				
			||||||
 | 
					      continuation.write(Bytes[0x30, 0x01])
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    continuation.write(Bytes[0x28, 0x14])
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  continuation.rewind
 | 
				
			||||||
 | 
					  continuation = continuation.gets_to_end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  continuation = Base64.urlsafe_encode(continuation.to_slice)
 | 
				
			||||||
 | 
					  continuation = URI.escape(continuation)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  return continuation
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def produce_comment_reply_continuation(video_id, ucid, comment_id)
 | 
				
			||||||
 | 
					  continuation = IO::Memory.new
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  continuation.write(Bytes[0x12, 0x26])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  continuation.write(Bytes[0x12, video_id.size])
 | 
				
			||||||
 | 
					  continuation.print(video_id)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  continuation.write(Bytes[0xc0, 0x01, 0x01])
 | 
				
			||||||
 | 
					  continuation.write(Bytes[0xc8, 0x01, 0x01])
 | 
				
			||||||
 | 
					  continuation.write(Bytes[0xe0, 0x01, 0x01])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  continuation.write(Bytes[0xa2, 0x02, 0x0d])
 | 
				
			||||||
 | 
					  continuation.write(Bytes[0x28, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  continuation.write(Bytes[0x40, 0x00])
 | 
				
			||||||
 | 
					  continuation.write(Bytes[0x18, 0x06])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  continuation.write(Bytes[0x32, ucid.size + video_id.size + comment_id.size + 16])
 | 
				
			||||||
 | 
					  continuation.write(Bytes[0x1a, ucid.size + video_id.size + comment_id.size + 14])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  continuation.write(Bytes[0x12, comment_id.size])
 | 
				
			||||||
 | 
					  continuation.print(comment_id)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  continuation.write(Bytes[0x22, 0x02, 0x08, 0x00]) # ??
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  continuation.write(Bytes[ucid.size + video_id.size + 7])
 | 
				
			||||||
 | 
					  continuation.write(Bytes[ucid.size])
 | 
				
			||||||
 | 
					  continuation.print(ucid)
 | 
				
			||||||
 | 
					  continuation.write(Bytes[0x32, video_id.size])
 | 
				
			||||||
 | 
					  continuation.print(video_id)
 | 
				
			||||||
 | 
					  continuation.write(Bytes[0x40, 0x01])
 | 
				
			||||||
 | 
					  continuation.write(Bytes[0x48, 0x0a])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  continuation.rewind
 | 
				
			||||||
 | 
					  continuation = continuation.gets_to_end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  continuation = Base64.urlsafe_encode(continuation.to_slice)
 | 
				
			||||||
 | 
					  continuation = URI.escape(continuation)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  return continuation
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
				
			|||||||
@ -20,7 +20,9 @@ module HTTP::Handler
 | 
				
			|||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class Kemal::RouteHandler
 | 
					class Kemal::RouteHandler
 | 
				
			||||||
  exclude ["/api/v1/*"]
 | 
					  {% for method in %w(GET POST PUT HEAD DELETE PATCH OPTIONS) %}
 | 
				
			||||||
 | 
					  exclude ["/api/v1/*"], {{method}}
 | 
				
			||||||
 | 
					  {% end %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Processes the route if it's a match. Otherwise renders 404.
 | 
					  # Processes the route if it's a match. Otherwise renders 404.
 | 
				
			||||||
  private def process_request(context)
 | 
					  private def process_request(context)
 | 
				
			||||||
@ -31,13 +33,20 @@ class Kemal::RouteHandler
 | 
				
			|||||||
      raise Kemal::Exceptions::CustomException.new(context)
 | 
					      raise Kemal::Exceptions::CustomException.new(context)
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if context.request.method == "HEAD" &&
 | 
				
			||||||
 | 
					       context.request.path.ends_with? ".jpg"
 | 
				
			||||||
 | 
					      context.response.headers["Content-Type"] = "image/jpeg"
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    context.response.print(content)
 | 
					    context.response.print(content)
 | 
				
			||||||
    context
 | 
					    context
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class Kemal::ExceptionHandler
 | 
					class Kemal::ExceptionHandler
 | 
				
			||||||
  exclude ["/api/v1/*"]
 | 
					  {% for method in %w(GET POST PUT HEAD DELETE PATCH OPTIONS) %}
 | 
				
			||||||
 | 
					  exclude ["/api/v1/*"], {{method}}
 | 
				
			||||||
 | 
					  {% end %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  private def call_exception_with_status_code(context : HTTP::Server::Context, exception : Exception, status_code : Int32)
 | 
					  private def call_exception_with_status_code(context : HTTP::Server::Context, exception : Exception, status_code : Int32)
 | 
				
			||||||
    return if context.response.closed?
 | 
					    return if context.response.closed?
 | 
				
			||||||
@ -53,7 +62,8 @@ class Kemal::ExceptionHandler
 | 
				
			|||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class FilteredCompressHandler < Kemal::Handler
 | 
					class FilteredCompressHandler < Kemal::Handler
 | 
				
			||||||
  exclude ["/videoplayback", "/videoplayback/*", "/vi/*", "/ggpht/*"]
 | 
					  exclude ["/videoplayback", "/videoplayback/*", "/vi/*", "/ggpht/*", "/api/v1/auth/notifications"]
 | 
				
			||||||
 | 
					  exclude ["/api/v1/auth/notifications", "/data_control"], "POST"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def call(env)
 | 
					  def call(env)
 | 
				
			||||||
    return call_next env if exclude_match? env
 | 
					    return call_next env if exclude_match? env
 | 
				
			||||||
@ -77,13 +87,21 @@ class FilteredCompressHandler < Kemal::Handler
 | 
				
			|||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class APIHandler < Kemal::Handler
 | 
					class APIHandler < Kemal::Handler
 | 
				
			||||||
  only ["/api/v1/*"]
 | 
					  {% for method in %w(GET POST PUT HEAD DELETE PATCH OPTIONS) %}
 | 
				
			||||||
 | 
					  only ["/api/v1/*"], {{method}}
 | 
				
			||||||
 | 
					  {% end %}
 | 
				
			||||||
 | 
					  exclude ["/api/v1/auth/notifications"], "GET"
 | 
				
			||||||
 | 
					  exclude ["/api/v1/auth/notifications"], "POST"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def call(env)
 | 
					  def call(env)
 | 
				
			||||||
    return call_next env unless only_match? env
 | 
					    return call_next env unless only_match? env
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    env.response.headers["Access-Control-Allow-Origin"] = "*"
 | 
					    env.response.headers["Access-Control-Allow-Origin"] = "*"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # Since /api/v1/notifications is an event-stream, we don't want
 | 
				
			||||||
 | 
					    # to wrap the response
 | 
				
			||||||
 | 
					    return call_next env if exclude_match? env
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Here we swap out the socket IO so we can modify the response as needed
 | 
					    # Here we swap out the socket IO so we can modify the response as needed
 | 
				
			||||||
    output = env.response.output
 | 
					    output = env.response.output
 | 
				
			||||||
    env.response.output = IO::Memory.new
 | 
					    env.response.output = IO::Memory.new
 | 
				
			||||||
@ -97,13 +115,22 @@ class APIHandler < Kemal::Handler
 | 
				
			|||||||
      if env.response.headers["Content-Type"]?.try &.== "application/json"
 | 
					      if env.response.headers["Content-Type"]?.try &.== "application/json"
 | 
				
			||||||
        response = JSON.parse(response)
 | 
					        response = JSON.parse(response)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if fields_text = env.params.query["fields"]?
 | 
				
			||||||
 | 
					          begin
 | 
				
			||||||
 | 
					            JSONFilter.filter(response, fields_text)
 | 
				
			||||||
 | 
					          rescue ex
 | 
				
			||||||
 | 
					            env.response.status_code = 400
 | 
				
			||||||
 | 
					            response = {"error" => ex.message}
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if env.params.query["pretty"]? && env.params.query["pretty"] == "1"
 | 
					        if env.params.query["pretty"]? && env.params.query["pretty"] == "1"
 | 
				
			||||||
          response = response.to_pretty_json
 | 
					          response = response.to_pretty_json
 | 
				
			||||||
        else
 | 
					        else
 | 
				
			||||||
          response = response.to_json
 | 
					          response = response.to_json
 | 
				
			||||||
        end
 | 
					        end
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
    rescue
 | 
					    rescue ex
 | 
				
			||||||
    ensure
 | 
					    ensure
 | 
				
			||||||
      env.response.output = output
 | 
					      env.response.output = output
 | 
				
			||||||
      env.response.puts response
 | 
					      env.response.puts response
 | 
				
			||||||
@ -124,10 +151,28 @@ class DenyFrame < Kemal::Handler
 | 
				
			|||||||
  end
 | 
					  end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Temp fix for https://github.com/crystal-lang/crystal/issues/7383
 | 
					# Temp fixes for https://github.com/crystal-lang/crystal/issues/7383
 | 
				
			||||||
 | 
					class HTTP::UnknownLengthContent
 | 
				
			||||||
 | 
					  def read_byte
 | 
				
			||||||
 | 
					    ensure_send_continue
 | 
				
			||||||
 | 
					    if @io.is_a?(OpenSSL::SSL::Socket::Client)
 | 
				
			||||||
 | 
					      return if @io.as(OpenSSL::SSL::Socket::Client).@in_buffer_rem.empty?
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					    @io.read_byte
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class HTTP::Client
 | 
					class HTTP::Client
 | 
				
			||||||
  private def handle_response(response)
 | 
					  private def handle_response(response)
 | 
				
			||||||
    # close unless response.keep_alive?
 | 
					    if @socket.is_a?(OpenSSL::SSL::Socket::Client)
 | 
				
			||||||
 | 
					      close unless response.keep_alive? || @socket.as(OpenSSL::SSL::Socket::Client).@in_buffer_rem.empty?
 | 
				
			||||||
 | 
					      if @socket.as(OpenSSL::SSL::Socket::Client).@in_buffer_rem.empty?
 | 
				
			||||||
 | 
					        @socket = nil
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					      close unless response.keep_alive?
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    response
 | 
					    response
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
				
			|||||||
@ -1,19 +1,111 @@
 | 
				
			|||||||
 | 
					require "./macros"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct Nonce
 | 
				
			||||||
 | 
					  db_mapping({
 | 
				
			||||||
 | 
					    nonce:  String,
 | 
				
			||||||
 | 
					    expire: Time,
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct SessionId
 | 
				
			||||||
 | 
					  db_mapping({
 | 
				
			||||||
 | 
					    id:     String,
 | 
				
			||||||
 | 
					    email:  String,
 | 
				
			||||||
 | 
					    issued: String,
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct Annotation
 | 
				
			||||||
 | 
					  db_mapping({
 | 
				
			||||||
 | 
					    id:          String,
 | 
				
			||||||
 | 
					    annotations: String,
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct ConfigPreferences
 | 
				
			||||||
 | 
					  module StringToArray
 | 
				
			||||||
 | 
					    def self.to_yaml(value : Array(String), yaml : YAML::Nodes::Builder)
 | 
				
			||||||
 | 
					      yaml.sequence do
 | 
				
			||||||
 | 
					        value.each do |element|
 | 
				
			||||||
 | 
					          yaml.scalar element
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def self.from_yaml(ctx : YAML::ParseContext, node : YAML::Nodes::Node) : Array(String)
 | 
				
			||||||
 | 
					      begin
 | 
				
			||||||
 | 
					        unless node.is_a?(YAML::Nodes::Sequence)
 | 
				
			||||||
 | 
					          node.raise "Expected sequence, not #{node.class}"
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        result = [] of String
 | 
				
			||||||
 | 
					        node.nodes.each do |item|
 | 
				
			||||||
 | 
					          unless item.is_a?(YAML::Nodes::Scalar)
 | 
				
			||||||
 | 
					            node.raise "Expected scalar, not #{item.class}"
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          result << item.value
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					      rescue ex
 | 
				
			||||||
 | 
					        if node.is_a?(YAML::Nodes::Scalar)
 | 
				
			||||||
 | 
					          result = [node.value, ""]
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					          result = ["", ""]
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      result
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  yaml_mapping({
 | 
				
			||||||
 | 
					    annotations:            {type: Bool, default: false},
 | 
				
			||||||
 | 
					    annotations_subscribed: {type: Bool, default: false},
 | 
				
			||||||
 | 
					    autoplay:               {type: Bool, default: false},
 | 
				
			||||||
 | 
					    captions:               {type: Array(String), default: ["", "", ""], converter: StringToArray},
 | 
				
			||||||
 | 
					    comments:               {type: Array(String), default: ["youtube", ""], converter: StringToArray},
 | 
				
			||||||
 | 
					    continue:               {type: Bool, default: false},
 | 
				
			||||||
 | 
					    continue_autoplay:      {type: Bool, default: true},
 | 
				
			||||||
 | 
					    dark_mode:              {type: Bool, default: false},
 | 
				
			||||||
 | 
					    latest_only:            {type: Bool, default: false},
 | 
				
			||||||
 | 
					    listen:                 {type: Bool, default: false},
 | 
				
			||||||
 | 
					    local:                  {type: Bool, default: false},
 | 
				
			||||||
 | 
					    locale:                 {type: String, default: "en-US"},
 | 
				
			||||||
 | 
					    max_results:            {type: Int32, default: 40},
 | 
				
			||||||
 | 
					    notifications_only:     {type: Bool, default: false},
 | 
				
			||||||
 | 
					    quality:                {type: String, default: "hd720"},
 | 
				
			||||||
 | 
					    redirect_feed:          {type: Bool, default: false},
 | 
				
			||||||
 | 
					    related_videos:         {type: Bool, default: true},
 | 
				
			||||||
 | 
					    sort:                   {type: String, default: "published"},
 | 
				
			||||||
 | 
					    speed:                  {type: Float32, default: 1.0_f32},
 | 
				
			||||||
 | 
					    thin_mode:              {type: Bool, default: false},
 | 
				
			||||||
 | 
					    unseen_only:            {type: Bool, default: false},
 | 
				
			||||||
 | 
					    video_loop:             {type: Bool, default: false},
 | 
				
			||||||
 | 
					    volume:                 {type: Int32, default: 100},
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct Config
 | 
					struct Config
 | 
				
			||||||
 | 
					  module ConfigPreferencesConverter
 | 
				
			||||||
 | 
					    def self.from_yaml(ctx : YAML::ParseContext, node : YAML::Nodes::Node) : Preferences
 | 
				
			||||||
 | 
					      Preferences.new(*ConfigPreferences.new(ctx, node).to_tuple)
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def self.to_yaml(value : Preferences, yaml : YAML::Nodes::Builder)
 | 
				
			||||||
 | 
					      value.to_yaml(yaml)
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  YAML.mapping({
 | 
					  YAML.mapping({
 | 
				
			||||||
    channel_threads:          Int32,                                # Number of threads to use for crawling videos from channels (for updating subscriptions)
 | 
					    channel_threads:          Int32,                                # Number of threads to use for crawling videos from channels (for updating subscriptions)
 | 
				
			||||||
    feed_threads:             Int32,                                # Number of threads to use for updating feeds
 | 
					    feed_threads:             Int32,                                # Number of threads to use for updating feeds
 | 
				
			||||||
    db:              NamedTuple( # Database configuration
 | 
					    db:                       DBConfig,                             # Database configuration
 | 
				
			||||||
user: String,
 | 
					 | 
				
			||||||
      password: String,
 | 
					 | 
				
			||||||
      host: String,
 | 
					 | 
				
			||||||
      port: Int32,
 | 
					 | 
				
			||||||
      dbname: String,
 | 
					 | 
				
			||||||
    ),
 | 
					 | 
				
			||||||
    full_refresh:             Bool,                                 # Used for crawling channels: threads should check all videos uploaded by a channel
 | 
					    full_refresh:             Bool,                                 # Used for crawling channels: threads should check all videos uploaded by a channel
 | 
				
			||||||
    https_only:               Bool?,                                # Used to tell Invidious it is behind a proxy, so links to resources should be https://
 | 
					    https_only:               Bool?,                                # Used to tell Invidious it is behind a proxy, so links to resources should be https://
 | 
				
			||||||
    hmac_key:                 String?,                              # HMAC signing key for CSRF tokens and verifying pubsub subscriptions
 | 
					    hmac_key:                 String?,                              # HMAC signing key for CSRF tokens and verifying pubsub subscriptions
 | 
				
			||||||
    domain:                   String?,                              # Domain to be used for links to resources on the site where an absolute URL is required
 | 
					    domain:                   String?,                              # Domain to be used for links to resources on the site where an absolute URL is required
 | 
				
			||||||
    use_pubsub_feeds:     {type: Bool, default: false}, # Subscribe to channels using PubSubHubbub (requires domain, hmac_key)
 | 
					    use_pubsub_feeds:         {type: Bool | Int32, default: false}, # Subscribe to channels using PubSubHubbub (requires domain, hmac_key)
 | 
				
			||||||
 | 
					    use_feed_events:          {type: Bool | Int32, default: false}, # Update feeds on receiving notifications
 | 
				
			||||||
    default_home:             {type: String, default: "Top"},
 | 
					    default_home:             {type: String, default: "Top"},
 | 
				
			||||||
    feed_menu:                {type: Array(String), default: ["Popular", "Top", "Trending", "Subscriptions"]},
 | 
					    feed_menu:                {type: Array(String), default: ["Popular", "Top", "Trending", "Subscriptions"]},
 | 
				
			||||||
    top_enabled:              {type: Bool, default: true},
 | 
					    top_enabled:              {type: Bool, default: true},
 | 
				
			||||||
@ -22,7 +114,26 @@ user: String,
 | 
				
			|||||||
    registration_enabled:     {type: Bool, default: true},
 | 
					    registration_enabled:     {type: Bool, default: true},
 | 
				
			||||||
    statistics_enabled:       {type: Bool, default: false},
 | 
					    statistics_enabled:       {type: Bool, default: false},
 | 
				
			||||||
    admins:                   {type: Array(String), default: [] of String},
 | 
					    admins:                   {type: Array(String), default: [] of String},
 | 
				
			||||||
    external_port:        {type: Int32 | Nil, default: nil},
 | 
					    external_port:            {type: Int32?, default: nil},
 | 
				
			||||||
 | 
					    default_user_preferences: {type: Preferences,
 | 
				
			||||||
 | 
					                               default: Preferences.new(*ConfigPreferences.from_yaml("").to_tuple),
 | 
				
			||||||
 | 
					                               converter: ConfigPreferencesConverter,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    dmca_content:      {type: Array(String), default: [] of String}, # For compliance with DMCA, disables download widget using list of video IDs
 | 
				
			||||||
 | 
					    check_tables:      {type: Bool, default: false},                 # Check table integrity, automatically try to add any missing columns, create tables, etc.
 | 
				
			||||||
 | 
					    cache_annotations: {type: Bool, default: false},                 # Cache annotations requested from IA, will not cache empty annotations or annotations that only contain cards
 | 
				
			||||||
 | 
					    banner:            {type: String?, default: nil},                # Optional banner to be displayed along top of page for announcements, etc.
 | 
				
			||||||
 | 
					    hsts:              {type: Bool?, default: true},                 # Enables 'Strict-Transport-Security'. Ensure that `domain` and all subdomains are served securely
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct DBConfig
 | 
				
			||||||
 | 
					  yaml_mapping({
 | 
				
			||||||
 | 
					    user:     String,
 | 
				
			||||||
 | 
					    password: String,
 | 
				
			||||||
 | 
					    host:     String,
 | 
				
			||||||
 | 
					    port:     Int32,
 | 
				
			||||||
 | 
					    dbname:   String,
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -86,8 +197,8 @@ def html_to_content(description_html)
 | 
				
			|||||||
  return description_html, description
 | 
					  return description_html, description
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def extract_videos(nodeset, ucid = nil)
 | 
					def extract_videos(nodeset, ucid = nil, author_name = nil)
 | 
				
			||||||
  videos = extract_items(nodeset, ucid)
 | 
					  videos = extract_items(nodeset, ucid, author_name)
 | 
				
			||||||
  videos.select! { |item| !item.is_a?(SearchChannel | SearchPlaylist) }
 | 
					  videos.select! { |item| !item.is_a?(SearchChannel | SearchPlaylist) }
 | 
				
			||||||
  videos.map { |video| video.as(SearchVideo) }
 | 
					  videos.map { |video| video.as(SearchVideo) }
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
@ -148,7 +259,7 @@ def extract_items(nodeset, ucid = nil, author_name = nil)
 | 
				
			|||||||
          video_count = video_count.rchop("+")
 | 
					          video_count = video_count.rchop("+")
 | 
				
			||||||
        end
 | 
					        end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        video_count = video_count.to_i?
 | 
					        video_count = video_count.gsub(/\D/, "").to_i?
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
      video_count ||= 0
 | 
					      video_count ||= 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -200,12 +311,18 @@ def extract_items(nodeset, ucid = nil, author_name = nil)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      author_thumbnail = node.xpath_node(%q(.//div/span/img)).try &.["data-thumb"]?
 | 
					      author_thumbnail = node.xpath_node(%q(.//div/span/img)).try &.["data-thumb"]?
 | 
				
			||||||
      author_thumbnail ||= node.xpath_node(%q(.//div/span/img)).try &.["src"]
 | 
					      author_thumbnail ||= node.xpath_node(%q(.//div/span/img)).try &.["src"]
 | 
				
			||||||
 | 
					      if author_thumbnail
 | 
				
			||||||
 | 
					        author_thumbnail = URI.parse(author_thumbnail)
 | 
				
			||||||
 | 
					        author_thumbnail.scheme = "https"
 | 
				
			||||||
 | 
					        author_thumbnail = author_thumbnail.to_s
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      author_thumbnail ||= ""
 | 
					      author_thumbnail ||= ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      subscriber_count = node.xpath_node(%q(.//span[contains(@class, "yt-subscriber-count")])).try &.["title"].delete(",").to_i?
 | 
					      subscriber_count = node.xpath_node(%q(.//span[contains(@class, "yt-subscriber-count")])).try &.["title"].gsub(/\D/, "").to_i?
 | 
				
			||||||
      subscriber_count ||= 0
 | 
					      subscriber_count ||= 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      video_count = node.xpath_node(%q(.//ul[@class="yt-lockup-meta-info"]/li)).try &.content.split(" ")[0].delete(",").to_i?
 | 
					      video_count = node.xpath_node(%q(.//ul[@class="yt-lockup-meta-info"]/li)).try &.content.split(" ")[0].gsub(/\D/, "").to_i?
 | 
				
			||||||
      video_count ||= 0
 | 
					      video_count ||= 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      items << SearchChannel.new(
 | 
					      items << SearchChannel.new(
 | 
				
			||||||
@ -367,7 +484,7 @@ def extract_shelf_items(nodeset, ucid = nil, author_name = nil)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        video_count_label = child_node.xpath_node(%q(.//span[@class="formatted-video-count-label"]))
 | 
					        video_count_label = child_node.xpath_node(%q(.//span[@class="formatted-video-count-label"]))
 | 
				
			||||||
        if video_count_label
 | 
					        if video_count_label
 | 
				
			||||||
          video_count = video_count_label.content.strip.match(/^\d+/).try &.[0].to_i?
 | 
					          video_count = video_count_label.content.gsub(/\D/, "").to_i?
 | 
				
			||||||
        end
 | 
					        end
 | 
				
			||||||
        video_count ||= 50
 | 
					        video_count ||= 50
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -400,3 +517,262 @@ def extract_shelf_items(nodeset, ucid = nil, author_name = nil)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  return items
 | 
					  return items
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def analyze_table(db, logger, table_name, struct_type = nil)
 | 
				
			||||||
 | 
					  # Create table if it doesn't exist
 | 
				
			||||||
 | 
					  begin
 | 
				
			||||||
 | 
					    db.exec("SELECT * FROM #{table_name} LIMIT 0")
 | 
				
			||||||
 | 
					  rescue ex
 | 
				
			||||||
 | 
					    logger.write("CREATE TABLE #{table_name}\n")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    db.using_connection do |conn|
 | 
				
			||||||
 | 
					      conn.as(PG::Connection).exec_all(File.read("config/sql/#{table_name}.sql"))
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if !struct_type
 | 
				
			||||||
 | 
					    return
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  struct_array = struct_type.to_type_tuple
 | 
				
			||||||
 | 
					  column_array = get_column_array(db, table_name)
 | 
				
			||||||
 | 
					  column_types = File.read("config/sql/#{table_name}.sql").match(/CREATE TABLE public\.#{table_name}\n\((?<types>[\d\D]*?)\);/)
 | 
				
			||||||
 | 
					    .try &.["types"].split(",").map { |line| line.strip }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if !column_types
 | 
				
			||||||
 | 
					    return
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  struct_array.each_with_index do |name, i|
 | 
				
			||||||
 | 
					    if name != column_array[i]?
 | 
				
			||||||
 | 
					      if !column_array[i]?
 | 
				
			||||||
 | 
					        new_column = column_types.select { |line| line.starts_with? name }[0]
 | 
				
			||||||
 | 
					        logger.write("ALTER TABLE #{table_name} ADD COLUMN #{new_column}\n")
 | 
				
			||||||
 | 
					        db.exec("ALTER TABLE #{table_name} ADD COLUMN #{new_column}")
 | 
				
			||||||
 | 
					        next
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      # Column doesn't exist
 | 
				
			||||||
 | 
					      if !column_array.includes? name
 | 
				
			||||||
 | 
					        new_column = column_types.select { |line| line.starts_with? name }[0]
 | 
				
			||||||
 | 
					        db.exec("ALTER TABLE #{table_name} ADD COLUMN #{new_column}")
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      # Column exists but in the wrong position, rotate
 | 
				
			||||||
 | 
					      if struct_array.includes? column_array[i]
 | 
				
			||||||
 | 
					        until name == column_array[i]
 | 
				
			||||||
 | 
					          new_column = column_types.select { |line| line.starts_with? column_array[i] }[0]?.try &.gsub("#{column_array[i]}", "#{column_array[i]}_new")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          # There's a column we didn't expect
 | 
				
			||||||
 | 
					          if !new_column
 | 
				
			||||||
 | 
					            logger.write("ALTER TABLE #{table_name} DROP COLUMN #{column_array[i]}\n")
 | 
				
			||||||
 | 
					            db.exec("ALTER TABLE #{table_name} DROP COLUMN #{column_array[i]} CASCADE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            column_array = get_column_array(db, table_name)
 | 
				
			||||||
 | 
					            next
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          logger.write("ALTER TABLE #{table_name} ADD COLUMN #{new_column}\n")
 | 
				
			||||||
 | 
					          db.exec("ALTER TABLE #{table_name} ADD COLUMN #{new_column}")
 | 
				
			||||||
 | 
					          logger.write("UPDATE #{table_name} SET #{column_array[i]}_new=#{column_array[i]}\n")
 | 
				
			||||||
 | 
					          db.exec("UPDATE #{table_name} SET #{column_array[i]}_new=#{column_array[i]}")
 | 
				
			||||||
 | 
					          logger.write("ALTER TABLE #{table_name} DROP COLUMN #{column_array[i]} CASCADE\n")
 | 
				
			||||||
 | 
					          db.exec("ALTER TABLE #{table_name} DROP COLUMN #{column_array[i]} CASCADE")
 | 
				
			||||||
 | 
					          logger.write("ALTER TABLE #{table_name} RENAME COLUMN #{column_array[i]}_new TO #{column_array[i]}\n")
 | 
				
			||||||
 | 
					          db.exec("ALTER TABLE #{table_name} RENAME COLUMN #{column_array[i]}_new TO #{column_array[i]}")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          column_array = get_column_array(db, table_name)
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					      else
 | 
				
			||||||
 | 
					        logger.write("ALTER TABLE #{table_name} DROP COLUMN #{column_array[i]} CASCADE\n")
 | 
				
			||||||
 | 
					        db.exec("ALTER TABLE #{table_name} DROP COLUMN #{column_array[i]} CASCADE")
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class PG::ResultSet
 | 
				
			||||||
 | 
					  def field(index = @column_index)
 | 
				
			||||||
 | 
					    @fields.not_nil![index]
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def get_column_array(db, table_name)
 | 
				
			||||||
 | 
					  column_array = [] of String
 | 
				
			||||||
 | 
					  db.query("SELECT * FROM #{table_name} LIMIT 0") do |rs|
 | 
				
			||||||
 | 
					    rs.column_count.times do |i|
 | 
				
			||||||
 | 
					      column = rs.as(PG::ResultSet).field(i)
 | 
				
			||||||
 | 
					      column_array << column.name
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  return column_array
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def cache_annotation(db, id, annotations)
 | 
				
			||||||
 | 
					  if !CONFIG.cache_annotations
 | 
				
			||||||
 | 
					    return
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  body = XML.parse(annotations)
 | 
				
			||||||
 | 
					  nodeset = body.xpath_nodes(%q(/document/annotations/annotation))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if nodeset == 0
 | 
				
			||||||
 | 
					    return
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  has_legacy_annotations = false
 | 
				
			||||||
 | 
					  nodeset.each do |node|
 | 
				
			||||||
 | 
					    if !{"branding", "card", "drawer"}.includes? node["type"]?
 | 
				
			||||||
 | 
					      has_legacy_annotations = true
 | 
				
			||||||
 | 
					      break
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if has_legacy_annotations
 | 
				
			||||||
 | 
					    # TODO: Update on conflict?
 | 
				
			||||||
 | 
					    db.exec("INSERT INTO annotations VALUES ($1, $2) ON CONFLICT DO NOTHING", id, annotations)
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def proxy_file(response, env)
 | 
				
			||||||
 | 
					  if !response.body_io?
 | 
				
			||||||
 | 
					    return
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if response.headers.includes_word?("Content-Encoding", "gzip")
 | 
				
			||||||
 | 
					    Gzip::Writer.open(env.response) do |deflate|
 | 
				
			||||||
 | 
					      copy_in_chunks(response.body_io, deflate)
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  elsif response.headers.includes_word?("Content-Encoding", "deflate")
 | 
				
			||||||
 | 
					    Flate::Writer.open(env.response) do |deflate|
 | 
				
			||||||
 | 
					      copy_in_chunks(response.body_io, deflate)
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  else
 | 
				
			||||||
 | 
					    copy_in_chunks(response.body_io, env.response)
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# https://stackoverflow.com/a/44802810 <3
 | 
				
			||||||
 | 
					def copy_in_chunks(input, output, chunk_size = 4096)
 | 
				
			||||||
 | 
					  size = 1
 | 
				
			||||||
 | 
					  while size > 0
 | 
				
			||||||
 | 
					    size = IO.copy(input, output, chunk_size)
 | 
				
			||||||
 | 
					    Fiber.yield
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def create_notification_stream(env, proxies, config, kemal_config, decrypt_function, topics)
 | 
				
			||||||
 | 
					  locale = LOCALES[env.get("preferences").as(Preferences).locale]?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  env.response.content_type = "text/event-stream"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  since = env.params.query["since"]?.try &.to_i?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  begin
 | 
				
			||||||
 | 
					    id = 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if topics.includes? "debug"
 | 
				
			||||||
 | 
					      spawn do
 | 
				
			||||||
 | 
					        loop do
 | 
				
			||||||
 | 
					          time_span = [0, 0, 0, 0]
 | 
				
			||||||
 | 
					          time_span[rand(4)] = rand(30) + 5
 | 
				
			||||||
 | 
					          published = Time.now - Time::Span.new(time_span[0], time_span[1], time_span[2], time_span[3])
 | 
				
			||||||
 | 
					          video_id = TEST_IDS[rand(TEST_IDS.size)]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          video = get_video(video_id, PG_DB, proxies)
 | 
				
			||||||
 | 
					          video.published = published
 | 
				
			||||||
 | 
					          response = JSON.parse(video.to_json(locale, config, kemal_config, decrypt_function))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          if fields_text = env.params.query["fields"]?
 | 
				
			||||||
 | 
					            begin
 | 
				
			||||||
 | 
					              JSONFilter.filter(response, fields_text)
 | 
				
			||||||
 | 
					            rescue ex
 | 
				
			||||||
 | 
					              env.response.status_code = 400
 | 
				
			||||||
 | 
					              response = {"error" => ex.message}
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          env.response.puts "id: #{id}"
 | 
				
			||||||
 | 
					          env.response.puts "data: #{response.to_json}"
 | 
				
			||||||
 | 
					          env.response.puts
 | 
				
			||||||
 | 
					          env.response.flush
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          id += 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          sleep 1.minute
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    spawn do
 | 
				
			||||||
 | 
					      if since
 | 
				
			||||||
 | 
					        topics.try &.each do |topic|
 | 
				
			||||||
 | 
					          case topic
 | 
				
			||||||
 | 
					          when .match(/UC[A-Za-z0-9_-]{22}/)
 | 
				
			||||||
 | 
					            PG_DB.query_all("SELECT * FROM channel_videos WHERE ucid = $1 AND published > $2 ORDER BY published DESC LIMIT 15",
 | 
				
			||||||
 | 
					              topic, Time.unix(since.not_nil!), as: ChannelVideo).each do |video|
 | 
				
			||||||
 | 
					              response = JSON.parse(video.to_json(locale, config, Kemal.config))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              if fields_text = env.params.query["fields"]?
 | 
				
			||||||
 | 
					                begin
 | 
				
			||||||
 | 
					                  JSONFilter.filter(response, fields_text)
 | 
				
			||||||
 | 
					                rescue ex
 | 
				
			||||||
 | 
					                  env.response.status_code = 400
 | 
				
			||||||
 | 
					                  response = {"error" => ex.message}
 | 
				
			||||||
 | 
					                end
 | 
				
			||||||
 | 
					              end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              env.response.puts "id: #{id}"
 | 
				
			||||||
 | 
					              env.response.puts "data: #{response.to_json}"
 | 
				
			||||||
 | 
					              env.response.puts
 | 
				
			||||||
 | 
					              env.response.flush
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              id += 1
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					          else
 | 
				
			||||||
 | 
					            # TODO
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      PG.connect_listen(PG_URL, "notifications") do |event|
 | 
				
			||||||
 | 
					        notification = JSON.parse(event.payload)
 | 
				
			||||||
 | 
					        topic = notification["topic"].as_s
 | 
				
			||||||
 | 
					        video_id = notification["videoId"].as_s
 | 
				
			||||||
 | 
					        published = notification["published"].as_i64
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        video = get_video(video_id, PG_DB, proxies)
 | 
				
			||||||
 | 
					        video.published = Time.unix(published)
 | 
				
			||||||
 | 
					        response = JSON.parse(video.to_json(locale, config, Kemal.config, decrypt_function))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if fields_text = env.params.query["fields"]?
 | 
				
			||||||
 | 
					          begin
 | 
				
			||||||
 | 
					            JSONFilter.filter(response, fields_text)
 | 
				
			||||||
 | 
					          rescue ex
 | 
				
			||||||
 | 
					            env.response.status_code = 400
 | 
				
			||||||
 | 
					            response = {"error" => ex.message}
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if topics.try &.includes? topic
 | 
				
			||||||
 | 
					          env.response.puts "id: #{id}"
 | 
				
			||||||
 | 
					          env.response.puts "data: #{response.to_json}"
 | 
				
			||||||
 | 
					          env.response.puts
 | 
				
			||||||
 | 
					          env.response.flush
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          id += 1
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # Send heartbeat
 | 
				
			||||||
 | 
					    loop do
 | 
				
			||||||
 | 
					      env.response.puts ":keepalive #{Time.now.to_unix}"
 | 
				
			||||||
 | 
					      env.response.puts
 | 
				
			||||||
 | 
					      env.response.flush
 | 
				
			||||||
 | 
					      sleep (20 + rand(11)).seconds
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  rescue
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
				
			|||||||
@ -7,9 +7,25 @@ def translate(locale : Hash(String, JSON::Any) | Nil, translation : String, text
 | 
				
			|||||||
  #   puts "Could not find translation for #{translation.dump}"
 | 
					  #   puts "Could not find translation for #{translation.dump}"
 | 
				
			||||||
  # end
 | 
					  # end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if locale && locale[translation]? && !locale[translation].as_s.empty?
 | 
					  if locale && locale[translation]?
 | 
				
			||||||
 | 
					    case locale[translation]
 | 
				
			||||||
 | 
					    when .as_h?
 | 
				
			||||||
 | 
					      match_length = 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      locale[translation].as_h.each do |key, value|
 | 
				
			||||||
 | 
					        if md = text.try &.match(/#{key}/)
 | 
				
			||||||
 | 
					          if md[0].size >= match_length
 | 
				
			||||||
 | 
					            translation = value.as_s
 | 
				
			||||||
 | 
					            match_length = md[0].size
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					    when .as_s?
 | 
				
			||||||
 | 
					      if !locale[translation].as_s.empty?
 | 
				
			||||||
        translation = locale[translation].as_s
 | 
					        translation = locale[translation].as_s
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if text
 | 
					  if text
 | 
				
			||||||
    translation = translation.gsub("`x`", text)
 | 
					    translation = translation.gsub("`x`", text)
 | 
				
			||||||
@ -17,3 +33,12 @@ def translate(locale : Hash(String, JSON::Any) | Nil, translation : String, text
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  return translation
 | 
					  return translation
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def translate_bool(locale : Hash(String, JSON::Any) | Nil, translation : Bool)
 | 
				
			||||||
 | 
					  case translation
 | 
				
			||||||
 | 
					  when true
 | 
				
			||||||
 | 
					    return translate(locale, "Yes")
 | 
				
			||||||
 | 
					  when false
 | 
				
			||||||
 | 
					    return translate(locale, "No")
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										294
									
								
								src/invidious/helpers/jobs.cr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										294
									
								
								src/invidious/helpers/jobs.cr
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,294 @@
 | 
				
			|||||||
 | 
					def refresh_channels(db, logger, config)
 | 
				
			||||||
 | 
					  max_channel = Channel(Int32).new
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  spawn do
 | 
				
			||||||
 | 
					    max_threads = max_channel.receive
 | 
				
			||||||
 | 
					    active_threads = 0
 | 
				
			||||||
 | 
					    active_channel = Channel(Bool).new
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    loop do
 | 
				
			||||||
 | 
					      db.query("SELECT id FROM channels ORDER BY updated") do |rs|
 | 
				
			||||||
 | 
					        rs.each do
 | 
				
			||||||
 | 
					          id = rs.read(String)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          if active_threads >= max_threads
 | 
				
			||||||
 | 
					            if active_channel.receive
 | 
				
			||||||
 | 
					              active_threads -= 1
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          active_threads += 1
 | 
				
			||||||
 | 
					          spawn do
 | 
				
			||||||
 | 
					            begin
 | 
				
			||||||
 | 
					              channel = fetch_channel(id, db, config.full_refresh)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              db.exec("UPDATE channels SET updated = $1, author = $2, deleted = false WHERE id = $3", Time.now, channel.author, id)
 | 
				
			||||||
 | 
					            rescue ex
 | 
				
			||||||
 | 
					              if ex.message == "Deleted or invalid channel"
 | 
				
			||||||
 | 
					                db.exec("UPDATE channels SET updated = $1, deleted = true WHERE id = $2", Time.now, id)
 | 
				
			||||||
 | 
					              end
 | 
				
			||||||
 | 
					              logger.write("#{id} : #{ex.message}\n")
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            active_channel.send(true)
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      sleep 1.minute
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  max_channel.send(config.channel_threads)
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def refresh_feeds(db, logger, config)
 | 
				
			||||||
 | 
					  # Spawn thread to handle feed events
 | 
				
			||||||
 | 
					  if config.use_feed_events
 | 
				
			||||||
 | 
					    case config.use_feed_events
 | 
				
			||||||
 | 
					    when Bool
 | 
				
			||||||
 | 
					      max_feed_event_threads = config.use_feed_events.as(Bool).to_unsafe
 | 
				
			||||||
 | 
					    when Int32
 | 
				
			||||||
 | 
					      max_feed_event_threads = config.use_feed_events.as(Int32)
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					    max_feed_event_channel = Channel(Int32).new
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    spawn do
 | 
				
			||||||
 | 
					      queue = Deque(String).new(30)
 | 
				
			||||||
 | 
					      PG.connect_listen(PG_URL, "feeds") do |event|
 | 
				
			||||||
 | 
					        if !queue.includes? event.payload
 | 
				
			||||||
 | 
					          queue << event.payload
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      max_threads = max_feed_event_channel.receive
 | 
				
			||||||
 | 
					      active_threads = 0
 | 
				
			||||||
 | 
					      active_channel = Channel(Bool).new
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      loop do
 | 
				
			||||||
 | 
					        until queue.empty?
 | 
				
			||||||
 | 
					          event = queue.shift
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          if active_threads >= max_threads
 | 
				
			||||||
 | 
					            if active_channel.receive
 | 
				
			||||||
 | 
					              active_threads -= 1
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          active_threads += 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          spawn do
 | 
				
			||||||
 | 
					            begin
 | 
				
			||||||
 | 
					              feed = JSON.parse(event)
 | 
				
			||||||
 | 
					              email = feed["email"].as_s
 | 
				
			||||||
 | 
					              action = feed["action"].as_s
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              view_name = "subscriptions_#{sha256(email)}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              case action
 | 
				
			||||||
 | 
					              when "refresh"
 | 
				
			||||||
 | 
					                db.exec("REFRESH MATERIALIZED VIEW #{view_name}")
 | 
				
			||||||
 | 
					              end
 | 
				
			||||||
 | 
					            rescue ex
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            active_channel.send(true)
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        sleep 5.seconds
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    max_feed_event_channel.send(max_feed_event_threads.as(Int32))
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  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)}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          if active_threads >= max_threads
 | 
				
			||||||
 | 
					            if active_channel.receive
 | 
				
			||||||
 | 
					              active_threads -= 1
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          active_threads += 1
 | 
				
			||||||
 | 
					          spawn do
 | 
				
			||||||
 | 
					            begin
 | 
				
			||||||
 | 
					              # Drop outdated views
 | 
				
			||||||
 | 
					              column_array = get_column_array(db, view_name)
 | 
				
			||||||
 | 
					              ChannelVideo.to_type_tuple.each_with_index do |name, i|
 | 
				
			||||||
 | 
					                if name != column_array[i]?
 | 
				
			||||||
 | 
					                  logger.write("DROP MATERIALIZED VIEW #{view_name}\n")
 | 
				
			||||||
 | 
					                  db.exec("DROP MATERIALIZED VIEW #{view_name}")
 | 
				
			||||||
 | 
					                  raise "view does not exist"
 | 
				
			||||||
 | 
					                end
 | 
				
			||||||
 | 
					              end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              db.exec("REFRESH MATERIALIZED VIEW #{view_name}")
 | 
				
			||||||
 | 
					            rescue ex
 | 
				
			||||||
 | 
					              # Rename old views
 | 
				
			||||||
 | 
					              begin
 | 
				
			||||||
 | 
					                legacy_view_name = "subscriptions_#{sha256(email)[0..7]}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                db.exec("SELECT * FROM #{legacy_view_name} LIMIT 0")
 | 
				
			||||||
 | 
					                logger.write("RENAME MATERIALIZED VIEW #{legacy_view_name}\n")
 | 
				
			||||||
 | 
					                db.exec("ALTER MATERIALIZED VIEW #{legacy_view_name} RENAME TO #{view_name}")
 | 
				
			||||||
 | 
					              rescue ex
 | 
				
			||||||
 | 
					                begin
 | 
				
			||||||
 | 
					                  # While iterating through, we may have an email stored from a deleted account
 | 
				
			||||||
 | 
					                  if db.query_one?("SELECT true FROM users WHERE email = $1", email, as: Bool)
 | 
				
			||||||
 | 
					                    logger.write("CREATE #{view_name}\n")
 | 
				
			||||||
 | 
					                    db.exec("CREATE MATERIALIZED VIEW #{view_name} AS \
 | 
				
			||||||
 | 
					                    SELECT * FROM channel_videos WHERE \
 | 
				
			||||||
 | 
					                    ucid = ANY ((SELECT subscriptions FROM users WHERE email = E'#{email.gsub("'", "\\'")}')::text[]) \
 | 
				
			||||||
 | 
					                    ORDER BY published DESC;")
 | 
				
			||||||
 | 
					                  end
 | 
				
			||||||
 | 
					                rescue ex
 | 
				
			||||||
 | 
					                  logger.write("REFRESH #{email} : #{ex.message}\n")
 | 
				
			||||||
 | 
					                end
 | 
				
			||||||
 | 
					              end
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            active_channel.send(true)
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      sleep 1.minute
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  max_channel.send(config.feed_threads)
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def subscribe_to_feeds(db, logger, key, config)
 | 
				
			||||||
 | 
					  if config.use_pubsub_feeds
 | 
				
			||||||
 | 
					    case config.use_pubsub_feeds
 | 
				
			||||||
 | 
					    when Bool
 | 
				
			||||||
 | 
					      max_threads = config.use_pubsub_feeds.as(Bool).to_unsafe
 | 
				
			||||||
 | 
					    when Int32
 | 
				
			||||||
 | 
					      max_threads = config.use_pubsub_feeds.as(Int32)
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					    max_channel = Channel(Int32).new
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    spawn do
 | 
				
			||||||
 | 
					      max_threads = max_channel.receive
 | 
				
			||||||
 | 
					      active_threads = 0
 | 
				
			||||||
 | 
					      active_channel = Channel(Bool).new
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      loop do
 | 
				
			||||||
 | 
					        db.query_all("SELECT id FROM channels WHERE CURRENT_TIMESTAMP - subscribed > interval '4 days' OR subscribed IS NULL") do |rs|
 | 
				
			||||||
 | 
					          rs.each do
 | 
				
			||||||
 | 
					            ucid = rs.read(String)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if active_threads >= max_threads.as(Int32)
 | 
				
			||||||
 | 
					              if active_channel.receive
 | 
				
			||||||
 | 
					                active_threads -= 1
 | 
				
			||||||
 | 
					              end
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            active_threads += 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            spawn do
 | 
				
			||||||
 | 
					              begin
 | 
				
			||||||
 | 
					                response = subscribe_pubsub(ucid, key, config)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                if response.status_code >= 400
 | 
				
			||||||
 | 
					                  logger.write("#{ucid} : #{response.body}\n")
 | 
				
			||||||
 | 
					                end
 | 
				
			||||||
 | 
					              rescue ex
 | 
				
			||||||
 | 
					              end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              active_channel.send(true)
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        sleep 1.minute
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    max_channel.send(max_threads.as(Int32))
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def pull_top_videos(config, db)
 | 
				
			||||||
 | 
					  loop do
 | 
				
			||||||
 | 
					    begin
 | 
				
			||||||
 | 
					      top = rank_videos(db, 40)
 | 
				
			||||||
 | 
					    rescue ex
 | 
				
			||||||
 | 
					      next
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if top.size > 0
 | 
				
			||||||
 | 
					      args = arg_array(top)
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					      next
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    videos = [] of Video
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    top.each do |id|
 | 
				
			||||||
 | 
					      begin
 | 
				
			||||||
 | 
					        videos << get_video(id, db)
 | 
				
			||||||
 | 
					      rescue ex
 | 
				
			||||||
 | 
					        next
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    yield videos
 | 
				
			||||||
 | 
					    sleep 1.minute
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def pull_popular_videos(db)
 | 
				
			||||||
 | 
					  loop do
 | 
				
			||||||
 | 
					    subscriptions = 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 = 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
 | 
				
			||||||
 | 
					    sleep 1.minute
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def update_decrypt_function
 | 
				
			||||||
 | 
					  loop do
 | 
				
			||||||
 | 
					    begin
 | 
				
			||||||
 | 
					      decrypt_function = fetch_decrypt_function
 | 
				
			||||||
 | 
					    rescue ex
 | 
				
			||||||
 | 
					      next
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    yield decrypt_function
 | 
				
			||||||
 | 
					    sleep 1.minute
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def find_working_proxies(regions)
 | 
				
			||||||
 | 
					  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)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      yield region, proxies
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    sleep 1.minute
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
							
								
								
									
										248
									
								
								src/invidious/helpers/json_filter.cr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										248
									
								
								src/invidious/helpers/json_filter.cr
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,248 @@
 | 
				
			|||||||
 | 
					module JSONFilter
 | 
				
			||||||
 | 
					  alias BracketIndex = Hash(Int64, Int64)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  alias GroupedFieldsValue = String | Array(GroupedFieldsValue)
 | 
				
			||||||
 | 
					  alias GroupedFieldsList = Array(GroupedFieldsValue)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  class FieldsParser
 | 
				
			||||||
 | 
					    class ParseError < Exception
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # Returns the `Regex` pattern used to match nest groups
 | 
				
			||||||
 | 
					    def self.nest_group_pattern : Regex
 | 
				
			||||||
 | 
					      # uses a '.' character to match json keys as they are allowed
 | 
				
			||||||
 | 
					      # to contain any unicode codepoint
 | 
				
			||||||
 | 
					      /(?:|,)(?<groupname>[^,\n]*?)\(/
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # Returns the `Regex` pattern used to check if there are any empty nest groups
 | 
				
			||||||
 | 
					    def self.unnamed_nest_group_pattern : Regex
 | 
				
			||||||
 | 
					      /^\(|\(\(|\/\(/
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def self.parse_fields(fields_text : String) : Nil
 | 
				
			||||||
 | 
					      if fields_text.empty?
 | 
				
			||||||
 | 
					        raise FieldsParser::ParseError.new "Fields is empty"
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      opening_bracket_count = fields_text.count('(')
 | 
				
			||||||
 | 
					      closing_bracket_count = fields_text.count(')')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      if opening_bracket_count != closing_bracket_count
 | 
				
			||||||
 | 
					        bracket_type = opening_bracket_count > closing_bracket_count ? "opening" : "closing"
 | 
				
			||||||
 | 
					        raise FieldsParser::ParseError.new "There are too many #{bracket_type} brackets (#{opening_bracket_count}:#{closing_bracket_count})"
 | 
				
			||||||
 | 
					      elsif match_result = unnamed_nest_group_pattern.match(fields_text)
 | 
				
			||||||
 | 
					        raise FieldsParser::ParseError.new "Unnamed nest group at position #{match_result.begin}"
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      # first, handle top-level single nested properties: items/id, playlistItems/snippet, etc
 | 
				
			||||||
 | 
					      parse_single_nests(fields_text) { |nest_list| yield nest_list }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      # next, handle nest groups: items(id, etag, etc)
 | 
				
			||||||
 | 
					      parse_nest_groups(fields_text) { |nest_list| yield nest_list }
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def self.parse_single_nests(fields_text : String) : Nil
 | 
				
			||||||
 | 
					      single_nests = remove_nest_groups(fields_text)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      if !single_nests.empty?
 | 
				
			||||||
 | 
					        property_nests = single_nests.split(',')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        property_nests.each do |nest|
 | 
				
			||||||
 | 
					          nest_list = nest.split('/')
 | 
				
			||||||
 | 
					          if nest_list.includes? ""
 | 
				
			||||||
 | 
					            raise FieldsParser::ParseError.new "Empty key in nest list: #{nest_list}"
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					          yield nest_list
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					        # else
 | 
				
			||||||
 | 
					        #   raise FieldsParser::ParseError.new "Empty key in nest list 22: #{fields_text} | #{single_nests}"
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def self.parse_nest_groups(fields_text : String) : Nil
 | 
				
			||||||
 | 
					      nest_stack = [] of NamedTuple(group_name: String, closing_bracket_index: Int64)
 | 
				
			||||||
 | 
					      bracket_pairs = get_bracket_pairs(fields_text, true)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      text_index = 0
 | 
				
			||||||
 | 
					      regex_index = 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      while regex_result = self.nest_group_pattern.match(fields_text, regex_index)
 | 
				
			||||||
 | 
					        raw_match = regex_result[0]
 | 
				
			||||||
 | 
					        group_name = regex_result["groupname"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        text_index = regex_result.begin
 | 
				
			||||||
 | 
					        regex_index = regex_result.end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if text_index.nil? || regex_index.nil?
 | 
				
			||||||
 | 
					          raise FieldsParser::ParseError.new "Received invalid index while parsing nest groups: text_index: #{text_index} | regex_index: #{regex_index}"
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        offset = raw_match.starts_with?(',') ? 1 : 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        opening_bracket_index = (text_index + group_name.size) + offset
 | 
				
			||||||
 | 
					        closing_bracket_index = bracket_pairs[opening_bracket_index]
 | 
				
			||||||
 | 
					        content_start = opening_bracket_index + 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        content = fields_text[content_start...closing_bracket_index]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if content.empty?
 | 
				
			||||||
 | 
					          raise FieldsParser::ParseError.new "Empty nest group at position #{content_start}"
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					          content = remove_nest_groups(content)
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        while nest_stack.size > 0 && closing_bracket_index > nest_stack[nest_stack.size - 1][:closing_bracket_index]
 | 
				
			||||||
 | 
					          if nest_stack.size
 | 
				
			||||||
 | 
					            nest_stack.pop
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        group_name.split('/').each do |group_name|
 | 
				
			||||||
 | 
					          nest_stack.push({
 | 
				
			||||||
 | 
					            group_name:            group_name,
 | 
				
			||||||
 | 
					            closing_bracket_index: closing_bracket_index,
 | 
				
			||||||
 | 
					          })
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if !content.empty?
 | 
				
			||||||
 | 
					          properties = content.split(',')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          properties.each do |prop|
 | 
				
			||||||
 | 
					            nest_list = nest_stack.map { |nest_prop| nest_prop[:group_name] }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if !prop.empty?
 | 
				
			||||||
 | 
					              if prop.includes?('/')
 | 
				
			||||||
 | 
					                parse_single_nests(prop) { |list| nest_list += list }
 | 
				
			||||||
 | 
					              else
 | 
				
			||||||
 | 
					                nest_list.push prop
 | 
				
			||||||
 | 
					              end
 | 
				
			||||||
 | 
					            else
 | 
				
			||||||
 | 
					              raise FieldsParser::ParseError.new "Empty key in nest list: #{nest_list << prop}"
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            yield nest_list
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def self.remove_nest_groups(text : String) : String
 | 
				
			||||||
 | 
					      content_bracket_pairs = get_bracket_pairs(text, false)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      content_bracket_pairs.each_key.to_a.reverse.each do |opening_bracket|
 | 
				
			||||||
 | 
					        closing_bracket = content_bracket_pairs[opening_bracket]
 | 
				
			||||||
 | 
					        last_comma = text.rindex(',', opening_bracket) || 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        text = text[0...last_comma] + text[closing_bracket + 1...text.size]
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      return text.starts_with?(',') ? text[1...text.size] : text
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def self.get_bracket_pairs(text : String, recursive = true) : BracketIndex
 | 
				
			||||||
 | 
					      istart = [] of Int64
 | 
				
			||||||
 | 
					      bracket_index = BracketIndex.new
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      text.each_char_with_index do |char, index|
 | 
				
			||||||
 | 
					        if char == '('
 | 
				
			||||||
 | 
					          istart.push(index.to_i64)
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if char == ')'
 | 
				
			||||||
 | 
					          begin
 | 
				
			||||||
 | 
					            opening = istart.pop
 | 
				
			||||||
 | 
					            if recursive || (!recursive && istart.size == 0)
 | 
				
			||||||
 | 
					              bracket_index[opening] = index.to_i64
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					          rescue
 | 
				
			||||||
 | 
					            raise FieldsParser::ParseError.new "No matching opening parenthesis at: #{index}"
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      if istart.size != 0
 | 
				
			||||||
 | 
					        idx = istart.pop
 | 
				
			||||||
 | 
					        raise FieldsParser::ParseError.new "No matching closing parenthesis at: #{idx}"
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      return bracket_index
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  class FieldsGrouper
 | 
				
			||||||
 | 
					    alias SkeletonValue = Hash(String, SkeletonValue)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def self.create_json_skeleton(fields_text : String) : SkeletonValue
 | 
				
			||||||
 | 
					      root_hash = {} of String => SkeletonValue
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      FieldsParser.parse_fields(fields_text) do |nest_list|
 | 
				
			||||||
 | 
					        current_item = root_hash
 | 
				
			||||||
 | 
					        nest_list.each do |key|
 | 
				
			||||||
 | 
					          if current_item[key]?
 | 
				
			||||||
 | 
					            current_item = current_item[key]
 | 
				
			||||||
 | 
					          else
 | 
				
			||||||
 | 
					            current_item[key] = {} of String => SkeletonValue
 | 
				
			||||||
 | 
					            current_item = current_item[key]
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					      root_hash
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def self.create_grouped_fields_list(json_skeleton : SkeletonValue) : GroupedFieldsList
 | 
				
			||||||
 | 
					      grouped_fields_list = GroupedFieldsList.new
 | 
				
			||||||
 | 
					      json_skeleton.each do |key, value|
 | 
				
			||||||
 | 
					        grouped_fields_list.push key
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        nested_keys = create_grouped_fields_list(value)
 | 
				
			||||||
 | 
					        grouped_fields_list.push nested_keys unless nested_keys.empty?
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					      return grouped_fields_list
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  class FilterError < Exception
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  def self.filter(item : JSON::Any, fields_text : String, in_place : Bool = true)
 | 
				
			||||||
 | 
					    skeleton = FieldsGrouper.create_json_skeleton(fields_text)
 | 
				
			||||||
 | 
					    grouped_fields_list = FieldsGrouper.create_grouped_fields_list(skeleton)
 | 
				
			||||||
 | 
					    filter(item, grouped_fields_list, in_place)
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  def self.filter(item : JSON::Any, grouped_fields_list : GroupedFieldsList, in_place : Bool = true) : JSON::Any
 | 
				
			||||||
 | 
					    item = item.clone unless in_place
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if !item.as_h? && !item.as_a?
 | 
				
			||||||
 | 
					      raise FilterError.new "Can't filter '#{item}' by #{grouped_fields_list}"
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    top_level_keys = Array(String).new
 | 
				
			||||||
 | 
					    grouped_fields_list.each do |value|
 | 
				
			||||||
 | 
					      if value.is_a? String
 | 
				
			||||||
 | 
					        top_level_keys.push value
 | 
				
			||||||
 | 
					      elsif value.is_a? Array
 | 
				
			||||||
 | 
					        if !top_level_keys.empty?
 | 
				
			||||||
 | 
					          key_to_filter = top_level_keys.last
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          if item.as_h?
 | 
				
			||||||
 | 
					            filter(item[key_to_filter], value, in_place: true)
 | 
				
			||||||
 | 
					          elsif item.as_a?
 | 
				
			||||||
 | 
					            item.as_a.each { |arr_item| filter(arr_item[key_to_filter], value, in_place: true) }
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					          raise FilterError.new "Tried to filter while top level keys list is empty"
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if item.as_h?
 | 
				
			||||||
 | 
					      item.as_h.select! top_level_keys
 | 
				
			||||||
 | 
					    elsif item.as_a?
 | 
				
			||||||
 | 
					      item.as_a.map { |value| filter(value, top_level_keys, in_place: true) }
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    item
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
@ -1,12 +1,16 @@
 | 
				
			|||||||
macro add_mapping(mapping)
 | 
					macro db_mapping(mapping)
 | 
				
			||||||
  def initialize({{*mapping.keys.map { |id| "@#{id}".id }}})
 | 
					  def initialize({{*mapping.keys.map { |id| "@#{id}".id }}})
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def to_a
 | 
					  def to_a
 | 
				
			||||||
        return [{{*mapping.keys.map { |id| "@#{id}".id }}}]
 | 
					      return [ {{*mapping.keys.map { |id| "@#{id}".id }}} ]
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    DB.mapping({{mapping}})
 | 
					  def self.to_type_tuple
 | 
				
			||||||
 | 
					      return { {{*mapping.keys.map { |id| "#{id}" }}} }
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  DB.mapping( {{mapping}} )
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
macro json_mapping(mapping)
 | 
					macro json_mapping(mapping)
 | 
				
			||||||
@ -14,10 +18,26 @@ macro json_mapping(mapping)
 | 
				
			|||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def to_a
 | 
					  def to_a
 | 
				
			||||||
        return [{{*mapping.keys.map { |id| "@#{id}".id }}}]
 | 
					      return [ {{*mapping.keys.map { |id| "@#{id}".id }}} ]
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    JSON.mapping({{mapping}})
 | 
					  patched_json_mapping( {{mapping}} )
 | 
				
			||||||
 | 
					  YAML.mapping( {{mapping}} )
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					macro yaml_mapping(mapping)
 | 
				
			||||||
 | 
					  def initialize({{*mapping.keys.map { |id| "@#{id}".id }}})
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  def to_a
 | 
				
			||||||
 | 
					      return [ {{*mapping.keys.map { |id| "@#{id}".id }}} ]
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  def to_tuple
 | 
				
			||||||
 | 
					      return { {{*mapping.keys.map { |id| "@#{id}".id }}} }
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  YAML.mapping({{mapping}})
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
macro templated(filename, template = "template")
 | 
					macro templated(filename, template = "template")
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										166
									
								
								src/invidious/helpers/patch_mapping.cr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										166
									
								
								src/invidious/helpers/patch_mapping.cr
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,166 @@
 | 
				
			|||||||
 | 
					# Overloads https://github.com/crystal-lang/crystal/blob/0.28.0/src/json/from_json.cr#L24
 | 
				
			||||||
 | 
					def Object.from_json(string_or_io, default) : self
 | 
				
			||||||
 | 
					  parser = JSON::PullParser.new(string_or_io)
 | 
				
			||||||
 | 
					  new parser, default
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Adds configurable 'default' to
 | 
				
			||||||
 | 
					macro patched_json_mapping(_properties_, strict = false)
 | 
				
			||||||
 | 
					  {% for key, value in _properties_ %}
 | 
				
			||||||
 | 
					    {% _properties_[key] = {type: value} unless value.is_a?(HashLiteral) || value.is_a?(NamedTupleLiteral) %}
 | 
				
			||||||
 | 
					  {% end %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  {% for key, value in _properties_ %}
 | 
				
			||||||
 | 
					    {% _properties_[key][:key_id] = key.id.gsub(/\?$/, "") %}
 | 
				
			||||||
 | 
					  {% end %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  {% for key, value in _properties_ %}
 | 
				
			||||||
 | 
					    @{{value[:key_id]}} : {{value[:type]}}{{ (value[:nilable] ? "?" : "").id }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    {% if value[:setter] == nil ? true : value[:setter] %}
 | 
				
			||||||
 | 
					      def {{value[:key_id]}}=(_{{value[:key_id]}} : {{value[:type]}}{{ (value[:nilable] ? "?" : "").id }})
 | 
				
			||||||
 | 
					        @{{value[:key_id]}} = _{{value[:key_id]}}
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					    {% end %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    {% if value[:getter] == nil ? true : value[:getter] %}
 | 
				
			||||||
 | 
					      def {{key.id}} : {{value[:type]}}{{ (value[:nilable] ? "?" : "").id }}
 | 
				
			||||||
 | 
					        @{{value[:key_id]}}
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					    {% end %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    {% if value[:presence] %}
 | 
				
			||||||
 | 
					      @{{value[:key_id]}}_present : Bool = false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      def {{value[:key_id]}}_present?
 | 
				
			||||||
 | 
					        @{{value[:key_id]}}_present
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					    {% end %}
 | 
				
			||||||
 | 
					  {% end %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  def initialize(%pull : ::JSON::PullParser, default = nil)
 | 
				
			||||||
 | 
					    {% for key, value in _properties_ %}
 | 
				
			||||||
 | 
					      %var{key.id} = nil
 | 
				
			||||||
 | 
					      %found{key.id} = false
 | 
				
			||||||
 | 
					    {% end %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    %location = %pull.location
 | 
				
			||||||
 | 
					    begin
 | 
				
			||||||
 | 
					      %pull.read_begin_object
 | 
				
			||||||
 | 
					    rescue exc : ::JSON::ParseException
 | 
				
			||||||
 | 
					      raise ::JSON::MappingError.new(exc.message, self.class.to_s, nil, *%location, exc)
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					    while %pull.kind != :end_object
 | 
				
			||||||
 | 
					      %key_location = %pull.location
 | 
				
			||||||
 | 
					      key = %pull.read_object_key
 | 
				
			||||||
 | 
					      case key
 | 
				
			||||||
 | 
					      {% for key, value in _properties_ %}
 | 
				
			||||||
 | 
					        when {{value[:key] || value[:key_id].stringify}}
 | 
				
			||||||
 | 
					          %found{key.id} = true
 | 
				
			||||||
 | 
					          begin
 | 
				
			||||||
 | 
					            %var{key.id} =
 | 
				
			||||||
 | 
					              {% if value[:nilable] || value[:default] != nil %} %pull.read_null_or { {% end %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              {% if value[:root] %}
 | 
				
			||||||
 | 
					                %pull.on_key!({{value[:root]}}) do
 | 
				
			||||||
 | 
					              {% end %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              {% if value[:converter] %}
 | 
				
			||||||
 | 
					                {{value[:converter]}}.from_json(%pull)
 | 
				
			||||||
 | 
					              {% elsif value[:type].is_a?(Path) || value[:type].is_a?(Generic) %}
 | 
				
			||||||
 | 
					                {{value[:type]}}.new(%pull)
 | 
				
			||||||
 | 
					              {% else %}
 | 
				
			||||||
 | 
					                ::Union({{value[:type]}}).new(%pull)
 | 
				
			||||||
 | 
					              {% end %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              {% if value[:root] %}
 | 
				
			||||||
 | 
					                end
 | 
				
			||||||
 | 
					              {% end %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            {% if value[:nilable] || value[:default] != nil %} } {% end %}
 | 
				
			||||||
 | 
					          rescue exc : ::JSON::ParseException
 | 
				
			||||||
 | 
					            raise ::JSON::MappingError.new(exc.message, self.class.to_s, {{value[:key] || value[:key_id].stringify}}, *%key_location, exc)
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					      {% end %}
 | 
				
			||||||
 | 
					      else
 | 
				
			||||||
 | 
					        {% if strict %}
 | 
				
			||||||
 | 
					          raise ::JSON::MappingError.new("Unknown JSON attribute: #{key}", self.class.to_s, nil, *%key_location, nil)
 | 
				
			||||||
 | 
					        {% else %}
 | 
				
			||||||
 | 
					          %pull.skip
 | 
				
			||||||
 | 
					        {% end %}
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					    %pull.read_next
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    {% for key, value in _properties_ %}
 | 
				
			||||||
 | 
					      {% unless value[:nilable] || value[:default] != nil %}
 | 
				
			||||||
 | 
					        if %var{key.id}.nil? && !%found{key.id} && !::Union({{value[:type]}}).nilable?
 | 
				
			||||||
 | 
					          raise ::JSON::MappingError.new("Missing JSON attribute: {{(value[:key] || value[:key_id]).id}}", self.class.to_s, nil, *%location, nil)
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					      {% end %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      {% if value[:nilable] %}
 | 
				
			||||||
 | 
					        {% if value[:default] != nil %}
 | 
				
			||||||
 | 
					          @{{value[:key_id]}} = %found{key.id} ? %var{key.id} : (default.responds_to?(:{{value[:key_id]}}) ? default.{{value[:key_id]}} : {{value[:default]}})
 | 
				
			||||||
 | 
					        {% else %}
 | 
				
			||||||
 | 
					          @{{value[:key_id]}} = %var{key.id}
 | 
				
			||||||
 | 
					        {% end %}
 | 
				
			||||||
 | 
					      {% elsif value[:default] != nil %}
 | 
				
			||||||
 | 
					        @{{value[:key_id]}} = %var{key.id}.nil? ? (default.responds_to?(:{{value[:key_id]}}) ? default.{{value[:key_id]}} : {{value[:default]}}) : %var{key.id}
 | 
				
			||||||
 | 
					      {% else %}
 | 
				
			||||||
 | 
					        @{{value[:key_id]}} = (%var{key.id}).as({{value[:type]}})
 | 
				
			||||||
 | 
					      {% end %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      {% if value[:presence] %}
 | 
				
			||||||
 | 
					        @{{value[:key_id]}}_present = %found{key.id}
 | 
				
			||||||
 | 
					      {% end %}
 | 
				
			||||||
 | 
					    {% end %}
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  def to_json(json : ::JSON::Builder)
 | 
				
			||||||
 | 
					    json.object do
 | 
				
			||||||
 | 
					      {% for key, value in _properties_ %}
 | 
				
			||||||
 | 
					        _{{value[:key_id]}} = @{{value[:key_id]}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        {% unless value[:emit_null] %}
 | 
				
			||||||
 | 
					          unless _{{value[:key_id]}}.nil?
 | 
				
			||||||
 | 
					        {% end %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          json.field({{value[:key] || value[:key_id].stringify}}) do
 | 
				
			||||||
 | 
					            {% if value[:root] %}
 | 
				
			||||||
 | 
					              {% if value[:emit_null] %}
 | 
				
			||||||
 | 
					                if _{{value[:key_id]}}.nil?
 | 
				
			||||||
 | 
					                  nil.to_json(json)
 | 
				
			||||||
 | 
					                else
 | 
				
			||||||
 | 
					              {% end %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              json.object do
 | 
				
			||||||
 | 
					                json.field({{value[:root]}}) do
 | 
				
			||||||
 | 
					            {% end %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            {% if value[:converter] %}
 | 
				
			||||||
 | 
					              if _{{value[:key_id]}}
 | 
				
			||||||
 | 
					                {{ value[:converter] }}.to_json(_{{value[:key_id]}}, json)
 | 
				
			||||||
 | 
					              else
 | 
				
			||||||
 | 
					                nil.to_json(json)
 | 
				
			||||||
 | 
					              end
 | 
				
			||||||
 | 
					            {% else %}
 | 
				
			||||||
 | 
					              _{{value[:key_id]}}.to_json(json)
 | 
				
			||||||
 | 
					            {% end %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            {% if value[:root] %}
 | 
				
			||||||
 | 
					              {% if value[:emit_null] %}
 | 
				
			||||||
 | 
					                end
 | 
				
			||||||
 | 
					              {% end %}
 | 
				
			||||||
 | 
					                end
 | 
				
			||||||
 | 
					              end
 | 
				
			||||||
 | 
					            {% end %}
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        {% unless value[:emit_null] %}
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					        {% end %}
 | 
				
			||||||
 | 
					      {% end %}
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
							
								
								
									
										146
									
								
								src/invidious/helpers/tokens.cr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										146
									
								
								src/invidious/helpers/tokens.cr
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,146 @@
 | 
				
			|||||||
 | 
					def generate_token(email, scopes, expire, key, db)
 | 
				
			||||||
 | 
					  session = "v1:#{Base64.urlsafe_encode(Random::Secure.random_bytes(32))}"
 | 
				
			||||||
 | 
					  PG_DB.exec("INSERT INTO session_ids VALUES ($1, $2, $3)", session, email, Time.now)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  token = {
 | 
				
			||||||
 | 
					    "session" => session,
 | 
				
			||||||
 | 
					    "scopes"  => scopes,
 | 
				
			||||||
 | 
					    "expire"  => expire,
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if !expire
 | 
				
			||||||
 | 
					    token.delete("expire")
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  token["signature"] = sign_token(key, token)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  return token.to_json
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def generate_response(session, scopes, key, db, expire = 6.hours, use_nonce = false)
 | 
				
			||||||
 | 
					  expire = Time.now + expire
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  token = {
 | 
				
			||||||
 | 
					    "session" => session,
 | 
				
			||||||
 | 
					    "expire"  => expire.to_unix,
 | 
				
			||||||
 | 
					    "scopes"  => scopes,
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if use_nonce
 | 
				
			||||||
 | 
					    nonce = Random::Secure.hex(16)
 | 
				
			||||||
 | 
					    db.exec("INSERT INTO nonces VALUES ($1, $2) ON CONFLICT DO NOTHING", nonce, expire)
 | 
				
			||||||
 | 
					    token["nonce"] = nonce
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  token["signature"] = sign_token(key, token)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  return token.to_json
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def sign_token(key, hash)
 | 
				
			||||||
 | 
					  string_to_sign = [] of String
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  hash.each do |key, value|
 | 
				
			||||||
 | 
					    if key == "signature"
 | 
				
			||||||
 | 
					      next
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if value.is_a?(JSON::Any)
 | 
				
			||||||
 | 
					      case value
 | 
				
			||||||
 | 
					      when .as_a?
 | 
				
			||||||
 | 
					        value = value.as_a.map { |item| item.as_s }
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    case value
 | 
				
			||||||
 | 
					    when Array
 | 
				
			||||||
 | 
					      string_to_sign << "#{key}=#{value.sort.join(",")}"
 | 
				
			||||||
 | 
					    when Tuple
 | 
				
			||||||
 | 
					      string_to_sign << "#{key}=#{value.to_a.sort.join(",")}"
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					      string_to_sign << "#{key}=#{value}"
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  string_to_sign = string_to_sign.sort.join("\n")
 | 
				
			||||||
 | 
					  return Base64.urlsafe_encode(OpenSSL::HMAC.digest(:sha256, key, string_to_sign)).strip
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def validate_request(token, session, request, key, db, locale = nil)
 | 
				
			||||||
 | 
					  case token
 | 
				
			||||||
 | 
					  when String
 | 
				
			||||||
 | 
					    token = JSON.parse(URI.unescape(token)).as_h
 | 
				
			||||||
 | 
					  when JSON::Any
 | 
				
			||||||
 | 
					    token = token.as_h
 | 
				
			||||||
 | 
					  when Nil
 | 
				
			||||||
 | 
					    raise translate(locale, "Hidden field \"token\" is a required field")
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if token["signature"] != sign_token(key, token)
 | 
				
			||||||
 | 
					    raise translate(locale, "Invalid signature")
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if token["session"] != session
 | 
				
			||||||
 | 
					    raise translate(locale, "Erroneous token")
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if token["nonce"]? && (nonce = db.query_one?("SELECT * FROM nonces WHERE nonce = $1", token["nonce"], as: {String, Time}))
 | 
				
			||||||
 | 
					    if nonce[1] > Time.now
 | 
				
			||||||
 | 
					      db.exec("UPDATE nonces SET expire = $1 WHERE nonce = $2", Time.new(1990, 1, 1), nonce[0])
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					      raise translate(locale, "Erroneous token")
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  scopes = token["scopes"].as_a.map { |v| v.as_s }
 | 
				
			||||||
 | 
					  scope = "#{request.method}:#{request.path.lchop("/api/v1/auth/").lstrip("/")}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if !scopes_include_scope(scopes, scope)
 | 
				
			||||||
 | 
					    raise translate(locale, "Invalid scope")
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  expire = token["expire"]?.try &.as_i
 | 
				
			||||||
 | 
					  if expire.try &.< Time.now.to_unix
 | 
				
			||||||
 | 
					    raise translate(locale, "Token is expired, please try again")
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  return {scopes, expire, token["signature"].as_s}
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def scope_includes_scope(scope, subset)
 | 
				
			||||||
 | 
					  methods, endpoint = scope.split(":")
 | 
				
			||||||
 | 
					  methods = methods.split(";").map { |method| method.upcase }.reject { |method| method.empty? }.sort
 | 
				
			||||||
 | 
					  endpoint = endpoint.downcase
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  subset_methods, subset_endpoint = subset.split(":")
 | 
				
			||||||
 | 
					  subset_methods = subset_methods.split(";").map { |method| method.upcase }.sort
 | 
				
			||||||
 | 
					  subset_endpoint = subset_endpoint.downcase
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if methods.empty?
 | 
				
			||||||
 | 
					    methods = %w(GET POST PUT HEAD DELETE PATCH OPTIONS)
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if methods & subset_methods != subset_methods
 | 
				
			||||||
 | 
					    return false
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if endpoint.ends_with?("*") && !subset_endpoint.starts_with? endpoint.rchop("*")
 | 
				
			||||||
 | 
					    return false
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if !endpoint.ends_with?("*") && subset_endpoint != endpoint
 | 
				
			||||||
 | 
					    return false
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  return true
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def scopes_include_scope(scopes, subset)
 | 
				
			||||||
 | 
					  scopes.each do |scope|
 | 
				
			||||||
 | 
					    if scope_includes_scope(scope, subset)
 | 
				
			||||||
 | 
					      return true
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  return false
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
@ -18,13 +18,18 @@ def elapsed_text(elapsed)
 | 
				
			|||||||
  "#{(millis * 1000).round(2)}µs"
 | 
					  "#{(millis * 1000).round(2)}µs"
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def make_client(url, proxies = {} of String => Array({ip: String, port: Int32}), region = nil)
 | 
					def make_client(url : URI, proxies = {} of String => Array({ip: String, port: Int32}), region = nil)
 | 
				
			||||||
 | 
					  context = nil
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if url.scheme == "https"
 | 
				
			||||||
    context = OpenSSL::SSL::Context::Client.new
 | 
					    context = OpenSSL::SSL::Context::Client.new
 | 
				
			||||||
    context.add_options(
 | 
					    context.add_options(
 | 
				
			||||||
      OpenSSL::SSL::Options::ALL |
 | 
					      OpenSSL::SSL::Options::ALL |
 | 
				
			||||||
      OpenSSL::SSL::Options::NO_SSL_V2 |
 | 
					      OpenSSL::SSL::Options::NO_SSL_V2 |
 | 
				
			||||||
      OpenSSL::SSL::Options::NO_SSL_V3
 | 
					      OpenSSL::SSL::Options::NO_SSL_V3
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  client = HTTPClient.new(url, context)
 | 
					  client = HTTPClient.new(url, context)
 | 
				
			||||||
  client.read_timeout = 10.seconds
 | 
					  client.read_timeout = 10.seconds
 | 
				
			||||||
  client.connect_timeout = 10.seconds
 | 
					  client.connect_timeout = 10.seconds
 | 
				
			||||||
@ -59,8 +64,8 @@ def recode_length_seconds(time)
 | 
				
			|||||||
    time = time.seconds
 | 
					    time = time.seconds
 | 
				
			||||||
    text = "#{time.minutes.to_s.rjust(2, '0')}:#{time.seconds.to_s.rjust(2, '0')}"
 | 
					    text = "#{time.minutes.to_s.rjust(2, '0')}:#{time.seconds.to_s.rjust(2, '0')}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if time.hours > 0
 | 
					    if time.total_hours.to_i > 0
 | 
				
			||||||
      text = "#{time.hours.to_s.rjust(2, '0')}:#{text}"
 | 
					      text = "#{time.total_hours.to_i.to_s.rjust(2, '0')}:#{text}"
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    text = text.lchop('0')
 | 
					    text = text.lchop('0')
 | 
				
			||||||
@ -189,7 +194,9 @@ def number_to_short_text(number)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  text = text.rchop(".0")
 | 
					  text = text.rchop(".0")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if number / 1000000 != 0
 | 
					  if number / 1_000_000_000 != 0
 | 
				
			||||||
 | 
					    text += "B"
 | 
				
			||||||
 | 
					  elsif number / 1_000_000 != 0
 | 
				
			||||||
    text += "M"
 | 
					    text += "M"
 | 
				
			||||||
  elsif number / 1000 != 0
 | 
					  elsif number / 1000 != 0
 | 
				
			||||||
    text += "K"
 | 
					    text += "K"
 | 
				
			||||||
 | 
				
			|||||||
@ -1,195 +0,0 @@
 | 
				
			|||||||
def refresh_channels(db, logger, max_threads = 1, full_refresh = false)
 | 
					 | 
				
			||||||
  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 id FROM channels ORDER BY updated") do |rs|
 | 
					 | 
				
			||||||
        rs.each do
 | 
					 | 
				
			||||||
          id = rs.read(String)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          if active_threads >= max_threads
 | 
					 | 
				
			||||||
            if active_channel.receive
 | 
					 | 
				
			||||||
              active_threads -= 1
 | 
					 | 
				
			||||||
            end
 | 
					 | 
				
			||||||
          end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          active_threads += 1
 | 
					 | 
				
			||||||
          spawn do
 | 
					 | 
				
			||||||
            begin
 | 
					 | 
				
			||||||
              channel = fetch_channel(id, db, full_refresh)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
              db.exec("UPDATE channels SET updated = $1, author = $2, deleted = false WHERE id = $3", Time.now, channel.author, id)
 | 
					 | 
				
			||||||
            rescue ex
 | 
					 | 
				
			||||||
              if ex.message == "Deleted or invalid channel"
 | 
					 | 
				
			||||||
                db.exec("UPDATE channels SET updated = $1, deleted = true WHERE id = $2", Time.now, id)
 | 
					 | 
				
			||||||
              end
 | 
					 | 
				
			||||||
              logger.write("#{id} : #{ex.message}\n")
 | 
					 | 
				
			||||||
            end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            active_channel.send(true)
 | 
					 | 
				
			||||||
          end
 | 
					 | 
				
			||||||
        end
 | 
					 | 
				
			||||||
      end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      sleep 1.minute
 | 
					 | 
				
			||||||
    end
 | 
					 | 
				
			||||||
  end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  max_channel.send(max_threads)
 | 
					 | 
				
			||||||
end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
def refresh_feeds(db, logger, 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.query("SELECT * FROM #{view_name} LIMIT 1") do |rs|
 | 
					 | 
				
			||||||
                # View doesn't contain same number of rows as ChannelVideo
 | 
					 | 
				
			||||||
                if ChannelVideo.from_rs(rs)[0]?.try &.to_a.size.try &.!= rs.column_count
 | 
					 | 
				
			||||||
                  db.exec("DROP MATERIALIZED VIEW #{view_name}")
 | 
					 | 
				
			||||||
                  raise "valid schema does not exist"
 | 
					 | 
				
			||||||
                end
 | 
					 | 
				
			||||||
              end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
              db.exec("REFRESH MATERIALIZED VIEW #{view_name}")
 | 
					 | 
				
			||||||
            rescue ex
 | 
					 | 
				
			||||||
              # Create view if it doesn't exist
 | 
					 | 
				
			||||||
              if ex.message.try &.ends_with?("does not exist")
 | 
					 | 
				
			||||||
                # While iterating through, we may have an email stored from a deleted account
 | 
					 | 
				
			||||||
                if db.query_one?("SELECT true FROM users WHERE email = $1", email, as: Bool)
 | 
					 | 
				
			||||||
                  db.exec("CREATE MATERIALIZED VIEW #{view_name} AS \
 | 
					 | 
				
			||||||
                  SELECT * FROM channel_videos WHERE \
 | 
					 | 
				
			||||||
                  ucid = ANY ((SELECT subscriptions FROM users WHERE email = E'#{email.gsub("'", "\\'")}')::text[]) \
 | 
					 | 
				
			||||||
                  ORDER BY published DESC;")
 | 
					 | 
				
			||||||
                  logger.write("CREATE #{view_name}\n")
 | 
					 | 
				
			||||||
                end
 | 
					 | 
				
			||||||
              else
 | 
					 | 
				
			||||||
                logger.write("REFRESH #{email} : #{ex.message}\n")
 | 
					 | 
				
			||||||
              end
 | 
					 | 
				
			||||||
            end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            active_channel.send(true)
 | 
					 | 
				
			||||||
          end
 | 
					 | 
				
			||||||
        end
 | 
					 | 
				
			||||||
      end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      sleep 1.minute
 | 
					 | 
				
			||||||
    end
 | 
					 | 
				
			||||||
  end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  max_channel.send(max_threads)
 | 
					 | 
				
			||||||
end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
def subscribe_to_feeds(db, logger, key, config)
 | 
					 | 
				
			||||||
  if config.use_pubsub_feeds
 | 
					 | 
				
			||||||
    spawn do
 | 
					 | 
				
			||||||
      loop do
 | 
					 | 
				
			||||||
        db.query_all("SELECT id FROM channels WHERE CURRENT_TIMESTAMP - subscribed > '4 days' OR subscribed IS NULL") do |rs|
 | 
					 | 
				
			||||||
          rs.each do
 | 
					 | 
				
			||||||
            ucid = rs.read(String)
 | 
					 | 
				
			||||||
            response = subscribe_pubsub(ucid, key, config)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            if response.status_code >= 400
 | 
					 | 
				
			||||||
              logger.write("#{ucid} : #{response.body}\n")
 | 
					 | 
				
			||||||
            end
 | 
					 | 
				
			||||||
          end
 | 
					 | 
				
			||||||
        end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        sleep 1.minute
 | 
					 | 
				
			||||||
      end
 | 
					 | 
				
			||||||
    end
 | 
					 | 
				
			||||||
  end
 | 
					 | 
				
			||||||
end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
def pull_top_videos(config, db)
 | 
					 | 
				
			||||||
  loop do
 | 
					 | 
				
			||||||
    begin
 | 
					 | 
				
			||||||
      top = rank_videos(db, 40)
 | 
					 | 
				
			||||||
    rescue ex
 | 
					 | 
				
			||||||
      next
 | 
					 | 
				
			||||||
    end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if top.size > 0
 | 
					 | 
				
			||||||
      args = arg_array(top)
 | 
					 | 
				
			||||||
    else
 | 
					 | 
				
			||||||
      next
 | 
					 | 
				
			||||||
    end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    videos = [] of Video
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    top.each do |id|
 | 
					 | 
				
			||||||
      begin
 | 
					 | 
				
			||||||
        videos << get_video(id, db)
 | 
					 | 
				
			||||||
      rescue ex
 | 
					 | 
				
			||||||
        next
 | 
					 | 
				
			||||||
      end
 | 
					 | 
				
			||||||
    end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    yield videos
 | 
					 | 
				
			||||||
    sleep 1.minute
 | 
					 | 
				
			||||||
  end
 | 
					 | 
				
			||||||
end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
def pull_popular_videos(db)
 | 
					 | 
				
			||||||
  loop do
 | 
					 | 
				
			||||||
    subscriptions = 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 = 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
 | 
					 | 
				
			||||||
    sleep 1.minute
 | 
					 | 
				
			||||||
  end
 | 
					 | 
				
			||||||
end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
def update_decrypt_function
 | 
					 | 
				
			||||||
  loop do
 | 
					 | 
				
			||||||
    begin
 | 
					 | 
				
			||||||
      decrypt_function = fetch_decrypt_function
 | 
					 | 
				
			||||||
    rescue ex
 | 
					 | 
				
			||||||
      next
 | 
					 | 
				
			||||||
    end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    yield decrypt_function
 | 
					 | 
				
			||||||
    sleep 1.minute
 | 
					 | 
				
			||||||
  end
 | 
					 | 
				
			||||||
end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
def find_working_proxies(regions)
 | 
					 | 
				
			||||||
  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)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      yield region, proxies
 | 
					 | 
				
			||||||
    end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    sleep 1.minute
 | 
					 | 
				
			||||||
  end
 | 
					 | 
				
			||||||
end
 | 
					 | 
				
			||||||
@ -1,5 +1,5 @@
 | 
				
			|||||||
struct MixVideo
 | 
					struct MixVideo
 | 
				
			||||||
  add_mapping({
 | 
					  db_mapping({
 | 
				
			||||||
    title:          String,
 | 
					    title:          String,
 | 
				
			||||||
    id:             String,
 | 
					    id:             String,
 | 
				
			||||||
    author:         String,
 | 
					    author:         String,
 | 
				
			||||||
@ -11,7 +11,7 @@ struct MixVideo
 | 
				
			|||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct Mix
 | 
					struct Mix
 | 
				
			||||||
  add_mapping({
 | 
					  db_mapping({
 | 
				
			||||||
    title:  String,
 | 
					    title:  String,
 | 
				
			||||||
    id:     String,
 | 
					    id:     String,
 | 
				
			||||||
    videos: Array(MixVideo),
 | 
					    videos: Array(MixVideo),
 | 
				
			||||||
@ -105,7 +105,7 @@ def template_mix(mix)
 | 
				
			|||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
          <p style="width:100%">#{video["title"]}</p>
 | 
					          <p style="width:100%">#{video["title"]}</p>
 | 
				
			||||||
          <p>
 | 
					          <p>
 | 
				
			||||||
              <b style="width: 100%">#{video["author"]}</b>
 | 
					              <b style="width:100%">#{video["author"]}</b>
 | 
				
			||||||
          </p>
 | 
					          </p>
 | 
				
			||||||
        </a>
 | 
					        </a>
 | 
				
			||||||
      </li>
 | 
					      </li>
 | 
				
			||||||
 | 
				
			|||||||
@ -1,5 +1,5 @@
 | 
				
			|||||||
struct PlaylistVideo
 | 
					struct PlaylistVideo
 | 
				
			||||||
  add_mapping({
 | 
					  db_mapping({
 | 
				
			||||||
    title:          String,
 | 
					    title:          String,
 | 
				
			||||||
    id:             String,
 | 
					    id:             String,
 | 
				
			||||||
    author:         String,
 | 
					    author:         String,
 | 
				
			||||||
@ -13,7 +13,7 @@ struct PlaylistVideo
 | 
				
			|||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct Playlist
 | 
					struct Playlist
 | 
				
			||||||
  add_mapping({
 | 
					  db_mapping({
 | 
				
			||||||
    title:            String,
 | 
					    title:            String,
 | 
				
			||||||
    id:               String,
 | 
					    id:               String,
 | 
				
			||||||
    author:           String,
 | 
					    author:           String,
 | 
				
			||||||
@ -49,7 +49,7 @@ def fetch_playlist_videos(plid, page, video_count, continuation = nil, locale =
 | 
				
			|||||||
    response = client.get(url)
 | 
					    response = client.get(url)
 | 
				
			||||||
    response = JSON.parse(response.body)
 | 
					    response = JSON.parse(response.body)
 | 
				
			||||||
    if !response["content_html"]? || response["content_html"].as_s.empty?
 | 
					    if !response["content_html"]? || response["content_html"].as_s.empty?
 | 
				
			||||||
      raise translate(locale, "Playlist is empty")
 | 
					      raise translate(locale, "Empty playlist")
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    document = XML.parse_html(response["content_html"].as_s)
 | 
					    document = XML.parse_html(response["content_html"].as_s)
 | 
				
			||||||
@ -174,7 +174,7 @@ def fetch_playlist(plid, locale)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  response = client.get("/playlist?list=#{plid}&hl=en&disable_polymer=1")
 | 
					  response = client.get("/playlist?list=#{plid}&hl=en&disable_polymer=1")
 | 
				
			||||||
  if response.status_code != 200
 | 
					  if response.status_code != 200
 | 
				
			||||||
    raise translate(locale, "Invalid playlist.")
 | 
					    raise translate(locale, "Not a playlist.")
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  body = response.body.gsub(/<button[^>]+><span[^>]+>\s*less\s*<img[^>]+>\n<\/span><\/button>/, "")
 | 
					  body = response.body.gsub(/<button[^>]+><span[^>]+>\s*less\s*<img[^>]+>\n<\/span><\/button>/, "")
 | 
				
			||||||
@ -190,22 +190,26 @@ def fetch_playlist(plid, locale)
 | 
				
			|||||||
  description_html ||= document.xpath_node(%q(//span[@class="pl-header-description-text"]))
 | 
					  description_html ||= document.xpath_node(%q(//span[@class="pl-header-description-text"]))
 | 
				
			||||||
  description_html, description = html_to_content(description_html)
 | 
					  description_html, description = html_to_content(description_html)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  anchor = document.xpath_node(%q(//ul[@class="pl-header-details"])).not_nil!
 | 
					  # YouTube allows anonymous playlists, so most of this can be empty or optional
 | 
				
			||||||
  author = anchor.xpath_node(%q(.//li[1]/a)).not_nil!.content
 | 
					  anchor = document.xpath_node(%q(//ul[@class="pl-header-details"]))
 | 
				
			||||||
 | 
					  author = anchor.try &.xpath_node(%q(.//li[1]/a)).try &.content
 | 
				
			||||||
 | 
					  author ||= ""
 | 
				
			||||||
  author_thumbnail = document.xpath_node(%q(//img[@class="channel-header-profile-image"])).try &.["src"]
 | 
					  author_thumbnail = document.xpath_node(%q(//img[@class="channel-header-profile-image"])).try &.["src"]
 | 
				
			||||||
  author_thumbnail ||= ""
 | 
					  author_thumbnail ||= ""
 | 
				
			||||||
  ucid = anchor.xpath_node(%q(.//li[1]/a)).not_nil!["href"].split("/")[-1]
 | 
					  ucid = anchor.try &.xpath_node(%q(.//li[1]/a)).try &.["href"].split("/")[-1]
 | 
				
			||||||
 | 
					  ucid ||= ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  video_count = anchor.xpath_node(%q(.//li[2])).not_nil!.content.delete("videos, ").to_i
 | 
					  video_count = anchor.try &.xpath_node(%q(.//li[2])).try &.content.gsub(/\D/, "").to_i?
 | 
				
			||||||
  views = anchor.xpath_node(%q(.//li[3])).not_nil!.content.delete("No views, ")
 | 
					  video_count ||= 0
 | 
				
			||||||
  if views.empty?
 | 
					  views = anchor.try &.xpath_node(%q(.//li[3])).try &.content.delete("No views, ").to_i64?
 | 
				
			||||||
    views = 0_i64
 | 
					  views ||= 0_i64
 | 
				
			||||||
  else
 | 
					 | 
				
			||||||
    views = views.to_i64
 | 
					 | 
				
			||||||
  end
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  updated = anchor.xpath_node(%q(.//li[4])).not_nil!.content.lchop("Last updated on ").lchop("Updated ")
 | 
					  updated = anchor.try &.xpath_node(%q(.//li[4])).try &.content.lchop("Last updated on ").lchop("Updated ")
 | 
				
			||||||
 | 
					  if updated
 | 
				
			||||||
    updated = decode_date(updated)
 | 
					    updated = decode_date(updated)
 | 
				
			||||||
 | 
					  else
 | 
				
			||||||
 | 
					    updated = Time.now
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  playlist = Playlist.new(
 | 
					  playlist = Playlist.new(
 | 
				
			||||||
    title: title,
 | 
					    title: title,
 | 
				
			||||||
@ -244,7 +248,7 @@ def template_playlist(playlist)
 | 
				
			|||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
          <p style="width:100%">#{video["title"]}</p>
 | 
					          <p style="width:100%">#{video["title"]}</p>
 | 
				
			||||||
          <p>
 | 
					          <p>
 | 
				
			||||||
              <b style="width: 100%">#{video["author"]}</b>
 | 
					            <b style="width:100%">#{video["author"]}</b>
 | 
				
			||||||
          </p>
 | 
					          </p>
 | 
				
			||||||
        </a>
 | 
					        </a>
 | 
				
			||||||
      </li>
 | 
					      </li>
 | 
				
			||||||
 | 
				
			|||||||
@ -1,5 +1,5 @@
 | 
				
			|||||||
struct SearchVideo
 | 
					struct SearchVideo
 | 
				
			||||||
  add_mapping({
 | 
					  db_mapping({
 | 
				
			||||||
    title:              String,
 | 
					    title:              String,
 | 
				
			||||||
    id:                 String,
 | 
					    id:                 String,
 | 
				
			||||||
    author:             String,
 | 
					    author:             String,
 | 
				
			||||||
@ -17,7 +17,7 @@ struct SearchVideo
 | 
				
			|||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct SearchPlaylistVideo
 | 
					struct SearchPlaylistVideo
 | 
				
			||||||
  add_mapping({
 | 
					  db_mapping({
 | 
				
			||||||
    title:          String,
 | 
					    title:          String,
 | 
				
			||||||
    id:             String,
 | 
					    id:             String,
 | 
				
			||||||
    length_seconds: Int32,
 | 
					    length_seconds: Int32,
 | 
				
			||||||
@ -25,7 +25,7 @@ struct SearchPlaylistVideo
 | 
				
			|||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct SearchPlaylist
 | 
					struct SearchPlaylist
 | 
				
			||||||
  add_mapping({
 | 
					  db_mapping({
 | 
				
			||||||
    title:        String,
 | 
					    title:        String,
 | 
				
			||||||
    id:           String,
 | 
					    id:           String,
 | 
				
			||||||
    author:       String,
 | 
					    author:       String,
 | 
				
			||||||
@ -37,7 +37,7 @@ struct SearchPlaylist
 | 
				
			|||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct SearchChannel
 | 
					struct SearchChannel
 | 
				
			||||||
  add_mapping({
 | 
					  db_mapping({
 | 
				
			||||||
    author:           String,
 | 
					    author:           String,
 | 
				
			||||||
    ucid:             String,
 | 
					    ucid:             String,
 | 
				
			||||||
    author_thumbnail: String,
 | 
					    author_thumbnail: String,
 | 
				
			||||||
@ -53,12 +53,18 @@ alias SearchItem = SearchVideo | SearchChannel | SearchPlaylist
 | 
				
			|||||||
def channel_search(query, page, channel)
 | 
					def channel_search(query, page, channel)
 | 
				
			||||||
  client = make_client(YT_URL)
 | 
					  client = make_client(YT_URL)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  response = client.get("/user/#{channel}?disable_polymer=1&hl=en&gl=US")
 | 
					  response = client.get("/channel/#{channel}?disable_polymer=1&hl=en&gl=US")
 | 
				
			||||||
  document = XML.parse_html(response.body)
 | 
					  document = XML.parse_html(response.body)
 | 
				
			||||||
  canonical = document.xpath_node(%q(//link[@rel="canonical"]))
 | 
					  canonical = document.xpath_node(%q(//link[@rel="canonical"]))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if !canonical
 | 
					  if !canonical
 | 
				
			||||||
    response = client.get("/channel/#{channel}?disable_polymer=1&hl=en&gl=US")
 | 
					    response = client.get("/c/#{channel}?disable_polymer=1&hl=en&gl=US")
 | 
				
			||||||
 | 
					    document = XML.parse_html(response.body)
 | 
				
			||||||
 | 
					    canonical = document.xpath_node(%q(//link[@rel="canonical"]))
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if !canonical
 | 
				
			||||||
 | 
					    response = client.get("/user/#{channel}?disable_polymer=1&hl=en&gl=US")
 | 
				
			||||||
    document = XML.parse_html(response.body)
 | 
					    document = XML.parse_html(response.body)
 | 
				
			||||||
    canonical = document.xpath_node(%q(//link[@rel="canonical"]))
 | 
					    canonical = document.xpath_node(%q(//link[@rel="canonical"]))
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
				
			|||||||
@ -7,6 +7,8 @@ def fetch_trending(trending_type, proxies, region, locale)
 | 
				
			|||||||
  region = region.upcase
 | 
					  region = region.upcase
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  trending = ""
 | 
					  trending = ""
 | 
				
			||||||
 | 
					  plid = nil
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if trending_type && trending_type != "Default"
 | 
					  if trending_type && trending_type != "Default"
 | 
				
			||||||
    trending_type = trending_type.downcase.capitalize
 | 
					    trending_type = trending_type.downcase.capitalize
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -23,9 +25,11 @@ def fetch_trending(trending_type, proxies, region, locale)
 | 
				
			|||||||
    url = tabs.select { |tab| tab["channelListSubMenuAvatarRenderer"]["title"]["simpleText"] == trending_type }[0]?
 | 
					    url = tabs.select { |tab| tab["channelListSubMenuAvatarRenderer"]["title"]["simpleText"] == trending_type }[0]?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if url
 | 
					    if url
 | 
				
			||||||
 | 
					      url["channelListSubMenuAvatarRenderer"]["navigationEndpoint"]["commandMetadata"]["webCommandMetadata"]["url"]
 | 
				
			||||||
      url = url["channelListSubMenuAvatarRenderer"]["navigationEndpoint"]["commandMetadata"]["webCommandMetadata"]["url"].as_s
 | 
					      url = url["channelListSubMenuAvatarRenderer"]["navigationEndpoint"]["commandMetadata"]["webCommandMetadata"]["url"].as_s
 | 
				
			||||||
      url += "&disable_polymer=1&gl=#{region}&hl=en"
 | 
					      url += "&disable_polymer=1&gl=#{region}&hl=en"
 | 
				
			||||||
      trending = client.get(url).body
 | 
					      trending = client.get(url).body
 | 
				
			||||||
 | 
					      plid = extract_plid(url)
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      trending = client.get("/feed/trending?gl=#{region}&hl=en&disable_polymer=1").body
 | 
					      trending = client.get("/feed/trending?gl=#{region}&hl=en&disable_polymer=1").body
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
@ -37,5 +41,37 @@ def fetch_trending(trending_type, proxies, region, locale)
 | 
				
			|||||||
  nodeset = trending.xpath_nodes(%q(//ul/li[@class="expanded-shelf-content-item-wrapper"]))
 | 
					  nodeset = trending.xpath_nodes(%q(//ul/li[@class="expanded-shelf-content-item-wrapper"]))
 | 
				
			||||||
  trending = extract_videos(nodeset)
 | 
					  trending = extract_videos(nodeset)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return trending
 | 
					  return {trending, plid}
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def extract_plid(url)
 | 
				
			||||||
 | 
					  wrapper = HTTP::Params.parse(URI.parse(url).query.not_nil!)["bp"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  wrapper = URI.unescape(wrapper)
 | 
				
			||||||
 | 
					  wrapper = Base64.decode(wrapper)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # 0xe2 0x02 0x2e
 | 
				
			||||||
 | 
					  wrapper += 3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # 0x0a
 | 
				
			||||||
 | 
					  wrapper += 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # Looks like "/m/[a-z0-9]{5}", not sure what it does here
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  item_size = wrapper[0]
 | 
				
			||||||
 | 
					  wrapper += 1
 | 
				
			||||||
 | 
					  item = wrapper[0, item_size]
 | 
				
			||||||
 | 
					  wrapper += item.size
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # 0x12
 | 
				
			||||||
 | 
					  wrapper += 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  plid_size = wrapper[0]
 | 
				
			||||||
 | 
					  wrapper += 1
 | 
				
			||||||
 | 
					  plid = wrapper[0, plid_size]
 | 
				
			||||||
 | 
					  wrapper += plid.size
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  plid = String.new(plid)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  return plid
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
				
			|||||||
@ -11,7 +11,7 @@ struct User
 | 
				
			|||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  add_mapping({
 | 
					  db_mapping({
 | 
				
			||||||
    updated:       Time,
 | 
					    updated:       Time,
 | 
				
			||||||
    notifications: Array(String),
 | 
					    notifications: Array(String),
 | 
				
			||||||
    subscriptions: Array(String),
 | 
					    subscriptions: Array(String),
 | 
				
			||||||
@ -26,29 +26,6 @@ struct User
 | 
				
			|||||||
  })
 | 
					  })
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
DEFAULT_USER_PREFERENCES = Preferences.new(
 | 
					 | 
				
			||||||
  video_loop: false,
 | 
					 | 
				
			||||||
  autoplay: false,
 | 
					 | 
				
			||||||
  continue: false,
 | 
					 | 
				
			||||||
  local: false,
 | 
					 | 
				
			||||||
  listen: false,
 | 
					 | 
				
			||||||
  speed: 1.0_f32,
 | 
					 | 
				
			||||||
  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,
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
struct Preferences
 | 
					struct Preferences
 | 
				
			||||||
  module StringToArray
 | 
					  module StringToArray
 | 
				
			||||||
    def self.to_json(value : Array(String), json : JSON::Builder)
 | 
					    def self.to_json(value : Array(String), json : JSON::Builder)
 | 
				
			||||||
@ -63,37 +40,91 @@ struct Preferences
 | 
				
			|||||||
      begin
 | 
					      begin
 | 
				
			||||||
        result = [] of String
 | 
					        result = [] of String
 | 
				
			||||||
        value.read_array do
 | 
					        value.read_array do
 | 
				
			||||||
          result << value.read_string
 | 
					          result << HTML.escape(value.read_string)
 | 
				
			||||||
        end
 | 
					        end
 | 
				
			||||||
      rescue ex
 | 
					      rescue ex
 | 
				
			||||||
        result = [value.read_string, ""]
 | 
					        result = [HTML.escape(value.read_string), ""]
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      result
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def self.to_yaml(value : Array(String), yaml : YAML::Nodes::Builder)
 | 
				
			||||||
 | 
					      yaml.sequence do
 | 
				
			||||||
 | 
					        value.each do |element|
 | 
				
			||||||
 | 
					          yaml.scalar element
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def self.from_yaml(ctx : YAML::ParseContext, node : YAML::Nodes::Node) : Array(String)
 | 
				
			||||||
 | 
					      begin
 | 
				
			||||||
 | 
					        unless node.is_a?(YAML::Nodes::Sequence)
 | 
				
			||||||
 | 
					          node.raise "Expected sequence, not #{node.class}"
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        result = [] of String
 | 
				
			||||||
 | 
					        node.nodes.each do |item|
 | 
				
			||||||
 | 
					          unless item.is_a?(YAML::Nodes::Scalar)
 | 
				
			||||||
 | 
					            node.raise "Expected scalar, not #{item.class}"
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          result << HTML.escape(item.value)
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					      rescue ex
 | 
				
			||||||
 | 
					        if node.is_a?(YAML::Nodes::Scalar)
 | 
				
			||||||
 | 
					          result = [HTML.escape(node.value), ""]
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					          result = ["", ""]
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      result
 | 
					      result
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  module EscapeString
 | 
				
			||||||
 | 
					    def self.to_json(value : String, json : JSON::Builder)
 | 
				
			||||||
 | 
					      json.string value
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def self.from_json(value : JSON::PullParser) : String
 | 
				
			||||||
 | 
					      HTML.escape(value.read_string)
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def self.to_yaml(value : String, yaml : YAML::Nodes::Builder)
 | 
				
			||||||
 | 
					      yaml.scalar value
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def self.from_yaml(ctx : YAML::ParseContext, node : YAML::Nodes::Node) : String
 | 
				
			||||||
 | 
					      HTML.escape(node.value)
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  json_mapping({
 | 
					  json_mapping({
 | 
				
			||||||
    video_loop:         {type: Bool, default: DEFAULT_USER_PREFERENCES.video_loop},
 | 
					    annotations:            {type: Bool, default: CONFIG.default_user_preferences.annotations},
 | 
				
			||||||
    autoplay:           {type: Bool, default: DEFAULT_USER_PREFERENCES.autoplay},
 | 
					    annotations_subscribed: {type: Bool, default: CONFIG.default_user_preferences.annotations_subscribed},
 | 
				
			||||||
    continue:           {type: Bool, default: DEFAULT_USER_PREFERENCES.continue},
 | 
					    autoplay:               {type: Bool, default: CONFIG.default_user_preferences.autoplay},
 | 
				
			||||||
    local:              {type: Bool, default: DEFAULT_USER_PREFERENCES.local},
 | 
					    captions:               {type: Array(String), default: CONFIG.default_user_preferences.captions, converter: StringToArray},
 | 
				
			||||||
    listen:             {type: Bool, default: DEFAULT_USER_PREFERENCES.listen},
 | 
					    comments:               {type: Array(String), default: CONFIG.default_user_preferences.comments, converter: StringToArray},
 | 
				
			||||||
    speed:              {type: Float32, default: DEFAULT_USER_PREFERENCES.speed},
 | 
					    continue:               {type: Bool, default: CONFIG.default_user_preferences.continue},
 | 
				
			||||||
    quality:            {type: String, default: DEFAULT_USER_PREFERENCES.quality},
 | 
					    continue_autoplay:      {type: Bool, default: CONFIG.default_user_preferences.continue_autoplay},
 | 
				
			||||||
    volume:             {type: Int32, default: DEFAULT_USER_PREFERENCES.volume},
 | 
					    dark_mode:              {type: Bool, default: CONFIG.default_user_preferences.dark_mode},
 | 
				
			||||||
    comments:           {type: Array(String), default: DEFAULT_USER_PREFERENCES.comments, converter: StringToArray},
 | 
					    latest_only:            {type: Bool, default: CONFIG.default_user_preferences.latest_only},
 | 
				
			||||||
    captions:           {type: Array(String), default: DEFAULT_USER_PREFERENCES.captions, converter: StringToArray},
 | 
					    listen:                 {type: Bool, default: CONFIG.default_user_preferences.listen},
 | 
				
			||||||
    redirect_feed:      {type: Bool, default: DEFAULT_USER_PREFERENCES.redirect_feed},
 | 
					    local:                  {type: Bool, default: CONFIG.default_user_preferences.local},
 | 
				
			||||||
    related_videos:     {type: Bool, default: DEFAULT_USER_PREFERENCES.related_videos},
 | 
					    locale:                 {type: String, default: CONFIG.default_user_preferences.locale, converter: EscapeString},
 | 
				
			||||||
    dark_mode:          {type: Bool, default: DEFAULT_USER_PREFERENCES.dark_mode},
 | 
					    max_results:            {type: Int32, default: CONFIG.default_user_preferences.max_results},
 | 
				
			||||||
    thin_mode:          {type: Bool, default: DEFAULT_USER_PREFERENCES.thin_mode},
 | 
					    notifications_only:     {type: Bool, default: CONFIG.default_user_preferences.notifications_only},
 | 
				
			||||||
    max_results:        {type: Int32, default: DEFAULT_USER_PREFERENCES.max_results},
 | 
					    quality:                {type: String, default: CONFIG.default_user_preferences.quality, converter: EscapeString},
 | 
				
			||||||
    sort:               {type: String, default: DEFAULT_USER_PREFERENCES.sort},
 | 
					    redirect_feed:          {type: Bool, default: CONFIG.default_user_preferences.redirect_feed},
 | 
				
			||||||
    latest_only:        {type: Bool, default: DEFAULT_USER_PREFERENCES.latest_only},
 | 
					    related_videos:         {type: Bool, default: CONFIG.default_user_preferences.related_videos},
 | 
				
			||||||
    unseen_only:        {type: Bool, default: DEFAULT_USER_PREFERENCES.unseen_only},
 | 
					    sort:                   {type: String, default: CONFIG.default_user_preferences.sort, converter: EscapeString},
 | 
				
			||||||
    notifications_only: {type: Bool, default: DEFAULT_USER_PREFERENCES.notifications_only},
 | 
					    speed:                  {type: Float32, default: CONFIG.default_user_preferences.speed},
 | 
				
			||||||
    locale:             {type: String, default: DEFAULT_USER_PREFERENCES.locale},
 | 
					    thin_mode:              {type: Bool, default: CONFIG.default_user_preferences.thin_mode},
 | 
				
			||||||
 | 
					    unseen_only:            {type: Bool, default: CONFIG.default_user_preferences.unseen_only},
 | 
				
			||||||
 | 
					    video_loop:             {type: Bool, default: CONFIG.default_user_preferences.video_loop},
 | 
				
			||||||
 | 
					    volume:                 {type: Int32, default: CONFIG.default_user_preferences.volume},
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -115,7 +146,7 @@ def get_user(sid, headers, db, refresh = true)
 | 
				
			|||||||
      ON CONFLICT (id) DO NOTHING", sid, user.email, Time.now)
 | 
					      ON CONFLICT (id) DO NOTHING", sid, user.email, Time.now)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      begin
 | 
					      begin
 | 
				
			||||||
        view_name = "subscriptions_#{sha256(user.email)[0..7]}"
 | 
					        view_name = "subscriptions_#{sha256(user.email)}"
 | 
				
			||||||
        db.exec("CREATE MATERIALIZED VIEW #{view_name} AS \
 | 
					        db.exec("CREATE MATERIALIZED VIEW #{view_name} AS \
 | 
				
			||||||
        SELECT * FROM channel_videos WHERE \
 | 
					        SELECT * FROM channel_videos WHERE \
 | 
				
			||||||
        ucid = ANY ((SELECT subscriptions FROM users WHERE email = E'#{user.email.gsub("'", "\\'")}')::text[]) \
 | 
					        ucid = ANY ((SELECT subscriptions FROM users WHERE email = E'#{user.email.gsub("'", "\\'")}')::text[]) \
 | 
				
			||||||
@ -137,7 +168,7 @@ def get_user(sid, headers, db, refresh = true)
 | 
				
			|||||||
    ON CONFLICT (id) DO NOTHING", sid, user.email, Time.now)
 | 
					    ON CONFLICT (id) DO NOTHING", sid, user.email, Time.now)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    begin
 | 
					    begin
 | 
				
			||||||
      view_name = "subscriptions_#{sha256(user.email)[0..7]}"
 | 
					      view_name = "subscriptions_#{sha256(user.email)}"
 | 
				
			||||||
      db.exec("CREATE MATERIALIZED VIEW #{view_name} AS \
 | 
					      db.exec("CREATE MATERIALIZED VIEW #{view_name} AS \
 | 
				
			||||||
      SELECT * FROM channel_videos WHERE \
 | 
					      SELECT * FROM channel_videos WHERE \
 | 
				
			||||||
      ucid = ANY ((SELECT subscriptions FROM users WHERE email = E'#{user.email.gsub("'", "\\'")}')::text[]) \
 | 
					      ucid = ANY ((SELECT subscriptions FROM users WHERE email = E'#{user.email.gsub("'", "\\'")}')::text[]) \
 | 
				
			||||||
@ -174,7 +205,7 @@ def fetch_user(sid, headers, db)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  token = Base64.urlsafe_encode(Random::Secure.random_bytes(32))
 | 
					  token = Base64.urlsafe_encode(Random::Secure.random_bytes(32))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  user = User.new(Time.now, [] of String, channels, email, DEFAULT_USER_PREFERENCES, nil, token, [] of String)
 | 
					  user = User.new(Time.now, [] of String, channels, email, CONFIG.default_user_preferences, nil, token, [] of String)
 | 
				
			||||||
  return user, sid
 | 
					  return user, sid
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -182,74 +213,11 @@ def create_user(sid, email, password)
 | 
				
			|||||||
  password = Crypto::Bcrypt::Password.create(password, cost: 10)
 | 
					  password = Crypto::Bcrypt::Password.create(password, cost: 10)
 | 
				
			||||||
  token = Base64.urlsafe_encode(Random::Secure.random_bytes(32))
 | 
					  token = Base64.urlsafe_encode(Random::Secure.random_bytes(32))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  user = User.new(Time.now, [] of String, [] of String, email, DEFAULT_USER_PREFERENCES, password.to_s, token, [] of String)
 | 
					  user = User.new(Time.now, [] of String, [] of String, email, CONFIG.default_user_preferences, password.to_s, token, [] of String)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return user, sid
 | 
					  return user, sid
 | 
				
			||||||
end
 | 
					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, key, challenge)
 | 
					 | 
				
			||||||
  challenge = Base64.urlsafe_encode(challenge)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  if nonce = db.query_one?("SELECT * FROM nonces WHERE nonce = $1", nonce, as: {String, Time})
 | 
					 | 
				
			||||||
    if nonce[1] > Time.now
 | 
					 | 
				
			||||||
      db.exec("UPDATE nonces SET expire = $1 WHERE nonce = $2", Time.new(1990, 1, 1), nonce[0])
 | 
					 | 
				
			||||||
    else
 | 
					 | 
				
			||||||
      raise translate(locale, "Invalid token")
 | 
					 | 
				
			||||||
    end
 | 
					 | 
				
			||||||
  else
 | 
					 | 
				
			||||||
    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 token")
 | 
					 | 
				
			||||||
  end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  if expire < Time.now.to_unix
 | 
					 | 
				
			||||||
    raise translate(locale, "Token is expired, please try again")
 | 
					 | 
				
			||||||
  end
 | 
					 | 
				
			||||||
end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
def generate_captcha(key, db)
 | 
					def generate_captcha(key, db)
 | 
				
			||||||
  second = Random::Secure.rand(12)
 | 
					  second = Random::Secure.rand(12)
 | 
				
			||||||
  second_angle = second * 30
 | 
					  second_angle = second * 30
 | 
				
			||||||
@ -302,16 +270,16 @@ def generate_captcha(key, db)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  return {
 | 
					  return {
 | 
				
			||||||
    question: image,
 | 
					    question: image,
 | 
				
			||||||
    tokens:   [create_response(answer, "sign_in", key, db)],
 | 
					    tokens:   {generate_response(answer, {":login"}, key, db, use_nonce: true)},
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def generate_text_captcha(key, db)
 | 
					def generate_text_captcha(key, db)
 | 
				
			||||||
  response = HTTP::Client.get(TEXTCAPTCHA_URL).body
 | 
					  response = make_client(TEXTCAPTCHA_URL).get("/omarroth@protonmail.com.json").body
 | 
				
			||||||
  response = JSON.parse(response)
 | 
					  response = JSON.parse(response)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  tokens = response["a"].as_a.map do |answer|
 | 
					  tokens = response["a"].as_a.map do |answer|
 | 
				
			||||||
    create_response(answer.as_s, "sign_in", key, db)
 | 
					    generate_response(answer.as_s, {":login"}, key, db, use_nonce: true)
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return {
 | 
					  return {
 | 
				
			||||||
@ -319,3 +287,36 @@ def generate_text_captcha(key, db)
 | 
				
			|||||||
    tokens:   tokens,
 | 
					    tokens:   tokens,
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def subscribe_ajax(channel_id, action, env_headers)
 | 
				
			||||||
 | 
					  headers = HTTP::Headers.new
 | 
				
			||||||
 | 
					  headers["Cookie"] = env_headers["Cookie"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  client = make_client(YT_URL)
 | 
				
			||||||
 | 
					  html = client.get("/subscription_manager?disable_polymer=1", headers)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  cookies = HTTP::Cookies.from_headers(headers)
 | 
				
			||||||
 | 
					  html.cookies.each do |cookie|
 | 
				
			||||||
 | 
					    if {"VISITOR_INFO1_LIVE", "YSC", "SIDCC"}.includes? cookie.name
 | 
				
			||||||
 | 
					      if cookies[cookie.name]?
 | 
				
			||||||
 | 
					        cookies[cookie.name] = cookie
 | 
				
			||||||
 | 
					      else
 | 
				
			||||||
 | 
					        cookies << cookie
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					  headers = cookies.add_request_headers(headers)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if match = html.body.match(/'XSRF_TOKEN': "(?<session_token>[A-Za-z0-9\_\-\=]+)"/)
 | 
				
			||||||
 | 
					    session_token = match["session_token"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    headers["content-type"] = "application/x-www-form-urlencoded"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    post_req = {
 | 
				
			||||||
 | 
					      "session_token" => session_token,
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    post_url = "/subscription_ajax?#{action}=1&c=#{channel_id}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    client.post(post_url, headers, form: post_req)
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
				
			|||||||
@ -67,7 +67,7 @@ CAPTION_LANGUAGES = {
 | 
				
			|||||||
  "Marathi",
 | 
					  "Marathi",
 | 
				
			||||||
  "Mongolian",
 | 
					  "Mongolian",
 | 
				
			||||||
  "Nepali",
 | 
					  "Nepali",
 | 
				
			||||||
  "Norwegian",
 | 
					  "Norwegian Bokmål",
 | 
				
			||||||
  "Nyanja",
 | 
					  "Nyanja",
 | 
				
			||||||
  "Pashto",
 | 
					  "Pashto",
 | 
				
			||||||
  "Persian",
 | 
					  "Persian",
 | 
				
			||||||
@ -241,6 +241,29 @@ VIDEO_FORMATS = {
 | 
				
			|||||||
  "251" => {"ext" => "webm", "format" => "DASH audio", "acodec" => "opus", "abr" => 160},
 | 
					  "251" => {"ext" => "webm", "format" => "DASH audio", "acodec" => "opus", "abr" => 160},
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct VideoPreferences
 | 
				
			||||||
 | 
					  json_mapping({
 | 
				
			||||||
 | 
					    annotations:        Bool,
 | 
				
			||||||
 | 
					    autoplay:           Bool,
 | 
				
			||||||
 | 
					    comments:           Array(String),
 | 
				
			||||||
 | 
					    continue:           Bool,
 | 
				
			||||||
 | 
					    continue_autoplay:  Bool,
 | 
				
			||||||
 | 
					    controls:           Bool,
 | 
				
			||||||
 | 
					    listen:             Bool,
 | 
				
			||||||
 | 
					    local:              Bool,
 | 
				
			||||||
 | 
					    preferred_captions: Array(String),
 | 
				
			||||||
 | 
					    quality:            String,
 | 
				
			||||||
 | 
					    raw:                Bool,
 | 
				
			||||||
 | 
					    region:             String?,
 | 
				
			||||||
 | 
					    related_videos:     Bool,
 | 
				
			||||||
 | 
					    speed:              (Float32 | Float64),
 | 
				
			||||||
 | 
					    video_end:          (Float64 | Int32),
 | 
				
			||||||
 | 
					    video_loop:         Bool,
 | 
				
			||||||
 | 
					    video_start:        (Float64 | Int32),
 | 
				
			||||||
 | 
					    volume:             Int32,
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct Video
 | 
					struct Video
 | 
				
			||||||
  property player_json : JSON::Any?
 | 
					  property player_json : JSON::Any?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -250,6 +273,190 @@ struct Video
 | 
				
			|||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  def to_json(locale, config, kemal_config, decrypt_function)
 | 
				
			||||||
 | 
					    JSON.build do |json|
 | 
				
			||||||
 | 
					      json.object do
 | 
				
			||||||
 | 
					        json.field "title", self.title
 | 
				
			||||||
 | 
					        json.field "videoId", self.id
 | 
				
			||||||
 | 
					        json.field "videoThumbnails" do
 | 
				
			||||||
 | 
					          generate_thumbnails(json, self.id, config, kemal_config)
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					        json.field "storyboards" do
 | 
				
			||||||
 | 
					          generate_storyboards(json, self.id, self.storyboards, config, kemal_config)
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        description_html, description = html_to_content(self.description)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        json.field "description", description
 | 
				
			||||||
 | 
					        json.field "descriptionHtml", description_html
 | 
				
			||||||
 | 
					        json.field "published", self.published.to_unix
 | 
				
			||||||
 | 
					        json.field "publishedText", translate(locale, "`x` ago", recode_date(self.published, locale))
 | 
				
			||||||
 | 
					        json.field "keywords", self.keywords
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        json.field "viewCount", self.views
 | 
				
			||||||
 | 
					        json.field "likeCount", self.likes
 | 
				
			||||||
 | 
					        json.field "dislikeCount", self.dislikes
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        json.field "paid", self.paid
 | 
				
			||||||
 | 
					        json.field "premium", self.premium
 | 
				
			||||||
 | 
					        json.field "isFamilyFriendly", self.is_family_friendly
 | 
				
			||||||
 | 
					        json.field "allowedRegions", self.allowed_regions
 | 
				
			||||||
 | 
					        json.field "genre", self.genre
 | 
				
			||||||
 | 
					        json.field "genreUrl", self.genre_url
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        json.field "author", self.author
 | 
				
			||||||
 | 
					        json.field "authorId", self.ucid
 | 
				
			||||||
 | 
					        json.field "authorUrl", "/channel/#{self.ucid}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        json.field "authorThumbnails" do
 | 
				
			||||||
 | 
					          json.array do
 | 
				
			||||||
 | 
					            qualities = {32, 48, 76, 100, 176, 512}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            qualities.each do |quality|
 | 
				
			||||||
 | 
					              json.object do
 | 
				
			||||||
 | 
					                json.field "url", self.author_thumbnail.gsub("=s48-", "=s#{quality}-")
 | 
				
			||||||
 | 
					                json.field "width", quality
 | 
				
			||||||
 | 
					                json.field "height", quality
 | 
				
			||||||
 | 
					              end
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        json.field "subCountText", self.sub_count_text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        json.field "lengthSeconds", self.info["length_seconds"].to_i
 | 
				
			||||||
 | 
					        json.field "allowRatings", self.allow_ratings
 | 
				
			||||||
 | 
					        json.field "rating", self.info["avg_rating"].to_f32
 | 
				
			||||||
 | 
					        json.field "isListed", self.is_listed
 | 
				
			||||||
 | 
					        json.field "liveNow", self.live_now
 | 
				
			||||||
 | 
					        json.field "isUpcoming", self.is_upcoming
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if self.premiere_timestamp
 | 
				
			||||||
 | 
					          json.field "premiereTimestamp", self.premiere_timestamp.not_nil!.to_unix
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if self.player_response["streamingData"]?.try &.["hlsManifestUrl"]?
 | 
				
			||||||
 | 
					          host_url = make_host_url(config, kemal_config)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          hlsvp = self.player_response["streamingData"]["hlsManifestUrl"].as_s
 | 
				
			||||||
 | 
					          hlsvp = hlsvp.gsub("https://manifest.googlevideo.com", host_url)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          json.field "hlsUrl", hlsvp
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        json.field "dashUrl", "#{make_host_url(config, kemal_config)}/api/manifest/dash/id/#{id}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        json.field "adaptiveFormats" do
 | 
				
			||||||
 | 
					          json.array do
 | 
				
			||||||
 | 
					            self.adaptive_fmts(decrypt_function).each do |fmt|
 | 
				
			||||||
 | 
					              json.object do
 | 
				
			||||||
 | 
					                json.field "index", fmt["index"]
 | 
				
			||||||
 | 
					                json.field "bitrate", fmt["bitrate"]
 | 
				
			||||||
 | 
					                json.field "init", fmt["init"]
 | 
				
			||||||
 | 
					                json.field "url", fmt["url"]
 | 
				
			||||||
 | 
					                json.field "itag", fmt["itag"]
 | 
				
			||||||
 | 
					                json.field "type", fmt["type"]
 | 
				
			||||||
 | 
					                json.field "clen", fmt["clen"]
 | 
				
			||||||
 | 
					                json.field "lmt", fmt["lmt"]
 | 
				
			||||||
 | 
					                json.field "projectionType", fmt["projection_type"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                fmt_info = itag_to_metadata?(fmt["itag"])
 | 
				
			||||||
 | 
					                if fmt_info
 | 
				
			||||||
 | 
					                  fps = fmt_info["fps"]?.try &.to_i || fmt["fps"]?.try &.to_i || 30
 | 
				
			||||||
 | 
					                  json.field "fps", fps
 | 
				
			||||||
 | 
					                  json.field "container", fmt_info["ext"]
 | 
				
			||||||
 | 
					                  json.field "encoding", fmt_info["vcodec"]? || fmt_info["acodec"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                  if fmt_info["height"]?
 | 
				
			||||||
 | 
					                    json.field "resolution", "#{fmt_info["height"]}p"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    quality_label = "#{fmt_info["height"]}p"
 | 
				
			||||||
 | 
					                    if fps > 30
 | 
				
			||||||
 | 
					                      quality_label += "60"
 | 
				
			||||||
 | 
					                    end
 | 
				
			||||||
 | 
					                    json.field "qualityLabel", quality_label
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    if fmt_info["width"]?
 | 
				
			||||||
 | 
					                      json.field "size", "#{fmt_info["width"]}x#{fmt_info["height"]}"
 | 
				
			||||||
 | 
					                    end
 | 
				
			||||||
 | 
					                  end
 | 
				
			||||||
 | 
					                end
 | 
				
			||||||
 | 
					              end
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        json.field "formatStreams" do
 | 
				
			||||||
 | 
					          json.array do
 | 
				
			||||||
 | 
					            self.fmt_stream(decrypt_function).each do |fmt|
 | 
				
			||||||
 | 
					              json.object do
 | 
				
			||||||
 | 
					                json.field "url", fmt["url"]
 | 
				
			||||||
 | 
					                json.field "itag", fmt["itag"]
 | 
				
			||||||
 | 
					                json.field "type", fmt["type"]
 | 
				
			||||||
 | 
					                json.field "quality", fmt["quality"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                fmt_info = itag_to_metadata?(fmt["itag"])
 | 
				
			||||||
 | 
					                if fmt_info
 | 
				
			||||||
 | 
					                  fps = fmt_info["fps"]?.try &.to_i || fmt["fps"]?.try &.to_i || 30
 | 
				
			||||||
 | 
					                  json.field "fps", fps
 | 
				
			||||||
 | 
					                  json.field "container", fmt_info["ext"]
 | 
				
			||||||
 | 
					                  json.field "encoding", fmt_info["vcodec"]? || fmt_info["acodec"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                  if fmt_info["height"]?
 | 
				
			||||||
 | 
					                    json.field "resolution", "#{fmt_info["height"]}p"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    quality_label = "#{fmt_info["height"]}p"
 | 
				
			||||||
 | 
					                    if fps > 30
 | 
				
			||||||
 | 
					                      quality_label += "60"
 | 
				
			||||||
 | 
					                    end
 | 
				
			||||||
 | 
					                    json.field "qualityLabel", quality_label
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    if fmt_info["width"]?
 | 
				
			||||||
 | 
					                      json.field "size", "#{fmt_info["width"]}x#{fmt_info["height"]}"
 | 
				
			||||||
 | 
					                    end
 | 
				
			||||||
 | 
					                  end
 | 
				
			||||||
 | 
					                end
 | 
				
			||||||
 | 
					              end
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        json.field "captions" do
 | 
				
			||||||
 | 
					          json.array do
 | 
				
			||||||
 | 
					            self.captions.each do |caption|
 | 
				
			||||||
 | 
					              json.object do
 | 
				
			||||||
 | 
					                json.field "label", caption.name.simpleText
 | 
				
			||||||
 | 
					                json.field "languageCode", caption.languageCode
 | 
				
			||||||
 | 
					                json.field "url", "/api/v1/captions/#{id}?label=#{URI.escape(caption.name.simpleText)}"
 | 
				
			||||||
 | 
					              end
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        json.field "recommendedVideos" do
 | 
				
			||||||
 | 
					          json.array do
 | 
				
			||||||
 | 
					            self.info["rvs"]?.try &.split(",").each do |rv|
 | 
				
			||||||
 | 
					              rv = HTTP::Params.parse(rv)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              if rv["id"]?
 | 
				
			||||||
 | 
					                json.object do
 | 
				
			||||||
 | 
					                  json.field "videoId", rv["id"]
 | 
				
			||||||
 | 
					                  json.field "title", rv["title"]
 | 
				
			||||||
 | 
					                  json.field "videoThumbnails" do
 | 
				
			||||||
 | 
					                    generate_thumbnails(json, rv["id"], config, kemal_config)
 | 
				
			||||||
 | 
					                  end
 | 
				
			||||||
 | 
					                  json.field "author", rv["author"]
 | 
				
			||||||
 | 
					                  json.field "lengthSeconds", rv["length_seconds"].to_i
 | 
				
			||||||
 | 
					                  json.field "viewCountText", rv["short_view_count_text"]
 | 
				
			||||||
 | 
					                end
 | 
				
			||||||
 | 
					              end
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def allow_ratings
 | 
					  def allow_ratings
 | 
				
			||||||
    allow_ratings = player_response["videoDetails"]?.try &.["allowRatings"]?.try &.as_bool
 | 
					    allow_ratings = player_response["videoDetails"]?.try &.["allowRatings"]?.try &.as_bool
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -473,6 +680,78 @@ struct Video
 | 
				
			|||||||
    return @player_json.not_nil!
 | 
					    return @player_json.not_nil!
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  def storyboards
 | 
				
			||||||
 | 
					    storyboards = self.player_response["storyboards"]?
 | 
				
			||||||
 | 
					      .try &.as_h
 | 
				
			||||||
 | 
					        .try &.["playerStoryboardSpecRenderer"]?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if !storyboards
 | 
				
			||||||
 | 
					      storyboards = self.player_response["storyboards"]?
 | 
				
			||||||
 | 
					        .try &.as_h
 | 
				
			||||||
 | 
					          .try &.["playerLiveStoryboardSpecRenderer"]?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      if storyboard = storyboards.try &.["spec"]?
 | 
				
			||||||
 | 
					           .try &.as_s
 | 
				
			||||||
 | 
					        return [{
 | 
				
			||||||
 | 
					          url:               storyboard.split("#")[0],
 | 
				
			||||||
 | 
					          width:             106,
 | 
				
			||||||
 | 
					          height:            60,
 | 
				
			||||||
 | 
					          count:             -1,
 | 
				
			||||||
 | 
					          interval:          5000,
 | 
				
			||||||
 | 
					          storyboard_width:  3,
 | 
				
			||||||
 | 
					          storyboard_height: 3,
 | 
				
			||||||
 | 
					          storyboard_count:  -1,
 | 
				
			||||||
 | 
					        }]
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    storyboards = storyboards.try &.["spec"]?
 | 
				
			||||||
 | 
					      .try &.as_s.split("|")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    items = [] of NamedTuple(
 | 
				
			||||||
 | 
					      url: String,
 | 
				
			||||||
 | 
					      width: Int32,
 | 
				
			||||||
 | 
					      height: Int32,
 | 
				
			||||||
 | 
					      count: Int32,
 | 
				
			||||||
 | 
					      interval: Int32,
 | 
				
			||||||
 | 
					      storyboard_width: Int32,
 | 
				
			||||||
 | 
					      storyboard_height: Int32,
 | 
				
			||||||
 | 
					      storyboard_count: Int32)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if !storyboards
 | 
				
			||||||
 | 
					      return items
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    url = URI.parse(storyboards.shift)
 | 
				
			||||||
 | 
					    params = HTTP::Params.parse(url.query || "")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    storyboards.each_with_index do |storyboard, i|
 | 
				
			||||||
 | 
					      width, height, count, storyboard_width, storyboard_height, interval, _, sigh = storyboard.split("#")
 | 
				
			||||||
 | 
					      params["sigh"] = sigh
 | 
				
			||||||
 | 
					      url.query = params.to_s
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      width = width.to_i
 | 
				
			||||||
 | 
					      height = height.to_i
 | 
				
			||||||
 | 
					      count = count.to_i
 | 
				
			||||||
 | 
					      interval = interval.to_i
 | 
				
			||||||
 | 
					      storyboard_width = storyboard_width.to_i
 | 
				
			||||||
 | 
					      storyboard_height = storyboard_height.to_i
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      items << {
 | 
				
			||||||
 | 
					        url:               url.to_s.sub("$L", i).sub("$N", "M$M"),
 | 
				
			||||||
 | 
					        width:             width,
 | 
				
			||||||
 | 
					        height:            height,
 | 
				
			||||||
 | 
					        count:             count,
 | 
				
			||||||
 | 
					        interval:          interval,
 | 
				
			||||||
 | 
					        storyboard_width:  storyboard_width,
 | 
				
			||||||
 | 
					        storyboard_height: storyboard_height,
 | 
				
			||||||
 | 
					        storyboard_count:  (count.to_f / (storyboard_width.to_f * storyboard_height.to_f)).ceil.to_i,
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    items
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def paid
 | 
					  def paid
 | 
				
			||||||
    reason = self.player_response["playabilityStatus"]?.try &.["reason"]?
 | 
					    reason = self.player_response["playabilityStatus"]?.try &.["reason"]?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -521,7 +800,7 @@ struct Video
 | 
				
			|||||||
    return self.info["length_seconds"].to_i
 | 
					    return self.info["length_seconds"].to_i
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  add_mapping({
 | 
					  db_mapping({
 | 
				
			||||||
    id:   String,
 | 
					    id:   String,
 | 
				
			||||||
    info: {
 | 
					    info: {
 | 
				
			||||||
      type:      HTTP::Params,
 | 
					      type:      HTTP::Params,
 | 
				
			||||||
@ -550,28 +829,28 @@ struct Video
 | 
				
			|||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct Caption
 | 
					struct Caption
 | 
				
			||||||
  JSON.mapping(
 | 
					  json_mapping({
 | 
				
			||||||
    name:         CaptionName,
 | 
					    name:         CaptionName,
 | 
				
			||||||
    baseUrl:      String,
 | 
					    baseUrl:      String,
 | 
				
			||||||
    languageCode: String
 | 
					    languageCode: String,
 | 
				
			||||||
  )
 | 
					  })
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct CaptionName
 | 
					struct CaptionName
 | 
				
			||||||
  JSON.mapping(
 | 
					  json_mapping({
 | 
				
			||||||
    simpleText: String,
 | 
					    simpleText: String,
 | 
				
			||||||
  )
 | 
					  })
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class VideoRedirect < Exception
 | 
					class VideoRedirect < Exception
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def get_video(id, db, proxies = {} of String => Array({ip: String, port: Int32}), refresh = true, region = nil)
 | 
					def get_video(id, db, proxies = {} of String => Array({ip: String, port: Int32}), refresh = true, region = nil, force_refresh = false)
 | 
				
			||||||
  if db.query_one?("SELECT EXISTS (SELECT true FROM videos WHERE id = $1)", id, as: Bool) && !region
 | 
					  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)
 | 
					    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 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
 | 
					    if (refresh && Time.now - video.updated > 10.minutes) || force_refresh
 | 
				
			||||||
      begin
 | 
					      begin
 | 
				
			||||||
        video = fetch_video(id, proxies, region: region)
 | 
					        video = fetch_video(id, proxies, region: region)
 | 
				
			||||||
        video_array = video.to_a
 | 
					        video_array = video.to_a
 | 
				
			||||||
@ -601,6 +880,168 @@ def get_video(id, db, proxies = {} of String => Array({ip: String, port: Int32})
 | 
				
			|||||||
  return video
 | 
					  return video
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def extract_polymer_config(body, html)
 | 
				
			||||||
 | 
					  params = HTTP::Params.new
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  params["session_token"] = body.match(/"XSRF_TOKEN":"(?<session_token>[A-Za-z0-9\_\-\=]+)"/).try &.["session_token"] || ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  html_info = JSON.parse(body.match(/ytplayer\.config = (?<info>.*?);ytplayer\.load/).try &.["info"] || "{}").try &.["args"]?.try &.as_h
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if html_info
 | 
				
			||||||
 | 
					    html_info.each do |key, value|
 | 
				
			||||||
 | 
					      params[key] = value.to_s
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  initial_data = JSON.parse(body.match(/window\["ytInitialData"\] = (?<info>.*?);\n/).try &.["info"] || "{}")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  primary_results = initial_data["contents"]?
 | 
				
			||||||
 | 
					    .try &.["twoColumnWatchNextResults"]?
 | 
				
			||||||
 | 
					      .try &.["results"]?
 | 
				
			||||||
 | 
					        .try &.["results"]?
 | 
				
			||||||
 | 
					          .try &.["contents"]?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  comment_continuation = primary_results.try &.as_a.select { |object| object["itemSectionRenderer"]? }[0]?
 | 
				
			||||||
 | 
					    .try &.["itemSectionRenderer"]?
 | 
				
			||||||
 | 
					      .try &.["continuations"]?
 | 
				
			||||||
 | 
					        .try &.[0]?
 | 
				
			||||||
 | 
					          .try &.["nextContinuationData"]?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  params["ctoken"] = comment_continuation.try &.["continuation"]?.try &.as_s || ""
 | 
				
			||||||
 | 
					  params["itct"] = comment_continuation.try &.["clickTrackingParams"]?.try &.as_s || ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  recommended_videos = initial_data["contents"]?
 | 
				
			||||||
 | 
					    .try &.["twoColumnWatchNextResults"]?
 | 
				
			||||||
 | 
					      .try &.["secondaryResults"]?
 | 
				
			||||||
 | 
					        .try &.["secondaryResults"]?
 | 
				
			||||||
 | 
					          .try &.["results"]?
 | 
				
			||||||
 | 
					            .try &.as_a
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  rvs = [] of String
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  recommended_videos.try &.each do |compact_renderer|
 | 
				
			||||||
 | 
					    if compact_renderer["compactRadioRenderer"]? || compact_renderer["compactPlaylistRenderer"]?
 | 
				
			||||||
 | 
					      # TODO
 | 
				
			||||||
 | 
					    elsif compact_renderer["compactVideoRenderer"]?
 | 
				
			||||||
 | 
					      compact_renderer = compact_renderer["compactVideoRenderer"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      recommended_video = HTTP::Params.new
 | 
				
			||||||
 | 
					      recommended_video["id"] = compact_renderer["videoId"].as_s
 | 
				
			||||||
 | 
					      recommended_video["title"] = compact_renderer["title"]["simpleText"].as_s
 | 
				
			||||||
 | 
					      recommended_video["author"] = compact_renderer["shortBylineText"]["runs"].as_a[0]["text"].as_s
 | 
				
			||||||
 | 
					      recommended_video["ucid"] = compact_renderer["shortBylineText"]["runs"].as_a[0]["navigationEndpoint"]["browseEndpoint"]["browseId"].as_s
 | 
				
			||||||
 | 
					      recommended_video["author_thumbnail"] = compact_renderer["channelThumbnail"]["thumbnails"][0]["url"].as_s
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      recommended_video["short_view_count_text"] = compact_renderer["shortViewCountText"]["simpleText"].as_s
 | 
				
			||||||
 | 
					      recommended_video["view_count"] = compact_renderer["viewCountText"]?.try &.["simpleText"]?.try &.as_s.delete(", views watching").to_i64?.try &.to_s || "0"
 | 
				
			||||||
 | 
					      recommended_video["length_seconds"] = decode_length_seconds(compact_renderer["lengthText"]?.try &.["simpleText"]?.try &.as_s || "0:00").to_s
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      rvs << recommended_video.to_s
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					  params["rvs"] = rvs.join(",")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # TODO: Watching now
 | 
				
			||||||
 | 
					  params["views"] = primary_results.try &.as_a.select { |object| object["videoPrimaryInfoRenderer"]? }[0]?
 | 
				
			||||||
 | 
					    .try &.["videoPrimaryInfoRenderer"]?
 | 
				
			||||||
 | 
					      .try &.["viewCount"]?
 | 
				
			||||||
 | 
					        .try &.["videoViewCountRenderer"]?
 | 
				
			||||||
 | 
					          .try &.["viewCount"]?
 | 
				
			||||||
 | 
					            .try &.["simpleText"]?
 | 
				
			||||||
 | 
					              .try &.as_s.gsub(/\D/, "").to_i64.to_s || "0"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  sentiment_bar = primary_results.try &.as_a.select { |object| object["videoPrimaryInfoRenderer"]? }[0]?
 | 
				
			||||||
 | 
					    .try &.["videoPrimaryInfoRenderer"]?
 | 
				
			||||||
 | 
					      .try &.["sentimentBar"]?
 | 
				
			||||||
 | 
					        .try &.["sentimentBarRenderer"]?
 | 
				
			||||||
 | 
					          .try &.["tooltip"]?
 | 
				
			||||||
 | 
					            .try &.as_s
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  likes, dislikes = sentiment_bar.try &.split(" / ").map { |a| a.delete(", ").to_i32 }[0, 2] || {0, 0}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  params["likes"] = "#{likes}"
 | 
				
			||||||
 | 
					  params["dislikes"] = "#{dislikes}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  published = primary_results.try &.as_a.select { |object| object["videoSecondaryInfoRenderer"]? }[0]?
 | 
				
			||||||
 | 
					    .try &.["videoSecondaryInfoRenderer"]?
 | 
				
			||||||
 | 
					      .try &.["dateText"]?
 | 
				
			||||||
 | 
					        .try &.["simpleText"]?
 | 
				
			||||||
 | 
					          .try &.as_s.split(" ")[-3..-1].join(" ")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if published
 | 
				
			||||||
 | 
					    params["published"] = Time.parse(published, "%b %-d, %Y", Time::Location.local).to_unix.to_s
 | 
				
			||||||
 | 
					  else
 | 
				
			||||||
 | 
					    params["published"] = Time.new(1990, 1, 1).to_unix.to_s
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  params["description_html"] = "<p></p>"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  description_html = primary_results.try &.as_a.select { |object| object["videoSecondaryInfoRenderer"]? }[0]?
 | 
				
			||||||
 | 
					    .try &.["videoSecondaryInfoRenderer"]?
 | 
				
			||||||
 | 
					      .try &.["description"]?
 | 
				
			||||||
 | 
					        .try &.["runs"]?
 | 
				
			||||||
 | 
					          .try &.as_a
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if description_html
 | 
				
			||||||
 | 
					    params["description_html"] = content_to_comment_html(description_html)
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  metadata = primary_results.try &.as_a.select { |object| object["videoSecondaryInfoRenderer"]? }[0]?
 | 
				
			||||||
 | 
					    .try &.["videoSecondaryInfoRenderer"]?
 | 
				
			||||||
 | 
					      .try &.["metadataRowContainer"]?
 | 
				
			||||||
 | 
					        .try &.["metadataRowContainerRenderer"]?
 | 
				
			||||||
 | 
					          .try &.["rows"]?
 | 
				
			||||||
 | 
					            .try &.as_a
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  params["genre"] = ""
 | 
				
			||||||
 | 
					  params["genre_ucid"] = ""
 | 
				
			||||||
 | 
					  params["license"] = ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  metadata.try &.each do |row|
 | 
				
			||||||
 | 
					    title = row["metadataRowRenderer"]?.try &.["title"]?.try &.["simpleText"]?.try &.as_s
 | 
				
			||||||
 | 
					    contents = row["metadataRowRenderer"]?
 | 
				
			||||||
 | 
					      .try &.["contents"]?
 | 
				
			||||||
 | 
					        .try &.as_a[0]?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if title.try &.== "Category"
 | 
				
			||||||
 | 
					      contents = contents.try &.["runs"]?
 | 
				
			||||||
 | 
					        .try &.as_a[0]?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      params["genre"] = contents.try &.["text"]?
 | 
				
			||||||
 | 
					        .try &.as_s || ""
 | 
				
			||||||
 | 
					      params["genre_ucid"] = contents.try &.["navigationEndpoint"]?
 | 
				
			||||||
 | 
					        .try &.["browseEndpoint"]?
 | 
				
			||||||
 | 
					          .try &.["browseId"]?.try &.as_s || ""
 | 
				
			||||||
 | 
					    elsif title.try &.== "License"
 | 
				
			||||||
 | 
					      contents = contents.try &.["runs"]?
 | 
				
			||||||
 | 
					        .try &.as_a[0]?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      params["license"] = contents.try &.["text"]?
 | 
				
			||||||
 | 
					        .try &.as_s || ""
 | 
				
			||||||
 | 
					    elsif title.try &.== "Licensed to YouTube by"
 | 
				
			||||||
 | 
					      params["license"] = contents.try &.["simpleText"]?
 | 
				
			||||||
 | 
					        .try &.as_s || ""
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  author_info = primary_results.try &.as_a.select { |object| object["videoSecondaryInfoRenderer"]? }[0]?
 | 
				
			||||||
 | 
					    .try &.["videoSecondaryInfoRenderer"]?
 | 
				
			||||||
 | 
					      .try &.["owner"]?
 | 
				
			||||||
 | 
					        .try &.["videoOwnerRenderer"]?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  params["author_thumbnail"] = author_info.try &.["thumbnail"]?
 | 
				
			||||||
 | 
					    .try &.["thumbnails"]?
 | 
				
			||||||
 | 
					      .try &.as_a[0]?
 | 
				
			||||||
 | 
					        .try &.["url"]?
 | 
				
			||||||
 | 
					          .try &.as_s || ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  params["sub_count_text"] = author_info.try &.["subscriberCountText"]?
 | 
				
			||||||
 | 
					    .try &.["simpleText"]?
 | 
				
			||||||
 | 
					      .try &.as_s.gsub(/\D/, "") || "0"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  return params
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def extract_player_config(body, html)
 | 
					def extract_player_config(body, html)
 | 
				
			||||||
  params = HTTP::Params.new
 | 
					  params = HTTP::Params.new
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -608,14 +1049,6 @@ def extract_player_config(body, html)
 | 
				
			|||||||
    params["session_token"] = md["session_token"]
 | 
					    params["session_token"] = md["session_token"]
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if md = body.match(/itct=(?<itct>[^"]+)"/)
 | 
					 | 
				
			||||||
    params["itct"] = md["itct"]
 | 
					 | 
				
			||||||
  end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  if md = body.match(/'COMMENTS_TOKEN': "(?<ctoken>[^"]+)"/)
 | 
					 | 
				
			||||||
    params["ctoken"] = md["ctoken"]
 | 
					 | 
				
			||||||
  end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  if md = body.match(/'RELATED_PLAYER_ARGS': (?<rvs>{"rvs":"[^"]+"})/)
 | 
					  if md = body.match(/'RELATED_PLAYER_ARGS': (?<rvs>{"rvs":"[^"]+"})/)
 | 
				
			||||||
    params["rvs"] = JSON.parse(md["rvs"])["rvs"].as_s
 | 
					    params["rvs"] = JSON.parse(md["rvs"])["rvs"].as_s
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
@ -726,7 +1159,7 @@ def fetch_video(id, proxies, region)
 | 
				
			|||||||
  info["avg_rating"] = "#{avg_rating}"
 | 
					  info["avg_rating"] = "#{avg_rating}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  description = html.xpath_node(%q(//p[@id="eow-description"]))
 | 
					  description = html.xpath_node(%q(//p[@id="eow-description"]))
 | 
				
			||||||
  description = description ? description.to_xml : ""
 | 
					  description = description ? description.to_xml(options: XML::SaveOptions::NO_DECL) : ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  wilson_score = ci_lower_bound(likes, likes + dislikes)
 | 
					  wilson_score = ci_lower_bound(likes, likes + dislikes)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -745,8 +1178,10 @@ def fetch_video(id, proxies, region)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  genre_url = html.xpath_node(%(//ul[contains(@class, "watch-info-tag-list")]/li/a[text()="#{genre}"])).try &.["href"]
 | 
					  genre_url = html.xpath_node(%(//ul[contains(@class, "watch-info-tag-list")]/li/a[text()="#{genre}"])).try &.["href"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Sometimes YouTube tries to link to invalid/missing channels, so we fix that here
 | 
					  # YouTube provides invalid URLs for some genres, so we fix that here
 | 
				
			||||||
  case genre
 | 
					  case genre
 | 
				
			||||||
 | 
					  when "Comedy"
 | 
				
			||||||
 | 
					    genre_url = "/channel/UCQZ43c4dAA9eXCQuXWu9aTw"
 | 
				
			||||||
  when "Education"
 | 
					  when "Education"
 | 
				
			||||||
    genre_url = "/channel/UCdxpofrI-dO6oYfsqHDHphw"
 | 
					    genre_url = "/channel/UCdxpofrI-dO6oYfsqHDHphw"
 | 
				
			||||||
  when "Gaming"
 | 
					  when "Gaming"
 | 
				
			||||||
@ -792,8 +1227,11 @@ def itag_to_metadata?(itag : String)
 | 
				
			|||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def process_video_params(query, preferences)
 | 
					def process_video_params(query, preferences)
 | 
				
			||||||
 | 
					  annotations = query["iv_load_policy"]?.try &.to_i?
 | 
				
			||||||
  autoplay = query["autoplay"]?.try &.to_i?
 | 
					  autoplay = query["autoplay"]?.try &.to_i?
 | 
				
			||||||
 | 
					  comments = query["comments"]?.try &.split(",").map { |a| a.downcase }
 | 
				
			||||||
  continue = query["continue"]?.try &.to_i?
 | 
					  continue = query["continue"]?.try &.to_i?
 | 
				
			||||||
 | 
					  continue_autoplay = query["continue_autoplay"]?.try &.to_i?
 | 
				
			||||||
  listen = query["listen"]? && (query["listen"] == "true" || query["listen"] == "1").to_unsafe
 | 
					  listen = query["listen"]? && (query["listen"] == "true" || query["listen"] == "1").to_unsafe
 | 
				
			||||||
  local = query["local"]? && (query["local"] == "true").to_unsafe
 | 
					  local = query["local"]? && (query["local"] == "true").to_unsafe
 | 
				
			||||||
  preferred_captions = query["subtitles"]?.try &.split(",").map { |a| a.downcase }
 | 
					  preferred_captions = query["subtitles"]?.try &.split(",").map { |a| a.downcase }
 | 
				
			||||||
@ -806,8 +1244,11 @@ def process_video_params(query, preferences)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  if preferences
 | 
					  if preferences
 | 
				
			||||||
    # region ||= preferences.region
 | 
					    # region ||= preferences.region
 | 
				
			||||||
 | 
					    annotations ||= preferences.annotations.to_unsafe
 | 
				
			||||||
    autoplay ||= preferences.autoplay.to_unsafe
 | 
					    autoplay ||= preferences.autoplay.to_unsafe
 | 
				
			||||||
 | 
					    comments ||= preferences.comments
 | 
				
			||||||
    continue ||= preferences.continue.to_unsafe
 | 
					    continue ||= preferences.continue.to_unsafe
 | 
				
			||||||
 | 
					    continue_autoplay ||= preferences.continue_autoplay.to_unsafe
 | 
				
			||||||
    listen ||= preferences.listen.to_unsafe
 | 
					    listen ||= preferences.listen.to_unsafe
 | 
				
			||||||
    local ||= preferences.local.to_unsafe
 | 
					    local ||= preferences.local.to_unsafe
 | 
				
			||||||
    preferred_captions ||= preferences.captions
 | 
					    preferred_captions ||= preferences.captions
 | 
				
			||||||
@ -818,19 +1259,24 @@ def process_video_params(query, preferences)
 | 
				
			|||||||
    volume ||= preferences.volume
 | 
					    volume ||= preferences.volume
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  autoplay ||= DEFAULT_USER_PREFERENCES.autoplay.to_unsafe
 | 
					  annotations ||= CONFIG.default_user_preferences.annotations.to_unsafe
 | 
				
			||||||
  continue ||= DEFAULT_USER_PREFERENCES.continue.to_unsafe
 | 
					  autoplay ||= CONFIG.default_user_preferences.autoplay.to_unsafe
 | 
				
			||||||
  listen ||= DEFAULT_USER_PREFERENCES.listen.to_unsafe
 | 
					  comments ||= CONFIG.default_user_preferences.comments
 | 
				
			||||||
  local ||= DEFAULT_USER_PREFERENCES.local.to_unsafe
 | 
					  continue ||= CONFIG.default_user_preferences.continue.to_unsafe
 | 
				
			||||||
  preferred_captions ||= DEFAULT_USER_PREFERENCES.captions
 | 
					  continue_autoplay ||= CONFIG.default_user_preferences.continue_autoplay.to_unsafe
 | 
				
			||||||
  quality ||= DEFAULT_USER_PREFERENCES.quality
 | 
					  listen ||= CONFIG.default_user_preferences.listen.to_unsafe
 | 
				
			||||||
  related_videos ||= DEFAULT_USER_PREFERENCES.related_videos.to_unsafe
 | 
					  local ||= CONFIG.default_user_preferences.local.to_unsafe
 | 
				
			||||||
  speed ||= DEFAULT_USER_PREFERENCES.speed
 | 
					  preferred_captions ||= CONFIG.default_user_preferences.captions
 | 
				
			||||||
  video_loop ||= DEFAULT_USER_PREFERENCES.video_loop.to_unsafe
 | 
					  quality ||= CONFIG.default_user_preferences.quality
 | 
				
			||||||
  volume ||= DEFAULT_USER_PREFERENCES.volume
 | 
					  related_videos ||= CONFIG.default_user_preferences.related_videos.to_unsafe
 | 
				
			||||||
 | 
					  speed ||= CONFIG.default_user_preferences.speed
 | 
				
			||||||
 | 
					  video_loop ||= CONFIG.default_user_preferences.video_loop.to_unsafe
 | 
				
			||||||
 | 
					  volume ||= CONFIG.default_user_preferences.volume
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  annotations = annotations == 1
 | 
				
			||||||
  autoplay = autoplay == 1
 | 
					  autoplay = autoplay == 1
 | 
				
			||||||
  continue = continue == 1
 | 
					  continue = continue == 1
 | 
				
			||||||
 | 
					  continue_autoplay = continue_autoplay == 1
 | 
				
			||||||
  listen = listen == 1
 | 
					  listen = listen == 1
 | 
				
			||||||
  local = local == 1
 | 
					  local = local == 1
 | 
				
			||||||
  related_videos = related_videos == 1
 | 
					  related_videos = related_videos == 1
 | 
				
			||||||
@ -859,11 +1305,14 @@ def process_video_params(query, preferences)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  controls = query["controls"]?.try &.to_i?
 | 
					  controls = query["controls"]?.try &.to_i?
 | 
				
			||||||
  controls ||= 1
 | 
					  controls ||= 1
 | 
				
			||||||
  controls = controls == 1
 | 
					  controls = controls >= 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  params = {
 | 
					  params = VideoPreferences.new(
 | 
				
			||||||
 | 
					    annotations: annotations,
 | 
				
			||||||
    autoplay: autoplay,
 | 
					    autoplay: autoplay,
 | 
				
			||||||
 | 
					    comments: comments,
 | 
				
			||||||
    continue: continue,
 | 
					    continue: continue,
 | 
				
			||||||
 | 
					    continue_autoplay: continue_autoplay,
 | 
				
			||||||
    controls: controls,
 | 
					    controls: controls,
 | 
				
			||||||
    listen: listen,
 | 
					    listen: listen,
 | 
				
			||||||
    local: local,
 | 
					    local: local,
 | 
				
			||||||
@ -877,7 +1326,7 @@ def process_video_params(query, preferences)
 | 
				
			|||||||
    video_loop: video_loop,
 | 
					    video_loop: video_loop,
 | 
				
			||||||
    video_start: video_start,
 | 
					    video_start: video_start,
 | 
				
			||||||
    volume: volume,
 | 
					    volume: volume,
 | 
				
			||||||
  }
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return params
 | 
					  return params
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
@ -908,3 +1357,21 @@ def generate_thumbnails(json, id, config, kemal_config)
 | 
				
			|||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def generate_storyboards(json, id, storyboards, config, kemal_config)
 | 
				
			||||||
 | 
					  json.array do
 | 
				
			||||||
 | 
					    storyboards.each do |storyboard|
 | 
				
			||||||
 | 
					      json.object do
 | 
				
			||||||
 | 
					        json.field "url", "/api/v1/storyboards/#{id}?width=#{storyboard[:width]}&height=#{storyboard[:height]}"
 | 
				
			||||||
 | 
					        json.field "templateUrl", storyboard[:url]
 | 
				
			||||||
 | 
					        json.field "width", storyboard[:width]
 | 
				
			||||||
 | 
					        json.field "height", storyboard[:height]
 | 
				
			||||||
 | 
					        json.field "count", storyboard[:count]
 | 
				
			||||||
 | 
					        json.field "interval", storyboard[:interval]
 | 
				
			||||||
 | 
					        json.field "storyboardWidth", storyboard[:storyboard_width]
 | 
				
			||||||
 | 
					        json.field "storyboardHeight", storyboard[:storyboard_height]
 | 
				
			||||||
 | 
					        json.field "storyboardCount", storyboard[:storyboard_count]
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user