beetbox / beetbox/beets

FromFilename Plugin don't work at all

Open
#5,597 0 comments 1 reaction 1 assignee Claimed by @henry-oberholtzer View on GitHub
fromfilename
Dominant language
Python
Stars
15.7k
Forks
2.1k
Avg merge
4d 21h
Merged PRs (30d)
31

Description

I have flac files without any tags but the folder and file naming are good.

The ARTIST and ALBUM is on musicbrainz and show up after manual search.

I don't know if there's need of more [PATTERNS](https://github.com/beetbox/beets/blob/bcc91ffff5a38794897e98f5284989039909717b/beetsplug/fromfilename.py#L26) or if it because the plugin don't consider the [track as empty](https://github.com/beetbox/beets/blob/bcc91ffff5a38794897e98f5284989039909717b/beetsplug/fromfilename.py#L39) ?

**Foldername:** `ARTIST - ALBUM`
**Filename:** `01 ARTIST - TRACK.flac `

**metaflac --list 01 ARTIST - TRACK.flac**

```
METADATA block #0
type: 0 (STREAMINFO)
is last: false
length: 34
minimum blocksize: 4096 samples
maximum blocksize: 4096 samples
minimum framesize: 14 bytes
maximum framesize: 10805 bytes
sample_rate: 44100 Hz
channels: 2
bits-per-sample: 16
total samples: 6920760
MD5 signature:
METADATA block #1
type: 4 (VORBIS_COMMENT)
is last: false
length: 47
vendor string: reference libFLAC
comments: 0
METADATA block #2
type: 1 (PADDING)
is last: true
length: 8192
```

**beet -vv import ARTIST - ALBUM**

```
user configuration: /home/user/.config/beets/config.yaml
data directory: /home/user/.config/beets
plugin paths: /home/user/git/beets/beetsplug
Sending event: pluginload
library database: /home/user/.config/beets/beets.db
library directory: /home/user/musik2
Sending event: library_opened
Sending event: import_begin
Sending event: import_task_created
Sending event: import_task_start
fromfilename: Title replaced with: ARTIST - TRACK
fromfilename: Track replaced with: 1
Looking up: /home/user/musik2/ARTIST - TRACK
Tagging -
No album ID found.
Search terms: -
Additional search terms: {'year': 0, 'label': '', 'catalognum': '', 'country': '', 'media': ''}
Album might be VA: True
Evaluating 0 candidates.

/home/user/musik2/ARTIST - TRACK (1 items)
Sending event: import_task_before_choice
Sending event: before_choose_candidate
No matching release found for 1 tracks.
For help, see: https://beets.readthedocs.org/en/latest/faq.html#nomatch
➜ [S]kip, Use as-is, as Tracks, Group albums, Enter search, enter Id, aBort? B
Sending event: import
Sending event: cli_exit
```

Important here are the two line
```
fromfilename: Title replaced with: ARTIST - TRACK
fromfilename: Track replaced with: 1
```
ARTIST - TRACK arent't the Title(TRACK) of course so the plugin don't even interest in ARTIST!?

### Setup

beets version 1.6.1
Python version 3.13.1
plugins: fromfilename

My configuration (output of `beet config`) is:

```yaml
library: ~/.config/beets/beets.db
directory: ~/musik2/
threaded: yes
import:
write: yes
copy: no
resume: no

musicbrainz:
enabled: yes
host: musicbrainz.org
https: yes
extra_tags: [year, catalognum, country, media, label]

plugins: fromfilename

pluginpath:
- /home/user/git/beets/beetsplug/
```

Thanks !

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.