Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beet update command ignores my replace setting #5395

Open
simistef opened this issue Aug 26, 2024 · 1 comment
Open

Beet update command ignores my replace setting #5395

simistef opened this issue Aug 26, 2024 · 1 comment

Comments

@simistef
Copy link

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!"





@JOJ0
Copy link
Member

JOJ0 commented Sep 21, 2024

The replace stanza in the config only controls what Beets does when it writes files to disk. See https://beets.readthedocs.io/en/stable/reference/config.html#replace for details.

I suggest you have a look at the other "replace*" possibilities in the plugins section of the docs. Not sure if that helps but worth a try... "rewrite" and "substitute" for example. Also just search for terms "replace/rewrite" in the docs. HTH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@simistef @JOJ0 and others