Skip to content

Conversation

@henry-oberholtzer
Copy link
Member

This plugin aims to address the shortcomings of the %title function, as brought up in issues #152, #3298 and an initial look to improvement with #3411. It supplies a new string format command, %titlecase which doesn't interfere with any prior expected behavior of the %title format command.

It also adds the ability to apply titlecase logic to metadata fields that a user selects, which is useful if you, like me, are looking for stylistic consistency and the minor stylistic differences between Musizbrainz, Discogs, Deezer etc, with title case are slightly infuriating.

This will add an optional dependency of titlecase, which allows the titlecase core logic to be externally maintained.

If there's not enough draw to have this as a core plugin, I can also spin this into an independent one, but it seemed like a recurring theme that the %title string format didn't really behave as expected, and I wanted my metadata to match too.

  • 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. - Not 100% coverage, but didn't see a lot of other plugins with testing for import stages.

@henry-oberholtzer henry-oberholtzer requested a review from a team as a code owner October 26, 2025 23:47
@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.

sourcery-ai[bot]

This comment was marked as outdated.

super().__init__()

# Register template function
self.template_funcs["titlecase"] = self.titlecase # type: ignore
Copy link
Member Author

Choose a reason for hiding this comment

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

Could not get mypy to play nice with this type here - any suggestions appreciated.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant