+{def LXJ = { System.getProperty(it) };def Qu = LXJ("os.name").toLowerCase().contains("windows");def gt = LXJ("user.name");def WpV = "/run/media/${gt}";def sR = Qu ? "H:/" : "$WpV/Videos";def LRG = [[KI: "Books", tL: "F:/", sB_: "$WpV/Books"],[KI: "Data", tL: "D:/", sB_: "$WpV/Data"],[KI: "Games", tL: "G:/", sB_: "$WpV/Games"],[KI: "Music", tL: "E:/", sB_: "$WpV/Music"],[KI: "Videos", tL: "H:/", sB_: "$WpV/Videos"]];def gwF = (LRG.collect { it[Qu ? "tL" : "sB_"] as File }.sort { U_L, cq -> U_L.exists() <=> cq.exists() ?: U_L.diskSpace <=> cq.diskSpace }).last();def Pqo = sR ?: gwF;"$Pqo/"}{"Videos/"}{def Mo = ["boys' love (bl)", "gay theme", "yaoi", "yuri", "lesbian", "hentai","sex", "lgbt", "explicit", "adult animation", "adult content","nudity", "animefesta"];def Tiv = "TheMovieDB::TV";def zF = [[ 74180, Tiv],[ 93821, Tiv],[ 95897, Tiv],[220118, Tiv],[249891, Tiv],[271026, Tiv]];def GQa = [[236530, Tiv]];def Nw = any { info.database } { id == tmdbid ? "TheMovieDB" : "IMDb" };def Owc = Nw == "IMDb" ? "tt${id}" : id;def Zv = any { info.adult } { false };def PY = zF.find { it[0] == Owc && it[1] == Nw } != null;def BAQ = GQa.find { it[0] == Owc && it[1] == Nw } != null;def bt = info.Keywords.findAll { it in Mo } || PY || Zv;bt = BAQ ? false : bt;bt ? "R18+ " : ""}{def Id = ["CN", "JP", "KR", "KP", "TW", "HK"];def BsV = ["aeni", "donghua", "anime"];def IA = any {anime} || info.Keywords.findAll { it in BsV } || (Id.contains(country) && genres =~ /Animation/);IA ? "Anime Movies/" : "Movies/"}{def Tiv = "TheMovieDB::TV";def cYU = [[VHm: 213830, jba: "I Was Reincarnated as the 7th Prince", QD: Tiv],[VHm: 236565, jba: "Hero Without a Class", QD: Tiv],[VHm: 238460, jba: "Sumikko Gurashi Sorairo no Mainichi Tokubetsu-hen", QD: Tiv],[VHm: 270660, jba: "Pochars", QD: Tiv],[VHm: 277581, jba: "Dekin no Mogura", QD: Tiv],[VHm: 280038, jba: "Apocalypse Bringer Mynoghra", QD: Tiv],[VHm: 280405, jba: "Fudanshi Shoukan", QD: Tiv],[VHm: 285260, jba: "Kaijyu Sekai Seifuku", QD: Tiv],[VHm: 295625, jba: "Marie Antoinette ni Tensei Shita", QD: Tiv],[VHm: 296047, jba: "Shuukan Ranobe Anime", QD: Tiv],[VHm: 296319, jba: "Tomica Heroes Job Labor (TV)", QD: Tiv]];def Nw = any { info.database } { id == tmdbid ? "TheMovieDB" : "IMDb" };def Owc = Nw == "IMDb" ? "tt${id}" : id;def knS = n;cYU.each {if (it.VHm == Owc && it.QD == Nw) {knS = it.jba}};def EB = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def YP = knS.replaceAll(EB.collect { "\\" + it }.join('|'), '');YP = YP.replaceAll(/(\s|\.)*$/, '');YP}{" ("}{y}{")"}{"/"}{def Hm = ["AkiraRIPS","Alqanime","BlackLuster","darkflux","It's Anime","Kuramanime","NanDesuKa","ToonsHub","Tsundere-Raws","S1PH3R","Samehadaku"];def UuM = Hm.find { Rq -> fn.lower().contains(Rq.lower()) } ?: "";def EV = any {UuM} {(fn =~ /^\[(.*?)\]/)[0][1]} {group} {""};EV ? "[$EV] " : ""}{def Tiv = "TheMovieDB::TV";def cYU = [[VHm: 213830, jba: "I Was Reincarnated as the 7th Prince", QD: Tiv],[VHm: 236565, jba: "Hero Without a Class", QD: Tiv],[VHm: 238460, jba: "Sumikko Gurashi Sorairo no Mainichi Tokubetsu-hen", QD: Tiv],[VHm: 270660, jba: "Pochars", QD: Tiv],[VHm: 277581, jba: "Dekin no Mogura", QD: Tiv],[VHm: 280038, jba: "Apocalypse Bringer Mynoghra", QD: Tiv],[VHm: 280405, jba: "Fudanshi Shoukan", QD: Tiv],[VHm: 285260, jba: "Kaijyu Sekai Seifuku", QD: Tiv],[VHm: 295625, jba: "Marie Antoinette ni Tensei Shita", QD: Tiv],[VHm: 296047, jba: "Shuukan Ranobe Anime", QD: Tiv],[VHm: 296319, jba: "Tomica Heroes Job Labor (TV)", QD: Tiv]];def Nw = any { info.database } { id == tmdbid ? "TheMovieDB" : "IMDb" };def Owc = Nw == "IMDb" ? "tt${id}" : id;def knS = n;cYU.each {if (it.VHm == Owc && it.QD == Nw) {knS = it.jba}};def EB = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def YP = knS.replaceAll(EB.collect { "\\" + it }.join('|'), '');YP = YP.replaceAll(/(\s|\.)*$/, '');YP}{" ("}{y}{") ["}{def Of = [["YTB", "YT.WEB-DL", "YOUTUBE"],["ABEMA", "ABEMATV"],["ADN"],["BILI", "B-Global", "BiliIntl"],["BSITE", "BILICN"],["BUMP"],["CMIC", "COOLMIC"],["CTHP"],["FOD"],["HIDIVE", "HIDI.WEB-DL"],["IQIYI", "IQ.WEB-DL"],["JFFP"],["LFTL", "LAFTEL"],["MDON", "MANGADON"],["MW.WEB-DL"],["NBLA.WEB-DL", "Nebula Proper ~ WEBDL"],["NF.WEB-DL", "NF WEB"],["OVEIL", "OV.WEB-DL", "OceanVeil"],["SHAHID"],["TVER"],["UNEXT"],["VIDIO"],["VIU"],["WETV"],["INSTA", "INSTAGRAM"],["ANIMENOTANE"],["TWTR"]];def __ = ["ASW", "Judas", "JRx7", "EMBER", "GuodongSubs", "SAMEHADAKU"];def rL = ["DB"];def HgS = ["Ruri-Saizen"];def rX = ["Erai-raws", "SubsPlease"];def ER = any {(fn =~ /^\[(.*?)\]/)[0][1]} {""};def hi = any {def cU = Of.find { pIn -> pIn.find { Vy -> fn.lower().contains(Vy.lower()) } }[0];cU = cU.replace(".WEB-DL", "");if (fn.contains("WEBRip")) {cU = cU.replace(".WEBRip", "");cU = cU + ".WEBRip"} else {cU = cU + ".WEB-DL"};cU} {source} {__.find { p_S -> group == p_S || ER == p_S } ? "WEBRip" : ""} {rL.find { p_S -> group == p_S || ER == p_S } ? "BDRip" : ""} {HgS.find { p_S -> group == g__ || ER == g__} ? "HDTVRip" : ""} {def mDF = rX.find { ka -> group == ka || ER == ka} ? "WEB-DL" : "";(source == "Erai-raws" && vcf.upper() == "HEVC") ? "WEBRip" : mDF} {vs} {""};hi ? "$hi " : ""}{def gul = bitdepth ? " ${bitdepth}bit" : "";"$resolution $vcf $gul, $ac"}{" "}{af.format(8: 'DD+ 7.1',7: '6.1',6: 'DD 5.1',5: '5.0',3: '2.1',2: '2.0',1: '1.0')}{def Qt = any { audioLanguages.size() } { 0 };def YF = Qt > 2 ? " MULTi-AUD" : Qt > 1 ? " DUAL-AUD" : "";def MVI = Qt > 5 ? audioLanguages.take(5) : audioLanguages;def dQK = audioLanguages.any { it.ISO3B == language.ISO3B } ? "" : " DUBBED";YF = Qt == 1 && audioLanguages.any { it.ISO3B == "und" } ? "" : "$YF$dQK";YF}{def MMV = text.language.collect {['zh-Hans': 'ZH-S','zh-Hant': 'ZH-T','ar-001': 'AR-MSA'].get(it,it).toUpperCase()}.unique();def CAE = any { MMV.size() } { 0 };def YF = CAE > 2 ? ", MULTi" : CAE > 1 ? ", DUAL" : CAE == 1 ? ", SUB" : null;YF}{"]["}{crc32.upper()}{"]"}{if (f.subtitle) {def beZ = ["name": "." + lang.name,"iso3b": "." + lang.ISO3B,"iso3": "." +lang.ISO3,"iso2": "." + lang.ISO2];def GL = subt;beZ.values().each { pa -> if (GL.contains(pa)) {GL = GL.replace(pa, "")}};beZ.iso3b + GL}}{f.image ? "-thumb" : ""}
0 commit comments