From 90ecfe54d011c84f1408d772909b0d1d23e50eb9 Mon Sep 17 00:00:00 2001 From: Nikolaos Karaolidis Date: Fri, 20 Feb 2026 15:32:20 +0000 Subject: [PATCH 1/2] Fix nodirs behavior Signed-off-by: Nikolaos Karaolidis --- flac2all_pkg/__init__.py | 6 ++++++ flac2all_pkg/core.py | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/flac2all_pkg/__init__.py b/flac2all_pkg/__init__.py index 6d474bb..69f148b 100755 --- a/flac2all_pkg/__init__.py +++ b/flac2all_pkg/__init__.py @@ -435,6 +435,12 @@ def main(): # As the copy folder is created in the shell module, we # do not have to do anything else here continue + + # Only create per-mode directories if the user did not request + # "-n m" (i.e. don't create mode directories) + if opts['nodirs'] == "m": + continue + try: os.mkdir(os.path.join(opts['outdir'], mode)) except OSError as e: diff --git a/flac2all_pkg/core.py b/flac2all_pkg/core.py index 3650085..66e7414 100755 --- a/flac2all_pkg/core.py +++ b/flac2all_pkg/core.py @@ -245,12 +245,12 @@ def encode(self, infile, mode, opts): # $execution_time¬ # ] - if opts['nodirs'] is "d": + if opts['nodirs'] == "d": # We don't want any directories, put everything in one place # 1. Get file name from infile outfile = infile.rsplit('/', 1)[-1] outfile = os.path.join(opts['outdir'], outfile) # This removes the mode folders as well - elif opts['nodirs'] is "m": + elif opts['nodirs'] == "m": # We want to keep directory structure, but not output "per mode" folders. This puts all difference encodings # In the same folders outfile = infile.replace(opts['dirpath'], os.path.join(opts['outdir'])) From 354c05e24d7ffa48038c47b37a1a85e2223e2fb7 Mon Sep 17 00:00:00 2001 From: Nikolaos Karaolidis Date: Fri, 20 Feb 2026 15:33:04 +0000 Subject: [PATCH 2/2] Add nolog option Signed-off-by: Nikolaos Karaolidis --- flac2all_pkg/__init__.py | 9 ++++++++- flac2all_pkg/config.py | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/flac2all_pkg/__init__.py b/flac2all_pkg/__init__.py index 69f148b..b8f93f2 100755 --- a/flac2all_pkg/__init__.py +++ b/flac2all_pkg/__init__.py @@ -289,7 +289,9 @@ def clustered_encode(localworkers=False): sys.exit(1) # log.print(list(set([x[0] for x in inlist]) - set([x[0] for x in results]))) # generate_summary(start_time, end_time, incount, results) - baseI.write_logfile(opts['outdir'], results) + # Write logfile unless disabled by user + if not opts.get('nolog', False): + baseI.write_logfile(opts['outdir'], results) def build_parser(): @@ -366,6 +368,11 @@ def build_parser(): default=False, help="Don't create Directories, if \"-n d\" put everything together, if \"-n m\" don't create mode dirs" ) + parser.add_option( + "--nolog", dest="nolog", action="store_true", + default=False, help="Do not write conversion_results.log at the end" + ) + parser.add_option( "-m", "--master", dest="master_enable", action="store_true", default=False, help="Start flac2all in master mode (for clustering)." diff --git a/flac2all_pkg/config.py b/flac2all_pkg/config.py index 209794e..eaea17d 100644 --- a/flac2all_pkg/config.py +++ b/flac2all_pkg/config.py @@ -34,4 +34,5 @@ def __init__(self): "flacopts": "", # your flac encoder settings "aacplusopts": "-a 1 -t 29", "opusencopts": "vbr", + "nolog": False, # do not write conversion_results.log at the end }