validate:launcher: Add proper check for is_seekable
authorVineeth T M <vineeth.tm@samsung.com>
Thu, 12 Nov 2015 00:04:01 +0000 (09:04 +0900)
committerThibault Saunier <tsaunier@gnome.org>
Wed, 17 Feb 2016 21:33:16 +0000 (22:33 +0100)
The seekable variable in media_info file is of type string. When checking if the file
is seekable using is_seekable, it just returns the string, resulting in it always being true.
It should actually be comparing the string and returning true or false based on comparison

https://bugzilla.gnome.org/show_bug.cgi?id=755854

validate/launcher/baseclasses.py

index 6a4ef35..c74b361 100644 (file)
@@ -1695,7 +1695,7 @@ class GstValidateMediaDescriptor(MediaDescriptor):
         return self.media_xml.attrib["protocol"]
 
     def is_seekable(self):
-        return self.media_xml.attrib["seekable"]
+        return self.media_xml.attrib["seekable"].lower() == "true"
 
     def can_play_reverse(self):
         return True