Help with inline "item_fields" and getting them to run #5604
Unanswered
nicoleproc
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! Very much a newbie/inexperienced...but I'm trying to pull anything in parenthesis out of the title name and copy it over to a "remixer" field. Please help! :) I have spent way too long trying to figure this out!
When I run this in python, it comes back with the correct information:
But when I run this, it comes back empty -
beet ls -f '$title - $remixer'
Under Pressure feat. Queen (Disco Pirate's Remix) -
Here is my config file -
directory: /Users/Nicole/Music/ShamblesMusicLibrary
library: /Users/Nicole/Music/library.db
pluginpath: /Users/Nicole/Music/Beets_Plug_Ins
clutter:
plugins:
duplicates:
move: /Users/Nicole/Music/ShamblesMusicLibrary/Duplicates
count: yes
full: no
substitute:
^(.?)(,| &| and| +| feat.| vs).: \1
import:
move: no
write: yes
copy: yes
autotag: yes
resume: ask
incremental: no
quiet_fallback: skip
duplicate_action: ask
field_mapping:
energy: TXXX:ENERGY # Custom field for energy
vibe: TXXX:VIBE # Custom field for vibe
placement: TXXX:PLACEMENT # Custom field for placement
events: TXXX:EVENTS # Custom field for events
sub_genre: TXXX:SUB_GENRE # Maps Beatport's sub-genre to a custom field
remixer: TXXX:REMIXER # Maps remixer metadata
mix_name: TXXX:MIX_NAME # Maps mix name (e.g., Extended Mix)
replace:
"[\\]": ""
"[_]": "-"
"[/]": "-"
^.: ""
"[\x00-\x1f]": ""
'[<>:"?*|]': ""
.$: ""
\s+$: ""
^\s+: ""
^-: ""
’: "'"
′: "'"
″: ""
zero:
fields: comments genre
update_database: yes
scrub:
auto: yes
fetchart:
auto: yes
minwidth: 100
maxwidth: 1000
enforce_ratio: yes
sources: itunes amazon coverart
store: no
embedart:
maxwidth: 1000
auto: yes
lyrics:
auto: yes
sources: genius musixmatch
inline:
item_fields:
remixer: |
import re
if title:
match = match = re.search(r'((.*?)\s+(Remix|Mix|Version))', title, re.IGNORECASE)
if match:
return match.group(1) # Extracts "Remixer Name"
return '' # Default to empty if no match is found
beatport4:
art: yes
art_overwrite: yes
username: sshambless
password: Youthknp90!
fields_to_fetch:
- title
- artist
- album
- bpm
- key
- genre
- sub_genre
- remixer
- mix_name
- label
- release_date
paths:
default: %bucket{$artist}/%substitute{$artist}/$title - $artist - |$year| |$bpm|
singleton: %bucket{$artist}/%substitute{$artist}/$title - $artist - |$year| |$bpm|
bucket:
bucket_alpha:
- "#-!"
- 0-9
- A
- B
- C
- D
- E
- F
- G
- H
- I
- J
- K
- L
- M
- N
- O
- P
- Q
- R
- S
- T
- U
- V
- W
- X
- Y
- Z
bucket_alpha_regex:
"#-!": "^[^0-9a-zA-ZåÅäÄöÖ]"
bucket_year: [] # Leave empty for no year-specific buckets
extrapolate: no # Do not create miscellaneous buckets
bucket_format: $artist # Use artist field for bucket categorization
ui:
color: yes
match:
strong_rec_thresh: 0.20 # Only accept matches with 85% or higher confidence
logging:
level: DEBUG
file: ~/.config/beets/beets.log
Beta Was this translation helpful? Give feedback.
All reactions