mirror of
				https://github.com/k4yt3x/video2x.git
				synced 2025-11-04 06:31:00 +01:00 
			
		
		
		
	fixing temp directory loading problem attempt 2
This commit is contained in:
		
							parent
							
								
									2d9c5fe751
								
							
						
					
					
						commit
						4a6f90a1f0
					
				@ -60,6 +60,7 @@ import locale
 | 
				
			|||||||
import os
 | 
					import os
 | 
				
			||||||
import pathlib
 | 
					import pathlib
 | 
				
			||||||
import sys
 | 
					import sys
 | 
				
			||||||
 | 
					import tempfile
 | 
				
			||||||
import time
 | 
					import time
 | 
				
			||||||
import traceback
 | 
					import traceback
 | 
				
			||||||
import yaml
 | 
					import yaml
 | 
				
			||||||
@ -184,7 +185,11 @@ ffmpeg_settings['ffmpeg_path'] = os.path.expandvars(ffmpeg_settings['ffmpeg_path
 | 
				
			|||||||
# load video2x settings
 | 
					# load video2x settings
 | 
				
			||||||
image_format = config['video2x']['image_format'].lower()
 | 
					image_format = config['video2x']['image_format'].lower()
 | 
				
			||||||
preserve_frames = config['video2x']['preserve_frames']
 | 
					preserve_frames = config['video2x']['preserve_frames']
 | 
				
			||||||
video2x_cache_directory = pathlib.Path(config['video2x']['video2x_cache_directory'])
 | 
					
 | 
				
			||||||
 | 
					if config['video2x']['video2x_cache_directory'] is None:
 | 
				
			||||||
 | 
					    video2x_cache_directory = (pathlib.Path(tempfile.gettempdir()) / 'video2x')
 | 
				
			||||||
 | 
					else:
 | 
				
			||||||
 | 
					    video2x_cache_directory = pathlib.Path(config['video2x']['video2x_cache_directory'])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# overwrite driver_settings with driver_args
 | 
					# overwrite driver_settings with driver_args
 | 
				
			||||||
if driver_args is not None:
 | 
					if driver_args is not None:
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user