mirror of
https://github.com/beetbox/beets.git
synced 2026-03-26 07:15:34 +01:00
Update beets/importer/tasks.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
54f438f176
commit
93b4eccc39
1 changed files with 4 additions and 4 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue