diff --git a/airtime_mvc/application/services/CalendarService.php b/airtime_mvc/application/services/CalendarService.php index d0091d589..b0e1ad865 100644 --- a/airtime_mvc/application/services/CalendarService.php +++ b/airtime_mvc/application/services/CalendarService.php @@ -45,11 +45,16 @@ class Application_Service_CalendarService if ($this->ccShowInstance->isRecorded()) { $ccFile = $this->ccShowInstance->getCcFiles(); - - $menu["view_recorded"] = array( - "name" => _("View Recorded File Metadata"), - "icon" => "overview", - "url" => $baseUrl."library/edit-file-md/id/".$ccFile->getDbId()); + if (!isset($ccFile)) { + $menu["error when recording"] = array ( + "name" => _("Record file doesn't exist"), + "icon" => "error"); + }else { + $menu["view_recorded"] = array( + "name" => _("View Recorded File Metadata"), + "icon" => "overview", + "url" => $baseUrl."library/edit-file-md/id/".$ccFile->getDbId()); + } //recorded show can be uploaded to soundcloud if (Application_Model_Preference::GetUploadToSoundcloudOption()) { diff --git a/airtime_mvc/public/css/jquery.contextMenu.css b/airtime_mvc/public/css/jquery.contextMenu.css index 1119feb8f..61634b34d 100644 --- a/airtime_mvc/public/css/jquery.contextMenu.css +++ b/airtime_mvc/public/css/jquery.contextMenu.css @@ -108,6 +108,7 @@ .context-menu-item.icon-add-playlist { background-image: url(images/icon_add_playlist_cm.png); } .context-menu-item.icon-add-remove-content { background-image: url(images/icon_add_content_cm.png); } .context-menu-item.icon-remove-all-content { background-image: url(images/icon_remove_all_content_cm.png); } +.context-menu-item.icon-error { background-image: url(images/icon_alert_cal_alt.png); } /* vertically align inside labels */ .context-menu-input > label > * { vertical-align: top; } diff --git a/python_apps/pypo/recorder.py b/python_apps/pypo/recorder.py index b3818f32d..e61083738 100644 --- a/python_apps/pypo/recorder.py +++ b/python_apps/pypo/recorder.py @@ -10,6 +10,7 @@ import pytz import signal import math import traceback +import re from configobj import ConfigObj @@ -17,6 +18,7 @@ from poster.encode import multipart_encode from poster.streaminghttp import register_openers from subprocess import Popen +from subprocess import PIPE from threading import Thread import mutagen @@ -93,12 +95,16 @@ class ShowRecorder(Thread): self.logger.info("starting record") self.logger.info("command " + command) - self.p = Popen(args) + self.p = Popen(args,stdout=PIPE) #blocks at the following line until the child process #quits self.p.wait() - + outmsgs = self.p.stdout.readlines() + for msg in outmsgs: + m = re.search('^ERROR',msg) + if not m == None: + self.logger.info('Recording error is found: %s', msg) self.logger.info("finishing record, return code %s", self.p.returncode) code = self.p.returncode