Small corrections/optimizatons

This commit is contained in:
Stefan Brand 2010-02-12 13:08:54 +01:00
parent 37bf7b7709
commit c3946f337a

View file

@ -64,22 +64,20 @@ def main(argv):
# Check for needed Programs # Check for needed Programs
global mpbin global mpbin
mpbin = None mpbin = None
if _mpbin == None: if not _mpbin == None and os.path.exists(_mpbin) and not os.path.isdir(_mpbin):
mpbin = progpath("mplayer") mpbin = _mpbin
else: else:
if os.path.exists(_mpbin) and not os.path.isdir(_mpbin): mpbin = progpath("mplayer")
mpbin = _mpbin
if mpbin == None: if mpbin == None:
print "Error: mplayer not found in PATH binary given, Aborting!" print "Error: mplayer not found in PATH binary given, Aborting!"
sys.exit(1) sys.exit(1)
global ffbin global ffbin
ffbin = None ffbin = None
if _ffbin == None: if not _ffbin == None and os.path.exists(_ffbin) and not os.path.isdir(_ffbin):
ffbin = progpath("ffmpeg") ffbin = _ffbin
else: else:
if os.path.exists(_ffbin) and not os.path.isdir(_ffbin): ffbin = progpath("ffmpeg")
ffbin = _ffbin
if ffbin == None: if ffbin == None:
print "Error: ffmpeg not found in PATH and no binary given, Aborting!" print "Error: ffmpeg not found in PATH and no binary given, Aborting!"
sys.exit(1) sys.exit(1)
@ -226,7 +224,7 @@ def progpath(program):
def usage(): def usage():
"""Print avaiable commandline arguments""" """Print avaiable commandline arguments"""
print "This is n900-encode.py (C) 2010 Stefan Brand <seiichiro0185 AT tol.ch>" print "This is n900-encode.py (C) 2010 Stefan Brand <seiichiro0185 AT tol DOT ch>"
print "n900-encode.py usage:\n" print "n900-encode.py usage:\n"
print "--input <file> [-i]: Video to Convert" print "--input <file> [-i]: Video to Convert"
print "--output <file> [-o]: Name of the converted Video" print "--output <file> [-o]: Name of the converted Video"