From 93b4eccc39d21fe4e55447559f1d02b525e26056 Mon Sep 17 00:00:00 2001 From: gaotue Date: Mon, 23 Mar 2026 14:46:08 +0100 Subject: [PATCH] Update beets/importer/tasks.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- beets/importer/tasks.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/beets/importer/tasks.py b/beets/importer/tasks.py index 506785e80..7164448bd 100644 --- a/beets/importer/tasks.py +++ b/beets/importer/tasks.py @@ -1170,20 +1170,20 @@ class ImportTaskFactory: "8svx", "cda", ] - format = "" + detected_format = "" # The first format from ffprobe that is on this list is taken for f in formats: if f in wiki_formats: - format = f + detected_format = f break # if ffprobe can't find a format, the file is prob not music - if format == "": + if detected_format == "": return path # cp and add ext. If already exist, use that file # assume, for example, the only diff between 'asdf.mp3' and 'asdf' is format - new_path = path.with_suffix("." + format) + new_path = path.with_suffix("." + detected_format) if not new_path.exists(): util.move(path, new_path) else: