Missed another line of code, had to add

This commit is contained in:
echel0n 2014-04-19 17:08:27 -07:00
commit 4a7a115328
2 changed files with 12 additions and 4 deletions

View file

@ -283,7 +283,7 @@ def initialize(section=None):
FFPROBE = 'ffprobe' FFPROBE = 'ffprobe'
if subprocess.call(['which', 'ffmpeg']) != 0: if subprocess.call(['which', 'ffmpeg']) != 0:
res = subprocess.call([os.path.join(PROGRAM_DIR, 'getffmpeg.sh')], stdout=bitbucket, stderr=bitbucket) res = subprocess.call([os.path.join(PROGRAM_DIR, 'getffmpeg.sh')], stdout=bitbucket, stderr=bitbucket)
if res or subprocess.call(['which', 'ffmpeg']) != 0: # did not install or ffmpeg still not found. if res or subprocess.call(['which', 'ffmpeg'], stdout=bitbucket, stderr=bitbucket) != 0: # did not install or ffmpeg still not found.
logger.error("Failed to install ffmpeg. Please install manually") logger.error("Failed to install ffmpeg. Please install manually")
logger.info("Cannot transcode video files, disabling transcoding!") logger.info("Cannot transcode video files, disabling transcoding!")
TRANSCODE = 0 TRANSCODE = 0
@ -291,7 +291,7 @@ def initialize(section=None):
if subprocess.call(['which', 'ffprobe']) != 0: if subprocess.call(['which', 'ffprobe']) != 0:
res = subprocess.call([os.path.join(PROGRAM_DIR, 'getffmpeg.sh')], stdout=bitbucket, stderr=bitbucket) res = subprocess.call([os.path.join(PROGRAM_DIR, 'getffmpeg.sh')], stdout=bitbucket, stderr=bitbucket)
if res or subprocess.call(['which', 'ffprobe']) != 0: if res or subprocess.call(['which', 'ffprobe'], stdout=bitbucket, stderr=bitbucket) != 0:
logger.error("Failed to install ffprobe. Please install manually") logger.error("Failed to install ffprobe. Please install manually")
logger.info("Cannot detect corrupt video files, disabling corrupt video detection!") logger.info("Cannot detect corrupt video files, disabling corrupt video detection!")
FFPROBE = None FFPROBE = None

View file

@ -1,7 +1,9 @@
import os import os
import sys import sys
import TorrentToMedia import TorrentToMedia
import nzbToMedia import nzbtomedia
from nzbtomedia.Transcoder import Transcoder
from nzbtomedia.nzbToMediaUtil import listMediaFiles
os.environ['TR_TORRENT_DIR']="z:/downloads/complete/movie/The.Lego.Movie.2014.R5.x264.English.XviD-vTg.nfo_0166_-_The.Lego.Movie.2014.R5.x264.English.XviD-vTg.nfo_yEn.cp(tt1490017)" os.environ['TR_TORRENT_DIR']="z:/downloads/complete/movie/The.Lego.Movie.2014.R5.x264.English.XviD-vTg.nfo_0166_-_The.Lego.Movie.2014.R5.x264.English.XviD-vTg.nfo_yEn.cp(tt1490017)"
os.environ['TR_TORRENT_NAME']="The.Lego.Movie.2014.R5.x264.English.XviD-vTg.nfo_0166_-_The.Lego.Movie.2014.R5.x264.English.XviD-vTg.nfo_yEn.cp(tt1490017)" os.environ['TR_TORRENT_NAME']="The.Lego.Movie.2014.R5.x264.English.XviD-vTg.nfo_0166_-_The.Lego.Movie.2014.R5.x264.English.XviD-vTg.nfo_yEn.cp(tt1490017)"
@ -9,4 +11,10 @@ os.environ['TR_TORRENT_ID']="7855bb5c20189a73ea45aaf80c2541dfcf897f9d"
os.environ['TR_TORRENT_HASH']="7855bb5c20189a73ea45aaf80c2541dfcf897f9d" os.environ['TR_TORRENT_HASH']="7855bb5c20189a73ea45aaf80c2541dfcf897f9d"
# Initialize the config # Initialize the config
nzbToMedia.main(sys.argv) nzbtomedia.initialize()
for video in listMediaFiles('Y:\Movies\Jobs (2013)'):
if nzbtomedia.TRANSCODE and Transcoder().isVideoGood(video):
print 'Good'
else:
print 'Bad'