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 Oct 28, 2024
1 parent b5e3da7 commit e70f927
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 52 deletions.
26 changes: 15 additions & 11 deletions compiled/posix_movie.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -88,21 +88,25 @@
{" ("}{y}{")"}
{" ["}
{
def customRelease = [
"AMZN",
"B-Global",
"UNEXT",
"ABEMA",
"HULU",
"SHAHID"
def custom_releases = [
[platform: "Bilibili.tv", aliases: ["B-Global", "BiliIntl", "BILI"]],
[platform: "Prime Video", aliases: ["AMZN"]],
[platform: "U-NEXT", aliases: ["UNEXT"]],
[platform: "ABEMA", aliases: ["ABEMA"]],
[platform: "Hulu", aliases: ["HULU"]],
[platform: "Shahid", aliases: ["SHAHID"]]
]
def finalRelease = customRelease.find { releaseName -> fn.contains(releaseName) } ?: ""
def reencode_group = ["ASW"]
def release_group = ["Erai-raws", "SubsPlease"]
def allas = custom_releases.find { crate -> crate.aliases.find { alias -> fn.contains(alias) } }?.aliases.first() ?: ""
def release_ = any {
fn.contains("BiliIntl") || fn.contains("BILI") ? "B-Global.WEB-DL" : ""
} {
finalRelease ? finalRelease + ".WEB-DL" : ""
allas ? "${allas}.WEB-DL" : ""
} {
source
} {
reencode_group.find { g_ -> group == g_ } ? "WEBRip" : ""
} {
release_group.find { r_ -> group == r_ } ? "WEB-DL" : ""
} {
""
}
Expand Down
34 changes: 19 additions & 15 deletions compiled/posix_tv.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
{
def invalid_chars = ['\\', '/', ':', '*', '?', '"', '<', '>', '|']
def fixed_name = sn.replaceAll(invalid_chars.collect { "\\" + it }.join('|'), '_')
def fixed_title = n.replaceAll(invalid_chars.collect { "\\" + it }.join('|'), '_')
def kv = fixed_name == fixed_title ? "" : fixed_name
def fixed_title = n.replaceAll(invalid_chars.collect { "\\" + it }.join('|'), '_')
def kv = fixed_name == fixed_title ? "" : fixed_name
kv == 'Season '+ s ? "" : kv ? " - " + kv : ""
}
{"/"}{
Expand Down Expand Up @@ -109,29 +109,33 @@
fixed_name = fixed_name.replaceAll(/(\s|\.)*$/, '')
fixed_name
}
{" - "}{s00e00}{" - "}
{" - "}{s00e00}
{
def invalid_chars = ['\\', '/', ':', '*', '?', '"', '<', '>', '|']
def fixed_name = t.replaceAll(invalid_chars.collect { "\\" + it }.join('|'), '_')
fixed_name
fixed_name.length() > 100 ? " " : " - $fixed_name "
}
{" ["}
{
def customRelease = [
"AMZN",
"B-Global",
"UNEXT",
"ABEMA",
"HULU",
"SHAHID"
def custom_releases = [
[platform: "Bilibili.tv", aliases: ["B-Global", "BiliIntl", "BILI"]],
[platform: "Prime Video", aliases: ["AMZN"]],
[platform: "U-NEXT", aliases: ["UNEXT"]],
[platform: "ABEMA", aliases: ["ABEMA"]],
[platform: "Hulu", aliases: ["HULU"]],
[platform: "Shahid", aliases: ["SHAHID"]]
]
def finalRelease = customRelease.find { releaseName -> fn.contains(releaseName) } ?: ""
def reencode_group = ["ASW"]
def release_group = ["Erai-raws", "SubsPlease"]
def allas = custom_releases.find { crate -> crate.aliases.find { alias -> fn.contains(alias) } }?.aliases.first() ?: ""
def release_ = any {
fn.contains("BiliIntl") || fn.contains("BILI") ? "B-Global.WEB-DL" : ""
} {
finalRelease ? finalRelease + ".WEB-DL" : ""
allas ? "${allas}.WEB-DL" : ""
} {
source
} {
reencode_group.find { g_ -> group == g_ } ? "WEBRip" : ""
} {
release_group.find { r_ -> group == r_ } ? "WEB-DL" : ""
} {
""
}
Expand Down
26 changes: 15 additions & 11 deletions compiled/windows_movie.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -87,21 +87,25 @@
{" ("}{y}{")"}
{" ["}
{
def customRelease = [
"AMZN",
"B-Global",
"UNEXT",
"ABEMA",
"HULU",
"SHAHID"
def custom_releases = [
[platform: "Bilibili.tv", aliases: ["B-Global", "BiliIntl", "BILI"]],
[platform: "Prime Video", aliases: ["AMZN"]],
[platform: "U-NEXT", aliases: ["UNEXT"]],
[platform: "ABEMA", aliases: ["ABEMA"]],
[platform: "Hulu", aliases: ["HULU"]],
[platform: "Shahid", aliases: ["SHAHID"]]
]
def finalRelease = customRelease.find { releaseName -> fn.contains(releaseName) } ?: ""
def reencode_group = ["ASW"]
def release_group = ["Erai-raws", "SubsPlease"]
def allas = custom_releases.find { crate -> crate.aliases.find { alias -> fn.contains(alias) } }?.aliases.first() ?: ""
def release_ = any {
fn.contains("BiliIntl") || fn.contains("BILI") ? "B-Global.WEB-DL" : ""
} {
finalRelease ? finalRelease + ".WEB-DL" : ""
allas ? "${allas}.WEB-DL" : ""
} {
source
} {
reencode_group.find { g_ -> group == g_ } ? "WEBRip" : ""
} {
release_group.find { r_ -> group == r_ } ? "WEB-DL" : ""
} {
""
}
Expand Down
34 changes: 19 additions & 15 deletions compiled/windows_tv.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
{
def invalid_chars = ['\\', '/', ':', '*', '?', '"', '<', '>', '|']
def fixed_name = sn.replaceAll(invalid_chars.collect { "\\" + it }.join('|'), '_')
def fixed_title = n.replaceAll(invalid_chars.collect { "\\" + it }.join('|'), '_')
def kv = fixed_name == fixed_title ? "" : fixed_name
def fixed_title = n.replaceAll(invalid_chars.collect { "\\" + it }.join('|'), '_')
def kv = fixed_name == fixed_title ? "" : fixed_name
kv == 'Season '+ s ? "" : kv ? " - " + kv : ""
}
{"/"}{
Expand Down Expand Up @@ -108,29 +108,33 @@
fixed_name = fixed_name.replaceAll(/(\s|\.)*$/, '')
fixed_name
}
{" - "}{s00e00}{" - "}
{" - "}{s00e00}
{
def invalid_chars = ['\\', '/', ':', '*', '?', '"', '<', '>', '|']
def fixed_name = t.replaceAll(invalid_chars.collect { "\\" + it }.join('|'), '_')
fixed_name
fixed_name.length() > 100 ? " " : " - $fixed_name "
}
{" ["}
{
def customRelease = [
"AMZN",
"B-Global",
"UNEXT",
"ABEMA",
"HULU",
"SHAHID"
def custom_releases = [
[platform: "Bilibili.tv", aliases: ["B-Global", "BiliIntl", "BILI"]],
[platform: "Prime Video", aliases: ["AMZN"]],
[platform: "U-NEXT", aliases: ["UNEXT"]],
[platform: "ABEMA", aliases: ["ABEMA"]],
[platform: "Hulu", aliases: ["HULU"]],
[platform: "Shahid", aliases: ["SHAHID"]]
]
def finalRelease = customRelease.find { releaseName -> fn.contains(releaseName) } ?: ""
def reencode_group = ["ASW"]
def release_group = ["Erai-raws", "SubsPlease"]
def allas = custom_releases.find { crate -> crate.aliases.find { alias -> fn.contains(alias) } }?.aliases.first() ?: ""
def release_ = any {
fn.contains("BiliIntl") || fn.contains("BILI") ? "B-Global.WEB-DL" : ""
} {
finalRelease ? finalRelease + ".WEB-DL" : ""
allas ? "${allas}.WEB-DL" : ""
} {
source
} {
reencode_group.find { g_ -> group == g_ } ? "WEBRip" : ""
} {
release_group.find { r_ -> group == r_ } ? "WEB-DL" : ""
} {
""
}
Expand Down

0 comments on commit e70f927

Please sign in to comment.