-{def LIs = { System.getProperty(it) };def vdc = LIs("os.name").toLowerCase().contains("windows");def Ar = LIs("user.name");def ZGA = "/run/media/${Ar}";def tY = vdc ? "H:/" : "$ZGA/Videos";def WEj = [[VLd: "Books", EFJ: "F:/", dWp: "$ZGA/Books"],[VLd: "Data", EFJ: "D:/", dWp: "$ZGA/Data"],[VLd: "Games", EFJ: "G:/", dWp: "$ZGA/Games"],[VLd: "Music", EFJ: "E:/", dWp: "$ZGA/Music"],[VLd: "Videos", EFJ: "H:/", dWp: "$ZGA/Videos"]];def JPS = (WEj.collect { it[vdc ? "EFJ" : "dWp"] as File }.sort { FMo, XEK -> FMo.exists() <=> XEK.exists() ?: FMo.diskSpace <=> XEK.diskSpace }).last();def C_P = tY ?: JPS;"$C_P/"}{"Videos/"}{def TD = ["boys' love (bl)", "gay theme", "yaoi", "yuri", "lesbian", "hentai","sex", "lgbt", "explicit", "adult animation", "adult content","nudity", "animefesta"];def ryK = "TheMovieDB::TV";def WlG = [[ 74180, ryK],[ 93821, ryK],[ 95897, ryK],[220118, ryK],[249891, ryK],[271026, ryK]];def yNU = [[236530, ryK]];def QG = any { info.database } { id == tmdbid ? "TheMovieDB" : "IMDb" };def Hs = QG == "IMDb" ? "tt${id}" : id;def AO = any { info.adult } { false };def kFT = WlG.find { it[0] == Hs && it[1] == QG } != null;def Sr = yNU.find { it[0] == Hs && it[1] == QG } != null;def _Jv = info.Keywords.findAll { it in TD } || kFT || AO;_Jv = Sr ? false : _Jv;_Jv ? "R18+ " : ""}{def cVD = ["CN", "JP", "KR", "KP", "TW", "HK"];def Be = ["aeni", "donghua", "anime"];def eh = any {anime} || info.Keywords.findAll { it in Be } || (cVD.contains(country) && genres =~ /Animation/);eh ? "Anime Movies/" : "Movies/"}{def ryK = "TheMovieDB::TV";def Bo = [[tEU: 213830, wRk: "I Was Reincarnated as the 7th Prince", H_s: ryK],[tEU: 221165, wRk: "Hyakusho Kizoku", H_s: ryK],[tEU: 236565, wRk: "Hero Without a Class", H_s: ryK],[tEU: 238460, wRk: "Sumikko Gurashi Sorairo no Mainichi Tokubetsu-hen", H_s: ryK],[tEU: 262453, wRk: "The Fated Magical Princess", H_s: ryK],[tEU: 270660, wRk: "Pochars", H_s: ryK],[tEU: 277581, wRk: "Dekin no Mogura", H_s: ryK],[tEU: 278635, wRk: "Unlimited Gacha", H_s: ryK],[tEU: 280038, wRk: "Apocalypse Bringer Mynoghra", H_s: ryK],[tEU: 280405, wRk: "Fudanshi Shoukan", H_s: ryK],[tEU: 285260, wRk: "Kaijyu Sekai Seifuku", H_s: ryK],[tEU: 295625, wRk: "Marie Antoinette ni Tensei Shita", H_s: ryK],[tEU: 296047, wRk: "Shuukan Ranobe Anime", H_s: ryK],[tEU: 296319, wRk: "Tomica Heroes Job Labor (TV)", H_s: ryK],[tEU: 297286, wRk: "Potions Will Save Me", H_s: ryK],[tEU: 302169, wRk: "Anila and Cocora", H_s: ryK]];def QG = any { info.database } { id == tmdbid ? "TheMovieDB" : "IMDb" };def Hs = QG == "IMDb" ? "tt${id}" : id;def cM = n;Bo.each {if (it.tEU == Hs && it.H_s == QG) {cM = it.wRk}};def He = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def nR = cM.replaceAll(He.collect { "\\" + it }.join('|'), '');nR = nR.replaceAll(/(\s|\.)*$/, '');nR}{" ("}{y}{")"}{"/"}{def pO = ["AkiraRIPS","Alqanime","BlackLuster","darkflux","It's Anime","Kuramanime","NanDesuKa","ToonsHub","Tsundere-Raws","S1PH3R","Samehadaku"];def ia = pO.find { pQO -> fn.lower().contains(pQO.lower()) } ?: "";def PHJ = any {ia} {(fn =~ /^\[(.*?)\]/)[0][1]} {group} {""};PHJ ? "[$PHJ] " : ""}{def ryK = "TheMovieDB::TV";def Bo = [[tEU: 213830, wRk: "I Was Reincarnated as the 7th Prince", H_s: ryK],[tEU: 221165, wRk: "Hyakusho Kizoku", H_s: ryK],[tEU: 236565, wRk: "Hero Without a Class", H_s: ryK],[tEU: 238460, wRk: "Sumikko Gurashi Sorairo no Mainichi Tokubetsu-hen", H_s: ryK],[tEU: 262453, wRk: "The Fated Magical Princess", H_s: ryK],[tEU: 270660, wRk: "Pochars", H_s: ryK],[tEU: 277581, wRk: "Dekin no Mogura", H_s: ryK],[tEU: 278635, wRk: "Unlimited Gacha", H_s: ryK],[tEU: 280038, wRk: "Apocalypse Bringer Mynoghra", H_s: ryK],[tEU: 280405, wRk: "Fudanshi Shoukan", H_s: ryK],[tEU: 285260, wRk: "Kaijyu Sekai Seifuku", H_s: ryK],[tEU: 295625, wRk: "Marie Antoinette ni Tensei Shita", H_s: ryK],[tEU: 296047, wRk: "Shuukan Ranobe Anime", H_s: ryK],[tEU: 296319, wRk: "Tomica Heroes Job Labor (TV)", H_s: ryK],[tEU: 297286, wRk: "Potions Will Save Me", H_s: ryK],[tEU: 302169, wRk: "Anila and Cocora", H_s: ryK]];def QG = any { info.database } { id == tmdbid ? "TheMovieDB" : "IMDb" };def Hs = QG == "IMDb" ? "tt${id}" : id;def cM = n;Bo.each {if (it.tEU == Hs && it.H_s == QG) {cM = it.wRk}};def He = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def nR = cM.replaceAll(He.collect { "\\" + it }.join('|'), '');nR = nR.replaceAll(/(\s|\.)*$/, '');nR}{" ("}{y}{") ["}{def Cn = [["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 oH = ["ASW", "Judas", "JRx7", "EMBER", "GuodongSubs", "SAMEHADAKU", "Kusonime"];def BEa = ["DB"];def eQ = ["Ruri-Saizen"];def __H = ["Erai-raws", "SubsPlease"];def oB = any {(fn =~ /^\[(.*?)\]/)[0][1]} {""};def lr = any {def Hq = Cn.find { uf -> uf.find { BIa -> fn.lower().contains(BIa.lower()) } }[0];Hq = Hq.replace(".WEB-DL", "");if (fn.contains("WEBRip")) {Hq = Hq.replace(".WEBRip", "");Hq = Hq + ".WEBRip"} else {Hq = Hq + ".WEB-DL"};Hq} {source} {oH.find { SS -> group == SS || oB == SS } ? "WEBRip" : ""} {BEa.find { SS -> group == SS || oB == SS } ? "BDRip" : ""} {eQ.find { SS -> group == SS || oB == SS } ? "HDTVRip" : ""} {def PQ = __H.find { wJ -> group == wJ || oB == wJ} ? "WEB-DL" : "";(source == "Erai-raws" && vcf.upper() == "HEVC") ? "WEBRip" : PQ} {vs} {""};lr ? "$lr " : ""}{def hs = bitdepth ? " ${bitdepth}bit" : "";"$resolution $vcf $hs, $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 STj = any { audioLanguages.size() } { 0 };def Mdp = STj > 2 ? " MULTi-AUD" : STj > 1 ? " DUAL-AUD" : "";def fgp = STj > 5 ? audioLanguages.take(5) : audioLanguages;def IVS = audioLanguages.any { it.ISO3B == language.ISO3B } ? "" : " DUBBED";Mdp = STj == 1 && audioLanguages.any { it.ISO3B == "und" } ? "" : "$Mdp$IVS";Mdp}{def pA = text.language.collect {['zh-Hans': 'ZH-S','zh-Hant': 'ZH-T','ar-001': 'AR-MSA'].get(it,it).toUpperCase()}.unique();def cA = any { pA.size() } { 0 };def Mdp = cA > 2 ? ", MULTi" : cA > 1 ? ", DUAL" : cA == 1 ? ", SUB" : null;Mdp}{"]["}{crc32.upper()}{"]"}{if (f.subtitle) {def adE = ["name": "." + lang.name,"iso3b": "." + lang.ISO3B,"iso3": "." +lang.ISO3,"iso2": "." + lang.ISO2];def Dh = subt;adE.values().each { sC -> if (Dh.contains(sC)) {Dh = Dh.replace(sC, "")}};adE.iso3b + Dh}}{f.image ? "-thumb" : ""}
0 commit comments