From a0a85ca1b43d810d53b8d5bd1a42c26a705204d5 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 29 Dec 2007 10:50:19 +0000 Subject: [PATCH] use splitext --- oxdbarchive/model.py | 2 +- oxdbarchive/tools/extract_poster_still.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/oxdbarchive/model.py b/oxdbarchive/model.py index fcb3afe..3fe5238 100644 --- a/oxdbarchive/model.py +++ b/oxdbarchive/model.py @@ -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) diff --git a/oxdbarchive/tools/extract_poster_still.py b/oxdbarchive/tools/extract_poster_still.py index 02b7fd4..45fa450 100755 --- a/oxdbarchive/tools/extract_poster_still.py +++ b/oxdbarchive/tools/extract_poster_still.py @@ -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)