Page 1 of 1

I get: Gabby Hayes Show (1956), The

Posted: 15 Jul 2025, 15:46
by DigidocTN
Again, almost perfect. { n.replaceFirst(/^(?i)(The|A|An)\s(.+)/, /$2, $1/) }

I have a show: The Gabby Hayes Show (1956) and using the code above, I get: Gabby Hayes Show (1956), The.

Is it possible to insert The before the date (1956) instead of after?

Re: [SNIPPET] Sort Name

Posted: 15 Jul 2025, 15:59
by rednoah
:idea: If you use TheMovieDB then the series name {n} will never include the series year and thus { n.sortName('$2, $1') } will always work as expected.

:idea: If you use TheTVDB then the series name {n} may include the series year as part of the series name. In this case we can use replaceTrailingBrackets() to remove the (1956) from the series name:

Format: Select all

{ n.replaceTrailingBrackets().sortName('$2, $1') }