The current {source} binding takes care of identifying the broad "WEBDL" or "WEBRip" and similar, but does not include where exactly from.
I'll share my solution to this particularly pointless problem.
Code: Select all
{ def file = new File('/scripts/websources.txt')
def websources = file.exists() ? readLines(file).join("|") : null // to avoid non-existing paths failing the whole block
def isWeb = (source ==~ /WEB.*/)
// or def isWeb = source.matches(/WEB.*/) don't know which one is preferrable
def lfr = { if (isWeb) fn.match(/($websources)\.(?i)WEB/) } // logo free release
return allOf{fn.match(/(?i)(UHD).$source/).upper()}{lfr}{source}.join(".") } // it also specifies that source is downscaled from a 4K stream
Code: Select all
9NOW
AE
AUBC
AMBC
AS
AJAZ
AMZN
AMC
ATK
ANPL
ANLB
AOL
ARD
iP
BRAV
CNLP
CN
CBC
CBS
4OD
CHGD
CMAX
CNBC
CC
CCGC
COOK
CMT
CRKL
CR
CSPN
CTV
CUR
CWS
DSKI
DHF
DEST
DDY
DTV
DISC
DSNY
DIY
DOCC
DPLY
ETV
ETTV
EPIX
ESPN
ESQ
FAM
FJR
FOOD
FOX
FREE
FYI
GLBL
GLOB
GO90
GC
HLMK
HBO
HGTV
HIDI
HIST
HULU
TOU
IFC
ID
iT
ITV
KNOW
LIFE
LN
MNBC
MTOD
MTV
NATG
NBA
NBC
NF
NFLN
NFL
NICK
NRK
PLUZ
PBS
PBSK
PSN
RSTR
RTE
SBS
SESO
SHMI
SPIK
SNET
SPRT
STAN
STZ
SVT
SWER
SYFY
TBS
TEN
TFOU
TLC
TRVL
TUBI
TV3
TV4
TVL
VH1
VICE
VMEO
UFC
UKTV
UNIV
VLCT
VIAP
VRV
WNET
WME
WWEN
XBOX
YHOO
RED
ZDF