Handle recording file missing
This commit is contained in:
parent
436c301061
commit
9da2cb0c3f
@ -325,7 +325,6 @@ proc rsvscan {} {
|
||||
}
|
||||
#
|
||||
# Should be recording now, check if it is
|
||||
#
|
||||
proc chkActive {resv dresv rstatus} {
|
||||
global now svcmap svcdef
|
||||
log "Already started? Status = $rstatus - $dresv" 1
|
||||
@ -348,11 +347,12 @@ proc chkActive {resv dresv rstatus} {
|
||||
|
||||
# need to check whether it has actually started and schedule alternate if not recording
|
||||
if {$file !=0} {
|
||||
set ifsz [file size "$file.ts"]
|
||||
set ifsz 0
|
||||
catch {set ifsz [file size "$file.ts"]}
|
||||
set cfsz $ifsz
|
||||
for {set i 0} {$i < 5} {incr i} {
|
||||
sleep 1
|
||||
set cfsz [file size "$file.ts"]
|
||||
catch {set cfsz [file size "$file.ts"]}
|
||||
if {$cfsz > $ifsz} {break}
|
||||
}
|
||||
if {!($cfsz > $ifsz)} {
|
||||
@ -396,8 +396,12 @@ proc chkActive {resv dresv rstatus} {
|
||||
set ocname [$other get channel_name]
|
||||
set dother "[clock format $ostart -format {%d/%m/%y %H:%M}] [clock format $odur -format {%H:%M}] === $oname === $ocname"
|
||||
# attempt to schedule the alternate (always 1-off)
|
||||
schedule $other $dother "Alternate for non-recording"
|
||||
conflict-list
|
||||
if {[$other scheduled]} {
|
||||
log "*** Alternate for non-recording Already scheduled *** $dother === " 1
|
||||
} else {
|
||||
schedule $other $dother "Alternate for non-recording"
|
||||
conflict-list
|
||||
}
|
||||
return
|
||||
} else {
|
||||
log "Unable to schedule alternate for non-recording programme -$dresv " 0
|
||||
|
Loading…
Reference in New Issue
Block a user