use splitext
This commit is contained in:
parent
f44fad40a1
commit
a0a85ca1b4
2 changed files with 3 additions and 3 deletions
|
@ -513,7 +513,7 @@ class ArchiveFile(SQLObject):
|
||||||
def extractPosterStill(self, position):
|
def extractPosterStill(self, position):
|
||||||
oxdb_makedir(dirname(self.posterStillFile))
|
oxdb_makedir(dirname(self.posterStillFile))
|
||||||
mFile = self.absolutePath
|
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
|
mFile = self.mini_movie_file
|
||||||
extract_poster_still(mFile, self.posterStillFile, position)
|
extract_poster_still(mFile, self.posterStillFile, position)
|
||||||
|
|
||||||
|
|
|
@ -158,5 +158,5 @@ if __name__ == "__main__":
|
||||||
sys.exit()
|
sys.exit()
|
||||||
outputFile = sys.argv[2]
|
outputFile = sys.argv[2]
|
||||||
offset = int(float(sys.argv[3]) * gst.MSECOND)
|
offset = int(float(sys.argv[3]) * gst.MSECOND)
|
||||||
#f = PosterStill(inputFile, outputFile, offset, height)
|
f = PosterStill(inputFile, outputFile, offset, height)
|
||||||
f = PosterStillMplayer(inputFile, outputFile, offset, height)
|
#f = PosterStillMplayer(inputFile, outputFile, offset, height)
|
||||||
|
|
Loading…
Reference in a new issue