beetbox / beetbox/beets

fromFilename Plugin: Does not update tags with AsIs actions.

Open
#5,413 0 comments 0 reactions 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

### Problem

Using the fromFilename plugin on music files with blank Title tags, and choosing "Use as-is" options, does not update the tags.

Source file:
![image](https://github.com/user-attachments/assets/5032ac01-6f69-4a06-8716-561d72bfc663)
```sh
$ beet import "D:\BeetsTest"
```
Imported file:
![image](https://github.com/user-attachments/assets/a36bb4f4-29be-452a-801a-f1ec0df253b6)

I need to use the "Use as-is" option because none of the MusicBrainz candidates match.
Passing -A does the same.
I want it to update the Title tag from the filename, without then choosing a candidate for incorrectly updating the tags. I'm not sure what the intended behavior of the plug-in is here.

I've managed to achieve this by adding the following to the end of `filename_task`, however this applies the tags to both the source file and the imported file.
```python
# Write the new tags now
for item in items:
item.try_write()
```

I guess a better solution is to set the action of the `manipulate_files` task to `action.RETAG`, but I don't know how to edit subsequent tasks from the plug-in.

### Setup

* OS: Windows 11
* Python version: 3.12.3
* beets version: 2.0.0
* Turning off plugins made problem go away (yes/no): n/a

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

```yaml
directory: D:\BeetsTest\Library
library: D:\BeetsTest\musiclibrary.db

ignore:
- Library # Being written to during import
- Various Artists

plugins: fromfilename
```

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.