mirror of
https://github.com/k4yt3x/video2x.git
synced 2025-01-01 10:29:09 +00:00
added environment variable expansion support
This commit is contained in:
parent
7489376404
commit
def20650e2
@ -58,6 +58,7 @@ import contextlib
|
|||||||
import gettext
|
import gettext
|
||||||
import importlib
|
import importlib
|
||||||
import locale
|
import locale
|
||||||
|
import os
|
||||||
import pathlib
|
import pathlib
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
@ -178,6 +179,7 @@ config = read_config(video2x_args.config)
|
|||||||
|
|
||||||
# load waifu2x configuration
|
# load waifu2x configuration
|
||||||
driver_settings = config[video2x_args.driver]
|
driver_settings = config[video2x_args.driver]
|
||||||
|
driver_settings['path'] = os.path.expandvars(driver_settings['path'])
|
||||||
|
|
||||||
# overwrite driver_settings with driver_args
|
# overwrite driver_settings with driver_args
|
||||||
if driver_args is not None:
|
if driver_args is not None:
|
||||||
@ -195,6 +197,7 @@ if not pathlib.Path(driver_settings['path']).exists():
|
|||||||
|
|
||||||
# read FFmpeg configuration
|
# read FFmpeg configuration
|
||||||
ffmpeg_settings = config['ffmpeg']
|
ffmpeg_settings = config['ffmpeg']
|
||||||
|
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()
|
||||||
|
Loading…
Reference in New Issue
Block a user