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: