mirror of
https://github.com/beetbox/beets.git
synced 2026-04-01 11:16:20 +02:00
Save new path before writing metadata
This commit is contained in:
parent
99c7820605
commit
53efa03785
1 changed files with 1 additions and 3 deletions
|
|
@ -129,6 +129,7 @@ class ReplacePlugin(BeetsPlugin):
|
|||
|
||||
# Update the path to point to the new file.
|
||||
song.path = str(dest).encode()
|
||||
song.store()
|
||||
|
||||
# Write the metadata in the database to the song file's tags.
|
||||
try:
|
||||
|
|
@ -136,7 +137,4 @@ class ReplacePlugin(BeetsPlugin):
|
|||
except FileOperationError as e:
|
||||
raise ui.UserError(f"Error writing metadata to file: {e}")
|
||||
|
||||
# Commit the new path to the database.
|
||||
song.store()
|
||||
|
||||
ui.print_("Replacement successful.")
|
||||
|
|
|
|||
Loading…
Reference in a new issue