From 4ee0c368ac14e1566da31388438aa3f09bb06fe8 Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Wed, 15 Aug 2012 17:03:14 -0400 Subject: [PATCH] CC-1665: Scheduled stream rebroadcasting and recording -pre buffer streams part 2 --- airtime_mvc/application/models/Schedule.php | 1 + python_apps/pypo/pypopush.py | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/airtime_mvc/application/models/Schedule.php b/airtime_mvc/application/models/Schedule.php index 07de1f4b8..f7f518f4c 100644 --- a/airtime_mvc/application/models/Schedule.php +++ b/airtime_mvc/application/models/Schedule.php @@ -709,6 +709,7 @@ SQL; 'start' => $stream_buffer_start, 'end' => $stream_buffer_start, 'uri' => $uri, + 'row_id' => $item["id"], 'type' => 'stream_buffer_start', 'independent_event' => true ); diff --git a/python_apps/pypo/pypopush.py b/python_apps/pypo/pypopush.py index 09c1c89a1..b04c60d82 100644 --- a/python_apps/pypo/pypopush.py +++ b/python_apps/pypo/pypopush.py @@ -400,7 +400,11 @@ class PypoPush(Thread): self.telnet_lock.acquire() tn = telnetlib.Telnet(LS_HOST, LS_PORT) - msg = 'dynamic_source.read_start\n' + msg = 'dynamic_source.id %s\n' % media_item['row_id'] + tn.write(msg) + + #example: dynamic_source.read_start http://87.230.101.24:80/top100station.mp3 + msg = 'dynamic_source.read_start %s\n' % media_item['uri'].encode('latin-1') self.logger.debug(msg) tn.write(msg) @@ -412,15 +416,10 @@ class PypoPush(Thread): self.telnet_lock.release() - def start_web_stream(self, media_item): try: self.telnet_lock.acquire() tn = telnetlib.Telnet(LS_HOST, LS_PORT) - #dynamic_source.start http://87.230.101.24:80/top100station.mp3 - - msg = 'dynamic_source.id %s\n' % media_item['row_id'] - tn.write(msg) #TODO: DO we need this? msg = 'streams.scheduled_play_start\n'