Ticket #9610: zero_byte.diff
| File zero_byte.diff, 3.6 KB (added by , 15 years ago) |
|---|
-
programs/mythbackend/mainserver.cpp
old new 2240 2240 if (ismaster && recinfo.GetHostname() != gCoreContext->GetHostName()) 2241 2241 { 2242 2242 PlaybackSock *slave = GetSlaveByHostname(recinfo.GetHostname()); 2243 RecStatusType status = recinfo.GetRecordingStatus(); 2243 2244 2244 2245 if (slave) 2245 2246 { … … 2248 2249 if (num > 0) 2249 2250 { 2250 2251 (*encoderList)[num]->StopRecording(); 2251 recinfo.SetRecordingStatus(rsRecorded); 2252 if (status == rsRecording) 2253 recinfo.SetRecordingStatus(rsRecorded); 2254 else if (status != rsRecorded && status != rsFailed) 2255 recinfo.SetRecordingStatus(rsFailed); 2252 2256 if (m_sched) 2253 2257 m_sched->UpdateRecStatus(&recinfo); 2254 2258 } … … 2267 2271 // recording has stopped and the status should be updated. 2268 2272 // Continue so that the master can try to update the endtime 2269 2273 // of the file is in a shared directory. 2270 recinfo.SetRecordingStatus(rsRecorded); 2274 if (status == rsRecording) 2275 recinfo.SetRecordingStatus(rsRecorded); 2276 else if (status != rsRecorded && status != rsFailed) 2277 recinfo.SetRecordingStatus(rsFailed); 2271 2278 if (m_sched) 2272 2279 m_sched->UpdateRecStatus(&recinfo); 2273 2280 } … … 2295 2302 2296 2303 if (ismaster) 2297 2304 { 2298 recinfo.SetRecordingStatus(rsRecorded); 2305 RecStatusType status = recinfo.GetRecordingStatus(); 2306 2307 if (status == rsRecording) 2308 recinfo.SetRecordingStatus(rsRecorded); 2309 else if (status != rsRecorded && status != rsFailed) 2310 recinfo.SetRecordingStatus(rsFailed); 2299 2311 if (m_sched) 2300 2312 m_sched->UpdateRecStatus(&recinfo); 2301 2313 } … … 2400 2412 if (num > 0) 2401 2413 { 2402 2414 (*encoderList)[num]->StopRecording(); 2403 recinfo.SetRecordingStatus(rsRecorded); 2415 if (recinfo.GetRecordingStatus() == rsRecording) 2416 recinfo.SetRecordingStatus(rsRecorded); 2417 else if (recinfo.GetRecordingStatus() != rsFailed) 2418 recinfo.SetRecordingStatus(rsFailed); 2404 2419 if (m_sched) 2405 2420 m_sched->UpdateRecStatus(&recinfo); 2406 2421 } … … 2441 2456 2442 2457 if (ismaster) 2443 2458 { 2444 recinfo.SetRecordingStatus(rsRecorded); 2459 if (recinfo.GetRecordingStatus() == rsRecording) 2460 recinfo.SetRecordingStatus(rsRecorded); 2461 else if (recinfo.GetRecordingStatus() != rsFailed) 2462 recinfo.SetRecordingStatus(rsFailed); 2445 2463 if (m_sched) 2446 2464 m_sched->UpdateRecStatus(&recinfo); 2447 2465 } -
libs/libmythtv/tv_rec.cpp
old new 874 874 VERBOSE(VB_RECORD, LOC + QString("FinishedRecording(%1) in recgroup: %2") 875 875 .arg(curRec->GetTitle()).arg(recgrp)); 876 876 877 if (curRec->GetRecordingStatus() != rsFailed) 877 RecStatusType status = curRec->GetRecordingStatus(); 878 879 if (status == rsRecording) 878 880 curRec->SetRecordingStatus(rsRecorded); 881 else if (status != rsRecorded && status != rsFailed) 882 curRec->SetRecordingStatus(rsFailed); 879 883 curRec->SetRecordingEndTime(mythCurrentDateTime()); 880 884 881 885 if (tvchain)
