From 3178ef46268f664bc09da19246ec9ab30206c41a Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Thu, 28 Oct 2010 00:02:51 +0200 Subject: [PATCH] Move get_state to duration call to fix intermittent errors --- mopidy/scanner.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mopidy/scanner.py b/mopidy/scanner.py index ccc3ce9c..991a0864 100644 --- a/mopidy/scanner.py +++ b/mopidy/scanner.py @@ -66,9 +66,6 @@ class Scanner(object): pad.link(target_pad) def process_tags(self, bus, message): - # Block for state change so that duration can be safely determined - self.pipe.get_state() - data = message.parse_tag() data = dict([(k, data[k]) for k in data.keys()]) data['uri'] = self.uribin.get_property('uri') @@ -84,6 +81,7 @@ class Scanner(object): self.next_uri() def get_duration(self): + self.pipe.get_state() try: return self.pipe.query_duration( gst.FORMAT_TIME, None)[0] // gst.MSECOND