diff options
-rw-r--r-- | PlexHTTPRequestHandler.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/PlexHTTPRequestHandler.cpp b/PlexHTTPRequestHandler.cpp index 5339258..4fade01 100644 --- a/PlexHTTPRequestHandler.cpp +++ b/PlexHTTPRequestHandler.cpp @@ -226,16 +226,16 @@ void PlayerRequestHandler::handleRequest(Poco::Net::HTTPServerRequest& request, std::string fullUrl = protocol + "://" + address + ":" + port + key; // Metainfo std::cout << fullUrl << std::endl; - MediaContainer Cont = Plexservice::GetMediaContainer(fullUrl); + auto Cont = Plexservice::GetMediaContainer(fullUrl); // Check for video - if(Cont.m_vVideos.size() > 0) { + if(Cont && Cont->m_vVideos.size() > 0) { // MUSS im Maintread des Plugins/VDR gestartet werden if(query.find("offset") != query.end()) { - Cont.m_vVideos[0].m_iMyPlayOffset = atoi(query["offset"].c_str()) / 1000; + Cont->m_vVideos[0].m_iMyPlayOffset = atoi(query["offset"].c_str()) / 1000; } - ActionManager::GetInstance().AddAction(Cont.m_vVideos[0]); + ActionManager::GetInstance().AddAction(Cont->m_vVideos[0]); } } else if(request.getURI().find("/playback/play") != std::string::npos) { cRemote::Put(kPlay); |