Jellyfin Forum
Script to replace dashes with colons in movie titles - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Guides, Walkthroughs & Tutorials (https://forum.jellyfin.org/f-guides-walkthroughs-tutorials)
+--- Thread: Script to replace dashes with colons in movie titles (/t-script-to-replace-dashes-with-colons-in-movie-titles)



Script to replace dashes with colons in movie titles - BenMcLean - 2023-09-07

I wrote a Python script to automate replacing dashes with colons in my Jellyfin movie titles and movie sort titles.
https://gist.github.com/BenMcLean/c6559e6ae5a19553cda2fc4f459231a7
What prompted me to write this is that I have a Jellyfin library entirely dedicated to concert films (and music/band related) but themoviedb metadata doesn't follow a consistent style guide on whether to use hypens or colons to separate the band name from the rest of the title, resulting in my library not consitsently showing things in alphabetical order. Changing all the titles (and sorttitles) to use just colons all the time fixes that. I chose colons because they take up less space visually.
The basic procedure shown in this script is generalizable to any automatic change you want to script for your .nfo metadata.