mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-14 17:22:53 -07:00
This commit is contained in:
parent
924b7e12f2
commit
8006d20df4
3 changed files with 8 additions and 4 deletions
|
@ -266,7 +266,7 @@ def main(args):
|
|||
|
||||
for section, subsections in nzbtomedia.SECTIONS.items():
|
||||
for subsection in subsections:
|
||||
for dirName in nzbtomedia.getDirs(section,subsection):
|
||||
for dirName in nzbtomedia.getDirs(section, subsection, link='hard'):
|
||||
logger.info("Starting manual run for %s:%s - Folder:%s" % (section, subsection, dirName))
|
||||
|
||||
logger.info("Checking database for download info for %s ..." % (os.path.basename(dirName)))
|
||||
|
|
|
@ -706,7 +706,7 @@ def main(args, section=None):
|
|||
|
||||
for section, subsections in nzbtomedia.SECTIONS.items():
|
||||
for subsection in subsections:
|
||||
for dirName in getDirs(section, subsection):
|
||||
for dirName in getDirs(section, subsection, link = 'move'):
|
||||
logger.info("Starting manual run for %s:%s - Folder:%s" % (section, subsection, dirName))
|
||||
|
||||
logger.info("Checking database for download info for %s ..." % (os.path.basename(dirName)))
|
||||
|
|
|
@ -44,8 +44,12 @@ def getVideoDetails(videofile):
|
|||
result = 1
|
||||
if not nzbtomedia.FFPROBE:
|
||||
return video_details, result
|
||||
if 'avprobe' in nzbtomedia.FFPROBE:
|
||||
print_format = '-of'
|
||||
else:
|
||||
print_format = '-print_format'
|
||||
try:
|
||||
command = [nzbtomedia.FFPROBE, '-v', 'quiet', '-print_format', 'json', '-show_format', '-show_streams', '-show_error', videofile]
|
||||
command = [nzbtomedia.FFPROBE, '-v', 'quiet', print_format, 'json', '-show_format', '-show_streams', '-show_error', videofile]
|
||||
proc = subprocess.Popen(command, stdout=subprocess.PIPE)
|
||||
out, err = proc.communicate()
|
||||
result = proc.returncode
|
||||
|
@ -53,7 +57,7 @@ def getVideoDetails(videofile):
|
|||
except: pass
|
||||
if not video_details:
|
||||
try:
|
||||
command = [nzbtomedia.FFPROBE, '-v', 'quiet', '-print_format', 'json', '-show_format', '-show_streams', videofile]
|
||||
command = [nzbtomedia.FFPROBE, '-v', 'quiet', print_format, 'json', '-show_format', '-show_streams', videofile]
|
||||
proc = subprocess.Popen(command, stdout=subprocess.PIPE)
|
||||
out, err = proc.communicate()
|
||||
result = proc.returncode
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue