Skip to content

Commit 5c43db7

Browse files
committed
Refactor release source logic to handle WEBRip and WEB-DL tags more effectively
1 parent e9846c7 commit 5c43db7

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

modules/releasesource.groovy

+8-4
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
// Platform name is for internal use only, aliases are used to match the filename
44
["ABEMA"], // https://abema.tv/
55
["ADN"], // https://animationdigitalnetwork.com
6-
["BBC"], // https://bbc.co.uk, and iPlayer...
76
["BILI", "B-Global", "BiliIntl", "B-Site", "BiliCN"], // https://www.bilibili.tv and https://www.bilibili.com
8-
["BOOKCUBE"], // https://bookcube.com
97
["COOLMIC"], // https://coolmic.com
108
["HIDIVE", "HIDI.WEB-DL"], // https://hidive.com
119
["IQIYI", "IQ.WEB-DL"], // https://www.iq.com
@@ -22,7 +20,7 @@
2220
]
2321

2422
// List of groups that re-encode or modified even further the video from specific source
25-
def reencode_group = ["ASW", "Judas", "JRx7", "EMBER", "KawaSubs", "GuodongSubs", "SAMEHADAKU"]
23+
def reencode_group = ["ASW", "Judas", "JRx7", "EMBER", "GuodongSubs", "SAMEHADAKU"]
2624
// List of groups that directly rip the video from specific source
2725
def release_group = ["Erai-raws", "SubsPlease"]
2826
def unlisted_group = any {(fn =~ /^\[(.*?)\]/)[0][1]} {""}
@@ -31,7 +29,13 @@
3129
def release_ = any {
3230
def platform = custom_releases.find { idx -> idx.find { known -> fn.lower().contains(known.lower()) } }[0]
3331
platform = platform.replace(".WEB-DL", "")
34-
platform ? "${platform}.WEB-DL" : ""
32+
// Some file may have additional "WEBRip" tag, consider it to new logic
33+
if (fn.contains("WEBRip")) {
34+
platform = platform + ".WEBRip"
35+
} else if (fn.contains("WEB-DL") || fn.contains("WEBDL")) {
36+
platform = platform + ".WEB-DL"
37+
}
38+
platform
3539
} {
3640
source
3741
} {

0 commit comments

Comments
 (0)