From f03a3a686c7304588dd434322c73506531e53595 Mon Sep 17 00:00:00 2001 From: Brianna Rainey Date: Thu, 12 Feb 2026 15:38:54 -0500 Subject: v2.2.4 - Quiet FFmpeg; add "invert" option to Classic Vis; fix CLI parsing for Image component (#96) * change noisiness of terminal output ffmpeg no longer prints everything into the terminal unless we're in `--verbose` mode. percentage progress text stays on one line while not in verbose mode. * Added hint to run `avp --verbose` if `avp --log` is run with no avp_debug.log file present * Classic Visualizer: add invert option * Image component: fix path commandline option * Image component: restrict file formats in CLI to match GUI * Color component: add tooltip to color2 picker (second color of gradients) * change tests to work with pytest-xdist avp core stores its config (location of `settings.ini`) in temp directories if using multiple workers to run tests, so they don't interfere with each other. when using a single worker, the `tests/data/config` directory is still used * check alt comp names when parsing cmdline * rename `original.py` to `classic.py` * move `component.py` into subpackage * rename comp_original to comp_classic * show traceback if renderFrame() raises exception * do not try to insert non-existent components from project files * add "composite" property for components if a component returns "composite" then it will receive a frame to draw on during calls to previewRender and frameRender * more tests of projects, actions, waveform, spectrum, image, color, classic * do not change presetDir to "projects" within PresetManager--- src/avp/core.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/avp/core.py') diff --git a/src/avp/core.py b/src/avp/core.py index 347a5dd..c8e070b 100644 --- a/src/avp/core.py +++ b/src/avp/core.py @@ -14,7 +14,6 @@ from . import toolkit appName = "Audio Visualizer Python" log = logging.getLogger("AVP.Core") -STDOUT_LOGLVL = logging.WARNING class Core: @@ -26,6 +25,8 @@ class Core: This class also stores constants as class variables. """ + stdoutLogLvl = logging.WARNING + def __init__(self): self.importComponents() self.selectedComponents = [] @@ -77,7 +78,10 @@ class Core: compPos = len(self.selectedComponents) if len(self.selectedComponents) > 50: return -1 - if type(component) is int: + if component is None: + log.warning("Tried to insert non-existent component") + return -1 + elif type(component) is int: # create component using module index in self.modules moduleIndex = int(component) log.debug("Creating new component from module #%s", str(moduleIndex)) @@ -197,7 +201,7 @@ class Core: ) continue if i == -1: - loader.showMessage(msg="Too many components!") + loader.showMessage(msg="Invalid components!") break try: @@ -554,7 +558,7 @@ class Core: def makeLogger(deleteOldLogs=False, fileLogLvl=None): # send critical log messages to stdout logStream = logging.StreamHandler() - logStream.setLevel(STDOUT_LOGLVL) + logStream.setLevel(Core.stdoutLogLvl) streamFormatter = logging.Formatter("<%(name)s> %(levelname)s: %(message)s") logStream.setFormatter(streamFormatter) log = logging.getLogger("AVP") -- cgit v1.2.3