mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 05:43:16 -07:00
We now can post-process files not inside of there own folder, we simply confirm there at the root of our category or watch folder then move them into there own seperate foldersand go from there.
nzbName's are now cleaned up.
This commit is contained in:
parent
086eaaa516
commit
fd4d14be64
7 changed files with 175 additions and 88 deletions
|
@ -1,6 +1,6 @@
|
|||
import os
|
||||
import logging
|
||||
from nzbtomedia.nzbToMediaUtil import iterate_media_files
|
||||
from nzbtomedia.nzbToMediaUtil import listMediaFiles
|
||||
|
||||
Logger = logging.getLogger()
|
||||
|
||||
|
@ -11,17 +11,18 @@ def process_all_exceptions(name, dirname):
|
|||
process_exception(exception, name, dirname)
|
||||
|
||||
def process_exception(exception, name, dirname):
|
||||
for parentDir, filename in iterate_media_files(dirname):
|
||||
for filename in listMediaFiles(dirname):
|
||||
parentDir = os.path.dirname(filename)
|
||||
exception(filename, parentDir)
|
||||
|
||||
def process_qoq(filename, dirname):
|
||||
logger.debug("Reversing the file name for a QoQ release %s", filename)
|
||||
logging.debug("Reversing the file name for a QoQ release %s", filename)
|
||||
head, fileExtension = os.path.splitext(os.path.basename(filename))
|
||||
newname = head[::-1]
|
||||
newfile = newname + fileExtension
|
||||
newfilePath = os.path.join(dirname, newfile)
|
||||
os.rename(filename, newfilePath)
|
||||
logger.debug("New file name is %s", newfile)
|
||||
logging.debug("New file name is %s", newfile)
|
||||
|
||||
# dict for custom groups
|
||||
# we can add more to this list
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue