Beet update command ignores my replace setting
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 2.1k
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 31
Description
Hi there,
in the latest version of beets, when using beet update command (since I delete files from disc from time to time) I noticed that my tags are being repopulated with special characters. At import I use a series of replace strings in the configuration file to remove all special characters not being read properly on systems with ut8.
Now, if I issue beet update command my missing files are being deleted but all my other files do get the titles with special characters back.
is there any way to make beet update take in consideration my replace strings in config file ?
thanks
Here's a link to the music files that trigger the bug (if relevant):
### Setup
* OS: Windows 7
* Python version: 3.8.6
* beets version: 2.0.0
* Turning off plugins made problem go away (yes/no): NO
My configuration (output of `beet config`) is:
```
plugins: fetchart chroma lastgenre bucket embedart info oldestdate popularity duplicates
directory: Y:\
library: library.db
threaded: yes
asciify_paths: yes
terminal_enconding: utf8
original_date: yes
import:
write: yes
copy: no
move: no
resume: yes
incremental: no
quiet_fallback: skip
timid: no
from_scratch: yes
log: beet.log
autotag: yes
duplicate_action: skip
duplicate_verbose_prompt: yes
oldestdate:
auto: yes
ignore_track_id: yes
filter_on_import: yes
prompt_missing_work_id: no
force: yes
overwrite_date: yes
filter_recordings: yes
approach: 'releases'
chroma:
auto: yes
acousticbrainz:
auto: yes
force: yes
tags: []
lastgenre:
auto: yes
source: track
embedart:
auto: yes
fetchart:
auto: yes
replace:
'^\.': _
'[\x00-\x1f]': _
'[<>:"\?\*\|]': _
'[\xE8-\xEB]': e
'[\xEC-\xEF]': i
'[\xE2-\xE6]': a
'[\xF2-\xF6]': o
'[\xF8]': o
'\.$': _
'\s+$': ''
'[\u2018\u2019]': ''''
'[\u201c\u201d]': '"'
'[\u275C\u02BC]': ''''
'[\u2018\u2019\u201a\u201b\u2039\u203a]': ''''
'[\u201c\u201d\u201e\u201f\u00ab\u00bb]': '"'
bucket:
bucket_year: ['1960s','1970s','1980s','1990s','2000s','2010s','2020s','2023s','2024s']
extrapolate: true
ui:
color: no
colors:
text_success: green
text_warning: blue
text_error: red
text_highlight: blue
text_highlight_minor: lightgray
action_default: darkblue
action: purple
musicbrainz:
searchlimit: 20
match:
strong_rec_thresh: 0.26
paths:
singleton: Music\%bucket{$year}\$artist - $title - ($year)
hook:
hooks:
#############################################
- event: album_imported
command: echo "\"{album}\""
- event: import
command: echo "imported from {paths}"
#############################################
- event: art_set
command: echo "Coverart saved"
- event: import_begin
command: echo "Roon import started..."
- event: import_task_apply
command: echo "Metadata applied"
- event: item_copied
command: echo "\"{item}\" copied from \"{source}\" to \"{destination}\""
- event: item_moved
command: echo "Moved \"{item}\""
- event: write
command: echo "Writing to {path}"
- event: cli_exit
command: echo "All tasks finished!"
```
Contributor guide
Research direction
Reproduce the issue with `beet update` using the provided configuration and `replace` rules, then trace the update command's metadata and replacement handling. Done means update preserves the configured replacements instead of restoring special characters; verify with the supplied Windows/Python setup or an equivalent focused test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100