From 822da269ff362dd5619305d9d2c70b3005871916 Mon Sep 17 00:00:00 2001 From: Miqra Developer Date: Wed, 26 Sep 2018 19:19:32 +0000 Subject: [PATCH] Removed unneeded messages --- mediaserver/monitoredplayer.py | 9 ++------- test_client.py | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/mediaserver/monitoredplayer.py b/mediaserver/monitoredplayer.py index 7a30797..0b47806 100755 --- a/mediaserver/monitoredplayer.py +++ b/mediaserver/monitoredplayer.py @@ -29,21 +29,16 @@ class MonitorThread:#(Thread): def run(self): if self.player.player_state == "PLAYING": position = self.player.position() - duration = self.player.duration() - if position < 0: # handle invalid operation - position = duration - - print("\rTime Left: {0}".format(duration - position)) # handle finishing of limited playtime if self.player.playtime > 0: - if (position - self.player.startpos) - self.player.playtime <= 0: + if (position - self.player.startpos) > self.player.playtime: #self._player.pause(notify=False) print "Finished limited play" self.player._finished() if self._running and time is not None: - GObject.timeout_add(20, self.run) + GObject.timeout_add(100, self.run) class MonitoredPlayer(BasicPlayer): def __init__(self): diff --git a/test_client.py b/test_client.py index d6d17a5..45e3e87 100755 --- a/test_client.py +++ b/test_client.py @@ -30,7 +30,7 @@ class TestController: GObject.timeout_add(10, self.tick) def tick(self): - self.player.QuickLoop("/opt/src/robotvideo/ogen open.mp4") + self.player.QuickLoop("/opt/src/robotvideo/ogen open.mp4",5) #GObject.timeout_add(3000, self.reboot) pass