blacklisting instance due to running on old version
This commit is contained in:
		
							parent
							
								
									b4b62fd314
								
							
						
					
					
						commit
						e62443e66f
					
				| 
						 | 
					@ -3,7 +3,7 @@ const maxRetries = 5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
async function getInstance() {
 | 
					async function getInstance() {
 | 
				
			||||||
    const instances = await (await fetch('https://api.invidious.io/instances.json?pretty=1')).json()
 | 
					    const instances = await (await fetch('https://api.invidious.io/instances.json?pretty=1')).json()
 | 
				
			||||||
    const sorted = instances.filter(o => o[1].type == 'https' && o[1].monitor.statusClass == 'success')
 | 
					    const sorted = instances.filter(o => o[1].type == 'https' && o[0] != 'invidious.io.lol')
 | 
				
			||||||
    return `https://${sorted[Math.floor(Math.random() * sorted.length)][0]}`
 | 
					    return `https://${sorted[Math.floor(Math.random() * sorted.length)][0]}`
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue