mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Changes in cRecManager::DeleteTimer
This commit is contained in:
parent
91488f0f60
commit
aa26a69ef8
34
recmanager.c
34
recmanager.c
@ -180,9 +180,9 @@ void cRecManager::SetTimerPath(cTimer *timer, const cEvent *event, std::string p
|
|||||||
void cRecManager::DeleteTimer(int timerID) {
|
void cRecManager::DeleteTimer(int timerID) {
|
||||||
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
|
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
|
||||||
#if VDRVERSNUM >= 20301
|
#if VDRVERSNUM >= 20301
|
||||||
const cTimer *t;
|
cTimer *t;
|
||||||
{
|
{
|
||||||
LOCK_TIMERS_READ;
|
LOCK_TIMERS_WRITE;
|
||||||
t = Timers->Get(timerID);
|
t = Timers->Get(timerID);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@ -207,9 +207,9 @@ void cRecManager::DeleteTimer(const cEvent *event) {
|
|||||||
void cRecManager::DeleteLocalTimer(const cEvent *event) {
|
void cRecManager::DeleteLocalTimer(const cEvent *event) {
|
||||||
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
|
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
|
||||||
#if VDRVERSNUM >= 20301
|
#if VDRVERSNUM >= 20301
|
||||||
const cTimer *t;
|
cTimer *t;
|
||||||
{
|
{
|
||||||
LOCK_TIMERS_READ;
|
LOCK_TIMERS_WRITE;
|
||||||
t = Timers->GetMatch(event);
|
t = Timers->GetMatch(event);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@ -220,29 +220,23 @@ void cRecManager::DeleteLocalTimer(const cEvent *event) {
|
|||||||
DeleteTimer(t);
|
DeleteTimer(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
void cRecManager::DeleteTimer(const cTimer *timer) {
|
|
||||||
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
|
|
||||||
LOCK_TIMERS_WRITE;
|
|
||||||
cTimers* timers = Timers;
|
|
||||||
cTimer* t = timers->GetTimer((cTimer*)timer); // #TODO dirty cast
|
|
||||||
|
|
||||||
if (t->Recording()) {
|
|
||||||
t->Skip();
|
|
||||||
cRecordControls::Process(timers, time(NULL));
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
void cRecManager::DeleteTimer(cTimer *timer) {
|
void cRecManager::DeleteTimer(cTimer *timer) {
|
||||||
|
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
|
||||||
|
#if VDRVERSNUM >= 20301
|
||||||
|
LOCK_TIMERS_WRITE;
|
||||||
|
#endif
|
||||||
if (timer->Recording()) {
|
if (timer->Recording()) {
|
||||||
timer->Skip();
|
timer->Skip();
|
||||||
|
#if VDRVERSNUM >= 20301
|
||||||
|
cRecordControls::Process(Timers, time(NULL));
|
||||||
|
#else
|
||||||
cRecordControls::Process(time(NULL));
|
cRecordControls::Process(time(NULL));
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
isyslog("timer %s deleted", *timer->ToDescr());
|
isyslog("timer %s deleted", *timer->ToDescr());
|
||||||
#if VDRVERSNUM >= 20301
|
#if VDRVERSNUM >= 20301
|
||||||
timers->Del(t, true);
|
Timers->Del(timer, true);
|
||||||
timers->SetModified();
|
Timers->SetModified();
|
||||||
#else
|
#else
|
||||||
Timers.Del(timer, true);
|
Timers.Del(timer, true);
|
||||||
Timers.SetModified();
|
Timers.SetModified();
|
||||||
|
@ -37,11 +37,7 @@ public:
|
|||||||
cTimer *createLocalTimer(const cEvent *event, std::string path);
|
cTimer *createLocalTimer(const cEvent *event, std::string path);
|
||||||
cTimer *createRemoteTimer(const cEvent *event, std::string path);
|
cTimer *createRemoteTimer(const cEvent *event, std::string path);
|
||||||
void SetTimerPath(cTimer *timer, const cEvent *event, std::string path);
|
void SetTimerPath(cTimer *timer, const cEvent *event, std::string path);
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
void DeleteTimer(const cTimer *timer);
|
|
||||||
#else
|
|
||||||
void DeleteTimer(cTimer *timer);
|
void DeleteTimer(cTimer *timer);
|
||||||
#endif
|
|
||||||
void DeleteTimer(int timerID);
|
void DeleteTimer(int timerID);
|
||||||
void DeleteTimer(const cEvent *event);
|
void DeleteTimer(const cEvent *event);
|
||||||
void DeleteLocalTimer(const cEvent *event);
|
void DeleteLocalTimer(const cEvent *event);
|
||||||
|
@ -764,7 +764,10 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
|
|||||||
if (cRecMenuEditTimer *menu = dynamic_cast<cRecMenuEditTimer*>(activeMenu)) {
|
if (cRecMenuEditTimer *menu = dynamic_cast<cRecMenuEditTimer*>(activeMenu)) {
|
||||||
timer = menu->GetOriginalTimer();
|
timer = menu->GetOriginalTimer();
|
||||||
} else break;
|
} else break;
|
||||||
recManager->DeleteTimer(timer);
|
{
|
||||||
|
LOCK_TIMERS_WRITE;
|
||||||
|
recManager->DeleteTimer(Timers->GetTimer(timer));
|
||||||
|
}
|
||||||
delete activeMenu;
|
delete activeMenu;
|
||||||
if (timerConflicts) {
|
if (timerConflicts) {
|
||||||
delete timerConflicts;
|
delete timerConflicts;
|
||||||
|
Loading…
Reference in New Issue
Block a user