Skip to content

Commit

Permalink
Use Arrays instead regex string to check if its Anime/Donghua/Aeni
Browse files Browse the repository at this point in the history
  • Loading branch information
nattadasu committed Dec 3, 2024
1 parent a22f84a commit 569255a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
9 changes: 4 additions & 5 deletions modules/common_movie.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
@./r18_checker.groovy
{
// check Country of Origin
def cjk_countries = /(CN|JP|KR|KP|TW|HK)/
def cjkani_tags = /(aeni|donghua|anime)/
def is_anime = anime || info.Keywords =~ cjkani_tags || any {(genres =~ /Animation/ && country =~ cjk_countries)}{false} ? true : false

def cjk_countries = ["CN", "JP", "KR", "KP", "TW", "HK"]
def cjkani_tags = ["aeni", "donghua", "anime"]
def is_cjk = any { anime } { info.Keywords.findAll { it in cjkani_tags } } { cjk_countries.contains(country) } { false }
// Categorized path
is_anime ? "Anime Movies/" : "Movies/"
is_cjk && genres =~ /Animation/ ? "Anime Movies/" : "Movies/"
}
@./medianame.groovy
{" ("}{y}{") [tmdbid-"}{tmdbid}{"]/"}
Expand Down
9 changes: 4 additions & 5 deletions modules/common_tv.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
@./r18_checker.groovy
{
// check Country of Origin
def cjk_countries = /(CN|JP|KR|KP|TW|HK)/
def cjkani_tags = /(aeni|donghua|anime)/
def is_anime = anime || info.Keywords =~ cjkani_tags || (genres =~ /Animation/ && country =~ cjk_countries) ? true : false

def cjk_countries = ["CN", "JP", "KR", "KP", "TW", "HK"]
def cjkani_tags = ["aeni", "donghua", "anime"]
def is_cjk = any { anime } { info.Keywords.findAll { it in cjkani_tags } } { cjk_countries.contains(country) } { false }
// Categorized path
is_anime ? "Anime/" : "TV Series/"
is_cjk && genres =~ /Animation/ ? "Anime/" : "TV Series/"
}
@./medianame.groovy
@./forceshowid_tv.groovy
Expand Down

0 comments on commit 569255a

Please sign in to comment.