Added user-defined output directory

This commit is contained in:
frarol96 2023-10-11 20:02:41 +00:00
parent c5faaf242b
commit 4311036977

View File

@ -1,4 +1,4 @@
import configparser import os, configparser, multiprocessing
CONFIG_FILE = "config.ini" CONFIG_FILE = "config.ini"
INVALID_INI = False INVALID_INI = False
@ -7,6 +7,8 @@ V2CV = [1, 2, 0]
V2CVERSION = f"{V2CV[0]}.{V2CV[1]}.{V2CV[2]}" V2CVERSION = f"{V2CV[0]}.{V2CV[1]}.{V2CV[2]}"
RSS_FEED_URL = "https://git.rolfsvaag.no/frarol96/Video2Crops/releases.rss" RSS_FEED_URL = "https://git.rolfsvaag.no/frarol96/Video2Crops/releases.rss"
WIKI_URL = "https://git.rolfsvaag.no/frarol96/Video2Crops/wiki" WIKI_URL = "https://git.rolfsvaag.no/frarol96/Video2Crops/wiki"
FILE_TYPES = '*.mp4 *.avi *.mov'
FILE_TYPES = f"{FILE_TYPES} {FILE_TYPES.upper()}"
processing = False processing = False
@ -23,4 +25,9 @@ SAVE = config.get('settings', 'save_output')
SHOW = config.get('settings', 'show_playback') SHOW = config.get('settings', 'show_playback')
roi_size = int(config.get('settings', 'roi_size')) roi_size = int(config.get('settings', 'roi_size'))
tksize = config.get('settings', 'window_size') tksize = config.get('settings', 'window_size')
user_defined_output_dir = config.get('settings', 'user_defined_output_dir')
DEBUG = config.get('debug', 'debug_output') DEBUG = config.get('debug', 'debug_output')
# Assign conditional variables here
# If output directory is not assigned or does not exist, assign it as cwd
if not user_defined_output_dir or not os.path.exists(user_defined_output_dir): user_defined_output_dir = os.getcwd()