diff --git a/modules/medianame.groovy b/modules/medianame.groovy index 2f61a23..6eeb1b1 100644 --- a/modules/medianame.groovy +++ b/modules/medianame.groovy @@ -14,9 +14,10 @@ // Replace title from short_title if series_id matches "series" from filebot // Otherwise, use the original name def database = any { info.database } { "IMDb" } + def fixed_id = database == "IMDb" ? "tt${id}" : id def name_ = n short_title.each { - if (it.mid == id && it.src == database) { + if (it.mid == fixed_id && it.src == database) { name_ = it.title } } diff --git a/modules/r18_checker.groovy b/modules/r18_checker.groovy index b8f2458..033df4a 100644 --- a/modules/r18_checker.groovy +++ b/modules/r18_checker.groovy @@ -19,13 +19,18 @@ [236530, tmdb_tv] // How I Attended an All-Guy's Mixer, 2024 ] + def database = any { info.database } { "IMDb" } + def fixed_id = database == "IMDb" ? "tt${id}" : id + // 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_same_id = known_titles.find { it[0] == id && it[1] == info.database } != null - def is_adult_override = override_tag.find { it[0] == id && it[1] == info.database } != null - is_same_id = is_adult_override ? false : is_same_id + def is_same_id = known_titles.find { it[0] == fixed_id && it[1] == database } != null + def is_adult_override = override_tag.find { it[0] == fixed_id && it[1] == database } != null def is_r18 = info.Keywords.findAll { it in known_tags } || is_same_id || is_adult + + // Apply R18+ tag to the path name + is_r18 = is_adult_override ? false : is_r18 is_r18 ? "R18+ " : "" } \ No newline at end of file