diff options
Diffstat (limited to 'timerconflict.cpp')
-rw-r--r-- | timerconflict.cpp | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/timerconflict.cpp b/timerconflict.cpp index 4943d54..99005d4 100644 --- a/timerconflict.cpp +++ b/timerconflict.cpp @@ -17,7 +17,7 @@ namespace vdrlive { using namespace std; - static char ServiceInterface[] = "Epgsearch-services-v1.0"; + static char ServiceInterface[] = "Epgsearch-services-v1.1"; bool operator<( TimerConflict const& left, TimerConflict const& right ) { @@ -68,21 +68,28 @@ namespace vdrlive { TimerConflicts::TimerConflicts() { - Epgsearch_services_v1_0 service; + Epgsearch_services_v1_1 service; if ( !CheckEpgsearchVersion() || cPluginManager::CallFirstService(ServiceInterface, &service) == 0 ) throw HtmlError( tr("EPGSearch version outdated! Please update.") ); - - list< string > conflicts = service.handler->TimerConflictList(); - m_conflicts.assign( conflicts.begin(), conflicts.end() ); - m_conflicts.sort(); + cServiceHandler_v1_1* handler = dynamic_cast<cServiceHandler_v1_1*>(service.handler.get()); + if (handler) + { + list< string > conflicts = service.handler->TimerConflictList(); + m_conflicts.assign( conflicts.begin(), conflicts.end() ); + m_conflicts.sort(); + } } bool TimerConflicts::CheckAdvised() { - Epgsearch_services_v1_0 service; + Epgsearch_services_v1_1 service; if ( !CheckEpgsearchVersion() || cPluginManager::CallFirstService(ServiceInterface, &service) == 0 ) throw HtmlError( tr("EPGSearch version outdated! Please update.") ); - return service.handler->IsConflictCheckAdvised(); + cServiceHandler_v1_1* handler = dynamic_cast<cServiceHandler_v1_1*>(service.handler.get()); + if (!handler) + return false; + else + return handler->IsConflictCheckAdvised(); } TimerConflictNotifier::TimerConflictNotifier() |