mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-22 06:13:19 -07:00
remove directory walk
This commit is contained in:
parent
7190394850
commit
cfa68b8a3c
1 changed files with 6 additions and 9 deletions
|
@ -162,14 +162,11 @@ def process(dirName, nzbName=None, status=0):
|
||||||
|
|
||||||
if status == 0:
|
if status == 0:
|
||||||
if transcode == 1:
|
if transcode == 1:
|
||||||
Logger.info("Checking for files to be transcoded")
|
result = Transcoder.Transcode_file(dirName)
|
||||||
mediaContainer = (config.get("Extensions", "mediaExtensions")).split(',')
|
if result == 0:
|
||||||
for dirpath, dirnames, filenames in os.walk(dirName):
|
Logger.debug("Transcoding succeeded for files in %s", dirName)
|
||||||
for file in filenames:
|
else:
|
||||||
filePath = os.path.join(dirpath, file)
|
Logger.warning("Transcoding failed for files in %s", dirName)
|
||||||
fileExtension = os.path.splitext(file)[1]
|
|
||||||
if fileExtension in mediaContainer: # If the file is a video file
|
|
||||||
result = Transcoder.Transcode_file(filePath)
|
|
||||||
|
|
||||||
if method == "manage":
|
if method == "manage":
|
||||||
command = "manage.update"
|
command = "manage.update"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue