use splitext

This commit is contained in:
j 2007-12-29 10:50:19 +00:00
parent f44fad40a1
commit a0a85ca1b4
2 changed files with 3 additions and 3 deletions

View File

@ -513,7 +513,7 @@ class ArchiveFile(SQLObject):
def extractPosterStill(self, position):
oxdb_makedir(dirname(self.posterStillFile))
mFile = self.absolutePath
if mFile.endswith('.mov') or mFile.endswith('.mpg'):
if os.path.splitext(mFile)[-1] in ('.mov', '.mpg', '.mpeg'):
mFile = self.mini_movie_file
extract_poster_still(mFile, self.posterStillFile, position)

View File

@ -158,5 +158,5 @@ if __name__ == "__main__":
sys.exit()
outputFile = sys.argv[2]
offset = int(float(sys.argv[3]) * gst.MSECOND)
#f = PosterStill(inputFile, outputFile, offset, height)
f = PosterStillMplayer(inputFile, outputFile, offset, height)
f = PosterStill(inputFile, outputFile, offset, height)
#f = PosterStillMplayer(inputFile, outputFile, offset, height)