Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filtering out invidious instances that don't support the API #2714

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/renderer/store/modules/invidious.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const actions = {
const response = await fetch(requestUrl)
const json = await response.json()
instances = json.filter((instance) => {
if (instance[0].includes('.onion') || instance[0].includes('.i2p')) {
if (instance[0].includes('.onion') || instance[0].includes('.i2p') || !instance[1].api || (!process.env.IS_ELECTRON && !instance[1].cors)) {
return false
} else {
return true
Expand All @@ -51,8 +51,8 @@ const actions = {
} else {
console.error('unable to read static file for invidious instances')
instances = [
'https://invidious.snopyta.org',
'https://invidious.kavin.rocks/'
'https://invidious.sethforprivacy.com',
'https://invidious.namazso.eu'
]
}
}
Expand Down
3 changes: 0 additions & 3 deletions static/invidious-instances.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
[
{ "url": "https://yewtu.be" },
{ "url": "https://vid.puffyan.us" },
{ "url": "https://invidious.snopyta.org" },
{ "url": "https://invidious.kavin.rocks" },
{ "url": "https://inv.riverside.rocks" },
{ "url": "https://invidious.osi.kr" },
{ "url": "https://y.com.sb" },
Expand Down