FFMpeg-Compressor: Rewrite some code
This commit is contained in:
parent
a7ed37d58c
commit
657aa31148
4 changed files with 92 additions and 53 deletions
11
FFMpeg-Compressor/modules/configloader.py
Normal file
11
FFMpeg-Compressor/modules/configloader.py
Normal file
|
@ -0,0 +1,11 @@
|
|||
import tomllib
|
||||
from modules import printer
|
||||
|
||||
try:
|
||||
config = tomllib.load(open("ffmpeg-comp.toml", "rb"))
|
||||
except FileNotFoundError:
|
||||
try:
|
||||
config = tomllib.load(open("/etc/ffmpeg-comp.toml", "rb"))
|
||||
except FileNotFoundError:
|
||||
printer.error("Config file not found. Please put it next to binary or in to /etc folder.")
|
||||
exit()
|
Loading…
Add table
Add a link
Reference in a new issue