Skip to content

Commit

Permalink
Cherry-pick revert 8f65a3d and dc3aec8
Browse files Browse the repository at this point in the history
Refactor release source logic to simplify platform identification and remove redundant checks
  • Loading branch information
nattadasu committed Jan 3, 2025
1 parent d3c8945 commit 7243b00
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions modules/releasesource.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,7 @@
def release_ = any {
def platform = custom_releases.find { idx -> idx.find { known -> fn.lower().contains(known.lower()) } }[0]
platform = platform.replace(".WEB-DL", "")
// sometimes, group may use different keyword like WEBRip instead of WEB-DL
// when they do a re-encoding or modification. This logic will try to find the
// correct source if stated explicitly in the filename
def is_webdl = source.contains("WEB-DL")
def src_smart = source ? ".${source}" : ""
is_webdl ? "${platform}.WEB-DL" : platform ? "${platform}${src_smart}" : ""
} {
// if unlised group is BiliIntl, then it's from bilibili
unlisted_group == "BiliIntl" ? "BILI.WEB-DL" : ""
platform ? "${platform}.WEB-DL" : ""
} {
source
} {
Expand Down

0 comments on commit 7243b00

Please sign in to comment.