Commits

fab31  committed 28cb124

make position more reliable

  • Participants
  • Parent commits 514c8a0
  • Branches wip

Comments (0)

Files changed (1)

File zicbee_mplayer/__init__.py

     def position(self):
         """ returns the stream position, in seconds """
         p = self.prop_stream_pos
-        return None if p is None else p/10000
+        try:
+            return None if p is None else p/10000
+        except TypeError: # got a string
+            return 0