Merge branch 'master' into unix-sockets

This commit is contained in:
Caian Benedicto 2024-12-13 18:29:28 -03:00
commit d7f5cdc2f9
351 changed files with 40409 additions and 21596 deletions

72
.ameba.yml Normal file
View File

@ -0,0 +1,72 @@
#
# Lint
#
# Exclude assigns for ECR files
Lint/UselessAssign:
Excluded:
- src/invidious.cr
- src/invidious/helpers/errors.cr
- src/invidious/routes/**/*.cr
# Ignore false negative (if !db.query_one?...)
Lint/UnreachableCode:
Excluded:
- src/invidious/database/base.cr
# Ignore shadowed variable `key` (it works for now, and that's
# a sensitive part of the code)
Lint/ShadowingOuterLocalVar:
Excluded:
- src/invidious/helpers/tokens.cr
Lint/NotNil:
Enabled: false
Lint/SpecFilename:
Excluded:
- spec/parsers_helper.cr
#
# Style
#
Style/RedundantBegin:
Enabled: false
Style/RedundantReturn:
Enabled: false
Style/RedundantNext:
Enabled: false
Style/ParenthesesAroundCondition:
Enabled: false
# This requires a rewrite of most data structs (and their usage) in Invidious.
Naming/QueryBoolMethods:
Enabled: false
Naming/AccessorMethodName:
Enabled: false
Naming/BlockParameterName:
Enabled: false
# Hides TODO comment warnings.
#
# Call `bin/ameba --only Documentation/DocumentationAdmonition` to
# list them
Documentation/DocumentationAdmonition:
Enabled: false
#
# Metrics
#
# Ignore function complexity (number of if/else & case/when branches)
# For some functions that can hardly be simplified for now
Metrics/CyclomaticComplexity:
Enabled: false

3
.gitattributes vendored Normal file
View File

@ -0,0 +1,3 @@
# https://github.community/t/how-to-change-the-category/2261/3
videojs-*.js linguist-detectable=false
video.min.js linguist-detectable=false

18
.github/CODEOWNERS vendored Normal file
View File

@ -0,0 +1,18 @@
# Default and lowest precedence. If none of the below matches, @iv-org/developers would be requested for review.
* @iv-org/developers
docker-compose.yml @unixfox
docker/ @unixfox
kubernetes/ @unixfox
README.md @thefrenchghosty
config/config.example.yml @SamantazFox @unixfox
scripts/ @syeopite
shards.lock @syeopite
shards.yml @syeopite
locales/ @SamantazFox
src/invidious/helpers/i18n.cr @SamantazFox
src/invidious/helpers/youtube_api.cr @SamantazFox

1
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1 @@
custom: https://invidious.io/donate/

View File

@ -7,9 +7,16 @@ assignees: ''
--- ---
<!-- Please use the search function to check if the bug you found has already been reported by someone else --> <!--
<!-- If you want to suggest a new feature please use "Feature request" instead --> BEFORE TRYING TO REPORT A BUG:
<!-- If you want to suggest an enhancement to an existing feature please use "Enhancement" instead -->
* Read the FAQ!
* Use the search function to check if there is already an issue open for your problem!
If you want to suggest a new feature please use "Feature request" instead
If you want to suggest an enhancement to an existing feature please use "Enhancement" instead
-->
**Describe the bug** **Describe the bug**
<!-- A clear and concise description of what the bug is. --> <!-- A clear and concise description of what the bug is. -->

View File

@ -0,0 +1,37 @@
name: Close duplicates
on:
issues:
types: [opened]
jobs:
run:
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: iv-org/close-potential-duplicates@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Issue title filter work with anymatch https://www.npmjs.com/package/anymatch.
# Any matched issue will stop detection immediately.
# You can specify multi filters in each line.
filter: ''
# Exclude keywords in title before detecting.
exclude: ''
# Label to set, when potential duplicates are detected.
label: duplicate
# Get issues with state to compare. Supported state: 'all', 'closed', 'open'.
state: open
# If similarity is higher than this threshold([0,1]), issue will be marked as duplicate.
threshold: 0.9
# Reactions to be add to comment when potential duplicates are detected.
# Available reactions: "-1", "+1", "confused", "laugh", "heart", "hooray", "rocket", "eyes"
reactions: ''
close: true
# Comment to post when potential duplicates are detected.
comment: |
Hello, your issue is a duplicate of this/these issue(s): {{#issues}}
- #{{ number }} [accuracy: {{ accuracy }}%]
{{/issues}}
If this is a mistake please explain why and ping @\unixfox, @\SamantazFox and @\TheFrenchGhosty.
Please refrain from opening new issues, it won't help in solving your problem.

View File

@ -0,0 +1,100 @@
name: Build and release container directly from master
on:
push:
branches:
- "master"
paths-ignore:
- "*.md"
- LICENCE
- TRANSLATION
- invidious.service
- .git*
- .editorconfig
- screenshots/*
- .github/ISSUE_TEMPLATE/*
- kubernetes/**
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Crystal
uses: crystal-lang/install-crystal@v1.8.2
with:
crystal: 1.12.2
- name: Run lint
run: |
if ! crystal tool format --check; then
crystal tool format
git diff
exit 1
fi
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to registry
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: quay.io/invidious/invidious
tags: |
type=sha,format=short,prefix={{date 'YYYY.MM.DD'}}-,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
type=raw,value=master,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
labels: |
quay.expires-after=12w
- name: Build and push Docker AMD64 image for Push Event
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile
platforms: linux/amd64
labels: ${{ steps.meta.outputs.labels }}
push: true
tags: ${{ steps.meta.outputs.tags }}
build-args: |
"release=1"
- name: Docker meta
id: meta-arm64
uses: docker/metadata-action@v5
with:
images: quay.io/invidious/invidious
flavor: |
suffix=-arm64
tags: |
type=sha,format=short,prefix={{date 'YYYY.MM.DD'}}-,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
type=raw,value=master,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
labels: |
quay.expires-after=12w
- name: Build and push Docker ARM64 image for Push Event
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile.arm64
platforms: linux/arm64/v8
labels: ${{ steps.meta-arm64.outputs.labels }}
push: true
tags: ${{ steps.meta-arm64.outputs.tags }}
build-args: |
"release=1"

View File

@ -0,0 +1,94 @@
name: Build and release container
on:
workflow_dispatch:
push:
tags:
- "v*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Crystal
uses: crystal-lang/install-crystal@v1.8.2
with:
crystal: 1.12.2
- name: Run lint
run: |
if ! crystal tool format --check; then
crystal tool format
git diff
exit 1
fi
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to registry
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: quay.io/invidious/invidious
flavor: |
latest=false
tags: |
type=semver,pattern={{version}}
type=raw,value=latest
labels: |
quay.expires-after=12w
- name: Build and push Docker AMD64 image for Push Event
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile
platforms: linux/amd64
labels: ${{ steps.meta.outputs.labels }}
push: true
tags: ${{ steps.meta.outputs.tags }}
build-args: |
"release=1"
- name: Docker meta
id: meta-arm64
uses: docker/metadata-action@v5
with:
images: quay.io/invidious/invidious
flavor: |
latest=false
suffix=-arm64
tags: |
type=semver,pattern={{version}}
type=raw,value=latest
labels: |
quay.expires-after=12w
- name: Build and push Docker ARM64 image for Push Event
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile.arm64
platforms: linux/arm64/v8
labels: ${{ steps.meta-arm64.outputs.labels }}
push: true
tags: ${{ steps.meta-arm64.outputs.tags }}
build-args: |
"release=1"

View File

@ -1,30 +1,73 @@
name: Invidious CI name: Invidious CI
on: on:
schedule:
- cron: "0 0 * * *" # Every day at 00:00
push: push:
branches: branches:
- "master" - "master"
- "api-only" - "api-only"
pull_request: pull_request:
branches: "*" branches: "*"
paths-ignore:
- "*.md"
- LICENCE
- TRANSLATION
- invidious.service
- .git*
- .editorconfig
- screenshots/*
- assets/**
- locales/*
- config/**
- .github/ISSUE_TEMPLATE/*
- kubernetes/**
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: "build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }}"
continue-on-error: ${{ !matrix.stable }}
strategy:
fail-fast: false
matrix:
stable: [true]
crystal:
- 1.10.1
- 1.11.2
- 1.12.1
- 1.13.2
- 1.14.0
include:
- crystal: nightly
stable: false
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
with:
submodules: true
- name: Install required APT packages
run: |
sudo apt install -y libsqlite3-dev
shell: bash
- name: Install Crystal - name: Install Crystal
uses: oprypin/install-crystal@v1.2.4 uses: crystal-lang/install-crystal@v1.8.0
with: with:
crystal: 0.36.1 crystal: ${{ matrix.crystal }}
- name: Cache Shards - name: Cache Shards
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: ./lib path: |
./lib
./bin
key: shards-${{ hashFiles('shard.lock') }} key: shards-${{ hashFiles('shard.lock') }}
- name: Install Shards - name: Install Shards
@ -36,14 +79,6 @@ jobs:
- name: Run tests - name: Run tests
run: crystal spec run: crystal spec
- name: Run lint
run: |
if ! crystal tool format --check; then
crystal tool format
git diff
exit 1
fi
- name: Build - name: Build
run: crystal build --warnings all --error-on-warnings --error-trace src/invidious.cr run: crystal build --warnings all --error-on-warnings --error-trace src/invidious.cr
@ -52,11 +87,80 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- name: Build Docker - name: Build Docker
run: docker-compose up -d run: docker compose build --build-arg release=0
- name: Run Docker
run: docker compose up -d
- name: Test Docker - name: Test Docker
run: while curl -Isf http://localhost:3000; do sleep 1; done run: while curl -Isf http://localhost:3000; do sleep 1; done
build-docker-arm64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker ARM64 image
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile.arm64
platforms: linux/arm64/v8
build-args: release=0
- name: Test Docker
run: while curl -Isf http://localhost:3000; do sleep 1; done
lint:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Crystal
uses: crystal-lang/install-crystal@v1.8.0
with:
crystal: latest
- name: Cache Shards
uses: actions/cache@v3
with:
path: |
./lib
./bin
key: shards-${{ hashFiles('shard.lock') }}
- name: Install Shards
run: |
if ! shards check; then
shards install
fi
- name: Check Crystal formatter compliance
run: |
if ! crystal tool format --check; then
crystal tool format
git diff
exit 1
fi
- name: Run Ameba linter
run: bin/ameba

View File

@ -1,39 +0,0 @@
name: Build and release container
on:
push:
branches:
- "master"
schedule:
- cron: 0 0 * * *
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to registry
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Build and push for Push Event
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v2
with:
context: .
file: docker/Dockerfile
labels: quay.expires-after=12w
push: true
tags: quay.io/invidious/invidious:${{ github.sha }},quay.io/invidious/invidious:latest

View File

@ -10,13 +10,14 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v3 - uses: actions/stale@v8
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 365 days-before-stale: 730
days-before-close: 30 days-before-pr-stale: -1
days-before-close: 60
stale-issue-message: 'This issue has been automatically marked as stale and will be closed in 30 days because it has not had recent activity and is much likely outdated. If you think this issue is still relevant and applicable, you just have to post a comment and it will be unmarked.' stale-issue-message: 'This issue has been automatically marked as stale and will be closed in 30 days because it has not had recent activity and is much likely outdated. If you think this issue is still relevant and applicable, you just have to post a comment and it will be unmarked.'
stale-pr-message: 'This pull request has been automatically marked as stale and will be closed in 30 days because it has not had recent activity and is much likely outdated. If you think this pull request is still relevant and applicable, you just have to post a comment and it will be unmarked.'
stale-issue-label: "stale" stale-issue-label: "stale"
stale-pr-label: "stale"
ascending: true ascending: true
# Exempt the following types of issues from being staled
exempt-issue-labels: "feature-request,enhancement,discussion,exempt-stale"

2
.gitignore vendored
View File

@ -1,4 +1,4 @@
/doc/ /docs/
/dev/ /dev/
/lib/ /lib/
/bin/ /bin/

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "mocks"]
path = mocks
url = ../mocks

File diff suppressed because it is too large Load Diff

844
CHANGELOG_legacy.md Normal file
View File

@ -0,0 +1,844 @@
# Note: This is no longer updated and links to omarroths repo, which doesn't exist anymore.
# 0.20.0 (2019-011-06)
# Version 0.20.0: Custom Playlists
It's been quite a while since the last release! There've been [198 commits](https://github.com/omarroth/invidious/compare/0.19.0..0.20.0) from 27 contributors.
A couple smaller features have since been added. Channel pages and playlists in particular have received a bit of a face-lift, with both now displaying their descriptions as expected, and playlists providing video count and published information. Channels will also now provide video descriptions in their RSS feed.
Turkish (tr), Chinese (zh-TW, in addition to zh-CN), and Japanese (jp) are all now supported languages. Thank you as always to the hard work done by translators that makes this possible.
The feed menu and default home page are both now configurable for registered and unregistered users, and is quite a bit of an improvement for users looking to reduce distractions for their daily use.
## For Administrators
`feed_menu` and `default_home` are now configurable by the user, and have therefore been moved into `default_user_preferences`:
```yaml
feed_menu: ["Popular", "Top"]
default_home: Top
# becomes:
default_user_preferences:
feed_menu: ["Popular", "Top"]
default_home: Top
```
Several new options have also been added, including the ability to set a support email for the instance using `admin_email: EMAIL`, and forcing the use of a specific connection in the case of rate-limiting using `force_resolve` (see below).
## For Developers
Authenticated endpoints are now [properly documented](https://github.com/omarroth/invidious/wiki/Authenticated-Endpoints), as well how to generate and use API tokens. My hope is that this makes some of the more [interesting](https://github.com/omarroth/invidious/wiki/Authenticated-Endpoints#get-apiv1authnotifications) endpoints more accessible for developers to use in their own applications.
API endpoints for interacting with custom playlists have also been added with documentation available [here](https://github.com/omarroth/invidious/wiki/Authenticated-Endpoints#get-apiv1authplaylists).
## Custom playlists
This is probably the feature that has been the longest in the pipe and that I'm quite pleased is now implemented. It is now possible to create custom playlists, which can be played and edited through Invidious. API endpoints have also been added (documentation [here](https://github.com/omarroth/invidious/wiki/Authenticated-Endpoints#get-apiv1authplaylists)).
Overall I'm quite pleased with how smoothly it has been rolled out and with the experience so far, and I'm exctited for how it can be extended and improved in future.
## [instances.invidio.us](https://instances.invidio.us)
It is now possible to view a list of public instances (as provided in the [wiki](https://github.com/omarroth/invidious/wiki/Invidious-Instances)) through an API or a pretty new interface [here](https://instances.invidio.us). It combines uptime information, statistics from each instance and basic information already provided in the wiki. I expect it should be much more user-friendly than compiling the information yourself, and is already used by [Invidition](https://codeberg.org/Booteille/Invidition) to provide a list of instances for users to choose from.
The site itself is licensed under the AGPLv3 and the source is available [here](https://github.com/omarroth/instances.invidio.us).
## Video unavailable [#811](https://github.com/omarroth/invidious/issues/811)
Many users have likely noticed this error message if using Invidious directly or through another service, such as FreeTube. This issue is caused by rate-limiting by Google, and is not a new issuee for projects like Invidious (notably [youtube-dl](https://github.com/ytdl-org/youtube-dl#http-error-429-too-many-requests-or-402-payment-required)) and appears to be affecting smaller, private instances as well.
There is not a permanent fix for administrators currently, however there is some information available [here](https://github.com/omarroth/invidious/issues/811#issuecomment-540017772) that may provide a temporary solution. Unfortanately, in most cases the best option is to wait for the instance to be unbanned or to move the instance to a different IP. A more informative error message is also now provided, which should help an administrator more quickly diagnose the problem.
For those interested, I would recommend following [#811](https://github.com/omarroth/invidious/issues/811) for any future progress on the issue.
## BAT verified publisher
I'm quite late to this announcement, however I'm pleased to mention that Invidious is now a BAT verified publisher! I would recommend looking [here](https://basicattentiontoken.org/about/) or [here](https://www.reddit.com/r/BATProject/comments/7cr7yc/new_to_bat_read_this_introduction_to_basic/) for learning more about what it is and how it works. Overall I think it makes an interesting substitute for services like Liberapay, and a (hopefully) much less-intrusive alternative to direct advertising.
BAT is combined under other cryptocurrencies below. Currently there's a fairly significant delay in payout, which is the reason for the large fluctuation in crypto donations between September and October (and also the reason for the late announcement).
## Release schedule
Currently I'm quite pleased with the current state of the project. There's plenty of things I'd still like to add, however at this point I expect the rate of most new additions will slow down a bit, with more focus on stabililty and any long-standing bugs.
Because of this, I'm planning on releasing a new version quarterly, with any necessary hotfixes being pushed as a new patch release as necessary. As always it will be possible to run Invidious directly from [master](https://github.com/omarroth/invidious/wiki/Updating) if you'd still like to have the lastest version.
I'll plan on providing finances each release, with a similar monthly breakdown as below.
## Finances for September 2019
### Donations
- [Patreon](https://www.patreon.com/omarroth) : \$64.37
- [Liberapay](https://liberapay.com/omarroth) : \$76.04
- Crypto : ~\$99.89 (converted from BAT, BCH, BTC)
- Total : \$240.30
### Expenses
- invidious-lb1 (nyc1) : \$10.00 (load balancer)
- invidious-update1 (s-1vcpu-1gb) : \$5.00 (updates feeds)
- invidious-node1 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node2 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node3 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node4 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node5 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node6 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node7 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node8 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node9 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node10 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node11 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node12 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node13 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node14 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node15 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node16 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-db1 (s-4vcpu-8gb) : \$40.00 (database)
- Total : \$135.00
## Finances for October 2019
- [Liberapay](https://liberapay.com/omarroth) : \$134.40
- Crypto : ~\$8.29 (converted from BAT, BCH, BTC)
- Total : \$142.69
### Expenses
- invidious-lb1 (nyc1) : \$5.00 (load balancer)
- invidious-lb2 (nyc1) : \$5.00 (load balancer)
- invidious-lb3 (nyc1) : \$5.00 (load balancer)
- invidious-lb4 (nyc1) : \$5.00 (load balancer)
- invidious-update1 (s-1vcpu-1gb) : \$5.00 (updates feeds)
- invidious-node1 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node2 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node3 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node4 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node5 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node6 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node7 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node8 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node9 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node10 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node11 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node12 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node13 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node14 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node15 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node16 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node17 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node18 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-db1 (s-4vcpu-8gb) : \$40.00 (database)
- Total : \$155.00
# 0.19.0 (2019-07-13)
# Version 0.19.0: Communities
Hello again everyone! Focus this month has mainly been on improving playback performance, along with a couple new features I'd like to announce. There have been [109 commits](https://github.com/omarroth/invidious/compare/0.18.0...0.19.0) this past month from 10 contributors.
This past month has seen the addition of Chinese (`zh-CN`) and Icelandic (`is`) translations. I would like to give a huge thanks to their respective translators, and again an enormous thanks to everyone who helps translate the site.
I'm delighted to mention that [FreeTube 0.6.0](https://github.com/FreeTubeApp/FreeTube) now supports 1080p thanks to the Invidious API. I would very much recommend reading the [relevant post](https://freetube.writeas.com/freetube-release-0-6-0-beta-1080p-and-a-lot-of-qol) for some more information on how it works, along with several other major improvements. Folks that are interested in adding similar functionality for their own projects should feel free to get in touch.
This past month there has been quite a bit of work on improving memory usage and improving download and playback speeds. As mentioned in the previous release, some extra hardware has been allocated which should also help with this. I'm still looking for ways to improve performance and feedback is always appreciated.
Along with performance, a couple quality of life improvements have been added, including author thumbnails and banners, clickable titles for embedded videos, and better styling for captions, among some other enhancements.
## Communities
Support for YouTube's [communities tab](https://creatoracademy.youtube.com/page/lesson/community-tab) has been added. It's a very interesting but surprisingly unknown feature. Essentially, providing comments for a channel, rather than a video, where an author can post updates for their subscribers.
It's commonly used to promote interesting links and foster discussion. I hope this feature helps people find more interesting content that otherwise would have been overlooked.
## For Developers
For accessing channel communities, an `/api/v1/channels/comments/:ucid` endpoint has been added, with similar behavior and schema to `/api/v1/comments/:id`, with an extra `attachment` field for top-level comments. More info on usage and available data can be found in the [wiki](https://github.com/omarroth/invidious/wiki/API#get-apiv1channelscommentsucid-apiv1channelsucidcomments).
An `/api/v1/auth/feeds` endpoint has been added for programmatically accessing a user's subscription feed, with options for displaying notifications and filtering an existing feed.
An `/api/v1/search/suggestions` endpoint has been added for retrieving suggestions for a given query.
## For Administrators
It is now possible to disable more resource intensive features, such as downloads and DASH functionality by adding `disable_proxy` to your config. See [#453](https://github.com/omarroth/invidious/issues/453) and the [Wiki](https://github.com/omarroth/invidious/wiki/Configuration) for more information and example usage. I expect this to be a big help for folks with limited bandwidth when hosting their own instances.
## Finances
### Donations
- [Patreon](https://www.patreon.com/omarroth) : \$38.39
- [Liberapay](https://liberapay.com/omarroth) : \$84.85
- Crypto : ~\$0.00 (converted from BCH, BTC)
- Total : \$123.24
### Expenses
- invidious-load1 (nyc1) : \$10.00 (load balancer)
- invidious-update1 (s-1vcpu-1gb) : \$5.00 (updates feeds)
- invidious-node1 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node2 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node3 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node4 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node5 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node6 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node7 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node8 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node9 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node10 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-db1 (s-4vcpu-8gb) : \$40.00 (database)
- Total : \$105.00
The goal on Patreon has been updated to reflect the above expenses. As mentioned above, the main reason for more hardware is to improve playback and download speeds, although I'm still looking into improving performance without allocating more hardware.
As always I'm grateful for everyone's support and feedback. I'll see you all next month.
# 0.18.0 (2019-06-06)
# Version 0.18.0: Native Notifications and Optimizations
Hope everyone has been doing well. This past month there have been [97 commits](https://github.com/omarroth/invidious/compare/0.17.0...0.18.0) from 10 contributors. For the most part changes this month have been on optimizing various parts of the site, mainly subscription feeds and support for serving images and other assets.
I'm quite happy to mention that support for Greek (`el`) has been added, which I hope will continue to make the site accessible for more users.
Subscription feeds will now only update when necessary, rather than periodically. This greatly lightens the load on DB as well as making the feeds generally more responsive when changing subscriptions, importing data, and when receiving new uploads.
Caching for images and other assets should be greatly improved with [#456](https://github.com/omarroth/invidious/issues/456). JavaScript has been pulled out into separate files where possible to take advantage of this, which should result in lighter pages and faster load times.
This past month several people have encountered issues with downloads and watching high quality video through the site, see [#532](https://github.com/omarroth/invidious/issues/532) and [#562](https://github.com/omarroth/invidious/issues/562). For this coming month I've allocated some more hardware which should help with this, and I'm also looking into optimizing how videos are currently served.
## For Developers
`viewCount` is now available for `/api/v1/popular` and all videos returned from `/api/v1/auth/notifications`. Both also now provide `"type"` for indicating available information for each object.
An `/authorize_token` page is now available for more easily creating new tokens for use in applications, see [this comment](https://github.com/omarroth/invidious/issues/473#issuecomment-496230812) in [#473](https://github.com/omarroth/invidious/issues/473) for more details.
A POST `/api/v1/auth/notifications` endpoint is also now available for correctly returning notifications for 150+ channels.
## For Administrators
There are two new schema changes for administrators: `views` for adding view count to the popular page, and `feed_needs_update` for tracking feed changes.
As always the relevant migration scripts are provided which should run when following instructions for [updating](https://github.com/omarroth/invidious/wiki/Updating). Otherwise, adding `check_tables: true` to your config will automatically make the required changes.
## Native Notifications
[<img src="https://omar.yt/81c3ae1839831bd9300d75e273b6552a86dc2352/native_notification.png" height="160" width="472">](https://omar.yt/81c3ae1839831bd9300d75e273b6552a86dc2352/native_notification.png "Example of native notification, available in repository under screnshots/native_notification.png")
It is now possible to receive [Web notifications](https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API) from subscribed channels.
You can enable notifications by clicking "Enable web notifications" in your preferences. Generally they appear within 20-60 seconds of a new video being uploaded, and I've found them to be an enormous quality of life improvement.
Although it has been fairly stable, please feel free to report any issues you find [here](https://github.com/omarroth/invidious/issues) or emailing me directly at omarroth@protonmail.com.
Important to note for administrators is that instances require [`use_pubsub_feeds`](https://github.com/omarroth/invidious/wiki/Configuration) and must be served over HTTPS in order to correctly send web notifications.
## Finances
### Donations
- [Patreon](https://www.patreon.com/omarroth) : \$49.73
- [Liberapay](https://liberapay.com/omarroth) : \$100.57
- Crypto : ~\$11.12 (converted from BCH, BTC)
- Total : \$161.42
### Expenses
- invidious-load1 (nyc1) : \$10.00 (load balancer)
- invidious-update1 (s-1vcpu-1gb) : \$5.00 (updates feeds)
- invidious-node1 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node2 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node3 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node4 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node5 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node6 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-db1 (s-4vcpu-8gb) : \$40.00 (database)
- Total : \$85.00
See you all next month!
# 0.17.0 (2019-05-06)
# Version 0.17.0: Player and Authentication API
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)
## Version 0.15.0: Preferences and Channel Playlists
The project has seen quite a bit of activity this past month. Large focus has been on fixing bugs, but there's still quite a few new features I'm happy to announce. There have been [133 commits](https://github.com/omarroth/invidious/compare/0.14.0...0.15.0) from 15 contributors this past month.
As a couple miscellaneous changes, a couple [nice screenshots](https://github.com/omarroth/invidious#screenshots) have been added to the README, so folks can see more of what the site has to offer without creating an account.
The footer has also been cleaned up quite a bit, and now displays the current version, so it's easier to know what features are available from the current instance.
## For Administrators
This past month there has been a minor release - `0.14.1` - which fixes a breaking change made by YouTube for their polymer redesign.
There have been several new features that unfortunately require a database migration. There are migration scripts provided in `config/migrate-scripts`, and the [wiki](https://github.com/omarroth/invidious/wiki/Updating) has instructions for automatically applying them. I'll do my best to keep those changes to a minimum, and expect to see a corresponding script to automatically apply any new changes.
Administrator preferences have been added with [#312](https://github.com/omarroth/invidious/issues/312), which allows administrators to customize their instance. Administrators can change the order of feed menus, change the default homepage, disable open registration, and several other options. There's a short 'how-to' [here](https://github.com/omarroth/invidious/issues/312#issuecomment-468831842), and the new options are documented [here](https://github.com/omarroth/invidious/wiki/Configuration).
An `/api/v1/stats` endpoint has been added with [#356](https://github.com/omarroth/invidious/issues/356), which reports the instance version and number of active users. Statistics are disabled by default, and can be enabled in administator preferences. Statistics for the official instance are available [here](https://invidio.us/api/v1/stats?pretty=1).
## For Developers
`/api/v1/channels/:ucid` now provides an `autoGenerated` tag, which returns true for topic channels, and larger genre channels generated by YouTube. These channels don't have any videos of their own, so `latestVideos` will be empty. It is recommended instead to display a list of playlists generated by YouTube.
You can now pull a list of playlists from a channel with `/api/v1/channels/playlists/:ucid`. Supported options are documented in the [wiki](https://github.com/omarroth/invidious/wiki/API#get-apiv1channelsplaylistsucid-apiv1channelsucidplaylists). Pagination is handled with a `continuation` token, which is generated on each call. Of note is that auto-generated channels currently have one page of results, and subsequent calls will be empty.
For quickly pulling the latest 30 videos from a channel, there is now `/api/v1/channels/latest/:ucid`. It is much faster than a call to `/api/v1/channels/:ucid`. It will not convert an author name to a valid ucid automatically, and will not return any extra data about a channel.
## Preferences
In addition to administrator preferences mentioned above, you can now change your preferences without an account (see [#42](https://github.com/omarroth/invidious/pull/42)). I think this is quite an improvement to the usability of the site, and is much friendlier to privacy-conscious folks that don't want to make an account. Preferences will be automatically imported to a newly created account.
Several issues with sorting subscriptions have been fixed, and `/manage_subscriptions` has been sped up significantly. The subscription feed has also seen a bump in performance. Delayed notifications have unfortunately started becoming a problem now that there are more users on the site. Some new changes are currently being tested which should mostly resolve the issue, so expect to see more in the next release.
## Channel Playlists
You can now view available playlists from a channel, and [auto-generated channels](https://invidio.us/channel/UC-9-kyTW8ZkZNDHQJ6FgpwQ) are no longer empty. You can sort as you would on YouTube, and all the same functionality should be available. I'm quite pleased to finally have it implemented, since it's currently the only data available from the above mentioned auto-generated channels, and makes it much easier to consume music on the site.
There's also more discussion on improving Invidious for streaming music in [#304](https://github.com/omarroth/invidious/issues/304), and adding support for music.youtube.com. I would appreciate any thoughts on how to improve that experience, since it's a very large and useful part of YouTube.
## Finances
### Donations
- [Patreon](https://www.patreon.com/omarroth) : \$42.42
- [Liberapay](https://liberapay.com/omarroth) : \$30.97
- Crypto : ~\$0.00 (converted from BCH, BTC)
- Total : \$73.39
### Expenses
- invidious-load1 (nyc1) : \$10.00 (load balancer)
- invidious-update1 (s-1vcpu-1gb) : \$5.00 (updates feeds)
- invidious-node1 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node2 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node3 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node4 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-db1 (s-4vcpu-8gb) : \$40.00 (database)
- Total : \$75.00
It's been very humbling to see how fast the project has grown, and I look forward to making the site even better. Thank you everyone.
# 0.14.0 (2019-02-06)
## Version 0.14.0: Community
This last month several contributors have made improvements specifically for the people using this project. New pages have been added to the wiki, and there is now a [Matrix Server](https://riot.im/app/#/room/#invidious:matrix.org) and IRC channel so it's easier and faster for people to ask questions or chat. There have been [101 commits](https://github.com/omarroth/invidious/compare/0.13.0...0.14.0) since the last major release from 8 contributors.
It has come to my attention in the past month how many people are self-hosting, and I would like to make it easier for them to do so.
With that in mind, expect future releases to have a section for For Administrators (if any relevant changes) and For Developers (if any relevant changes).
## For Administrators
This month the most notable change for administrators is releases. As always, there will be a major release each month. However, a new minor release will be made whenever there are any critical bugs that need to be fixed.
This past month is the first time there has been a minor release - `0.13.1` - which fixes a breaking change made by YouTube. Administrators using versioning for their instances will be able to rely on the latest version, and should have a system in place to upgrade their instance as soon as a new release is available.
Several new pages have been added to the [wiki](https://github.com/omarroth/invidious/wiki#for-administrators) (as mentioned below) that will help administrators better setup their own instances. Configuration, maintenance, and instructions for updating are of note, as well as several common issues that are encountered when first setting up.
## For Developers
There's now a `pretty=1` parameter for most endpoints so you can view data easily from the browser, which is convenient for debugging and casual use. You can see an example [here](https://invidio.us/api/v1/videos/CvFH_6DNRCY?pretty=1).
Unfortunately the `/api/v1/insights/:id` endpoint is no longer functional, as YouTube removed all publicly available analytics around a month ago. The YouTube endpoint now returns a 404, so it's unlikely it will be functional again.
## Wiki
There have been a sizable number of changes to the Wiki, including a [list of public Invidious instances](https://github.com/omarroth/invidious/wiki/Invidious-Instances), the [list of extensions](https://github.com/omarroth/invidious/wiki/Extensions), and documentation for administrators (as mentioned above) and developers.
The wiki is editable by anyone so feel free to add anything you think is useful.
## Matrix & IRC
Thee is now a [Matrix Server](https://riot.im/app/#/room/#invidious:matrix.org) for Invidious, so please feel free to hop on if you have any questions or want to chat. There is also a registered IRC channel: #invidious on Freenode which is bridged to Matrix.
## Features
Several new features have been added, including a download button, creator hearts and comment colors, and a French translation.
There have been fixes for Google logins, missing text in locales, invalid links to genre channels, and better error handling in the player, among others.
Several fixes and features are omitted for space, so I'd recommend taking a look at the [compare tab](https://github.com/omarroth/invidious/compare/0.13.0...0.14.0) for more information.
## Annotations Update
Annotations were removed January 15th, 2019 around15:00 UTC. Before they were deleted we were able to archive annotations from around 1.4 billion videos. I'd very much recommend taking a look [here](https://www.reddit.com/r/DataHoarder/comments/al7exa/youtube_annotation_archive_update_and_preview/) for more information and a list of acknowledgements. I'm extremely thankful to everyone who was able to contribute and I'm glad we were able to save such a large part of internet history.
There's been large strides in supporting them in the player as well, which you can follow in [#303](https://github.com/omarroth/invidious/pull/303). You can preview the functionality at https://dev.invidio.us . Before they are added to the main site expect to see an option to disable them, both site-wide and per video.
Organizing this project has unfortunately taken up quite a bit of my time, and I've been very grateful for everyone's patience.
## Finances
### Donations
- [Patreon](https://www.patreon.com/omarroth) : \$49.42
- [Liberapay](https://liberapay.com/omarroth) : \$27.89
- Crypto : ~\$0.00 (converted from BCH, BTC)
- Total : \$77.31
### Expenses
- invidious-load1 (nyc1) : \$10.00 (load balancer)
- invidious-update1 (s-1vcpu-1gb) : \$5.00 (updates feeds)
- invidious-node1 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node2 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node3 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node4 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-db1 (s-4vcpu-8gb) : \$40.00 (database)
- Total : \$75.00
As always I'm grateful for everyone's contributions and support. I'll see you all in March.
# 0.13.1 (2019-01-19)
##
# 0.13.0 (2019-01-06)
## Version 0.13.0: Translations, Annotations, and Tor
I hope everyone had a happy New Year! There's been a couple new additions since last release, with [44 commits](https://github.com/omarroth/invidious/compare/0.12.0...0.13.0) from 9 contributors. It's been quite a year for the project, and I hope to continue improving the project into 2019! Starting off the new year:
## Translations
I'm happy to announce support for translations has been added with [`a160c64`](https://github.com/omarroth/invidious/a160c64). Currently, there is support for:
- Arabic (`ar`)
- Dutch (`nl`)
- English (`en-US`)
- German (`de`)
- Norwegian Bokmål (`nb_NO`)
- Polish (`pl`)
- Russian (`ru`)
Which you can change in your preferences under `Language`. You can also add `&hl=LANGUAGE` to the end of any request to translate it to your preferred language, for example https://invidio.us/?hl=ru. I'd like to say thank you again to everyone who has helped translate the site! I've mentioned this before, but I'm delighted that so many people find the project useful.
## Annotations
Recently, [YouTube announced that all annotations will be deleted on January 15th, 2019](https://support.google.com/youtube/answer/7342737). I believe that annotations have a very important place in YouTube's history, and [announced a project to archive them](https://www.reddit.com/r/DataHoarder/comments/aa6czg/youtube_annotation_archive/).
I expect annotations to be supported in the Invidious player once archiving is complete (see [#110](https://github.com/omarroth/invidious/issues/110) for details), and would also like to host them for other developers to use in their projects.
The code is available [here](https://github.com/omarroth/archive), and contains instructions for running a worker if you would like to contribute. There's much more information available in the announcement as well for anyone who is interested.
## Tor
I unfortunately missed the chance to mention this in the previous release, but I'm now happy to announce that you can now view Invidious through Tor at the following links:
kgg2m7yk5aybusll.onion
axqzx4s6s54s32yentfqojs3x5i7faxza6xo3ehd4bzzsg2ii4fv2iid.onion
Invidious is well suited to use through Tor, as it does not require any JS and is fairly lightweight. I'd recommend looking [here](https://diasp.org/posts/10965196) and [here](https://www.reddit.com/r/TOR/comments/a3c1ak/you_can_now_watch_youtube_videos_anonymously_with/) for more details on how to use the onion links, and would like to say thank you to [/u/whonix-os](https://www.reddit.com/user/whonix-os) for suggesting it and providing support setting setting them up.
## Popular and Trending
You can now easily view videos trending on YouTube with [`a16f967`](https://github.com/omarroth/invidious/a16f967). It also provides support for viewing YouTube's various categories categories, such as `News`, `Gaming`, and `Music`. You can also change the `region` parameter to view trending in different countries, which should be made easier to use in the coming weeks.
A link to `/feed/popular` has also been added, which provides a list of videos sorted using the algorithm described [here](https://github.com/omarroth/invidious/issues/217#issuecomment-436503761). I think it better reflects what users watch on the site, but I'd like to hear peoples' thoughts on this and on how it could be improved.
## Finances
### Donations
- [Patreon](https://www.patreon.com/omarroth): \$64.63
- [Liberapay](https://liberapay.com/omarroth) : \$30.05
- Crypto : ~\$28.74 (converted from BCH, BTC)
- Total : \$123.42
### Expenses
- invidious-load1 (nyc1) : \$10.00 (load balancer)
- invidious-update1 (s-1vcpu-1gb) : \$5.00 (updates feeds)
- invidious-node1 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node2 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node3 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node4 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-db1 (s-4vcpu-8gb) : \$40.00 (database)
- Total : \$75.00
### What will happen with what's left over?
I believe this is the first month that all expenses have been fully paid for by donations. Thank you! I expect to allocate the current amount for hardware to improve performance and for hosting annotation data, as mentioned above.
Anything that is left over is kept to continue hosting the project for as long as possible. Thank you again everyone!
I think that's everything for 2018. There's lots still planned, and I'm very excited for the future of this project!
# 0.12.0 (2018-12-06)
## Version 0.12.0: Accessibility, Privacy, Transparency
Hello again, it's been a while! A lot has happened since the last release. Invidious has seen [134 commits](https://github.com/omarroth/invidious/compare/0.11.0...0.12.0) from 3 contributors, and I'm quite happy with the progress that has been made. I enjoyed this past month, and I believe having a monthly release schedule allows me to focus on more long-term improvements, and I hope people enjoy these more substantial updates as well.
## Accessability and Privacy
There have been quite a few improvements for user privacy, and improvements that improve accessibility for both people and software.
You can now view comments without JS with [`19516ea`](https://github.com/omarroth/invidious/19516ea). Currently, this functionality is limited to the first 20 comments, but expect this functionality to be improved to come as close to the JS version as possible. Folks can track progress in [#204](https://github.com/omarroth/invidious/issues/204).
Invidious is now compatible with [LibreJS](https://www.gnu.org/software/librejs/), and provides license information [here](https://invidio.us/licenses) with [`7f868ec`](https://github.com/omarroth/invidious/7f868ec). As expected, all libraries are compatible under the AGPLv3, and I'm happy to mention that no other changes were required to make Invidious compatible with LibreJS.
A DNT policy has also been added with [`9194f47`](https://github.com/omarroth/invidious/9194f47) for compatibility with [Privacy Badger](https://www.eff.org/privacybadger). I'm pleased to mention that here too no other changes had to be made in order for Invidious to be compatible with this extension. I expect a privacy policy to be added soon as well, so users can better understand how Invidious uses their data.
For users that are visually impaired, there is now a text CAPTCHA available so it's easier to register and login. Because of the simple front-end of the project, I expect screen readers and other software to be able to easily understand the site's interface. In combination with the ability to listen-only, I believe Invidious is much more accessible than YouTube. Folks can read [#244](https://github.com/omarroth/invidious/issues/244) for more details, and I would very much appreciate any feedback on how this can be improved.
## User Preferences
There have been a lot of improvements to preferences. Options for enabling audio-only by default and continuous playback (autoplay) have been added with [`e39dec9`](https://github.com/omarroth/invidious/e39dec9), with [`4b76b93`](https://github.com/omarroth/invidious/4b76b93), respectively. Users can also now mark videos as watched from their subscription feed and view watch history by going to https://invidio.us/feed/history. I expect to add more information to history so that it's easier to use. Folks can track progress with [#182](https://github.com/omarroth/invidious/issues/182). As with all data Invidious keeps, watch history can be exported [here](https://invidio.us/data_control).
Users can now delete their account with [`b9c29bf`](https://github.com/omarroth/invidious/b9c29bf). This will remove _all_ user data from Invidious, including session IDs, watch history, and subscriptions. As mentioned above, it's easy to export that data and import it to a local instance, or export subscriptions for use with other applications such as [FreeTube](https://github.com/FreeTubeApp/FreeTube) or [NewPipe](https://github.com/TeamNewPipe/NewPipe).
## Translation and Internationalis(z)ation
Invidious has been approved for hosting by Weblate, available [here](https://hosted.weblate.org/projects/invidious/translations/). At the time of writing, translations for Arabic, Dutch, German, Polish, and Russian are currently underway. I would like to say a very big thank you to everyone working on them, and I hope to fully support them within around 2 weeks. Folks can track progress with [#251](https://github.com/omarroth/invidious/issues/251).
## Transperency and Finances
For the sake of transparency, I plan on publishing each month's finances. This is currently already done on Liberapay and Patreon, but there is not a total amount currently provided anywhere, and I would also like to include expenses to provide a better explanation of how patrons' money is being spent.
### Donations
- [Patreon](https://www.patreon.com/omarroth): \$43.60 (Patreon takes roughly 9%)
- [Liberapay](https://liberapay.com/omarroth) : \$22.10
- Crypto : ~\$1.25 (converted from BCH, BTC)
- Total : \$66.95
### Expenses
- invidious-load1 (nyc1) : \$10.00 (load balancer)
- invidious-update1 (s-1vcpu-1gb) : \$5.00 (updates feeds)
- invidious-node1 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node2 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node3 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-node4 (s-1vcpu-1gb) : \$5.00 (web server)
- invidious-db1 (s-4vcpu-8gb) : \$40.00 (database)
- Total : \$75.00
I'd be happy to provide any explanation where needed. I would also like to thank everyone who donates, it really helps and I can't say how happy I am to see that so many people find it valuable.
That's all for this month. I wish everyone the best for the holidays, and I'll see you all again in January!
# 0.11.0 (2018-10-23)
## Week 11: FreeTube and Styling
This past Friday I'm been very excited to see that FreeTube version [0.4.0](https://github.com/FreeTubeApp/FreeTube/tree/0.4.0) has been released! I'd recommend taking a look at the official patch notes, but to spoil a little bit here: FreeTube now uses the Invidious API for _all_ requests previously sent to YouTube, and has also seen support for playlists, keyboard shortcuts, and more default settings (speed, autoplay, and subtitles). I'm happy to see that FreeTube has reached 500 stars on Github, and I think it's very much deserved. I'd recommend keeping an eye on the newly-launched [FreeTube blog](https://freetube.writeas.com/) for updates on the project.
Quite a few styling changes have been added this past week, including channel subscriber count to the subscribe and unsubscribe buttons. The changes sound small, but they've been a very big improvement and I'm quite satisfied with how they look. Also to note is that partial support for duration in thumbnails have been added with [#202](https://github.com/omarroth/invidious/issues/202). Overall, I think the site is becoming much more pleasing visually, and I hope to continue to improve it.
I've been very pleased to see Invidious in its current state, and I believe it's many times more mature compared to even a month ago. Changes have also started slowing down a bit as it's become more mature, and therefore I'd like to transition to a monthly update schedule in order to provide more comprehensive updates for everyone. I want to thank you all for helping me reach this point. I can't say how happy I am for Invidious to be where it is now.
Enjoy the rest of your week everyone, I'll see you in November!
# 0.10.0 (2018-10-16)
## Week 10: Subscriptions
This week I'm happy to announce that subscriptions have been drastically sped up with
35e63fa. As I mentioned last week, this essentially "caches" a user's feed, meaning that operations that previously took 20 seconds or timed out, now can load in under a second. I'd take a look at [#173](https://github.com/omarroth/invidious/issues/173) for a sample benchmark. Previously features that made Invidious's feed so useful, such as filtering by unseen and by author would take too long to load, and so instead would timeout. I'm very happy that this has been fixed, and folks can get back to using these features.
Among some smaller features that have been added this week include [#118](https://github.com/omarroth/invidious/issues/118), which adds, in my opinion, some very attractive subscribe and unsubscribe buttons. I think it's also a bit of a functional improvement as well, since it doesn't require a user to reload the page in order to subscribe or unsubscribe to a channel, and also gives the opportunity to put the channel's sub count on display.
An option to swap between Reddit and YouTube comments without a page reload has been added with
5eefab6, bringing it somewhat closer in functionality to the popular [AlienTube](https://github.com/xlexi/alientube) extension, on which it is based (although the extension unfortunately appears now to be fragmented).
As always, there are a couple smaller improvements this week, including some minor fixes for geo-bypass with
e46e618 and [`245d0b5`](https://github.com/omarroth/invidious/245d0b5), playlist preferences with [`81b4477`](https://github.com/omarroth/invidious/81b4477), and YouTube comments with [`02335f3`](https://github.com/omarroth/invidious/02335f3).
This coming week I'd also recommend keeping an eye on the excellent [FreeTube](https://github.com/FreeTubeApp/FreeTube), which is looking forward to a new release. I've been very lucky to work with [**@PrestonN**](https://github.com/PrestonN) for the past few weeks to improve the Invidious API, and I'm quite looking forward to the new release.
That's all for this week folks, thank you all again for your continued interest and support.
# 0.9.0 (2018-10-08)
## Week 9: Playlists
Not as much to announce this week, but I'm still quite happy to announce a couple things, namely:
Playback support for playlists has finally been added with [`88430a6`](https://github.com/omarroth/invidious/88430a6). You can now view playlists with the `&list=` query param, as you would on YouTube. You can also view mixes with the mentioned `&list=`, although they require some extra handling that I would like to add in the coming week, as well as adding playlist looping and shuffle. I think playback support has been a roadblock for more exciting features such as [#114](https://github.com/omarroth/invidious/issues/114), and I look forward to improving the experience.
Comments have had a bit of a cosmetic upgrade with [#132](https://github.com/omarroth/invidious/issues/132), which I think helps better distinguish between Reddit and YouTube comments, as it makes them appear similarly to their respective sites. You can also now switch between YouTube and Reddit comments with a push of a button, which I think is quite an improvement, especially for newer or less popular videos with fewer comments.
I've had a small breakthrough in speeding up users' subscription feeds with PostgreSQL's [materialized views](https://www.postgresql.org/docs/current/static/rules-materializedviews.html). Without going into too much detail, materialized views essentially cache the result of a query, making it possible to run resource-intensive queries once, rather than every time a user visits their feed. In the coming week I hope to push this out to users, and hopefully close [#173](https://github.com/omarroth/invidious/issues/173).
I haven't had as much time to work on the project this week, but I'm quite happy to have added some new features. Have a great week everyone.
# 0.8.0 (2018-10-02)
## Week 8: Mixes
Hello again!
Mixes have been added with [`20130db`](https://github.com/omarroth/invidious/20130db), which makes it easy to create a playlist of related content. See [#188](https://github.com/omarroth/invidious/issues/188) for more info on how they work. Currently, they return the first 50 videos rather than a continuous feed to avoid tracking by Google/YouTube, which I think is a good trade-off between usability and privacy, and I hope other folks agree. You can create mixes by adding `RD` to the beginning of a video ID, an example is provided [here](https://www.invidio.us/mix?list=RDYE7VzlLtp-4) based on Big Buck Bunny. I've been quite happy with the results returned for the mixes I've tried, and it is not limited to music, which I think is a big plus. To emulate a continuous feed provided many are used to, using the last video of each mix as a new 'seed' has worked well for me. In the coming week I'd like to to add playback support in the player to listen to these easily.
A very big thanks to [**@flourgaz**](https://github.com/flourgaz) for Docker support with [#186](https://github.com/omarroth/invidious/pull/186). This is an enormous improvement in portability for the project, and opens the door for Heroku support (see [#162](https://github.com/omarroth/invidious/issues/162)), and seamless support on Windows. For most users, it should be as easy as running `docker-compose up`.
I've spent quite a bit of time this past week improving support for geo-bypass (see [#92](https://github.com/omarroth/invidious/issues/92)), and am happy to note that Invidious has been able to proxy ~50% of the geo-restricted videos I've tried. In addition, you can now watch geo-restricted videos if you have `dash` enabled as your `preferred quality`, for more details see [#34](https://github.com/omarroth/invidious/issues/34) and [#185](https://github.com/omarroth/invidious/issues/185), or last week's update. For folks interested in replicating these results for themselves, I'd take a look [here](https://gist.github.com/omarroth/3ce0f276c43e0c4b13e7d9cd35524688) for the script used, and [here](https://gist.github.com/omarroth/beffc4a76a7b82a422e1b36a571878ef) for a list of videos restricted in the US.
1080p has seen a fairly smooth roll-out, although there have been a couple issues reported, mainly [#193](https://github.com/omarroth/invidious/issues/193), which is likely an issue in the player. I've also encountered a couple other issues myself that I would like to investigate. Although none are major, I'd like to keep 1080p opt-in for registered users another week to better address these issues.
Have an excellent week everyone.
# 0.7.0 (2018-09-25)
## Week 7: 1080p and Search Types
Hello again everyone! I've got quite a couple announcements this week:
Experimental 1080p support has been added with [`b3ca392`](https://github.com/omarroth/invidious/b3ca392), and can be enabled by going to preferences and changing `preferred video quality` to `dash`. You can find more details [here](https://github.com/omarroth/invidious/issues/34#issuecomment-424171888). Currently quality and speed controls have not yet been integrated into the player, but I'd still appreciate feedback, mainly on any issues with buffering or DASH playback. I hope to integrate 1080p support into the player and push support site-wide in the coming weeks.
You can now filter content types in search with the `type:TYPE` filter. Supported content types are `playlist`, `channel`, and `video`. More info is available [here](https://github.com/omarroth/invidious/issues/126#issuecomment-423823148). I think this is quite an improvement in usability and I hope others find the same.
A [CHANGELOG](https://github.com/omarroth/invidious/blob/master/CHANGELOG.md) has been added to the repository, so folks will now receive a copy of all these updates when cloning. I think this is an improvement in hosting the project, as it is no longer tied to the `/releases` tab on Github or the posts on Patreon.
Recently, users have been reporting 504s when attempting to access their subscriptions, which is tracked in [#173](https://github.com/omarroth/invidious/issues/173). This is most likely caused by an uptick in usage, which I am absolutely grateful for, but unfortunately has resulted in an increase in costs for hosting the site, which is why I will be bumping my goal on Patreon from $60 to $80. I would appreciate any feedback on how subscriptions could be improved.
Other minor improvements include:
- Additional regions added to bypass geo-block with [`9a78523`](https://github.com/omarroth/invidious/9a78523)
- Fix for playlists containing less than 100 videos (previously shown as empty) with [`35ac887`](https://github.com/omarroth/invidious/35ac887)
- Fix for `published` date for Reddit comments (previously showing negative seconds) with [`6e09202`](https://github.com/omarroth/invidious/6e09202)
Thank you everyone for your support!
# 0.6.0 (2018-09-18)
## Week 6: Filters and Thumbnails
Hello again! This week I'm happy to mention a couple new features to search as well as some miscellaneous usability improvements.
You can now constrain your search query to a specific channel with the `channel:CHANNEL` filter (see [#165](https://github.com/omarroth/invidious/issues/165) for more details). Unfortunately, other search filters combined with channel search are not yet supported. I hope to add support for them in the coming weeks.
You can also now search only your subscriptions by adding `subscriptions:true` to your query (see [#30](https://github.com/omarroth/invidious/issues/30) for more details). It's not quite ready for widespread use but I would appreciate feedback as the site updates to fully support it. Other search filters are not yet supported with `subscriptions:true`, but I hope to add more functionality to this as well.
With [#153](https://github.com/omarroth/invidious/issues/153) and [#168](https://github.com/omarroth/invidious/issues/168) all images on the site are now proxied through Invidious. In addition to offering the user more protection from Google's eyes, it also allows the site to automatically pick out the highest resolution thumbnail for videos. I think this is quite a large aesthetic improvement and I hope others will find the same.
As a smaller improvement to the site, you can also now view RSS feeds for playlists with [#113](https://github.com/omarroth/invidious/issues/113).
These updates are also now listed under Github's [releases](https://github.com/omarroth/invidious/releases). I'm also planning on adding them as a `CHANGELOG.md` in the repository itself so people can receive a copy with the project's source.
That's all for this week. Thank you everyone for your support!
# 0.5.0 (2018-09-11)
## Week 5: Privacy and Security
I hope everyone had a good weekend! This past week I've been fixing some issues that have been brought to my attention to help better protect users and help them keep their anonymity.
An issue with open referers has been fixed with [`29a2186`](https://github.com/omarroth/invidious/29a2186), which prevents potential redirects to external sites on actions such as login or modifying preferences.
Additionally, X-XSS-Protection, X-Content-Type-Options, and X-Frame-Options headers have been added with [`96234e5`](https://github.com/omarroth/invidious/96234e5), which should keep users safer while using the site.
A potential XSS vector has also been fixed in YouTube comments with [`8c45694`](https://github.com/omarroth/invidious/8c45694).
All the above vulnerabilities were brought to my attention by someone who wishes to remain anonymous, but I would like to say again here how thankful I am. If anyone else would like to get in touch please feel free to email me at omarroth@hotmail.com or omarroth@protonmail.com.
This week a couple changes have been made to better protect user's privacy as well.
All CSS and JS assets are now served locally with [`3ec684a`](https://github.com/omarroth/invidious/3ec684a), which means users no longer need to whitelist unpkg.com. Although I personally have encountered few issues, I understand that many folks would like to keep their browsing activity contained to as few parties as possible. In the coming week I also hope to proxy YouTube images, so that no user data is sent to Google.
YouTube links in comments now should redirect properly to the Invidious alternate with [`1c8bd67`](https://github.com/omarroth/invidious/1c8bd67) and [`cf63c82`](https://github.com/omarroth/invidious/cf63c82), so users can more easily evade Google tracking.
I'm also happy to mention a couple quality of life features this week:
Invidious now shows a video's "license" if provided, see [#159](https://github.com/omarroth/invidious/issues/159) for more details. You can also search for videos licensed under the creative commons with "QUERY features:creative_commons".
Videos with only one source will always display the cog for changing quality, so that users can see what quality is currently playing. See [#158](https://github.com/omarroth/invidious/issues/158) for more details.
Folks have also probably noticed that the gutters on either side of the screen have been shrunk down quite significantly, so that more of the screen is filled with content. Hopefully this can be improved even more in the coming weeks.
"Music", "Sports", and "Popular on YouTube" channels now properly display their videos. You can subscribe to these channels just as you would normally.
This coming week I'm planning on spending time with my family, so I unfortunately may not be as responsive. I do still hope to add some smaller features for next week however, and I hope to continue development soon.
Thank you everyone again for your support.
# 0.4.0 (2018-09-06)
## Week 4: Genre Channels
Hello! I hope everyone enjoyed their weekend. Without further ado:
Just today genre channels have been added with [#119](https://github.com/omarroth/invidious/issues/119). More information on genre channels is available [here](https://support.google.com/youtube/answer/2579942). You can subscribe to them as normally, and view them as RSS. I think they offer an interesting alternative way to find new content and I hope people find them useful.
This past week folks have started reporting 504s on their subscription page (see [#144](https://github.com/omarroth/invidious/issues/144) for more details). Upgrading the database server appeared to fix the issue, as well as providing a smoother experience across the site. Unfortunately, that means I will be increasing the goal from $50 to $60 in order to meet the increased hosting costs.
With [#134](https://github.com/omarroth/invidious/issues/134), comments are now formatted correctly, providing support for bold, italics, and links in comments. I think this improvement makes them much easier to read, and I hope others find the same. Also to note is that links in both comments and the video description now no longer contain any of Google's tracking with [#115](https://github.com/omarroth/invidious/issues/115).
One of the major use cases for Invidious is as a stripped-down version of YouTube. In line with that, I'm happy to announce that you can now hide related videos if you're logged in, for users that prefer an even more lightweight experience.
Finally, I'm pleased to announce that Invidious has hit 100 stars on GitHub. I am very happy that Invidious has proven to be useful to so many people, and I can't say how grateful I am to everyone for their continued support.
Enjoy the rest of your week everyone!
# 0.3.0 (2018-09-06)
## Week 3: Quality of Life
Hello everyone! This week I've been working on some smaller features that will hopefully make the site more functional.
Search filters have been added with [#126](https://github.com/omarroth/invidious/issues/126). You can now specify 'sort', 'date', 'duration', and 'features' within your query using the 'operator:value' syntax. I'd recommend taking a look [here](https://github.com/omarroth/invidious/blob/master/src/invidious/search.cr#L33-L114) for a list of supported options and at [#126](https://github.com/omarroth/invidious/issues/126) for some examples. This also opens the door for features such as [#30](https://github.com/omarroth/invidious/issues/30) which can be implemented as filters. I think advanced search is a major point in which Invidious can improve on YouTube and hope to add more features soon!
This week a more advanced system for viewing fallback comments has been added (see [#84](https://github.com/omarroth/invidious/issues/84) for more details). You can now specify a comment fallback in your preferences, which Invidious will use. If, for example, no Reddit comments are available for a given video, it can choose to fallback on YouTube comments. This also makes it possible to turn comments off completely for users that prefer a more streamlined experience.
With [#98](https://github.com/omarroth/invidious/issues/98), it is now possible for users to specify preferences without creating an account. You can now change speed, volume, subtitles, autoplay, loop, and quality using query parameters. See the issue above for more details and several examples.
I'd also like to announce that I've set up an account on [Liberapay](https://liberapay.com/omarroth), for patrons that prefer a privacy-friendly alternative to Patreon. Liberapay also does not take any percentage of donations, so I'd recommend donating some to the Liberapay for their hard work. Go check it out!
[Two weeks ago](https://github.com/omarroth/invidious/releases/tag/0.1.0) I mentioned adding 1080p support into the player. Currently, the only thing blocking is [#207](https://github.com/videojs/http-streaming/pull/207) in the excellent [http-streaming](https://github.com/videojs/http-streaming) library. I hope to work with the videojs team to merge it soon and finally implement 1080p support!
That's all for this week, thank you again everyone for your support!
# 0.2.0 (2018-09-06)
## Week 2: Toward Playlists
Sorry for the late update! Not as much to announce this week, but still a couple things of note:
I'm happy to announce that a playlists page and API endpoint has been added so you can now view playlists. Currently, you cannot watch playlists through the player, but I hope to add that in the coming week as well as adding functionality to add and modify playlists. There is a good conversation on [#114](https://github.com/omarroth/invidious/issues/114) about giving playlists even more functionality, which I think is interesting and would appreciate feedback on.
As an update to the Invidious API announcement last week, I've been working with [**@PrestonN**](https://github.com/PrestonN), the developer of [FreeTube](https://github.com/FreeTubeApp/FreeTube), to help migrate his project to the Invidious API. Because of it's increasing popularity, he has had trouble keeping under the quota set by YouTube's API. I hope to improve the API to meet his and others needs and I'd recommend folks to keep an eye on his excellent project! There is a good discussion with his thoughts [here](https://github.com/FreeTubeApp/FreeTube/issues/100).
A couple of miscellaneous features and bugfixes:
- You can now login to Invidious simultaneously from multiple devices - [#109](https://github.com/omarroth/invidious/issues/109)
- Added a note for scheduled livestreams - [#124](https://github.com/omarroth/invidious/issues/124)
- Changed YouTube comment header to "View x comments" - [#120](https://github.com/omarroth/invidious/issues/120)
Enjoy your week everyone!
# 0.1.0 (2018-09-06)
## Week 1: Invidious API and Geo-Bypass
Hello everyone! This past week there have been quite a few things worthy of mention:
I'm happy to announce the [Invidious Developer API](https://github.com/omarroth/invidious/wiki/API). The Invidious API does not use any of the official YouTube APIs, and instead crawls the site to provide a JSON interface for other developers to use. It's still under development but is already powering [CloudTube](https://github.com/cloudrac3r/cadencegq). The API currently does not have a quota (compared to YouTube) which I hope to continue thanks to continued support from my Patrons. Hopefully other developers find it useful, and I hope to continue to improve it so it can better serve the community.
Just today partial support for bypassing geo-restrictions has been added with [fada57a](https://github.com/omarroth/invidious/commit/fada57a307d66d696d9286fc943c579a3fd22de6). If a video is unblocked in one of: United States, Canada, Germany, France, Japan, Russia, or United Kingdom, then Invidious will be able to serve video info. Currently you will not yet be able to access the video files themselves, but in the coming week I hope to proxy videos so that users can enjoy content across borders.
Support for generating DASH manifests has been fixed, in the coming week I hope to integrate this functionality into the watch page, so users can view videos in 1080p and above.
Thank you everyone for your continued interest and support!

128
Makefile Normal file
View File

@ -0,0 +1,128 @@
# -----------------------
# Compilation options
# -----------------------
RELEASE := 1
STATIC := 0
NO_DBG_SYMBOLS := 0
# Enable multi-threading.
# Warning: Experimental feature!!
# invidious is not stable when MT is enabled.
MT := 0
FLAGS ?=
ifeq ($(RELEASE), 1)
FLAGS += --release
endif
ifeq ($(STATIC), 1)
FLAGS += --static
endif
ifeq ($(MT), 1)
FLAGS += -Dpreview_mt
endif
ifeq ($(NO_DBG_SYMBOLS), 1)
FLAGS += --no-debug
else
FLAGS += --debug
endif
ifeq ($(API_ONLY), 1)
FLAGS += -Dapi_only
endif
# -----------------------
# Main
# -----------------------
all: invidious
get-libs:
shards install --production
# TODO: add support for ARM64 via cross-compilation
invidious: get-libs
crystal build src/invidious.cr $(FLAGS) --progress --stats --error-trace
run: invidious
./invidious
# -----------------------
# Development
# -----------------------
format:
crystal tool format
test:
crystal spec
verify:
crystal build src/invidious.cr -Dskip_videojs_download \
--no-codegen --progress --stats --error-trace
# -----------------------
# (Un)Install
# -----------------------
# TODO
# -----------------------
# Cleaning
# -----------------------
clean:
rm invidious
distclean: clean
rm -rf libs
rm -rf ~/.cache/{crystal,shards}
# -----------------------
# Help page
# -----------------------
help:
@echo "Targets available in this Makefile:"
@echo ""
@echo " get-libs Fetch Crystal libraries"
@echo " invidious Build Invidious"
@echo " run Launch Invidious"
@echo ""
@echo " format Run the Crystal formatter"
@echo " test Run tests"
@echo " verify Just make sure that the code compiles, but without"
@echo " generating any binaries. Useful to search for errors"
@echo ""
@echo " clean Remove build artifacts"
@echo " distclean Remove build artifacts and libraries"
@echo ""
@echo ""
@echo "Build options available for this Makefile:"
@echo ""
@echo " RELEASE Make a release build (Default: 1)"
@echo " STATIC Link libraries statically (Default: 0)"
@echo ""
@echo " API_ONLY Build invidious without a GUI (Default: 0)"
@echo " NO_DBG_SYMBOLS Strip debug symbols (Default: 0)"
# No targets generates an output named after themselves
.PHONY: all get-libs build amd64 run
.PHONY: format test verify clean distclean help

190
README.md
View File

@ -1,107 +1,159 @@
<h1 align="center">Invidious</h1> <div align="center">
<img src="assets/invidious-colored-vector.svg" width="192" height="192" alt="Invidious logo">
<h1>Invidious</h1>
<h2 align="center">Invidious is an alternative front-end to YouTube.</h2> <a href="https://www.gnu.org/licenses/agpl-3.0.en.html">
<img alt="License: AGPLv3" src="https://shields.io/badge/License-AGPL%20v3-blue.svg">
</a>
<a href="https://github.com/iv-org/invidious/actions">
<img alt="Build Status" src="https://github.com/iv-org/invidious/workflows/Invidious%20CI/badge.svg">
</a>
<a href="https://github.com/iv-org/invidious/commits/master">
<img alt="GitHub commits" src="https://img.shields.io/github/commit-activity/y/iv-org/invidious?color=red&label=commits">
</a>
<a href="https://github.com/iv-org/invidious/issues">
<img alt="GitHub issues" src="https://img.shields.io/github/issues/iv-org/invidious?color=important">
</a>
<a href="https://github.com/iv-org/invidious/pulls">
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/iv-org/invidious?color=blueviolet">
</a>
<a href="https://hosted.weblate.org/engage/invidious/">
<img alt="Translation Status" src="https://hosted.weblate.org/widgets/invidious/-/translations/svg-badge.svg">
</a>
--- <a href="https://github.com/humanetech-community/awesome-humane-tech">
<img alt="Awesome Humane Tech" src="https://raw.githubusercontent.com/humanetech-community/awesome-humane-tech/main/humane-tech-badge.svg?sanitize=true">
</a>
## Invidious instances: <h3>An open source alternative front-end to YouTube</h3>
Public Invidious instances are listed on the documentation website: https://instances.invidious.io/ <a href="https://invidious.io/">Website</a>
&nbsp;&nbsp;
<a href="https://instances.invidious.io/">Instances list</a>
&nbsp;&nbsp;
<a href="https://docs.invidious.io/faq/">FAQ</a>
&nbsp;&nbsp;
<a href="https://docs.invidious.io/">Documentation</a>
&nbsp;&nbsp;
<a href="#contribute">Contribute</a>
&nbsp;&nbsp;
<a href="https://invidious.io/donate/">Donate</a>
--- <h5>Chat with us:</h5>
<a href="https://matrix.to/#/#invidious:matrix.org">
<img alt="Matrix" src="https://img.shields.io/matrix/invidious:matrix.org?label=Matrix&color=darkgreen">
</a>
<a href="https://web.libera.chat/?channel=#invidious">
<img alt="Libera.chat (IRC)" src="https://img.shields.io/badge/IRC%20%28Libera.chat%29-%23invidious-darkgreen">
</a>
<br>
<a rel="me" href="https://social.tchncs.de/@invidious">
<img alt="Fediverse: @invidious@social.tchncs.de" src="https://img.shields.io/badge/Fediverse-%40invidious%40social.tchncs.de-darkgreen">
</a>
<br>
<a href="https://invidious.io/contact/">
<img alt="E-mail" src="https://img.shields.io/badge/E%2d%2dmail-darkgreen">
</a>
</div>
## Invidious features:
- [Copylefted libre software](https://github.com/iv-org/invidious) (AGPLv3+ licensed) ## Screenshots
- Lightweight (the homepage is ~4 KB compressed)
- No ads
- No tracking
- Javascript is 100% optional
- Tools for managing subscriptions:
- Only show unseen videos
- Only show latest (or latest unseen) video from each channel
- Delivers notifications from all subscribed channels
- Automatically redirect homepage to feed
- Import subscriptions from YouTube
- Audio-only mode (and no need to keep window open on mobile)
- Dark mode
- Embed support
- Set default player options (speed, quality, autoplay, loop)
- Support for Reddit comments in place of YouTube comments
- Import/Export subscriptions, watch history, preferences
- [Developer API](https://docs.invidious.io/API.md)
- Does not use any of the official YouTube APIs
- No need to create a Google account to save subscriptions
- No Code of Conduct
- No Contributor license Agreement
- Available in many languages, thanks to [Weblate](https://hosted.weblate.org/projects/invidious/)
---
## Screenshots:
| Player | Preferences | Subscriptions | | Player | Preferences | Subscriptions |
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | |-------------------------------------|-------------------------------------|---------------------------------------|
| [<img src="screenshots/01_player.png?raw=true" height="140" width="280">](screenshots/01_player.png?raw=true) | [<img src="screenshots/02_preferences.png?raw=true" height="140" width="280">](screenshots/02_preferences.png?raw=true) | [<img src="screenshots/03_subscriptions.png?raw=true" height="140" width="280">](screenshots/03_subscriptions.png?raw=true) | | ![](screenshots/01_player.png) | ![](screenshots/02_preferences.png) | ![](screenshots/03_subscriptions.png) |
| [<img src="screenshots/04_description.png?raw=true" height="140" width="280">](screenshots/04_description.png?raw=true) | [<img src="screenshots/05_preferences.png?raw=true" height="140" width="280">](screenshots/05_preferences.png?raw=true) | [<img src="screenshots/06_subscriptions.png?raw=true" height="140" width="280">](screenshots/06_subscriptions.png?raw=true) | | ![](screenshots/04_description.png) | ![](screenshots/05_preferences.png) | ![](screenshots/06_subscriptions.png) |
---
## Donate: ## Features
Bitcoin (BTC): [bc1qfhe7rq3lqzuayzjxzyt9waz9ytrs09kla3tsgr](bitcoin:bc1qfhe7rq3lqzuayzjxzyt9waz9ytrs09kla3tsgr) **User features**
- Lightweight
- No ads
- No tracking
- No JavaScript required
- Light/Dark themes
- Customizable homepage
- Subscriptions independent from Google
- Notifications for all subscribed channels
- Audio-only mode (with background play on mobile)
- Support for Reddit comments
- [Available in many languages](locales/), thanks to [our translators](#contribute)
Monero (XMR): [41nMCtek197boJtiUvGnTFYMatrLEpnpkQDmUECqx5Es2uX3sTKKWVhSL76suXsG3LXqkEJBrCZBgPTwJrDp1FrZJfycGPR](monero:41nMCtek197boJtiUvGnTFYMatrLEpnpkQDmUECqx5Es2uX3sTKKWVhSL76suXsG3LXqkEJBrCZBgPTwJrDp1FrZJfycGPR) **Data import/export**
- Import subscriptions from YouTube, NewPipe and Freetube
- Import watch history from YouTube and NewPipe
- Export subscriptions to NewPipe and Freetube
- Import/Export Invidious user data
--- **Technical features**
- Embedded video support
- [Developer API](https://docs.invidious.io/api/)
- Does not use official YouTube APIs
- No Contributor License Agreement (CLA)
## Documentation:
The complete documentation is available on https://docs.invidious.io/ (or alternatively on its own [Github repository](https://github.com/iv-org/documentation)). ## Quick start
--- **Using invidious:**
## Extensions: - [Select a public instance from the list](https://instances.invidious.io) and start watching videos right now!
[Extensions](https://docs.invidious.io/Extensions.md) can be found in the wiki, as well as documentation for integrating it into other projects. **Hosting invidious:**
--- - [Follow the installation instructions](https://docs.invidious.io/installation/)
## Made with Invidious:
- [FreeTube](https://github.com/FreeTubeApp/FreeTube): A libre software YouTube app for privacy. ## Documentation
- [CloudTube](https://sr.ht/~cadence/tube/): A JavaScript-rich alternate YouTube player.
- [PeerTubeify](https://gitlab.com/Cha_deL/peertubeify): On YouTube, displays a link to the same video on PeerTube, if it exists.
- [MusicPiped](https://github.com/deep-gaurav/MusicPiped): A material design music player that streams music from YouTube.
- [HoloPlay](https://github.com/stephane-r/HoloPlay): Funny Android application connecting on Invidious API's with search, playlists and favoris.
--- The full documentation can be accessed online at https://docs.invidious.io/
## Contributing: The documentation's source code is available in this repository:
https://github.com/iv-org/documentation
[![Build Status](https://github.com/iv-org/invidious/workflows/Invidious%20CI/badge.svg)](https://github.com/iv-org/invidious/actions) [![Translation Status](https://hosted.weblate.org/widgets/invidious/-/translations/svg-badge.svg)](https://hosted.weblate.org/engage/invidious/) ### Extensions
We highly recommend the use of [Privacy Redirect](https://github.com/SimonBrazell/privacy-redirect#get),
a browser extension that automatically redirects Youtube URLs to any Invidious instance and replaces
embedded youtube videos on other websites with invidious.
The documentation contains a list of browser extensions that we recommended to use along with Invidious.
You can read more here: https://docs.invidious.io/applications/
## Contribute
### Code
1. Fork it ( https://github.com/iv-org/invidious/fork ). 1. Fork it ( https://github.com/iv-org/invidious/fork ).
2. Create your feature branch (git checkout -b my-new-feature). 1. Create your feature branch (`git checkout -b my-new-feature`).
3. Commit your changes (git commit -am 'Add some feature'). 1. Stage your files (`git add .`).
4. Push to the branch (git push origin my-new-feature). 1. Commit your changes (`git commit -am 'Add some feature'`).
5. Create a new pull request. 1. Push to the branch (`git push origin my-new-feature`).
1. Create a new pull request ( https://github.com/iv-org/invidious/compare ).
### Translation: ### Translations
- Log in with an account you have elsewhere, or register an account and start translating at [Hosted Weblate](https://hosted.weblate.org/engage/invidious/). We use [Weblate](https://weblate.org) to manage Invidious translations.
--- You can suggest new translations and/or correction here: https://hosted.weblate.org/engage/invidious/.
## Contact: Creating an account is not required, but recommended, especially if you want to contribute regularly.
Weblate also allows you to log-in with major SSO providers like Github, Gitlab, BitBucket, Google, ...
Feel free to join our [Matrix room](https://matrix.to/#/#invidious:matrix.org).
--- ## Projects using Invidious
## Liability: A list of projects and extensions for or utilizing Invidious can be found in the documentation: https://docs.invidious.io/applications/
We take no responsibility for the use of our tool, or external instances provided by third parties. We strongly recommend you abide by the valid official regulations in your country. Furthermore, we refuse liability for any inappropriate use of Invidious, such as illegal downloading. This tool is provided to you in the spirit of free, open software. ## Liability
We take no responsibility for the use of our tool, or external instances
provided by third parties. We strongly recommend you abide by the valid
official regulations in your country. Furthermore, we refuse liability
for any inappropriate use of Invidious, such as illegal downloading.
This tool is provided to you in the spirit of free, open software.
You may view the LICENSE in which this software is provided to you [here](./LICENSE). You may view the LICENSE in which this software is provided to you [here](./LICENSE).

119
assets/css/carousel.css Normal file
View File

@ -0,0 +1,119 @@
/*
Copyright (c) 2024 by Jennifer (https://codepen.io/jwjertzoch/pen/JjyGeRy)
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall
be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
.carousel {
margin: 0 auto;
overflow: hidden;
text-align: center;
}
.slides {
width: 100%;
display: flex;
overflow-x: scroll;
scrollbar-width: none;
scroll-snap-type: x mandatory;
scroll-behavior: smooth;
}
.slides::-webkit-scrollbar {
display: none;
}
.slides-item {
align-items: center;
border-radius: 10px;
display: flex;
flex-shrink: 0;
font-size: 100px;
height: 600px;
justify-content: center;
margin: 0 1rem;
position: relative;
scroll-snap-align: start;
transform: scale(1);
transform-origin: center center;
transition: transform .5s;
width: 100%;
}
.carousel__nav {
padding: 1.25rem .5rem;
}
.slider-nav {
align-items: center;
background-color: #ddd;
border-radius: 50%;
color: #000;
display: inline-flex;
height: 1.5rem;
justify-content: center;
padding: .5rem;
position: relative;
text-decoration: none;
width: 1.5rem;
}
.skip-link {
height: 1px;
overflow: hidden;
position: absolute;
top: auto;
width: 1px;
}
.skip-link:focus {
align-items: center;
background-color: #000;
color: #fff;
display: flex;
font-size: 30px;
height: 30px;
justify-content: center;
opacity: .8;
text-decoration: none;
width: 50%;
z-index: 1;
}
.light-theme .slider-nav {
background-color: #ddd;
}
.dark-theme .slider-nav {
background-color: #0005;
}
@media (prefers-color-scheme: light) {
.no-theme .slider-nav {
background-color: #ddd;
}
}
@media (prefers-color-scheme: dark) {
.no-theme .slider-nav {
background-color: #0005;
}
}

View File

@ -1,3 +1,7 @@
/*
* Common attributes
*/
html, html,
body { body {
font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", Roboto, Oxygen, font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", Roboto, Oxygen,
@ -9,16 +13,61 @@ body {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
min-height: 100vh; min-height: 100vh;
margin: auto;
}
.h-box {
padding-left: 1em;
padding-right: 1em;
}
.v-box {
padding-top: 1em;
padding-bottom: 1em;
} }
.deleted { .deleted {
background-color: rgb(255, 0, 0, 0.5); background-color: rgb(255, 0, 0, 0.5);
} }
.underlined {
border-bottom: 1px solid;
margin-bottom: 20px;
}
.title {
margin: 0.5em 0 1em 0;
}
/* A flex container */
.flexible {
display: flex;
align-items: center;
}
.flex-left {
display: flex;
flex: 1 1 auto;
flex-flow: row wrap;
justify-content: flex-start;
}
.flex-right {
display: flex;
flex: 2 0 auto;
flex-flow: row nowrap;
justify-content: flex-end;
}
/*
* Channel page
*/
.channel-profile > * { .channel-profile > * {
font-size: 1.17em; font-size: 1.17em;
font-weight: bold; font-weight: bold;
vertical-align: middle; vertical-align: middle;
border-radius: 50%;
} }
.channel-profile > img { .channel-profile > img {
@ -40,6 +89,7 @@ body a.channel-owner {
} }
.creator-heart { .creator-heart {
display: inline-block;
position: relative; position: relative;
width: 16px; width: 16px;
height: 16px; height: 16px;
@ -60,6 +110,7 @@ body a.channel-owner {
} }
.creator-heart-small-container { .creator-heart-small-container {
display: block;
position: relative; position: relative;
width: 13px; width: 13px;
height: 13px; height: 13px;
@ -82,16 +133,6 @@ body a.channel-owner {
} }
} }
.h-box {
padding-left: 1em;
padding-right: 1em;
}
.v-box {
padding-top: 1em;
padding-bottom: 1em;
}
div { div {
overflow-wrap: break-word; overflow-wrap: break-word;
word-wrap: break-word; word-wrap: break-word;
@ -107,62 +148,108 @@ div {
padding-right: 10px; padding-right: 10px;
} }
/*
* Buttons
*/
body a.pure-button { body a.pure-button {
color: rgba(0,0,0,.8); color: rgba(0,0,0,.8);
} }
button.pure-button-primary, button.pure-button-primary,
body a.pure-button-primary, body a.pure-button-primary,
.channel-owner:hover { .channel-owner:hover,
.channel-owner:focus {
background-color: #a0a0a0; background-color: #a0a0a0;
color: rgba(35, 35, 35, 1); color: rgba(35, 35, 35, 1);
} }
button.pure-button-primary:hover, .pure-button-primary,
body a.pure-button-primary:hover { .pure-button-secondary {
background-color: rgba(0, 182, 240, 1); border: 1px solid #a0a0a0;
color: #fff; border-radius: 3px;
margin: 0 .4em;
} }
.pure-button-secondary.low-profile {
padding: 5px 10px;
margin: 0;
}
/* Has to be combined with flex-left/right */
.button-container {
flex-flow: wrap;
gap: 0.5em 0.75em;
}
/*
* Video thumbnails
*/
div.thumbnail { div.thumbnail {
padding: 28.125%;
position: relative; position: relative;
width: 100%;
box-sizing: border-box; box-sizing: border-box;
} }
img.thumbnail { img.thumbnail {
position: absolute; display: block; /* See: https://stackoverflow.com/a/11635197 */
width: 100%; width: 100%;
height: 100%;
left: 0;
top: 0;
object-fit: cover; object-fit: cover;
aspect-ratio: 16 / 9;
} }
.thumbnail-placeholder {
min-height: 50px;
border: 2px dotted;
}
div.watched-overlay {
z-index: 50;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(255,255,255,.4);
}
div.watched-indicator {
position: absolute;
left: 0;
bottom: 0;
height: 4px;
width: 100%;
background-color: red;
}
div.thumbnail > .top-left-overlay,
div.thumbnail > .bottom-right-overlay {
z-index: 100;
position: absolute;
padding: 0;
margin: 0;
font-size: 16px;
}
.top-left-overlay { top: 0.6em; left: 0.6em; }
.bottom-right-overlay { bottom: 0.6em; right: 0.6em; }
.length { .length {
z-index: 100; padding: 1px;
position: absolute; margin: -2px 0;
background-color: rgba(35, 35, 35, 0.75);
color: #fff; color: #fff;
border-radius: 2px; border-radius: 3px;
padding: 2px;
font-size: 16px;
right: 0.25em;
bottom: -0.75em;
} }
.watched { .length, .top-left-overlay button {
z-index: 100; color: #eee;
position: absolute; background-color: rgba(35, 35, 35, 0.85) !important;
background-color: rgba(35, 35, 35, 0.75);
color: #fff;
border-radius: 2px;
padding: 4px 8px 4px 8px;
font-size: 16px;
left: 0.2em;
top: -0.7em;
} }
/* /*
* Navbar * Navbar
*/ */
@ -191,22 +278,36 @@ img.thumbnail {
display: inline; display: inline;
} }
.searchbar .pure-form input[type="search"] { .searchbar .pure-form {
margin-bottom: 1px; display: flex;
}
border-top: 0; .searchbar .pure-form fieldset {
border-left: 0; padding: 0;
border-right: 0; flex: 1;
border-bottom: 1px solid #ccc; }
.searchbar input[type="search"] {
width: 100%;
margin: 1px;
border: 1px solid;
border-color: rgba(0,0,0,0);
border-bottom-color: #CCC;
border-radius: 0; border-radius: 0;
padding: initial 0;
box-shadow: none; box-shadow: none;
appearance: none;
-webkit-appearance: none; -webkit-appearance: none;
} }
.searchbar input[type="search"]:focus {
margin: 0;
border: 2px solid;
border-color: rgba(0,0,0,0);
border-bottom-color: #FED;
}
/* https://stackoverflow.com/a/55170420 */ /* https://stackoverflow.com/a/55170420 */
input[type="search"]::-webkit-search-cancel-button { input[type="search"]::-webkit-search-cancel-button {
-webkit-appearance: none; -webkit-appearance: none;
@ -216,14 +317,14 @@ input[type="search"]::-webkit-search-cancel-button {
background-size: 14px; background-size: 14px;
} }
.searchbar .pure-form fieldset { .searchbar #searchbutton {
padding: 0; border: none;
background: none;
margin-top: 0;
} }
/* attract focus to the searchbar by adding a subtle transition */ .searchbar #searchbutton:hover {
.searchbar .pure-form input[type="search"]:focus { color: rgb(0, 182, 240);
margin-bottom: 0px;
border-bottom: 2px solid #aaa;
} }
.user-field { .user-field {
@ -234,13 +335,18 @@ input[type="search"]::-webkit-search-cancel-button {
} }
.user-field div { .user-field div {
width: initial; width: auto;
} }
.user-field div:not(:last-child) { .user-field div:not(:last-child) {
margin-right: 1em; margin-right: 1em;
} }
/*
* Responsive rules
*/
@media only screen and (max-aspect-ratio: 16/9) { @media only screen and (max-aspect-ratio: 16/9) {
.player-dimensions.vjs-fluid { .player-dimensions.vjs-fluid {
padding-top: 46.86% !important; padding-top: 46.86% !important;
@ -259,20 +365,28 @@ input[type="search"]::-webkit-search-cancel-button {
.navbar > div { .navbar > div {
display: flex; display: flex;
justify-content: center; justify-content: center;
} margin-bottom: 25px;
.navbar > div:not(:last-child) {
margin-bottom: 1em;
} }
.navbar > .searchbar > form { .navbar > .searchbar > form {
width: 60%; width: 75%;
} }
h1 { h1 {
font-size: 1.25em; font-size: 1.25em;
margin: 0.42em 0; margin: 0.42em 0;
} }
/* Space out the subscribe & RSS buttons and align them to the left */
.title.flexible { display: block; }
.title.flexible > .flex-right { margin: 0.75em 0; justify-content: flex-start; }
/* Space out buttons to make them easier to tap */
.user-field { font-size: 125%; }
.user-field > :not(:last-child) { margin-right: 1.75em; }
.icon-buttons { font-size: 125%; }
.icon-buttons > :not(:last-child) { margin-right: 0.75em; }
} }
@media screen and (max-width: 320px) { @media screen and (max-width: 320px) {
@ -282,21 +396,95 @@ input[type="search"]::-webkit-search-cancel-button {
} }
} }
/*
* Video "cards" (results/playlist/channel videos)
*/
.video-card-row { margin: 15px 0; }
p.channel-name { margin: 0; }
p.video-data { margin: 0; font-weight: bold; font-size: 80%; }
/*
* Comments & community posts
*/
.comments {
max-width: 800px;
margin: auto;
}
/*
* We don't want the top and bottom margin on the post page.
*/
.comments.post-comments {
margin-bottom: 0;
margin-top: 0;
}
.video-iframe-wrapper {
position: relative;
height: 0;
padding-bottom: 56.25%;
}
.video-iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: none;
}
/*
* Page navigation
*/
.page-nav-container { margin: 15px 0 30px 0; }
.page-prev-container { text-align: start; }
.page-next-container { text-align: end; }
.page-prev-container,
.page-next-container {
display: inline-block;
}
/* /*
* Footer * Footer
*/ */
footer { footer {
color: #919191;
margin-top: auto; margin-top: auto;
padding: 1.5em 0; padding: 1.5em 0;
text-align: center; text-align: center;
max-height: 30vh; max-height: 30vh;
} }
footer a { .light-theme footer {
color: #919191 !important; color: #7c7c7c;
text-decoration: underline; }
.dark-theme footer {
color: #adadad;
}
.light-theme footer a {
color: #7c7c7c !important;
}
.dark-theme footer a {
color: #adadad !important;
}
footer span {
margin: 4px 0;
display: block;
} }
/* keyframes */ /* keyframes */
@ -319,18 +507,31 @@ span > select {
word-wrap: normal; word-wrap: normal;
} }
/* /*
* Light theme * Light theme
*/ */
.light-theme a:hover, .light-theme a:hover,
.light-theme a:active, .light-theme a:active,
.light-theme summary:hover { .light-theme summary:hover,
.light-theme a:focus,
.light-theme summary:focus {
color: #075A9E !important; color: #075A9E !important;
} }
.light-theme a.pure-button-primary:hover { .light-theme .pure-button-primary:hover,
.light-theme .pure-button-primary:focus,
.light-theme .pure-button-secondary:hover,
.light-theme .pure-button-secondary:focus {
color: #fff !important; color: #fff !important;
border-color: rgba(0, 182, 240, 0.75) !important;
background-color: rgba(0, 182, 240, 0.75) !important;
}
.light-theme .pure-button-secondary:not(.low-profile) {
color: #335d7a;
background-color: #fff2;
} }
.light-theme a { .light-theme a {
@ -352,12 +553,24 @@ span > select {
@media (prefers-color-scheme: light) { @media (prefers-color-scheme: light) {
.no-theme a:hover, .no-theme a:hover,
.no-theme a:active, .no-theme a:active,
.no-theme summary:hover { .no-theme summary:hover,
.no-theme a:focus,
.no-theme summary:focus {
color: #075A9E !important; color: #075A9E !important;
} }
.no-theme a.pure-button-primary:hover { .no-theme .pure-button-primary:hover,
.no-theme .pure-button-primary:focus,
.no-theme .pure-button-secondary:hover,
.no-theme .pure-button-secondary:focus {
color: #fff !important; color: #fff !important;
border-color: rgba(0, 182, 240, 0.75) !important;
background-color: rgba(0, 182, 240, 0.75) !important;
}
.no-theme .pure-button-secondary:not(.low-profile) {
color: #335d7a;
background-color: #fff2;
} }
.no-theme a { .no-theme a {
@ -372,23 +585,48 @@ span > select {
color: #303030; color: #303030;
} }
.no-theme footer {
color: #7c7c7c;
}
.no-theme footer a {
color: #7c7c7c !important;
}
.light-theme .pure-menu-heading { .light-theme .pure-menu-heading {
color: #565d64; color: #565d64;
} }
} }
/* /*
* Dark theme * Dark theme
*/ */
.dark-theme a:hover, .dark-theme a:hover,
.dark-theme a:active, .dark-theme a:active,
.dark-theme summary:hover { .dark-theme summary:hover,
.dark-theme a:focus,
.dark-theme summary:focus {
color: rgb(0, 182, 240); color: rgb(0, 182, 240);
} }
.dark-theme .pure-button-primary:hover,
.dark-theme .pure-button-primary:focus,
.dark-theme .pure-button-secondary:hover,
.dark-theme .pure-button-secondary:focus {
color: #fff !important;
border-color: rgb(0, 182, 240) !important;
background-color: rgba(0, 182, 240, 1) !important;
}
.dark-theme .pure-button-secondary {
background-color: #0002;
color: #ddd;
}
.dark-theme a { .dark-theme a {
color: #a0a0a0; color: #adadad;
text-decoration: none; text-decoration: none;
} }
@ -422,12 +660,27 @@ body.dark-theme {
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
.no-theme a:hover, .no-theme a:hover,
.no-theme a:active { .no-theme a:active,
.no-theme a:focus {
color: rgb(0, 182, 240); color: rgb(0, 182, 240);
} }
.no-theme .pure-button-primary:hover,
.no-theme .pure-button-primary:focus,
.no-theme .pure-button-secondary:hover,
.no-theme .pure-button-secondary:focus {
color: #fff !important;
border-color: rgb(0, 182, 240) !important;
background-color: rgba(0, 182, 240, 1) !important;
}
.no-theme .pure-button-secondary {
background-color: #0002;
color: #ddd;
}
.no-theme a { .no-theme a {
color: #a0a0a0; color: #adadad;
text-decoration: none; text-decoration: none;
} }
@ -458,52 +711,41 @@ body.dark-theme {
background-color: inherit; background-color: inherit;
color: inherit; color: inherit;
} }
.no-theme footer {
color: #adadad;
}
.no-theme footer a {
color: #adadad !important;
}
} }
#filters {
display: inline;
margin-top: 15px;
}
#filters > div { /*
display: inline-block; * Miscellanous
} */
#filters > summary {
display: block;
margin-bottom: 15px;
}
#filters > summary::before {
content: "[ + ]";
font-size: 1.5em;
}
#filters[open] > summary::before {
content: "[ - ]";
font-size: 1.5em;
}
/*With commit d9528f5 all contents of the page is now within a flexbox. However, /*With commit d9528f5 all contents of the page is now within a flexbox. However,
the hr element is rendered improperly within one. the hr element is rendered improperly within one.
See https://stackoverflow.com/a/34372979 for more info */ See https://stackoverflow.com/a/34372979 for more info */
hr { hr {
margin: auto 0 auto 0; margin: 10px 0 10px 0;
} }
/* Description Expansion Styling*/ /* Description Expansion Styling*/
#description-box { #descexpansionbutton,
display: flex; #music-desc-expansion {
flex-direction: column; display: none;
}
#descexpansionbutton {
display: none
} }
#descexpansionbutton ~ div { #descexpansionbutton ~ div {
overflow: hidden; overflow: hidden;
height: 8.3em; }
#descexpansionbutton:not(:checked) ~ div {
max-height: 8.3em;
} }
#descexpansionbutton:checked ~ div { #descexpansionbutton:checked ~ div {
@ -511,7 +753,66 @@ hr {
height: 100%; height: 100%;
} }
#descexpansionbutton + label { #descexpansionbutton ~ label {
order: 1; order: 1;
margin-top: 20px; margin-top: 20px;
} }
label[for="descexpansionbutton"]:hover,
label[for="music-desc-expansion"]:hover {
cursor: pointer;
}
/* Bidi (bidirectional text) support */
h1, h2, h3, h4, h5, p,
#descriptionWrapper,
#description-box,
#music-description-box {
unicode-bidi: plaintext;
text-align: start;
}
#descriptionWrapper {
max-width: 600px;
white-space: pre-wrap;
}
#music-description-box {
display: none;
}
#music-desc-expansion:checked ~ #music-description-box {
display: block;
}
#music-desc-expansion ~ label > h3 > .ion-ios-arrow-up,
#music-desc-expansion:checked ~ label > h3 > .ion-ios-arrow-down {
display: none;
}
#music-desc-expansion:checked ~ label > h3 > .ion-ios-arrow-up,
#music-desc-expansion ~ label > h3 > .ion-ios-arrow-down {
display: inline;
}
/* Select all the music items except the first one */
.music-item + .music-item {
border-top: 1px solid #ffffff;
}
/* Center the "invidious" logo on the search page */
#logo > h1 { text-align: center; }
/* IE11 fixes */
:-ms-input-placeholder { color: #888; }
/* Wider settings name to less word wrap */
.pure-form-aligned .pure-control-group label { width: 19em; }
.channel-emoji {
margin: 0 2px;
}
#download_widget {
width: 100%;
}

View File

@ -21,6 +21,7 @@
color: white; color: white;
} }
.watch-on-invidious > a:hover { .watch-on-invidious > a:hover,
.watch-on-invidious > a:focus {
color: rgba(0, 182, 240, 1);; color: rgba(0, 182, 240, 1);;
} }

View File

@ -68,8 +68,12 @@
.video-js.player-style-youtube .vjs-menu-button-popup .vjs-menu { .video-js.player-style-youtube .vjs-menu-button-popup .vjs-menu {
margin-bottom: 2em; margin-bottom: 2em;
padding-top: 2em
} }
.video-js.player-style-youtube .vjs-progress-control .vjs-progress-holder, .video-js.player-style-youtube .vjs-progress-control {height: 5px;
margin-bottom: 10px;}
ul.vjs-menu-content::-webkit-scrollbar { ul.vjs-menu-content::-webkit-scrollbar {
display: none; display: none;
} }
@ -98,23 +102,27 @@ ul.vjs-menu-content::-webkit-scrollbar {
order: 2; order: 2;
} }
.vjs-quality-selector, .vjs-audio-button {
.video-js .vjs-http-source-selector {
order: 3; order: 3;
} }
.vjs-playback-rate { .vjs-quality-selector,
.video-js .vjs-http-source-selector {
order: 4; order: 4;
} }
.vjs-share-control { .vjs-playback-rate {
order: 5; order: 5;
} }
.vjs-fullscreen-control { .vjs-share-control {
order: 6; order: 6;
} }
.vjs-fullscreen-control {
order: 7;
}
.vjs-playback-rate > .vjs-menu { .vjs-playback-rate > .vjs-menu {
width: 50px; width: 50px;
} }
@ -168,11 +176,14 @@ ul.vjs-menu-content::-webkit-scrollbar {
.video-js.player-style-invidious .vjs-play-progress { .video-js.player-style-invidious .vjs-play-progress {
background-color: rgba(0, 182, 240, 1); background-color: rgba(0, 182, 240, 1);
} }
vjs-menu-content
/* Overlay */ /* Overlay */
.video-js .vjs-overlay { .video-js .vjs-overlay {
background-color: rgba(35, 35, 35, 0.75); background-color: rgba(35, 35, 35, 0.75) !important;
color: rgba(255, 255, 255, 1); }
.video-js .vjs-overlay * {
color: rgba(255, 255, 255, 1) !important;
text-align: center;
} }
/* ProgressBar marker */ /* ProgressBar marker */
@ -218,6 +229,10 @@ video.video-js {
#player-container { #player-container {
position: relative; position: relative;
padding-left: 0;
padding-right: 0;
margin-left: 1em;
margin-right: 1em;
padding-bottom: 82vh; padding-bottom: 82vh;
height: 0; height: 0;
} }

121
assets/css/search.css Normal file
View File

@ -0,0 +1,121 @@
summary {
/* This should hide the marker */
display: block;
font-size: 1.17em;
font-weight: bold;
margin: 0 auto 10px auto;
cursor: pointer;
}
summary::-webkit-details-marker,
summary::marker { display: none; }
summary:before {
border-radius: 5px;
content: "[ + ]";
margin: -2px 10px 0 10px;
padding: 1px 0 3px 0;
text-align: center;
width: 40px;
}
details[open] > summary:before { content: "[ ]"; }
#filters-box {
padding: 10px 20px 20px 10px;
margin: 10px 15px;
}
#filters-flex {
display: flex;
flex-wrap: wrap;
flex-direction: row;
align-items: flex-start;
align-content: flex-start;
justify-content: flex-start;
}
fieldset, legend {
display: contents !important;
border: none !important;
margin: 0 !important;
padding: 0 !important;
}
.filter-column {
display: inline-block;
display: inline-flex;
width: max-content;
min-width: max-content;
max-width: 16em;
margin: 15px;
flex-grow: 2;
flex-basis: auto;
flex-direction: column;
}
.filter-name, .filter-options {
display: block;
padding: 5px 10px;
margin: 0;
text-align: start;
}
.filter-options div { margin: 6px 0; }
.filter-options div * { vertical-align: middle; }
.filter-options label { margin: 0 10px; }
#filters-apply {
text-align: right; /* IE11 only */
text-align: end; /* Override for compatible browsers */
}
/* Error message */
.no-results-error {
text-align: center;
line-height: 180%;
font-size: 110%;
padding: 15px 15px 125px 15px;
}
/* Responsive rules */
@media only screen and (max-width: 800px) {
summary { font-size: 1.30em; }
#filters-box {
margin: 10px 0 0 0;
padding: 0;
}
#filters-apply {
text-align: center;
padding: 15px;
}
}
/* Light theme */
.light-theme #filters-box {
background: #dfdfdf;
}
@media (prefers-color-scheme: light) {
.no-theme #filters-box {
background: #dfdfdf;
}
}
/* Dark theme */
.dark-theme #filters-box {
background: #373737;
}
@media (prefers-color-scheme: dark) {
.no-theme #filters-box {
background: #373737;
}
}

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
/**
* videojs-http-source-selector
* @version 1.1.6
* @copyright 2019 Justin Fujita <Justin@pivotshare.com>
* @license MIT
*/
.video-js.vjs-http-source-selector{display:block}

View File

@ -1,7 +0,0 @@
/**
* videojs-mobile-ui
* @version 0.5.2
* @copyright 2021 mister-ben <git@misterben.me>
* @license MIT
*/
@keyframes fadeAndScale{0%{opacity:0}25%{opacity:1}100%{opacity:0}}.video-js.vjs-has-started .vjs-touch-overlay{position:absolute;pointer-events:auto;top:0}.video-js .vjs-touch-overlay{display:block;width:100%;height:100%;pointer-events:none}.video-js .vjs-touch-overlay.skip{opacity:0;animation:fadeAndScale 0.6s linear;background-repeat:no-repeat;background-position:80% center;background-size:10%;background-image:url('data:image/svg+xml;utf8,<svg fill="%23FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M4 18l8.5-6L4 6v12zm9-12v12l8.5-6L13 6z"/><path d="M0 0h24v24H0z" fill="none"/></svg>')}.video-js .vjs-touch-overlay.skip.reverse{background-position:20% center;background-image:url('data:image/svg+xml;utf8,<svg fill="%23FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M11 18V6l-8.5 6 8.5 6zm.5-6l8.5 6V6l-8.5 6z"/><path d="M0 0h24v24H0z" fill="none"/></svg>')}.video-js .vjs-touch-overlay .vjs-play-control{top:50%;left:50%;transform:translate(-50%, -50%);position:absolute;width:30%;height:80%;pointer-events:none;opacity:0;transition:opacity 0.3s ease}.video-js .vjs-touch-overlay .vjs-play-control .vjs-icon-placeholder::before{content:'';background-size:60%;background-position:center center;background-repeat:no-repeat;background-image:url('data:image/svg+xml;utf8,<svg fill="%23FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z"/><path d="M0 0h24v24H0z" fill="none"/></svg>')}.video-js .vjs-touch-overlay .vjs-play-control.vjs-paused .vjs-icon-placeholder::before{content:'';background-image:url('data:image/svg+xml;utf8,<svg fill="%23FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M8 5v14l11-7z"/><path d="M0 0h24v24H0z" fill="none"/></svg>')}.video-js .vjs-touch-overlay .vjs-play-control.vjs-ended .vjs-icon-placeholder::before{content:'';background-image:url('data:image/svg+xml;utf8,<svg fill="%23FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"/></svg>')}.video-js .vjs-touch-overlay.show-play-toggle .vjs-play-control{opacity:1;pointer-events:auto}.video-js.vjs-mobile-ui-disable-end.vjs-ended .vjs-touch-overlay{display:none}

View File

@ -1 +0,0 @@
.video-js .vjs-overlay{color:#fff;position:absolute;text-align:center}.video-js .vjs-overlay-no-background{max-width:33%}.video-js .vjs-overlay-background{background-color:#646464;background-color:rgba(255,255,255,0.4);border-radius:3px;padding:10px;width:33%}.video-js .vjs-overlay-top-left{top:5px;left:5px}.video-js .vjs-overlay-top{left:50%;margin-left:-16.5%;top:5px}.video-js .vjs-overlay-top-right{right:5px;top:5px}.video-js .vjs-overlay-right{right:5px;top:50%;transform:translateY(-50%)}.video-js .vjs-overlay-bottom-right{bottom:3.5em;right:5px}.video-js .vjs-overlay-bottom{bottom:3.5em;left:50%;margin-left:-16.5%}.video-js .vjs-overlay-bottom-left{bottom:3.5em;left:5px}.video-js .vjs-overlay-left{left:5px;top:50%;transform:translateY(-50%)}.video-js .vjs-overlay-center{left:50%;margin-left:-16.5%;top:50%;transform:translateY(-50%)}.video-js .vjs-no-flex .vjs-overlay-left,.video-js .vjs-no-flex .vjs-overlay-center,.video-js .vjs-no-flex .vjs-overlay-right{margin-top:-15px}

View File

@ -1,7 +0,0 @@
/**
* videojs-share
* @version 3.2.1
* @copyright 2019 Mikhail Khazov <mkhazov.work@gmail.com>
* @license MIT
*/
.video-js.vjs-videojs-share_open .vjs-modal-dialog .vjs-modal-dialog-content{display:flex;align-items:center;padding:0;background-image:linear-gradient(to bottom, rgba(0,0,0,0.77), rgba(0,0,0,0.75))}.video-js.vjs-videojs-share_open .vjs-modal-dialog .vjs-close-button{position:absolute;right:0;top:5px;width:30px;height:30px;color:#fff;cursor:pointer;opacity:0.9;transition:opacity 0.25s ease-out}.video-js.vjs-videojs-share_open .vjs-modal-dialog .vjs-close-button:before{content:'×';font-size:20px;line-height:15px}.video-js.vjs-videojs-share_open .vjs-modal-dialog .vjs-close-button:hover{opacity:1}.video-js .vjs-share{display:flex;flex-direction:column;justify-content:space-around;align-items:center;width:100%;height:100%;max-height:400px}.video-js .vjs-share__top,.video-js .vjs-share__middle,.video-js .vjs-share__bottom{display:flex}.video-js .vjs-share__top,.video-js .vjs-share__middle{flex-direction:column;justify-content:space-between}.video-js .vjs-share__middle{padding:0 25px}.video-js .vjs-share__title{align-self:center;font-size:22px;color:#fff}.video-js .vjs-share__subtitle{width:100%;margin:0 auto 12px;font-size:16px;color:#fff;opacity:0.7}.video-js .vjs-share__short-link-wrapper{position:relative;display:block;width:100%;height:40px;margin:0 auto;margin-bottom:15px;border:0;color:rgba(255,255,255,0.65);background-color:#363636;outline:none;overflow:hidden;flex-shrink:0}.video-js .vjs-share__short-link{display:block;width:100%;height:100%;padding:0 40px 0 15px;border:0;color:rgba(255,255,255,0.65);background-color:#363636;outline:none}.video-js .vjs-share__btn{position:absolute;right:0;bottom:0;height:40px;width:40px;display:flex;align-items:center;padding:0 11px;border:0;color:#fff;background-color:#2e2e2e;background-size:18px 19px;background-position:center;background-repeat:no-repeat;cursor:pointer;outline:none;transition:width 0.3s ease-out, padding 0.3s ease-out}.video-js .vjs-share__btn svg{flex-shrink:0}.video-js .vjs-share__btn span{position:relative;padding-left:10px;opacity:0;transition:opacity 0.3s ease-out}.video-js .vjs-share__btn:hover{justify-content:center;width:100%;padding:0 40px;background-image:none}.video-js .vjs-share__btn:hover span{opacity:1}.video-js .vjs-share__socials{display:flex;flex-wrap:wrap;justify-content:center;align-content:flex-start;transition:width 0.3s ease-out, height 0.3s ease-out}.video-js .vjs-share__social{display:flex;justify-content:center;align-items:center;flex-shrink:0;width:32px;height:32px;margin-right:6px;margin-bottom:6px;cursor:pointer;font-size:8px;transition:transform 0.3s ease-out, filter 0.2s ease-out;border:none;outline:none}.video-js .vjs-share__social:hover{filter:brightness(115%)}.video-js .vjs-share__social svg{overflow:visible;max-height:24px}.video-js .vjs-share__social_vk{background-color:#5d7294}.video-js .vjs-share__social_ok{background-color:#ed7c20}.video-js .vjs-share__social_mail,.video-js .vjs-share__social_email{background-color:#134785}.video-js .vjs-share__social_tw{background-color:#76aaeb}.video-js .vjs-share__social_reddit{background-color:#ff4500}.video-js .vjs-share__social_fbFeed{background-color:#475995}.video-js .vjs-share__social_messenger{background-color:#0084ff}.video-js .vjs-share__social_gp{background-color:#d53f35}.video-js .vjs-share__social_linkedin{background-color:#0077b5}.video-js .vjs-share__social_viber{background-color:#766db5}.video-js .vjs-share__social_telegram{background-color:#4bb0e2}.video-js .vjs-share__social_whatsapp{background-color:#78c870}.video-js .vjs-share__bottom{justify-content:center}@media (max-height: 220px){.video-js .vjs-share .hidden-xs{display:none}}@media (max-height: 350px){.video-js .vjs-share .hidden-sm{display:none}}@media (min-height: 400px){.video-js .vjs-share__title{margin-bottom:15px}.video-js .vjs-share__short-link-wrapper{margin-bottom:30px}}@media (min-width: 320px){.video-js.vjs-videojs-share_open .vjs-modal-dialog .vjs-close-button{right:5px;top:10px}}@media (min-width: 660px){.video-js.vjs-videojs-share_open .vjs-modal-dialog .vjs-close-button{right:20px;top:20px}.video-js .vjs-share__social{width:40px;height:40px}}

View File

@ -1,7 +0,0 @@
/**
* videojs-vtt-thumbnails
* @version 0.0.13
* @copyright 2019 Chris Boustead <chris@forgemotion.com>
* @license MIT
*/
.video-js.vjs-vtt-thumbnails{display:block}.video-js .vjs-vtt-thumbnail-display{position:absolute;bottom:85%;pointer-events:none;box-shadow:0 0 7px rgba(0,0,0,0.6)}

View File

@ -1 +0,0 @@
.vjs-marker{position:absolute;left:0;bottom:0;opacity:1;height:100%;transition:opacity .2s ease;-webkit-transition:opacity .2s ease;-moz-transition:opacity .2s ease;z-index:100}.vjs-marker:hover{cursor:pointer;-webkit-transform:scale(1.3,1.3);-moz-transform:scale(1.3,1.3);-o-transform:scale(1.3,1.3);-ms-transform:scale(1.3,1.3);transform:scale(1.3,1.3)}.vjs-tip{visibility:hidden;display:block;opacity:.8;padding:5px;font-size:10px;position:absolute;bottom:14px;z-index:100000}.vjs-tip .vjs-tip-arrow{background:url(data:image/gif;base64,R0lGODlhCQAJAIABAAAAAAAAACH5BAEAAAEALAAAAAAJAAkAAAIRjAOnwIrcDJxvwkplPtchVQAAOw==) no-repeat top left;bottom:0;left:50%;margin-left:-4px;background-position:bottom left;position:absolute;width:9px;height:5px}.vjs-tip .vjs-tip-inner{border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;padding:5px 8px 4px 8px;background-color:#000;color:#fff;max-width:200px;text-align:center}.vjs-break-overlay{visibility:hidden;position:absolute;z-index:100000;top:0}.vjs-break-overlay .vjs-break-overlay-text{padding:9px;text-align:center}

9
assets/hashtag.svg Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="128" height="128" viewBox="0 0 128 128" version="1.1" id="svg5" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
<g>
<rect fill="#c84fff" width="128" height="128" x="0" y="0" />
<g aria-label="#" transform="matrix(1.1326954,0,0,1.1326954,-20.255282,-23.528147)">
<path d="m 87.780593,70.524217 -2.624999,13.666661 h 11.666662 v 5.708331 H 84.030595 L 80.61393,107.73253 H 74.488932 L 77.988931,89.899209 H 65.863936 L 62.447271,107.73253 H 56.447273 L 59.697272,89.899209 H 48.947276 V 84.190878 H 60.822271 L 63.530603,70.524217 H 52.113942 V 64.815886 H 64.57227 l 3.416665,-17.999993 h 6.124997 l -3.416665,17.999993 h 12.208328 l 3.499999,-17.999993 h 5.999997 l -3.499998,17.999993 h 10.916662 v 5.708331 z M 66.947269,84.190878 H 79.072264 L 81.738929,70.524217 H 69.613934 Z" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 918 B

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="512pt" height="512pt" version="1.0" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><g><rect x="-.0072516" y=".00056299" width="512.01" height="512.02" fill="#575757" stroke-width=".063019"/><path d="m247.17 455.95c-19.792-0.78921-38.719-4.2564-57.154-10.47-60.968-20.55-108.68-68.579-127-127.86-7.8955-25.538-10.062-53.943-6.2586-82.067 3.7105-27.439 13.603-53.515 29.342-77.344 12.069-18.273 29.138-36.277 47.228-49.816 36.891-27.61 85.944-42.49 132.38-40.157 25.88 1.3001 49.939 6.765 73.106 16.606 8.1948 3.481 20.024 9.6845 27.696 14.525 14.15 8.9272 22.367 15.498 34.482 27.573 13.254 13.211 22.128 24.276 30.398 37.906 7.2081 11.879 14.099 27.15 18.229 40.397 1.5996 5.1305 4.442 16.456 5.6852 22.653 2.3908 11.917 2.6998 15.722 2.7049 33.312 6e-3 18.515-0.46256 24.413-2.9166 36.758-9.3274 46.92-35.58 88.167-74.872 117.64-22.814 17.112-50.027 29.535-78.547 35.858-16.714 3.7059-35.421 5.2453-54.498 4.4846zm-35.1-78.786c-5.3e-4 -0.52647-0.0741-2.0564-0.16311-3.3999l-0.16178-2.4427-4.7018-0.26271c-4.0477-0.22614-4.7968-0.33363-5.3847-0.77253-2.0235-1.5108-1.4679-6.0695 2.2494-18.457 0.8637-2.8781 3.3371-11.321 5.4966-18.762 2.1594-7.4409 5.2002-17.836 6.7573-23.101 1.5571-5.2648 4.1948-14.282 5.8615-20.038 1.6667-5.7562 3.6145-12.4 4.3284-14.764 0.71391-2.3641 3.2583-11.037 5.6542-19.272 4.9475-17.007 8.1626-27.723 8.9438-29.811 0.51852-1.3858 0.54785-1.4139 0.99761-0.95317 0.25486 0.26106 3.8462 7.3667 7.9807 15.79 4.1345 8.4236 13.089 26.573 19.898 40.331 17.188 34.73 37.849 76.578 43.261 87.622l4.5356 9.257 11.359-0.0895c6.2475-0.0492 11.615-0.19623 11.929-0.32672 0.5614-0.23385 0.54167-0.2959-1.3723-4.3176-1.068-2.2442-8.1436-16.601-15.724-31.904-48.687-98.293-61.22-123.86-67.889-138.48-4.7022-10.309-6.9031-14.807-7.7139-15.762-0.82931-0.97742-1.6319-1.0638-2.3704-0.25525-1.1993 1.313-4.1046 10.063-9.3869 28.27-2.0569 7.0899-6.5372 22.425-9.9562 34.077-6.6396 22.629-8.5182 29.037-14.33 48.883-2.0354 6.9495-4.7977 16.369-6.1385 20.931-1.3408 4.5628-4.033 13.81-5.9826 20.549-4.304 14.877-6.136 20.889-7.3886 24.25-2.1371 5.7334-2.5723 6.3292-4.9216 6.7384-0.88855 0.15472-2.4102 0.28196-3.3815 0.28275-2.1993 3e-3 -3.5494 0.36339-4.0558 1.0863-0.42176 0.60215-0.56421 4.8802-0.18251 5.4812 0.20573 0.32388 2.4672 0.37414 23.34 0.51873l8.6151 0.0597-7e-4 -0.95723zm36.751-205.59c4.3282-0.92335 8.4607-4.943 9.4374-9.1796 0.36569-1.5862 0.32543-4.9758-0.077-6.4799-0.85108-3.1813-3.2688-6.291-6.039-7.7675-3.8111-2.0313-9.456-2.0295-13.272 5e-3 -5.9828 3.1888-8.1556 11.089-4.7878 17.408 2.6995 5.0648 8.3611 7.3754 14.738 6.015z" fill="#f0f0f0" stroke-width=".025526"/></g><g transform="matrix(.069892 0 0 -.069892 44.236 474.48)"><path d="m2787 4669c-124-65-123-255 3-319 86-44 196-16 247 62 58 87 26 211-67 258-51 26-132 26-183-1z" fill="#00b6f0" stroke="#00b6f0" stroke-width="4.25"/><path d="m2882 4108c-12-16-63-166-102-303-30-104-101-350-165-565-20-69-58-199-85-290-26-91-64-221-85-290-20-69-58-199-85-290-26-91-64-221-85-290-20-69-57-195-81-280-59-207-93-299-115-310-10-6-35-10-56-10-73 0-84-8-81-54l3-41 228-3 228-2-3 47-3 48-73 3c-66 3-74 5-84 27-13 28 0 104 37 225 13 41 47 156 75 255s66 230 85 290c18 61 56 191 85 290 28 99 66 230 85 290 18 61 56 191 85 290 85 297 123 419 131 429 5 5 17-11 28-35 10-24 192-393 403-819s447-902 523-1058l139-282h168c92 0 168 4 168 8s-75 158-166 342c-588 1183-969 1958-1033 2100-29 63-69 151-89 195-44 95-58 110-80 83z" fill="#575757"/></g></svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

254
assets/js/_helpers.js Normal file
View File

@ -0,0 +1,254 @@
'use strict';
// Contains only auxiliary methods
// May be included and executed unlimited number of times without any consequences
// Polyfills for IE11
Array.prototype.find = Array.prototype.find || function (condition) {
return this.filter(condition)[0];
};
Array.from = Array.from || function (source) {
return Array.prototype.slice.call(source);
};
NodeList.prototype.forEach = NodeList.prototype.forEach || function (callback) {
Array.from(this).forEach(callback);
};
String.prototype.includes = String.prototype.includes || function (searchString) {
return this.indexOf(searchString) >= 0;
};
String.prototype.startsWith = String.prototype.startsWith || function (prefix) {
return this.substr(0, prefix.length) === prefix;
};
Math.sign = Math.sign || function(x) {
x = +x;
if (!x) return x; // 0 and NaN
return x > 0 ? 1 : -1;
};
if (!window.hasOwnProperty('HTMLDetailsElement') && !window.hasOwnProperty('mockHTMLDetailsElement')) {
window.mockHTMLDetailsElement = true;
const style = 'details:not([open]) > :not(summary) {display: none}';
document.head.appendChild(document.createElement('style')).textContent = style;
addEventListener('click', function (e) {
if (e.target.nodeName !== 'SUMMARY') return;
const details = e.target.parentElement;
if (details.hasAttribute('open'))
details.removeAttribute('open');
else
details.setAttribute('open', '');
});
}
// Monstrous global variable for handy code
// Includes: clamp, xhr, storage.{get,set,remove}
window.helpers = window.helpers || {
/**
* https://en.wikipedia.org/wiki/Clamping_(graphics)
* @param {Number} num Source number
* @param {Number} min Low border
* @param {Number} max High border
* @returns {Number} Clamped value
*/
clamp: function (num, min, max) {
if (max < min) {
var t = max; max = min; min = t; // swap max and min
}
if (max < num)
return max;
if (min > num)
return min;
return num;
},
/** @private */
_xhr: function (method, url, options, callbacks) {
const xhr = new XMLHttpRequest();
xhr.open(method, url);
// Default options
xhr.responseType = 'json';
xhr.timeout = 10000;
// Default options redefining
if (options.responseType)
xhr.responseType = options.responseType;
if (options.timeout)
xhr.timeout = options.timeout;
if (method === 'POST')
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
// better than onreadystatechange because of 404 codes https://stackoverflow.com/a/36182963
xhr.onloadend = function () {
if (xhr.status === 200) {
if (callbacks.on200) {
// fix for IE11. It doesn't convert response to JSON
if (xhr.responseType === '' && typeof(xhr.response) === 'string')
callbacks.on200(JSON.parse(xhr.response));
else
callbacks.on200(xhr.response);
}
} else {
// handled by onerror
if (xhr.status === 0) return;
if (callbacks.onNon200)
callbacks.onNon200(xhr);
}
};
xhr.ontimeout = function () {
if (callbacks.onTimeout)
callbacks.onTimeout(xhr);
};
xhr.onerror = function () {
if (callbacks.onError)
callbacks.onError(xhr);
};
if (options.payload)
xhr.send(options.payload);
else
xhr.send();
},
/** @private */
_xhrRetry: function(method, url, options, callbacks) {
if (options.retries <= 0) {
console.warn('Failed to pull', options.entity_name);
if (callbacks.onTotalFail)
callbacks.onTotalFail();
return;
}
helpers._xhr(method, url, options, callbacks);
},
/**
* @callback callbackXhrOn200
* @param {Object} response - xhr.response
*/
/**
* @callback callbackXhrError
* @param {XMLHttpRequest} xhr
*/
/**
* @param {'GET'|'POST'} method - 'GET' or 'POST'
* @param {String} url - URL to send request to
* @param {Object} options - other XHR options
* @param {XMLHttpRequestBodyInit} [options.payload=null] - payload for POST-requests
* @param {'arraybuffer'|'blob'|'document'|'json'|'text'} [options.responseType=json]
* @param {Number} [options.timeout=10000]
* @param {Number} [options.retries=1]
* @param {String} [options.entity_name='unknown'] - string to log
* @param {Number} [options.retry_timeout=1000]
* @param {Object} callbacks - functions to execute on events fired
* @param {callbackXhrOn200} [callbacks.on200]
* @param {callbackXhrError} [callbacks.onNon200]
* @param {callbackXhrError} [callbacks.onTimeout]
* @param {callbackXhrError} [callbacks.onError]
* @param {callbackXhrError} [callbacks.onTotalFail] - if failed after all retries
*/
xhr: function(method, url, options, callbacks) {
if (!options.retries || options.retries <= 1) {
helpers._xhr(method, url, options, callbacks);
return;
}
if (!options.entity_name) options.entity_name = 'unknown';
if (!options.retry_timeout) options.retry_timeout = 1000;
const retries_total = options.retries;
let currentTry = 1;
const retry = function () {
console.warn('Pulling ' + options.entity_name + ' failed... ' + (currentTry++) + '/' + retries_total);
setTimeout(function () {
options.retries--;
helpers._xhrRetry(method, url, options, callbacks);
}, options.retry_timeout);
};
// Pack retry() call into error handlers
callbacks._onError = callbacks.onError;
callbacks.onError = function (xhr) {
if (callbacks._onError)
callbacks._onError(xhr);
retry();
};
callbacks._onTimeout = callbacks.onTimeout;
callbacks.onTimeout = function (xhr) {
if (callbacks._onTimeout)
callbacks._onTimeout(xhr);
retry();
};
helpers._xhrRetry(method, url, options, callbacks);
},
/**
* @typedef {Object} invidiousStorage
* @property {(key:String) => Object} get
* @property {(key:String, value:Object)} set
* @property {(key:String)} remove
*/
/**
* Universal storage, stores and returns JS objects. Uses inside localStorage or cookies
* @type {invidiousStorage}
*/
storage: (function () {
// access to localStorage throws exception in Tor Browser, so try is needed
let localStorageIsUsable = false;
try{localStorageIsUsable = !!localStorage.setItem;}catch(e){}
if (localStorageIsUsable) {
return {
get: function (key) {
let storageItem = localStorage.getItem(key)
if (!storageItem) return;
try {
return JSON.parse(decodeURIComponent(storageItem));
} catch(e) {
// Erase non parsable value
helpers.storage.remove(key);
}
},
set: function (key, value) {
let encoded_value = encodeURIComponent(JSON.stringify(value))
localStorage.setItem(key, encoded_value);
},
remove: function (key) { localStorage.removeItem(key); }
};
}
// TODO: fire 'storage' event for cookies
console.info('Storage: localStorage is disabled or unaccessible. Cookies used as fallback');
return {
get: function (key) {
const cookiePrefix = key + '=';
function findCallback(cookie) {return cookie.startsWith(cookiePrefix);}
const matchedCookie = document.cookie.split('; ').find(findCallback);
if (matchedCookie) {
const cookieBody = matchedCookie.replace(cookiePrefix, '');
if (cookieBody.length === 0) return;
try {
return JSON.parse(decodeURIComponent(cookieBody));
} catch(e) {
// Erase non parsable value
helpers.storage.remove(key);
}
}
},
set: function (key, value) {
const cookie_data = encodeURIComponent(JSON.stringify(value));
// Set expiration in 2 year
const date = new Date();
date.setFullYear(date.getFullYear()+2);
document.cookie = key + '=' + cookie_data + '; expires=' + date.toGMTString();
},
remove: function (key) {
document.cookie = key + '=; Max-Age=0';
}
};
})()
};

174
assets/js/comments.js Normal file
View File

@ -0,0 +1,174 @@
var video_data = JSON.parse(document.getElementById('video_data').textContent);
var spinnerHTML = '<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3>';
var spinnerHTMLwithHR = spinnerHTML + '<hr>';
String.prototype.supplant = function (o) {
return this.replace(/{([^{}]*)}/g, function (a, b) {
var r = o[b];
return typeof r === 'string' || typeof r === 'number' ? r : a;
});
};
function toggle_comments(event) {
var target = event.target;
var body = target.parentNode.parentNode.parentNode.children[1];
if (body.style.display === 'none') {
target.textContent = '[ ]';
body.style.display = '';
} else {
target.textContent = '[ + ]';
body.style.display = 'none';
}
}
function hide_youtube_replies(event) {
var target = event.target;
var sub_text = target.getAttribute('data-inner-text');
var inner_text = target.getAttribute('data-sub-text');
var body = target.parentNode.parentNode.children[1];
body.style.display = 'none';
target.textContent = sub_text;
target.onclick = show_youtube_replies;
target.setAttribute('data-inner-text', inner_text);
target.setAttribute('data-sub-text', sub_text);
}
function show_youtube_replies(event) {
var target = event.target;
var sub_text = target.getAttribute('data-inner-text');
var inner_text = target.getAttribute('data-sub-text');
var body = target.parentNode.parentNode.children[1];
body.style.display = '';
target.textContent = sub_text;
target.onclick = hide_youtube_replies;
target.setAttribute('data-inner-text', inner_text);
target.setAttribute('data-sub-text', sub_text);
}
function get_youtube_comments() {
var comments = document.getElementById('comments');
var fallback = comments.innerHTML;
comments.innerHTML = spinnerHTML;
var baseUrl = video_data.base_url || '/api/v1/comments/'+ video_data.id
var url = baseUrl +
'?format=html' +
'&hl=' + video_data.preferences.locale +
'&thin_mode=' + video_data.preferences.thin_mode;
if (video_data.ucid) {
url += '&ucid=' + video_data.ucid
}
var onNon200 = function (xhr) { comments.innerHTML = fallback; };
if (video_data.params.comments[1] === 'youtube')
onNon200 = function (xhr) {};
helpers.xhr('GET', url, {retries: 5, entity_name: 'comments'}, {
on200: function (response) {
var commentInnerHtml = ' \
<div> \
<h3> \
<a href="javascript:void(0)">[ ]</a> \
{commentsText} \
</h3> \
<b> \
'
if (video_data.support_reddit) {
commentInnerHtml += ' <a href="javascript:void(0)" data-comments="reddit"> \
{redditComments} \
</a> \
'
}
commentInnerHtml += ' </b> \
</div> \
<div>{contentHtml}</div> \
<hr>'
commentInnerHtml = commentInnerHtml.supplant({
contentHtml: response.contentHtml,
redditComments: video_data.reddit_comments_text,
commentsText: video_data.comments_text.supplant({
// toLocaleString correctly splits number with local thousands separator. e.g.:
// '1,234,567.89' for user with English locale
// '1 234 567,89' for user with Russian locale
// '1.234.567,89' for user with Portuguese locale
commentCount: response.commentCount.toLocaleString()
})
});
comments.innerHTML = commentInnerHtml;
comments.children[0].children[0].children[0].onclick = toggle_comments;
if (video_data.support_reddit) {
comments.children[0].children[1].children[0].onclick = swap_comments;
}
},
onNon200: onNon200, // declared above
onError: function (xhr) {
comments.innerHTML = spinnerHTML;
},
onTimeout: function (xhr) {
comments.innerHTML = spinnerHTML;
}
});
}
function get_youtube_replies(target, load_more, load_replies) {
var continuation = target.getAttribute('data-continuation');
var body = target.parentNode.parentNode;
var fallback = body.innerHTML;
body.innerHTML = spinnerHTML;
var baseUrl = video_data.base_url || '/api/v1/comments/'+ video_data.id
var url = baseUrl +
'?format=html' +
'&hl=' + video_data.preferences.locale +
'&thin_mode=' + video_data.preferences.thin_mode +
'&continuation=' + continuation;
if (video_data.ucid) {
url += '&ucid=' + video_data.ucid
}
if (load_replies) url += '&action=action_get_comment_replies';
helpers.xhr('GET', url, {}, {
on200: function (response) {
if (load_more) {
body = body.parentNode.parentNode;
body.removeChild(body.lastElementChild);
body.insertAdjacentHTML('beforeend', response.contentHtml);
} else {
body.removeChild(body.lastElementChild);
var p = document.createElement('p');
var a = document.createElement('a');
p.appendChild(a);
a.href = 'javascript:void(0)';
a.onclick = hide_youtube_replies;
a.setAttribute('data-sub-text', video_data.hide_replies_text);
a.setAttribute('data-inner-text', video_data.show_replies_text);
a.textContent = video_data.hide_replies_text;
var div = document.createElement('div');
div.innerHTML = response.contentHtml;
body.appendChild(p);
body.appendChild(div);
}
},
onNon200: function (xhr) {
body.innerHTML = fallback;
},
onTimeout: function (xhr) {
console.warn('Pulling comments failed');
body.innerHTML = fallback;
}
});
}

View File

@ -1,19 +1,13 @@
var community_data = JSON.parse(document.getElementById('community_data').innerHTML); 'use strict';
var community_data = JSON.parse(document.getElementById('community_data').textContent);
String.prototype.supplant = function (o) {
return this.replace(/{([^{}]*)}/g, function (a, b) {
var r = o[b];
return typeof r === 'string' || typeof r === 'number' ? r : a;
});
}
function hide_youtube_replies(event) { function hide_youtube_replies(event) {
var target = event.target; var target = event.target;
sub_text = target.getAttribute('data-inner-text'); var sub_text = target.getAttribute('data-inner-text');
inner_text = target.getAttribute('data-sub-text'); var inner_text = target.getAttribute('data-sub-text');
body = target.parentNode.parentNode.children[1]; var body = target.parentNode.parentNode.children[1];
body.style.display = 'none'; body.style.display = 'none';
target.innerHTML = sub_text; target.innerHTML = sub_text;
@ -25,10 +19,10 @@ function hide_youtube_replies(event) {
function show_youtube_replies(event) { function show_youtube_replies(event) {
var target = event.target; var target = event.target;
sub_text = target.getAttribute('data-inner-text'); var sub_text = target.getAttribute('data-inner-text');
inner_text = target.getAttribute('data-sub-text'); var inner_text = target.getAttribute('data-sub-text');
body = target.parentNode.parentNode.children[1]; var body = target.parentNode.parentNode.children[1];
body.style.display = ''; body.style.display = '';
target.innerHTML = sub_text; target.innerHTML = sub_text;
@ -37,13 +31,6 @@ function show_youtube_replies(event) {
target.setAttribute('data-sub-text', sub_text); target.setAttribute('data-sub-text', sub_text);
} }
function number_with_separator(val) {
while (/(\d+)(\d{3})/.test(val.toString())) {
val = val.toString().replace(/(\d+)(\d{3})/, '$1' + ',' + '$2');
}
return val;
}
function get_youtube_replies(target, load_more) { function get_youtube_replies(target, load_more) {
var continuation = target.getAttribute('data-continuation'); var continuation = target.getAttribute('data-continuation');
@ -57,18 +44,13 @@ function get_youtube_replies(target, load_more) {
'&hl=' + community_data.preferences.locale + '&hl=' + community_data.preferences.locale +
'&thin_mode=' + community_data.preferences.thin_mode + '&thin_mode=' + community_data.preferences.thin_mode +
'&continuation=' + continuation; '&continuation=' + continuation;
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 10000;
xhr.open('GET', url, true);
xhr.onreadystatechange = function () { helpers.xhr('GET', url, {}, {
if (xhr.readyState == 4) { on200: function (response) {
if (xhr.status == 200) {
if (load_more) { if (load_more) {
body = body.parentNode.parentNode; body = body.parentNode.parentNode;
body.removeChild(body.lastElementChild); body.removeChild(body.lastElementChild);
body.innerHTML += xhr.response.contentHtml; body.innerHTML += response.contentHtml;
} else { } else {
body.removeChild(body.lastElementChild); body.removeChild(body.lastElementChild);
@ -80,24 +62,21 @@ function get_youtube_replies(target, load_more) {
a.onclick = hide_youtube_replies; a.onclick = hide_youtube_replies;
a.setAttribute('data-sub-text', community_data.hide_replies_text); a.setAttribute('data-sub-text', community_data.hide_replies_text);
a.setAttribute('data-inner-text', community_data.show_replies_text); a.setAttribute('data-inner-text', community_data.show_replies_text);
a.innerText = community_data.hide_replies_text; a.textContent = community_data.hide_replies_text;
var div = document.createElement('div'); var div = document.createElement('div');
div.innerHTML = xhr.response.contentHtml; div.innerHTML = response.contentHtml;
body.appendChild(p); body.appendChild(p);
body.appendChild(div); body.appendChild(div);
} }
} else { },
onNon200: function (xhr) {
body.innerHTML = fallback;
},
onTimeout: function (xhr) {
console.warn('Pulling comments failed');
body.innerHTML = fallback; body.innerHTML = fallback;
} }
} });
}
xhr.ontimeout = function () {
console.log('Pulling comments failed.');
body.innerHTML = fallback;
}
xhr.send();
} }

View File

@ -1,103 +1,62 @@
var video_data = JSON.parse(document.getElementById('video_data').innerHTML); 'use strict';
var video_data = JSON.parse(document.getElementById('video_data').textContent);
function get_playlist(plid, retries) {
if (retries == undefined) retries = 5;
if (retries <= 0) {
console.log('Failed to pull playlist');
return;
}
function get_playlist(plid) {
var plid_url;
if (plid.startsWith('RD')) { if (plid.startsWith('RD')) {
var plid_url = '/api/v1/mixes/' + plid + plid_url = '/api/v1/mixes/' + plid +
'?continuation=' + video_data.id + '?continuation=' + video_data.id +
'&format=html&hl=' + video_data.preferences.locale; '&format=html&hl=' + video_data.preferences.locale;
} else { } else {
var plid_url = '/api/v1/playlists/' + plid + plid_url = '/api/v1/playlists/' + plid +
'?index=' + video_data.index + '?index=' + video_data.index +
'&continuation' + video_data.id + '&continuation' + video_data.id +
'&format=html&hl=' + video_data.preferences.locale; '&format=html&hl=' + video_data.preferences.locale;
} }
var xhr = new XMLHttpRequest(); helpers.xhr('GET', plid_url, {retries: 5, entity_name: 'playlist'}, {
xhr.responseType = 'json'; on200: function (response) {
xhr.timeout = 10000; if (!response.nextVideo)
xhr.open('GET', plid_url, true); return;
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
if (xhr.response.nextVideo) {
player.on('ended', function () { player.on('ended', function () {
var url = new URL('https://example.com/embed/' + xhr.response.nextVideo); var url = new URL('https://example.com/embed/' + response.nextVideo);
url.searchParams.set('list', plid); url.searchParams.set('list', plid);
if (!plid.startsWith('RD')) { if (!plid.startsWith('RD'))
url.searchParams.set('index', xhr.response.index); url.searchParams.set('index', response.index);
} if (video_data.params.autoplay || video_data.params.continue_autoplay)
if (video_data.params.autoplay || video_data.params.continue_autoplay) {
url.searchParams.set('autoplay', '1'); url.searchParams.set('autoplay', '1');
} if (video_data.params.listen !== video_data.preferences.listen)
if (video_data.params.listen !== video_data.preferences.listen) {
url.searchParams.set('listen', video_data.params.listen); url.searchParams.set('listen', video_data.params.listen);
} if (video_data.params.speed !== video_data.preferences.speed)
if (video_data.params.speed !== video_data.preferences.speed) {
url.searchParams.set('speed', video_data.params.speed); url.searchParams.set('speed', video_data.params.speed);
} if (video_data.params.local !== video_data.preferences.local)
if (video_data.params.local !== video_data.preferences.local) {
url.searchParams.set('local', video_data.params.local); url.searchParams.set('local', video_data.params.local);
}
location.assign(url.pathname + url.search); location.assign(url.pathname + url.search);
}); });
} }
} });
}
}
xhr.onerror = function () {
console.log('Pulling playlist failed... ' + retries + '/5');
setTimeout(function () { get_playlist(plid, retries - 1) }, 1000);
}
xhr.ontimeout = function () {
console.log('Pulling playlist failed... ' + retries + '/5');
get_playlist(plid, retries - 1);
}
xhr.send();
} }
window.addEventListener('load', function (e) { addEventListener('load', function (e) {
if (video_data.plid) { if (video_data.plid) {
get_playlist(video_data.plid); get_playlist(video_data.plid);
} else if (video_data.video_series) { } else if (video_data.video_series) {
player.on('ended', function () { player.on('ended', function () {
var url = new URL('https://example.com/embed/' + video_data.video_series.shift()); var url = new URL('https://example.com/embed/' + video_data.video_series.shift());
if (video_data.params.autoplay || video_data.params.continue_autoplay) { if (video_data.params.autoplay || video_data.params.continue_autoplay)
url.searchParams.set('autoplay', '1'); url.searchParams.set('autoplay', '1');
} if (video_data.params.listen !== video_data.preferences.listen)
if (video_data.params.listen !== video_data.preferences.listen) {
url.searchParams.set('listen', video_data.params.listen); url.searchParams.set('listen', video_data.params.listen);
} if (video_data.params.speed !== video_data.preferences.speed)
if (video_data.params.speed !== video_data.preferences.speed) {
url.searchParams.set('speed', video_data.params.speed); url.searchParams.set('speed', video_data.params.speed);
} if (video_data.params.local !== video_data.preferences.local)
if (video_data.params.local !== video_data.preferences.local) {
url.searchParams.set('local', video_data.params.local); url.searchParams.set('local', video_data.params.local);
} if (video_data.video_series.length !== 0)
url.searchParams.set('playlist', video_data.video_series.join(','));
if (video_data.video_series.length !== 0) {
url.searchParams.set('playlist', video_data.video_series.join(','))
}
location.assign(url.pathname + url.search); location.assign(url.pathname + url.search);
}); });

View File

@ -1,8 +1,6 @@
'use strict'; 'use strict';
(function () { (function () {
var n2a = function (n) { return Array.prototype.slice.call(n); };
var video_player = document.getElementById('player_html5_api'); var video_player = document.getElementById('player_html5_api');
if (video_player) { if (video_player) {
video_player.onmouseenter = function () { video_player['data-title'] = video_player['title']; video_player['title'] = ''; }; video_player.onmouseenter = function () { video_player['data-title'] = video_player['title']; video_player['title'] = ''; };
@ -11,135 +9,141 @@
} }
// For dynamically inserted elements // For dynamically inserted elements
document.addEventListener('click', function (e) { addEventListener('click', function (e) {
if (!e || !e.target) { return; } if (!e || !e.target) return;
e = e.target;
var handler_name = e.getAttribute('data-onclick'); var t = e.target;
var handler_name = t.getAttribute('data-onclick');
switch (handler_name) { switch (handler_name) {
case 'jump_to_time': case 'jump_to_time':
var time = e.getAttribute('data-jump-time'); e.preventDefault();
var time = t.getAttribute('data-jump-time');
player.currentTime(time); player.currentTime(time);
break; break;
case 'get_youtube_replies': case 'get_youtube_replies':
var load_more = e.getAttribute('data-load-more') !== null; var load_more = t.getAttribute('data-load-more') !== null;
var load_replies = e.getAttribute('data-load-replies') !== null; var load_replies = t.getAttribute('data-load-replies') !== null;
get_youtube_replies(e, load_more, load_replies); get_youtube_replies(t, load_more, load_replies);
break; break;
case 'toggle_parent': case 'toggle_parent':
toggle_parent(e); e.preventDefault();
toggle_parent(t);
break; break;
default: default:
break; break;
} }
}); });
n2a(document.querySelectorAll('[data-mouse="switch_classes"]')).forEach(function (e) { document.querySelectorAll('[data-mouse="switch_classes"]').forEach(function (el) {
var classes = e.getAttribute('data-switch-classes').split(','); var classes = el.getAttribute('data-switch-classes').split(',');
var ec = classes[0]; var classOnEnter = classes[0];
var lc = classes[1]; var classOnLeave = classes[1];
var onoff = function (on, off) { function toggle_classes(toAdd, toRemove) {
var cs = e.getAttribute('class'); el.classList.add(toAdd);
cs = cs.split(off).join(on); el.classList.remove(toRemove);
e.setAttribute('class', cs);
};
e.onmouseenter = function () { onoff(ec, lc); };
e.onmouseleave = function () { onoff(lc, ec); };
});
n2a(document.querySelectorAll('[data-onsubmit="return_false"]')).forEach(function (e) {
e.onsubmit = function () { return false; };
});
n2a(document.querySelectorAll('[data-onclick="mark_watched"]')).forEach(function (e) {
e.onclick = function () { mark_watched(e); };
});
n2a(document.querySelectorAll('[data-onclick="mark_unwatched"]')).forEach(function (e) {
e.onclick = function () { mark_unwatched(e); };
});
n2a(document.querySelectorAll('[data-onclick="add_playlist_video"]')).forEach(function (e) {
e.onclick = function () { add_playlist_video(e); };
});
n2a(document.querySelectorAll('[data-onclick="add_playlist_item"]')).forEach(function (e) {
e.onclick = function () { add_playlist_item(e); };
});
n2a(document.querySelectorAll('[data-onclick="remove_playlist_item"]')).forEach(function (e) {
e.onclick = function () { remove_playlist_item(e); };
});
n2a(document.querySelectorAll('[data-onclick="revoke_token"]')).forEach(function (e) {
e.onclick = function () { revoke_token(e); };
});
n2a(document.querySelectorAll('[data-onclick="remove_subscription"]')).forEach(function (e) {
e.onclick = function () { remove_subscription(e); };
});
n2a(document.querySelectorAll('[data-onclick="notification_requestPermission"]')).forEach(function (e) {
e.onclick = function () { Notification.requestPermission(); };
});
n2a(document.querySelectorAll('[data-onrange="update_volume_value"]')).forEach(function (e) {
var cb = function () { update_volume_value(e); }
e.oninput = cb;
e.onchange = cb;
});
function update_volume_value(element) {
document.getElementById('volume-value').innerText = element.value;
} }
el.onmouseenter = function () { toggle_classes(classOnEnter, classOnLeave); };
el.onmouseleave = function () { toggle_classes(classOnLeave, classOnEnter); };
});
document.querySelectorAll('[data-onsubmit="return_false"]').forEach(function (el) {
el.onsubmit = function () { return false; };
});
document.querySelectorAll('[data-onclick="mark_watched"]').forEach(function (el) {
el.onclick = function () { mark_watched(el); };
});
document.querySelectorAll('[data-onclick="mark_unwatched"]').forEach(function (el) {
el.onclick = function () { mark_unwatched(el); };
});
document.querySelectorAll('[data-onclick="add_playlist_video"]').forEach(function (el) {
el.onclick = function () { add_playlist_video(el); };
});
document.querySelectorAll('[data-onclick="add_playlist_item"]').forEach(function (el) {
el.onclick = function () { add_playlist_item(el); };
});
document.querySelectorAll('[data-onclick="remove_playlist_item"]').forEach(function (el) {
el.onclick = function () { remove_playlist_item(el); };
});
document.querySelectorAll('[data-onclick="revoke_token"]').forEach(function (el) {
el.onclick = function () { revoke_token(el); };
});
document.querySelectorAll('[data-onclick="remove_subscription"]').forEach(function (el) {
el.onclick = function () { remove_subscription(el); };
});
document.querySelectorAll('[data-onclick="notification_requestPermission"]').forEach(function (el) {
el.onclick = function () { Notification.requestPermission(); };
});
document.querySelectorAll('[data-onrange="update_volume_value"]').forEach(function (el) {
function update_volume_value() {
document.getElementById('volume-value').textContent = el.value;
}
el.oninput = update_volume_value;
el.onchange = update_volume_value;
});
function revoke_token(target) { function revoke_token(target) {
var row = target.parentNode.parentNode.parentNode.parentNode.parentNode; var row = target.parentNode.parentNode.parentNode.parentNode.parentNode;
row.style.display = 'none'; row.style.display = 'none';
var count = document.getElementById('count'); var count = document.getElementById('count');
count.innerText = count.innerText - 1; count.textContent--;
var referer = window.encodeURIComponent(document.location.href);
var url = '/token_ajax?action_revoke_token=1&redirect=false' + var url = '/token_ajax?action_revoke_token=1&redirect=false' +
'&referer=' + referer + '&referer=' + encodeURIComponent(location.href) +
'&session=' + target.getAttribute('data-session'); '&session=' + target.getAttribute('data-session');
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 10000;
xhr.open('POST', url, true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.onreadystatechange = function () { var payload = 'csrf_token=' + target.parentNode.querySelector('input[name="csrf_token"]').value;
if (xhr.readyState == 4) {
if (xhr.status != 200) { helpers.xhr('POST', url, {payload: payload}, {
count.innerText = parseInt(count.innerText) + 1; onNon200: function (xhr) {
count.textContent++;
row.style.display = ''; row.style.display = '';
} }
} });
}
var csrf_token = target.parentNode.querySelector('input[name="csrf_token"]').value;
xhr.send('csrf_token=' + csrf_token);
} }
function remove_subscription(target) { function remove_subscription(target) {
var row = target.parentNode.parentNode.parentNode.parentNode.parentNode; var row = target.parentNode.parentNode.parentNode.parentNode.parentNode;
row.style.display = 'none'; row.style.display = 'none';
var count = document.getElementById('count'); var count = document.getElementById('count');
count.innerText = count.innerText - 1; count.textContent--;
var referer = window.encodeURIComponent(document.location.href);
var url = '/subscription_ajax?action_remove_subscriptions=1&redirect=false' + var url = '/subscription_ajax?action_remove_subscriptions=1&redirect=false' +
'&referer=' + referer + '&referer=' + encodeURIComponent(location.href) +
'&c=' + target.getAttribute('data-ucid'); '&c=' + target.getAttribute('data-ucid');
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 10000;
xhr.open('POST', url, true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.onreadystatechange = function () { var payload = 'csrf_token=' + target.parentNode.querySelector('input[name="csrf_token"]').value;
if (xhr.readyState == 4) {
if (xhr.status != 200) { helpers.xhr('POST', url, {payload: payload}, {
count.innerText = parseInt(count.innerText) + 1; onNon200: function (xhr) {
count.textContent++;
row.style.display = ''; row.style.display = '';
} }
} });
} }
var csrf_token = target.parentNode.querySelector('input[name="csrf_token"]').value; // Handle keypresses
xhr.send('csrf_token=' + csrf_token); addEventListener('keydown', function (event) {
// Ignore modifier keys
if (event.ctrlKey || event.metaKey) return;
// Ignore shortcuts if any text input is focused
let focused_tag = document.activeElement.tagName.toLowerCase();
const allowed = /^(button|checkbox|file|radio|submit)$/;
if (focused_tag === 'textarea') return;
if (focused_tag === 'input') {
let focused_type = document.activeElement.type.toLowerCase();
if (!allowed.test(focused_type)) return;
} }
// Focus search bar on '/'
if (event.key === '/') {
document.getElementById('searchbox').focus();
event.preventDefault();
}
});
})(); })();

View File

@ -1,46 +1,30 @@
var notification_data = JSON.parse(document.getElementById('notification_data').innerHTML); 'use strict';
var notification_data = JSON.parse(document.getElementById('notification_data').textContent);
/** Boolean meaning 'some tab have stream' */
const STORAGE_KEY_STREAM = 'stream';
/** Number of notifications. May be increased or reset */
const STORAGE_KEY_NOTIF_COUNT = 'notification_count';
var notifications, delivered; var notifications, delivered;
var notifications_mock = { close: function () { } };
function get_subscriptions(callback, retries) { function get_subscriptions() {
if (retries == undefined) retries = 5; helpers.xhr('GET', '/api/v1/auth/subscriptions', {
retries: 5,
if (retries <= 0) { entity_name: 'subscriptions'
return; }, {
} on200: create_notification_stream
});
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 10000;
xhr.open('GET', '/api/v1/auth/subscriptions?fields=authorId', true);
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
subscriptions = xhr.response;
callback(subscriptions);
}
}
}
xhr.onerror = function () {
console.log('Pulling subscriptions failed... ' + retries + '/5');
setTimeout(function () { get_subscriptions(callback, retries - 1) }, 1000);
}
xhr.ontimeout = function () {
console.log('Pulling subscriptions failed... ' + retries + '/5');
get_subscriptions(callback, retries - 1);
}
xhr.send();
} }
function create_notification_stream(subscriptions) { function create_notification_stream(subscriptions) {
// sse.js can't be replaced to EventSource in place as it lack support of payload and headers
// see https://developer.mozilla.org/en-US/docs/Web/API/EventSource/EventSource
notifications = new SSE( notifications = new SSE(
'/api/v1/auth/notifications?fields=videoId,title,author,authorId,publishedText,published,authorThumbnails,liveNow', { '/api/v1/auth/notifications', {
withCredentials: true, withCredentials: true,
payload: 'topics=' + subscriptions.map(function (subscription) { return subscription.authorId }).join(','), payload: 'topics=' + subscriptions.map(function (subscription) { return subscription.authorId; }).join(','),
headers: { 'Content-Type': 'application/x-www-form-urlencoded' } headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
}); });
delivered = []; delivered = [];
@ -48,96 +32,100 @@ function create_notification_stream(subscriptions) {
var start_time = Math.round(new Date() / 1000); var start_time = Math.round(new Date() / 1000);
notifications.onmessage = function (event) { notifications.onmessage = function (event) {
if (!event.id) { if (!event.id) return;
return;
}
var notification = JSON.parse(event.data); var notification = JSON.parse(event.data);
console.log('Got notification:', notification); console.info('Got notification:', notification);
if (start_time < notification.published && !delivered.includes(notification.videoId)) { // Ignore not actual and delivered notifications
if (Notification.permission === 'granted') { if (start_time > notification.published || delivered.includes(notification.videoId)) return;
var system_notification =
new Notification((notification.liveNow ? notification_data.live_now_text : notification_data.upload_text).replace('`x`', notification.author), {
body: notification.title,
icon: '/ggpht' + new URL(notification.authorThumbnails[2].url).pathname,
img: '/ggpht' + new URL(notification.authorThumbnails[4].url).pathname,
tag: notification.videoId
});
system_notification.onclick = function (event) {
window.open('/watch?v=' + event.currentTarget.tag, '_blank');
}
}
delivered.push(notification.videoId); delivered.push(notification.videoId);
localStorage.setItem('notification_count', parseInt(localStorage.getItem('notification_count') || '0') + 1);
var notification_ticker = document.getElementById('notification_ticker');
if (parseInt(localStorage.getItem('notification_count')) > 0) { let notification_count = helpers.storage.get(STORAGE_KEY_NOTIF_COUNT) || 0;
notification_ticker.innerHTML = notification_count++;
'<span id="notification_count">' + localStorage.getItem('notification_count') + '</span> <i class="icon ion-ios-notifications"></i>'; helpers.storage.set(STORAGE_KEY_NOTIF_COUNT, notification_count);
} else {
notification_ticker.innerHTML = update_ticker_count();
'<i class="icon ion-ios-notifications-outline"></i>';
} // permission for notifications handled on settings page. JS handler is in handlers.js
} if (window.Notification && Notification.permission === 'granted') {
} var notification_text = notification.liveNow ? notification_data.live_now_text : notification_data.upload_text;
notification_text = notification_text.replace('`x`', notification.author);
var system_notification = new Notification(notification_text, {
body: notification.title,
icon: '/ggpht' + new URL(notification.authorThumbnails[2].url).pathname,
img: '/ggpht' + new URL(notification.authorThumbnails[4].url).pathname
});
system_notification.onclick = function (e) {
open('/watch?v=' + notification.videoId, '_blank');
};
}
};
notifications.addEventListener('error', function (e) {
console.warn('Something went wrong with notifications, trying to reconnect...');
notifications = notifications_mock;
setTimeout(get_subscriptions, 1000);
});
notifications.addEventListener('error', handle_notification_error);
notifications.stream(); notifications.stream();
} }
function handle_notification_error(event) { function update_ticker_count() {
console.log('Something went wrong with notifications, trying to reconnect...');
notifications = { close: function () { } };
setTimeout(function () { get_subscriptions(create_notification_stream) }, 1000);
}
window.addEventListener('load', function (e) {
localStorage.setItem('notification_count', document.getElementById('notification_count') ? document.getElementById('notification_count').innerText : '0');
if (localStorage.getItem('stream')) {
localStorage.removeItem('stream');
} else {
setTimeout(function () {
if (!localStorage.getItem('stream')) {
notifications = { close: function () { } };
localStorage.setItem('stream', true);
get_subscriptions(create_notification_stream);
}
}, Math.random() * 1000 + 50);
}
window.addEventListener('storage', function (e) {
if (e.key === 'stream' && !e.newValue) {
if (notifications) {
localStorage.setItem('stream', true);
} else {
setTimeout(function () {
if (!localStorage.getItem('stream')) {
notifications = { close: function () { } };
localStorage.setItem('stream', true);
get_subscriptions(create_notification_stream);
}
}, Math.random() * 1000 + 50);
}
} else if (e.key === 'notification_count') {
var notification_ticker = document.getElementById('notification_ticker'); var notification_ticker = document.getElementById('notification_ticker');
if (parseInt(e.newValue) > 0) { const notification_count = helpers.storage.get(STORAGE_KEY_STREAM);
if (notification_count > 0) {
notification_ticker.innerHTML = notification_ticker.innerHTML =
'<span id="notification_count">' + e.newValue + '</span> <i class="icon ion-ios-notifications"></i>'; '<span id="notification_count">' + notification_count + '</span> <i class="icon ion-ios-notifications"></i>';
} else { } else {
notification_ticker.innerHTML = notification_ticker.innerHTML =
'<i class="icon ion-ios-notifications-outline"></i>'; '<i class="icon ion-ios-notifications-outline"></i>';
} }
}
function start_stream_if_needed() {
// random wait for other tabs set 'stream' flag
setTimeout(function () {
if (!helpers.storage.get(STORAGE_KEY_STREAM)) {
// if no one set 'stream', set it by yourself and start stream
helpers.storage.set(STORAGE_KEY_STREAM, true);
notifications = notifications_mock;
get_subscriptions();
}
}, Math.random() * 1000 + 50); // [0.050 .. 1.050) second
}
addEventListener('storage', function (e) {
if (e.key === STORAGE_KEY_NOTIF_COUNT)
update_ticker_count();
// if 'stream' key was removed
if (e.key === STORAGE_KEY_STREAM && !helpers.storage.get(STORAGE_KEY_STREAM)) {
if (notifications) {
// restore it if we have active stream
helpers.storage.set(STORAGE_KEY_STREAM, true);
} else {
start_stream_if_needed();
}
} }
});
}); });
window.addEventListener('unload', function (e) { addEventListener('load', function () {
if (notifications) { var notification_count_el = document.getElementById('notification_count');
localStorage.removeItem('stream'); var notification_count = notification_count_el ? parseInt(notification_count_el.textContent) : 0;
} helpers.storage.set(STORAGE_KEY_NOTIF_COUNT, notification_count);
if (helpers.storage.get(STORAGE_KEY_STREAM))
helpers.storage.remove(STORAGE_KEY_STREAM);
start_stream_if_needed();
});
addEventListener('unload', function () {
// let chance to other tabs to be a streamer via firing 'storage' event
if (notifications) helpers.storage.remove(STORAGE_KEY_STREAM);
}); });

View File

@ -1,8 +1,8 @@
var player_data = JSON.parse(document.getElementById('player_data').innerHTML); 'use strict';
var video_data = JSON.parse(document.getElementById('video_data').innerHTML); var player_data = JSON.parse(document.getElementById('player_data').textContent);
var video_data = JSON.parse(document.getElementById('video_data').textContent);
var options = { var options = {
preload: 'auto',
liveui: true, liveui: true,
playbackRates: [0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0], playbackRates: [0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0],
controlBar: { controlBar: {
@ -16,6 +16,7 @@ var options = {
'remainingTimeDisplay', 'remainingTimeDisplay',
'Spacer', 'Spacer',
'captionsButton', 'captionsButton',
'audioTrackButton',
'qualitySelector', 'qualitySelector',
'playbackRateMenuButton', 'playbackRateMenuButton',
'fullscreenToggle' 'fullscreenToggle'
@ -23,11 +24,11 @@ var options = {
}, },
html5: { html5: {
preloadTextTracks: false, preloadTextTracks: false,
hls: { vhs: {
overrideNative: true overrideNative: true
} }
} }
} };
if (player_data.aspect_ratio) { if (player_data.aspect_ratio) {
options.aspectRatio = player_data.aspect_ratio; options.aspectRatio = player_data.aspect_ratio;
@ -35,119 +36,212 @@ if (player_data.aspect_ratio) {
var embed_url = new URL(location); var embed_url = new URL(location);
embed_url.searchParams.delete('v'); embed_url.searchParams.delete('v');
short_url = location.origin + '/' + video_data.id + embed_url.search; var short_url = location.origin + '/' + video_data.id + embed_url.search;
embed_url = location.origin + '/embed/' + video_data.id + embed_url.search; embed_url = location.origin + '/embed/' + video_data.id + embed_url.search;
var shareOptions = { var save_player_pos_key = 'save_player_pos';
socials: ['fbFeed', 'tw', 'reddit', 'email'],
url: short_url, videojs.Vhs.xhr.beforeRequest = function(options) {
title: player_data.title, // set local if requested not videoplayback
description: player_data.description, if (!options.uri.includes('videoplayback')) {
image: player_data.thumbnail, if (!options.uri.includes('local=true'))
embedCode: "<iframe id='ivplayer' width='640' height='360' src='" + embed_url + "' style='border:none;'></iframe>" options.uri += '?local=true';
}
videojs.Hls.xhr.beforeRequest = function(options) {
if (options.uri.indexOf('videoplayback') === -1 && options.uri.indexOf('local=true') === -1) {
options.uri = options.uri + '?local=true';
} }
return options; return options;
}; };
var player = videojs('player', options); var player = videojs('player', options);
player.on('error', function () {
if (video_data.params.quality === 'dash') return;
if (location.pathname.startsWith('/embed/')) { var localNotDisabled = (
player.overlay({ !player.currentSrc().includes('local=true') && !video_data.local_disabled
overlays: [{ );
start: 'loadstart', var reloadMakesSense = (
content: '<h1><a rel="noopener" target="_blank" href="' + location.origin + '/watch?v=' + video_data.id + '">' + player_data.title + '</a></h1>', player.error().code === MediaError.MEDIA_ERR_NETWORK ||
end: 'playing', player.error().code === MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED
align: 'top' );
}, {
start: 'pause',
content: '<h1><a rel="noopener" target="_blank" href="' + location.origin + '/watch?v=' + video_data.id + '">' + player_data.title + '</a></h1>',
end: 'playing',
align: 'top'
}]
});
}
// Detect mobile users and initalize mobileUi for better UX if (localNotDisabled) {
// Detection code taken from https://stackoverflow.com/a/20293441 // add local=true to all current sources
player.src(player.currentSources().map(function (source) {
function isMobile() { source.src += '&local=true';
try{ document.createEvent("TouchEvent"); return true; } return source;
catch(e){ return false; } }));
} } else if (reloadMakesSense) {
setTimeout(function () {
if (isMobile()) { console.warn('An error occurred in the player, reloading...');
player.mobileUi();
buttons = ["playToggle", "volumePanel", "captionsButton"];
if (video_data.params.quality !== 'dash') {
buttons.push("qualitySelector")
}
// Create new control bar object for operation buttons
const ControlBar = videojs.getComponent("controlBar");
let operations_bar = new ControlBar(player, {
children: [],
playbackRates: [0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0]
});
buttons.slice(1).forEach(child => operations_bar.addChild(child))
// Remove operation buttons from primary control bar
primary_control_bar = player.getChild("controlBar");
buttons.forEach(child => primary_control_bar.removeChild(child));
operations_bar_element = operations_bar.el();
operations_bar_element.className += " mobile-operations-bar"
player.addChild(operations_bar)
// Playback menu doesn't work when its initalized outside of the primary control bar
playback_element = document.getElementsByClassName("vjs-playback-rate")[0]
operations_bar_element.append(playback_element)
// The share and http source selector element can't be fetched till the players ready.
player.one("playing", () => {
share_element = document.getElementsByClassName("vjs-share-control")[0]
operations_bar_element.append(share_element)
if (video_data.params.quality === 'dash') {
http_source_selector = document.getElementsByClassName("vjs-http-source-selector vjs-menu-button")[0]
operations_bar_element.append(http_source_selector)
}
})
}
player.on('error', function (event) {
if (player.error().code === 2 || player.error().code === 4) {
setTimeout(function (event) {
console.log('An error occured in the player, reloading...');
// After load() all parameters are reset. Save them
var currentTime = player.currentTime(); var currentTime = player.currentTime();
var playbackRate = player.playbackRate(); var playbackRate = player.playbackRate();
var paused = player.paused(); var paused = player.paused();
player.load(); player.load();
if (currentTime > 0.5) { if (currentTime > 0.5) currentTime -= 0.5;
currentTime -= 0.5;
}
player.currentTime(currentTime); player.currentTime(currentTime);
player.playbackRate(playbackRate); player.playbackRate(playbackRate);
if (!paused) player.play();
if (!paused) {
player.play();
}
}, 5000); }, 5000);
} }
}); });
if (video_data.params.quality === 'dash') {
player.reloadSourceOnError({
errorInterval: 10
});
}
/**
* Function for add time argument to url
*
* @param {String} url
* @param {String} [base]
* @returns {URL} urlWithTimeArg
*/
function addCurrentTimeToURL(url, base) {
var urlUsed = new URL(url, base);
urlUsed.searchParams.delete('start');
var currentTime = Math.ceil(player.currentTime());
if (currentTime > 0)
urlUsed.searchParams.set('t', currentTime);
else if (urlUsed.searchParams.has('t'))
urlUsed.searchParams.delete('t');
return urlUsed;
}
/**
* Global variable to save the last timestamp (in full seconds) at which the external
* links were updated by the 'timeupdate' callback below.
*
* It is initialized to 5s so that the video will always restart from the beginning
* if the user hasn't really started watching before switching to the other website.
*/
var timeupdate_last_ts = 5;
/**
* Callback that updates the timestamp on all external links
*/
player.on('timeupdate', function () {
// Only update once every second
let current_ts = Math.floor(player.currentTime());
if (current_ts > timeupdate_last_ts) timeupdate_last_ts = current_ts;
else return;
// YouTube links
let elem_yt_watch = document.getElementById('link-yt-watch');
let elem_yt_embed = document.getElementById('link-yt-embed');
let base_url_yt_watch = elem_yt_watch.getAttribute('data-base-url');
let base_url_yt_embed = elem_yt_embed.getAttribute('data-base-url');
elem_yt_watch.href = addCurrentTimeToURL(base_url_yt_watch);
elem_yt_embed.href = addCurrentTimeToURL(base_url_yt_embed);
// Invidious links
let domain = window.location.origin;
let elem_iv_embed = document.getElementById('link-iv-embed');
let elem_iv_other = document.getElementById('link-iv-other');
let base_url_iv_embed = elem_iv_embed.getAttribute('data-base-url');
let base_url_iv_other = elem_iv_other.getAttribute('data-base-url');
elem_iv_embed.href = addCurrentTimeToURL(base_url_iv_embed, domain);
elem_iv_other.href = addCurrentTimeToURL(base_url_iv_other, domain);
});
var shareOptions = {
socials: ['fbFeed', 'tw', 'reddit', 'email'],
get url() {
return addCurrentTimeToURL(short_url);
},
title: player_data.title,
description: player_data.description,
image: player_data.thumbnail,
get embedCode() {
// Single quotes inside here required. HTML inserted as is into value attribute of input
return "<iframe id='ivplayer' width='640' height='360' src='" +
addCurrentTimeToURL(embed_url) + "' style='border:none;'></iframe>";
}
};
if (location.pathname.startsWith('/embed/')) {
var overlay_content = '<h1><a rel="noopener" target="_blank" href="' + location.origin + '/watch?v=' + video_data.id + '">' + player_data.title + '</a></h1>';
player.overlay({
overlays: [
{ start: 'loadstart', content: overlay_content, end: 'playing', align: 'top'},
{ start: 'pause', content: overlay_content, end: 'playing', align: 'top'}
]
});
}
// Detect mobile users and initialize mobileUi for better UX
// Detection code taken from https://stackoverflow.com/a/20293441
function isMobile() {
try{ document.createEvent('TouchEvent'); return true; }
catch(e){ return false; }
}
if (isMobile()) {
player.mobileUi({ touchControls: { seekSeconds: 5 * player.playbackRate() } });
var buttons = ['playToggle', 'volumePanel', 'captionsButton'];
if (!video_data.params.listen && video_data.params.quality === 'dash') buttons.push('audioTrackButton');
if (video_data.params.listen || video_data.params.quality !== 'dash') buttons.push('qualitySelector');
// Create new control bar object for operation buttons
const ControlBar = videojs.getComponent('controlBar');
let operations_bar = new ControlBar(player, {
children: [],
playbackRates: [0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0]
});
buttons.slice(1).forEach(function (child) {operations_bar.addChild(child);});
// Remove operation buttons from primary control bar
var primary_control_bar = player.getChild('controlBar');
buttons.forEach(function (child) {primary_control_bar.removeChild(child);});
var operations_bar_element = operations_bar.el();
operations_bar_element.classList.add('mobile-operations-bar');
player.addChild(operations_bar);
// Playback menu doesn't work when it's initialized outside of the primary control bar
var playback_element = document.getElementsByClassName('vjs-playback-rate')[0];
operations_bar_element.append(playback_element);
// The share and http source selector element can't be fetched till the players ready.
player.one('playing', function () {
var share_element = document.getElementsByClassName('vjs-share-control')[0];
operations_bar_element.append(share_element);
if (!video_data.params.listen && video_data.params.quality === 'dash') {
var http_source_selector = document.getElementsByClassName('vjs-http-source-selector vjs-menu-button')[0];
operations_bar_element.append(http_source_selector);
}
});
}
// Enable VR video support
if (!video_data.params.listen && video_data.vr && video_data.params.vr_mode) {
player.crossOrigin('anonymous');
switch (video_data.projection_type) {
case 'EQUIRECTANGULAR':
player.vr({projection: 'equirectangular'});
default: // Should only be 'MESH' but we'll use this as a fallback.
player.vr({projection: 'EAC'});
}
}
// Add markers // Add markers
if (video_data.params.video_start > 0 || video_data.params.video_end > 0) { if (video_data.params.video_start > 0 || video_data.params.video_end > 0) {
var markers = [{ time: video_data.params.video_start, text: 'Start' }]; var markers = [{ time: video_data.params.video_start, text: 'Start' }];
@ -160,13 +254,8 @@ if (video_data.params.video_start > 0 || video_data.params.video_end > 0) {
player.markers({ player.markers({
onMarkerReached: function (marker) { onMarkerReached: function (marker) {
if (marker.text === 'End') { if (marker.text === 'End')
if (player.loop()) { player.loop() ? player.markers.prev('Start') : player.pause();
player.markers.prev('Start');
} else {
player.pause();
}
}
}, },
markers: markers markers: markers
}); });
@ -177,9 +266,76 @@ if (video_data.params.video_start > 0 || video_data.params.video_end > 0) {
player.volume(video_data.params.volume / 100); player.volume(video_data.params.volume / 100);
player.playbackRate(video_data.params.speed); player.playbackRate(video_data.params.speed);
/**
* Method for getting the contents of a cookie
*
* @param {String} name Name of cookie
* @returns {String|null} cookieValue
*/
function getCookieValue(name) {
var cookiePrefix = name + '=';
var matchedCookie = document.cookie.split(';').find(function (item) {return item.includes(cookiePrefix);});
if (matchedCookie)
return matchedCookie.replace(cookiePrefix, '');
return null;
}
/**
* Method for updating the 'PREFS' cookie (or creating it if missing)
*
* @param {number} newVolume New volume defined (null if unchanged)
* @param {number} newSpeed New speed defined (null if unchanged)
*/
function updateCookie(newVolume, newSpeed) {
var volumeValue = newVolume !== null ? newVolume : video_data.params.volume;
var speedValue = newSpeed !== null ? newSpeed : video_data.params.speed;
var cookieValue = getCookieValue('PREFS');
var cookieData;
if (cookieValue !== null) {
var cookieJson = JSON.parse(decodeURIComponent(cookieValue));
cookieJson.volume = volumeValue;
cookieJson.speed = speedValue;
cookieData = encodeURIComponent(JSON.stringify(cookieJson));
} else {
cookieData = encodeURIComponent(JSON.stringify({ 'volume': volumeValue, 'speed': speedValue }));
}
// Set expiration in 2 year
var date = new Date();
date.setFullYear(date.getFullYear() + 2);
var ipRegex = /^((\d+\.){3}\d+|[\dA-Fa-f]*:[\d:A-Fa-f]*:[\d:A-Fa-f]+)$/;
var domainUsed = location.hostname;
// Fix for a bug in FF where the leading dot in the FQDN is not ignored
if (domainUsed.charAt(0) !== '.' && !ipRegex.test(domainUsed) && domainUsed !== 'localhost')
domainUsed = '.' + location.hostname;
var secure = location.protocol.startsWith("https") ? " Secure;" : "";
document.cookie = 'PREFS=' + cookieData + '; SameSite=Lax; path=/; domain=' +
domainUsed + '; expires=' + date.toGMTString() + ';' + secure;
video_data.params.volume = volumeValue;
video_data.params.speed = speedValue;
}
player.on('ratechange', function () {
updateCookie(null, player.playbackRate());
if (isMobile()) {
player.mobileUi({ touchControls: { seekSeconds: 5 * player.playbackRate() } });
}
});
player.on('volumechange', function () {
updateCookie(Math.ceil(player.volume() * 100), null);
});
player.on('waiting', function () { player.on('waiting', function () {
if (player.playbackRate() > 1 && player.liveTracker.isLive() && player.liveTracker.atLiveEdge()) { if (player.playbackRate() > 1 && player.liveTracker.isLive() && player.liveTracker.atLiveEdge()) {
console.log('Player has caught up to source, resetting playbackRate.') console.info('Player has caught up to source, resetting playbackRate');
player.playbackRate(1); player.playbackRate(1);
} }
}); });
@ -188,19 +344,44 @@ if (video_data.premiere_timestamp && Math.round(new Date() / 1000) < video_data.
player.getChild('bigPlayButton').hide(); player.getChild('bigPlayButton').hide();
} }
if (video_data.params.save_player_pos) {
const url = new URL(location);
const hasTimeParam = url.searchParams.has('t');
const rememberedTime = get_video_time();
let lastUpdated = 0;
if(!hasTimeParam) {
if (rememberedTime >= video_data.length_seconds - 20)
set_seconds_after_start(0);
else
set_seconds_after_start(rememberedTime);
}
player.on('timeupdate', function () {
const raw = player.currentTime();
const time = Math.floor(raw);
if(lastUpdated !== time && raw <= video_data.length_seconds - 15) {
save_video_time(time);
lastUpdated = time;
}
});
}
else remove_all_video_times();
if (video_data.params.autoplay) { if (video_data.params.autoplay) {
var bpb = player.getChild('bigPlayButton'); var bpb = player.getChild('bigPlayButton');
bpb.hide(); bpb.hide();
player.ready(function () { player.ready(function () {
new Promise(function (resolve, reject) { new Promise(function (resolve, reject) {
setTimeout(() => resolve(1), 1); setTimeout(function () {resolve(1);}, 1);
}).then(function (result) { }).then(function (result) {
var promise = player.play(); var promise = player.play();
if (promise !== undefined) { if (promise !== undefined) {
promise.then(_ => { promise.then(function () {
}).catch(error => { }).catch(function (error) {
bpb.show(); bpb.show();
}); });
} }
@ -211,67 +392,47 @@ if (video_data.params.autoplay) {
if (!video_data.params.listen && video_data.params.quality === 'dash') { if (!video_data.params.listen && video_data.params.quality === 'dash') {
player.httpSourceSelector(); player.httpSourceSelector();
if (video_data.params.quality_dash != "auto") { if (video_data.params.quality_dash !== 'auto') {
player.ready(() => { player.ready(function () {
player.on("loadedmetadata", () => { player.on('loadedmetadata', function () {
const qualityLevels = Array.from(player.qualityLevels()).sort((a, b) => a.height - b.height); const qualityLevels = Array.from(player.qualityLevels()).sort(function (a, b) {return a.height - b.height;});
let targetQualityLevel; let targetQualityLevel;
switch (video_data.params.quality_dash) { switch (video_data.params.quality_dash) {
case "best": case 'best':
targetQualityLevel = qualityLevels.length - 1; targetQualityLevel = qualityLevels.length - 1;
break; break;
case "worst": case 'worst':
targetQualityLevel = 0; targetQualityLevel = 0;
break; break;
default: default:
const targetHeight = Number.parseInt(video_data.params.quality_dash, 10); const targetHeight = parseInt(video_data.params.quality_dash);
for (let i = 0; i < qualityLevels.length; i++) { for (let i = 0; i < qualityLevels.length; i++) {
if (qualityLevels[i].height <= targetHeight) { if (qualityLevels[i].height <= targetHeight)
targetQualityLevel = i; targetQualityLevel = i;
} else { else
break; break;
} }
} }
} qualityLevels.forEach(function (level, index) {
for (let i = 0; i < qualityLevels.length; i++) { level.enabled = (index === targetQualityLevel);
qualityLevels[i].enabled = (i == targetQualityLevel); });
}
}); });
}); });
} }
} }
player.vttThumbnails({ player.vttThumbnails({
src: location.origin + '/api/v1/storyboards/' + video_data.id + '?height=90', src: '/api/v1/storyboards/' + video_data.id + '?height=90',
showTimestamp: true showTimestamp: true
}); });
// Enable annotations // Enable annotations
if (!video_data.params.listen && video_data.params.annotations) { if (!video_data.params.listen && video_data.params.annotations) {
window.addEventListener('load', function (e) { addEventListener('load', function (e) {
var video_container = document.getElementById('player'); addEventListener('__ar_annotation_click', function (e) {
let xhr = new XMLHttpRequest(); const url = e.detail.url,
xhr.responseType = 'text'; target = e.detail.target,
xhr.timeout = 60000; seconds = e.detail.seconds;
xhr.open('GET', '/api/v1/annotations/' + video_data.id, true);
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
videojs.registerPlugin('youtubeAnnotationsPlugin', youtubeAnnotationsPlugin);
if (!player.paused()) {
player.youtubeAnnotationsPlugin({ annotationXml: xhr.response, videoContainer: video_container });
} else {
player.one('play', function (event) {
player.youtubeAnnotationsPlugin({ annotationXml: xhr.response, videoContainer: video_container });
});
}
}
}
}
window.addEventListener('__ar_annotation_click', e => {
const { url, target, seconds } = e.detail;
var path = new URL(url); var path = new URL(url);
if (path.href.startsWith('https://www.youtube.com/watch?') && seconds) { if (path.href.startsWith('https://www.youtube.com/watch?') && seconds) {
@ -281,88 +442,104 @@ if (!video_data.params.listen && video_data.params.annotations) {
path = path.pathname + path.search; path = path.pathname + path.search;
if (target === 'current') { if (target === 'current') {
window.location.href = path; location.href = path;
} else if (target === 'new') { } else if (target === 'new') {
window.open(path, '_blank'); open(path, '_blank');
}
});
helpers.xhr('GET', '/api/v1/annotations/' + video_data.id, {
responseType: 'text',
timeout: 60000
}, {
on200: function (response) {
var video_container = document.getElementById('player');
videojs.registerPlugin('youtubeAnnotationsPlugin', youtubeAnnotationsPlugin);
if (player.paused()) {
player.one('play', function (event) {
player.youtubeAnnotationsPlugin({ annotationXml: response, videoContainer: video_container });
});
} else {
player.youtubeAnnotationsPlugin({ annotationXml: response, videoContainer: video_container });
}
} }
}); });
xhr.send();
}); });
} }
function increase_volume(delta) { function change_volume(delta) {
const curVolume = player.volume(); const curVolume = player.volume();
let newVolume = curVolume + delta; let newVolume = curVolume + delta;
if (newVolume > 1) { newVolume = helpers.clamp(newVolume, 0, 1);
newVolume = 1;
} else if (newVolume < 0) {
newVolume = 0;
}
player.volume(newVolume); player.volume(newVolume);
} }
function toggle_muted() { function toggle_muted() {
const isMuted = player.muted(); player.muted(!player.muted());
player.muted(!isMuted);
} }
function skip_seconds(delta) { function skip_seconds(delta) {
const duration = player.duration(); const duration = player.duration();
const curTime = player.currentTime(); const curTime = player.currentTime();
let newTime = curTime + delta; let newTime = curTime + delta;
if (newTime > duration) { newTime = helpers.clamp(newTime, 0, duration);
newTime = duration;
} else if (newTime < 0) {
newTime = 0;
}
player.currentTime(newTime); player.currentTime(newTime);
} }
function set_seconds_after_start(delta) {
const start = video_data.params.video_start;
player.currentTime(start + delta);
}
function save_video_time(seconds) {
const all_video_times = get_all_video_times();
all_video_times[video_data.id] = seconds;
helpers.storage.set(save_player_pos_key, all_video_times);
}
function get_video_time() {
return get_all_video_times()[video_data.id] || 0;
}
function get_all_video_times() {
return helpers.storage.get(save_player_pos_key) || {};
}
function remove_all_video_times() {
helpers.storage.remove(save_player_pos_key);
}
function set_time_percent(percent) { function set_time_percent(percent) {
const duration = player.duration(); const duration = player.duration();
const newTime = duration * (percent / 100); const newTime = duration * (percent / 100);
player.currentTime(newTime); player.currentTime(newTime);
} }
function play() { function play() { player.play(); }
player.play(); function pause() { player.pause(); }
} function stop() { player.pause(); player.currentTime(0); }
function toggle_play() { player.paused() ? play() : pause(); }
function pause() {
player.pause();
}
function stop() {
player.pause();
player.currentTime(0);
}
function toggle_play() {
if (player.paused()) {
play();
} else {
pause();
}
}
const toggle_captions = (function () { const toggle_captions = (function () {
let toggledTrack = null; let toggledTrack = null;
const onChange = function (e) {
function bindChange(onOrOff) {
player.textTracks()[onOrOff]('change', function (e) {
toggledTrack = null; toggledTrack = null;
}; });
const bindChange = function (onOrOff) { }
player.textTracks()[onOrOff]('change', onChange);
};
// Wrapper function to ignore our own emitted events and only listen // Wrapper function to ignore our own emitted events and only listen
// to events emitted by Video.js on click on the captions menu items. // to events emitted by Video.js on click on the captions menu items.
const setMode = function (track, mode) { function setMode(track, mode) {
bindChange('off'); bindChange('off');
track.mode = mode; track.mode = mode;
window.setTimeout(function () { setTimeout(function () {
bindChange('on'); bindChange('on');
}, 0); }, 0);
}; }
bindChange('on'); bindChange('on');
return function () { return function () {
if (toggledTrack !== null) { if (toggledTrack !== null) {
@ -382,9 +559,7 @@ const toggle_captions = (function () {
const tracks = player.textTracks(); const tracks = player.textTracks();
for (let i = 0; i < tracks.length; i++) { for (let i = 0; i < tracks.length; i++) {
const track = tracks[i]; const track = tracks[i];
if (track.kind !== 'captions') { if (track.kind !== 'captions') continue;
continue;
}
if (fallbackCaptionsTrack === null) { if (fallbackCaptionsTrack === null) {
fallbackCaptionsTrack = track; fallbackCaptionsTrack = track;
@ -405,26 +580,18 @@ const toggle_captions = (function () {
})(); })();
function toggle_fullscreen() { function toggle_fullscreen() {
if (player.isFullscreen()) { player.isFullscreen() ? player.exitFullscreen() : player.requestFullscreen();
player.exitFullscreen();
} else {
player.requestFullscreen();
}
} }
function increase_playback_rate(steps) { function increase_playback_rate(steps) {
const maxIndex = options.playbackRates.length - 1; const maxIndex = options.playbackRates.length - 1;
const curIndex = options.playbackRates.indexOf(player.playbackRate()); const curIndex = options.playbackRates.indexOf(player.playbackRate());
let newIndex = curIndex + steps; let newIndex = curIndex + steps;
if (newIndex > maxIndex) { newIndex = helpers.clamp(newIndex, 0, maxIndex);
newIndex = maxIndex;
} else if (newIndex < 0) {
newIndex = 0;
}
player.playbackRate(options.playbackRates[newIndex]); player.playbackRate(options.playbackRates[newIndex]);
} }
window.addEventListener('keydown', e => { addEventListener('keydown', function (e) {
if (e.target.tagName.toLowerCase() === 'input') { if (e.target.tagName.toLowerCase() === 'input') {
// Ignore input when focus is on certain elements, e.g. form fields. // Ignore input when focus is on certain elements, e.g. form fields.
return; return;
@ -452,27 +619,15 @@ window.addEventListener('keydown', e => {
action = toggle_play; action = toggle_play;
break; break;
case 'MediaPlay': case 'MediaPlay': action = play; break;
action = play; case 'MediaPause': action = pause; break;
break; case 'MediaStop': action = stop; break;
case 'MediaPause':
action = pause;
break;
case 'MediaStop':
action = stop;
break;
case 'ArrowUp': case 'ArrowUp':
if (isPlayerFocused) { if (isPlayerFocused) action = change_volume.bind(this, 0.1);
action = increase_volume.bind(this, 0.1);
}
break; break;
case 'ArrowDown': case 'ArrowDown':
if (isPlayerFocused) { if (isPlayerFocused) action = change_volume.bind(this, -0.1);
action = increase_volume.bind(this, -0.1);
}
break; break;
case 'm': case 'm':
@ -504,16 +659,15 @@ window.addEventListener('keydown', e => {
case '7': case '7':
case '8': case '8':
case '9': case '9':
// Ignore numpad numbers
if (code > 57) break;
const percent = (code - 48) * 10; const percent = (code - 48) * 10;
action = set_time_percent.bind(this, percent); action = set_time_percent.bind(this, percent);
break; break;
case 'c': case 'c': action = toggle_captions; break;
action = toggle_captions; case 'f': action = toggle_fullscreen; break;
break;
case 'f':
action = toggle_fullscreen;
break;
case 'N': case 'N':
case 'MediaTrackNext': case 'MediaTrackNext':
@ -524,19 +678,14 @@ window.addEventListener('keydown', e => {
// TODO: Add support to play back previous video. // TODO: Add support to play back previous video.
break; break;
case '.': // TODO: More precise step. Now FPS is taken equal to 29.97
// TODO: Add support for next-frame-stepping. // Common FPS: https://forum.videohelp.com/threads/81868#post323588
break; // Possible solution is new HTMLVideoElement.requestVideoFrameCallback() https://wicg.github.io/video-rvfc/
case ',': case ',': action = function () { pause(); skip_seconds(-1/29.97); }; break;
// TODO: Add support for previous-frame-stepping. case '.': action = function () { pause(); skip_seconds( 1/29.97); }; break;
break;
case '>': case '>': action = increase_playback_rate.bind(this, 1); break;
action = increase_playback_rate.bind(this, 1); case '<': action = increase_playback_rate.bind(this, -1); break;
break;
case '<':
action = increase_playback_rate.bind(this, -1);
break;
default: default:
console.info('Unhandled key down event: %s:', decoratedKey, e); console.info('Unhandled key down event: %s:', decoratedKey, e);
@ -552,84 +701,88 @@ window.addEventListener('keydown', e => {
// Add support for controlling the player volume by scrolling over it. Adapted from // Add support for controlling the player volume by scrolling over it. Adapted from
// https://github.com/ctd1500/videojs-hotkeys/blob/bb4a158b2e214ccab87c2e7b95f42bc45c6bfd87/videojs.hotkeys.js#L292-L328 // https://github.com/ctd1500/videojs-hotkeys/blob/bb4a158b2e214ccab87c2e7b95f42bc45c6bfd87/videojs.hotkeys.js#L292-L328
(function () { (function () {
const volumeStep = 0.05;
const enableVolumeScroll = true;
const enableHoverScroll = true;
const doc = document;
const pEl = document.getElementById('player'); const pEl = document.getElementById('player');
var volumeHover = false; var volumeHover = false;
var volumeSelector = pEl.querySelector('.vjs-volume-menu-button') || pEl.querySelector('.vjs-volume-panel'); var volumeSelector = pEl.querySelector('.vjs-volume-menu-button') || pEl.querySelector('.vjs-volume-panel');
if (volumeSelector != null) { if (volumeSelector !== null) {
volumeSelector.onmouseover = function () { volumeHover = true; }; volumeSelector.onmouseover = function () { volumeHover = true; };
volumeSelector.onmouseout = function () { volumeHover = false; }; volumeSelector.onmouseout = function () { volumeHover = false; };
} }
var mouseScroll = function mouseScroll(event) { function mouseScroll(event) {
var activeEl = doc.activeElement;
if (enableHoverScroll) {
// If we leave this undefined then it can match non-existent elements below
activeEl = 0;
}
// When controls are disabled, hotkeys will be disabled as well // When controls are disabled, hotkeys will be disabled as well
if (player.controls()) { if (!player.controls() || !volumeHover) return;
if (volumeHover) {
if (enableVolumeScroll) {
event = window.event || event;
var delta = Math.max(-1, Math.min(1, (event.wheelDelta || -event.detail)));
event.preventDefault();
if (delta == 1) { event.preventDefault();
increase_volume(volumeStep); var wheelMove = event.wheelDelta || -event.detail;
} else if (delta == -1) { var volumeSign = Math.sign(wheelMove);
increase_volume(-volumeStep);
change_volume(volumeSign * 0.05); // decrease/increase by 5%
} }
}
}
}
};
player.on('mousewheel', mouseScroll); player.on('mousewheel', mouseScroll);
player.on("DOMMouseScroll", mouseScroll); player.on('DOMMouseScroll', mouseScroll);
}()); }());
// Since videojs-share can sometimes be blocked, we defer it until last // Since videojs-share can sometimes be blocked, we defer it until last
if (player.share) { if (player.share) player.share(shareOptions);
player.share(shareOptions);
}
// show the preferred caption by default // show the preferred caption by default
if (player_data.preferred_caption_found) { if (player_data.preferred_caption_found) {
player.ready(() => { player.ready(function () {
if (!video_data.params.listen && video_data.params.quality === 'dash') {
// play.textTracks()[0] on DASH mode is showing some debug messages
player.textTracks()[1].mode = 'showing'; player.textTracks()[1].mode = 'showing';
} else {
player.textTracks()[0].mode = 'showing';
}
}); });
} }
// Safari audio double duration fix // Safari audio double duration fix
if (navigator.vendor == "Apple Computer, Inc." && video_data.params.listen) { if (navigator.vendor === 'Apple Computer, Inc.' && video_data.params.listen) {
player.on('loadedmetadata', function () { player.on('loadedmetadata', function () {
player.on('timeupdate', function () { player.on('timeupdate', function () {
if (player.remainingTime() < player.duration() / 2) { if (player.remainingTime() < player.duration() / 2 && player.remainingTime() >= 2) {
player.currentTime(player.duration() + 1); player.currentTime(player.duration() - 1);
} }
}); });
}); });
} }
// Safari screen timeout on looped video playback fix
if (navigator.vendor === 'Apple Computer, Inc.' && !video_data.params.listen && video_data.params.video_loop) {
player.loop(false);
player.ready(function () {
player.on('ended', function () {
player.currentTime(0);
player.play();
});
});
}
// Watch on Invidious link // Watch on Invidious link
if (window.location.pathname.startsWith("/embed/")) { if (location.pathname.startsWith('/embed/')) {
const Button = videojs.getComponent('Button'); const Button = videojs.getComponent('Button');
let watch_on_invidious_button = new Button(player); let watch_on_invidious_button = new Button(player);
// Create hyperlink for current instance // Create hyperlink for current instance
redirect_element = document.createElement("a"); var redirect_element = document.createElement('a');
redirect_element.setAttribute("href", `http://${window.location.host}/watch?v=${window.location.pathname.replace("/embed/","")}`) redirect_element.setAttribute('href', location.pathname.replace('/embed/', '/watch?v='));
redirect_element.appendChild(document.createTextNode("Invidious")) redirect_element.appendChild(document.createTextNode('Invidious'));
watch_on_invidious_button.el().appendChild(redirect_element) watch_on_invidious_button.el().appendChild(redirect_element);
watch_on_invidious_button.addClass("watch-on-invidious") watch_on_invidious_button.addClass('watch-on-invidious');
cb = player.getChild('ControlBar') var cb = player.getChild('ControlBar');
cb.addChild(watch_on_invidious_button) cb.addChild(watch_on_invidious_button);
}; }
addEventListener('DOMContentLoaded', function () {
// Save time during redirection on another instance
const changeInstanceLink = document.querySelector('#watch-on-another-invidious-instance > a');
if (changeInstanceLink) changeInstanceLink.addEventListener('click', function () {
changeInstanceLink.href = addCurrentTimeToURL(changeInstanceLink.href);
});
});

View File

@ -1,4 +1,6 @@
var playlist_data = JSON.parse(document.getElementById('playlist_data').innerHTML); 'use strict';
var playlist_data = JSON.parse(document.getElementById('playlist_data').textContent);
var payload = 'csrf_token=' + playlist_data.csrf_token;
function add_playlist_video(target) { function add_playlist_video(target) {
var select = target.parentNode.children[0].children[1]; var select = target.parentNode.children[0].children[1];
@ -7,21 +9,12 @@ function add_playlist_video(target) {
var url = '/playlist_ajax?action_add_video=1&redirect=false' + var url = '/playlist_ajax?action_add_video=1&redirect=false' +
'&video_id=' + target.getAttribute('data-id') + '&video_id=' + target.getAttribute('data-id') +
'&playlist_id=' + option.getAttribute('data-plid'); '&playlist_id=' + option.getAttribute('data-plid');
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 10000;
xhr.open('POST', url, true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.onreadystatechange = function () { helpers.xhr('POST', url, {payload: payload}, {
if (xhr.readyState == 4) { on200: function (response) {
if (xhr.status == 200) { option.textContent = '✓' + option.textContent;
option.innerText = '✓' + option.innerText;
} }
} });
}
xhr.send('csrf_token=' + playlist_data.csrf_token);
} }
function add_playlist_item(target) { function add_playlist_item(target) {
@ -31,21 +24,12 @@ function add_playlist_item(target) {
var url = '/playlist_ajax?action_add_video=1&redirect=false' + var url = '/playlist_ajax?action_add_video=1&redirect=false' +
'&video_id=' + target.getAttribute('data-id') + '&video_id=' + target.getAttribute('data-id') +
'&playlist_id=' + target.getAttribute('data-plid'); '&playlist_id=' + target.getAttribute('data-plid');
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 10000;
xhr.open('POST', url, true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.onreadystatechange = function () { helpers.xhr('POST', url, {payload: payload}, {
if (xhr.readyState == 4) { onNon200: function (xhr) {
if (xhr.status != 200) {
tile.style.display = ''; tile.style.display = '';
} }
} });
}
xhr.send('csrf_token=' + playlist_data.csrf_token);
} }
function remove_playlist_item(target) { function remove_playlist_item(target) {
@ -55,19 +39,10 @@ function remove_playlist_item(target) {
var url = '/playlist_ajax?action_remove_video=1&redirect=false' + var url = '/playlist_ajax?action_remove_video=1&redirect=false' +
'&set_video_id=' + target.getAttribute('data-index') + '&set_video_id=' + target.getAttribute('data-index') +
'&playlist_id=' + target.getAttribute('data-plid'); '&playlist_id=' + target.getAttribute('data-plid');
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 10000;
xhr.open('POST', url, true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.onreadystatechange = function () { helpers.xhr('POST', url, {payload: payload}, {
if (xhr.readyState == 4) { onNon200: function (xhr) {
if (xhr.status != 200) {
tile.style.display = ''; tile.style.display = '';
} }
} });
}
xhr.send('csrf_token=' + playlist_data.csrf_token);
} }

3
assets/js/post.js Normal file
View File

@ -0,0 +1,3 @@
addEventListener('load', function (e) {
get_youtube_comments();
});

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,9 @@
var subscribe_data = JSON.parse(document.getElementById('subscribe_data').innerHTML); 'use strict';
var subscribe_data = JSON.parse(document.getElementById('subscribe_data').textContent);
var payload = 'csrf_token=' + subscribe_data.csrf_token;
var subscribe_button = document.getElementById('subscribe'); var subscribe_button = document.getElementById('subscribe');
subscribe_button.parentNode['action'] = 'javascript:void(0)'; subscribe_button.parentNode.action = 'javascript:void(0)';
if (subscribe_button.getAttribute('data-type') === 'subscribe') { if (subscribe_button.getAttribute('data-type') === 'subscribe') {
subscribe_button.onclick = subscribe; subscribe_button.onclick = subscribe;
@ -9,82 +11,34 @@ if (subscribe_button.getAttribute('data-type') === 'subscribe') {
subscribe_button.onclick = unsubscribe; subscribe_button.onclick = unsubscribe;
} }
function subscribe(retries = 5) { function subscribe() {
if (retries <= 0) {
console.log('Failed to subscribe.');
return;
}
var url = '/subscription_ajax?action_create_subscription_to_channel=1&redirect=false' +
'&c=' + subscribe_data.ucid;
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 10000;
xhr.open('POST', url, true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
var fallback = subscribe_button.innerHTML; var fallback = subscribe_button.innerHTML;
subscribe_button.onclick = unsubscribe; subscribe_button.onclick = unsubscribe;
subscribe_button.innerHTML = '<b>' + subscribe_data.unsubscribe_text + ' | ' + subscribe_data.sub_count_text + '</b>'; subscribe_button.innerHTML = '<b>' + subscribe_data.unsubscribe_text + ' | ' + subscribe_data.sub_count_text + '</b>';
xhr.onreadystatechange = function () { var url = '/subscription_ajax?action_create_subscription_to_channel=1&redirect=false' +
if (xhr.readyState == 4) { '&c=' + subscribe_data.ucid;
if (xhr.status != 200) {
helpers.xhr('POST', url, {payload: payload, retries: 5, entity_name: 'subscribe request'}, {
onNon200: function (xhr) {
subscribe_button.onclick = subscribe; subscribe_button.onclick = subscribe;
subscribe_button.innerHTML = fallback; subscribe_button.innerHTML = fallback;
} }
} });
}
xhr.onerror = function () {
console.log('Subscribing failed... ' + retries + '/5');
setTimeout(function () { subscribe(retries - 1) }, 1000);
}
xhr.ontimeout = function () {
console.log('Subscribing failed... ' + retries + '/5');
subscribe(retries - 1);
}
xhr.send('csrf_token=' + subscribe_data.csrf_token);
} }
function unsubscribe(retries = 5) { function unsubscribe() {
if (retries <= 0) {
console.log('Failed to subscribe');
return;
}
var url = '/subscription_ajax?action_remove_subscriptions=1&redirect=false' +
'&c=' + subscribe_data.ucid;
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 10000;
xhr.open('POST', url, true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
var fallback = subscribe_button.innerHTML; var fallback = subscribe_button.innerHTML;
subscribe_button.onclick = subscribe; subscribe_button.onclick = subscribe;
subscribe_button.innerHTML = '<b>' + subscribe_data.subscribe_text + ' | ' + subscribe_data.sub_count_text + '</b>'; subscribe_button.innerHTML = '<b>' + subscribe_data.subscribe_text + ' | ' + subscribe_data.sub_count_text + '</b>';
xhr.onreadystatechange = function () { var url = '/subscription_ajax?action_remove_subscriptions=1&redirect=false' +
if (xhr.readyState == 4) { '&c=' + subscribe_data.ucid;
if (xhr.status != 200) {
helpers.xhr('POST', url, {payload: payload, retries: 5, entity_name: 'unsubscribe request'}, {
onNon200: function (xhr) {
subscribe_button.onclick = unsubscribe; subscribe_button.onclick = unsubscribe;
subscribe_button.innerHTML = fallback; subscribe_button.innerHTML = fallback;
} }
} });
}
xhr.onerror = function () {
console.log('Unsubscribing failed... ' + retries + '/5');
setTimeout(function () { unsubscribe(retries - 1) }, 1000);
}
xhr.ontimeout = function () {
console.log('Unsubscribing failed... ' + retries + '/5');
unsubscribe(retries - 1);
}
xhr.send('csrf_token=' + subscribe_data.csrf_token);
} }

View File

@ -1,84 +1,46 @@
'use strict';
var toggle_theme = document.getElementById('toggle_theme'); var toggle_theme = document.getElementById('toggle_theme');
toggle_theme.href = 'javascript:void(0);'; toggle_theme.href = 'javascript:void(0)';
const STORAGE_KEY_THEME = 'dark_mode';
const THEME_DARK = 'dark';
const THEME_LIGHT = 'light';
// TODO: theme state controlled by system
toggle_theme.addEventListener('click', function () { toggle_theme.addEventListener('click', function () {
var dark_mode = document.body.classList.contains("light-theme"); const isDarkTheme = helpers.storage.get(STORAGE_KEY_THEME) === THEME_DARK;
const newTheme = isDarkTheme ? THEME_LIGHT : THEME_DARK;
var url = '/toggle_theme?redirect=false'; setTheme(newTheme);
var xhr = new XMLHttpRequest(); helpers.storage.set(STORAGE_KEY_THEME, newTheme);
xhr.responseType = 'json'; helpers.xhr('GET', '/toggle_theme?redirect=false', {}, {});
xhr.timeout = 10000;
xhr.open('GET', url, true);
set_mode(dark_mode);
window.localStorage.setItem('dark_mode', dark_mode ? 'dark' : 'light');
xhr.send();
}); });
window.addEventListener('storage', function (e) { /** @param {THEME_DARK|THEME_LIGHT} theme */
if (e.key === 'dark_mode') { function setTheme(theme) {
update_mode(e.newValue); // By default body element has .no-theme class that uses OS theme via CSS @media rules
} // It rewrites using hard className below
}); if (theme === THEME_DARK) {
toggle_theme.children[0].className = 'icon ion-ios-sunny';
window.addEventListener('DOMContentLoaded', function () { document.body.className = 'dark-theme';
window.localStorage.setItem('dark_mode', document.getElementById('dark_mode_pref').textContent); } else if (theme === THEME_LIGHT) {
// Update localStorage if dark mode preference changed on preferences page toggle_theme.children[0].className = 'icon ion-ios-moon';
update_mode(window.localStorage.dark_mode); document.body.className = 'light-theme';
});
var darkScheme = window.matchMedia('(prefers-color-scheme: dark)');
var lightScheme = window.matchMedia('(prefers-color-scheme: light)');
darkScheme.addListener(scheme_switch);
lightScheme.addListener(scheme_switch);
function scheme_switch (e) {
// ignore this method if we have a preference set
if (localStorage.getItem('dark_mode')) {
return;
}
if (e.matches) {
if (e.media.includes("dark")) {
set_mode(true);
} else if (e.media.includes("light")) {
set_mode(false);
}
}
}
function set_mode (bool) {
if (bool) {
// dark
toggle_theme.children[0].setAttribute('class', 'icon ion-ios-sunny');
document.body.classList.remove('no-theme');
document.body.classList.remove('light-theme');
document.body.classList.add('dark-theme');
} else { } else {
// light document.body.className = 'no-theme';
toggle_theme.children[0].setAttribute('class', 'icon ion-ios-moon');
document.body.classList.remove('no-theme');
document.body.classList.remove('dark-theme');
document.body.classList.add('light-theme');
} }
} }
function update_mode (mode) { // Handles theme change event caused by other tab
if (mode === 'true' /* for backwards compatibility */ || mode === 'dark') { addEventListener('storage', function (e) {
// If preference for dark mode indicated if (e.key === STORAGE_KEY_THEME)
set_mode(true); setTheme(helpers.storage.get(STORAGE_KEY_THEME));
} });
else if (mode === 'false' /* for backwards compaibility */ || mode === 'light') {
// If preference for light mode indicated
set_mode(false);
}
else if (document.getElementById('dark_mode_pref').textContent === '' && window.matchMedia('(prefers-color-scheme: dark)').matches) {
// If no preference indicated here and no preference indicated on the preferences page (backend), but the browser tells us that the operating system has a dark theme
set_mode(true);
}
// else do nothing, falling back to the mode defined by the `dark_mode` preference on the preferences page (backend)
}
// Set theme from preferences on page load
addEventListener('DOMContentLoaded', function () {
const prefTheme = document.getElementById('dark_mode_pref').textContent;
if (prefTheme) {
setTheme(prefTheme);
helpers.storage.set(STORAGE_KEY_THEME, prefTheme);
}
});

File diff suppressed because one or more lines are too long

View File

@ -1,2 +0,0 @@
/*! @name videojs-contrib-quality-levels @version 2.0.9 @license Apache-2.0 */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("video.js"),require("global/document")):"function"==typeof define&&define.amd?define(["video.js","global/document"],t):e.videojsContribQualityLevels=t(e.videojs,e.document)}(this,function(e,t){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t;var r=function(r){var i,l;function o(){var i,l=n(n(i=r.call(this)||this));if(e.browser.IS_IE8)for(var s in l=t.createElement("custom"),o.prototype)"constructor"!==s&&(l[s]=o.prototype[s]);return l.levels_=[],l.selectedIndex_=-1,Object.defineProperty(l,"selectedIndex",{get:function(){return l.selectedIndex_}}),Object.defineProperty(l,"length",{get:function(){return l.levels_.length}}),l||n(i)}l=r,(i=o).prototype=Object.create(l.prototype),i.prototype.constructor=i,i.__proto__=l;var s=o.prototype;return s.addQualityLevel=function(n){var r=this.getQualityLevelById(n.id);if(r)return r;var i=this.levels_.length;return r=new function n(r){var i=this;if(e.browser.IS_IE8)for(var l in i=t.createElement("custom"),n.prototype)"constructor"!==l&&(i[l]=n.prototype[l]);return i.id=r.id,i.label=i.id,i.width=r.width,i.height=r.height,i.bitrate=r.bandwidth,i.enabled_=r.enabled,Object.defineProperty(i,"enabled",{get:function(){return i.enabled_()},set:function(e){i.enabled_(e)}}),i}(n),""+i in this||Object.defineProperty(this,i,{get:function(){return this.levels_[i]}}),this.levels_.push(r),this.trigger({qualityLevel:r,type:"addqualitylevel"}),r},s.removeQualityLevel=function(e){for(var t=null,n=0,r=this.length;n<r;n++)if(this[n]===e){t=this.levels_.splice(n,1)[0],this.selectedIndex_===n?this.selectedIndex_=-1:this.selectedIndex_>n&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t},s.getQualityLevelById=function(e){for(var t=0,n=this.length;t<n;t++){var r=this[t];if(r.id===e)return r}return null},s.dispose=function(){this.selectedIndex_=-1,this.levels_.length=0},o}(e.EventTarget);for(var i in r.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"},r.prototype.allowedEvents_)r.prototype["on"+i]=null;var l=function(t){return n=this,e.mergeOptions({},t),i=n.qualityLevels,l=new r,n.on("dispose",function e(){l.dispose(),n.qualityLevels=i,n.off("dispose",e)}),n.qualityLevels=function(){return l},n.qualityLevels.VERSION="2.0.9",l;var n,i,l};return(e.registerPlugin||e.plugin)("qualityLevels",l),l.VERSION="2.0.9",l});

View File

@ -1,7 +0,0 @@
/**
* videojs-http-source-selector
* @version 1.1.6
* @copyright 2019 Justin Fujita <Justin@pivotshare.com>
* @license MIT
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("video.js")):"function"==typeof define&&define.amd?define(["video.js"],t):(e=e||self)["videojs-http-source-selector"]=t(e.videojs)}(this,function(r){"use strict";function o(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var e=(r=r&&r.hasOwnProperty("default")?r.default:r).getComponent("MenuItem"),t=r.getComponent("Component"),a=function(n){function e(e,t){return t.selectable=!0,t.multiSelectable=!1,n.call(this,e,t)||this}o(e,n);var t=e.prototype;return t.handleClick=function(){var e=this.options_;console.log("Changing quality to:",e.label),n.prototype.handleClick.call(this);for(var t=this.player().qualityLevels(),o=0;o<t.length;o++)e.index==t.length?t[o].enabled=!0:e.index==o?t[o].enabled=!0:t[o].enabled=!1},t.update=function(){var e=this.player().qualityLevels().selectedIndex;this.selected(this.options_.index==e)},e}(e);t.registerComponent("SourceMenuItem",a);var u=r.getComponent("MenuButton"),n=function(i){function e(e,t){var o;o=i.call(this,e,t)||this,u.apply(s(o),arguments);var n=o.player().qualityLevels();if(t&&t.default)if("low"==t.default)for(var l=0;l<n.length;l++)n[l].enabled=0==l;else if(t.default="high")for(l=0;l<n.length;l++)n[l].enabled=l==n.length-1;return o.player().qualityLevels().on(["change","addqualitylevel"],r.bind(s(o),o.update)),o}o(e,i);var t=e.prototype;return t.createEl=function(){return r.dom.createEl("div",{className:"vjs-http-source-selector vjs-menu-button vjs-menu-button-popup vjs-control vjs-button"})},t.buildCSSClass=function(){return u.prototype.buildCSSClass.call(this)+" vjs-icon-cog"},t.update=function(){return u.prototype.update.call(this)},t.createItems=function(){for(var e=[],t=this.player().qualityLevels(),o=[],n=0;n<t.length;n++){var l=t.length-(n+1),i=l===t.selectedIndex,r=""+l,s=l;t[l].height?(r=t[l].height+"p",s=parseInt(t[l].height,10)):t[l].bitrate&&(r=Math.floor(t[l].bitrate/1e3)+" kbps",s=parseInt(t[l].bitrate,10)),0<=o.indexOf(r)||(o.push(r),e.push(new a(this.player_,{label:r,index:l,selected:i,sortVal:s})))}return 1<t.length&&e.push(new a(this.player_,{label:"Auto",index:t.length,selected:!1,sortVal:99999})),e.sort(function(e,t){return e.options_.sortVal<t.options_.sortVal?1:e.options_.sortVal>t.options_.sortVal?-1:0}),e},e}(u),l={},i=r.registerPlugin||r.plugin,c=function(e){var t=this;this.ready(function(){!function(n,e){if(n.addClass("vjs-http-source-selector"),console.log("videojs-http-source-selector initialized!"),console.log("player.techName_:"+n.techName_),"Html5"!=n.techName_)return;n.on(["loadedmetadata"],function(e){if(n.qualityLevels(),r.log("loadmetadata event"),"undefined"==n.videojs_http_source_selector_initialized||1==n.videojs_http_source_selector_initialized)console.log("player.videojs_http_source_selector_initialized == true");else{console.log("player.videojs_http_source_selector_initialized == false"),n.videojs_http_source_selector_initialized=!0;var t=n.controlBar,o=t.getChild("fullscreenToggle").el();t.el().insertBefore(t.addChild("SourceMenuButton").el(),o)}})}(t,r.mergeOptions(l,e))}),r.registerComponent("SourceMenuButton",n),r.registerComponent("SourceMenuItem",a)};return i("httpSourceSelector",c),c.VERSION="1.1.6",c});

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
/**
* videojs-mobile-ui
* @version 0.5.2
* @copyright 2021 mister-ben <git@misterben.me>
* @license MIT
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("video.js"),require("global/window")):"function"==typeof define&&define.amd?define(["video.js","global/window"],t):e.videojsMobileUi=t(e.videojs,e.window)}(this,function(e,t){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t;var n=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},i=e.getComponent("Component"),r=e.dom||e,a=function(e){function i(t,r){n(this,i);var a=o(this,e.call(this,t,r));return a.seekSeconds=r.seekSeconds,a.tapTimeout=r.tapTimeout,a.addChild("playToggle",{}),t.on(["playing","userinactive"],function(e){a.removeClass("show-play-toggle")}),0===a.player_.options_.inactivityTimeout&&(a.player_.options_.inactivityTimeout=5e3),a.enable(),a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,e),i.prototype.createEl=function(){return r.createEl("div",{className:"vjs-touch-overlay",tabIndex:-1})},i.prototype.handleTap=function(e){var n=this;e.target===this.el_&&(e.preventDefault(),this.firstTapCaptured?(this.firstTapCaptured=!1,this.timeout&&t.clearTimeout(this.timeout),this.handleDoubleTap(e)):(this.firstTapCaptured=!0,this.timeout=t.setTimeout(function(){n.firstTapCaptured=!1,n.handleSingleTap(e)},this.tapTimeout)))},i.prototype.handleSingleTap=function(e){this.removeClass("skip"),this.toggleClass("show-play-toggle")},i.prototype.handleDoubleTap=function(e){var n=this,o=this.el_.getBoundingClientRect(),i=e.changedTouches[0].clientX-o.left;if(i<.4*o.width)this.player_.currentTime(Math.max(0,this.player_.currentTime()-this.seekSeconds)),this.addClass("reverse");else{if(!(i>o.width-.4*o.width))return;this.player_.currentTime(Math.min(this.player_.duration(),this.player_.currentTime()+this.seekSeconds)),this.removeClass("reverse")}this.removeClass("show-play-toggle"),this.removeClass("skip"),t.requestAnimationFrame(function(){n.addClass("skip")})},i.prototype.enable=function(){this.firstTapCaptured=!1,this.on("touchend",this.handleTap)},i.prototype.disable=function(){this.off("touchend",this.handleTap)},i}(i);i.registerComponent("TouchOverlay",a);var s={fullscreen:{enterOnRotate:!0,exitOnRotate:!0,lockOnRotate:!0,iOS:!1},touchControls:{seekSeconds:10,tapTimeout:300,disableOnEnd:!1}},l=t.screen,u=function(n,o){n.addClass("vjs-mobile-ui"),(o.touchControls.disableOnEnd||"function"==typeof n.endscreen)&&n.addClass("vjs-mobile-ui-disable-end"),o.fullscreen.iOS&&e.browser.IS_IOS&&e.browser.IOS_VERSION>9&&!n.el_.ownerDocument.querySelector(".bc-iframe")&&(n.tech_.el_.setAttribute("playsinline","playsinline"),n.tech_.supportsFullScreen=function(){return!1});var i=void 0,r=e.VERSION.split("."),a=parseInt(r[0],10),s=parseInt(r[1],10);i=a<7||7===a&&s<7?Array.prototype.indexOf.call(n.el_.children,n.getChild("ControlBar").el_):n.children_.indexOf(n.getChild("ControlBar")),n.addChild("TouchOverlay",o.touchControls,i);var u=!1,c=function(){var i="number"==typeof t.orientation?t.orientation:l&&l.orientation&&l.orientation.angle?t.orientation:(e.log("angle unknown"),0);90!==i&&270!==i&&-90!==i||!o.enterOnRotate||!1===n.paused()&&(n.requestFullscreen(),o.fullscreen.lockOnRotate&&l.orientation&&l.orientation.lock&&l.orientation.lock("landscape").then(function(){u=!0}).catch(function(){e.log("orientation lock not allowed")})),0!==i&&180!==i||!o.exitOnRotate||n.isFullscreen()&&n.exitFullscreen()};e.browser.IS_IOS?t.addEventListener("orientationchange",c):l.orientation&&(l.orientation.onchange=c),n.on("ended",function(e){!0===u&&(l.orientation.unlock(),u=!1)})},c=function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(n.forceForTesting||e.browser.IS_ANDROID||e.browser.IS_IOS)&&this.ready(function(){u(t,e.mergeOptions(s,n))})};return(e.registerPlugin||e.plugin)("mobileUi",c),c.VERSION="0.5.2",c});

View File

@ -1,2 +0,0 @@
/*! @name videojs-overlay @version 2.1.4 @license Apache-2.0 */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("video.js"),require("global/window")):"function"==typeof define&&define.amd?define(["video.js","global/window"],e):t.videojsOverlay=e(t.videojs,t.window)}(this,function(t,e){"use strict";function n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}t=t&&t.hasOwnProperty("default")?t.default:t,e=e&&e.hasOwnProperty("default")?e.default:e;var r={align:"top-left",class:"",content:"This overlay will show up while the video is playing",debug:!1,showBackground:!0,attachToControlBar:!1,overlays:[{start:"playing",end:"paused"}]},i=t.getComponent("Component"),o=t.dom||t,s=t.registerPlugin||t.plugin,a=function(t){return"number"==typeof t&&t==t},h=function(t){return"string"==typeof t&&/^\S+$/.test(t)},d=function(r){var i,s;function d(t,e){var i;return i=r.call(this,t,e)||this,["start","end"].forEach(function(t){var e=i.options_[t];if(a(e))i[t+"Event_"]="timeupdate";else if(h(e))i[t+"Event_"]=e;else if("start"===t)throw new Error('invalid "start" option; expected number or string')}),["endListener_","rewindListener_","startListener_"].forEach(function(t){i[t]=function(e){return d.prototype[t].call(n(n(i)),e)}}),"timeupdate"===i.startEvent_&&i.on(t,"timeupdate",i.rewindListener_),i.debug('created, listening to "'+i.startEvent_+'" for "start" and "'+(i.endEvent_||"nothing")+'" for "end"'),i.hide(),i}s=r,(i=d).prototype=Object.create(s.prototype),i.prototype.constructor=i,i.__proto__=s;var l=d.prototype;return l.createEl=function(){var t=this.options_,n=t.content,r=t.showBackground?"vjs-overlay-background":"vjs-overlay-no-background",i=o.createEl("div",{className:"\n vjs-overlay\n vjs-overlay-"+t.align+"\n "+t.class+"\n "+r+"\n vjs-hidden\n "});return"string"==typeof n?i.innerHTML=n:n instanceof e.DocumentFragment?i.appendChild(n):o.appendContent(i,n),i},l.debug=function(){if(this.options_.debug){for(var e=t.log,n=e,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];e.hasOwnProperty(i[0])&&"function"==typeof e[i[0]]&&(n=e[i.shift()]),n.apply(void 0,["overlay#"+this.id()+": "].concat(i))}},l.hide=function(){return r.prototype.hide.call(this),this.debug("hidden"),this.debug('bound `startListener_` to "'+this.startEvent_+'"'),this.endEvent_&&(this.debug('unbound `endListener_` from "'+this.endEvent_+'"'),this.off(this.player(),this.endEvent_,this.endListener_)),this.on(this.player(),this.startEvent_,this.startListener_),this},l.shouldHide_=function(t,e){var n=this.options_.end;return a(n)?t>=n:n===e},l.show=function(){return r.prototype.show.call(this),this.off(this.player(),this.startEvent_,this.startListener_),this.debug("shown"),this.debug('unbound `startListener_` from "'+this.startEvent_+'"'),this.endEvent_&&(this.debug('bound `endListener_` to "'+this.endEvent_+'"'),this.on(this.player(),this.endEvent_,this.endListener_)),this},l.shouldShow_=function(t,e){var n=this.options_.start,r=this.options_.end;return a(n)?a(r)?t>=n&&t<r:this.hasShownSinceSeek_?Math.floor(t)===n:(this.hasShownSinceSeek_=!0,t>=n):n===e},l.startListener_=function(t){var e=this.player().currentTime();this.shouldShow_(e,t.type)&&this.show()},l.endListener_=function(t){var e=this.player().currentTime();this.shouldHide_(e,t.type)&&this.hide()},l.rewindListener_=function(t){var e=this.player().currentTime(),n=this.previousTime_,r=this.options_.start,i=this.options_.end;e<n&&(this.debug("rewind detected"),a(i)&&!this.shouldShow_(e)?(this.debug("hiding; "+i+" is an integer and overlay should not show at this time"),this.hasShownSinceSeek_=!1,this.hide()):h(i)&&e<r&&(this.debug("hiding; show point ("+r+") is before now ("+e+") and end point ("+i+") is an event"),this.hasShownSinceSeek_=!1,this.hide())),this.previousTime_=e},d}(i);t.registerComponent("Overlay",d);var l=function(e){var n=this,i=t.mergeOptions(r,e);Array.isArray(this.overlays_)&&this.overlays_.forEach(function(t){n.removeChild(t),n.controlBar&&n.controlBar.removeChild(t),t.dispose()});var o=i.overlays;delete i.overlays,this.overlays_=o.map(function(e){var r=t.mergeOptions(i,e),o="string"==typeof r.attachToControlBar||!0===r.attachToControlBar;if(!n.controls()||!n.controlBar)return n.addChild("overlay",r);if(o&&-1!==r.align.indexOf("bottom")){var s=n.controlBar.children()[0];if(void 0!==n.controlBar.getChild(r.attachToControlBar)&&(s=n.controlBar.getChild(r.attachToControlBar)),s){var a=n.controlBar.addChild("overlay",r);return n.controlBar.el().insertBefore(a.el(),s.el()),a}}var h=n.addChild("overlay",r);return n.el().insertBefore(h.el(),n.controlBar.el()),h})};return l.VERSION="2.1.4",s("overlay",l),l});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,32 +1,13 @@
var video_data = JSON.parse(document.getElementById('video_data').innerHTML); 'use strict';
String.prototype.supplant = function (o) {
return this.replace(/{([^{}]*)}/g, function (a, b) {
var r = o[b];
return typeof r === 'string' || typeof r === 'number' ? r : a;
});
}
function toggle_parent(target) { function toggle_parent(target) {
body = target.parentNode.parentNode.children[1]; var body = target.parentNode.parentNode.children[1];
if (body.style.display === null || body.style.display === '') { if (body.style.display === 'none') {
target.innerHTML = '[ + ]'; target.textContent = '[ ]';
body.style.display = 'none';
} else {
target.innerHTML = '[ - ]';
body.style.display = ''; body.style.display = '';
}
}
function toggle_comments(event) {
var target = event.target;
body = target.parentNode.parentNode.parentNode.children[1];
if (body.style.display === null || body.style.display === '') {
target.innerHTML = '[ + ]';
body.style.display = 'none';
} else { } else {
target.innerHTML = '[ - ]'; target.textContent = '[ + ]';
body.style.display = ''; body.style.display = 'none';
} }
} }
@ -40,36 +21,6 @@ function swap_comments(event) {
} }
} }
function hide_youtube_replies(event) {
var target = event.target;
sub_text = target.getAttribute('data-inner-text');
inner_text = target.getAttribute('data-sub-text');
body = target.parentNode.parentNode.children[1];
body.style.display = 'none';
target.innerHTML = sub_text;
target.onclick = show_youtube_replies;
target.setAttribute('data-inner-text', inner_text);
target.setAttribute('data-sub-text', sub_text);
}
function show_youtube_replies(event) {
var target = event.target;
sub_text = target.getAttribute('data-inner-text');
inner_text = target.getAttribute('data-sub-text');
body = target.parentNode.parentNode.children[1];
body.style.display = '';
target.innerHTML = sub_text;
target.onclick = hide_youtube_replies;
target.setAttribute('data-inner-text', inner_text);
target.setAttribute('data-sub-text', sub_text);
}
var continue_button = document.getElementById('continue'); var continue_button = document.getElementById('continue');
if (continue_button) { if (continue_button) {
continue_button.onclick = continue_autoplay; continue_button.onclick = continue_autoplay;
@ -78,163 +29,104 @@ if (continue_button) {
function next_video() { function next_video() {
var url = new URL('https://example.com/watch?v=' + video_data.next_video); var url = new URL('https://example.com/watch?v=' + video_data.next_video);
if (video_data.params.autoplay || video_data.params.continue_autoplay) { if (video_data.params.autoplay || video_data.params.continue_autoplay)
url.searchParams.set('autoplay', '1'); url.searchParams.set('autoplay', '1');
} if (video_data.params.listen !== video_data.preferences.listen)
if (video_data.params.listen !== video_data.preferences.listen) {
url.searchParams.set('listen', video_data.params.listen); url.searchParams.set('listen', video_data.params.listen);
} if (video_data.params.speed !== video_data.preferences.speed)
if (video_data.params.speed !== video_data.preferences.speed) {
url.searchParams.set('speed', video_data.params.speed); url.searchParams.set('speed', video_data.params.speed);
} if (video_data.params.local !== video_data.preferences.local)
if (video_data.params.local !== video_data.preferences.local) {
url.searchParams.set('local', video_data.params.local); url.searchParams.set('local', video_data.params.local);
}
url.searchParams.set('continue', '1'); url.searchParams.set('continue', '1');
location.assign(url.pathname + url.search); location.assign(url.pathname + url.search);
} }
function continue_autoplay(event) { function continue_autoplay(event) {
if (event.target.checked) { if (event.target.checked) {
player.on('ended', function () { player.on('ended', next_video);
next_video();
});
} else { } else {
player.off('ended'); player.off('ended');
} }
} }
function number_with_separator(val) { function get_playlist(plid) {
while (/(\d+)(\d{3})/.test(val.toString())) { var playlist = document.getElementById('playlist');
val = val.toString().replace(/(\d+)(\d{3})/, '$1' + ',' + '$2');
}
return val;
}
function get_playlist(plid, retries) { playlist.innerHTML = spinnerHTMLwithHR;
if (retries == undefined) retries = 5;
playlist = document.getElementById('playlist');
if (retries <= 0) {
console.log('Failed to pull playlist');
playlist.innerHTML = '';
return;
}
playlist.innerHTML = ' \
<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3> \
<hr>'
var plid_url;
if (plid.startsWith('RD')) { if (plid.startsWith('RD')) {
var plid_url = '/api/v1/mixes/' + plid + plid_url = '/api/v1/mixes/' + plid +
'?continuation=' + video_data.id + '?continuation=' + video_data.id +
'&format=html&hl=' + video_data.preferences.locale; '&format=html&hl=' + video_data.preferences.locale;
} else { } else {
var plid_url = '/api/v1/playlists/' + plid + plid_url = '/api/v1/playlists/' + plid +
'?index=' + video_data.index + '?index=' + video_data.index +
'&continuation=' + video_data.id + '&continuation=' + video_data.id +
'&format=html&hl=' + video_data.preferences.locale; '&format=html&hl=' + video_data.preferences.locale;
} }
var xhr = new XMLHttpRequest(); helpers.xhr('GET', plid_url, {retries: 5, entity_name: 'playlist'}, {
xhr.responseType = 'json'; on200: function (response) {
xhr.timeout = 10000; playlist.innerHTML = response.playlistHtml;
xhr.open('GET', plid_url, true);
xhr.onreadystatechange = function () { if (!response.nextVideo) return;
if (xhr.readyState == 4) {
if (xhr.status == 200) { var nextVideo = document.getElementById(response.nextVideo);
playlist.innerHTML = xhr.response.playlistHtml; nextVideo.parentNode.parentNode.scrollTop = nextVideo.offsetTop;
if (xhr.response.nextVideo) {
player.on('ended', function () { player.on('ended', function () {
var url = new URL('https://example.com/watch?v=' + xhr.response.nextVideo); var url = new URL('https://example.com/watch?v=' + response.nextVideo);
url.searchParams.set('list', plid); url.searchParams.set('list', plid);
if (!plid.startsWith('RD')) { if (!plid.startsWith('RD'))
url.searchParams.set('index', xhr.response.index); url.searchParams.set('index', response.index);
} if (video_data.params.autoplay || video_data.params.continue_autoplay)
if (video_data.params.autoplay || video_data.params.continue_autoplay) {
url.searchParams.set('autoplay', '1'); url.searchParams.set('autoplay', '1');
} if (video_data.params.listen !== video_data.preferences.listen)
if (video_data.params.listen !== video_data.preferences.listen) {
url.searchParams.set('listen', video_data.params.listen); url.searchParams.set('listen', video_data.params.listen);
} if (video_data.params.speed !== video_data.preferences.speed)
if (video_data.params.speed !== video_data.preferences.speed) {
url.searchParams.set('speed', video_data.params.speed); url.searchParams.set('speed', video_data.params.speed);
} if (video_data.params.local !== video_data.preferences.local)
if (video_data.params.local !== video_data.preferences.local) {
url.searchParams.set('local', video_data.params.local); url.searchParams.set('local', video_data.params.local);
}
location.assign(url.pathname + url.search); location.assign(url.pathname + url.search);
}); });
} },
} else { onNon200: function (xhr) {
playlist.innerHTML = ''; playlist.innerHTML = '';
document.getElementById('continue').style.display = ''; document.getElementById('continue').style.display = '';
},
onError: function (xhr) {
playlist.innerHTML = spinnerHTMLwithHR;
},
onTimeout: function (xhr) {
playlist.innerHTML = spinnerHTMLwithHR;
} }
} });
}
xhr.onerror = function () {
playlist = document.getElementById('playlist');
playlist.innerHTML =
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3><hr>';
console.log('Pulling playlist timed out... ' + retries + '/5');
setTimeout(function () { get_playlist(plid, retries - 1) }, 1000);
}
xhr.ontimeout = function () {
playlist = document.getElementById('playlist');
playlist.innerHTML =
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3><hr>';
console.log('Pulling playlist timed out... ' + retries + '/5');
get_playlist(plid, retries - 1);
}
xhr.send();
} }
function get_reddit_comments(retries) { function get_reddit_comments() {
if (retries == undefined) retries = 5; var comments = document.getElementById('comments');
comments = document.getElementById('comments');
if (retries <= 0) {
console.log('Failed to pull comments');
comments.innerHTML = '';
return;
}
var fallback = comments.innerHTML; var fallback = comments.innerHTML;
comments.innerHTML = comments.innerHTML = spinnerHTML;
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3>';
var url = '/api/v1/comments/' + video_data.id + var url = '/api/v1/comments/' + video_data.id +
'?source=reddit&format=html' + '?source=reddit&format=html' +
'&hl=' + video_data.preferences.locale; '&hl=' + video_data.preferences.locale;
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 10000;
xhr.open('GET', url, true);
xhr.onreadystatechange = function () { var onNon200 = function (xhr) { comments.innerHTML = fallback; };
if (xhr.readyState == 4) { if (video_data.params.comments[1] === 'youtube')
if (xhr.status == 200) { onNon200 = function (xhr) {};
helpers.xhr('GET', url, {retries: 5, entity_name: ''}, {
on200: function (response) {
comments.innerHTML = ' \ comments.innerHTML = ' \
<div> \ <div> \
<h3> \ <h3> \
<a href="javascript:void(0)">[ - ]</a> \ <a href="javascript:void(0)">[ ]</a> \
{title} \ {title} \
</h3> \ </h3> \
<p> \ <p> \
@ -250,205 +142,41 @@ function get_reddit_comments(retries) {
</div> \ </div> \
<div>{contentHtml}</div> \ <div>{contentHtml}</div> \
<hr>'.supplant({ <hr>'.supplant({
title: xhr.response.title, title: response.title,
youtubeCommentsText: video_data.youtube_comments_text, youtubeCommentsText: video_data.youtube_comments_text,
redditPermalinkText: video_data.reddit_permalink_text, redditPermalinkText: video_data.reddit_permalink_text,
permalink: xhr.response.permalink, permalink: response.permalink,
contentHtml: xhr.response.contentHtml contentHtml: response.contentHtml
}); });
comments.children[0].children[0].children[0].onclick = toggle_comments; comments.children[0].children[0].children[0].onclick = toggle_comments;
comments.children[0].children[1].children[0].onclick = swap_comments; comments.children[0].children[1].children[0].onclick = swap_comments;
} else { },
if (video_data.params.comments[1] === 'youtube') { onNon200: onNon200, // declared above
console.log('Pulling comments failed... ' + retries + '/5');
setTimeout(function () { get_youtube_comments(retries - 1) }, 1000);
} else {
comments.innerHTML = fallback;
}
}
}
}
xhr.onerror = function () {
console.log('Pulling comments failed... ' + retries + '/5');
setTimeout(function () { get_reddit_comments(retries - 1) }, 1000);
}
xhr.ontimeout = function () {
console.log('Pulling comments failed... ' + retries + '/5');
get_reddit_comments(retries - 1);
}
xhr.send();
}
function get_youtube_comments(retries) {
if (retries == undefined) retries = 5;
comments = document.getElementById('comments');
if (retries <= 0) {
console.log('Failed to pull comments');
comments.innerHTML = '';
return;
}
var fallback = comments.innerHTML;
comments.innerHTML =
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3>';
var url = '/api/v1/comments/' + video_data.id +
'?format=html' +
'&hl=' + video_data.preferences.locale +
'&thin_mode=' + video_data.preferences.thin_mode;
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 10000;
xhr.open('GET', url, true);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
comments.innerHTML = ' \
<div> \
<h3> \
<a href="javascript:void(0)">[ - ]</a> \
{commentsText} \
</h3> \
<b> \
<a href="javascript:void(0)" data-comments="reddit"> \
{redditComments} \
</a> \
</b> \
</div> \
<div>{contentHtml}</div> \
<hr>'.supplant({
contentHtml: xhr.response.contentHtml,
redditComments: video_data.reddit_comments_text,
commentsText: video_data.comments_text.supplant(
{ commentCount: number_with_separator(xhr.response.commentCount) }
)
}); });
comments.children[0].children[0].children[0].onclick = toggle_comments;
comments.children[0].children[1].children[0].onclick = swap_comments;
} else {
if (video_data.params.comments[1] === 'youtube') {
setTimeout(function () { get_youtube_comments(retries - 1) }, 1000);
} else {
comments.innerHTML = '';
}
}
}
}
xhr.onerror = function () {
comments.innerHTML =
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3>';
console.log('Pulling comments failed... ' + retries + '/5');
setTimeout(function () { get_youtube_comments(retries - 1) }, 1000);
}
xhr.ontimeout = function () {
comments.innerHTML =
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3>';
console.log('Pulling comments failed... ' + retries + '/5');
get_youtube_comments(retries - 1);
}
xhr.send();
}
function get_youtube_replies(target, load_more, load_replies) {
var continuation = target.getAttribute('data-continuation');
var body = target.parentNode.parentNode;
var fallback = body.innerHTML;
body.innerHTML =
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3>';
var url = '/api/v1/comments/' + video_data.id +
'?format=html' +
'&hl=' + video_data.preferences.locale +
'&thin_mode=' + video_data.preferences.thin_mode +
'&continuation=' + continuation
if (load_replies) {
url += '&action=action_get_comment_replies';
}
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 10000;
xhr.open('GET', url, true);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
if (load_more) {
body = body.parentNode.parentNode;
body.removeChild(body.lastElementChild);
body.innerHTML += xhr.response.contentHtml;
} else {
body.removeChild(body.lastElementChild);
var p = document.createElement('p');
var a = document.createElement('a');
p.appendChild(a);
a.href = 'javascript:void(0)';
a.onclick = hide_youtube_replies;
a.setAttribute('data-sub-text', video_data.hide_replies_text);
a.setAttribute('data-inner-text', video_data.show_replies_text);
a.innerText = video_data.hide_replies_text;
var div = document.createElement('div');
div.innerHTML = xhr.response.contentHtml;
body.appendChild(p);
body.appendChild(div);
}
} else {
body.innerHTML = fallback;
}
}
}
xhr.ontimeout = function () {
console.log('Pulling comments failed.');
body.innerHTML = fallback;
}
xhr.send();
} }
if (video_data.play_next) { if (video_data.play_next) {
player.on('ended', function () { player.on('ended', function () {
var url = new URL('https://example.com/watch?v=' + video_data.next_video); var url = new URL('https://example.com/watch?v=' + video_data.next_video);
if (video_data.params.autoplay || video_data.params.continue_autoplay) { if (video_data.params.autoplay || video_data.params.continue_autoplay)
url.searchParams.set('autoplay', '1'); url.searchParams.set('autoplay', '1');
} if (video_data.params.listen !== video_data.preferences.listen)
if (video_data.params.listen !== video_data.preferences.listen) {
url.searchParams.set('listen', video_data.params.listen); url.searchParams.set('listen', video_data.params.listen);
} if (video_data.params.speed !== video_data.preferences.speed)
if (video_data.params.speed !== video_data.preferences.speed) {
url.searchParams.set('speed', video_data.params.speed); url.searchParams.set('speed', video_data.params.speed);
} if (video_data.params.local !== video_data.preferences.local)
if (video_data.params.local !== video_data.preferences.local) {
url.searchParams.set('local', video_data.params.local); url.searchParams.set('local', video_data.params.local);
}
url.searchParams.set('continue', '1'); url.searchParams.set('continue', '1');
location.assign(url.pathname + url.search); location.assign(url.pathname + url.search);
}); });
} }
window.addEventListener('load', function (e) { addEventListener('load', function (e) {
if (video_data.plid) { if (video_data.plid)
get_playlist(video_data.plid); get_playlist(video_data.plid);
}
if (video_data.params.comments[0] === 'youtube') { if (video_data.params.comments[0] === 'youtube') {
get_youtube_comments(); get_youtube_comments();
@ -459,7 +187,7 @@ window.addEventListener('load', function (e) {
} else if (video_data.params.comments[1] === 'reddit') { } else if (video_data.params.comments[1] === 'reddit') {
get_reddit_comments(); get_reddit_comments();
} else { } else {
comments = document.getElementById('comments'); var comments = document.getElementById('comments');
comments.innerHTML = ''; comments.innerHTML = '';
} }
}); });

View File

@ -0,0 +1,24 @@
'use strict';
var save_player_pos_key = 'save_player_pos';
function get_all_video_times() {
return helpers.storage.get(save_player_pos_key) || {};
}
document.querySelectorAll('.watched-indicator').forEach(function (indicator) {
var watched_part = get_all_video_times()[indicator.dataset.id];
var total = parseInt(indicator.dataset.length, 10);
if (watched_part === undefined) {
watched_part = total;
}
var percentage = Math.round((watched_part / total) * 100);
if (percentage < 5) {
percentage = 5;
}
if (percentage > 90) {
percentage = 100;
}
indicator.style.width = percentage + '%';
});

View File

@ -1,4 +1,6 @@
var watched_data = JSON.parse(document.getElementById('watched_data').innerHTML); 'use strict';
var watched_data = JSON.parse(document.getElementById('watched_data').textContent);
var payload = 'csrf_token=' + watched_data.csrf_token;
function mark_watched(target) { function mark_watched(target) {
var tile = target.parentNode.parentNode.parentNode.parentNode.parentNode; var tile = target.parentNode.parentNode.parentNode.parentNode.parentNode;
@ -6,45 +8,27 @@ function mark_watched(target) {
var url = '/watch_ajax?action_mark_watched=1&redirect=false' + var url = '/watch_ajax?action_mark_watched=1&redirect=false' +
'&id=' + target.getAttribute('data-id'); '&id=' + target.getAttribute('data-id');
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 10000;
xhr.open('POST', url, true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.onreadystatechange = function () { helpers.xhr('POST', url, {payload: payload}, {
if (xhr.readyState == 4) { onNon200: function (xhr) {
if (xhr.status != 200) {
tile.style.display = ''; tile.style.display = '';
} }
} });
}
xhr.send('csrf_token=' + watched_data.csrf_token);
} }
function mark_unwatched(target) { function mark_unwatched(target) {
var tile = target.parentNode.parentNode.parentNode.parentNode.parentNode; var tile = target.parentNode.parentNode.parentNode.parentNode.parentNode;
tile.style.display = 'none'; tile.style.display = 'none';
var count = document.getElementById('count') var count = document.getElementById('count');
count.innerText = count.innerText - 1; count.textContent--;
var url = '/watch_ajax?action_mark_unwatched=1&redirect=false' + var url = '/watch_ajax?action_mark_unwatched=1&redirect=false' +
'&id=' + target.getAttribute('data-id'); '&id=' + target.getAttribute('data-id');
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 10000;
xhr.open('POST', url, true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.onreadystatechange = function () { helpers.xhr('POST', url, {payload: payload}, {
if (xhr.readyState == 4) { onNon200: function (xhr) {
if (xhr.status != 200) { count.textContent++;
count.innerText = count.innerText - 1 + 2;
tile.style.display = ''; tile.style.display = '';
} }
} });
}
xhr.send('csrf_token=' + watched_data.csrf_token);
} }

View File

@ -1,3 +1,2 @@
User-agent: * User-agent: *
Disallow: /search Disallow: /
Disallow: /login

View File

@ -15,5 +15,7 @@
], ],
"theme_color": "#575757", "theme_color": "#575757",
"background_color": "#575757", "background_color": "#575757",
"display": "standalone" "display": "standalone",
"description": "An alternative front-end to YouTube",
"start_url": "/"
} }

4
assets/videojs/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

View File

@ -1,13 +1,949 @@
channel_threads: 1 #########################################
feed_threads: 1 #
# Database and other external servers
#
#########################################
##
## Database configuration with separate parameters.
## This setting is MANDATORY, unless 'database_url' is used.
##
db: db:
user: kemal user: kemal
password: kemal password: kemal
host: localhost host: localhost
port: 5432 port: 5432
dbname: invidious dbname: invidious
# alternatively, the database URL can be provided directly - if both are set then the latter takes precedence
# database_url: postgres://kemal:kemal@localhost:5432/invidious ##
full_refresh: false ## Database configuration using a single URI. This is an
https_only: false ## alternative to the 'db' parameter above. If both forms
## are used, then only database_url is used.
## This setting is MANDATORY, unless 'db' is used.
##
## Note: The 'database_url' setting allows the use of UNIX
## sockets. To do so, remove the IP address (or FQDN) and port
## and append the 'host' parameter. E.g:
## postgres://kemal:kemal@/invidious?host=/var/run/postgresql
##
## Accepted values: a postgres:// URI
## Default: postgres://kemal:kemal@localhost:5432/invidious
##
#database_url: postgres://kemal:kemal@localhost:5432/invidious
##
## Enable automatic table integrity check. This will create
## the required tables and columns if anything is missing.
##
## Accepted values: true, false
## Default: false
##
#check_tables: false
##
## Path to an external signature resolver, used to emulate
## the Youtube client's Javascript. If no such server is
## available, some videos will not be playable.
##
## When this setting is commented out, no external
## resolver will be used.
##
## Accepted values: a path to a UNIX socket or "<IP>:<Port>"
## Default: <none>
##
#signature_server:
#########################################
#
# Server config
#
#########################################
# -----------------------------
# Network (inbound)
# -----------------------------
##
## Port to listen on for incoming connections.
##
## Note: Ports lower than 1024 requires either root privileges
## (not recommended) or the "CAP_NET_BIND_SERVICE" capability
## (See https://stackoverflow.com/a/414258 and `man capabilities`)
##
## Accepted values: 1-65535
## Default: 3000
##
#port: 3000
##
## When the invidious instance is behind a proxy, and the proxy
## listens on a different port than the instance does, this lets
## invidious know about it. This is used to craft absolute URLs
## to the instance (e.g in the API).
##
## Note: This setting is MANDATORY if invidious is behind a
## reverse proxy.
##
## Accepted values: 1-65535
## Default: <none>
##
#external_port:
##
## Interface address to listen on for incoming connections.
##
## Accepted values: a valid IPv4 or IPv6 address.
## default: 0.0.0.0 (listen on all interfaces)
##
#host_binding: 0.0.0.0
##
## Domain name under which this instance is hosted. This is
## used to craft absolute URLs to the instance (e.g in the API).
## The domain MUST be defined if your instance is accessed from
## a domain name (like 'example.com').
##
## Accepted values: a fully qualified domain name (FQDN)
## Default: <none>
##
domain: domain:
##
## Tell Invidious that it is behind a proxy that provides only
## HTTPS, so all links must use the https:// scheme. This
## setting MUST be set to true if invidious is behind a
## reverse proxy serving HTTPs.
##
## Accepted values: true, false
## Default: false
##
https_only: false
##
## Enable/Disable 'Strict-Transport-Security'. Make sure that
## the domain specified under 'domain' is served securely.
##
## Accepted values: true, false
## Default: true
##
#hsts: true
# -----------------------------
# Network (outbound)
# -----------------------------
##
## Disable proxying server-wide. Can be disable as a whole, or
## only for a single function.
##
## Accepted values: true, false, dash, livestreams, downloads, local
## Default: false
##
#disable_proxy: false
##
## Size of the HTTP pool used to connect to youtube. Each
## domain ('youtube.com', 'ytimg.com', ...) has its own pool.
##
## Accepted values: a positive integer
## Default: 100
##
#pool_size: 100
##
## Additional cookies to be sent when requesting the youtube API.
##
## Accepted values: a string in the format "name1=value1; name2=value2..."
## Default: <none>
##
#cookies:
##
## Force connection to youtube over a specific IP family.
##
## Note: This may sometimes resolve issues involving rate-limiting.
## See https://github.com/ytdl-org/youtube-dl/issues/21729.
##
## Accepted values: ipv4, ipv6
## Default: <none>
##
#force_resolve:
##
## Configuration for using a HTTP proxy
##
## If unset, then no HTTP proxy will be used.
##
http_proxy:
user:
password:
host:
port:
##
## Use Innertube's transcripts API instead of timedtext for closed captions
##
## Useful for larger instances as InnerTube is **not ratelimited**. See https://github.com/iv-org/invidious/issues/2567
##
## Subtitle experience may differ slightly on Invidious.
##
## Accepted values: true, false
## Default: false
##
# use_innertube_for_captions: false
##
## Send Google session informations. This is useful when Invidious is blocked
## by the message "This helps protect our community."
## See https://github.com/iv-org/invidious/issues/4734.
##
## Warning: These strings gives much more identifiable information to Google!
##
## Accepted values: String
## Default: <none>
##
# po_token: ""
# visitor_data: ""
# -----------------------------
# Logging
# -----------------------------
##
## Path to log file. Can be absolute or relative to the invidious
## binary. This is overridden if "-o OUTPUT" or "--output=OUTPUT"
## are passed on the command line.
##
## Accepted values: a filesystem path or 'STDOUT'
## Default: STDOUT
##
#output: STDOUT
##
## Logging Verbosity. This is overridden if "-l LEVEL" or
## "--log-level=LEVEL" are passed on the command line.
##
## Accepted values: All, Trace, Debug, Info, Warn, Error, Fatal, Off
## Default: Info
##
#log_level: Info
##
## Enables colors in logs. Useful for debugging purposes
## This is overridden if "-k" or "--colorize"
## are passed on the command line.
## Colors are also disabled if the environment variable
## NO_COLOR is present and has any value
##
## Accepted values: true, false
## Default: true
##
#colorize_logs: false
# -----------------------------
# Features
# -----------------------------
##
## Enable/Disable the "Popular" tab on the main page.
##
## Accepted values: true, false
## Default: true
##
#popular_enabled: true
##
## Enable/Disable statstics (available at /api/v1/stats).
## The following data is available:
## - Software name ("invidious") and version+branch (same data as
## displayed in the footer, e.g: "2021.05.13-75e5b49" / "master")
## - The value of the 'registration_enabled' config (true/false)
## - Number of currently registered users
## - Number of registered users who connected in the last month
## - Number of registered users who connected in the last 6 months
## - Timestamp of the last server restart
## - Timestamp of the last "Channel Refresh" job execution
##
## Warning: This setting MUST be set to true if you plan to run
## a public instance. It is used by api.invidious.io to refresh
## your instance's status.
##
## Accepted values: true, false
## Default: false
##
#statistics_enabled: false
# -----------------------------
# Users and accounts
# -----------------------------
##
## Allow/Forbid Invidious (local) account creation. Invidious
## accounts allow users to subscribe to channels and to create
## playlists without a Google account.
##
## Accepted values: true, false
## Default: true
##
#registration_enabled: true
##
## Allow/Forbid users to log-in.
##
## Accepted values: true, false
## Default: true
##
#login_enabled: true
##
## Enable/Disable the captcha challenge on the login page.
##
## Note: this is a basic captcha challenge that doesn't
## depend on any third parties.
##
## Accepted values: true, false
## Default: true
##
#captcha_enabled: true
##
## List of usernames that will be granted administrator rights.
## A user with administrator rights will be able to change the
## server configuration options listed below in /preferences,
## in addition to the usual user preferences.
##
## Server-wide settings:
## - popular_enabled
## - captcha_enabled
## - login_enabled
## - registration_enabled
## - statistics_enabled
## Default user preferences:
## - default_home
## - feed_menu
##
## Accepted values: an array of strings
## Default: [""]
##
#admins: [""]
##
## Enable/Disable the user notifications for all users
##
## Note: On large instances, it is recommended to set this option to 'false'
## in order to reduce the amount of data written to the database, and hence
## improve the overall performance of the instance.
##
## Accepted values: true, false
## Default: true
##
#enable_user_notifications: true
# -----------------------------
# Background jobs
# -----------------------------
##
## Number of threads to use when crawling channel videos (during
## subscriptions update).
##
## Notes: This setting is overridden if either "-c THREADS" or
## "--channel-threads=THREADS" is passed on the command line.
##
## Accepted values: a positive integer
## Default: 1
##
channel_threads: 1
##
## Time interval between two executions of the job that crawls
## channel videos (subscriptions update).
##
## Accepted values: a valid time interval (like 1h30m or 90m)
## Default: 30m
##
#channel_refresh_interval: 30m
##
## Forcefully dump and re-download the entire list of uploaded
## videos when crawling channel (during subscriptions update).
##
## Accepted values: true, false
## Default: false
##
full_refresh: false
##
## Number of threads to use when updating RSS feeds.
##
## Notes: This setting is overridden if either "-f THREADS" or
## "--feed-threads=THREADS" is passed on the command line.
##
## Accepted values: a positive integer
## Default: 1
##
feed_threads: 1
jobs:
## Options for the database cleaning job
clear_expired_items:
## Enable/Disable job
##
## Accepted values: true, false
## Default: true
##
enable: true
## Options for the channels updater job
refresh_channels:
## Enable/Disable job
##
## Accepted values: true, false
## Default: true
##
enable: true
## Options for the RSS feeds updater job
refresh_feeds:
## Enable/Disable job
##
## Accepted values: true, false
## Default: true
##
enable: true
# -----------------------------
# Miscellaneous
# -----------------------------
##
## custom banner displayed at the top of every page. This can
## used for instance announcements, e.g.
##
## Accepted values: any string. HTML is accepted.
## Default: <none>
##
#banner:
##
## Subscribe to channels using PubSubHub (Google PubSubHubbub service).
## PubSubHub allows Invidious to be instantly notified when a new video
## is published on any subscribed channels. When PubSubHub is not used,
## Invidious will check for new videos every minute.
##
## Note: This setting is recommended for public instances.
##
## Note 2:
## - Requires a public instance (it uses /feed/webhook/v1)
## - Requires 'domain' and 'hmac_key' to be set.
## - Setting this parameter to any number greater than zero will
## enable channel subscriptions via PubSubHub, but will limit the
## amount of concurrent subscriptions.
##
## Accepted values: true, false, a positive integer
## Default: false
##
#use_pubsub_feeds: false
##
## HMAC signing key used for CSRF tokens, cookies and pubsub
## subscriptions verification.
##
## Note: This parameter is mandatory and should be a random string.
## Such random string can be generated on linux with the following
## command: `pwgen 20 1`
##
## Accepted values: a string
## Default: <none>
##
hmac_key: "CHANGE_ME!!"
##
## List of video IDs where the "download" widget must be
## disabled, in order to comply with DMCA requests.
##
## Accepted values: an array of string
## Default: <none>
##
#dmca_content:
##
## Cache video annotations in the database.
##
## Warning: empty annotations or annotations that only contain
## cards won't be cached.
##
## Accepted values: true, false
## Default: false
##
#cache_annotations: false
##
## Source code URL. If your instance is running a modified source
## code, you MUST publish it somewhere and set this option.
##
## Accepted values: a string
## Default: <none>
##
#modified_source_code_url: ""
##
## Maximum custom playlist length limit.
##
## Accepted values: Integer
## Default: 500
##
#playlist_length_limit: 500
#########################################
#
# Default user preferences
#
#########################################
##
## NOTE: All the settings below define the default user
## preferences. They will apply to ALL users connecting
## without a preferences cookie (so either on the first
## connection to the instance or after clearing the
## browser's cookies).
##
default_user_preferences:
# -----------------------------
# Internationalization
# -----------------------------
##
## Default user interface language (locale).
##
## Note: When hosting a public instance, overriding the
## default (english) is not recommended, as it may
## people using other languages.
##
## Accepted values:
## ar (Arabic)
## da (Danish)
## de (German)
## en-US (english, US)
## el (Greek)
## eo (Esperanto)
## es (Spanish)
## fa (Persian)
## fi (Finnish)
## fr (French)
## he (Hebrew)
## hr (Hungarian)
## id (Indonesian)
## is (Icelandic)
## it (Italian)
## ja (Japanese)
## nb-NO (Norwegian, Bokmål)
## nl (Dutch)
## pl (Polish)
## pt-BR (Portuguese, Brazil)
## pt-PT (Portuguese, Portugal)
## ro (Romanian)
## ru (Russian)
## sv (Swedish)
## tr (Turkish)
## uk (Ukrainian)
## zh-CN (Chinese, China) (a.k.a "Simplified Chinese")
## zh-TW (Chinese, Taiwan) (a.k.a "Traditional Chinese")
##
## Default: en-US
##
#locale: en-US
##
## Default geographical location for content.
##
## Accepted values:
## AE, AR, AT, AU, AZ, BA, BD, BE, BG, BH, BO, BR, BY, CA, CH, CL, CO, CR,
## CY, CZ, DE, DK, DO, DZ, EC, EE, EG, ES, FI, FR, GB, GE, GH, GR, GT, HK,
## HN, HR, HU, ID, IE, IL, IN, IQ, IS, IT, JM, JO, JP, KE, KR, KW, KZ, LB,
## LI, LK, LT, LU, LV, LY, MA, ME, MK, MT, MX, MY, NG, NI, NL, NO, NP, NZ,
## OM, PA, PE, PG, PH, PK, PL, PR, PT, PY, QA, RO, RS, RU, SA, SE, SG, SI,
## SK, SN, SV, TH, TN, TR, TW, TZ, UA, UG, US, UY, VE, VN, YE, ZA, ZW
##
## Default: US
##
#region: US
##
## Top 3 preferred languages for video captions.
##
## Note: overriding the default (no preferred
## caption language) is not recommended, in order
## to not penalize people using other languages.
##
## Accepted values: a three-entries array.
## Each entry can be one of:
## "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"
##
## Default: ["", "", ""]
##
#captions: ["", "", ""]
# -----------------------------
# Interface
# -----------------------------
##
## Enable/Disable dark mode.
##
## Accepted values: "dark", "light", "auto"
## Default: "auto"
##
#dark_mode: "auto"
##
## Enable/Disable thin mode (no video thumbnails).
##
## Accepted values: true, false
## Default: false
##
#thin_mode: false
##
## List of feeds available on the home page.
##
## Note: "Subscriptions" and "Playlists" are only visible
## when the user is logged in.
##
## Accepted values: A list of strings
## Each entry can be one of: "Popular", "Trending",
## "Subscriptions", "Playlists"
##
## Default: ["Popular", "Trending", "Subscriptions", "Playlists"] (show all feeds)
##
#feed_menu: ["Popular", "Trending", "Subscriptions", "Playlists"]
##
## Default feed to display on the home page.
##
## Note: setting this option to "Popular" has no
## effect when 'popular_enabled' is set to false.
##
## Accepted values: Popular, Trending, Subscriptions, Playlists, <none>
## Default: Popular
##
#default_home: Popular
##
## Default number of results to display per page.
##
## Note: this affects invidious-generated pages only, such
## as watch history and subscription feeds. Playlists, search
## results and channel videos depend on the data returned by
## the Youtube API.
##
## Accepted values: any positive integer
## Default: 40
##
#max_results: 40
##
## Show/hide annotations.
##
## Accepted values: true, false
## Default: false
##
#annotations: false
##
## Show/hide annotation.
##
## Accepted values: true, false
## Default: false
##
#annotations_subscribed: false
##
## Type of comments to display below video.
##
## Accepted values: a two-entries array.
## Each entry can be one of: "youtube", "reddit", ""
##
## Default: ["youtube", ""]
##
#comments: ["youtube", ""]
##
## Default player style.
##
## Accepted values: invidious, youtube
## Default: invidious
##
#player_style: invidious
##
## Show/Hide the "related videos" sidebar when
## watching a video.
##
## Accepted values: true, false
## Default: true
##
#related_videos: true
# -----------------------------
# Video player behavior
# -----------------------------
##
## This option controls the value of the HTML5 <video> element's
## "preload" attribute.
##
## If set to 'false', no video data will be loaded until the user
## explicitly starts the video by clicking the "Play" button.
## If set to 'true', the web browser will buffer some video data
## while the page is loading.
##
## See: https://www.w3schools.com/tags/att_video_preload.asp
##
## Accepted values: true, false
## Default: true
##
#preload: true
##
## Automatically play videos on page load.
##
## Accepted values: true, false
## Default: false
##
#autoplay: false
##
## Automatically load the "next" video (either next in
## playlist or proposed) when the current video ends.
##
## Accepted values: true, false
## Default: false
##
#continue: false
##
## Autoplay next video by default.
##
## Note: Only effective if 'continue' is set to true.
##
## Accepted values: true, false
## Default: true
##
#continue_autoplay: true
##
## Play videos in Audio-only mode by default.
##
## Accepted values: true, false
## Default: false
##
#listen: false
##
## Loop videos automatically.
##
## Accepted values: true, false
## Default: false
##
#video_loop: false
# -----------------------------
# Video playback settings
# -----------------------------
##
## Default video quality.
##
## Accepted values: dash, hd720, medium, small
## Default: hd720
##
#quality: hd720
##
## Default dash video quality.
##
## Note: this setting only takes effet if the
## 'quality' parameter is set to "dash".
##
## Accepted values:
## auto, best, 4320p, 2160p, 1440p, 1080p,
## 720p, 480p, 360p, 240p, 144p, worst
## Default: auto
##
#quality_dash: auto
##
## Default video playback speed.
##
## Accepted values: 0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0
## Default: 1.0
##
#speed: 1.0
##
## Default volume.
##
## Accepted values: 0-100
## Default: 100
##
#volume: 100
##
## Allow 360° videos to be played.
##
## Note: This feature requires a WebGL-enabled browser.
##
## Accepted values: true, false
## Default: true
##
#vr_mode: true
##
## Save the playback position
## Allow to continue watching at the previous position when
## watching the same video.
##
## Accepted values: true, false
## Default: false
##
#save_player_pos: false
# -----------------------------
# Subscription feed
# -----------------------------
##
## In the "Subscription" feed, only show the latest video
## of each channel the user is subscribed to.
##
## Note: when combined with 'unseen_only', the latest unseen
## video of each channel will be displayed instead of the
## latest by date.
##
## Accepted values: true, false
## Default: false
##
#latest_only: false
##
## Enable/Disable user subscriptions desktop notifications.
##
## Accepted values: true, false
## Default: false
##
#notifications_only: false
##
## In the "Subscription" feed, Only show the videos that the
## user haven't watched yet (i.e which are not in their watch
## history).
##
## Accepted values: true, false
## Default: false
##
#unseen_only: false
##
## Default sorting parameter for subscription feeds.
##
## Accepted values:
## 'alphabetically'
## 'alphabetically - reverse'
## 'channel name'
## 'channel name - reverse'
## 'published'
## 'published - reverse'
##
## Default: published
##
#sort: published
# -----------------------------
# Miscellaneous
# -----------------------------
##
## Proxy videos through instance by default.
##
## Warning: As most users won't change this setting in their
## preferences, defaulting to true will significantly
## increase the instance's network usage, so make sure that
## your server's connection can handle it.
##
## Accepted values: true, false
## Default: false
##
#local: false
##
## Show the connected user's nick at the top right.
##
## Accepted values: true, false
## Default: true
##
#show_nick: true
##
## Automatically redirect to a random instance when the user uses
## any "switch invidious instance" link (For videos, it's the plane
## icon, next to "watch on youtube" and "listen"). When set to false,
## the user is sent to https://redirect.invidious.io instead, where
## they can manually select an instance.
##
## Accepted values: true, false
## Default: false
##
#automatic_instance_redirect: false
##
## Show the entire video description by default (when set to 'false',
## only the first few lines of the description are shown and a
## "show more" button allows to expand it).
##
## Accepted values: true, false
## Default: false
##
#extend_desc: false

View File

@ -1,4 +1,7 @@
#!/bin/sh #!/bin/sh
psql invidious kemal -c "ALTER TABLE channels ADD COLUMN subscribed bool;" [ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal
psql invidious kemal -c "UPDATE channels SET subscribed = false;" [ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channels ADD COLUMN subscribed bool;"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "UPDATE channels SET subscribed = false;"

View File

@ -1,7 +1,10 @@
#!/bin/sh #!/bin/sh
psql invidious kemal -c "ALTER TABLE channel_videos DROP COLUMN live_now CASCADE" [ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal
psql invidious kemal -c "ALTER TABLE channel_videos DROP COLUMN premiere_timestamp CASCADE" [ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious
psql invidious kemal -c "ALTER TABLE channel_videos ADD COLUMN live_now bool" psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channel_videos DROP COLUMN live_now CASCADE"
psql invidious kemal -c "ALTER TABLE channel_videos ADD COLUMN premiere_timestamp timestamptz" psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channel_videos DROP COLUMN premiere_timestamp CASCADE"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channel_videos ADD COLUMN live_now bool"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channel_videos ADD COLUMN premiere_timestamp timestamptz"

View File

@ -1,19 +1,22 @@
#!/bin/sh #!/bin/sh
psql invidious kemal -c "ALTER TABLE videos DROP COLUMN title CASCADE" [ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal
psql invidious kemal -c "ALTER TABLE videos DROP COLUMN views CASCADE" [ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious
psql invidious kemal -c "ALTER TABLE videos DROP COLUMN likes CASCADE"
psql invidious kemal -c "ALTER TABLE videos DROP COLUMN dislikes CASCADE" psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN title CASCADE"
psql invidious kemal -c "ALTER TABLE videos DROP COLUMN wilson_score CASCADE" psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN views CASCADE"
psql invidious kemal -c "ALTER TABLE videos DROP COLUMN published CASCADE" psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN likes CASCADE"
psql invidious kemal -c "ALTER TABLE videos DROP COLUMN description CASCADE" psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN dislikes CASCADE"
psql invidious kemal -c "ALTER TABLE videos DROP COLUMN language CASCADE" psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN wilson_score CASCADE"
psql invidious kemal -c "ALTER TABLE videos DROP COLUMN author CASCADE" psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN published CASCADE"
psql invidious kemal -c "ALTER TABLE videos DROP COLUMN ucid CASCADE" psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN description CASCADE"
psql invidious kemal -c "ALTER TABLE videos DROP COLUMN allowed_regions CASCADE" psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN language CASCADE"
psql invidious kemal -c "ALTER TABLE videos DROP COLUMN is_family_friendly CASCADE" psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN author CASCADE"
psql invidious kemal -c "ALTER TABLE videos DROP COLUMN genre CASCADE" psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN ucid CASCADE"
psql invidious kemal -c "ALTER TABLE videos DROP COLUMN genre_url CASCADE" psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN allowed_regions CASCADE"
psql invidious kemal -c "ALTER TABLE videos DROP COLUMN license CASCADE" psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN is_family_friendly CASCADE"
psql invidious kemal -c "ALTER TABLE videos DROP COLUMN sub_count_text CASCADE" psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN genre CASCADE"
psql invidious kemal -c "ALTER TABLE videos DROP COLUMN author_thumbnail CASCADE" psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN genre_url CASCADE"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN license CASCADE"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN sub_count_text CASCADE"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN author_thumbnail CASCADE"

View File

@ -1,4 +1,7 @@
#!/bin/sh #!/bin/sh
psql invidious kemal -c "ALTER TABLE channels ADD COLUMN deleted bool;" [ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal
psql invidious kemal -c "UPDATE channels SET deleted = false;" [ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channels ADD COLUMN deleted bool;"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "UPDATE channels SET deleted = false;"

View File

@ -1,5 +1,8 @@
#!/bin/sh #!/bin/sh
psql invidious kemal < config/sql/session_ids.sql [ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal
psql invidious kemal -c "INSERT INTO session_ids (SELECT unnest(id), email, CURRENT_TIMESTAMP FROM users) ON CONFLICT (id) DO NOTHING" [ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious
psql invidious kemal -c "ALTER TABLE users DROP COLUMN id"
psql "$POSTGRES_DB" "$POSTGRES_USER" < config/sql/session_ids.sql
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "INSERT INTO session_ids (SELECT unnest(id), email, CURRENT_TIMESTAMP FROM users) ON CONFLICT (id) DO NOTHING"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE users DROP COLUMN id"

View File

@ -1,3 +1,6 @@
#!/bin/sh #!/bin/sh
psql invidious kemal < config/sql/annotations.sql [ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal
[ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious
psql "$POSTGRES_DB" "$POSTGRES_USER" < config/sql/annotations.sql

View File

@ -1,3 +1,6 @@
#!/bin/sh #!/bin/sh
psql invidious kemal -c "ALTER TABLE channel_videos ADD COLUMN views bigint;" [ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal
[ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channel_videos ADD COLUMN views bigint;"

View File

@ -1,4 +1,7 @@
#!/bin/sh #!/bin/sh
psql invidious kemal -c "ALTER TABLE channel_videos ADD COLUMN live_now bool;" [ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal
psql invidious kemal -c "UPDATE channel_videos SET live_now = false;" [ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channel_videos ADD COLUMN live_now bool;"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "UPDATE channel_videos SET live_now = false;"

View File

@ -1,3 +1,6 @@
#!/bin/sh #!/bin/sh
psql invidious kemal -c "ALTER TABLE users ADD COLUMN feed_needs_update boolean" [ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal
[ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE users ADD COLUMN feed_needs_update boolean"

View File

@ -1,3 +1,6 @@
#!/bin/sh #!/bin/sh
psql invidious kemal -c "ALTER TABLE channel_videos ADD COLUMN premiere_timestamp timestamptz;" [ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal
[ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channel_videos ADD COLUMN premiere_timestamp timestamptz;"

View File

@ -1,5 +1,8 @@
#!/bin/sh #!/bin/sh
psql invidious kemal -c "ALTER TABLE channels DROP COLUMN subscribed" [ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal
psql invidious kemal -c "ALTER TABLE channels ADD COLUMN subscribed timestamptz" [ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious
psql invidious kemal -c "UPDATE channels SET subscribed = '2019-01-01 00:00:00+00'"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channels DROP COLUMN subscribed"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channels ADD COLUMN subscribed timestamptz"
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "UPDATE channels SET subscribed = '2019-01-01 00:00:00+00'"

View File

@ -2,11 +2,11 @@
-- DROP TABLE public.annotations; -- DROP TABLE public.annotations;
CREATE TABLE public.annotations CREATE TABLE IF NOT EXISTS public.annotations
( (
id text NOT NULL, id text NOT NULL,
annotations xml, annotations xml,
CONSTRAINT annotations_id_key UNIQUE (id) CONSTRAINT annotations_id_key UNIQUE (id)
); );
GRANT ALL ON TABLE public.annotations TO kemal; GRANT ALL ON TABLE public.annotations TO current_user;

View File

@ -2,7 +2,7 @@
-- DROP TABLE public.channel_videos; -- DROP TABLE public.channel_videos;
CREATE TABLE public.channel_videos CREATE TABLE IF NOT EXISTS public.channel_videos
( (
id text NOT NULL, id text NOT NULL,
title text, title text,
@ -17,13 +17,13 @@ CREATE TABLE public.channel_videos
CONSTRAINT channel_videos_id_key UNIQUE (id) CONSTRAINT channel_videos_id_key UNIQUE (id)
); );
GRANT ALL ON TABLE public.channel_videos TO kemal; GRANT ALL ON TABLE public.channel_videos TO current_user;
-- Index: public.channel_videos_ucid_idx -- Index: public.channel_videos_ucid_idx
-- DROP INDEX public.channel_videos_ucid_idx; -- DROP INDEX public.channel_videos_ucid_idx;
CREATE INDEX channel_videos_ucid_idx CREATE INDEX IF NOT EXISTS channel_videos_ucid_idx
ON public.channel_videos ON public.channel_videos
USING btree USING btree
(ucid COLLATE pg_catalog."default"); (ucid COLLATE pg_catalog."default");

View File

@ -2,7 +2,7 @@
-- DROP TABLE public.channels; -- DROP TABLE public.channels;
CREATE TABLE public.channels CREATE TABLE IF NOT EXISTS public.channels
( (
id text NOT NULL, id text NOT NULL,
author text, author text,
@ -12,13 +12,13 @@ CREATE TABLE public.channels
CONSTRAINT channels_id_key UNIQUE (id) CONSTRAINT channels_id_key UNIQUE (id)
); );
GRANT ALL ON TABLE public.channels TO kemal; GRANT ALL ON TABLE public.channels TO current_user;
-- Index: public.channels_id_idx -- Index: public.channels_id_idx
-- DROP INDEX public.channels_id_idx; -- DROP INDEX public.channels_id_idx;
CREATE INDEX channels_id_idx CREATE INDEX IF NOT EXISTS channels_id_idx
ON public.channels ON public.channels
USING btree USING btree
(id COLLATE pg_catalog."default"); (id COLLATE pg_catalog."default");

View File

@ -2,20 +2,20 @@
-- DROP TABLE public.nonces; -- DROP TABLE public.nonces;
CREATE TABLE public.nonces CREATE TABLE IF NOT EXISTS public.nonces
( (
nonce text, nonce text,
expire timestamp with time zone, expire timestamp with time zone,
CONSTRAINT nonces_id_key UNIQUE (nonce) CONSTRAINT nonces_id_key UNIQUE (nonce)
); );
GRANT ALL ON TABLE public.nonces TO kemal; GRANT ALL ON TABLE public.nonces TO current_user;
-- Index: public.nonces_nonce_idx -- Index: public.nonces_nonce_idx
-- DROP INDEX public.nonces_nonce_idx; -- DROP INDEX public.nonces_nonce_idx;
CREATE INDEX nonces_nonce_idx CREATE INDEX IF NOT EXISTS nonces_nonce_idx
ON public.nonces ON public.nonces
USING btree USING btree
(nonce COLLATE pg_catalog."default"); (nonce COLLATE pg_catalog."default");

View File

@ -2,7 +2,7 @@
-- DROP TABLE public.playlist_videos; -- DROP TABLE public.playlist_videos;
CREATE TABLE playlist_videos CREATE TABLE IF NOT EXISTS public.playlist_videos
( (
title text, title text,
id text, id text,
@ -16,4 +16,4 @@ CREATE TABLE playlist_videos
PRIMARY KEY (index,plid) PRIMARY KEY (index,plid)
); );
GRANT ALL ON TABLE public.playlist_videos TO kemal; GRANT ALL ON TABLE public.playlist_videos TO current_user;

View File

@ -13,7 +13,7 @@ CREATE TYPE public.privacy AS ENUM
-- DROP TABLE public.playlists; -- DROP TABLE public.playlists;
CREATE TABLE public.playlists CREATE TABLE IF NOT EXISTS public.playlists
( (
title text, title text,
id text primary key, id text primary key,
@ -26,4 +26,4 @@ CREATE TABLE public.playlists
index int8[] index int8[]
); );
GRANT ALL ON public.playlists TO kemal; GRANT ALL ON public.playlists TO current_user;

View File

@ -2,7 +2,7 @@
-- DROP TABLE public.session_ids; -- DROP TABLE public.session_ids;
CREATE TABLE public.session_ids CREATE TABLE IF NOT EXISTS public.session_ids
( (
id text NOT NULL, id text NOT NULL,
email text, email text,
@ -10,13 +10,13 @@ CREATE TABLE public.session_ids
CONSTRAINT session_ids_pkey PRIMARY KEY (id) CONSTRAINT session_ids_pkey PRIMARY KEY (id)
); );
GRANT ALL ON TABLE public.session_ids TO kemal; GRANT ALL ON TABLE public.session_ids TO current_user;
-- Index: public.session_ids_id_idx -- Index: public.session_ids_id_idx
-- DROP INDEX public.session_ids_id_idx; -- DROP INDEX public.session_ids_id_idx;
CREATE INDEX session_ids_id_idx CREATE INDEX IF NOT EXISTS session_ids_id_idx
ON public.session_ids ON public.session_ids
USING btree USING btree
(id COLLATE pg_catalog."default"); (id COLLATE pg_catalog."default");

View File

@ -2,7 +2,7 @@
-- DROP TABLE public.users; -- DROP TABLE public.users;
CREATE TABLE public.users CREATE TABLE IF NOT EXISTS public.users
( (
updated timestamp with time zone, updated timestamp with time zone,
notifications text[], notifications text[],
@ -16,13 +16,13 @@ CREATE TABLE public.users
CONSTRAINT users_email_key UNIQUE (email) CONSTRAINT users_email_key UNIQUE (email)
); );
GRANT ALL ON TABLE public.users TO kemal; GRANT ALL ON TABLE public.users TO current_user;
-- Index: public.email_unique_idx -- Index: public.email_unique_idx
-- DROP INDEX public.email_unique_idx; -- DROP INDEX public.email_unique_idx;
CREATE UNIQUE INDEX email_unique_idx CREATE UNIQUE INDEX IF NOT EXISTS email_unique_idx
ON public.users ON public.users
USING btree USING btree
(lower(email) COLLATE pg_catalog."default"); (lower(email) COLLATE pg_catalog."default");

View File

@ -2,7 +2,7 @@
-- DROP TABLE public.videos; -- DROP TABLE public.videos;
CREATE TABLE public.videos CREATE UNLOGGED TABLE IF NOT EXISTS public.videos
( (
id text NOT NULL, id text NOT NULL,
info text, info text,
@ -10,13 +10,13 @@ CREATE TABLE public.videos
CONSTRAINT videos_pkey PRIMARY KEY (id) CONSTRAINT videos_pkey PRIMARY KEY (id)
); );
GRANT ALL ON TABLE public.videos TO kemal; GRANT ALL ON TABLE public.videos TO current_user;
-- Index: public.id_idx -- Index: public.id_idx
-- DROP INDEX public.id_idx; -- DROP INDEX public.id_idx;
CREATE UNIQUE INDEX id_idx CREATE UNIQUE INDEX IF NOT EXISTS id_idx
ON public.videos ON public.videos
USING btree USING btree
(id COLLATE pg_catalog."default"); (id COLLATE pg_catalog."default");

View File

@ -1,18 +1,12 @@
version: '3' # Warning: This docker-compose file is made for development purposes.
# Using it will build an image from the locally cloned repository.
#
# If you want to use Invidious in production, see the docker-compose.yml file provided
# in the installation documentation: https://docs.invidious.io/installation/
version: "3"
services: services:
postgres:
image: postgres:10
restart: unless-stopped
volumes:
- postgresdata:/var/lib/postgresql/data
- ./config/sql:/config/sql
- ./docker/init-invidious-db.sh:/docker-entrypoint-initdb.d/init-invidious-db.sh
environment:
POSTGRES_DB: invidious
POSTGRES_PASSWORD: kemal
POSTGRES_USER: kemal
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
invidious: invidious:
build: build:
context: . context: .
@ -21,22 +15,41 @@ services:
ports: ports:
- "127.0.0.1:3000:3000" - "127.0.0.1:3000:3000"
environment: environment:
# Adapted from ./config/config.yml # Please read the following file for a comprehensive list of all available
# configuration options and their associated syntax:
# https://github.com/iv-org/invidious/blob/master/config/config.example.yml
INVIDIOUS_CONFIG: | INVIDIOUS_CONFIG: |
channel_threads: 1
check_tables: true
feed_threads: 1
db: db:
dbname: invidious
user: kemal user: kemal
password: kemal password: kemal
host: postgres host: invidious-db
port: 5432 port: 5432
dbname: invidious check_tables: true
full_refresh: false # external_port:
https_only: false # domain:
domain: # https_only: false
depends_on: # statistics_enabled: false
- postgres hmac_key: "CHANGE_ME!!"
healthcheck:
test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/trending || exit 1
interval: 30s
timeout: 5s
retries: 2
invidious-db:
image: docker.io/library/postgres:14
restart: unless-stopped
volumes:
- postgresdata:/var/lib/postgresql/data
- ./config/sql:/config/sql
- ./docker/init-invidious-db.sh:/docker-entrypoint-initdb.d/init-invidious-db.sh
environment:
POSTGRES_DB: invidious
POSTGRES_USER: kemal
POSTGRES_PASSWORD: kemal
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
volumes: volumes:
postgresdata: postgresdata:

View File

@ -1,32 +1,52 @@
FROM crystallang/crystal:0.36.1-alpine AS builder FROM crystallang/crystal:1.12.2-alpine AS builder
RUN apk add --no-cache curl sqlite-static yaml-static
RUN apk add --no-cache sqlite-static yaml-static
ARG release
WORKDIR /invidious WORKDIR /invidious
COPY ./shard.yml ./shard.yml COPY ./shard.yml ./shard.yml
COPY ./shard.lock ./shard.lock COPY ./shard.lock ./shard.lock
RUN shards install && \ RUN shards install --production
curl -Lo ./lib/lsquic/src/lsquic/ext/liblsquic.a https://github.com/iv-org/lsquic-static-alpine/releases/download/v2.18.1/liblsquic.a
COPY ./src/ ./src/ COPY ./src/ ./src/
# TODO: .git folder is required for building this is destructive. # TODO: .git folder is required for building this is destructive.
# See definition of CURRENT_BRANCH, CURRENT_COMMIT and CURRENT_VERSION. # See definition of CURRENT_BRANCH, CURRENT_COMMIT and CURRENT_VERSION.
COPY ./.git/ ./.git/ COPY ./.git/ ./.git/
RUN crystal build ./src/invidious.cr \
--static --warnings all \
--link-flags "-lxml2 -llzma"
FROM alpine:latest # Required for fetching player dependencies
RUN apk add --no-cache librsvg ttf-opensans COPY ./scripts/ ./scripts/
COPY ./assets/ ./assets/
COPY ./videojs-dependencies.yml ./videojs-dependencies.yml
RUN crystal spec --warnings all \
--link-flags "-lxml2 -llzma"
RUN if [[ "${release}" == 1 ]] ; then \
crystal build ./src/invidious.cr \
--release \
--static --warnings all \
--link-flags "-lxml2 -llzma"; \
else \
crystal build ./src/invidious.cr \
--static --warnings all \
--link-flags "-lxml2 -llzma"; \
fi
FROM alpine:3.20
RUN apk add --no-cache rsvg-convert ttf-opensans tini tzdata
WORKDIR /invidious WORKDIR /invidious
RUN addgroup -g 1000 -S invidious && \ RUN addgroup -g 1000 -S invidious && \
adduser -u 1000 -S invidious -G invidious adduser -u 1000 -S invidious -G invidious
COPY ./assets/ ./assets/
COPY --chown=invidious ./config/config.* ./config/ COPY --chown=invidious ./config/config.* ./config/
RUN mv -n config/config.example.yml config/config.yml RUN mv -n config/config.example.yml config/config.yml
RUN sed -i 's/host: \(127.0.0.1\|localhost\)/host: postgres/' config/config.yml RUN sed -i 's/host: \(127.0.0.1\|localhost\)/host: invidious-db/' config/config.yml
COPY ./config/sql/ ./config/sql/ COPY ./config/sql/ ./config/sql/
COPY ./locales/ ./locales/ COPY ./locales/ ./locales/
COPY --from=builder /invidious/assets ./assets/
COPY --from=builder /invidious/invidious . COPY --from=builder /invidious/invidious .
RUN chmod o+rX -R ./assets ./config ./locales RUN chmod o+rX -R ./assets ./config ./locales
EXPOSE 3000 EXPOSE 3000
USER invidious USER invidious
ENTRYPOINT ["/sbin/tini", "--"]
CMD [ "/invidious/invidious" ] CMD [ "/invidious/invidious" ]

53
docker/Dockerfile.arm64 Normal file
View File

@ -0,0 +1,53 @@
FROM alpine:3.20 AS builder
RUN apk add --no-cache 'crystal=1.12.2-r0' shards sqlite-static yaml-static yaml-dev libxml2-static \
zlib-static openssl-libs-static openssl-dev musl-dev xz-static
ARG release
WORKDIR /invidious
COPY ./shard.yml ./shard.yml
COPY ./shard.lock ./shard.lock
RUN shards install --production
COPY ./src/ ./src/
# TODO: .git folder is required for building this is destructive.
# See definition of CURRENT_BRANCH, CURRENT_COMMIT and CURRENT_VERSION.
COPY ./.git/ ./.git/
# Required for fetching player dependencies
COPY ./scripts/ ./scripts/
COPY ./assets/ ./assets/
COPY ./videojs-dependencies.yml ./videojs-dependencies.yml
RUN crystal spec --warnings all \
--link-flags "-lxml2 -llzma"
RUN if [[ "${release}" == 1 ]] ; then \
crystal build ./src/invidious.cr \
--release \
--static --warnings all \
--link-flags "-lxml2 -llzma"; \
else \
crystal build ./src/invidious.cr \
--static --warnings all \
--link-flags "-lxml2 -llzma"; \
fi
FROM alpine:3.20
RUN apk add --no-cache rsvg-convert ttf-opensans tini tzdata
WORKDIR /invidious
RUN addgroup -g 1000 -S invidious && \
adduser -u 1000 -S invidious -G invidious
COPY --chown=invidious ./config/config.* ./config/
RUN mv -n config/config.example.yml config/config.yml
RUN sed -i 's/host: \(127.0.0.1\|localhost\)/host: invidious-db/' config/config.yml
COPY ./config/sql/ ./config/sql/
COPY ./locales/ ./locales/
COPY --from=builder /invidious/assets ./assets/
COPY --from=builder /invidious/invidious .
RUN chmod o+rX -R ./assets ./config ./locales
EXPOSE 3000
USER invidious
ENTRYPOINT ["/sbin/tini", "--"]
CMD [ "/invidious/invidious" ]

View File

@ -1,16 +1,12 @@
#!/bin/bash #!/bin/bash
set -eou pipefail set -eou pipefail
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/channels.sql
CREATE USER postgres; psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/videos.sql
EOSQL psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/channel_videos.sql
psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/users.sql
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/channels.sql psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/session_ids.sql
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/videos.sql psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/nonces.sql
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/channel_videos.sql psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/annotations.sql
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/users.sql psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/playlists.sql
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/session_ids.sql psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/playlist_videos.sql
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/nonces.sql
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/annotations.sql
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/playlists.sql
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/playlist_videos.sql

View File

@ -1 +0,0 @@
/charts/*.tgz

View File

@ -1,6 +0,0 @@
dependencies:
- name: postgresql
repository: https://kubernetes-charts.storage.googleapis.com/
version: 8.3.0
digest: sha256:1feec3c396cbf27573dc201831ccd3376a4a6b58b2e7618ce30a89b8f5d707fd
generated: "2020-02-07T13:39:38.624846+01:00"

View File

@ -1,22 +0,0 @@
apiVersion: v2
name: invidious
description: Invidious is an alternative front-end to YouTube
version: 1.1.0
appVersion: 0.20.1
keywords:
- youtube
- proxy
- video
- privacy
home: https://invidio.us/
icon: https://raw.githubusercontent.com/iv-org/invidious/05988c1c49851b7d0094fca16aeaf6382a7f64ab/assets/favicon-32x32.png
sources:
- https://github.com/iv-org/invidious
maintainers:
- name: Leon Klingele
email: mail@leonklingele.de
dependencies:
- name: postgresql
version: ~8.3.0
repository: "https://kubernetes-charts.storage.googleapis.com/"
engine: gotpl

View File

@ -1,41 +1 @@
# Invidious Helm chart The Helm chart has moved to a dedicated GitHub repository: https://github.com/iv-org/invidious-helm-chart/tree/master/invidious
Easily deploy Invidious to Kubernetes.
## Installing Helm chart
```sh
# Build Helm dependencies
$ helm dep build
# Add PostgreSQL init scripts
$ kubectl create configmap invidious-postgresql-init \
--from-file=../config/sql/channels.sql \
--from-file=../config/sql/videos.sql \
--from-file=../config/sql/channel_videos.sql \
--from-file=../config/sql/users.sql \
--from-file=../config/sql/session_ids.sql \
--from-file=../config/sql/nonces.sql \
--from-file=../config/sql/annotations.sql \
--from-file=../config/sql/playlists.sql \
--from-file=../config/sql/playlist_videos.sql
# Install Helm app to your Kubernetes cluster
$ helm install invidious ./
```
## Upgrading
```sh
# Upgrading is easy, too!
$ helm upgrade invidious ./
```
## Uninstall
```sh
# Get rid of everything (except database)
$ helm delete invidious
# To also delete the database, remove all invidious-postgresql PVCs
```

View File

@ -1,16 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "invidious.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "invidious.fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}

View File

@ -1,11 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "invidious.fullname" . }}
labels:
app: {{ template "invidious.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: {{ .Release.Name }}
data:
INVIDIOUS_CONFIG: |
{{ toYaml .Values.config | indent 4 }}

View File

@ -1,61 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "invidious.fullname" . }}
labels:
app: {{ template "invidious.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: {{ .Release.Name }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "invidious.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "invidious.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: {{ .Release.Name }}
spec:
securityContext:
runAsUser: {{ .Values.securityContext.runAsUser }}
runAsGroup: {{ .Values.securityContext.runAsGroup }}
fsGroup: {{ .Values.securityContext.fsGroup }}
initContainers:
- name: wait-for-postgresql
image: postgres
args:
- /bin/sh
- -c
- until pg_isready -h {{ .Values.config.db.host }} -p {{ .Values.config.db.port }} -U {{ .Values.config.db.user }}; do echo waiting for database; sleep 2; done;
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: 3000
env:
- name: INVIDIOUS_CONFIG
valueFrom:
configMapKeyRef:
key: INVIDIOUS_CONFIG
name: {{ template "invidious.fullname" . }}
securityContext:
allowPrivilegeEscalation: {{ .Values.securityContext.allowPrivilegeEscalation }}
capabilities:
drop:
- ALL
resources:
{{ toYaml .Values.resources | indent 10 }}
readinessProbe:
httpGet:
port: 3000
path: /
livenessProbe:
httpGet:
port: 3000
path: /
initialDelaySeconds: 15
restartPolicy: Always

View File

@ -1,18 +0,0 @@
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "invidious.fullname" . }}
labels:
app: {{ template "invidious.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: {{ .Release.Name }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ template "invidious.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
targetCPUUtilizationPercentage: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}

View File

@ -1,20 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "invidious.fullname" . }}
labels:
app: {{ template "invidious.name" . }}
chart: {{ .Chart.Name }}
release: {{ .Release.Name }}
spec:
type: {{ .Values.service.type }}
ports:
- name: http
port: {{ .Values.service.port }}
targetPort: 3000
selector:
app: {{ template "invidious.name" . }}
release: {{ .Release.Name }}
{{- if .Values.service.loadBalancerIP }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }}

View File

@ -1,56 +0,0 @@
name: invidious
image:
repository: iv-org/invidious
tag: latest
pullPolicy: Always
replicaCount: 1
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 16
targetCPUUtilizationPercentage: 50
service:
type: clusterIP
port: 3000
#loadBalancerIP:
resources: {}
#requests:
# cpu: 100m
# memory: 64Mi
#limits:
# cpu: 800m
# memory: 512Mi
securityContext:
allowPrivilegeEscalation: false
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
# See https://github.com/helm/charts/tree/master/stable/postgresql
postgresql:
postgresqlUsername: kemal
postgresqlPassword: kemal
postgresqlDatabase: invidious
initdbUsername: kemal
initdbPassword: kemal
initdbScriptsConfigMap: invidious-postgresql-init
# Adapted from ../config/config.yml
config:
channel_threads: 1
feed_threads: 1
db:
user: kemal
password: kemal
host: invidious-postgresql
port: 5432
dbname: invidious
full_refresh: false
https_only: false
domain:

15
locales/af.json Normal file
View File

@ -0,0 +1,15 @@
{
"generic_views_count": "{{count}} kyk",
"generic_views_count_plural": "{{count}} kyke",
"generic_videos_count": "{{count}} video",
"generic_videos_count_plural": "{{count}} videos",
"generic_playlists_count": "{{count}} snitlys",
"generic_playlists_count_plural": "{{count}} snitlyste",
"generic_subscriptions_count": "{{count}} intekening",
"generic_subscriptions_count_plural": "{{count}} intekeninge",
"LIVE": "LEWENDIG",
"generic_subscribers_count": "{{count}} intekenaar",
"generic_subscribers_count_plural": "{{count}} intekenare",
"Shared `x` ago": "`x` gelede gedeel",
"New passwords must match": "Nuwe wagwoord moet ooreenstem"
}

View File

@ -1,147 +1,124 @@
{ {
"`x` subscribers": { "LIVE": "مُباشِر",
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` المشتركين", "Shared `x` ago": "تمَّ الرفع مُنذ `x`",
"": "`x` المشتركين" "Unsubscribe": "إلغاء الاشتراك",
}, "Subscribe": "الاشتراك",
"`x` videos": { "View channel on YouTube": "زيارة القناة على يوتيوب",
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` الفيديوهات", "View playlist on YouTube": "عرض قائمة التشغيل على يوتيوب",
"": "`x` الفيديوهات" "newest": "الأحدث",
},
"`x` playlists": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` قوائم التشغيل",
"": "`x` قوائم التشغيل"
},
"LIVE": "مباشر",
"Shared `x` ago": "تم رفع الفيديو منذ `x`",
"Unsubscribe": "إلغاء الإشتراك",
"Subscribe": "إشتراك",
"View channel on YouTube": "زيارة القناة على موقع يوتيوب",
"View playlist on YouTube": "عرض قائمة التشغيل على اليوتيوب",
"newest": "الأجدد",
"oldest": "الأقدم", "oldest": "الأقدم",
"popular": "الأكثر شعبية", "popular": "الأكثر شعبية",
"last": "اخر قوائم التشغيل المعدلة", "last": "الأخيرة",
"Next page": "الصفحة الثانية", "Next page": "الصفحة التالية",
"Previous page": "الصفحة السابقة", "Previous page": "الصفحة السابقة",
"Clear watch history?": "مسح السجل ؟", "Clear watch history?": "هل تريد محو سجل المشاهدة؟",
"New password": "الرقم السرى الجديد", "New password": "كلمة مرور جديدة",
"New passwords must match": "الأرقام السرية يجب ان تكون متطابقة", "New passwords must match": "يَجبُ أن تكون كلمتا المرور متطابقتين",
"Cannot change password for Google accounts": "لا يستطيع تغيير الرقم السرى لحساب جوجل", "Authorize token?": "رمز التفويض؟",
"Authorize token?": "رمز الإذن ؟", "Authorize token for `x`?": "السماح بالرمز المميز ل `x`؟",
"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": "استيراد بيانات JSON Invidious",
"Import YouTube subscriptions": "إضافةالإشتراكات من موقع يوتيوب", "Import YouTube subscriptions": "استيراد الاشتراكات YouTube بتنسيق CSV أو OPML",
"Import FreeTube subscriptions (.db)": "إضافةالمشتركين من FreeTube (.db)", "Import FreeTube subscriptions (.db)": "استيراد اشتراكات فريتيوب (.db)",
"Import NewPipe subscriptions (.json)": "إضافة المشتركين من NewPipe (.json)", "Import NewPipe subscriptions (.json)": "استيراد اشتراكات نيو بايب (.json)",
"Import NewPipe data (.zip)": "إضافة بيانات NewPipe (.zip)", "Import NewPipe data (.zip)": "استيراد بيانات نيو بايب (.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 (لِنيو بايب و فريتيوب)",
"Export data as JSON": "استخراج البيانات كـ JSON", "Export data as JSON": "تصدير بيانات Invidious كـ JSON",
"Delete account?": "حذف الحساب ؟", "Delete account?": "حذف الحساب؟",
"History": "السجل", "History": "السِّجل",
"An alternative front-end to YouTube": "البديل الكامل لموقع يوتيوب", "An alternative front-end to YouTube": "واجهة أمامية بديلة لموقع يوتيوب",
"JavaScript license information": "معلومات ترخيص JavaScript", "JavaScript license information": "معلومات ترخيص جافا سكربت",
"source": "المصدر", "source": "المصدر",
"Log in": "تسجيل الدخول", "Log in": "تسجيل الدخول",
"Log in/register": "تسجيل الدخول\\إنشاء حساب", "Log in/register": "تسجيل الدخول \\ إنشاء حساب",
"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": "نص الكابتشا",
"Text CAPTCHA": "CAPTCHA كلامية", "Image CAPTCHA": "صورة الكابتشا",
"Image CAPTCHA": "CAPTCHA صورية", "Sign In": "إنشاء حساب",
"Sign In": "تسجيل الدخول", "Register": "التسجيل",
"Register": "انشاء الحساب", "E-mail": "البريد الإلكتروني",
"E-mail": "الإيميل", "Preferences": "الإعدادات",
"Google verification code": "رمز تحقق جوجل", "preferences_category_player": "إعدادات المُشغِّل",
"Preferences": "التفضيلات", "preferences_video_loop_label": "كرر المقطع المرئيّ دائما: ",
"Player preferences": "التفضيلات المشغل", "preferences_autoplay_label": "تشغيل تلقائي: ",
"Always loop: ": "كرر الفيديو دائما: ", "preferences_continue_label": "تشغيل المقطع التالي تلقائيًا: ",
"Autoplay: ": "تشغيل تلقائى: ", "preferences_continue_autoplay_label": "شغل المقطع التالي تلقائيًا: . ",
"Play next by default: ": "شغل الفيديو التالي تلقائيا: ", "preferences_listen_label": "تشغيل النسخة السمعية تلقائيًا: ",
"Autoplay next video: ": "شغل الفيديو التالي تلقائيا (في قوائم التشغيل) ", "preferences_local_label": "بروكسي المقاطع المرئيّة؟ ",
"Listen by default: ": "تشغيل النسخة السمعية تلقائى: ", "preferences_speed_label": "السرعة الافتراضية: ",
"Proxy videos: ": "عرض الفيديوهات عن طريق البروكسي؟ ", "preferences_quality_label": "الجودة المفضلة للمقاطع: ",
"Default speed: ": "السرعة الإفتراضية: ", "preferences_volume_label": "صوت المشغل: ",
"Preferred video quality: ": "الجودة المفضلة للفيديوهات: ", "preferences_comments_label": "التعليقات الافتراضية: ",
"Player volume: ": "صوت المشغل: ",
"Default comments: ": "إضهار التعليقات الإفتراضية لـ: ",
"youtube": "يوتيوب", "youtube": "يوتيوب",
"reddit": "Reddit", "reddit": "ريديت",
"Default captions: ": "الترجمات الإفتراضية: ", "preferences_captions_label": "التسميات التوضيحية الإفتراضية: ",
"Fallback captions: ": "الترجمات المصاحبة: ", "Fallback captions: ": "التسميات التوضيحية الاحتياطيَّة: ",
"Show related videos: ": "اعرض الفيديوهات ذات الصلة: ", "preferences_related_videos_label": "اعرض الفيديوهات ذات الصلة: ",
"Show annotations by default: ": "اعرض الملاحظات في الفيديو تلقائيا: ", "preferences_annotations_label": "اعرض الملاحظات في الفيديو تلقائيا: ",
"Automatically extend video description: ": "", "preferences_extend_desc_label": "توسيع وصف الفيديو تلقائيا: ",
"Visual preferences": "التفضيلات المرئية", "preferences_vr_mode_label": "مقاطع فيديو تفاعلية بزاوية 360 درجة (تتطلب WebGL): ",
"Player style: ": "شكل مشغل الفيديوهات: ", "preferences_category_visual": "التفضيلات المرئية",
"Dark mode: ": "الوضع الليلى: ", "preferences_player_style_label": "شكل مشغل الفيديوهات: ",
"Theme: ": "المظهر: ", "Dark mode: ": "الوضع الليلي: ",
"preferences_dark_mode_label": "المظهر: ",
"dark": "غامق (اسود)", "dark": "غامق (اسود)",
"light": "فاتح (ابيض)", "light": "فاتح (ابيض)",
"Thin mode: ": "الوضع الخفيف: ", "preferences_thin_mode_label": "الوضع الخفيف: ",
"Subscription preferences": "تفضيلات الإشتراك", "preferences_category_misc": "تفضيلات متنوعة",
"Show annotations by default for subscribed channels: ": "عرض الملاحظات في الفيديوهات تلقائيا في القنوات المشترك بها فقط: ", "preferences_automatic_instance_redirect_label": "إعادة توجيه المثيل التلقائي (إعادة التوجيه إلى redirect.invidious.io): ",
"preferences_category_subscription": "تفضيلات الاشتراك",
"preferences_annotations_subscribed_label": "عرض الملاحظات في الفيديوهات تلقائيا في القنوات المشترك بها فقط: ",
"Redirect homepage to feed: ": "إعادة التوجية من الصفحة الرئيسية لصفحة المشتركين (لرؤية اخر فيديوهات المشتركين): ", "Redirect homepage to feed: ": "إعادة التوجية من الصفحة الرئيسية لصفحة المشتركين (لرؤية اخر فيديوهات المشتركين): ",
"Number of videos shown in feed: ": "عدد الفيديوهات التى ستظهر فى صفحة المشتركين: ", "preferences_max_results_label": "عدد الفيديوهات التى ستظهر فى صفحة المشتركين: ",
"Sort videos by: ": "ترتيب الفيديو بـ: ", "preferences_sort_label": "ترتيب الفيديوهات بـ: ",
"published": "احدث فيديو", "published": "أحدث فيديو",
"published - reverse": "احدث فيديو - عكسى", "published - reverse": "أحدث فيديو - عكسي",
"alphabetically": "ترتيب ابجدى", "alphabetically": "ترتيب أبجدي",
"alphabetically - reverse": "ابجدى - عكسى", "alphabetically - reverse": "أبجدي - عكسي",
"channel name": إسم القناة", "channel name": اسم القناة",
"channel name - reverse": إسم القناة - عكسى", "channel name - reverse": اسم القناة - عكسى",
"Only show latest video from channel: ": "فقط إظهر اخر فيديو من القناة: ", "Only show latest video from channel: ": "فقط أظهر آخر فيديو من القناة: ",
"Only show latest unwatched video from channel: ": "فقط اظهر اخر فيديو لم يتم رؤيتة من القناة: ", "Only show latest unwatched video from channel: ": "فقط أظهر آخر فيديو لم يتم رؤيته من القناة: ",
"Only show unwatched: ": "فقط اظهر الذى لم يتم رؤيتة: ", "preferences_unseen_only_label": "فقط أظهر الذي لم يتم رؤيته: ",
"Only show notifications (if there are any): ": "إظهار الإشعارات فقط (إذا كان هناك أي): ", "preferences_notifications_only_label": "إظهار الإشعارات فقط (إذا كان هناك أي): ",
"Enable web notifications": "تفعيل إشعارات المتصفح", "Enable web notifications": "تفعيل إشعارات المتصفح",
"`x` uploaded a video": "`x` رفع فيديو", "`x` uploaded a video": "`x` رفع فيديو",
"`x` is live": "`x` فى بث مباشر", "`x` is live": "`x` في بث مباشر",
"Data preferences": "إعدادات التفضيلات", "preferences_category_data": "إعدادات التفضيلات",
"Clear watch history": "حذف سجل المشاهدة", "Clear watch history": "حذف سجل المشاهدة",
"Import/export data": ضافة\\إستخراج البيانات", "Import/export data": ستيراد و تصدير البيانات",
"Change password": "غير الرقم السرى", "Change password": "تغير كلمة السر",
"Manage subscriptions": "إدارة المشتركين", "Manage subscriptions": "إدارة الاشتراكات",
"Manage tokens": "إدارة الرموز", "Manage tokens": "إدارة الرموز",
"Watch history": "سجل المشاهدة", "Watch history": "سجل المشاهدة",
"Delete account": "حذف الحساب", "Delete account": "حذف الحساب",
"Administrator preferences": "إعدادات المدير", "preferences_category_admin": "إعدادات المدير",
"Default homepage: ": "الصفحة الرئيسية الافتراضية ", "preferences_default_home_label": "الصفحة الرئيسية الافتراضية: ",
"Feed menu: ": "قائمة التدفقات: ", "preferences_feed_menu_label": "قائمة التدفقات: ",
"preferences_show_nick_label": "إظهار اللقب في الأعلى: ",
"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 manager": "إداره الرمز",
"Token": "الرمز", "Token": "الرمز",
"`x` subscriptions": { "Import/export": "استيراد/تصدير",
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` مشتركين", "unsubscribe": "إلغاء الاشتراك",
"": "`x` مشتركين"
},
"`x` tokens": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` رموز",
"": "`x` رموز"
},
"Import/export": "إضافة\\إستخراج",
"unsubscribe": "إلغاء الإشتراك",
"revoke": "مسح", "revoke": "مسح",
"Subscriptions": "الإشتراكات", "Subscriptions": "الاشتراكات",
"`x` unseen notifications": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` إشعارات لم تشاهدها بعد",
"": "`x` إشعارات لم تشاهدها بعد"
},
"search": "بحث", "search": "بحث",
"Log out": "تسجيل الخروج", "Log out": "تسجيل الخروج",
"Released under the AGPLv3 by Omar Roth.": "تم الإنشاء تحت AGPLv3 بواسطة عمر روث.", "Released under the AGPLv3 on Github.": "صدر تحت AGPLv3 على GitHub.",
"Source available here.": "الأكواد متوفرة هنا.", "Source available here.": "الأكواد متوفرة هنا.",
"View JavaScript license information.": "مشاهدة معلومات حول تراخيص الجافاسكريبت.", "View JavaScript license information.": "مشاهدة معلومات حول تراخيص الجافاسكريبت.",
"View privacy policy.": "عرض سياسة الخصوصية.", "View privacy policy.": "عرض سياسة الخصوصية.",
@ -151,93 +128,77 @@
"Private": "خاص", "Private": "خاص",
"View all playlists": "عرض جميع قوائم التشغيل", "View all playlists": "عرض جميع قوائم التشغيل",
"Updated `x` ago": "تم تحديثه منذ `x`", "Updated `x` ago": "تم تحديثه منذ `x`",
"Delete playlist `x`?": "حذف قائمه التشغيل `x` ?", "Delete playlist `x`?": "حذف قائمة التشغيل `x`؟",
"Delete playlist": "حذف قائمه التغشيل", "Delete playlist": "حذف قائمة التغشيل",
"Create playlist": "إنشاء قائمه تشغيل", "Create playlist": "إنشاء قائمة تشغيل",
"Title": "العنوان", "Title": "العنوان",
"Playlist privacy": "إعدادات الخصوصيه", "Playlist privacy": "إعدادات الخصوصية",
"Editing playlist `x`": "تعديل قائمه التشفيل `x`", "Editing playlist `x`": "تعديل قائمة التشغيل `x`",
"Show more": "", "Show more": "عرض المزيد",
"Show less": "", "Show less": "عرض اقل",
"Watch on YouTube": "مشاهدة الفيديو على اليوتيوب", "Watch on YouTube": "مشاهدة الفيديو على اليوتيوب",
"Hide annotations": "إخفاء الملاحظات فى الفيديو", "Switch Invidious Instance": "تبديل المثيل Invidious",
"Show annotations": "عرض الملاحظات فى الفيديو", "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`",
"`x` views": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` مشاهدات",
"": "`x` مشاهدات"
},
"Premieres in `x`": "يعرض فى `x`", "Premieres in `x`": "يعرض فى `x`",
"Premieres `x`": "يعرض `x`", "Premieres `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.": "اهلا! يبدو ان الجافاسكريبت معطلة. اضغط هنا لعرض التعليقات, ضع فى إعتبارك انها ستأخذ وقت اطول للعرض.", "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": "عرض المزيد من التعليقات على\\من موقع ريديت",
"View `x` comments": { "View `x` comments": {
"([^.,0-9]|^)1([^.,0-9]|$)": "عرض `x` تعليقات", "([^.,0-9]|^)1([^.,0-9]|$)": "عرض `x` تعليقات",
"": "عرض `x` تعليقات" "": "عرض `x` تعليقات."
}, },
"View Reddit comments": "عرض تعليقات ريدإت Reddit", "View Reddit comments": "عرض تعليقات ريديت",
"Hide replies": "إخفاء الردود", "Hide replies": "إخفاء الردود",
"Show replies": "عرض الردود", "Show replies": "عرض الردود",
"Incorrect password": "الرقم السرى غير صحيح", "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.": "غير قادر على تسجيل الدخول, تأكد من تشغيل المصادقة الثنائية 2FA.",
"Invalid TFA code": "كود مصادقة ثنائية 2FA غير صحيح",
"Login failed. This may be because two-factor authentication is not turned on for your account.": "لم يتم تسجيل الدخول. هذا ربما بسبب ان المصادقة الثنائية 2FA معطلة فى حسابك.",
"Wrong answer": "إجابة خاطئة", "Wrong answer": "إجابة خاطئة",
"Erroneous 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": "مكان كلمة السر مطلوب",
"Wrong username or password": "إسم المستخدم او الرقم السرى غير صحيح", "Wrong username or password": "اسم المستخدم او كلمة السر غير صحيح",
"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 log 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": {
"([^.,0-9]|^)1([^.,0-9]|$)": "عرض `x` ردود",
"": "عرض `x` ردود"
},
"`x` ago": "`x` منذ", "`x` ago": "`x` منذ",
"Load more": "عرض المزيد", "Load more": "تحميل المزيد",
"`x` points": { "Could not create mix.": "تعذر إنشاء مزيج.",
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` نقاط",
"": "`x` نقاط"
},
"Could not create mix.": "لم يستطع عمل خلط.",
"Empty playlist": "قائمة التشغيل فارغة", "Empty playlist": "قائمة التشغيل فارغة",
"Not a 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": "الحقل المخفي \"رمز\" حقل مطلوب",
"Erroneous challenge": "تحدى غير صالح", "Erroneous challenge": "تحدي خاطئ",
"Erroneous token": وز غير صالح", "Erroneous token": مز مميز خاطئ",
"No such 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": "الأفريكانية",
"Albanian": "الألبانية", "Albanian": "الألبانية",
"Amharic": "الأمهرية", "Amharic": "الأمهرية",
"Arabic": "العربية", "Arabic": "العربية",
"Armenian": "الأرميني", "Armenian": "الأرمينية",
"Azerbaijani": "أذربيجان", "Azerbaijani": "أذربيجانية",
"Bangla": "البنغالية", "Bangla": "البنغالية",
"Basque": "الباسكي", "Basque": "الباسكية",
"Belarusian": "البيلاروسية", "Belarusian": "البيلاروسية",
"Bosnian": "البوسنية", "Bosnian": "البوسنية",
"Bulgarian": "البلغارية", "Bulgarian": "البلغارية",
@ -334,41 +295,13 @@
"Yiddish": "اليديشية", "Yiddish": "اليديشية",
"Yoruba": "اليوروبا", "Yoruba": "اليوروبا",
"Zulu": "الزولو", "Zulu": "الزولو",
"`x` years": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` سنوات",
"": "`x` سنوات"
},
"`x` months": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` شهور",
"": "`x` شهور"
},
"`x` weeks": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` اسابيع",
"": "`x` اسابيع"
},
"`x` days": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` ايام",
"": "`x` ايام"
},
"`x` hours": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` ساعات",
"": "`x` ساعات"
},
"`x` minutes": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` دقائق",
"": "`x` دقائق"
},
"`x` seconds": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` ثوانى",
"": "`x` ثوانى"
},
"Fallback comments: ": "التعليقات البديلة: ", "Fallback comments: ": "التعليقات البديلة: ",
"Popular": "الأكثر شعبية", "Popular": "الأكثر شعبية",
"Search": "", "Search": "بحث",
"Top": "الأفضل", "Top": "الأفضل",
"About": "حول", "About": "حول",
"Rating: ": "التقييم: ", "Rating: ": "التقييم: ",
"Language: ": "اللغة: ", "preferences_locale_label": "اللغة: ",
"View as playlist": "عرض كا قائمة التشغيل", "View as playlist": "عرض كا قائمة التشغيل",
"Default": "الكل", "Default": "الكل",
"Music": "الاغانى", "Music": "الاغانى",
@ -376,43 +309,260 @@
"News": "الأخبار", "News": "الأخبار",
"Movies": "الأفلام", "Movies": "الأفلام",
"Download": "نزّل", "Download": "نزّل",
"Download as: ": "نزّله كـ: ", "Download as: ": "نزله كـ: ",
"%A %B %-d, %Y": "%A %-d %B %Y", "%A %B %-d, %Y": "%A %-d %B %Y",
"(edited)": "(تم تعديلة)", "(edited)": "(معدّل)",
"YouTube comment permalink": "رابط التعليق على اليوتيوب", "YouTube comment permalink": "رابط التعليق على اليوتيوب",
"permalink": "الرابط", "permalink": "الرابط",
"`x` marked it with a ❤": "`x` اعجب بهذا", "`x` marked it with a ❤": "`x` أعجب بهذا",
"Audio mode": "الوضع الصوتى", "Audio mode": "الوضع الصوتي",
"Video mode": "وضع الفيديو", "Video mode": "وضع الفيديو",
"Videos": "الفيديوهات", "channel_tab_videos_label": "الفيديوهات",
"Playlists": "قوائم التشغيل", "Playlists": "قوائم التشغيل",
"Community": "المجتمع", "channel_tab_community_label": "المجتمع",
"relevance": "", "search_filters_sort_option_relevance": "ملائمة",
"rating": "", "search_filters_sort_option_rating": "تقييم",
"date": "", "search_filters_sort_option_date": "التاريخ",
"views": "", "search_filters_sort_option_views": "مشاهدات",
"content_type": "", "search_filters_type_label": "نوع المحتوى",
"duration": "", "search_filters_duration_label": "المدة",
"features": "", "search_filters_features_label": "الميزات",
"sort": "", "search_filters_sort_label": "فرز",
"hour": "", "search_filters_date_option_hour": "آخر ساعة",
"today": "", "search_filters_date_option_today": "اليوم",
"week": "", "search_filters_date_option_week": "هذا الأسبوع",
"month": "", "search_filters_date_option_month": "هذا الشهر",
"year": "", "search_filters_date_option_year": "هذه السنة",
"video": "", "search_filters_type_option_video": "فيديو",
"channel": "", "search_filters_type_option_channel": "قناة",
"playlist": "", "search_filters_type_option_playlist": "قائمة التشغيل",
"movie": "", "search_filters_type_option_movie": "فيلم",
"show": "", "search_filters_type_option_show": "عرض",
"hd": "", "search_filters_features_option_hd": "عالية الدقة",
"subtitles": "", "search_filters_features_option_subtitles": "ترجمات",
"creative_commons": "", "search_filters_features_option_c_commons": "المشاع الإبداعي",
"3d": "", "search_filters_features_option_three_d": "ثلاثي الأبعاد",
"live": "", "search_filters_features_option_live": "مباشر",
"4k": "", "search_filters_features_option_four_k": "4K",
"location": "", "search_filters_features_option_location": "المكان",
"hdr": "", "search_filters_features_option_hdr": "وضع التباين العالي",
"filter": "", "Current version: ": "الإصدار الحالي: ",
"Current version: ": "الإصدار الحالي: " "next_steps_error_message": "بعد ذلك يجب أن تحاول: ",
"next_steps_error_message_refresh": "تحديث",
"next_steps_error_message_go_to_youtube": "انتقل إلى يوتيوب",
"search_filters_duration_option_short": "قصير (< 4 دقائق)",
"search_filters_duration_option_long": "طويل (> 20 دقيقة)",
"footer_source_code": "الكود المصدر",
"footer_original_source_code": "الكود المصدر الأصلي",
"footer_modfied_source_code": "الكود المصدر المعدل",
"adminprefs_modified_source_code_url_label": "URL إلى مستودع الكود المصدر المعدل",
"footer_documentation": "التوثيق",
"footer_donate_page": "تبرّع",
"preferences_region_label": "بلد المحتوى: ",
"preferences_quality_dash_label": "جودة فيديو DASH المفضلة: ",
"preferences_quality_option_dash": "DASH (الجودة التلقائية)",
"preferences_quality_option_hd720": "HD720",
"preferences_quality_option_medium": "متوسطة",
"preferences_quality_option_small": "صغيرة",
"preferences_quality_dash_option_auto": "تلقائي",
"preferences_quality_dash_option_best": "الأفضل",
"preferences_quality_dash_option_worst": "أسوأ",
"preferences_quality_dash_option_4320p": "4320p",
"preferences_quality_dash_option_2160p": "2160p",
"preferences_quality_dash_option_1440p": "1440p",
"preferences_quality_dash_option_1080p": "1080p",
"preferences_quality_dash_option_720p": "720p",
"preferences_quality_dash_option_480p": "480p",
"preferences_quality_dash_option_360p": "360p",
"preferences_quality_dash_option_240p": "240p",
"preferences_quality_dash_option_144p": "144p",
"search_filters_features_option_purchased": "تم شراؤها",
"none": "لاشيء",
"videoinfo_started_streaming_x_ago": "بدأ البث منذ `x`",
"videoinfo_watch_on_youTube": "مشاهدة على يوتيوب",
"videoinfo_youTube_embed_link": "مضمن",
"videoinfo_invidious_embed_link": "رابط مضمن",
"user_created_playlists": "`x` إنشاء قوائم التشغيل",
"user_saved_playlists": "قوائم التشغيل المحفوظة `x`",
"Video unavailable": "الفيديو غير متوفر",
"search_filters_features_option_three_sixty": "360°",
"download_subtitles": "ترجمات - `x` (.vtt)",
"invidious": "الخيالي",
"preferences_save_player_pos_label": "حفظ موضع التشغيل: ",
"crash_page_you_found_a_bug": "يبدو أنك قد وجدت خطأً برمجيًّا في Invidious!",
"generic_videos_count_0": "لا يوجد فيديوهات",
"generic_videos_count_1": "فيديو واحد",
"generic_videos_count_2": "فيديوهين",
"generic_videos_count_3": "{{count}} فيديوهات",
"generic_videos_count_4": "{{count}} فيديو",
"generic_videos_count_5": "{{count}} فيديو",
"generic_subscribers_count_0": "لا يوجد مشترك",
"generic_subscribers_count_1": "مشترك واحد",
"generic_subscribers_count_2": "مشتركان",
"generic_subscribers_count_3": "{{count}} مشتركين",
"generic_subscribers_count_4": "{{count}} مشترك",
"generic_subscribers_count_5": "{{count}} مشترك",
"generic_views_count_0": "لا يوجد مشاهدة",
"generic_views_count_1": "مشاهدة واحدة",
"generic_views_count_2": "مشاهدتان",
"generic_views_count_3": "{{count}} مشاهدات",
"generic_views_count_4": "{{count}} مشاهدة",
"generic_views_count_5": "{{count}} مشاهدة",
"generic_subscriptions_count_0": "لا يوجد اشتراك",
"generic_subscriptions_count_1": "اشتراك واحد",
"generic_subscriptions_count_2": "اشتراكان",
"generic_subscriptions_count_3": "{{count}} اشتراكات",
"generic_subscriptions_count_4": "{{count}} اشتراك",
"generic_subscriptions_count_5": "{{count}} اشتراك",
"generic_playlists_count_0": "لا يوجد قوائم تشغيل",
"generic_playlists_count_1": "قائمة تشغيل واحدة",
"generic_playlists_count_2": "قائمتا تشغيل",
"generic_playlists_count_3": "{{count}} قوائم تشغيل",
"generic_playlists_count_4": "{{count}} قائمة تشغيل",
"generic_playlists_count_5": "{{count}} قائمة تشغيل",
"English (United States)": "الإنجليزية (الولايات المتحدة)",
"Indonesian (auto-generated)": "إندونيسي (مُنشأ تلقائيًا)",
"Interlingue": "إنترلينغوي",
"Italian (auto-generated)": "الإيطالية (مُنشأة تلقائيًا)",
"Spanish (auto-generated)": "الأسبانية (تم إنشاؤه تلقائيًا)",
"crash_page_before_reporting": "قبل الإبلاغ عن خطأ، تأكد من وجود:",
"French (auto-generated)": "الفرنسية (مُنشأة تلقائيًا)",
"Portuguese (auto-generated)": "البرتغالية (تم إنشاؤه تلقائيًا)",
"Turkish (auto-generated)": "التركية (تم إنشاؤها تلقائيًا)",
"crash_page_refresh": "حاول <a href=\"`x`\"> تحديث الصفحة </a>",
"crash_page_switch_instance": "حاول <a href=\"`x`\"> استخدام مثيل آخر </a>",
"Korean (auto-generated)": "كوري (تم إنشاؤه تلقائيًا)",
"Spanish (Mexico)": "الإسبانية (المكسيك)",
"Vietnamese (auto-generated)": "فيتنامي (تم إنشاؤه تلقائيًا)",
"crash_page_report_issue": "إذا لم يساعد أي مما سبق، يرجى فتح <a href=\"`x`\"> مشكلة جديدة على GitHub </a> (ويفضل أن يكون باللغة الإنجليزية) وتضمين النص التالي في رسالتك (لا تترجم هذا النص):",
"crash_page_read_the_faq": "قراءة <a href=\"`x`\"> الأسئلة المتكررة (الأسئلة الشائعة) </a>",
"preferences_watch_history_label": "تمكين سجل المشاهدة: ",
"English (United Kingdom)": "الإنجليزية (المملكة المتحدة)",
"Cantonese (Hong Kong)": "الكانتونية (هونغ كونغ)",
"Chinese": "الصينية",
"Chinese (China)": "الصينية (الصين)",
"Chinese (Hong Kong)": "الصينية (هونج كونج)",
"Chinese (Taiwan)": "الصينية (تايوان)",
"Dutch (auto-generated)": "هولندي (تم إنشاؤه تلقائيًا)",
"German (auto-generated)": "ألماني (تم إنشاؤه تلقائيًا)",
"Japanese (auto-generated)": "اليابانية (مُنشأة تلقائيًا)",
"Portuguese (Brazil)": "البرتغالية (البرازيل)",
"Russian (auto-generated)": "الروسية (منشأة تلقائيا)",
"Spanish (Spain)": "الإسبانية (إسبانيا)",
"crash_page_search_issue": "بحثت عن <a href=\"`x`\"> المشكلات الموجودة على GitHub </a>",
"search_filters_title": "معامل الفرز",
"search_message_no_results": "لا توجد نتائج.",
"search_message_change_filters_or_query": "حاول توسيع استعلام البحث و / أو تغيير عوامل التصفية.",
"search_filters_date_label": "تاريخ الرفع",
"generic_count_weeks_0": "{{count}} أسبوع",
"generic_count_weeks_1": "أسبوع واحد",
"generic_count_weeks_2": "أسبوعين",
"generic_count_weeks_3": "{{count}} أسابيع",
"generic_count_weeks_4": "{{count}} أسبوع",
"generic_count_weeks_5": "{{count}} أسبوع",
"Popular enabled: ": "تم تمكين الشعبية: ",
"search_filters_duration_option_medium": "متوسط (4-20 دقيقة)",
"search_filters_date_option_none": "أي تاريخ",
"search_filters_type_option_all": "أي نوع",
"search_filters_features_option_vr180": "VR180",
"generic_count_minutes_0": "{{count}} دقيقة",
"generic_count_minutes_1": "دقيقة واحدة",
"generic_count_minutes_2": "دقيقتين",
"generic_count_minutes_3": "{{count}} دقائق",
"generic_count_minutes_4": "{{count}} دقيقة",
"generic_count_minutes_5": "{{count}} دقيقة",
"generic_count_hours_0": "{{count}} ساعة",
"generic_count_hours_1": "ساعة واحدة",
"generic_count_hours_2": "ساعتين",
"generic_count_hours_3": "{{count}} ساعات",
"generic_count_hours_4": "{{count}} ساعة",
"generic_count_hours_5": "{{count}} ساعة",
"comments_view_x_replies_0": "عرض رد {{count}}",
"comments_view_x_replies_1": "عرض رد {{count}}",
"comments_view_x_replies_2": "عرض رد {{count}}",
"comments_view_x_replies_3": "عرض رد {{count}}",
"comments_view_x_replies_4": "عرض الردود {{count}}",
"comments_view_x_replies_5": "عرض رد {{count}}",
"search_message_use_another_instance": "يمكنك أيضًا البحث عن <a href=\"`x`\"> في مثيل آخر </a>.",
"comments_points_count_0": "{{count}} نقطة",
"comments_points_count_1": "نقطة واحدة",
"comments_points_count_2": "نقطتان",
"comments_points_count_3": "{{count}} نقط",
"comments_points_count_4": "{{count}} نقطة",
"comments_points_count_5": "{{count}} نقطة",
"generic_count_years_0": "{{count}} السنة",
"generic_count_years_1": "{{count}} السنة",
"generic_count_years_2": "{{count}} السنة",
"generic_count_years_3": "{{count}} السنة",
"generic_count_years_4": "{{count}} سنوات",
"generic_count_years_5": "{{count}} السنة",
"tokens_count_0": "الرمز المميز {{count}}",
"tokens_count_1": "الرمز المميز {{count}}",
"tokens_count_2": "الرمز المميز {{count}}",
"tokens_count_3": "الرمز المميز {{count}}",
"tokens_count_4": "الرموز المميزة {{count}}",
"tokens_count_5": "الرمز المميز {{count}}",
"search_filters_apply_button": "تطبيق الفلاتر المحددة",
"search_filters_duration_option_none": "أي مدة",
"subscriptions_unseen_notifs_count_0": "{{count}} إشعار جديد",
"subscriptions_unseen_notifs_count_1": "إشعار واحد جديد",
"subscriptions_unseen_notifs_count_2": "إشعارين جديدين",
"subscriptions_unseen_notifs_count_3": "{{count}} إشعارات جديدة",
"subscriptions_unseen_notifs_count_4": "{{count}} إشعارا جديد",
"subscriptions_unseen_notifs_count_5": "{{count}} إشعار جديد",
"generic_count_days_0": "{{count}} يوم",
"generic_count_days_1": "يوم واحد",
"generic_count_days_2": "يومين",
"generic_count_days_3": "{{count}} أيام",
"generic_count_days_4": "{{count}} يوم",
"generic_count_days_5": "{{count}} يوم",
"generic_count_months_0": "{{count}} شهر",
"generic_count_months_1": "{{count}} شهر",
"generic_count_months_2": "{{count}} شهر",
"generic_count_months_3": "{{count}} شهر",
"generic_count_months_4": "{{count}} شهور",
"generic_count_months_5": "{{count}} شهر",
"generic_count_seconds_0": "{{count}} ثانية",
"generic_count_seconds_1": "ثانية واحدة",
"generic_count_seconds_2": "ثانيتين",
"generic_count_seconds_3": "{{count}} ثوانٍ",
"generic_count_seconds_4": "{{count}} ثانية",
"generic_count_seconds_5": "{{count}} ثانية",
"error_video_not_in_playlist": "الفيديو المطلوب غير موجود في قائمة التشغيل هذه. <a href=\"`x`\"> انقر هنا للحصول على الصفحة الرئيسية لقائمة التشغيل. </a>",
"channel_tab_shorts_label": "الفيديوهات القصيرة",
"channel_tab_streams_label": "البث المباشر",
"channel_tab_playlists_label": "قوائم التشغيل",
"channel_tab_channels_label": "القنوات",
"Music in this video": "الموسيقى في هذا الفيديو",
"Album: ": "الألبوم: ",
"Artist: ": "الفنان: ",
"Song: ": "أغنية: ",
"Channel Sponsor": "راعي القناة",
"Standard YouTube license": "ترخيص YouTube القياسي",
"Download is disabled": "تم تعطيل التحميلات",
"Import YouTube playlist (.csv)": "استيراد قائمة تشغيل YouTube (.csv)",
"generic_button_save": "حفظ",
"generic_button_delete": "حذف",
"generic_button_edit": "تحرير",
"generic_button_cancel": "الغاء",
"generic_button_rss": "RSS",
"channel_tab_releases_label": "الإصدارات",
"playlist_button_add_items": "إضافة مقاطع فيديو",
"channel_tab_podcasts_label": "البودكاست",
"generic_channels_count_0": "{{count}} قناة",
"generic_channels_count_1": "{{count}} قناة",
"generic_channels_count_2": "{{count}} قناتان",
"generic_channels_count_3": "{{count}} قنوات",
"generic_channels_count_4": "{{count}} قنوات",
"generic_channels_count_5": "{{count}} قناة",
"Import YouTube watch history (.json)": "استيراد سجل مشاهدة YouTube بصيغة (.json)",
"toggle_theme": "تبديل الموضوع",
"Add to playlist": "أضف إلى قائمة التشغيل",
"Add to playlist: ": "أضف إلى قائمة التشغيل: ",
"Answer": "الرد",
"Search for videos": "ابحث عن مقاطع الفيديو",
"The Popular feed has been disabled by the administrator.": "تم تعطيل الخلاصة الشائعة من قبل المسؤول.",
"carousel_slide": "الشريحة {{current}} من {{total}}",
"carousel_skip": "تخطي الكاروسيل",
"carousel_go_to": "انتقل إلى الشريحة `x`"
} }

1
locales/az.json Normal file
View File

@ -0,0 +1 @@
{}

1
locales/be.json Normal file
View File

@ -0,0 +1 @@
{}

497
locales/bg.json Normal file
View File

@ -0,0 +1,497 @@
{
"Korean (auto-generated)": "Корейски (автоматично генерирано)",
"search_filters_features_option_three_sixty": "360°",
"published - reverse": "публикувани - в обратен ред",
"preferences_quality_dash_option_worst": "Най-ниско качество",
"Password is a required field": "Парола е задължитело поле",
"channel_tab_podcasts_label": "Подкасти",
"Token is expired, please try again": "Токенът е изтекъл, моля опитайте отново",
"Turkish": "Турски",
"preferences_save_player_pos_label": "Запази позицията на плейъра: ",
"View Reddit comments": "Виж Reddit коментари",
"Export data as JSON": "Експортиране на Invidious информацията като JSON",
"About": "За сайта",
"Save preferences": "Запази промените",
"Load more": "Зареди още",
"Import/export": "Импортиране/експортиране",
"Albanian": "Албански",
"New password": "Нова парола",
"Southern Sotho": "Южен Сото",
"channel_tab_videos_label": "Видеа",
"Spanish (Mexico)": "Испански (Мексико)",
"preferences_player_style_label": "Стил на плейъра: ",
"preferences_region_label": "Държавата на съдържанието: ",
"Premieres in `x`": "Премиера в `x`",
"Watch history": "История на гледане",
"generic_subscriptions_count": "{{count}} абонамент",
"generic_subscriptions_count_plural": "{{count}} абонамента",
"preferences_continue_label": "Пускай следващото видео автоматично: ",
"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. Натисни тук за да видиш коментарите, но обърни внимание, че може да отнеме повече време да заредят.",
"Polish": "Полски",
"Icelandic": "Исландски",
"preferences_local_label": "Пускане на видеа през прокси: ",
"Hebrew": "Иврит",
"Fallback captions: ": "Резервни надписи: ",
"search_filters_title": "Филтри",
"search_filters_apply_button": "Приложете избрани филтри",
"Download is disabled": "Изтеглянето е деактивирано",
"User ID is a required field": "Потребителско име е задължително поле",
"comments_points_count": "{{count}} точка",
"comments_points_count_plural": "{{count}} точки",
"next_steps_error_message_go_to_youtube": "Отидеш в YouTube",
"preferences_quality_dash_option_2160p": "2160p",
"search_filters_type_option_video": "Видео",
"Spanish (Latin America)": "Испански (Латинска Америка)",
"Download as: ": "Изтегли като: ",
"Default": "По подразбиране",
"search_filters_sort_option_views": "Гледания",
"search_filters_features_option_four_k": "4K",
"Igbo": "Игбо",
"Subscriptions": "Абонаменти",
"German (auto-generated)": "Немски (автоматично генерирано)",
"`x` is live": "`x` е на живо",
"Azerbaijani": "Азербайджански",
"Premieres `x`": "Премиера `x`",
"Japanese (auto-generated)": "Японски (автоматично генерирано)",
"preferences_quality_option_medium": "Средно",
"footer_donate_page": "Даряване",
"Show replies": "Покажи отговорите",
"Esperanto": "Есперанто",
"search_message_change_filters_or_query": "Опитай да разшириш търсенето си и/или да смениш филтрите.",
"CAPTCHA enabled: ": "Активиране на CAPTCHA: ",
"View playlist on YouTube": "Виж плейлиста в YouTube",
"crash_page_before_reporting": "Преди докладването на бъг, бъди сигурен, че си:",
"Top enabled: ": "Активиране на страница с топ видеа: ",
"preferences_quality_dash_option_best": "Най-високо",
"search_filters_duration_label": "Продължителност",
"Slovak": "Словашки",
"Channel Sponsor": "Канален спонсор",
"generic_videos_count": "{{count}} видео",
"generic_videos_count_plural": "{{count}} видеа",
"videoinfo_started_streaming_x_ago": "Започна да излъчва преди `x`",
"videoinfo_youTube_embed_link": "Вграждане",
"channel_tab_streams_label": "Стриймове",
"oldest": "най-стари",
"playlist_button_add_items": "Добавяне на видеа",
"Import NewPipe data (.zip)": "Импортиране на NewPipe информация (.zip)",
"Clear watch history": "Изчистване на историята на гледане",
"generic_count_minutes": "{{count}} минута",
"generic_count_minutes_plural": "{{count}} минути",
"published": "публикувани",
"Show annotations": "Покажи анотации",
"Login enabled: ": "Активиране на впизване: ",
"Somali": "Сомалийски",
"YouTube comment permalink": "Постоянна връзка на коментарите на YouTube",
"Kurdish": "Кюрдски",
"search_filters_date_option_hour": "Последния час",
"Lao": "Лаоски",
"Maltese": "Малтийски",
"Register": "Регистрация",
"View channel on YouTube": "Виж канала в YouTube",
"Playlist privacy": "Поверителен плейлист",
"preferences_unseen_only_label": "Показвай само негледаните: ",
"Gujarati": "Гуджарати",
"Please log in": "Моля влезте",
"search_filters_sort_option_rating": "Рейтинг",
"Manage subscriptions": "Управление на абонаментите",
"preferences_quality_dash_option_720p": "720p",
"preferences_watch_history_label": "Активирай историята на гледане: ",
"user_saved_playlists": "`x` запази плейлисти",
"preferences_extend_desc_label": "Автоматично разшири описанието на видеото ",
"preferences_max_results_label": "Брой видеа показани на началната страница: ",
"Spanish (Spain)": "Испански (Испания)",
"invidious": "Invidious",
"crash_page_refresh": "пробвал да <a href=\"`x`\">опресниш страницата</a>",
"Image CAPTCHA": "CAPTCHA с Изображение",
"search_filters_features_option_hd": "HD",
"Chinese (Hong Kong)": "Китайски (Хонг Конг)",
"Import Invidious data": "Импортиране на Invidious JSON информацията",
"Blacklisted regions: ": "Неразрешени региони: ",
"Only show latest video from channel: ": "Показвай само най-новите видеа в канала: ",
"Hmong": "Хмонг",
"French": "Френски",
"search_filters_type_option_channel": "Канал",
"Artist: ": "Артист: ",
"generic_count_months": "{{count}} месец",
"generic_count_months_plural": "{{count}} месеца",
"preferences_annotations_subscribed_label": "Показвай анотаций по подразбиране за абонирани канали? ",
"search_message_use_another_instance": " Можеш също да <a href=\"`x`\">търсиш на друга инстанция</a>.",
"Danish": "Датски",
"generic_subscribers_count": "{{count}} абонат",
"generic_subscribers_count_plural": "{{count}} абоната",
"Galician": "Галисий",
"newest": "най-нови",
"Empty playlist": "Плейлиста е празен",
"download_subtitles": "Субритри - `x` (.vtt)",
"preferences_category_misc": "Различни предпочитания",
"Uzbek": "Узбекски",
"View JavaScript license information.": "Виж Javascript лиценза.",
"Filipino": "Филипински",
"Malagasy": "Мадагаскарски",
"generic_button_save": "Запиши",
"Dark mode: ": "Тъмен режим: ",
"Public": "Публичен",
"Basque": "Баскски",
"channel:`x`": "Канал:`x`",
"Armenian": "Арменски",
"This channel does not exist.": "Този канал не съществува.",
"Luxembourgish": "Люксембургски",
"preferences_related_videos_label": "Покажи подобни видеа: ",
"English": "Английски",
"Delete account": "Изтриване на акаунт",
"Gaming": "Игри",
"Video mode": "Видео режим",
"preferences_dark_mode_label": "Тема: ",
"crash_page_search_issue": "потърсил за <a href=\"`x`\">съществуващи проблеми в GitHub</a>",
"preferences_category_subscription": "Предпочитания за абонаменти",
"last": "най-скорощни",
"Chinese (Simplified)": "Китайски (Опростен)",
"Could not create mix.": "Създаването на микс е неуспешно.",
"generic_button_cancel": "Отказ",
"search_filters_type_option_movie": "Филм",
"search_filters_date_option_year": "Тази година",
"Swedish": "Шведски",
"Previous page": "Предишна страница",
"none": "нищо",
"popular": "най-популярни",
"Unsubscribe": "Отписване",
"Slovenian": "Словенски",
"Nepali": "Непалски",
"Time (h:mm:ss):": "Време (h:mm:ss):",
"English (auto-generated)": "Английски (автоматично генерирано)",
"search_filters_sort_label": "Сортирай по",
"View more comments on Reddit": "Виж повече коментари в Reddit",
"Sinhala": "Синхалски",
"preferences_feed_menu_label": "Меню с препоръки: ",
"preferences_autoplay_label": "Автоматично пускане: ",
"Pashto": "Пущунски",
"English (United States)": "Английски (САЩ)",
"Sign In": "Вход",
"subscriptions_unseen_notifs_count": "{{count}} невидяно известие",
"subscriptions_unseen_notifs_count_plural": "{{count}} невидяни известия",
"Log in": "Вход",
"Engagement: ": "Участие: ",
"Album: ": "Албум: ",
"preferences_speed_label": "Скорост по подразбиране: ",
"Import FreeTube subscriptions (.db)": "Импортиране на FreeTube абонаменти (.db)",
"preferences_quality_option_dash": "DASH (адаптивно качество)",
"preferences_show_nick_label": "Показвай потребителското име отгоре: ",
"Private": "Частен",
"Samoan": "Самоански",
"preferences_notifications_only_label": "Показвай само известията (ако има такива): ",
"Create playlist": "Създаване на плейлист",
"next_steps_error_message_refresh": "Опресниш",
"Top": "Топ",
"preferences_quality_dash_option_1080p": "1080p",
"Malayalam": "Малаялам",
"Token": "Токен",
"preferences_comments_label": "Коментари по подразбиране: ",
"Movies": "Филми",
"light": "светла",
"Unlisted": "Скрит",
"preferences_category_admin": "Администраторни предпочитания",
"Erroneous token": "Невалиден токен",
"No": "Не",
"CAPTCHA is a required field": "CAPTCHA е задължително поле",
"Video unavailable": "Неналично видео",
"footer_source_code": "Изходен код",
"New passwords must match": "Новите пароли трябва да съвпадат",
"Playlist does not exist.": "Плейлиста не съществува.",
"Export subscriptions as OPML (for NewPipe & FreeTube)": "Експортиране на абонаментите като OPML (за NewPipe и FreeTube)",
"search_filters_duration_option_short": "Кратко (< 4 минути)",
"search_filters_duration_option_long": "Дълго (> 20 минути)",
"tokens_count": "{{count}} токен",
"tokens_count_plural": "{{count}} токена",
"Yes": "Да",
"Dutch": "Холандски",
"Arabic": "Арабски",
"An alternative front-end to YouTube": "Алтернативен преден план на YouTube",
"View `x` comments": {
"([^.,0-9]|^)1([^.,0-9]|$)": "Виж `x` коментар",
"": "Виж `x` коментари"
},
"Chinese (China)": "Китайски (Китай)",
"Italian (auto-generated)": "Италиански (автоматично генерирано)",
"alphabetically - reverse": "обратно на азбучния ред",
"channel_tab_shorts_label": "Shorts",
"`x` marked it with a ❤": "`x` го маркира със ❤",
"Current version: ": "Текуща версия: ",
"channel_tab_community_label": "Общност",
"preferences_quality_dash_option_1440p": "1440p",
"preferences_quality_dash_option_360p": "360p",
"`x` uploaded a video": "`x` качи видео",
"Welsh": "Уелски",
"search_message_no_results": "Няма намерени резултати.",
"channel_tab_releases_label": "Версии",
"Bangla": "Бенгалски",
"preferences_quality_dash_option_144p": "144p",
"Indonesian": "Индонезийски",
"`x` ago": "преди `x`",
"Invidious Private Feed for `x`": "Invidious персонални видеа за `x`",
"Finnish": "Финландски",
"Amharic": "Амхарски",
"Malay": "Малайски",
"Interlingue": "Интерлинг",
"search_filters_date_option_month": "Този месец",
"Georgian": "Грузински",
"Xhosa": "Кхоса",
"Marathi": "Маратхи",
"Yoruba": "Йоруба",
"Song: ": "Музика: ",
"Scottish Gaelic": "Шотландски гелски",
"search_filters_features_label": "Функции",
"preferences_quality_label": "Предпочитано качество на видеото: ",
"generic_channels_count": "{{count}} канал",
"generic_channels_count_plural": "{{count}} канала",
"Croatian": "Хърватски",
"Thai": "Тайски",
"Chinese (Taiwan)": "Китайски (Тайван)",
"youtube": "YouTube",
"Source available here.": "Източник наличен тук.",
"LIVE": "На живо",
"Ukrainian": "Украински",
"Russian": "Руски",
"Tajik": "Таджикски",
"Token manager": "Управляване на токени",
"preferences_quality_dash_label": "Предпочитано DASH качество на видеото: ",
"adminprefs_modified_source_code_url_label": "URL до хранилището на променения изходен код",
"Japanese": "Японски",
"Title": "Заглавие",
"Authorize token for `x`?": "Разреши токена за `x`?",
"reddit": "Reddit",
"permalink": "постоянна връзка",
"Trending": "На върха",
"Turkish (auto-generated)": "Турски (автоматично генерирано)",
"Bulgarian": "Български",
"Indonesian (auto-generated)": "Индонезийски (автоматично генерирано)",
"Enable web notifications": "Активирай уеб известия",
"Western Frisian": "Западен фризски",
"search_filters_date_option_week": "Тази седмица",
"Yiddish": "Идиш",
"preferences_category_player": "Предпочитания за плейъра",
"Shared `x` ago": "Споделено преди `x`",
"Swahili": "Суахили",
"Portuguese (auto-generated)": "Португалски (автоматично генерирано)",
"generic_count_years": "{{count}} година",
"generic_count_years_plural": "{{count}} години",
"Wilson score: ": "Wilson оценка: ",
"Genre: ": "Жанр: ",
"videoinfo_invidious_embed_link": "Вграждане на линк",
"Popular enabled: ": "Активиране на популярната страница: ",
"Wrong username or password": "Грешно потребителско име или парола",
"Vietnamese": "Виетнамски",
"alphabetically": "по азбучен ред",
"Afrikaans": "Африкаанс",
"Zulu": "Зулуски",
"(edited)": "(редактирано)",
"Whitelisted regions: ": "Разрешени региони: ",
"Spanish (auto-generated)": "Испански (автоматично генерирано)",
"Could not fetch comments": "Получаването на коментарите е неуспешно",
"Sindhi": "Синдхи",
"News": "Новини",
"preferences_video_loop_label": "Винаги повтаряй: ",
"%A %B %-d, %Y": "%-d %B %Y, %A",
"preferences_quality_option_small": "Ниско",
"English (United Kingdom)": "Английски (Великобритания)",
"Rating: ": "Рейтинг: ",
"channel_tab_playlists_label": "Плейлисти",
"generic_button_edit": "Редактирай",
"Report statistics: ": "Активиране на статистики за репортиране: ",
"Cebuano": "Себуано",
"Chinese (Traditional)": "Китайски (Традиционен)",
"generic_playlists_count": "{{count}} плейлист",
"generic_playlists_count_plural": "{{count}} плейлиста",
"Import NewPipe subscriptions (.json)": "Импортиране на NewPipe абонаменти (.json)",
"Preferences": "Предпочитания",
"Subscribe": "Абониране",
"Import and Export Data": "Импортиране и експортиране на информация",
"preferences_quality_option_hd720": "HD720",
"search_filters_type_option_playlist": "Плейлист",
"Serbian": "Сръбски",
"Kazakh": "Казахски",
"Telugu": "Телугу",
"search_filters_features_option_purchased": "Купено",
"revoke": "отмяна",
"search_filters_sort_option_date": "Дата на качване",
"preferences_category_data": "Предпочитания за информацията",
"search_filters_date_option_none": "Всякаква дата",
"Log out": "Излизане",
"Search": "Търсене",
"preferences_quality_dash_option_auto": "Автоматично",
"dark": "тъмна",
"Cantonese (Hong Kong)": "Кантонски (Хонг Конг)",
"crash_page_report_issue": "Ако никои от горепосочените не помогнаха, моля <a href=\"`x`\">отворете нов проблем в GitHub</a> (предпочитано на Английски) и добавете следния текст в съобщението (НЕ превеждайте този текст):",
"Czech": "Чешки",
"crash_page_switch_instance": "пробвал да <a href=\"`x`\">ползваш друга инстанция</a>",
"generic_count_weeks": "{{count}} седмица",
"generic_count_weeks_plural": "{{count}} седмици",
"search_filters_features_option_subtitles": "Субтитри",
"videoinfo_watch_on_youTube": "Виж в YouTube",
"Portuguese": "Португалски",
"Music in this video": "Музика в това видео",
"Hide replies": "Скрий отговорите",
"Password cannot be longer than 55 characters": "Паролата не може да бъде по-дълга от 55 символа",
"footer_modfied_source_code": "Променен изходен код",
"Bosnian": "Босненски",
"Deleted or invalid channel": "Изтрит или невалиден канал",
"Popular": "Популярно",
"search_filters_type_label": "Тип",
"preferences_locale_label": "Език: ",
"Playlists": "Плейлисти",
"generic_button_rss": "RSS",
"Export": "Експортиране",
"preferences_quality_dash_option_4320p": "4320p",
"Erroneous challenge": "Невалиден тест",
"History": "История",
"generic_count_hours": "{{count}} час",
"generic_count_hours_plural": "{{count}} часа",
"Registration enabled: ": "Активиране на регистрация: ",
"Music": "Музика",
"Incorrect password": "Грешна парола",
"Persian": "Перскийски",
"Import": "Импортиране",
"Import/export data": "Импортиране/Експортиране на информация",
"Shared `x`": "Споделено `x`",
"Javanese": "Явански",
"French (auto-generated)": "Френски (автоматично генерирано)",
"Norwegian Bokmål": "Норвежки",
"Catalan": "Каталунски",
"Hindi": "Хинди",
"Tamil": "Тамилски",
"search_filters_features_option_live": "На живо",
"crash_page_read_the_faq": "прочел <a href=\"`x`\">Често задавани въпроси (FAQ)</a>",
"preferences_default_home_label": "Начална страница по подразбиране: ",
"Download": "Изтегляне",
"Show less": "Покажи по-малко",
"Password": "Парола",
"User ID": "Потребителско име",
"Subscription manager": "Управляване на абонаменти",
"search": "търсене",
"No such user": "Няма такъв потребител",
"View privacy policy.": "Виж политиката за поверителност.",
"Only show latest unwatched video from channel: ": "Показвай само най-новите негледани видеа в канала: ",
"user_created_playlists": "`x` създаде плейлисти",
"Editing playlist `x`": "Редактиране на плейлист `x`",
"preferences_thin_mode_label": "Тънък режим: ",
"E-mail": "Имейл",
"Haitian Creole": "Хаитянски креол",
"Irish": "Ирландски",
"channel_tab_channels_label": "Канали",
"Delete account?": "Изтрий акаунта?",
"Redirect homepage to feed: ": "Препращане на началната страница до препоръки ",
"Urdu": "Урду",
"preferences_vr_mode_label": "Интерактивни 360 градусови видеа (изисква WebGL): ",
"Password cannot be empty": "Паролата не може да бъде празна",
"Mongolian": "Монголски",
"Authorize token?": "Разреши токена?",
"search_filters_type_option_all": "Всякакъв тип",
"Romanian": "Румънски",
"Belarusian": "Беларуски",
"channel name - reverse": "име на канал - в обратен ред",
"Erroneous CAPTCHA": "Невалидна CAPTCHA",
"Watch on YouTube": "Гледай в YouTube",
"search_filters_features_option_location": "Местоположение",
"Could not pull trending pages.": "Получаването на трендинг страниците е неуспешно.",
"German": "Немски",
"search_filters_features_option_c_commons": "Creative Commons",
"Family friendly? ": "За всяка възраст? ",
"Hidden field \"token\" is a required field": "Скритото поле \"токен\" е задължително поле",
"Russian (auto-generated)": "Руски (автоматично генерирано)",
"preferences_quality_dash_option_480p": "480p",
"Corsican": "Корсикански",
"Macedonian": "Македонски",
"comments_view_x_replies": "Виж {{count}} отговор",
"comments_view_x_replies_plural": "Виж {{count}} отговора",
"footer_original_source_code": "Оригинален изходен код",
"Import YouTube subscriptions": "Импортиране на YouTube/OPML абонаменти",
"Lithuanian": "Литовски",
"Nyanja": "Нянджа",
"Updated `x` ago": "Актуализирано преди `x`",
"JavaScript license information": "Информация за Javascript лиценза",
"Spanish": "Испански",
"Latin": "Латински",
"Shona": "Шона",
"Portuguese (Brazil)": "Португалски (Бразилия)",
"Show more": "Покажи още",
"Clear watch history?": "Изчисти историята на търсене?",
"Manage tokens": "Управление на токени",
"Hausa": "Хауса",
"search_filters_features_option_vr180": "VR180",
"preferences_category_visual": "Визуални предпочитания",
"Italian": "Италиански",
"preferences_volume_label": "Сила на звука на плейъра: ",
"error_video_not_in_playlist": "Заявеното видео не съществува в този плейлист. <a href=\"`x`\">Натиснете тук за началната страница на плейлиста.</a>",
"preferences_listen_label": "Само звук по подразбиране: ",
"Dutch (auto-generated)": "Холандски (автоматично генерирано)",
"preferences_captions_label": "Надписи по подразбиране: ",
"generic_count_days": "{{count}} ден",
"generic_count_days_plural": "{{count}} дни",
"Hawaiian": "Хавайски",
"Could not get channel info.": "Получаването на информация за канала е неуспешно.",
"View as playlist": "Виж като плейлист",
"Vietnamese (auto-generated)": "Виетнамски (автоматично генерирано)",
"search_filters_duration_option_none": "Всякаква продължителност",
"preferences_quality_dash_option_240p": "240p",
"Latvian": "Латвийски",
"search_filters_features_option_hdr": "HDR",
"preferences_sort_label": "Сортирай видеата по: ",
"Estonian": "Естонски",
"Hidden field \"challenge\" is a required field": "Скритото поле \"тест\" е задължително поле",
"footer_documentation": "Документация",
"Kyrgyz": "Киргизски",
"preferences_continue_autoplay_label": "Пускай следващотото видео автоматично: ",
"Chinese": "Китайски",
"search_filters_sort_option_relevance": "Уместност",
"source": "източник",
"Fallback comments: ": "Резервни коментари: ",
"preferences_automatic_instance_redirect_label": "Автоматично препращане на инстанция (чрез redirect.invidious.io): ",
"Maori": "Маори",
"generic_button_delete": "Изтрий",
"Import YouTube playlist (.csv)": "Импортиране на YouTube плейлист (.csv)",
"Switch Invidious Instance": "Смени Invidious инстанция",
"channel name": "име на канал",
"Audio mode": "Аудио режим",
"search_filters_type_option_show": "Сериал",
"search_filters_date_option_today": "Днес",
"search_filters_features_option_three_d": "3D",
"next_steps_error_message": "След което можеш да пробваш да: ",
"Hide annotations": "Скрий анотации",
"Standard YouTube license": "Стандартен YouTube лиценз",
"Text CAPTCHA": "Текст CAPTCHA",
"Log in/register": "Вход/регистрация",
"Punjabi": "Пенджаби",
"Change password": "Смяна на паролата",
"License: ": "Лиценз: ",
"search_filters_duration_option_medium": "Средно (4 - 20 минути)",
"Delete playlist": "Изтриване на плейлист",
"Delete playlist `x`?": "Изтрий плейлиста `x`?",
"Korean": "Корейски",
"Export subscriptions as OPML": "Експортиране на абонаментите като OPML",
"unsubscribe": "отписване",
"View YouTube comments": "Виж YouTube коментарите",
"Kannada": "Каннада",
"Not a playlist.": "Невалиден плейлист.",
"Wrong answer": "Грешен отговор",
"Released under the AGPLv3 on Github.": "Публикувано под AGPLv3 в GitHub.",
"Burmese": "Бирмански",
"Sundanese": "Сундански",
"Hungarian": "Унгарски",
"generic_count_seconds": "{{count}} секунда",
"generic_count_seconds_plural": "{{count}} секунди",
"search_filters_date_label": "Дата на качване",
"Greek": "Гръцки",
"crash_page_you_found_a_bug": "Изглежда намери бъг в Invidious!",
"View all playlists": "Виж всички плейлисти",
"Khmer": "Кхмерски",
"preferences_annotations_label": "Покажи анотаций по подразбиране: ",
"generic_views_count": "{{count}} гледане",
"generic_views_count_plural": "{{count}} гледания",
"Next page": "Следваща страница",
"Import YouTube watch history (.json)": "Импортиране на историята на гледане от YouTube (.json)",
"toggle_theme": "Смени темата",
"Add to playlist": "Добави към плейлист",
"Add to playlist: ": "Добави към плейлист: ",
"Answer": "Отговор",
"Search for videos": "Търсене на видеа",
"The Popular feed has been disabled by the administrator.": "Популярната страница е деактивирана от администратора."
}

96
locales/bn.json Normal file
View File

@ -0,0 +1,96 @@
{
"Subscribe": "সাবস্ক্রাইব",
"View channel on YouTube": "ইউটিউবে চ্যানেল দেখুন",
"View playlist on YouTube": "ইউটিউবে প্লেলিস্ট দেখুন",
"newest": "সর্ব-নতুন",
"oldest": "পুরানতম",
"popular": "জনপ্রিয়",
"last": "শেষটা",
"Next page": "পরের পৃষ্ঠা",
"Previous page": "আগের পৃষ্ঠা",
"Clear watch history?": "দেখার ইতিহাস সাফ করবেন?",
"New password": "নতুন পাসওয়ার্ড",
"New passwords must match": "নতুন পাসওয়ার্ড অবশ্যই মিলতে হবে",
"Authorize token?": "টোকেন অনুমোদন করবেন?",
"Authorize token for `x`?": "`x` -এর জন্য টোকেন অনুমোদন?",
"Yes": "হ্যাঁ",
"No": "না",
"Import and Export Data": "তথ্য আমদানি ও রপ্তানি",
"Import": "আমদানি",
"Import Invidious data": "ইনভিডিয়াস তথ্য আমদানি",
"Import YouTube subscriptions": "ইউটিউব সাবস্ক্রিপশন আনুন",
"Import FreeTube subscriptions (.db)": "ফ্রিটিউব সাবস্ক্রিপশন (.db) আনুন",
"Import NewPipe subscriptions (.json)": "নতুন পাইপ সাবস্ক্রিপশন আনুন (.json)",
"Import NewPipe data (.zip)": "নিউপাইপ তথ্য আনুন (.zip)",
"Export": "তথ্য বের করুন",
"Export subscriptions as OPML": "সাবস্ক্রিপশন OPML হিসাবে আনুন",
"Export subscriptions as OPML (for NewPipe & FreeTube)": "OPML-এ সাবস্ক্রিপশন বের করুন(নিউ পাইপ এবং ফ্রিউটিউব এর জন্য)",
"Export data as JSON": "JSON হিসাবে তথ্য বের করুন",
"Delete account?": "অ্যাকাউন্ট মুছে ফেলবেন?",
"History": "ইতিহাস",
"An alternative front-end to YouTube": "ইউটিউবের একটি বিকল্পস্বরূপ সম্মুখ-প্রান্ত",
"JavaScript license information": "জাভাস্ক্রিপ্ট লাইসেন্সের তথ্য",
"source": "সূত্র",
"Log in": "লগ ইন",
"Log in/register": "লগ ইন/রেজিস্টার",
"User ID": "ইউজার আইডি",
"Password": "পাসওয়ার্ড",
"Time (h:mm:ss):": "সময় (ঘণ্টা:মিনিট:সেকেন্ড):",
"Text CAPTCHA": "টেক্সট ক্যাপচা",
"Image CAPTCHA": "চিত্র ক্যাপচা",
"Sign In": "সাইন ইন",
"Register": "নিবন্ধন",
"E-mail": "ই-মেইল",
"Preferences": "পছন্দসমূহ",
"preferences_category_player": "প্লেয়ারের পছন্দসমূহ",
"preferences_video_loop_label": "সর্বদা লুপ: ",
"preferences_autoplay_label": "স্বয়ংক্রিয় চালু: ",
"preferences_continue_label": "ডিফল্টভাবে পরবর্তী চালাও: ",
"preferences_continue_autoplay_label": "পরবর্তী ভিডিও স্বয়ংক্রিয়ভাবে চালাও: ",
"preferences_listen_label": "সহজাতভাবে শোনো: ",
"preferences_local_label": "ভিডিও প্রক্সি করো: ",
"preferences_speed_label": "সহজাত গতি: ",
"preferences_quality_label": "পছন্দের ভিডিও মান: ",
"preferences_volume_label": "প্লেয়ার শব্দের মাত্রা: ",
"LIVE": "লাইভ",
"Shared `x` ago": "`x` আগে শেয়ার করা হয়েছে",
"Unsubscribe": "আনসাবস্ক্রাইব",
"generic_views_count": "{{count}}জন দেখেছে",
"generic_views_count_plural": "{{count}}জন দেখেছে",
"generic_videos_count": "{{count}}টি ভিডিও",
"generic_videos_count_plural": "{{count}}টি ভিডিও",
"generic_subscribers_count": "{{count}}জন অনুসরণকারী",
"generic_subscribers_count_plural": "{{count}}জন অনুসরণকারী",
"preferences_watch_history_label": "দেখার ইতিহাস চালু করো: ",
"preferences_quality_option_dash": "ড্যাশ (সময়োপযোগী মান)",
"preferences_quality_dash_option_auto": "স্বয়ংক্রিয়",
"preferences_quality_dash_option_best": "সেরা",
"preferences_quality_dash_option_worst": "মন্দতম",
"preferences_quality_dash_option_4320p": "৪৩২০পি",
"preferences_quality_dash_option_2160p": "২১৬০পি",
"preferences_quality_dash_option_1440p": "১৪৪০পি",
"preferences_quality_dash_option_480p": "৪৮০পি",
"preferences_quality_dash_option_360p": "৩৬০পি",
"preferences_quality_dash_option_240p": "২৪০পি",
"preferences_quality_dash_option_144p": "১৪৪পি",
"preferences_comments_label": "সহজাত মন্তব্য: ",
"youtube": "ইউটিউব",
"Fallback captions: ": "বিকল্প উপাখ্যান: ",
"preferences_related_videos_label": "সম্পর্কিত ভিডিও দেখাও: ",
"preferences_annotations_label": "সহজাতভাবে টীকা দেখাও ",
"preferences_quality_option_hd720": "উচ্চ৭২০",
"preferences_quality_dash_label": "পছন্দের ড্যাশ ভিডিও মান: ",
"preferences_captions_label": "সহজাত উপাখ্যান: ",
"generic_playlists_count": "{{count}}টি চালুতালিকা",
"generic_playlists_count_plural": "{{count}}টি চালুতালিকা",
"reddit": "রেডিট",
"invidious": "ইনভিডিয়াস",
"generic_subscriptions_count": "{{count}}টি অনুসরণ",
"generic_subscriptions_count_plural": "{{count}}টি অনুসরণ",
"preferences_quality_option_medium": "মধ্যম",
"preferences_quality_option_small": "ছোট",
"preferences_quality_dash_option_1080p": "১০৮০পি",
"preferences_quality_dash_option_720p": "৭২০পি",
"Add to playlist": "প্লেলিস্টে যোগ করুন",
"Add to playlist: ": "প্লেলিস্টে যোগ করুন: "
}

View File

@ -1,10 +1,4 @@
{ {
"`x` subscribers.([^.,0-9]|^)1([^.,0-9]|$)": "`x` সাবস্ক্রাইবার।([^.,0-9]|^)1([^.,0-9]|$)",
"`x` subscribers.": "`x` সাবস্ক্রাইবার।",
"`x` videos.([^.,0-9]|^)1([^.,0-9]|$)": "`x` ভিডিও।([^.,0-9]|^)1([^.,0-9]|$)",
"`x` videos.": "`x` ভিডিও।",
"`x` playlists.([^.,0-9]|^)1([^.,0-9]|$)": "`x` প্লেলিস্ট।[^.,0-9]|^)1([^.,0-9]|$)",
"`x` playlists.": "`x` প্লেলিস্ট।",
"LIVE": "লাইভ", "LIVE": "লাইভ",
"Shared `x` ago": "`x` আগে শেয়ার করা হয়েছে", "Shared `x` ago": "`x` আগে শেয়ার করা হয়েছে",
"Unsubscribe": "আনসাবস্ক্রাইব", "Unsubscribe": "আনসাবস্ক্রাইব",
@ -20,7 +14,6 @@
"Clear watch history?": "দেখার ইতিহাস সাফ করবেন?", "Clear watch history?": "দেখার ইতিহাস সাফ করবেন?",
"New password": "নতুন পাসওয়ার্ড", "New password": "নতুন পাসওয়ার্ড",
"New passwords must match": "নতুন পাসওয়ার্ড অবশ্যই মিলতে হবে", "New passwords must match": "নতুন পাসওয়ার্ড অবশ্যই মিলতে হবে",
"Cannot change password for Google accounts": "গুগল অ্যাকাউন্টগুলোর জন্য পাসওয়ার্ড পরিবর্তন করা যায় না",
"Authorize token?": "টোকেন অনুমোদন করবেন?", "Authorize token?": "টোকেন অনুমোদন করবেন?",
"Authorize token for `x`?": "`x` -এর জন্য টোকেন অনুমোদন?", "Authorize token for `x`?": "`x` -এর জন্য টোকেন অনুমোদন?",
"Yes": "হ্যাঁ", "Yes": "হ্যাঁ",
@ -43,7 +36,6 @@
"source": "সূত্র", "source": "সূত্র",
"Log in": "লগ ইন", "Log in": "লগ ইন",
"Log in/register": "লগ ইন/রেজিস্টার", "Log in/register": "লগ ইন/রেজিস্টার",
"Log in with Google": "গুগল দিয়ে লগ ইন করুন",
"User ID": "ইউজার আইডি", "User ID": "ইউজার আইডি",
"Password": "পাসওয়ার্ড", "Password": "পাসওয়ার্ড",
"Time (h:mm:ss):": "সময় (ঘণ্টা:মিনিট:সেকেন্ড):", "Time (h:mm:ss):": "সময় (ঘণ্টা:মিনিট:সেকেন্ড):",
@ -52,306 +44,15 @@
"Sign In": "সাইন ইন", "Sign In": "সাইন ইন",
"Register": "নিবন্ধন", "Register": "নিবন্ধন",
"E-mail": "ই-মেইল", "E-mail": "ই-মেইল",
"Google verification code": "গুগল যাচাইকরণ কোড",
"Preferences": "পছন্দসমূহ", "Preferences": "পছন্দসমূহ",
"Player preferences": "প্লেয়ারের পছন্দসমূহ", "preferences_category_player": "প্লেয়ারের পছন্দসমূহ",
"Always loop: ": "সর্বদা লুপ: ", "preferences_video_loop_label": "সর্বদা লুপ: ",
"Autoplay: ": "স্বয়ংক্রিয় চালু: ", "preferences_autoplay_label": "স্বয়ংক্রিয় চালু: ",
"Play next by default: ": "ডিফল্টভাবে পরবর্তী চালাও: ", "preferences_continue_label": "ডিফল্টভাবে পরবর্তী চালাও: ",
"Autoplay next video: ": "পরবর্তী ভিডিও স্বয়ংক্রিয়ভাবে চালাও: ", "preferences_continue_autoplay_label": "পরবর্তী ভিডিও স্বয়ংক্রিয়ভাবে চালাও: ",
"Listen by default: ": "সহজাতভাবে শোনো: ", "preferences_listen_label": "সহজাতভাবে শোনো: ",
"Proxy videos: ": "ভিডিও প্রক্সি করো: ", "preferences_local_label": "ভিডিও প্রক্সি করো: ",
"Default speed: ": "সহজাত গতি: ", "preferences_speed_label": "সহজাত গতি: ",
"Preferred video quality: ": "পছন্দের ভিডিও মান: ", "preferences_quality_label": "পছন্দের ভিডিও মান: ",
"Player volume: ": "প্লেয়ার শব্দের মাত্রা: ", "preferences_volume_label": "প্লেয়ার শব্দের মাত্রা: "
"Default comments: ": "",
"youtube": "",
"reddit": "",
"Default captions: ": "",
"Fallback captions: ": "",
"Show related videos: ": "",
"Show annotations by default: ": "",
"Automatically extend video description: ": "",
"Visual preferences": "",
"Player style: ": "",
"Dark mode: ": "",
"Theme: ": "",
"dark": "",
"light": "",
"Thin mode: ": "",
"Subscription preferences": "",
"Show annotations by default for subscribed channels: ": "",
"Redirect homepage to feed: ": "",
"Number of videos shown in feed: ": "",
"Sort videos by: ": "",
"published": "",
"published - reverse": "",
"alphabetically": "",
"alphabetically - reverse": "",
"channel name": "",
"channel name - reverse": "",
"Only show latest video from channel: ": "",
"Only show latest unwatched video from channel: ": "",
"Only show unwatched: ": "",
"Only show notifications (if there are any): ": "",
"Enable web notifications": "",
"`x` uploaded a video": "",
"`x` is live": "",
"Data preferences": "",
"Clear watch history": "",
"Import/export data": "",
"Change password": "",
"Manage subscriptions": "",
"Manage tokens": "",
"Watch history": "",
"Delete account": "",
"Administrator preferences": "",
"Default homepage: ": "",
"Feed menu: ": "",
"Top enabled: ": "",
"CAPTCHA enabled: ": "",
"Login enabled: ": "",
"Registration enabled: ": "",
"Report statistics: ": "",
"Save preferences": "",
"Subscription manager": "",
"Token manager": "",
"Token": "",
"`x` subscriptions.([^.,0-9]|^)1([^.,0-9]|$)": "",
"`x` subscriptions.": "",
"`x` tokens.([^.,0-9]|^)1([^.,0-9]|$)": "",
"`x` tokens.": "",
"Import/export": "",
"unsubscribe": "",
"revoke": "",
"Subscriptions": "",
"`x` unseen notifications.([^.,0-9]|^)1([^.,0-9]|$)": "",
"`x` unseen notifications.": "",
"search": "",
"Log out": "",
"Released under the AGPLv3 by Omar Roth.": "",
"Source available here.": "",
"View JavaScript license information.": "",
"View privacy policy.": "",
"Trending": "",
"Public": "",
"Unlisted": "",
"Private": "",
"View all playlists": "",
"Updated `x` ago": "",
"Delete playlist `x`?": "",
"Delete playlist": "",
"Create playlist": "",
"Title": "",
"Playlist privacy": "",
"Editing playlist `x`": "",
"Show more": "",
"Show less": "",
"Watch on YouTube": "",
"Hide annotations": "",
"Show annotations": "",
"Genre: ": "",
"License: ": "",
"Family friendly? ": "",
"Wilson score: ": "",
"Engagement: ": "",
"Whitelisted regions: ": "",
"Blacklisted regions: ": "",
"Shared `x`": "",
"`x` views.([^.,0-9]|^)1([^.,0-9]|$)": "",
"`x` views.": "",
"Premieres in `x`": "",
"Premieres `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 more comments on Reddit": "",
"View `x` comments.([^.,0-9]|^)1([^.,0-9]|$)": "",
"View `x` comments.": "",
"View Reddit comments": "",
"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": "",
"Password is a required field": "",
"Wrong username or password": "",
"Please sign in using 'Log in with Google'": "",
"Password cannot be empty": "",
"Password cannot be longer than 55 characters": "",
"Please log in": "",
"Invidious Private Feed for `x`": "",
"channel:`x`": "",
"Deleted or invalid channel": "",
"This channel does not exist.": "",
"Could not get channel info.": "",
"Could not fetch comments": "",
"View `x` replies.([^.,0-9]|^)1([^.,0-9]|$)": "",
"View `x` replies.": "",
"`x` ago": "",
"Load more": "",
"`x` points.([^.,0-9]|^)1([^.,0-9]|$)": "",
"`x` points.": "",
"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": "",
"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.([^.,0-9]|^)1([^.,0-9]|$)": "",
"`x` years.": "",
"`x` months.([^.,0-9]|^)1([^.,0-9]|$)": "",
"`x` months.": "",
"`x` weeks.([^.,0-9]|^)1([^.,0-9]|$)": "",
"`x` weeks.": "",
"`x` days.([^.,0-9]|^)1([^.,0-9]|$)": "",
"`x` days.": "",
"`x` hours.([^.,0-9]|^)1([^.,0-9]|$)": "",
"`x` hours.": "",
"`x` minutes.([^.,0-9]|^)1([^.,0-9]|$)": "",
"`x` minutes.": "",
"`x` seconds.([^.,0-9]|^)1([^.,0-9]|$)": "",
"`x` seconds.": "",
"Fallback comments: ": "",
"Popular": "",
"Search": "",
"Top": "",
"About": "",
"Rating: ": "",
"Language: ": "",
"View as playlist": "",
"Default": "",
"Music": "",
"Gaming": "",
"News": "",
"Movies": "",
"Download": "",
"Download as: ": "",
"%A %B %-d, %Y": "",
"(edited)": "",
"YouTube comment permalink": "",
"permalink": "",
"`x` marked it with a ❤": "",
"Audio mode": "",
"Video mode": "",
"Videos": "",
"Playlists": "",
"Community": "",
"Current version: ": ""
} }

493
locales/ca.json Normal file
View File

@ -0,0 +1,493 @@
{
"oldest": "més antic",
"Yes": "Sí",
"preferences_quality_label": "Qualitat de vídeo preferida: ",
"newest": "més nou",
"No": "No",
"User ID": "ID d'usuari",
"Preferences": "Preferències",
"Dark mode: ": "Mode fosc: ",
"dark": "fosc",
"light": "clar",
"published": "publicat",
"published - reverse": "publicat - invers",
"alphabetically": "alfabèticament",
"alphabetically - reverse": "alfabèticament - invers",
"channel name - reverse": "nom del canal - invers",
"preferences_category_data": "Preferències de dades",
"Delete account": "Elimina compte",
"Save preferences": "Guarda preferències",
"Private": "Privat",
"Show more": "Mostra'n més",
"Show less": "Mostra'n menys",
"Hide replies": "Amaga respostes",
"Arabic": "Àrab",
"Armenian": "Armeni",
"Basque": "Basc",
"Filipino": "Filipí",
"Finnish": "Finès",
"German": "Alemany",
"Greek": "Grec",
"Hungarian": "Hongarès",
"Icelandic": "Islandès",
"Italian": "Italià",
"Japanese": "Japonès",
"Korean": "Coreà",
"Kurdish": "Kurd",
"Lithuanian": "Lituà",
"Luxembourgish": "Luxemburguès",
"Macedonian": "Macedoni",
"Polish": "Polonès",
"Portuguese": "Portuguès",
"Romanian": "Romanès",
"Russian": "Rus",
"Serbian": "Serbi",
"Spanish (Latin America)": "Castellà (Amèrica llatina)",
"Turkish": "Turc",
"Ukrainian": "Ucraïnès",
"preferences_locale_label": "Idioma: ",
"Gaming": "Jocs",
"Movies": "Películes",
"Download": "Descarrega",
"Download as: ": "Descarrega com: ",
"channel_tab_videos_label": "Vídeos",
"search_filters_type_label": "Tipus",
"search_filters_duration_label": "Duració",
"search_filters_sort_label": "Ordena per",
"search_filters_date_option_week": "Aquesta setmana",
"search_filters_date_option_month": "Aquest mes",
"search_filters_date_option_year": "Aquest any",
"search_filters_type_option_video": "Vídeo",
"search_filters_type_option_channel": "Canal",
"search_filters_duration_option_short": "Curt (< 4 minuts)",
"search_filters_duration_option_long": "Llarg (> 20 minuts)",
"Current version: ": "Versió actual: ",
"Malay": "Malai",
"Persian": "Persa",
"Slovak": "Eslovac",
"Search": "Cerca",
"Show annotations": "Mostra anotacions",
"preferences_region_label": "País del contingut: ",
"preferences_sort_label": "Ordena vídeos per: ",
"Import/export": "Importa/exporta",
"channel name": "nom del canal",
"Title": "Títol",
"Belarusian": "Bielorús",
"Enable web notifications": "Activa notificacions web",
"search": "Cerca",
"Catalan": "Català",
"Croatian": "Croat",
"preferences_category_admin": "Preferències d'administrador",
"Hide annotations": "Amaga anotacions",
"Show replies": "Mostra respostes",
"Bulgarian": "Búlgar",
"Albanian": "Albanès",
"French": "Francès",
"Irish": "Irlandès",
"Maltese": "Maltès",
"Danish": "Danès",
"Galician": "Gallec",
"Hebrew": "Hebreu",
"Indonesian": "Indonesi",
"Spanish": "Castellà",
"Vietnamese": "Vietnamita",
"News": "Notícies",
"search_filters_type_option_show": "Mostra",
"footer_documentation": "Documentació",
"Thai": "Tailandès",
"Music": "Música",
"search_filters_sort_option_relevance": "Rellevància",
"search_filters_date_option_hour": "Última hora",
"search_filters_date_option_today": "Avui",
"preferences_volume_label": "Volum del reproductor: ",
"invidious": "Invidious",
"preferences_quality_dash_option_144p": "144p",
"Turkish (auto-generated)": "Turc (generat automàticament)",
"Urdu": "Urdú",
"Vietnamese (auto-generated)": "Vietnamita (generat automàticament)",
"Welsh": "Gal·lès",
"Yoruba": "Ioruba",
"YouTube comment permalink": "Enllaç permanent de comentari de YouTube",
"Channel Sponsor": "Patrocinador del canal",
"Audio mode": "Mode d'àudio",
"search_filters_date_option_none": "Qualsevol data",
"search_filters_type_option_playlist": "Llista de reproducció",
"search_filters_type_option_movie": "Pel·lícula",
"search_filters_features_option_four_k": "4K",
"search_filters_features_option_subtitles": "Subtítols/CC",
"search_filters_features_option_live": "Directe",
"search_filters_features_option_hd": "HD",
"search_filters_features_option_hdr": "HDR",
"search_filters_features_option_location": "Ubicació",
"search_filters_apply_button": "Aplica els filtres seleccionats",
"videoinfo_started_streaming_x_ago": "Ha començat el directe fa `x`",
"next_steps_error_message_go_to_youtube": "Vés a YouTube",
"footer_donate_page": "Feu un donatiu",
"footer_original_source_code": "Codi font original",
"videoinfo_watch_on_youTube": "Veure a YouTube",
"user_saved_playlists": "`x` llistes de reproducció guardades",
"adminprefs_modified_source_code_url_label": "URL al repositori de codi font modificat",
"none": "cap",
"footer_modfied_source_code": "Codi font modificat",
"videoinfo_invidious_embed_link": "Incrusta l'enllaç",
"download_subtitles": "Subtítols - `x` (.vtt)",
"user_created_playlists": "`x`llistes de reproducció creades",
"Video unavailable": "Vídeo no disponible",
"channel_tab_channels_label": "Canals",
"channel_tab_playlists_label": "Llistes de reproducció",
"channel_tab_community_label": "Comunitat",
"Czech": "Txec",
"Default": "Per defecte",
"Amharic": "Amàric",
"preferences_automatic_instance_redirect_label": "Redirecció automàtica d'instàncies (retorna a redirect.invidious.io): ",
"Login enabled: ": "Activa inici de sessió: ",
"Registration enabled: ": "Activa registre: ",
"Whitelisted regions: ": "Regions a la llista blanca: ",
"Chinese (Simplified)": "Xinès (Simplificat)",
"Corsican": "Cors",
"Estonian": "Estonià",
"Japanese (auto-generated)": "Japonès (generat automàticament)",
"English (United States)": "Anglès (Estats Units)",
"English (auto-generated)": "Anglès (generat automàticament)",
"Cebuano": "Cebuà",
"Esperanto": "Esperanto",
"Scottish Gaelic": "Gaèlic escocès",
"Playlists": "Llistes de reproducció",
"search_filters_title": "Filtres",
"search_filters_type_option_all": "Qualsevol tipus",
"search_filters_duration_option_none": "Qualsevol duració",
"next_steps_error_message": "Després d'això, hauríeu d'intentar: ",
"next_steps_error_message_refresh": "Recarregar la pàgina",
"crash_page_refresh": "ha intentat <a href=\"`x`\">actualitzar la pàgina</a>",
"crash_page_report_issue": "Si cap de les anteriors no ha ajudat, <a href=\"`x`\">obre un nou issue a GitHub</a> (preferiblement en anglès) i inclou el text següent al missatge (NO tradueixis aquest text):",
"generic_subscriptions_count": "{{count}} subscripció",
"generic_subscriptions_count_plural": "{{count}} subscripcions",
"error_video_not_in_playlist": "El vídeo sol·licitat no existeix en aquesta llista de reproducció. <a href=\"`x`\">Feu clic aquí per a la pàgina d'inici de la llista de reproducció.</a>",
"comments_points_count": "{{count}} punt",
"comments_points_count_plural": "{{count}} punts",
"%A %B %-d, %Y": "%A %B %-d, %Y",
"Create playlist": "Crear llista de reproducció",
"Text CAPTCHA": "Text CAPTCHA",
"Next page": "Pàgina següent",
"preferences_category_visual": "Preferències visuals",
"preferences_unseen_only_label": "Mostra només no vistos: ",
"preferences_listen_label": "Escolta per defecte: ",
"Import": "Importar",
"Token": "Testimoni",
"Wilson score: ": "Puntuació de Wilson: ",
"search_filters_date_label": "Data de càrrega",
"search_filters_features_option_three_sixty": "360°",
"source": "font",
"preferences_default_home_label": "Pàgina d'inici per defecte: ",
"preferences_comments_label": "Comentaris per defecte: ",
"`x` uploaded a video": "`x` ha penjat un vídeo",
"Released under the AGPLv3 on Github.": "Publicat sota l'AGPLv3 a GitHub.",
"Token manager": "Gestor de testimonis",
"Watch history": "Historial de reproduccions",
"Authorize token?": "Autoritzar testimoni?",
"Source available here.": "Font disponible aquí.",
"Export subscriptions as OPML (for NewPipe & FreeTube)": "Exporta subscripcions com a OPML (per a NewPipe i FreeTube)",
"Log in": "Inicia sessió",
"search_filters_sort_option_date": "Data de càrrega",
"Unlisted": "No llistat",
"View privacy policy.": "Veure política de privadesa.",
"Public": "Públic",
"View all playlists": "Veure totes les llistes de reproducció",
"reddit": "Reddit",
"Manage tokens": "Gestiona testimonis",
"Not a playlist.": "No és una llista de reproducció.",
"preferences_local_label": "Vídeos de Proxy: ",
"View channel on YouTube": "Veure canal a Youtube",
"preferences_quality_dash_option_1080p": "1080p",
"Top enabled: ": "Activa top: ",
"Delete playlist `x`?": "Eliminar llista de reproducció `x`?",
"View JavaScript license information.": "Consulta la informació de la llicència de JavaScript.",
"Playlist privacy": "Privacitat de la llista de reproducció",
"search_message_no_results": "No s'han trobat resultats.",
"search_message_use_another_instance": " També es pot <a href=\"`x`\">buscar en una altra instància</a>.",
"Genre: ": "Gènere: ",
"Hidden field \"challenge\" is a required field": "El camp ocult \"repte\" és un camp obligatori",
"Burmese": "Birmà",
"View as playlist": "Mostra com a llista de reproducció",
"preferences_category_subscription": "Preferències de subscripció",
"Music in this video": "Música en aquest vídeo",
"Artist: ": "Artista: ",
"Album: ": "Àlbum: ",
"Shared `x`": "Compartit `x`",
"Premieres `x`": "Estrena `x`",
"View more comments on Reddit": "Veure més comentaris a Reddit",
"View `x` comments": {
"([^.,0-9]|^)1([^.,0-9]|$)": "Veure `x` comentari",
"": "Veure `x` comentaris"
},
"View Reddit comments": "Veure comentaris de Reddit",
"Incorrect password": "Contrasenya incorrecta",
"Erroneous CAPTCHA": "CAPTCHA erroni",
"CAPTCHA is a required field": "El CAPTCHA és un camp obligatori",
"Korean (auto-generated)": "Coreà (generat automàticament)",
"Kyrgyz": "Kirguís",
"Latin": "Llatí",
"Malagasy": "Malgaix",
"Maori": "Maori",
"Marathi": "Marathi",
"Norwegian Bokmål": "Bokmål Noruec",
"Nyanja": "Nyanja",
"Portuguese (Brazil)": "Portuguès (Brazil)",
"Punjabi": "Panjabi",
"Russian (auto-generated)": "Rus (generat automàticament)",
"Samoan": "Samoà",
"Somali": "Somali",
"Southern Sotho": "Sesotho",
"Spanish (Mexico)": "Espanyol (Mèxic)",
"Spanish (Spain)": "Espanyol (Espanya)",
"Sundanese": "Sondanès",
"Swahili": "Suahili",
"Tamil": "Tàmil",
"Telugu": "Telugu",
"Zulu": "Zulu",
"generic_count_months": "{{count}} mes",
"generic_count_months_plural": "{{count}} mesos",
"generic_count_weeks": "{{count}} setmana",
"generic_count_weeks_plural": "{{count}} setmanes",
"About": "Sobre",
"`x` marked it with a ❤": "`x`marca'l amb un ❤",
"Video mode": "Mode de vídeo",
"search_filters_features_label": "Característiques",
"search_filters_features_option_c_commons": "Creative Commons",
"search_filters_features_option_vr180": "VR180",
"search_filters_features_option_three_d": "3D",
"search_filters_features_option_purchased": "Comprat",
"Chinese (Hong Kong)": "Xinès (Hong Kong)",
"Chinese (Taiwan)": "Xinès (Taiwan)",
"Hmong": "Hmong",
"Kazakh": "Kazakh",
"Igbo": "Igbo",
"Javanese": "Javanès",
"Indonesian (auto-generated)": "Indonesi (generat automàticament)",
"Interlingue": "Interlingüe",
"Khmer": "Khmer",
"This channel does not exist.": "Aquest canal no existeix.",
"Song: ": "Cançó: ",
"channel:`x`": "canal: `x`",
"Deleted or invalid channel": "Canal suprimit o no vàlid",
"Could not get channel info.": "No s'ha pogut obtenir la informació del canal.",
"Could not pull trending pages.": "No s'han pogut extreure les pàgines de tendència.",
"comments_view_x_replies": "Veure {{count}} resposta",
"comments_view_x_replies_plural": "Veure {{count}} respostes",
"Subscriptions": "Subscripcions",
"generic_count_seconds": "{{count}} segon",
"generic_count_seconds_plural": "{{count}} segons",
"channel_tab_shorts_label": "Vídeos curts",
"preferences_save_player_pos_label": "Desa la posició de reproducció: ",
"crash_page_before_reporting": "Abans d'informar d'un error, assegureu-vos que teniu:",
"crash_page_switch_instance": "ha intentat <a href=\"`x`\">utilitzar una altra instància</a>",
"crash_page_read_the_faq": "heu llegit les <a href=\"`x`\">Preguntes més freqüents (FAQ)</a>",
"crash_page_search_issue": "ha cercat <a href=\"`x`\">problemes existents a GitHub</a>",
"User ID is a required field": "L'identificador d'usuari és un camp obligatori",
"Password is a required field": "La contrasenya és un camp obligatori",
"Wrong username or password": "Nom d'usuari o contrasenya incorrectes",
"Password cannot be longer than 55 characters": "La contrasenya no pot tenir més de 55 caràcters",
"Invidious Private Feed for `x`": "Feed privat Invidious per a `x`",
"generic_views_count": "{{count}} visualització",
"generic_views_count_plural": "{{count}} visualitzacions",
"generic_videos_count": "{{count}} vídeo",
"generic_videos_count_plural": "{{count}} vídeos",
"Token is expired, please try again": "El testimoni ha caducat, torna-ho a provar",
"English": "Anglès",
"Kannada": "Kanarès",
"Erroneous token": "Testimoni erroni",
"`x` ago": "fa `x`",
"Empty playlist": "Llista de reproducció buida",
"Playlist does not exist.": "La llista de reproducció no existeix.",
"No such user": "No hi ha tal usuari",
"Afrikaans": "Afrikàans",
"Azerbaijani": "Azerbaidjana",
"Cantonese (Hong Kong)": "Cantonès (Hong Kong)",
"Chinese": "Xinès",
"Chinese (China)": "Xinès (Xina)",
"Chinese (Traditional)": "Xinès (Tradicional)",
"Dutch": "Holandès",
"Dutch (auto-generated)": "Holandès (generat automàticament)",
"French (auto-generated)": "Francès (generat automàticament)",
"Georgian": "Georgià",
"German (auto-generated)": "Alemany (generat automàticament)",
"Gujarati": "Gujarati",
"Hawaiian": "Hawaià",
"generic_count_years": "{{count}} any",
"generic_count_years_plural": "{{count}} anys",
"Popular": "Popular",
"Rating: ": "Valoració: ",
"permalink": "enllaç permanent",
"preferences_quality_dash_option_worst": "Pitjor",
"Yiddish": "Ídix",
"preferences_quality_dash_option_auto": "Automàtic",
"Western Frisian": "Frisó occidental",
"Swedish": "Suec",
"Only show latest unwatched video from channel: ": "Mostra només l'últim vídeo no vist del canal: ",
"preferences_continue_label": "Reprodueix el següent per defecte: ",
"Import YouTube subscriptions": "Importar subscripcions de YouTube",
"search_filters_sort_option_rating": "Valoració",
"preferences_thin_mode_label": "Mode prim: ",
"preferences_quality_option_small": "Petit",
"CAPTCHA enabled: ": "activa CAPTCHA: ",
"Import and Export Data": "Importar i exportar dades",
"preferences_quality_dash_option_360p": "360p",
"Popular enabled: ": "Activa popular: ",
"Password": "Contrasenya",
"Blacklisted regions: ": "Regions a la llista negra: ",
"Register": "Registra't",
"Shared `x` ago": "Compartit fa `x`",
"search_filters_sort_option_views": "Recompte de visualitzacions",
"Import Invidious data": "Importa dades JSON d'Invidious",
"preferences_related_videos_label": "Mostra vídeos relacionats: ",
"preferences_show_nick_label": "Mostra l'àlies a la part superior: ",
"Time (h:mm:ss):": "Temps (h:mm:ss):",
"Could not fetch comments": "No s'han pogut obtenir els comentaris",
"New password": "Nova contrasenya",
"preferences_notifications_only_label": "Mostra només notificacions (si n'hi ha): ",
"preferences_annotations_label": "Mostra anotacions per defecte: ",
"Import FreeTube subscriptions (.db)": "Importar subscripcions de FreeTube (.db)",
"Fallback captions: ": "Subtítols alternatius: ",
"Log out": "Tancar sessió",
"preferences_quality_dash_option_2160p": "2160p",
"Unsubscribe": "Cancel·la la subscripció",
"Log in/register": "Inicia sessió/registra't",
"Nepali": "Nepalí",
"Xhosa": "Xosa",
"preferences_captions_label": "Subtítols per defecte: ",
"preferences_autoplay_label": "Reproducció automàtica: ",
"`x` is live": "`x` està en directe",
"Uzbek": "Uzbek",
"Hausa": "Haussa",
"Bosnian": "Bosnià",
"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! Sembla que tens JavaScript desactivat. Feu clic aquí per veure els comentaris, tingueu en compte que poden trigar una mica més a carregar-se.",
"Password cannot be empty": "La contrasenya no pot estar buida",
"preferences_video_loop_label": "Sempre en bucle: ",
"preferences_quality_option_dash": "DASH (qualitat adaptativa)",
"Change password": "Canvia la contrasenya",
"Export data as JSON": "Exporta dades d'Invidious com a JSON",
"Wrong answer": "Resposta incorrecta",
"Clear watch history": "Neteja l'historial de reproduccions",
"Mongolian": "Mongol",
"preferences_quality_dash_option_best": "Millor",
"Authorize token for `x`?": "Autoritzar testimoni per a `x`?",
"Report statistics: ": "Estadístiques de l'informe: ",
"Switch Invidious Instance": "Canvia la instància d'Invidious",
"History": "Historial",
"Portuguese (auto-generated)": "Portuguès (generat automàticament)",
"footer_source_code": "Codi font",
"videoinfo_youTube_embed_link": "Insereix",
"generic_count_minutes": "{{count}} minut",
"generic_count_minutes_plural": "{{count}} minuts",
"preferences_category_player": "Preferències del reproductor",
"Sign In": "Inicia Sessió",
"preferences_continue_autoplay_label": "Reprodueix automàticament el següent vídeo: ",
"generic_playlists_count": "{{count}} llista de reproducció",
"generic_playlists_count_plural": "{{count}} llistes de reproducció",
"Delete account?": "Esborrar compte?",
"Please log in": "Si us plau inicieu sessió",
"Import NewPipe data (.zip)": "Importar dades de NewPipe (.zip)",
"Image CAPTCHA": "Imatge CAPTCHA",
"channel_tab_streams_label": "Transmissions en directe",
"preferences_category_misc": "Preferències diverses",
"preferences_annotations_subscribed_label": "Mostra les anotacions per defecte dels canals subscrits? ",
"Tajik": "Tadjik",
"preferences_player_style_label": "Estil del reproductor: ",
"Load more": "Carrega més",
"preferences_vr_mode_label": "Vídeos interactius de 360 graus (requereix WebGL): ",
"Manage subscriptions": "Gestionar les subscripcions",
"preferences_quality_option_medium": "Mitjà",
"Editing playlist `x`": "Editant la llista de reproducció `x`",
"search_filters_duration_option_medium": "Mitjà (4 - 20 minuts)",
"E-mail": "Correu electrònic",
"Spanish (auto-generated)": "Castellà (generat automàticament)",
"Export": "Exportar",
"preferences_quality_dash_option_4320p": "4320p",
"JavaScript license information": "Informació de la llicència de JavaScript",
"Hidden field \"token\" is a required field": "El camp ocult \"testimoni\" és un camp obligatori",
"Shona": "Xona",
"Family friendly? ": "Apte per a tots els públics? ",
"preferences_quality_dash_label": "Qualitat de vídeo DASH preferida: ",
"Hindi": "Hindi",
"An alternative front-end to YouTube": "Una interfície alternativa a YouTube",
"Export subscriptions as OPML": "Exporta subscripcions com a OPML",
"Watch on YouTube": "Veure a YouTube",
"Lao": "Laosià",
"search_message_change_filters_or_query": "Proveu d'ampliar la vostra consulta de cerca i/o canviar els filtres.",
"View YouTube comments": "Veure comentaris de YouTube",
"New passwords must match": "Les contrasenyes noves han de coincidir",
"Subscription manager": "Gestor de subscripcions",
"Premieres in `x`": "Estrena en `x`",
"youtube": "YouTube",
"Latvian": "Letó",
"LIVE": "EN VIU",
"Could not create mix.": "No s'ha pogut crear la barreja.",
"preferences_speed_label": "Velocitat per defecte: ",
"preferences_extend_desc_label": "Amplieu automàticament la descripció del vídeo: ",
"popular": "popular",
"Erroneous challenge": "Repte erroni",
"last": "darrer",
"preferences_quality_dash_option_240p": "240p",
"preferences_quality_dash_option_720p": "720p",
"preferences_quality_dash_option_480p": "480p",
"preferences_quality_dash_option_1440p": "1440p",
"Previous page": "Pàgina anterior",
"Only show latest video from channel: ": "Mostra només l'últim vídeo del canal: ",
"unsubscribe": "cancel·la la subscripció",
"View playlist on YouTube": "Veure llista de reproducció a YouTube",
"Import NewPipe subscriptions (.json)": "Importar subscripcions de NewPipe (.json)",
"crash_page_you_found_a_bug": "Heu trobat un error a Invidious!",
"Subscribe": "Subscriu-me",
"generic_count_days": "{{count}} dia",
"generic_count_days_plural": "{{count}} dies",
"Trending": "Tendència",
"Updated `x` ago": "Actualitzat fa `x`",
"Haitian Creole": "Crioll Haitià",
"preferences_watch_history_label": "Habilita historial de reproduccions: ",
"generic_count_hours": "{{count}} hora",
"generic_count_hours_plural": "{{count}} hores",
"Malayalam": "Maialàiam",
"Clear watch history?": "Neteja historial de reproduccions?",
"Import/export data": "Importa/exporta dades",
"Sinhala": "Singalès",
"Delete playlist": "Eliminar llista de reproducció",
"Bangla": "Bengalí",
"Italian (auto-generated)": "Italià (generat automàticament)",
"License: ": "Llicència: ",
"(edited)": "(editat)",
"Pashto": "Paixtu",
"preferences_dark_mode_label": "Tema: ",
"revoke": "revocar",
"English (United Kingdom)": "Anglès (Regne Unit)",
"preferences_quality_option_hd720": "HD720",
"tokens_count": "{{count}} testimoni",
"tokens_count_plural": "{{count}} testimonis",
"subscriptions_unseen_notifs_count": "{{count}} notificació no vista",
"subscriptions_unseen_notifs_count_plural": "{{count}} notificacions no vistes",
"generic_subscribers_count": "{{count}} subscriptor",
"generic_subscribers_count_plural": "{{count}} subscriptors",
"Sindhi": "Sindhi",
"Slovenian": "Eslovè",
"preferences_feed_menu_label": "Menú del feed: ",
"Fallback comments: ": "Comentaris alternatius: ",
"Top": "Millors",
"preferences_max_results_label": "Nombre de vídeos mostrats al feed: ",
"Engagement: ": "Atracció: ",
"Redirect homepage to feed: ": "Redirigeix la pàgina d'inici al feed: ",
"Standard YouTube license": "Llicència estàndard de YouTube",
"Download is disabled": "Les baixades s'han inhabilitat",
"Import YouTube playlist (.csv)": "Importar llista de reproducció de YouTube (.csv)",
"channel_tab_podcasts_label": "Podcasts",
"playlist_button_add_items": "Afegeix vídeos",
"generic_button_save": "Desa",
"generic_button_cancel": "Cancel·la",
"channel_tab_releases_label": "Publicacions",
"generic_channels_count": "{{count}} canal",
"generic_channels_count_plural": "{{count}} canals",
"generic_button_edit": "Edita",
"generic_button_rss": "RSS",
"generic_button_delete": "Suprimeix",
"Import YouTube watch history (.json)": "Importa l'historial de visualitzacions de YouTube (.json)",
"Answer": "Resposta",
"toggle_theme": "Commuta el tema"
}

Some files were not shown because too many files have changed in this diff Show More