From a02c620fa5e5e3fd35c35f9f65fcaa32cd48ead8 Mon Sep 17 00:00:00 2001 From: CroneKorkN Date: Fri, 30 May 2025 19:47:30 +0200 Subject: [PATCH] wip --- create_chunks.py | 2 +- process_chunks.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) mode change 100644 => 100755 create_chunks.py diff --git a/create_chunks.py b/create_chunks.py old mode 100644 new mode 100755 index d4fea67..a08ceb1 --- a/create_chunks.py +++ b/create_chunks.py @@ -4,7 +4,7 @@ import subprocess import datetime import pytz -OUTDIR = "chunks_unprocessed" +OUTDIR = "chunks" DURATION = 10800 # 3 Stunden SOURCE = "pulse" # funktioniert mit PulseAudio diff --git a/process_chunks.py b/process_chunks.py index 3083581..378efa4 100755 --- a/process_chunks.py +++ b/process_chunks.py @@ -87,11 +87,13 @@ def process_chunk(filename): # Datei verschieben output_path = os.path.join(OUTPUT_DIR, filename) - shutil.move(input_path, output_path) + #shutil.move(input_path, output_path) print(f"✅ Verschoben nach {output_path}") def main(): + os.makedirs(OUTPUT_DIR, exist_ok=True) + with concurrent.futures.ProcessPoolExecutor() as executor: files = [f for f in os.listdir(INPUT_DIR) if f.endswith(".flac")] executor.map(process_chunk, files)