-{def aH = { System.getProperty(it) };def dhG = aH("os.name").toLowerCase().contains("windows");def Ip = aH("user.name");def DPq = "/run/media/${Ip}";def Ri = dhG ? "H:/" : "$DPq/Videos";def CzI = [[LY: "Books", Bvd: "F:/", gK: "$DPq/Books"],[LY: "Data", Bvd: "D:/", gK: "$DPq/Data"],[LY: "Games", Bvd: "G:/", gK: "$DPq/Games"],[LY: "Music", Bvd: "E:/", gK: "$DPq/Music"],[LY: "Videos", Bvd: "H:/", gK: "$DPq/Videos"]];def cHu = (CzI.collect { it[dhG ? "Bvd" : "gK"] as File }.sort { mL, _uH -> mL.exists() <=> _uH.exists() ?: mL.diskSpace <=> _uH.diskSpace }).last();def Ox = Ri ?: cHu;"$Ox/"}{"Videos/"}{def RSy = ["boys' love (bl)", "gay theme", "yaoi", "yuri", "lesbian", "hentai","sex", "lgbt", "explicit", "adult animation", "adult content","nudity"];def Ogj = "TheMovieDB::TV";def TNJ = [[ 74180, Ogj],[ 93821, Ogj],[ 95897, Ogj],[220118, Ogj],[271026, Ogj]];def nA = [[236530, Ogj]];def Ll = any { info.database } { id == tmdbid ? "TheMovieDB" : "IMDb" };def WLN = Ll == "IMDb" ? "tt${id}" : id;def AeO = any { info.adult } { false };def SWj = TNJ.find { it[0] == WLN && it[1] == Ll } != null;def pX = nA.find { it[0] == WLN && it[1] == Ll } != null;def na = info.Keywords.findAll { it in RSy } || SWj || AeO;na = pX ? false : na;na ? "R18+ " : ""}{def uD = ["CN", "JP", "KR", "KP", "TW", "HK"];def Fhb = ["aeni", "donghua", "anime"];def Ss = any {anime} || info.Keywords.findAll { it in Fhb } || (uD.contains(country) && genres =~ /Animation/);Ss ? "Anime Movies/" : "Movies/"}{def Ogj = "TheMovieDB::TV";def eVC = [[FY: 68854, upG: "From Me to You", lgn: Ogj],[FY: 219816, upG: "Fate Grand Order Fujimaru Ritsuka Doesn't Get It", lgn: Ogj],[FY: 245561, upG: "Okitsura", lgn: Ogj],[FY: 248707, upG: "Neko Oji The Guy That Got Reincarnated As a Cat", lgn: Ogj],[FY: 259559, upG: "Headhunted to Another World", lgn: Ogj],[FY: 261301, upG: "Botsuraku Kizoku", lgn: Ogj],[FY: 262141, upG: "Can You Keep a Secret", lgn: Ogj],[FY: 270657, upG: "Tono to Inu", lgn: Ogj],[FY: 276204, upG: "Bogus Skill Fruitmaster", lgn: Ogj]];def Ll = any { info.database } { id == tmdbid ? "TheMovieDB" : "IMDb" };def WLN = Ll == "IMDb" ? "tt${id}" : id;def RQ = n;eVC.each {if (it.FY == WLN && it.lgn == Ll) {RQ = it.upG}};def DLR = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def Xi = RQ.replaceAll(DLR.collect { "\\" + it }.join('|'), '');Xi = Xi.replaceAll(/(\s|\.)*$/, '');Xi}{" ("}{y}{")"}{"/"}{def Vd = ["Alqanime","BlackLuster","darkflux","Kuramanime","NanDesuKa","ToonsHub","Tsundere-Raws","S1PH3R","Samehadaku"];def uKh = Vd.find { uoz -> fn.lower().contains(uoz.lower()) } ?: "";def eS = any {(fn =~ /^\[(.*?)\]/)[0][1]} {uKh} {group} {""};eS ? "[$eS] " : ""}{def Ogj = "TheMovieDB::TV";def eVC = [[FY: 68854, upG: "From Me to You", lgn: Ogj],[FY: 219816, upG: "Fate Grand Order Fujimaru Ritsuka Doesn't Get It", lgn: Ogj],[FY: 245561, upG: "Okitsura", lgn: Ogj],[FY: 248707, upG: "Neko Oji The Guy That Got Reincarnated As a Cat", lgn: Ogj],[FY: 259559, upG: "Headhunted to Another World", lgn: Ogj],[FY: 261301, upG: "Botsuraku Kizoku", lgn: Ogj],[FY: 262141, upG: "Can You Keep a Secret", lgn: Ogj],[FY: 270657, upG: "Tono to Inu", lgn: Ogj],[FY: 276204, upG: "Bogus Skill Fruitmaster", lgn: Ogj]];def Ll = any { info.database } { id == tmdbid ? "TheMovieDB" : "IMDb" };def WLN = Ll == "IMDb" ? "tt${id}" : id;def RQ = n;eVC.each {if (it.FY == WLN && it.lgn == Ll) {RQ = it.upG}};def DLR = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def Xi = RQ.replaceAll(DLR.collect { "\\" + it }.join('|'), '');Xi = Xi.replaceAll(/(\s|\.)*$/, '');Xi}{" ("}{y}{") ["}{def CZP = [["ABEMA"],["ADN"],["BILI", "B-Global", "BiliIntl", "B-Site", "BiliCN"],["COOLMIC"],["HIDIVE", "HIDI.WEB-DL"],["IQIYI", "IQ.WEB-DL"],["JFFP"],["LAFTEL", "LFTL"],["MDON", "MANGADON"],["MW.WEB-DL"],["NF.WEB-DL", "NF WEB"],["SHAHID"],["TVER"],["UNEXT"],["WETV"],["YTB", "YT.WEB-DL", "YOUTUBE"]];def bDT = ["ASW", "Judas", "JRx7", "EMBER", "GuodongSubs", "SAMEHADAKU"];def yO = ["Erai-raws", "SubsPlease"];def cW = any {(fn =~ /^\[(.*?)\]/)[0][1]} {""};def UzW = any {def jtC = CZP.find { kb -> kb.find { hPJ -> fn.lower().contains(hPJ.lower()) } }[0];jtC = jtC.replace(".WEB-DL", "");if (fn.contains("WEBRip")) {jtC = jtC.replace(".WEBRip", "");jtC = jtC + ".WEBRip"} else {jtC = jtC + ".WEB-DL"};jtC} {source} {bDT.find { MsM -> group == MsM || cW == MsM } ? "WEBRip" : ""} {def YPo = yO.find { qU -> group == qU || cW == qU} ? "WEB-DL" : "";(source == "Erai-raws" && vcf.upper() == "HEVC") ? "WEBRip" : YPo} {vs} {""};UzW ? "$UzW " : ""}{def PH = bitdepth ? " ${bitdepth}bit" : "";"$resolution $vcf $PH, $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 Qhz = " Dub";def Tr = audioLanguages.any { it.ISO3B == language.ISO3B } ? "" : Qhz;Tr = audioLanguages.size() == 1 && audioLanguages.any { it.ISO3B == "und" } ? "" : Tr;Tr}{def Uo = any { audioLanguages.size() } { 0 };def Tr = Uo > 2 ? " MAud" : Uo > 1 ? " DAud" : null;def HWZ = Uo > 5 ? audioLanguages.take(5) : audioLanguages;Tr ? Tr + HWZ.joining(" ", " (", "").upper() + (Uo > 5 ? " ...)" : ")") : ""}{def BsJ = any { textLanguages.size() } { 0 };def Tr = BsJ > 2 ? ", MSub" : BsJ > 1 ? ", DSub" : null;def HWZ = BsJ > 5 ? textLanguages.take(5) : textLanguages;Tr ? Tr + HWZ.joining(" ", " (", "").upper() + (BsJ > 5 ? " ...)" : ")") : ""}{"]["}{crc32.upper()}{"]"}{if (f.subtitle) {def bh = ["name": "." + lang.name,"iso3b": "." + lang.ISO3B,"iso3": "." +lang.ISO3,"iso2": "." + lang.ISO2];def kQ = subt;bh.values().each { Amz -> if (kQ.contains(Amz)) {kQ = kQ.replace(Amz, "")}};bh.iso3b + kQ}}{f.image ? "-thumb" : ""}
0 commit comments