diff --git a/modules/common_movie.groovy b/modules/common_movie.groovy index c5d8ed7..a369f49 100644 --- a/modules/common_movie.groovy +++ b/modules/common_movie.groovy @@ -1,3 +1,5 @@ +{"Videos/"} +@./r18_checker.groovy { // check Country of Origin def cjk_countries = /(CN|JP|KR|KP|TW|HK)/ @@ -5,8 +7,7 @@ def is_anime = anime || info.Keywords =~ cjkani_tags || any {(genres =~ /Animation/ && country =~ cjk_countries)}{false} ? true : false // Categorized path - def cust_cat = is_anime ? "Videos/Anime " : "Videos/" - "$cust_cat" + "Movies/" + is_anime ? "Anime Movies/" : "Movies/" } @./medianame.groovy {" ("}{y}{") [tmdbid-"}{tmdbid}{"]/"} diff --git a/modules/common_tv.groovy b/modules/common_tv.groovy index efbf032..e689d74 100644 --- a/modules/common_tv.groovy +++ b/modules/common_tv.groovy @@ -1,3 +1,5 @@ +{"Videos/"} +@./r18_checker.groovy { // check Country of Origin def cjk_countries = /(CN|JP|KR|KP|TW|HK)/ @@ -5,7 +7,7 @@ def is_anime = anime || info.Keywords =~ cjkani_tags || (genres =~ /Animation/ && country =~ cjk_countries) ? true : false // Categorized path - is_anime ? "Videos/Anime/" : "Videos/TV Series/" + is_anime ? "Anime/" : "TV Series/" } @./medianame.groovy @./forceshowid_tv.groovy diff --git a/modules/r18_checker.groovy b/modules/r18_checker.groovy new file mode 100644 index 0000000..14709c5 --- /dev/null +++ b/modules/r18_checker.groovy @@ -0,0 +1,20 @@ +{ + // list of possibly R18+ tags + def known_tags = [ + "boys' love (bl)", "gay theme", "yaoi", "yuri", "lesbian", "hentai", + "hentai", "sex", "lgbt", "explicit", "adult animation", "adult content", + ] + + // Manual list of known R18+ titles, only add if the title is known to be R18+ + // or have a variant that is R18+ + def known_titles = [ + 271026, // Taisho Era Contract Marriage, 2024 + 220118, // Sazanami Soushi ni Junketsu wo Sasagu, 2023 + ] + + // REQUIRES USER TO SET ADDITIONAL PROPERTY ON FILEBOT + // READ: https://www.filebot.net/forums/viewtopic.php?p=58610#p58610 + def is_adult = any { info.adult } { false } + def is_r18 = any { info.Keywords.findAll { it in known_tags } } { id in known_titles } { is_adult } + is_r18 ? "R18+ " : "" +} \ No newline at end of file