Skip to content

Commit d9aab90

Browse files
committed
Fix redundant season numbering like in Disney Twisted-Wonderland
1 parent 4339ce5 commit d9aab90

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

modules/season.groovy

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
// if kv contains Series name from fixed_title (partially or fully), then remove it
1010
def kv = fixed_name.contains(fixed_title) ? "" : fixed_name
1111
// Sanitize the season name if it just repeats the "Season" string
12-
kv == 'Season '+ s || kv == 'Series '+ s ? "" : kv ? " - " + kv : ""
12+
// Also remove redundant "Season X - " or "Series X - " prefix from the season name
13+
kv = kv == 'Season '+ s || kv == 'Series '+ s ? "" : kv
14+
kv = kv.replaceAll(/^Season \d+ - /, '').replaceAll(/^Series \d+ - /, '')
15+
kv ? " - " + kv : ""
1316
}
1417
{"/"}

0 commit comments

Comments
 (0)