[mod] simplify (and probably debug) thumbnail name generation for video

This commit is contained in:
Laurent Peuch 2016-05-04 09:53:31 +02:00
parent 4c6729b2f0
commit 5d067e87c1

View File

@ -91,9 +91,7 @@ class Video(object):
return ""
def generate_thumbnail(self, gm_geometry):
thumbnail_name = self.name.split(".")
thumbnail_name[-2] += "-%s" % gm_geometry
thumbnail_name = thumbnail_name[-2] + ".png"
thumbnail_name = ".".join(self.name.split(".")[:-1] + ["-", gm_geometry, ".png"])
source, target = os.path.join(self.base_dir, self.name), os.path.join(self.target_dir, thumbnail_name)