From 836bac3f2dc1c1bcf3ab7d54024538fc74e0e0e9 Mon Sep 17 00:00:00 2001 From: blissful Date: Mon, 29 Apr 2024 18:47:46 -0400 Subject: [PATCH] fix bug when create_single_release renames the directory --- rose/releases.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rose/releases.py b/rose/releases.py index 2e7a546..a0e17dd 100644 --- a/rose/releases.py +++ b/rose/releases.py @@ -4,6 +4,7 @@ from __future__ import annotations +import dataclasses import json import logging import re @@ -534,7 +535,8 @@ def create_single_release(c: Config, track_path: Path) -> None: af = AudioTags.from_file(new_track_path) logger.info(f"Created phony single release {source_path.name}") # Step 4: Update the cache! - update_cache_for_releases(c, [source_path]) + c_tmp = dataclasses.replace(c, rename_source_files=False) + update_cache_for_releases(c_tmp, [source_path]) # Step 5: Default extracted singles to not new: if it is new, why are you meddling with it? for f in source_path.iterdir(): if m := STORED_DATA_FILE_REGEX.match(f.name):