mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 18:47:09 -07:00
Cleaned up code and fixed a few small bugs.
This commit is contained in:
parent
4bd04436bc
commit
289d451112
11 changed files with 274 additions and 286 deletions
|
@ -7,23 +7,6 @@ from nzbtomedia.nzbToMediaUtil import get_downloadInfo
|
|||
# Initialize the config
|
||||
nzbtomedia.initialize()
|
||||
|
||||
inputDirectory = 'Z:/complete/music/B.O.A.T.S. II_ Me Time [2013]'
|
||||
outputDestination = 'Z:\\test\\music\\B.O.A.T.S. II_ Me Time [2013]'
|
||||
outputDestinationMaster = outputDestination # Save the original, so we can change this within the loop below, and reset afterwards.
|
||||
|
||||
now = datetime.datetime.now()
|
||||
for dirpath, dirnames, filenames in os.walk(inputDirectory):
|
||||
for file in filenames:
|
||||
|
||||
filePath = os.path.join(dirpath, file)
|
||||
fileName, fileExtension = os.path.splitext(file)
|
||||
newDir = dirpath # find the full path
|
||||
newDir = newDir.replace(inputDirectory, "") #find the extra-depth directory
|
||||
if len(newDir) > 0 and newDir[0] == "/":
|
||||
newDir = newDir[1:] # remove leading "/" to enable join to work.
|
||||
outputDestination = os.path.join(outputDestinationMaster, newDir) # join this extra directory to output.
|
||||
|
||||
targetDirectory = os.path.join(outputDestination, file)
|
||||
|
||||
outputDestination = outputDestinationMaster
|
||||
nzbtomedia.flatten(outputDestination)
|
||||
test = nzbtomedia.CFG['HeadPhones']['music']
|
||||
section = nzbtomedia.CFG.findsection('tv').isenabled()
|
||||
print section
|
Loading…
Add table
Add a link
Reference in a new issue