NinjaCentral fix (SABnzbd)

This is a fix related to how NinjaCentral names their NZB files.
All their NZBs have a dash + four characters appended to the filename/name of the NZB.
A few examples: 
-ASn1 
-xm98 
-ga2k

This reg-ex/reg-ex-replace works by removing that part only. I've had this reg-ex in my clean.py script for quite a long time, and haven't observed any negative effects with using this, with a lot of different NZB indexers simultaneously. 

A reg-ex test:
https://regex101.com/r/fpsQqh/1
pull/387/head
VP-EN 3 years ago committed by GitHub
parent 837d652c68
commit eb44de13dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -49,7 +49,7 @@ fwp = re.sub('(?i)\[ettv\]$', '', fwp)
fwp = re.sub('(?i)\[TGx\]-xpost$', '', fwp)
fwp = re.sub('(?i).mkv-xpost$', '', fwp)
fwp = re.sub('(?i)-xpost$', '', fwp)
fwp = re.sub(r'(\-[^-.\n]*)(\-.{4})?$', r'\1', fwp)
print("1") # Accept
print(fwp)
print()
@ -58,4 +58,4 @@ print()
print()
print()
# 0 means OK
sys.exit(0)
sys.exit(0)

Loading…
Cancel
Save