mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 13:53:15 -07:00
Added in code to place single files or groups of files that are not contained in a folder into there own folder or grouped folder based on parsing of the filenames to extract details required to determin correcting folder naming.
This commit is contained in:
parent
c8ddbc4836
commit
f7e56b979b
258 changed files with 73367 additions and 174 deletions
|
@ -1,6 +1,5 @@
|
|||
import os
|
||||
import logging
|
||||
from nzbtomedia.nzbToMediaUtil import listMediaFiles, joinPath
|
||||
|
||||
Logger = logging.getLogger()
|
||||
|
||||
|
@ -20,7 +19,7 @@ def process_qoq(filename, dirname):
|
|||
head, fileExtension = os.path.splitext(os.path.basename(filename))
|
||||
newname = head[::-1]
|
||||
newfile = newname + fileExtension
|
||||
newfilePath = joinPath(dirname, newfile)
|
||||
newfilePath = os.path.join(dirname, newfile)
|
||||
os.rename(filename, newfilePath)
|
||||
logging.debug("New file name is %s", newfile)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue