From 34725994e6279ca7e8241cafd2ae67349b8b4984 Mon Sep 17 00:00:00 2001 From: Jan Krcmar Date: Tue, 22 Jun 2010 15:13:16 +0000 Subject: [PATCH] * new properties - svn:ignore * renamed class MplayerController to VideoController --- tv_controller.py | 8 ++++---- tv_web.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tv_controller.py b/tv_controller.py index 52ce497..fb55f37 100755 --- a/tv_controller.py +++ b/tv_controller.py @@ -5,13 +5,13 @@ import string import signal import alsaaudio -class MplayerController: +class VideoController: def __init__(self): self.vars = "XAUTHORITY=/home/honza801/.Xauthority DISPLAY=:0.0" def is_running(self): - process = os.popen('pgrep mplayer').readline() + process = os.popen('pgrep vlc').readline() if process != "": return int(string.strip(process)) return -1 @@ -38,7 +38,7 @@ class MplayerController: print "Another mplayer is running with pid", pid return else: - ret = os.system(self.vars+" tv "+channel+" >/dev/null 2>&1 &") + ret = os.system(self.vars+" screen -X screen tv "+channel) print ret @@ -74,6 +74,6 @@ class MonitorController: if __name__ == "__main__": - mpc = MplayerController() + mpc = VideoController() mpc.play("ct1") diff --git a/tv_web.py b/tv_web.py index f28a1e5..11d44f7 100644 --- a/tv_web.py +++ b/tv_web.py @@ -12,7 +12,7 @@ class TvWeb: # constructor def __init__(self): - self.mpc = tv_controller.MplayerController() + self.mpc = tv_controller.VideoController() self.vol = tv_controller.VolumeController('PCM') self.monitor = tv_controller.MonitorController() self.lastplayed = 'Unknown' -- 2.11.4.GIT