CC-5309:Calendar-> Recording Show: Fail to open context menu

Better error msg, also add more information in show-record.log
This commit is contained in:
cliff.wang 2013-08-23 14:23:47 -04:00
parent ceba84d1f7
commit 12a62a3827
3 changed files with 19 additions and 7 deletions

View file

@ -45,11 +45,16 @@ class Application_Service_CalendarService
if ($this->ccShowInstance->isRecorded()) {
$ccFile = $this->ccShowInstance->getCcFiles();
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()) {

View file

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

View file

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