From a22f84a61f133969e7232df1eeb5fa47cd4c7092 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 3 Dec 2024 19:23:35 +0000 Subject: [PATCH] Compile Groovy Scripts --- compiled/posix_movie.groovy | 2 +- compiled/posix_music_shared.groovy | 2 +- compiled/posix_tv.groovy | 2 +- compiled/post_xmbcnfo.groovy | 2 +- compiled/windows_movie.groovy | 2 +- compiled/windows_music_shared.groovy | 2 +- compiled/windows_tv.groovy | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/compiled/posix_movie.groovy b/compiled/posix_movie.groovy index c87c45d..e70d012 100644 --- a/compiled/posix_movie.groovy +++ b/compiled/posix_movie.groovy @@ -1 +1 @@ -{def b_ = System.getProperty("user.name");def kf = "/run/media/${b_}";def Kq = "$kf/Videos";def _k = [home,"$kf/Data","$kf/Music","$kf/Videos","$kf/Games","$kf/Books"].collect { it as File }.sort { gmr, ceJ -> gmr.exists() <=> ceJ.exists() ?: gmr.diskSpace <=> ceJ.diskSpace }.last();def Tze = Kq ? Kq : _k;"$Tze/"}{def bLJ = /(CN|JP|KR|KP|TW|HK)/;def jl = /(aeni|donghua|anime)/;def Jk = anime || info.Keywords =~ jl || any {(genres =~ /Animation/ && country =~ bLJ)}{false} ? true : false;def jn = Jk ? "Videos/Anime " : "Videos/";"$jn" + "Movies/"}{def ZO = [[Mh: 229743, oGJ: "VTuber Legend"],[Mh: 240633, oGJ: "A Journey Through Another World"],[Mh: 245285, oGJ: "Failure Frame"],[Mh: 237045, oGJ: "Cherry Magic!"],[Mh: 68854, oGJ: "From Me to You"],[Mh: 271026, oGJ: "Taisho Era Contract Marriage"],[Mh: 234538, oGJ: "Demon Lord 2099"]];def qkx = n;ZO.each {if (it.Mh == tmdbid && type.toString() != "Movie") {qkx = it.oGJ}};def fqx = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def qlj = qkx.replaceAll(fqx.collect { "\\" + it }.join('|'), '');qlj = qlj.replaceAll(/(\s|\.)*$/, '');qlj}{" ("}{y}{") [tmdbid-"}{tmdbid}{"]/"}{def eZ = ["Alqanime","BlackLuster","NanDesuKa","ToonsHub","Tsundere-Raws"];def _q = eZ.find { zIg -> fn.contains(zIg) } ?: "";def jv = any {(fn =~ /^\[(.*?)\]/)[0][1]} {_q} {group} {""};jv ? "[$jv] " : ""}{def ZO = [[Mh: 229743, oGJ: "VTuber Legend"],[Mh: 240633, oGJ: "A Journey Through Another World"],[Mh: 245285, oGJ: "Failure Frame"],[Mh: 237045, oGJ: "Cherry Magic!"],[Mh: 68854, oGJ: "From Me to You"],[Mh: 271026, oGJ: "Taisho Era Contract Marriage"],[Mh: 234538, oGJ: "Demon Lord 2099"]];def qkx = n;ZO.each {if (it.Mh == tmdbid && type.toString() != "Movie") {qkx = it.oGJ}};def fqx = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def qlj = qkx.replaceAll(fqx.collect { "\\" + it }.join('|'), '');qlj = qlj.replaceAll(/(\s|\.)*$/, '');qlj}{" ("}{y}{")"} [{def JF = [[AHB: "ABEMA", NJy: ["ABEMA"]],[AHB: "Bilibili.tv", NJy: ["B-Global", "BiliIntl", "BILI"]],[AHB: "Hulu", NJy: ["HULU"]],[AHB: "MeWatch", NJy: ["MW.WEB-DL"]],[AHB: "Netflix", NJy: ["NF.WEB-DL", "NF WEB"]],[AHB: "Prime Video", NJy: ["AMZN"]],[AHB: "TVer", NJy: ["TVER"]],[AHB: "Shahid", NJy: ["SHAHID"]],[AHB: "U-NEXT", NJy: ["UNEXT"]],[AHB: "YouTube", NJy: ["YT.WEB-DL", "YOUTUBE", "YTB"]]];def jkY = ["ASW", "Judas", "JRx7", "EMBER", "KawaSubs", "GuodongSubs"];def ms = ["Erai-raws", "SubsPlease"];def nV = any {(fn =~ /^\[(.*?)\]/)[0][1]} {""};def R_o = any {def yYr = JF.find { Vo -> Vo.NJy.find { iV -> fn.contains(iV) } }?.NJy.first() ?: "";yYr = yYr.replace(".WEB-DL", "");yYr ? "${yYr}.WEB-DL" : ""} {source} {jkY.find { zem -> group == zem || nV == zem } ? "WEBRip" : ""} {def cw = ms.find { ti -> group == ti || nV == ti} ? "WEB-DL" : "";(source == "Erai-raws" && vcf.upper() == "HEVC") ? "WEBRip" : cw} {vs} {""};R_o ? "$R_o " : ""}{resolution} {vcf.upper()}{bitdepth ? " ${bitdepth}bit" : ""}, {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 ZLO = " Dub";def Vd = audioLanguages.any { it.ISO3B == language.ISO3B } ? "" : ZLO;Vd = audioLanguages.size() == 1 && audioLanguages.any { it.ISO3B == "und" } ? "" : Vd;Vd}{def fy = any { audioLanguages.size() } { 0 };def Vd = fy > 2 ? " MAud" : fy > 1 ? " DAud" : null;def Jt = fy > 5 ? audioLanguages.take(5) : audioLanguages;Vd ? Vd + Jt.joining(" ", " (", "").upper() + (fy > 5 ? " ...)" : ")") : ""}{def Lf = any { textLanguages.size() } { 0 };def Vd = Lf > 2 ? ", MSub" : Lf > 1 ? ", DSub" : null;def Jt = Lf > 5 ? textLanguages.take(5) : textLanguages;Vd ? Vd + Jt.joining(" ", " (", "").upper() + (Lf > 5 ? " ...)" : ")") : ""}][{crc32.upper()}]{ext =~ /(ass|srt|ssa|vtt)/ ? '.' + lang.ISO3B : ""}{ext =~ /jp(?:e)?g|png/ ? "-thumb" : ""} \ No newline at end of file +{def _S = System.getProperty("user.name");def ZPn = "/run/media/${_S}";def XG = "$ZPn/Videos";def WTW = [home,"$ZPn/Data","$ZPn/Music","$ZPn/Videos","$ZPn/Games","$ZPn/Books"].collect { it as File }.sort { lM, VH -> lM.exists() <=> VH.exists() ?: lM.diskSpace <=> VH.diskSpace }.last();def oqk = XG ? XG : WTW;"$oqk/"}{"Videos/"}{def zbG = ["boys' love (bl)", "gay theme", "yaoi", "yuri", "lesbian", "hentai","hentai", "sex", "lgbt", "explicit", "adult animation", "adult content"];def Vho = [271026,220118];def iH = any { info.adult } { false };def jJ = any { info.Keywords.findAll { it in zbG } } { id in Vho } { iH };jJ ? "R18+ " : ""}{def Ff = /(CN|JP|KR|KP|TW|HK)/;def hw = /(aeni|donghua|anime)/;def QO = anime || info.Keywords =~ hw || any {(genres =~ /Animation/ && country =~ Ff)}{false} ? true : false;QO ? "Anime Movies/" : "Movies/"}{def twP = [[HoW: 229743, lCa: "VTuber Legend"],[HoW: 240633, lCa: "A Journey Through Another World"],[HoW: 245285, lCa: "Failure Frame"],[HoW: 237045, lCa: "Cherry Magic!"],[HoW: 68854, lCa: "From Me to You"],[HoW: 271026, lCa: "Taisho Era Contract Marriage"],[HoW: 234538, lCa: "Demon Lord 2099"]];def a_u = n;twP.each {if (it.HoW == tmdbid && type.toString() != "Movie") {a_u = it.lCa}};def JHH = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def eD = a_u.replaceAll(JHH.collect { "\\" + it }.join('|'), '');eD = eD.replaceAll(/(\s|\.)*$/, '');eD}{" ("}{y}{") [tmdbid-"}{tmdbid}{"]/"}{def ony = ["Alqanime","BlackLuster","NanDesuKa","ToonsHub","Tsundere-Raws"];def _Bh = ony.find { YC -> fn.contains(YC) } ?: "";def gK = any {(fn =~ /^\[(.*?)\]/)[0][1]} {_Bh} {group} {""};gK ? "[$gK] " : ""}{def twP = [[HoW: 229743, lCa: "VTuber Legend"],[HoW: 240633, lCa: "A Journey Through Another World"],[HoW: 245285, lCa: "Failure Frame"],[HoW: 237045, lCa: "Cherry Magic!"],[HoW: 68854, lCa: "From Me to You"],[HoW: 271026, lCa: "Taisho Era Contract Marriage"],[HoW: 234538, lCa: "Demon Lord 2099"]];def a_u = n;twP.each {if (it.HoW == tmdbid && type.toString() != "Movie") {a_u = it.lCa}};def JHH = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def eD = a_u.replaceAll(JHH.collect { "\\" + it }.join('|'), '');eD = eD.replaceAll(/(\s|\.)*$/, '');eD}{" ("}{y}{")"} [{def VOO = [[CQ: "ABEMA", uKr: ["ABEMA"]],[CQ: "Bilibili.tv", uKr: ["B-Global", "BiliIntl", "BILI"]],[CQ: "Hulu", uKr: ["HULU"]],[CQ: "MeWatch", uKr: ["MW.WEB-DL"]],[CQ: "Netflix", uKr: ["NF.WEB-DL", "NF WEB"]],[CQ: "Prime Video", uKr: ["AMZN"]],[CQ: "TVer", uKr: ["TVER"]],[CQ: "Shahid", uKr: ["SHAHID"]],[CQ: "U-NEXT", uKr: ["UNEXT"]],[CQ: "YouTube", uKr: ["YT.WEB-DL", "YOUTUBE", "YTB"]]];def awl = ["ASW", "Judas", "JRx7", "EMBER", "KawaSubs", "GuodongSubs"];def fX = ["Erai-raws", "SubsPlease"];def Wci = any {(fn =~ /^\[(.*?)\]/)[0][1]} {""};def Xfq = any {def Gc = VOO.find { bLU -> bLU.uKr.find { ze -> fn.contains(ze) } }?.uKr.first() ?: "";Gc = Gc.replace(".WEB-DL", "");Gc ? "${Gc}.WEB-DL" : ""} {source} {awl.find { hBv -> group == hBv || Wci == hBv } ? "WEBRip" : ""} {def ZS = fX.find { lJL -> group == lJL || Wci == lJL} ? "WEB-DL" : "";(source == "Erai-raws" && vcf.upper() == "HEVC") ? "WEBRip" : ZS} {vs} {""};Xfq ? "$Xfq " : ""}{resolution} {vcf.upper()}{bitdepth ? " ${bitdepth}bit" : ""}, {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 cjJ = " Dub";def HcC = audioLanguages.any { it.ISO3B == language.ISO3B } ? "" : cjJ;HcC = audioLanguages.size() == 1 && audioLanguages.any { it.ISO3B == "und" } ? "" : HcC;HcC}{def JOI = any { audioLanguages.size() } { 0 };def HcC = JOI > 2 ? " MAud" : JOI > 1 ? " DAud" : null;def nmi = JOI > 5 ? audioLanguages.take(5) : audioLanguages;HcC ? HcC + nmi.joining(" ", " (", "").upper() + (JOI > 5 ? " ...)" : ")") : ""}{def WKX = any { textLanguages.size() } { 0 };def HcC = WKX > 2 ? ", MSub" : WKX > 1 ? ", DSub" : null;def nmi = WKX > 5 ? textLanguages.take(5) : textLanguages;HcC ? HcC + nmi.joining(" ", " (", "").upper() + (WKX > 5 ? " ...)" : ")") : ""}][{crc32.upper()}]{ext =~ /(ass|srt|ssa|vtt)/ ? '.' + lang.ISO3B : ""}{ext =~ /jp(?:e)?g|png/ ? "-thumb" : ""} \ No newline at end of file diff --git a/compiled/posix_music_shared.groovy b/compiled/posix_music_shared.groovy index 2c07de7..aa2b1e2 100644 --- a/compiled/posix_music_shared.groovy +++ b/compiled/posix_music_shared.groovy @@ -1 +1 @@ -{def ZgS = System.getProperty("user.name");def QH = "/run/media/${ZgS}";def Oa = "$QH/Videos";def LS = [home,"$QH/Data","$QH/Music","$QH/Videos","$QH/Games","$QH/Books"].collect { it as File }.sort { wE, EK -> wE.exists() <=> EK.exists() ?: wE.diskSpace <=> EK.diskSpace }.last();def n_ = Oa ? Oa : LS;"$n_/"}{"Torrent Uploads/"}{ext.upper()}/{y}{"/["}{d.format("yyyy.MM.dd")}{"] "}{album} - {n} [{ext.upper()}{ext == "flac" ? " " + "${ bitdepth > 16 ? bitdepth + '-' : ''}" + khz : ext == "mp3" && media.get("OverallBitRate/String") != "320 kbps" ? " V0" : ""}]{media.CATALOGNUMBER ? "[" + media.CATALOGNUMBER + "]" : ""}/{dc > 1 ? "Disc " + di + "/" : ""}{dc? di + "-": ""}{pi.pad(2)} {t} \ No newline at end of file +{def QL = System.getProperty("user.name");def cz = "/run/media/${QL}";def iq = "$cz/Videos";def Iv = [home,"$cz/Data","$cz/Music","$cz/Videos","$cz/Games","$cz/Books"].collect { it as File }.sort { Qp, TO -> Qp.exists() <=> TO.exists() ?: Qp.diskSpace <=> TO.diskSpace }.last();def jH = iq ? iq : Iv;"$jH/"}{"Torrent Uploads/"}{ext.upper()}/{y}{"/["}{d.format("yyyy.MM.dd")}{"] "}{album} - {n} [{ext.upper()}{ext == "flac" ? " " + "${ bitdepth > 16 ? bitdepth + '-' : ''}" + khz : ext == "mp3" && media.get("OverallBitRate/String") != "320 kbps" ? " V0" : ""}]{media.CATALOGNUMBER ? "[" + media.CATALOGNUMBER + "]" : ""}/{dc > 1 ? "Disc " + di + "/" : ""}{dc? di + "-": ""}{pi.pad(2)} {t} \ No newline at end of file diff --git a/compiled/posix_tv.groovy b/compiled/posix_tv.groovy index 8b660b8..591fe1e 100644 --- a/compiled/posix_tv.groovy +++ b/compiled/posix_tv.groovy @@ -1 +1 @@ -{def iN = System.getProperty("user.name");def eix = "/run/media/${iN}";def iD = "$eix/Videos";def nT = [home,"$eix/Data","$eix/Music","$eix/Videos","$eix/Games","$eix/Books"].collect { it as File }.sort { Rq, Hy -> Rq.exists() <=> Hy.exists() ?: Rq.diskSpace <=> Hy.diskSpace }.last();def Scd = iD ? iD : nT;"$Scd/"}{def VW = /(CN|JP|KR|KP|TW|HK)/;def GzK = /(aeni|donghua|anime)/;def arH = anime || info.Keywords =~ GzK || (genres =~ /Animation/ && country =~ VW) ? true : false;arH ? "Videos/Anime/" : "Videos/TV Series/"}{def zwz = [[Gz: 229743, aB: "VTuber Legend"],[Gz: 240633, aB: "A Journey Through Another World"],[Gz: 245285, aB: "Failure Frame"],[Gz: 237045, aB: "Cherry Magic!"],[Gz: 68854, aB: "From Me to You"],[Gz: 271026, aB: "Taisho Era Contract Marriage"],[Gz: 234538, aB: "Demon Lord 2099"]];def Pn = n;zwz.each {if (it.Gz == tmdbid && type.toString() != "Movie") {Pn = it.aB}};def mF = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def wc = Pn.replaceAll(mF.collect { "\\" + it }.join('|'), '');wc = wc.replaceAll(/(\s|\.)*$/, '');wc}{def Rwy = [68854,235973,262295,259140,204098,239779,273190,271026,240125,275695,123542,257162];def Hx = Rwy.find { msU -> tmdbid == msU } ?: "";Hx ? " ($y) [tmdbid-$Hx]" : ""}/{episode.special ? 'Specials' : 'Season '+s}{def mF = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def wc = sn.replaceAll(mF.collect { "\\" + it }.join('|'), '_');def uC = n.replaceAll(mF.collect { "\\" + it }.join('|'), '_');def lV = wc.contains(uC) ? "" : wc;lV == 'Season '+ s ? "" : lV ? " - " + lV : ""}/{def fFT = ["Alqanime","BlackLuster","NanDesuKa","ToonsHub","Tsundere-Raws"];def qJ = fFT.find { CY -> fn.contains(CY) } ?: "";def So = any {(fn =~ /^\[(.*?)\]/)[0][1]} {qJ} {group} {""};So ? "[$So] " : ""}{def zwz = [[Gz: 229743, aB: "VTuber Legend"],[Gz: 240633, aB: "A Journey Through Another World"],[Gz: 245285, aB: "Failure Frame"],[Gz: 237045, aB: "Cherry Magic!"],[Gz: 68854, aB: "From Me to You"],[Gz: 271026, aB: "Taisho Era Contract Marriage"],[Gz: 234538, aB: "Demon Lord 2099"]];def Pn = n;zwz.each {if (it.Gz == tmdbid && type.toString() != "Movie") {Pn = it.aB}};def mF = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def wc = Pn.replaceAll(mF.collect { "\\" + it }.join('|'), '');wc = wc.replaceAll(/(\s|\.)*$/, '');wc} - {s00e00}{def mF = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def wc = t.replaceAll(mF.collect { "\\" + it }.join('|'), '_');def mk = any { e } { special };wc = wc.length() > 100 ? " " : " - $wc ";wc == " - Episode $mk " ? " " : wc} [{def SZn = [[xP: "ABEMA", Mc: ["ABEMA"]],[xP: "Bilibili.tv", Mc: ["B-Global", "BiliIntl", "BILI"]],[xP: "Hulu", Mc: ["HULU"]],[xP: "MeWatch", Mc: ["MW.WEB-DL"]],[xP: "Netflix", Mc: ["NF.WEB-DL", "NF WEB"]],[xP: "Prime Video", Mc: ["AMZN"]],[xP: "TVer", Mc: ["TVER"]],[xP: "Shahid", Mc: ["SHAHID"]],[xP: "U-NEXT", Mc: ["UNEXT"]],[xP: "YouTube", Mc: ["YT.WEB-DL", "YOUTUBE", "YTB"]]];def VqC = ["ASW", "Judas", "JRx7", "EMBER", "KawaSubs", "GuodongSubs"];def Ej = ["Erai-raws", "SubsPlease"];def _L = any {(fn =~ /^\[(.*?)\]/)[0][1]} {""};def GPR = any {def Gq = SZn.find { Do -> Do.Mc.find { zl -> fn.contains(zl) } }?.Mc.first() ?: "";Gq = Gq.replace(".WEB-DL", "");Gq ? "${Gq}.WEB-DL" : ""} {source} {VqC.find { eL -> group == eL || _L == eL } ? "WEBRip" : ""} {def Rf = Ej.find { eT -> group == eT || _L == eT} ? "WEB-DL" : "";(source == "Erai-raws" && vcf.upper() == "HEVC") ? "WEBRip" : Rf} {vs} {""};GPR ? "$GPR " : ""}{resolution} {vcf.upper()}{bitdepth ? " ${bitdepth}bit" : ""}, {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 pr_ = " Dub";def Mt = audioLanguages.any { it.ISO3B == language.ISO3B } ? "" : pr_;Mt = audioLanguages.size() == 1 && audioLanguages.any { it.ISO3B == "und" } ? "" : Mt;Mt}{def oUp = any { audioLanguages.size() } { 0 };def Mt = oUp > 2 ? " MAud" : oUp > 1 ? " DAud" : null;def _dE = oUp > 5 ? audioLanguages.take(5) : audioLanguages;Mt ? Mt + _dE.joining(" ", " (", "").upper() + (oUp > 5 ? " ...)" : ")") : ""}{def BTd = any { textLanguages.size() } { 0 };def Mt = BTd > 2 ? ", MSub" : BTd > 1 ? ", DSub" : null;def _dE = BTd > 5 ? textLanguages.take(5) : textLanguages;Mt ? Mt + _dE.joining(" ", " (", "").upper() + (BTd > 5 ? " ...)" : ")") : ""}][{crc32.upper()}]{ext =~ /(ass|srt|ssa|vtt)/ ? '.' + lang.ISO3B : ""}{ext =~ /jp(?:e)?g|png/ ? "-thumb" : ""} \ No newline at end of file +{def Ium = System.getProperty("user.name");def wH = "/run/media/${Ium}";def lt = "$wH/Videos";def mh = [home,"$wH/Data","$wH/Music","$wH/Videos","$wH/Games","$wH/Books"].collect { it as File }.sort { Zc, mZ -> Zc.exists() <=> mZ.exists() ?: Zc.diskSpace <=> mZ.diskSpace }.last();def Xgl = lt ? lt : mh;"$Xgl/"}{"Videos/"}{def lYH = ["boys' love (bl)", "gay theme", "yaoi", "yuri", "lesbian", "hentai","hentai", "sex", "lgbt", "explicit", "adult animation", "adult content"];def EK = [271026,220118];def BuJ = any { info.adult } { false };def eAZ = any { info.Keywords.findAll { it in lYH } } { id in EK } { BuJ };eAZ ? "R18+ " : ""}{def wO = /(CN|JP|KR|KP|TW|HK)/;def _H = /(aeni|donghua|anime)/;def wM = anime || info.Keywords =~ _H || (genres =~ /Animation/ && country =~ wO) ? true : false;wM ? "Anime/" : "TV Series/"}{def EP = [[Ev: 229743, UlD: "VTuber Legend"],[Ev: 240633, UlD: "A Journey Through Another World"],[Ev: 245285, UlD: "Failure Frame"],[Ev: 237045, UlD: "Cherry Magic!"],[Ev: 68854, UlD: "From Me to You"],[Ev: 271026, UlD: "Taisho Era Contract Marriage"],[Ev: 234538, UlD: "Demon Lord 2099"]];def JAb = n;EP.each {if (it.Ev == tmdbid && type.toString() != "Movie") {JAb = it.UlD}};def nWu = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def C_v = JAb.replaceAll(nWu.collect { "\\" + it }.join('|'), '');C_v = C_v.replaceAll(/(\s|\.)*$/, '');C_v}{def dun = [68854,235973,262295,259140,204098,239779,273190,271026,240125,275695,123542,257162];def xWG = dun.find { CK -> tmdbid == CK } ?: "";xWG ? " ($y) [tmdbid-$xWG]" : ""}/{episode.special ? 'Specials' : 'Season '+s}{def nWu = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def C_v = sn.replaceAll(nWu.collect { "\\" + it }.join('|'), '_');def Pd = n.replaceAll(nWu.collect { "\\" + it }.join('|'), '_');def BQz = C_v.contains(Pd) ? "" : C_v;BQz == 'Season '+ s ? "" : BQz ? " - " + BQz : ""}/{def Sb = ["Alqanime","BlackLuster","NanDesuKa","ToonsHub","Tsundere-Raws"];def zK = Sb.find { Ux -> fn.contains(Ux) } ?: "";def wP = any {(fn =~ /^\[(.*?)\]/)[0][1]} {zK} {group} {""};wP ? "[$wP] " : ""}{def EP = [[Ev: 229743, UlD: "VTuber Legend"],[Ev: 240633, UlD: "A Journey Through Another World"],[Ev: 245285, UlD: "Failure Frame"],[Ev: 237045, UlD: "Cherry Magic!"],[Ev: 68854, UlD: "From Me to You"],[Ev: 271026, UlD: "Taisho Era Contract Marriage"],[Ev: 234538, UlD: "Demon Lord 2099"]];def JAb = n;EP.each {if (it.Ev == tmdbid && type.toString() != "Movie") {JAb = it.UlD}};def nWu = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def C_v = JAb.replaceAll(nWu.collect { "\\" + it }.join('|'), '');C_v = C_v.replaceAll(/(\s|\.)*$/, '');C_v} - {s00e00}{def nWu = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def C_v = t.replaceAll(nWu.collect { "\\" + it }.join('|'), '_');def rcN = any { e } { special };C_v = C_v.length() > 100 ? " " : " - $C_v ";C_v == " - Episode $rcN " ? " " : C_v} [{def gL = [[gAP: "ABEMA", kI: ["ABEMA"]],[gAP: "Bilibili.tv", kI: ["B-Global", "BiliIntl", "BILI"]],[gAP: "Hulu", kI: ["HULU"]],[gAP: "MeWatch", kI: ["MW.WEB-DL"]],[gAP: "Netflix", kI: ["NF.WEB-DL", "NF WEB"]],[gAP: "Prime Video", kI: ["AMZN"]],[gAP: "TVer", kI: ["TVER"]],[gAP: "Shahid", kI: ["SHAHID"]],[gAP: "U-NEXT", kI: ["UNEXT"]],[gAP: "YouTube", kI: ["YT.WEB-DL", "YOUTUBE", "YTB"]]];def jOv = ["ASW", "Judas", "JRx7", "EMBER", "KawaSubs", "GuodongSubs"];def AvP = ["Erai-raws", "SubsPlease"];def Kj = any {(fn =~ /^\[(.*?)\]/)[0][1]} {""};def Kfq = any {def yTI = gL.find { Gp -> Gp.kI.find { OLq -> fn.contains(OLq) } }?.kI.first() ?: "";yTI = yTI.replace(".WEB-DL", "");yTI ? "${yTI}.WEB-DL" : ""} {source} {jOv.find { lR -> group == lR || Kj == lR } ? "WEBRip" : ""} {def WO = AvP.find { Ac -> group == Ac || Kj == Ac} ? "WEB-DL" : "";(source == "Erai-raws" && vcf.upper() == "HEVC") ? "WEBRip" : WO} {vs} {""};Kfq ? "$Kfq " : ""}{resolution} {vcf.upper()}{bitdepth ? " ${bitdepth}bit" : ""}, {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 _O = " Dub";def eHN = audioLanguages.any { it.ISO3B == language.ISO3B } ? "" : _O;eHN = audioLanguages.size() == 1 && audioLanguages.any { it.ISO3B == "und" } ? "" : eHN;eHN}{def IUk = any { audioLanguages.size() } { 0 };def eHN = IUk > 2 ? " MAud" : IUk > 1 ? " DAud" : null;def tJr = IUk > 5 ? audioLanguages.take(5) : audioLanguages;eHN ? eHN + tJr.joining(" ", " (", "").upper() + (IUk > 5 ? " ...)" : ")") : ""}{def NV = any { textLanguages.size() } { 0 };def eHN = NV > 2 ? ", MSub" : NV > 1 ? ", DSub" : null;def tJr = NV > 5 ? textLanguages.take(5) : textLanguages;eHN ? eHN + tJr.joining(" ", " (", "").upper() + (NV > 5 ? " ...)" : ")") : ""}][{crc32.upper()}]{ext =~ /(ass|srt|ssa|vtt)/ ? '.' + lang.ISO3B : ""}{ext =~ /jp(?:e)?g|png/ ? "-thumb" : ""} \ No newline at end of file diff --git a/compiled/post_xmbcnfo.groovy b/compiled/post_xmbcnfo.groovy index 3f212df..ff67083 100644 --- a/compiled/post_xmbcnfo.groovy +++ b/compiled/post_xmbcnfo.groovy @@ -1 +1 @@ -{ source, target, metadata -> if (type.toString() != "Episode" || !vf || ext =~ /(ass|srt|ssa|vtt)/) {return null};def lq = target.dir;def rym = any{ s } { 0 };def HXV = any{ e } { special };def vCi = 0;def miE = null;try {if (db.TheTVDB?.id) {def Gk = curl "https://api.tvmaze.com/lookup/shows?thetvdb=${db.TheTVDB.id}";def Bll = Gk.id;miE = curl "https://api.tvmaze.com/shows/$Bll/episodebynumber?season=$rym&number=$HXV";vCi = miE.id}} catch (Exception err) {};def nq = "";def usk = "en-US";def Tp = null;def LBe = new File("$home/.filebotsecrets.json");if (LBe.exists()) {def GJ = new groovy.json.JsonSlurper().parseText(LBe.text);nq = GJ.nq;usk = GJ.language;Tp = GJ.person_info_dir};def BWD = "https://api.themoviedb.org/3/tv/$id/season/$rym/episode/$HXV";def _J = curl(["accept": "application/json"], "$BWD?language=$usk&api_key=$nq");def kb = curl(["accept": "application/json"], "$BWD/external_ids?api_key=$nq");def jST = curl(["accept": "application/json"], "$BWD/credits?language=$usk&api_key=$nq");def iQ = curl(["accept": "application/json"], "$BWD/images?include_image_language=en%2Cnull&api_key=$nq");def SNG = (lq / target.nameWithoutExtension + "-thumb.jpg").toString();def PC = new File(SNG);def vPF = new File(SNG.replace("-thumb",""));if (!(PC.exists() || vPF.exists()) && iQ.stills.size() > 0) {def utY = "https://image.tmdb.org/t/p/original${iQ.stills[0].file_path}";system "curl", "-o", lq / target.nameWithoutExtension + "-thumb.jpg", utY};def E_ = [];(jST.cast + jST.guest_stars).eachWithIndex { w_, ttb -> def uEM = "$Tp/${w_.name[0]}/${w_.name}";def SYn = w_.order ?: ttb + E_.size();E_ << [PPG: w_.name, Niz: w_.character, aQ: SYn, uEM: "${uEM}/folder.jpg"];if (Tp) {def OY = new File(uEM);if (!OY.exists()) {OY.mkdirs();system "curl", "-o", "${uEM}/folder.jpg", "https://image.tmdb.org/t/p/original${w_.profile_path}"}}};def MNP = lq / target.nameWithoutExtension + ".nfo";XML(MNP) {mkp.xmlDeclaration(version: "1.0", encoding: "utf-8", standalone: "yes");episodedetails {plot(_J.overview);lockdata("false");dateadded(new Date().format("yyyy-MM-dd HH:mm:ss", TimeZone.getTimeZone("UTC")));title(t);originaltitle(localize."${languages[0]}".t);rating(rating);year(airdate.format("yyyy"));uniqueid(type: "tmdb", value: episode.id, 'default': "true", episode.id);tmdbid(episode.id);if (kb?.imdb_id) {uniqueid(type: "imdb", value: kb.imdb_id, kb.imdb_id);imdbid(kb.imdb_id)};if (kb?.tvdb_id) {uniqueid(type: "tvdb", value: kb.tvdb_id, kb.tvdb_id);tvdbid(kb.tvdb_id)};try {runtime(runtime)} catch (Exception err) {runtime(minutes)};try {if (db.AniDB?.episode?.id) {uniqueid(type: "anidb", value: db.AniDB.episode.id, db.AniDB.episode.id);anidbid(db.AniDB.episode.id)}} catch (Exception err) {};try {if (vCi) {uniqueid(type: "tvmaze", value: vCi, vCi);tvmazeid(vCi)}} catch (Exception err) {};if (PC.exists()) {art {poster(SNG)}};E_.each { oH -> actor {name(oH.PPG);role(oH.Niz);sortorder(oH.aQ);if (Tp) { thumb(oH.uEM) }}};showtitle(n);episode(HXV);season(rym);aired(airdate.format("yyyy-MM-dd"));fileinfo {streamdetails {target.mediaInfo.Video.each { HGD -> video {def Owu = Float.parseFloat(HGD.'Duration');codec(HGD.'Format');micodec(HGD.'Format');bitrate(HGD.'BitRate');width(HGD.'Width');height(HGD.'Height');aspect(HGD.'DisplayAspectRatio/String');aspectratio(HGD.'DisplayAspectRatio/String');framerate(HGD.'FrameRate');'default'(HGD.'Default' == "Yes" ? "True" : "False");forced(HGD.'Forced' == "Yes" ? "True" : "False");duration(HGD.'Duration' ? (int) Math.floor(Owu / 60000) : 0);durationinseconds(HGD.'Duration' ? (int) Math.floor(Owu / 1000) : 0)}};target.mediaInfo.Audio.each { FrY -> audio {codec(FrY.'Format');micodec(FrY.'Format');language(FrY.'Language/String3');channels(FrY.'Channel(s)');samplingrate(FrY.'SamplingRate');'default'(FrY.'Default' == "Yes" ? "True" : "False");forced(FrY.'Forced' == "Yes" ? "True" : "False")}};target.mediaInfo.Text.each { STt -> subtitle {codec(STt.'Format');micodec(STt.'Format');width('0');height('0');language(STt.'Language/String3');'default'(STt.'Default' == "Yes" ? "True" : "False");forced(STt.'Forced' == "Yes" ? "True" : "False")}}}}}}} \ No newline at end of file +{ source, target, metadata -> if (type.toString() != "Episode" || !vf || ext =~ /(ass|srt|ssa|vtt)/) {return null};def ga = target.dir;def cz = any{ s } { 0 };def KHB = any{ e } { special };def Jce = 0;def LNe = null;try {if (db.TheTVDB?.id) {def nT = curl "https://api.tvmaze.com/lookup/shows?thetvdb=${db.TheTVDB.id}";def uH = nT.id;LNe = curl "https://api.tvmaze.com/shows/$uH/episodebynumber?season=$cz&number=$KHB";Jce = LNe.id}} catch (Exception err) {};def dwg = "";def Ps = "en-US";def XOU = null;def PVy = new File("$home/.filebotsecrets.json");if (PVy.exists()) {def Qv = new groovy.json.JsonSlurper().parseText(PVy.text);dwg = Qv.dwg;Ps = Qv.language;XOU = Qv.person_info_dir};def hJv = "https://api.themoviedb.org/3/tv/$id/season/$cz/episode/$KHB";def ork = curl(["accept": "application/json"], "$hJv?language=$Ps&api_key=$dwg");def GKG = curl(["accept": "application/json"], "$hJv/external_ids?api_key=$dwg");def sCH = curl(["accept": "application/json"], "$hJv/credits?language=$Ps&api_key=$dwg");def WC = curl(["accept": "application/json"], "$hJv/images?include_image_language=en%2Cnull&api_key=$dwg");def lFI = (ga / target.nameWithoutExtension + "-thumb.jpg").toString();def GF = new File(lFI);def RFv = new File(lFI.replace("-thumb",""));if (!(GF.exists() || RFv.exists()) && WC.stills.size() > 0) {def yH = "https://image.tmdb.org/t/p/original${WC.stills[0].file_path}";system "curl", "-o", ga / target.nameWithoutExtension + "-thumb.jpg", yH};def yG = [];(sCH.cast + sCH.guest_stars).eachWithIndex { uD, IVj -> def Uls = "$XOU/${uD.name[0]}/${uD.name}";def Tvs = uD.order ?: IVj + yG.size();yG << [LpI: uD.name, am: uD.character, xN: Tvs, Uls: "${Uls}/folder.jpg"];if (XOU) {def kb = new File(Uls);if (!kb.exists()) {kb.mkdirs();system "curl", "-o", "${Uls}/folder.jpg", "https://image.tmdb.org/t/p/original${uD.profile_path}"}}};def UOD = ga / target.nameWithoutExtension + ".nfo";XML(UOD) {mkp.xmlDeclaration(version: "1.0", encoding: "utf-8", standalone: "yes");episodedetails {plot(ork.overview);lockdata("false");dateadded(new Date().format("yyyy-MM-dd HH:mm:ss", TimeZone.getTimeZone("UTC")));title(t);originaltitle(localize."${languages[0]}".t);rating(rating);year(airdate.format("yyyy"));uniqueid(type: "tmdb", value: episode.id, 'default': "true", episode.id);tmdbid(episode.id);if (GKG?.imdb_id) {uniqueid(type: "imdb", value: GKG.imdb_id, GKG.imdb_id);imdbid(GKG.imdb_id)};if (GKG?.tvdb_id) {uniqueid(type: "tvdb", value: GKG.tvdb_id, GKG.tvdb_id);tvdbid(GKG.tvdb_id)};try {runtime(runtime)} catch (Exception err) {runtime(minutes)};try {if (db.AniDB?.episode?.id) {uniqueid(type: "anidb", value: db.AniDB.episode.id, db.AniDB.episode.id);anidbid(db.AniDB.episode.id)}} catch (Exception err) {};try {if (Jce) {uniqueid(type: "tvmaze", value: Jce, Jce);tvmazeid(Jce)}} catch (Exception err) {};if (GF.exists()) {art {poster(lFI)}};yG.each { tm -> actor {name(tm.LpI);role(tm.am);sortorder(tm.xN);if (XOU) { thumb(tm.Uls) }}};showtitle(n);episode(KHB);season(cz);aired(airdate.format("yyyy-MM-dd"));fileinfo {streamdetails {target.mediaInfo.Video.each { TcB -> video {def Zn = Float.parseFloat(TcB.'Duration');codec(TcB.'Format');micodec(TcB.'Format');bitrate(TcB.'BitRate');width(TcB.'Width');height(TcB.'Height');aspect(TcB.'DisplayAspectRatio/String');aspectratio(TcB.'DisplayAspectRatio/String');framerate(TcB.'FrameRate');'default'(TcB.'Default' == "Yes" ? "True" : "False");forced(TcB.'Forced' == "Yes" ? "True" : "False");duration(TcB.'Duration' ? (int) Math.floor(Zn / 60000) : 0);durationinseconds(TcB.'Duration' ? (int) Math.floor(Zn / 1000) : 0)}};target.mediaInfo.Audio.each { zV -> audio {codec(zV.'Format');micodec(zV.'Format');language(zV.'Language/String3');channels(zV.'Channel(s)');samplingrate(zV.'SamplingRate');'default'(zV.'Default' == "Yes" ? "True" : "False");forced(zV.'Forced' == "Yes" ? "True" : "False")}};target.mediaInfo.Text.each { IG -> subtitle {codec(IG.'Format');micodec(IG.'Format');width('0');height('0');language(IG.'Language/String3');'default'(IG.'Default' == "Yes" ? "True" : "False");forced(IG.'Forced' == "Yes" ? "True" : "False")}}}}}}} \ No newline at end of file diff --git a/compiled/windows_movie.groovy b/compiled/windows_movie.groovy index 9d73913..d7b83ca 100644 --- a/compiled/windows_movie.groovy +++ b/compiled/windows_movie.groovy @@ -1 +1 @@ -{def ZO = "H:/";def iNp = [home,"D:/","E:/","F:/","G:/","H:/"].collect { it as File }.sort { QI, UQq -> QI.exists() <=> UQq.exists() ?: QI.diskSpace <=> UQq.diskSpace }.last();def Gpu = ZO ? ZO : iNp;"$Gpu/"}{def hl = /(CN|JP|KR|KP|TW|HK)/;def Ir = /(aeni|donghua|anime)/;def FLa = anime || info.Keywords =~ Ir || any {(genres =~ /Animation/ && country =~ hl)}{false} ? true : false;def wDl = FLa ? "Videos/Anime " : "Videos/";"$wDl" + "Movies/"}{def sft = [[eHB: 229743, za: "VTuber Legend"],[eHB: 240633, za: "A Journey Through Another World"],[eHB: 245285, za: "Failure Frame"],[eHB: 237045, za: "Cherry Magic!"],[eHB: 68854, za: "From Me to You"],[eHB: 271026, za: "Taisho Era Contract Marriage"],[eHB: 234538, za: "Demon Lord 2099"]];def aU = n;sft.each {if (it.eHB == tmdbid && type.toString() != "Movie") {aU = it.za}};def Tn = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def Sn = aU.replaceAll(Tn.collect { "\\" + it }.join('|'), '');Sn = Sn.replaceAll(/(\s|\.)*$/, '');Sn}{" ("}{y}{") [tmdbid-"}{tmdbid}{"]/"}{def qA = ["Alqanime","BlackLuster","NanDesuKa","ToonsHub","Tsundere-Raws"];def _Y = qA.find { La -> fn.contains(La) } ?: "";def uz = any {(fn =~ /^\[(.*?)\]/)[0][1]} {_Y} {group} {""};uz ? "[$uz] " : ""}{def sft = [[eHB: 229743, za: "VTuber Legend"],[eHB: 240633, za: "A Journey Through Another World"],[eHB: 245285, za: "Failure Frame"],[eHB: 237045, za: "Cherry Magic!"],[eHB: 68854, za: "From Me to You"],[eHB: 271026, za: "Taisho Era Contract Marriage"],[eHB: 234538, za: "Demon Lord 2099"]];def aU = n;sft.each {if (it.eHB == tmdbid && type.toString() != "Movie") {aU = it.za}};def Tn = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def Sn = aU.replaceAll(Tn.collect { "\\" + it }.join('|'), '');Sn = Sn.replaceAll(/(\s|\.)*$/, '');Sn}{" ("}{y}{")"} [{def TQ = [[Tz: "ABEMA", kG: ["ABEMA"]],[Tz: "Bilibili.tv", kG: ["B-Global", "BiliIntl", "BILI"]],[Tz: "Hulu", kG: ["HULU"]],[Tz: "MeWatch", kG: ["MW.WEB-DL"]],[Tz: "Netflix", kG: ["NF.WEB-DL", "NF WEB"]],[Tz: "Prime Video", kG: ["AMZN"]],[Tz: "TVer", kG: ["TVER"]],[Tz: "Shahid", kG: ["SHAHID"]],[Tz: "U-NEXT", kG: ["UNEXT"]],[Tz: "YouTube", kG: ["YT.WEB-DL", "YOUTUBE", "YTB"]]];def FOY = ["ASW", "Judas", "JRx7", "EMBER", "KawaSubs", "GuodongSubs"];def fz = ["Erai-raws", "SubsPlease"];def QrI = any {(fn =~ /^\[(.*?)\]/)[0][1]} {""};def xP = any {def J_W = TQ.find { lb -> lb.kG.find { nuY -> fn.contains(nuY) } }?.kG.first() ?: "";J_W = J_W.replace(".WEB-DL", "");J_W ? "${J_W}.WEB-DL" : ""} {source} {FOY.find { sC -> group == sC || QrI == sC } ? "WEBRip" : ""} {def XZ = fz.find { Giy -> group == Giy || QrI == Giy} ? "WEB-DL" : "";(source == "Erai-raws" && vcf.upper() == "HEVC") ? "WEBRip" : XZ} {vs} {""};xP ? "$xP " : ""}{resolution} {vcf.upper()}{bitdepth ? " ${bitdepth}bit" : ""}, {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 wPe = " Dub";def Z_V = audioLanguages.any { it.ISO3B == language.ISO3B } ? "" : wPe;Z_V = audioLanguages.size() == 1 && audioLanguages.any { it.ISO3B == "und" } ? "" : Z_V;Z_V}{def gV = any { audioLanguages.size() } { 0 };def Z_V = gV > 2 ? " MAud" : gV > 1 ? " DAud" : null;def tO = gV > 5 ? audioLanguages.take(5) : audioLanguages;Z_V ? Z_V + tO.joining(" ", " (", "").upper() + (gV > 5 ? " ...)" : ")") : ""}{def jKz = any { textLanguages.size() } { 0 };def Z_V = jKz > 2 ? ", MSub" : jKz > 1 ? ", DSub" : null;def tO = jKz > 5 ? textLanguages.take(5) : textLanguages;Z_V ? Z_V + tO.joining(" ", " (", "").upper() + (jKz > 5 ? " ...)" : ")") : ""}][{crc32.upper()}]{ext =~ /(ass|srt|ssa|vtt)/ ? '.' + lang.ISO3B : ""}{ext =~ /jp(?:e)?g|png/ ? "-thumb" : ""} \ No newline at end of file +{def mOl = "H:/";def KCi = [home,"D:/","E:/","F:/","G:/","H:/"].collect { it as File }.sort { wE, R_ -> wE.exists() <=> R_.exists() ?: wE.diskSpace <=> R_.diskSpace }.last();def ydY = mOl ? mOl : KCi;"$ydY/"}{"Videos/"}{def W_j = ["boys' love (bl)", "gay theme", "yaoi", "yuri", "lesbian", "hentai","hentai", "sex", "lgbt", "explicit", "adult animation", "adult content"];def ax = [271026,220118];def dOw = any { info.adult } { false };def Cg = any { info.Keywords.findAll { it in W_j } } { id in ax } { dOw };Cg ? "R18+ " : ""}{def _v = /(CN|JP|KR|KP|TW|HK)/;def Sn = /(aeni|donghua|anime)/;def qa = anime || info.Keywords =~ Sn || any {(genres =~ /Animation/ && country =~ _v)}{false} ? true : false;qa ? "Anime Movies/" : "Movies/"}{def aYU = [[yO: 229743, EM: "VTuber Legend"],[yO: 240633, EM: "A Journey Through Another World"],[yO: 245285, EM: "Failure Frame"],[yO: 237045, EM: "Cherry Magic!"],[yO: 68854, EM: "From Me to You"],[yO: 271026, EM: "Taisho Era Contract Marriage"],[yO: 234538, EM: "Demon Lord 2099"]];def Ewe = n;aYU.each {if (it.yO == tmdbid && type.toString() != "Movie") {Ewe = it.EM}};def HK = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def aCq = Ewe.replaceAll(HK.collect { "\\" + it }.join('|'), '');aCq = aCq.replaceAll(/(\s|\.)*$/, '');aCq}{" ("}{y}{") [tmdbid-"}{tmdbid}{"]/"}{def LzR = ["Alqanime","BlackLuster","NanDesuKa","ToonsHub","Tsundere-Raws"];def FST = LzR.find { Tw -> fn.contains(Tw) } ?: "";def LsY = any {(fn =~ /^\[(.*?)\]/)[0][1]} {FST} {group} {""};LsY ? "[$LsY] " : ""}{def aYU = [[yO: 229743, EM: "VTuber Legend"],[yO: 240633, EM: "A Journey Through Another World"],[yO: 245285, EM: "Failure Frame"],[yO: 237045, EM: "Cherry Magic!"],[yO: 68854, EM: "From Me to You"],[yO: 271026, EM: "Taisho Era Contract Marriage"],[yO: 234538, EM: "Demon Lord 2099"]];def Ewe = n;aYU.each {if (it.yO == tmdbid && type.toString() != "Movie") {Ewe = it.EM}};def HK = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def aCq = Ewe.replaceAll(HK.collect { "\\" + it }.join('|'), '');aCq = aCq.replaceAll(/(\s|\.)*$/, '');aCq}{" ("}{y}{")"} [{def pp = [[DR: "ABEMA", zP: ["ABEMA"]],[DR: "Bilibili.tv", zP: ["B-Global", "BiliIntl", "BILI"]],[DR: "Hulu", zP: ["HULU"]],[DR: "MeWatch", zP: ["MW.WEB-DL"]],[DR: "Netflix", zP: ["NF.WEB-DL", "NF WEB"]],[DR: "Prime Video", zP: ["AMZN"]],[DR: "TVer", zP: ["TVER"]],[DR: "Shahid", zP: ["SHAHID"]],[DR: "U-NEXT", zP: ["UNEXT"]],[DR: "YouTube", zP: ["YT.WEB-DL", "YOUTUBE", "YTB"]]];def HT = ["ASW", "Judas", "JRx7", "EMBER", "KawaSubs", "GuodongSubs"];def med = ["Erai-raws", "SubsPlease"];def DO = any {(fn =~ /^\[(.*?)\]/)[0][1]} {""};def YPw = any {def tfP = pp.find { BL -> BL.zP.find { CFl -> fn.contains(CFl) } }?.zP.first() ?: "";tfP = tfP.replace(".WEB-DL", "");tfP ? "${tfP}.WEB-DL" : ""} {source} {HT.find { Wx -> group == Wx || DO == Wx } ? "WEBRip" : ""} {def JX = med.find { yE -> group == yE || DO == yE} ? "WEB-DL" : "";(source == "Erai-raws" && vcf.upper() == "HEVC") ? "WEBRip" : JX} {vs} {""};YPw ? "$YPw " : ""}{resolution} {vcf.upper()}{bitdepth ? " ${bitdepth}bit" : ""}, {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 OP = " Dub";def Z_ = audioLanguages.any { it.ISO3B == language.ISO3B } ? "" : OP;Z_ = audioLanguages.size() == 1 && audioLanguages.any { it.ISO3B == "und" } ? "" : Z_;Z_}{def NMC = any { audioLanguages.size() } { 0 };def Z_ = NMC > 2 ? " MAud" : NMC > 1 ? " DAud" : null;def jGW = NMC > 5 ? audioLanguages.take(5) : audioLanguages;Z_ ? Z_ + jGW.joining(" ", " (", "").upper() + (NMC > 5 ? " ...)" : ")") : ""}{def vg = any { textLanguages.size() } { 0 };def Z_ = vg > 2 ? ", MSub" : vg > 1 ? ", DSub" : null;def jGW = vg > 5 ? textLanguages.take(5) : textLanguages;Z_ ? Z_ + jGW.joining(" ", " (", "").upper() + (vg > 5 ? " ...)" : ")") : ""}][{crc32.upper()}]{ext =~ /(ass|srt|ssa|vtt)/ ? '.' + lang.ISO3B : ""}{ext =~ /jp(?:e)?g|png/ ? "-thumb" : ""} \ No newline at end of file diff --git a/compiled/windows_music_shared.groovy b/compiled/windows_music_shared.groovy index c4f0e54..9b91493 100644 --- a/compiled/windows_music_shared.groovy +++ b/compiled/windows_music_shared.groovy @@ -1 +1 @@ -{def IP = System.getProperty("user.name");def hQB = "/run/media/${IP}";def iLv = "$hQB/Videos";def Ev = [home,"$hQB/Data","$hQB/Music","$hQB/Videos","$hQB/Games","$hQB/Books"].collect { it as File }.sort { wDv, nv -> wDv.exists() <=> nv.exists() ?: wDv.diskSpace <=> nv.diskSpace }.last();def evM = iLv ? iLv : Ev;"$evM/"}{"Torrent Uploads/"}{ext.upper()}/{y}{"/["}{d.format("yyyy.MM.dd")}{"] "}{album} - {n} [{ext.upper()}{ext == "flac" ? " " + "${ bitdepth > 16 ? bitdepth + '-' : ''}" + khz : ext == "mp3" && media.get("OverallBitRate/String") != "320 kbps" ? " V0" : ""}]{media.CATALOGNUMBER ? "[" + media.CATALOGNUMBER + "]" : ""}/{dc > 1 ? "Disc " + di + "/" : ""}{dc? di + "-": ""}{pi.pad(2)} {t} \ No newline at end of file +{def zw = System.getProperty("user.name");def DL = "/run/media/${zw}";def F_ = "$DL/Videos";def kd = [home,"$DL/Data","$DL/Music","$DL/Videos","$DL/Games","$DL/Books"].collect { it as File }.sort { ciq, rXN -> ciq.exists() <=> rXN.exists() ?: ciq.diskSpace <=> rXN.diskSpace }.last();def ic = F_ ? F_ : kd;"$ic/"}{"Torrent Uploads/"}{ext.upper()}/{y}{"/["}{d.format("yyyy.MM.dd")}{"] "}{album} - {n} [{ext.upper()}{ext == "flac" ? " " + "${ bitdepth > 16 ? bitdepth + '-' : ''}" + khz : ext == "mp3" && media.get("OverallBitRate/String") != "320 kbps" ? " V0" : ""}]{media.CATALOGNUMBER ? "[" + media.CATALOGNUMBER + "]" : ""}/{dc > 1 ? "Disc " + di + "/" : ""}{dc? di + "-": ""}{pi.pad(2)} {t} \ No newline at end of file diff --git a/compiled/windows_tv.groovy b/compiled/windows_tv.groovy index bbddd17..c5954e0 100644 --- a/compiled/windows_tv.groovy +++ b/compiled/windows_tv.groovy @@ -1 +1 @@ -{def iL = "H:/";def tF = [home,"D:/","E:/","F:/","G:/","H:/"].collect { it as File }.sort { cK, jnO -> cK.exists() <=> jnO.exists() ?: cK.diskSpace <=> jnO.diskSpace }.last();def Ce = iL ? iL : tF;"$Ce/"}{def DSm = /(CN|JP|KR|KP|TW|HK)/;def sUI = /(aeni|donghua|anime)/;def CzO = anime || info.Keywords =~ sUI || (genres =~ /Animation/ && country =~ DSm) ? true : false;CzO ? "Videos/Anime/" : "Videos/TV Series/"}{def zpg = [[sh: 229743, ni: "VTuber Legend"],[sh: 240633, ni: "A Journey Through Another World"],[sh: 245285, ni: "Failure Frame"],[sh: 237045, ni: "Cherry Magic!"],[sh: 68854, ni: "From Me to You"],[sh: 271026, ni: "Taisho Era Contract Marriage"],[sh: 234538, ni: "Demon Lord 2099"]];def EL = n;zpg.each {if (it.sh == tmdbid && type.toString() != "Movie") {EL = it.ni}};def YwS = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def OG_ = EL.replaceAll(YwS.collect { "\\" + it }.join('|'), '');OG_ = OG_.replaceAll(/(\s|\.)*$/, '');OG_}{def QfU = [68854,235973,262295,259140,204098,239779,273190,271026,240125,275695,123542,257162];def GDf = QfU.find { cOS -> tmdbid == cOS } ?: "";GDf ? " ($y) [tmdbid-$GDf]" : ""}/{episode.special ? 'Specials' : 'Season '+s}{def YwS = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def OG_ = sn.replaceAll(YwS.collect { "\\" + it }.join('|'), '_');def SRk = n.replaceAll(YwS.collect { "\\" + it }.join('|'), '_');def Qg = OG_.contains(SRk) ? "" : OG_;Qg == 'Season '+ s ? "" : Qg ? " - " + Qg : ""}/{def VSU = ["Alqanime","BlackLuster","NanDesuKa","ToonsHub","Tsundere-Raws"];def MoN = VSU.find { rq -> fn.contains(rq) } ?: "";def hL = any {(fn =~ /^\[(.*?)\]/)[0][1]} {MoN} {group} {""};hL ? "[$hL] " : ""}{def zpg = [[sh: 229743, ni: "VTuber Legend"],[sh: 240633, ni: "A Journey Through Another World"],[sh: 245285, ni: "Failure Frame"],[sh: 237045, ni: "Cherry Magic!"],[sh: 68854, ni: "From Me to You"],[sh: 271026, ni: "Taisho Era Contract Marriage"],[sh: 234538, ni: "Demon Lord 2099"]];def EL = n;zpg.each {if (it.sh == tmdbid && type.toString() != "Movie") {EL = it.ni}};def YwS = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def OG_ = EL.replaceAll(YwS.collect { "\\" + it }.join('|'), '');OG_ = OG_.replaceAll(/(\s|\.)*$/, '');OG_} - {s00e00}{def YwS = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def OG_ = t.replaceAll(YwS.collect { "\\" + it }.join('|'), '_');def dwE = any { e } { special };OG_ = OG_.length() > 100 ? " " : " - $OG_ ";OG_ == " - Episode $dwE " ? " " : OG_} [{def kD = [[qa: "ABEMA", dx: ["ABEMA"]],[qa: "Bilibili.tv", dx: ["B-Global", "BiliIntl", "BILI"]],[qa: "Hulu", dx: ["HULU"]],[qa: "MeWatch", dx: ["MW.WEB-DL"]],[qa: "Netflix", dx: ["NF.WEB-DL", "NF WEB"]],[qa: "Prime Video", dx: ["AMZN"]],[qa: "TVer", dx: ["TVER"]],[qa: "Shahid", dx: ["SHAHID"]],[qa: "U-NEXT", dx: ["UNEXT"]],[qa: "YouTube", dx: ["YT.WEB-DL", "YOUTUBE", "YTB"]]];def ZZ = ["ASW", "Judas", "JRx7", "EMBER", "KawaSubs", "GuodongSubs"];def tD = ["Erai-raws", "SubsPlease"];def lI = any {(fn =~ /^\[(.*?)\]/)[0][1]} {""};def uyB = any {def qLG = kD.find { fEV -> fEV.dx.find { FOP -> fn.contains(FOP) } }?.dx.first() ?: "";qLG = qLG.replace(".WEB-DL", "");qLG ? "${qLG}.WEB-DL" : ""} {source} {ZZ.find { owW -> group == owW || lI == owW } ? "WEBRip" : ""} {def qe = tD.find { BNX -> group == BNX || lI == BNX} ? "WEB-DL" : "";(source == "Erai-raws" && vcf.upper() == "HEVC") ? "WEBRip" : qe} {vs} {""};uyB ? "$uyB " : ""}{resolution} {vcf.upper()}{bitdepth ? " ${bitdepth}bit" : ""}, {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 fJ = " Dub";def lxR = audioLanguages.any { it.ISO3B == language.ISO3B } ? "" : fJ;lxR = audioLanguages.size() == 1 && audioLanguages.any { it.ISO3B == "und" } ? "" : lxR;lxR}{def uHT = any { audioLanguages.size() } { 0 };def lxR = uHT > 2 ? " MAud" : uHT > 1 ? " DAud" : null;def QR = uHT > 5 ? audioLanguages.take(5) : audioLanguages;lxR ? lxR + QR.joining(" ", " (", "").upper() + (uHT > 5 ? " ...)" : ")") : ""}{def zLE = any { textLanguages.size() } { 0 };def lxR = zLE > 2 ? ", MSub" : zLE > 1 ? ", DSub" : null;def QR = zLE > 5 ? textLanguages.take(5) : textLanguages;lxR ? lxR + QR.joining(" ", " (", "").upper() + (zLE > 5 ? " ...)" : ")") : ""}][{crc32.upper()}]{ext =~ /(ass|srt|ssa|vtt)/ ? '.' + lang.ISO3B : ""}{ext =~ /jp(?:e)?g|png/ ? "-thumb" : ""} \ No newline at end of file +{def upL = "H:/";def tM = [home,"D:/","E:/","F:/","G:/","H:/"].collect { it as File }.sort { gvj, XIX -> gvj.exists() <=> XIX.exists() ?: gvj.diskSpace <=> XIX.diskSpace }.last();def gw = upL ? upL : tM;"$gw/"}{"Videos/"}{def wK = ["boys' love (bl)", "gay theme", "yaoi", "yuri", "lesbian", "hentai","hentai", "sex", "lgbt", "explicit", "adult animation", "adult content"];def Xge = [271026,220118];def cEy = any { info.adult } { false };def Ej = any { info.Keywords.findAll { it in wK } } { id in Xge } { cEy };Ej ? "R18+ " : ""}{def SvQ = /(CN|JP|KR|KP|TW|HK)/;def xj = /(aeni|donghua|anime)/;def Lfz = anime || info.Keywords =~ xj || (genres =~ /Animation/ && country =~ SvQ) ? true : false;Lfz ? "Anime/" : "TV Series/"}{def mS = [[ad: 229743, GRc: "VTuber Legend"],[ad: 240633, GRc: "A Journey Through Another World"],[ad: 245285, GRc: "Failure Frame"],[ad: 237045, GRc: "Cherry Magic!"],[ad: 68854, GRc: "From Me to You"],[ad: 271026, GRc: "Taisho Era Contract Marriage"],[ad: 234538, GRc: "Demon Lord 2099"]];def UJO = n;mS.each {if (it.ad == tmdbid && type.toString() != "Movie") {UJO = it.GRc}};def wjB = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def al = UJO.replaceAll(wjB.collect { "\\" + it }.join('|'), '');al = al.replaceAll(/(\s|\.)*$/, '');al}{def ni = [68854,235973,262295,259140,204098,239779,273190,271026,240125,275695,123542,257162];def wDW = ni.find { Kch -> tmdbid == Kch } ?: "";wDW ? " ($y) [tmdbid-$wDW]" : ""}/{episode.special ? 'Specials' : 'Season '+s}{def wjB = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def al = sn.replaceAll(wjB.collect { "\\" + it }.join('|'), '_');def xh = n.replaceAll(wjB.collect { "\\" + it }.join('|'), '_');def Tz = al.contains(xh) ? "" : al;Tz == 'Season '+ s ? "" : Tz ? " - " + Tz : ""}/{def fxB = ["Alqanime","BlackLuster","NanDesuKa","ToonsHub","Tsundere-Raws"];def QL = fxB.find { mC -> fn.contains(mC) } ?: "";def zns = any {(fn =~ /^\[(.*?)\]/)[0][1]} {QL} {group} {""};zns ? "[$zns] " : ""}{def mS = [[ad: 229743, GRc: "VTuber Legend"],[ad: 240633, GRc: "A Journey Through Another World"],[ad: 245285, GRc: "Failure Frame"],[ad: 237045, GRc: "Cherry Magic!"],[ad: 68854, GRc: "From Me to You"],[ad: 271026, GRc: "Taisho Era Contract Marriage"],[ad: 234538, GRc: "Demon Lord 2099"]];def UJO = n;mS.each {if (it.ad == tmdbid && type.toString() != "Movie") {UJO = it.GRc}};def wjB = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def al = UJO.replaceAll(wjB.collect { "\\" + it }.join('|'), '');al = al.replaceAll(/(\s|\.)*$/, '');al} - {s00e00}{def wjB = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def al = t.replaceAll(wjB.collect { "\\" + it }.join('|'), '_');def ls = any { e } { special };al = al.length() > 100 ? " " : " - $al ";al == " - Episode $ls " ? " " : al} [{def cC = [[utA: "ABEMA", bx: ["ABEMA"]],[utA: "Bilibili.tv", bx: ["B-Global", "BiliIntl", "BILI"]],[utA: "Hulu", bx: ["HULU"]],[utA: "MeWatch", bx: ["MW.WEB-DL"]],[utA: "Netflix", bx: ["NF.WEB-DL", "NF WEB"]],[utA: "Prime Video", bx: ["AMZN"]],[utA: "TVer", bx: ["TVER"]],[utA: "Shahid", bx: ["SHAHID"]],[utA: "U-NEXT", bx: ["UNEXT"]],[utA: "YouTube", bx: ["YT.WEB-DL", "YOUTUBE", "YTB"]]];def _e = ["ASW", "Judas", "JRx7", "EMBER", "KawaSubs", "GuodongSubs"];def Wwc = ["Erai-raws", "SubsPlease"];def xcj = any {(fn =~ /^\[(.*?)\]/)[0][1]} {""};def EIP = any {def XK = cC.find { VS -> VS.bx.find { khC -> fn.contains(khC) } }?.bx.first() ?: "";XK = XK.replace(".WEB-DL", "");XK ? "${XK}.WEB-DL" : ""} {source} {_e.find { br -> group == br || xcj == br } ? "WEBRip" : ""} {def yS = Wwc.find { Um -> group == Um || xcj == Um} ? "WEB-DL" : "";(source == "Erai-raws" && vcf.upper() == "HEVC") ? "WEBRip" : yS} {vs} {""};EIP ? "$EIP " : ""}{resolution} {vcf.upper()}{bitdepth ? " ${bitdepth}bit" : ""}, {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 PT = " Dub";def tS = audioLanguages.any { it.ISO3B == language.ISO3B } ? "" : PT;tS = audioLanguages.size() == 1 && audioLanguages.any { it.ISO3B == "und" } ? "" : tS;tS}{def yo = any { audioLanguages.size() } { 0 };def tS = yo > 2 ? " MAud" : yo > 1 ? " DAud" : null;def Vzi = yo > 5 ? audioLanguages.take(5) : audioLanguages;tS ? tS + Vzi.joining(" ", " (", "").upper() + (yo > 5 ? " ...)" : ")") : ""}{def GPD = any { textLanguages.size() } { 0 };def tS = GPD > 2 ? ", MSub" : GPD > 1 ? ", DSub" : null;def Vzi = GPD > 5 ? textLanguages.take(5) : textLanguages;tS ? tS + Vzi.joining(" ", " (", "").upper() + (GPD > 5 ? " ...)" : ")") : ""}][{crc32.upper()}]{ext =~ /(ass|srt|ssa|vtt)/ ? '.' + lang.ISO3B : ""}{ext =~ /jp(?:e)?g|png/ ? "-thumb" : ""} \ No newline at end of file