Skip to content

Commit

Permalink
Add R18+ Marker
Browse files Browse the repository at this point in the history
  • Loading branch information
nattadasu committed Dec 3, 2024
1 parent 6a6dbd2 commit e425106
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
5 changes: 3 additions & 2 deletions modules/common_movie.groovy
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{"Videos/"}
@./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

// Categorized path
def cust_cat = is_anime ? "Videos/Anime " : "Videos/"
"$cust_cat" + "Movies/"
is_anime ? "Anime Movies/" : "Movies/"
}
@./medianame.groovy
{" ("}{y}{") [tmdbid-"}{tmdbid}{"]/"}
Expand Down
4 changes: 3 additions & 1 deletion modules/common_tv.groovy
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{"Videos/"}
@./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

// Categorized path
is_anime ? "Videos/Anime/" : "Videos/TV Series/"
is_anime ? "Anime/" : "TV Series/"
}
@./medianame.groovy
@./forceshowid_tv.groovy
Expand Down
20 changes: 20 additions & 0 deletions modules/r18_checker.groovy
Original file line number Diff line number Diff line change
@@ -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+ " : ""
}

0 comments on commit e425106

Please sign in to comment.