if this works im going insane
This commit is contained in:
		
							parent
							
								
									c5249ade05
								
							
						
					
					
						commit
						98b2a5d417
					
				
							
								
								
									
										2
									
								
								index.js
								
								
								
								
							
							
						
						
									
										2
									
								
								index.js
								
								
								
								
							| 
						 | 
					@ -122,7 +122,7 @@ app.get('/videos/:id', async (req, res) => {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
app.ws('/download/:id/:quality', async (ws, req) => {
 | 
					app.ws('/download/:id/:quality', async (ws, req) => {
 | 
				
			||||||
  const yt = await Innertube.create();
 | 
					  const yt = await Innertube.create();
 | 
				
			||||||
  const info = await yt.getInfo(req.params.id, 'ANDROID');
 | 
					  const info = await yt.getInfo(req.params.id, 'IOS');
 | 
				
			||||||
  if (info.playability_status.status !== 'OK') {
 | 
					  if (info.playability_status.status !== 'OK') {
 | 
				
			||||||
    ws.send(`This video is not available for download (${info.playability_status.status} ${info.playability_status.reason}).`);
 | 
					    ws.send(`This video is not available for download (${info.playability_status.status} ${info.playability_status.reason}).`);
 | 
				
			||||||
    return ws.close()
 | 
					    return ws.close()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue