fixed some minor stuff
This commit is contained in:
parent
1324802db7
commit
6197345023
@ -45,9 +45,9 @@ def correct_codec(target: Target, bitrate_kb: int = BITRATE, audio_format: str =
|
|||||||
|
|
||||||
# run the ffmpeg command with a progressbar
|
# run the ffmpeg command with a progressbar
|
||||||
ff = FfmpegProgress(ffmpeg_command)
|
ff = FfmpegProgress(ffmpeg_command)
|
||||||
with tqdm(total=100, position=1, desc="ffmpeg") as pbar:
|
with tqdm(total=100, desc="ffmpeg") as pbar:
|
||||||
for progress in ff.run_command_with_progress():
|
for progress in ff.run_command_with_progress():
|
||||||
pbar.update(progress - pbar.n)
|
pbar.update(int(progress)-pbar.n)
|
||||||
|
|
||||||
LOGGER.debug(ff.stderr)
|
LOGGER.debug(ff.stderr)
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ class Config:
|
|||||||
self._name_section_map[name] = element
|
self._name_section_map[name] = element
|
||||||
self._length += 1
|
self._length += 1
|
||||||
|
|
||||||
def set_name_to_value(self, name: str, value: str):
|
def set_name_to_value(self, name: str, value: str, silent: bool = True):
|
||||||
"""
|
"""
|
||||||
:raises SettingValueError, SettingNotFound:
|
:raises SettingValueError, SettingNotFound:
|
||||||
:param name:
|
:param name:
|
||||||
@ -66,6 +66,9 @@ class Config:
|
|||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
if name not in self._name_section_map:
|
if name not in self._name_section_map:
|
||||||
|
if silent:
|
||||||
|
LOGGER.warning(f"The setting \"{name}\" is either deprecated, or doesn't exist.")
|
||||||
|
return
|
||||||
raise SettingNotFound(setting_name=name)
|
raise SettingNotFound(setting_name=name)
|
||||||
|
|
||||||
LOGGER.debug(f"setting: {name} value: {value}")
|
LOGGER.debug(f"setting: {name} value: {value}")
|
||||||
|
Loading…
Reference in New Issue
Block a user