Skip to content

Commit

Permalink
Compile Groovy Scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 12, 2024
1 parent d8abaaa commit 022ac28
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion compiled/movie.groovy
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{def uv = { System.getProperty(it) };def vCf = uv("os.name").toLowerCase().contains("windows");def JOa = uv("user.name");def qzQ = "/run/media/${JOa}";def hp = vCf ? "H:/" : "$qzQ/Videos";def sL = [[Ko: "Books", Vo: "F:/", cav: "$qzQ/Books"],[Ko: "Data", Vo: "D:/", cav: "$qzQ/Data"],[Ko: "Games", Vo: "G:/", cav: "$qzQ/Games"],[Ko: "Music", Vo: "E:/", cav: "$qzQ/Music"],[Ko: "Videos", Vo: "H:/", cav: "$qzQ/Videos"]];def ii = (sL.collect { it[vCf ? "Vo" : "cav"] as File }.sort { AE, Fmh -> AE.exists() <=> Fmh.exists() ?: AE.diskSpace <=> Fmh.diskSpace }).last();def mmz = hp ?: ii;"$mmz/"}{"Videos/"}{def Po = ["boys' love (bl)", "gay theme", "yaoi", "yuri", "lesbian", "hentai","sex", "lgbt", "explicit", "adult animation", "adult content"];def tt = "TheMovieDB::TV";def Li = [[271026, tt],[220118, tt],[ 74180, tt]];def xa = [[236530, tt]];def KSk = any { info.database } { id == tmdbid ? "TheMovieDB" : "IMDb" };def mNJ = KSk == "IMDb" ? "tt${id}" : id;def geS = any { info.adult } { false };def Or = Li.find { it[0] == mNJ && it[1] == KSk } != null;def yXo = xa.find { it[0] == mNJ && it[1] == KSk } != null;def ZP = info.Keywords.findAll { it in Po } || Or || geS;ZP = yXo ? false : ZP;ZP ? "R18+ " : ""}{def ds = ["CN", "JP", "KR", "KP", "TW", "HK"];def _BJ = ["aeni", "donghua", "anime"];def tDQ = any {anime} || info.Keywords.findAll { it in _BJ } || (ds.contains(country) && genres =~ /Animation/);tDQ ? "Anime/" : "TV Series/"}{def tt = "TheMovieDB::TV";def _FM = [[vT: 68854, _k: "From Me to You", La: tt],[vT: 94904, _k: "My Next Life as a Villainess", La: tt],[vT: 229743, _k: "VTuber Legend", La: tt],[vT: 234538, _k: "Demon Lord 2099", La: tt],[vT: 237045, _k: "Cherry Magic!", La: tt],[vT: 240633, _k: "A Journey Through Another World", La: tt],[vT: 245285, _k: "Failure Frame", La: tt],[vT: 271026, _k: "Taisho Era Contract Marriage", La: tt]];def KSk = any { info.database } { id == tmdbid ? "TheMovieDB" : "IMDb" };def mNJ = KSk == "IMDb" ? "tt${id}" : id;def Sa = n;_FM.each {if (it.vT == mNJ && it.La == KSk) {Sa = it._k}};def PH = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def DL = Sa.replaceAll(PH.collect { "\\" + it }.join('|'), '');DL = DL.replaceAll(/(\s|\.)*$/, '');DL}{def tt = "TheMovieDB::TV";def zZ = [[ 68854, tt],[123542, tt],[204098, tt],[235973, tt],[239779, tt],[240125, tt],[257162, tt],[259140, tt],[262295, tt],[271026, tt],[273190, tt],[275695, tt]];def Dme = zZ.find { it[0] == id && it[1] == info.database } != null;def PLt = ["TheMovieDB::TV": "tmdbid","AniDB": "anidbid","TheTVDB": "tvdbid","TVmaze": "tvmazeid"];def Bwa = PLt[info.database];Dme ? " ($y) [${Bwa}-${id}]" : ""}{"/"}{episode.special ? 'Specials' : 'Season '+s}{def PH = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def DL = sn.replaceAll(PH.collect { "\\" + it }.join('|'), '_');def Rb = n.replaceAll(PH.collect { "\\" + it }.join('|'), '_');def vK = DL.contains(Rb) ? "" : DL;vK == 'Season '+ s ? "" : vK ? " - " + vK : ""}{"/"}{def Dvo = ["Alqanime","BlackLuster","NanDesuKa","ToonsHub","Tsundere-Raws"];def xM = Dvo.find { Rz -> fn.contains(Rz) } ?: "";def VP = any {(fn =~ /^\[(.*?)\]/)[0][1]} {xM} {group} {""};VP ? "[$VP] " : ""}{def tt = "TheMovieDB::TV";def _FM = [[vT: 68854, _k: "From Me to You", La: tt],[vT: 94904, _k: "My Next Life as a Villainess", La: tt],[vT: 229743, _k: "VTuber Legend", La: tt],[vT: 234538, _k: "Demon Lord 2099", La: tt],[vT: 237045, _k: "Cherry Magic!", La: tt],[vT: 240633, _k: "A Journey Through Another World", La: tt],[vT: 245285, _k: "Failure Frame", La: tt],[vT: 271026, _k: "Taisho Era Contract Marriage", La: tt]];def KSk = any { info.database } { id == tmdbid ? "TheMovieDB" : "IMDb" };def mNJ = KSk == "IMDb" ? "tt${id}" : id;def Sa = n;_FM.each {if (it.vT == mNJ && it.La == KSk) {Sa = it._k}};def PH = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def DL = Sa.replaceAll(PH.collect { "\\" + it }.join('|'), '');DL = DL.replaceAll(/(\s|\.)*$/, '');DL}{" - "}{s00e00}{def PH = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def DL = t.replaceAll(PH.collect { "\\" + it }.join('|'), '_');def tH = any { e } { special };DL = DL.length() > 100 ? " " : " - $DL ";DL == " - Episode $tH " ? " " : DL}{" ["}{def VPq = [["ABEMA"],["BILI", "B-Global", "BiliIntl", "B-Site", "BiliCN"],["HULU"],["IQIYI", "IQ.WEB-DL"],["LAFTEL", "LFTL"],["MW.WEB-DL"],["NF.WEB-DL", "NF WEB"],["AMZN"],["SHAHID"],["TVER"],["UNEXT"],["YT.WEB-DL", "YOUTUBE", "YTB"]];def XMi = ["ASW", "Judas", "JRx7", "EMBER", "KawaSubs", "GuodongSubs"];def mrV = ["Erai-raws", "SubsPlease"];def qeR = any {(fn =~ /^\[(.*?)\]/)[0][1]} {""};def aeA = any {def oed = VPq.find { tL -> tL.find { iY -> fn.lower().contains(iY.lower()) } }[0];oed = oed.replace(".WEB-DL", "");oed ? "${oed}.WEB-DL" : ""} {} {source} {XMi.find { bNe -> group == bNe || qeR == bNe } ? "WEBRip" : ""} {def Nmy = mrV.find { mz -> group == mz || qeR == mz} ? "WEB-DL" : "";(source == "Erai-raws" && vcf.upper() == "HEVC") ? "WEBRip" : Nmy} {vs} {""};aeA ? "$aeA " : ""}{def oy = bitdepth ? " ${bitdepth}bit" : "";"$resolution $vcf $oy, $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 cP = " Dub";def lmQ = audioLanguages.any { it.ISO3B == language.ISO3B } ? "" : cP;lmQ = audioLanguages.size() == 1 && audioLanguages.any { it.ISO3B == "und" } ? "" : lmQ;lmQ}{def eK = any { audioLanguages.size() } { 0 };def lmQ = eK > 2 ? " MAud" : eK > 1 ? " DAud" : null;def KE = eK > 5 ? audioLanguages.take(5) : audioLanguages;lmQ ? lmQ + KE.joining(" ", " (", "").upper() + (eK > 5 ? " ...)" : ")") : ""}{def TkR = any { textLanguages.size() } { 0 };def lmQ = TkR > 2 ? ", MSub" : TkR > 1 ? ", DSub" : null;def KE = TkR > 5 ? textLanguages.take(5) : textLanguages;lmQ ? lmQ + KE.joining(" ", " (", "").upper() + (TkR > 5 ? " ...)" : ")") : ""}{"]["}{crc32.upper()}{"]"}{if (f.subtitle) {def RAj = ["name": "." + lang.name,"iso3b": "." + lang.ISO3B,"iso3": "." +lang.ISO3,"iso2": "." + lang.ISO2];def ccC = subt;RAj.values().each { yt -> if (ccC.contains(yt)) {ccC = ccC.replace(yt, "")}};RAj.iso3b + ccC}}{f.image ? "-thumb" : ""}
{def jZ = { System.getProperty(it) };def mY = jZ("os.name").toLowerCase().contains("windows");def fy = jZ("user.name");def XUB = "/run/media/${fy}";def sE = mY ? "H:/" : "$XUB/Videos";def dCv = [[bKk: "Books", Hc: "F:/", RB: "$XUB/Books"],[bKk: "Data", Hc: "D:/", RB: "$XUB/Data"],[bKk: "Games", Hc: "G:/", RB: "$XUB/Games"],[bKk: "Music", Hc: "E:/", RB: "$XUB/Music"],[bKk: "Videos", Hc: "H:/", RB: "$XUB/Videos"]];def Kq = (dCv.collect { it[mY ? "Hc" : "RB"] as File }.sort { Vva, Zrz -> Vva.exists() <=> Zrz.exists() ?: Vva.diskSpace <=> Zrz.diskSpace }).last();def _BI = sE ?: Kq;"$_BI/"}{"Videos/"}{def gvJ = ["boys' love (bl)", "gay theme", "yaoi", "yuri", "lesbian", "hentai","sex", "lgbt", "explicit", "adult animation", "adult content"];def Ry = "TheMovieDB::TV";def RnR = [[271026, Ry],[220118, Ry],[ 74180, Ry]];def FG = [[236530, Ry]];def Shz = any { info.database } { id == tmdbid ? "TheMovieDB" : "IMDb" };def vnF = Shz == "IMDb" ? "tt${id}" : id;def YKb = any { info.adult } { false };def rp = RnR.find { it[0] == vnF && it[1] == Shz } != null;def fX = FG.find { it[0] == vnF && it[1] == Shz } != null;def Pz = info.Keywords.findAll { it in gvJ } || rp || YKb;Pz = fX ? false : Pz;Pz ? "R18+ " : ""}{def JpJ = ["CN", "JP", "KR", "KP", "TW", "HK"];def pu = ["aeni", "donghua", "anime"];def os = any {anime} || info.Keywords.findAll { it in pu } || (JpJ.contains(country) && genres =~ /Animation/);os ? "Anime/" : "TV Series/"}{def Ry = "TheMovieDB::TV";def OMG = [[lHV: 68854, bT: "From Me to You", Gv: Ry],[lHV: 94904, bT: "My Next Life as a Villainess", Gv: Ry],[lHV: 229743, bT: "VTuber Legend", Gv: Ry],[lHV: 234538, bT: "Demon Lord 2099", Gv: Ry],[lHV: 237045, bT: "Cherry Magic!", Gv: Ry],[lHV: 240633, bT: "A Journey Through Another World", Gv: Ry],[lHV: 245285, bT: "Failure Frame", Gv: Ry],[lHV: 271026, bT: "Taisho Era Contract Marriage", Gv: Ry]];def Shz = any { info.database } { id == tmdbid ? "TheMovieDB" : "IMDb" };def vnF = Shz == "IMDb" ? "tt${id}" : id;def _g = n;OMG.each {if (it.lHV == vnF && it.Gv == Shz) {_g = it.bT}};def MEd = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def eq = _g.replaceAll(MEd.collect { "\\" + it }.join('|'), '');eq = eq.replaceAll(/(\s|\.)*$/, '');eq}{def Ry = "TheMovieDB::TV";def lGP = [[ 68854, Ry],[123542, Ry],[204098, Ry],[235973, Ry],[239779, Ry],[240125, Ry],[257162, Ry],[259140, Ry],[262295, Ry],[271026, Ry],[273190, Ry],[275695, Ry]];def Yc = lGP.find { it[0] == id && it[1] == info.database } != null;def Rv = ["TheMovieDB::TV": "tmdbid","AniDB": "anidbid","TheTVDB": "tvdbid","TVmaze": "tvmazeid"];def Mac = Rv[info.database];Yc ? " ($y) [${Mac}-${id}]" : ""}{"/"}{episode.special ? 'Specials' : 'Season '+s}{def MEd = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def eq = sn.replaceAll(MEd.collect { "\\" + it }.join('|'), '_');def Ie = n.replaceAll(MEd.collect { "\\" + it }.join('|'), '_');def YFG = eq.contains(Ie) ? "" : eq;YFG == 'Season '+ s ? "" : YFG ? " - " + YFG : ""}{"/"}{def ggK = ["Alqanime","BlackLuster","NanDesuKa","ToonsHub","Tsundere-Raws"];def qt = ggK.find { IX -> fn.contains(IX) } ?: "";def vz = any {(fn =~ /^\[(.*?)\]/)[0][1]} {qt} {group} {""};vz ? "[$vz] " : ""}{def Ry = "TheMovieDB::TV";def OMG = [[lHV: 68854, bT: "From Me to You", Gv: Ry],[lHV: 94904, bT: "My Next Life as a Villainess", Gv: Ry],[lHV: 229743, bT: "VTuber Legend", Gv: Ry],[lHV: 234538, bT: "Demon Lord 2099", Gv: Ry],[lHV: 237045, bT: "Cherry Magic!", Gv: Ry],[lHV: 240633, bT: "A Journey Through Another World", Gv: Ry],[lHV: 245285, bT: "Failure Frame", Gv: Ry],[lHV: 271026, bT: "Taisho Era Contract Marriage", Gv: Ry]];def Shz = any { info.database } { id == tmdbid ? "TheMovieDB" : "IMDb" };def vnF = Shz == "IMDb" ? "tt${id}" : id;def _g = n;OMG.each {if (it.lHV == vnF && it.Gv == Shz) {_g = it.bT}};def MEd = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def eq = _g.replaceAll(MEd.collect { "\\" + it }.join('|'), '');eq = eq.replaceAll(/(\s|\.)*$/, '');eq}{" - "}{s00e00}{def MEd = ['\\', '/', ':', '*', '?', '"', '<', '>', '|'];def eq = t.replaceAll(MEd.collect { "\\" + it }.join('|'), '_');def Fs = any { e } { special };eq = eq.length() > 100 ? " " : " - $eq ";eq == " - Episode $Fs " ? " " : eq}{" ["}{def LYf = [["ABEMA"],["BILI", "B-Global", "BiliIntl", "B-Site", "BiliCN"],["HULU"],["IQIYI", "IQ.WEB-DL"],["LAFTEL", "LFTL"],["MW.WEB-DL"],["NF.WEB-DL", "NF WEB"],["AMZN"],["SHAHID"],["TVER"],["UNEXT"],["YT.WEB-DL", "YOUTUBE", "YTB"]];def GB = ["ASW", "Judas", "JRx7", "EMBER", "KawaSubs", "GuodongSubs"];def Kmw = ["Erai-raws", "SubsPlease"];def aTz = any {(fn =~ /^\[(.*?)\]/)[0][1]} {""};def RF = any {def yu = LYf.find { OR -> OR.find { ljE -> fn.lower().contains(ljE.lower()) } }[0];yu = yu.replace(".WEB-DL", "");yu ? "${yu}.WEB-DL" : ""} {} {source} {GB.find { bR -> group == bR || aTz == bR } ? "WEBRip" : ""} {def qgX = Kmw.find { quP -> group == quP || aTz == quP} ? "WEB-DL" : "";(source == "Erai-raws" && vcf.upper() == "HEVC") ? "WEBRip" : qgX} {vs} {""};RF ? "$RF " : ""}{def QK = bitdepth ? " ${bitdepth}bit" : "";"$resolution $vcf $QK, $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 SUl = " Dub";def Jz = audioLanguages.any { it.ISO3B == language.ISO3B } ? "" : SUl;Jz = audioLanguages.size() == 1 && audioLanguages.any { it.ISO3B == "und" } ? "" : Jz;Jz}{def hc = any { audioLanguages.size() } { 0 };def Jz = hc > 2 ? " MAud" : hc > 1 ? " DAud" : null;def ay = hc > 5 ? audioLanguages.take(5) : audioLanguages;Jz ? Jz + ay.joining(" ", " (", "").upper() + (hc > 5 ? " ...)" : ")") : ""}{def WS = any { textLanguages.size() } { 0 };def Jz = WS > 2 ? ", MSub" : WS > 1 ? ", DSub" : null;def ay = WS > 5 ? textLanguages.take(5) : textLanguages;Jz ? Jz + ay.joining(" ", " (", "").upper() + (WS > 5 ? " ...)" : ")") : ""}{"]["}{crc32.upper()}{"]"}{if (f.subtitle) {def uYy = ["name": "." + lang.name,"iso3b": "." + lang.ISO3B,"iso3": "." +lang.ISO3,"iso2": "." + lang.ISO2];def ZKE = subt;uYy.values().each { _kz -> if (ZKE.contains(_kz)) {ZKE = ZKE.replace(_kz, "")}};uYy.iso3b + ZKE}}{f.image ? "-thumb" : ""}
2 changes: 1 addition & 1 deletion compiled/music_shared.groovy
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{def Pud = { System.getProperty(it) };def TE = Pud("os.name").toLowerCase().contains("windows");def zz = Pud("user.name");def HN = "/run/media/${zz}";def of = TE ? "H:/" : "$HN/Videos";def Cxm = [[iz: "Books", JAQ: "F:/", Akh: "$HN/Books"],[iz: "Data", JAQ: "D:/", Akh: "$HN/Data"],[iz: "Games", JAQ: "G:/", Akh: "$HN/Games"],[iz: "Music", JAQ: "E:/", Akh: "$HN/Music"],[iz: "Videos", JAQ: "H:/", Akh: "$HN/Videos"]];def Nq = (Cxm.collect { it[TE ? "JAQ" : "Akh"] as File }.sort { lky, eLk -> lky.exists() <=> eLk.exists() ?: lky.diskSpace <=> eLk.diskSpace }).last();def GFq = of ?: Nq;"$GFq/"}{"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}
{def qo = { System.getProperty(it) };def prc = qo("os.name").toLowerCase().contains("windows");def FD = qo("user.name");def zdl = "/run/media/${FD}";def UA = prc ? "H:/" : "$zdl/Videos";def AK = [[eXH: "Books", ye: "F:/", Nc: "$zdl/Books"],[eXH: "Data", ye: "D:/", Nc: "$zdl/Data"],[eXH: "Games", ye: "G:/", Nc: "$zdl/Games"],[eXH: "Music", ye: "E:/", Nc: "$zdl/Music"],[eXH: "Videos", ye: "H:/", Nc: "$zdl/Videos"]];def kBX = (AK.collect { it[prc ? "ye" : "Nc"] as File }.sort { Wa, bA -> Wa.exists() <=> bA.exists() ?: Wa.diskSpace <=> bA.diskSpace }).last();def oq = UA ?: kBX;"$oq/"}{"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}
2 changes: 1 addition & 1 deletion compiled/posix_movie.groovy
2 changes: 1 addition & 1 deletion compiled/posix_music_shared.groovy
2 changes: 1 addition & 1 deletion compiled/posix_tv.groovy
Loading

0 comments on commit 022ac28

Please sign in to comment.