mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 22:03:13 -07:00
only reverse the filename, simplify match
This commit is contained in:
parent
f8e887b853
commit
628539da08
1 changed files with 3 additions and 3 deletions
|
@ -11,7 +11,7 @@ Logger = logging.getLogger()
|
|||
|
||||
def process_all_exceptions(name, dirname):
|
||||
for group, exception in __customgroups__.items():
|
||||
if not group in name:
|
||||
if not (group in name or group in dirname):
|
||||
continue
|
||||
process_exception(exception, name, dirname)
|
||||
|
||||
|
@ -23,7 +23,7 @@ def process_exception(exception, name, dirname):
|
|||
|
||||
def process_qoq(filename, dirname):
|
||||
Logger.debug("Reversing the file name for a QoQ release %s", filename)
|
||||
head, fileExtention = os.path.splitext(filename)
|
||||
head, fileExtention = os.path.splitext(os.path.basename(filename))
|
||||
newname = head[::-1]
|
||||
newfile = newname + fileExtention
|
||||
newfilePath = os.path.join(dirname, newfile)
|
||||
|
@ -32,4 +32,4 @@ def process_qoq(filename, dirname):
|
|||
|
||||
# dict for custom groups
|
||||
# we can add more to this list
|
||||
__customgroups__ = {'[=-< Q o Q >-=]': process_qoq}
|
||||
__customgroups__ = {'Q o Q': process_qoq}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue