Ticket #7691: 7691-v1.patch
File 7691-v1.patch, 8.6 KB (added by , 14 years ago) |
---|
-
libs/libmythtv/jobqueue.cpp
2012 2012 .arg(comment)).toLocal8Bit(); 2013 2013 } 2014 2014 2015 MythEvent me("RECORDING_LIST_CHANGE");2016 gContext->dispatch(me);2017 2018 2015 program_info->SetTranscoded(TRANSCODING_COMPLETE); 2019 2016 } 2020 2017 else … … 2165 2162 comment = tr("%n commercial break(s)", "", breaksFound); 2166 2163 ChangeJobStatus(jobID, JOB_FINISHED, comment); 2167 2164 2168 MythEvent me("RECORDING_LIST_CHANGE"); 2169 gContext->dispatch(me); 2165 program_info->Update(); 2170 2166 2171 2167 program_info->pathname = program_info->GetPlaybackURL(); 2172 2168 (new PreviewGenerator(program_info, PreviewGenerator::kLocal))->Run(); … … 2284 2280 2285 2281 ChangeJobStatus(jobID, JOB_FINISHED, "Successfully Completed."); 2286 2282 2287 MythEvent me("RECORDING_LIST_CHANGE");2288 gContext->dispatch(me);2283 if (pginfo) 2284 pginfo->Update(); 2289 2285 } 2290 2286 2291 2287 RemoveRunningJob(jobID); -
libs/libmythtv/tv_rec.cpp
504 504 curRecording->recordid = rcinfo->recordid; 505 505 curRecording->recendts = rcinfo->recendts; 506 506 curRecording->UpdateRecordingEnd(); 507 MythEvent me("RECORDING_LIST_CHANGE");508 gContext->dispatch(me);509 507 510 508 recordEndTime = curRecording->recendts.addSecs(post_roll_seconds); 511 509 … … 785 783 } 786 784 787 785 /** \fn TVRec::StartedRecording(RecordingInfo *curRec) 788 * \brief Inserts a "curRec" into the database, and issues a 789 * "RECORDING_LIST_CHANGE" event. 786 * \brief Inserts a "curRec" into the database 790 787 * \param curRec Recording to add to database. 791 788 * \sa ProgramInfo::StartedRecording(const QString&) 792 789 */ … … 801 798 802 799 if (curRec->chancommfree != 0) 803 800 curRec->SetCommFlagged(COMM_FLAG_COMMFREE); 804 805 MythEvent me("RECORDING_LIST_CHANGE");806 gContext->dispatch(me);807 801 } 808 802 809 803 /** \fn TVRec::FinishedRecording(RecordingInfo *curRec) … … 1069 1063 * 1070 1064 * If killfile is true, the recording is deleted. 1071 1065 * 1072 * A "RECORDING_LIST_CHANGE" message is dispatched.1073 *1074 1066 * Finally, if there was a recording and it was not deleted, 1075 1067 * schedule any post-processing jobs. 1076 1068 * … … 1140 1132 curRecording = NULL; 1141 1133 } 1142 1134 1143 MythEvent me("RECORDING_LIST_CHANGE");1144 gContext->dispatch(me);1145 1135 pauseNotify = true; 1146 1136 1147 1137 if (GetDTVChannel()) -
libs/libmythtv/recordinginfo.cpp
223 223 MythDB::DBError("RecGroup update", query); 224 224 225 225 recgroup = newrecgroup; 226 227 Update(); 226 228 } 227 229 228 230 /** \fn RecordingInfo::ApplyRecordPlayGroupChange(const QString &newplaygroup) … … 246 248 MythDB::DBError("PlayGroup update", query); 247 249 248 250 playgroup = newplaygroup; 251 252 Update(); 249 253 } 250 254 251 255 /** \fn RecordingInfo::ApplyStorageGroupChange(const QString &newstoragegroup) … … 269 273 MythDB::DBError("StorageGroup update", query); 270 274 271 275 storagegroup = newstoragegroup; 276 277 Update(); 272 278 } 273 279 274 280 /** \fn RecordingInfo::ApplyRecordRecTitleChange(const QString &newTitle, const QString &newSubtitle) … … 295 301 296 302 title = newTitle; 297 303 subtitle = newSubtitle; 304 305 Update(); 298 306 } 299 307 300 308 /** \brief Sets the transcoder profile for a recording … … 546 554 query.bindValue(":START", startts); 547 555 if (!query.exec() || !query.isActive()) 548 556 MythDB::DBError("Copy program ratings on record", query); 557 558 Update(); 559 560 // TODO remove this after we've changed WatchRecordings appropriately. 561 gContext->dispatch(MythEvent("RECORDING_LIST_CHANGE")); 549 562 } 550 563 551 564 static bool insert_program(const RecordingInfo *pg, … … 705 718 VERBOSE(VB_GENERAL, QString("%1 %2").arg(msg).arg(details)); 706 719 gContext->LogEntry("scheduler", LP_NOTICE, msg, details); 707 720 } 721 722 Update(); 708 723 } 709 724 710 725 /** \fn RecordingInfo::UpdateRecordingEnd(void) … … 724 739 725 740 if (!query.exec()) 726 741 MythDB::DBError("UpdateRecordingEnd update", query); 742 743 Update(); 727 744 } 728 745 729 746 /** \fn RecordingInfo::ReactivateRecording(void) -
libs/libmyth/programinfo.h
376 376 // Translations for play,recording, & storage groups + 377 377 static QString i18n(const QString&); 378 378 379 /// Sends event out that the ProgramInfo should be reloaded. 380 void Update(void) const; 381 379 382 protected: 380 383 // Creates a basename from the start and end times 381 384 QString CreateRecordBasename(const QString &ext) const; 382 /// Sends event out that the ProgramInfo should be reloaded.383 void Update(void) const;384 385 385 386 public: 386 387 // data -
libs/libmyth/programinfo.cpp
3528 3528 3529 3529 if (!inuse) 3530 3530 { 3531 if (!gContext->IsBackend())3532 RemoteSendMessage("RECORDING_LIST_CHANGE");3533 3531 inUseForWhat.clear(); 3532 Update(); 3534 3533 return; 3535 3534 } 3536 3535 … … 3593 3592 query.bindValue(":RECHOST", hostname); 3594 3593 query.bindValue(":RECDIR", recDir); 3595 3594 3596 if (!query.exec() || !query.isActive())3595 if (!query.exec()) 3597 3596 MythDB::DBError("SetInUse", query); 3598 3597 3599 3598 // Let others know we changed status 3600 if (notifyOfChange && !gContext->IsBackend())3601 RemoteSendMessage("RECORDING_LIST_CHANGE");3599 if (notifyOfChange) 3600 Update(); 3602 3601 } 3603 3602 3604 3603 /** \fn ProgramInfo::GetChannel(QString&,QString&) const -
programs/mythbackend/mainserver.cpp
1519 1519 (pginfo->filesize > 0) && 1520 1520 (!ds->forceMetadataDelete)) 1521 1521 { 1522 VERBOSE(VB_IMPORTANT, QString("ERROR when trying to delete file: %1. File " 1523 "doesn't exist. Database metadata" 1524 "will not be removed.") 1525 .arg(ds->filename)); 1522 VERBOSE(VB_IMPORTANT, QString( 1523 "ERROR when trying to delete file: %1. File " 1524 "doesn't exist. Database metadata" 1525 "will not be removed.") 1526 .arg(ds->filename)); 1526 1527 gContext->LogEntry("mythbackend", LP_WARNING, "Delete Recording", 1527 1528 QString("File %1 does not exist for %2 when trying " 1528 1529 "to delete recording.") 1529 1530 .arg(ds->filename).arg(logInfo)); 1530 1531 1531 1532 pginfo->SetDeleteFlag(false); 1532 1533 MythEvent me("RECORDING_LIST_CHANGE"); -
programs/mythlcdserver/lcdprocclient.cpp
2376 2376 { 2377 2377 MythEvent *me = (MythEvent *) e; 2378 2378 2379 if (me->Message().left(21) == "RECORDING_LIST_CHANGE") 2379 if (me->Message().left(21) == "RECORDING_LIST_CHANGE" || 2380 me->Message() == "UPDATE_PROG_INFO") 2380 2381 { 2381 2382 if (lcd_showrecstatus && !updateRecInfoTimer->isActive()) 2382 2383 { -
programs/mythwelcome/welcomedialog.cpp
151 151 { 152 152 MythEvent *me = (MythEvent *) e; 153 153 154 if (me->Message().left(21) == "RECORDING_LIST_CHANGE") 154 if (me->Message().left(21) == "RECORDING_LIST_CHANGE" || 155 me->Message() == "UPDATE_PROG_INFO") 155 156 { 156 VERBOSE(VB_GENERAL, "MythWelcome received a RECORDING_LIST_CHANGE event"); 157 VERBOSE(VB_GENERAL, "MythWelcome received a " 158 "recording list change event"); 157 159 158 160 QMutexLocker lock(&m_RecListUpdateMuxtex); 159 161