Removed unneeded messages

This commit is contained in:
Miqra Developer 2018-09-26 19:19:32 +00:00
parent 07907177e7
commit 822da269ff
2 changed files with 3 additions and 8 deletions

View File

@ -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):

View File

@ -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