Skip to content

library: add subtitle (id3 TIT3) field#5696

Open
daniele-athome wants to merge 1 commit intobeetbox:masterfrom
daniele-athome:master
Open

library: add subtitle (id3 TIT3) field#5696
daniele-athome wants to merge 1 commit intobeetbox:masterfrom
daniele-athome:master

Conversation

@daniele-athome
Copy link

@daniele-athome daniele-athome commented Mar 28, 2025

Description

Adds support for a subtitle field, corresponding to the TIT3 id3 tag. Requires beetbox/mediafile#82

I don't think tests are required for this - I can't really see a comprehensive test suite for all available fields - but I might be wrong.

I'll add the changelog entry after your review.

To Do

  • Documentation. (If you've added a new command-line flag, for example, find the appropriate page under docs/ to describe it.)
  • Changelog. (Add an entry to docs/changelog.rst to the bottom of one of the lists near the top of the document.)
  • Tests. (Very much encouraged but not strictly required.)

@github-actions
Copy link

Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry.

@daniele-athome daniele-athome marked this pull request as ready for review March 28, 2025 09:18
@github-actions
Copy link

Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • docs/reference/pathformat.rst: Language not supported

@michaelkrieger
Copy link
Contributor

The musicbrainz plugin should also be updated to pull the field and populate it as well.

Did this addition stall? Seems increasingly commonly used with Picard and now Navidrome’s metadata enhancements.

@daniele-athome
Copy link
Author

Did this addition stall?

I don't know... there are frequent commits on the main branch but some PRs are ignored. There must surely be a reason but the core devs would have to share that. Or they simply forgot about this :-)

Copy link
Member

@snejus snejus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a comment. I reckon this change should be included in the changelog too

@daniele-athome
Copy link
Author

I added a changelog entry.

@snejus
Copy link
Member

snejus commented Aug 2, 2025

Aw snap just realised this depends on an unmerged PR in mediafile repo :/

@snejus snejus self-requested a review August 2, 2025 21:47
semohr added a commit to beetbox/mediafile that referenced this pull request Sep 30, 2025
This PR adds support for a subtitle field for MP3 (ID3v2 "TIT3") and
ASF. Reference for an MP4 tag missing.

Required by beetbox/beets#5696
semohr added a commit to beetbox/mediafile that referenced this pull request Sep 30, 2025
This PR adds support for a subtitle field for MP3 (ID3v2 "TIT3") and
ASF. Reference for an MP4 tag missing.

Required by beetbox/beets#5696
semohr added a commit to beetbox/mediafile that referenced this pull request Sep 30, 2025
This PR adds support for a subtitle field for MP3 (ID3v2 "TIT3") and
ASF. Reference for an MP4 tag missing.

Required by beetbox/beets#5696
@semohr
Copy link
Contributor

semohr commented Sep 30, 2025

I just merged beetbox/mediafile#82 🙃. You up to rebase and revive this?

@daniele-athome
Copy link
Author

Rebased!! 🚀

@semohr
Copy link
Contributor

semohr commented Sep 30, 2025

Awesome! Let me see if I'm able to create a new mediafile version and how to do that 😨

@semohr
Copy link
Contributor

semohr commented Sep 30, 2025

I don't think I'm able to do a version bump for mediafile. I raised the issue in our internal chat tho. We will have to wait some more, sorry 🙈

@daniele-athome
Copy link
Author

Hi there! Any luck in releasing a new version of mediafile? We are like a meter from the finish line! 😄

I'm ready to rebase this whenever needed.

@semohr
Copy link
Contributor

semohr commented Oct 15, 2025

We should be able to do that in the near future 🎉 We sill need to create a (maintainable) release workflow but other than that we should be able to create a release.

@snejus
Copy link
Member

snejus commented Dec 28, 2025

@daniele-athome new mediafile version 0.14.0 has been released, try updating with

$ uv tool run 'poetry<2' update mediafile

@daniele-athome
Copy link
Author

On it!

@JOJ0 JOJ0 added the core Pull requests that modify the beets core `beets` label Jan 10, 2026
@daniele-athome daniele-athome force-pushed the master branch 2 times, most recently from 0e58122 to 50f6600 Compare January 17, 2026 21:05
@daniele-athome
Copy link
Author

It took some time - sorry, life got in the way - but I'm finally there. Rebased on latest master and mediafile upgraded.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually wanted to ask about the following:

  • Add support for importing and writing

It doesn't seem like this PR adds support for importing this field? Currently, this field is ignored - it can only be populated manually using beet modify ... subtitle=....

What is your use case for it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't work when importing metadata from an external source (e.g. MusicBrainz), but it worked for importing the field from source files (e.g. an existing TIT3 field in an mp3 file).

My specific use case was to edit the field after import (I wanted to remove it).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you considered removing this field from your music files before importing them?

For mp3 files you could use id3v2 --remove-frame TIT3 <files> and for flacs you may use metaflac --remove-tag SUBTITLE

Copy link
Author

@daniele-athome daniele-athome Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did consider it, but since I use beets for anything related to my music collection, I thought it would be nice to implement it directly in beets and contribute it.

I know this is not 100% complete (because there is no way to actually import the field from sources, e.g. MusicBrainz), but it can pave the way for the next person to implement that (or I might even implement it myself if I find the time).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I share that concern. Adding a field to the core database just to remove it feels wrong architecturally.

The scrub plugin is designed exactly for this—stripping unwanted metadata before writing. But it has a limitation: it removes all unknown tags, with no way to selectively target specific ones.

Your actual need is granular control: remove TIT3 without touching other tags. Neither scrub nor zero supports that today.[4][5]

Rather than adding subtitle to the schema, consider extending scrub with a blacklist option to remove specific frames by name. Something like:[3]

scrub:
  auto: yes
  remove_frames: [TIT3, COMM, USLT]

This solves the problem cleanly for anyone managing legacy metadata, not just subtitle fields. It's also better than shelling out to id3v2 or metaflac externally.

What do you think?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than adding subtitle to the schema, consider extending scrub with a blacklist option to remove specific frames by name.

It's a nice idea and I might do that as well, another time.

I share that concern. Adding a field to the core database just to remove it feels wrong architecturally.

After your explanation about scrub, I totally agree. Does that mean that you are considering not adding support for the field in beets afterall? Despite its intended use by me, the new field can be used for importing (given someone - or myself - implement it in the MusicBrainz plugin for example).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I was about to rebase again but at this point I think I'll wait for an answer before doing it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Pull requests that modify the beets core `beets`

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Comments