fix ytdl add logging etc
This commit is contained in:
		
							parent
							
								
									d802845c0a
								
							
						
					
					
						commit
						d560e920a9
					
				
					 8 changed files with 943 additions and 283 deletions
				
			
		| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
from fastapi import FastAPI, BackgroundTasks, Response
 | 
			
		||||
from youtube_dl import YoutubeDL
 | 
			
		||||
from yt_dlp import YoutubeDL
 | 
			
		||||
from uuid import uuid4, UUID
 | 
			
		||||
from pydantic import BaseModel
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -21,7 +21,7 @@ def report_state(id: str):
 | 
			
		|||
 | 
			
		||||
def load_video(url: str, file_path: str, id: str):
 | 
			
		||||
    opts = {
 | 
			
		||||
        "format": 'mp4',
 | 
			
		||||
        "format": 'best[height<=480][ext=mp4]',
 | 
			
		||||
        "quiet": True,
 | 
			
		||||
        "outtmpl": file_path,
 | 
			
		||||
        "progress_hooks": [report_state(id)]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue