Skip to content

Commit 413d2e5

Browse files
committed
Split function to separate folder for episode name patch
1 parent d9571d1 commit 413d2e5

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

modules/episodename.groovy

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{" - "}{s00e00}
2+
{
3+
def invalid_chars = ['\\', '/', ':', '*', '?', '"', '<', '>', '|']
4+
def fixed_name = t.replaceAll(invalid_chars.collect { "\\" + it }.join('|'), '_')
5+
def epnum = any { e } { special }
6+
// check if fixed name length is more than 100, if so, empty it
7+
fixed_name = fixed_name.length() > 100 ? " " : " - $fixed_name "
8+
fixed_name == " - Episode $epnum " ? " " : fixed_name
9+
}

modules/filename_tv.groovy

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
11
@./releasegroup.groovy
22
@./medianame.groovy
3-
{" - "}{s00e00}
4-
{
5-
def invalid_chars = ['\\', '/', ':', '*', '?', '"', '<', '>', '|']
6-
def fixed_name = t.replaceAll(invalid_chars.collect { "\\" + it }.join('|'), '_')
7-
def epnum = any { e } { special }
8-
// check if fixed name length is more than 100, if so, empty it
9-
fixed_name = fixed_name.length() > 100 ? " " : " - $fixed_name "
10-
fixed_name == " - Episode $epnum " ? " " : fixed_name
11-
}
3+
@./episodename.groovy
124
@./filespec.groovy

0 commit comments

Comments
 (0)