Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect capitalization #297

Open
pustinov88 opened this issue May 21, 2024 · 2 comments
Open

Incorrect capitalization #297

pustinov88 opened this issue May 21, 2024 · 2 comments

Comments

@pustinov88
Copy link

I am trying to use mnamer to rename TV episodes. By coincidence, the first shows I tried to rename showed a problem with capitalization.

Example 1: NCIS - mnamer changes it to Ncis
Example 2: Ghosts (US) - mnamer changes it to Ghosts (Us)

I expect shows like FBI or even ones with more fancy spelling will show similar issues, not even talking about titles. As far as I can tell, there is no way to get mnamer to use the name as retrieved from the provider (tvdb / tvmaze), or did I miss anything? Shouldn't these sources give the best indication on how to capitalize the show titles and episode names?

@pustinov88
Copy link
Author

Okay, https://github.com/jkwill87/mnamer/blob/main/mnamer/utils.py#L335 seems to cover FBI and CSI. It does show however that this is not a scalable solution, as e.g. adding US to it would break shows like The Last of Us.

Another annoying issue is with shows like M.A.S.H. or S.W.A.T. where the a is forced to be lowercase, making the show title S.W.a.T. during rename.

@pustinov88
Copy link
Author

Changing str_title_case to always return s immediately (i.e., skipping to "intelligently apply title case transformations to strings") fixes the immediate problem for me. The shows I renamed so far where all correct, whereas with the transformation there would have been various issues (e.g., https://www.tvmaze.com/episodes/2781751/swat-7x10-snafu).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant