diff options
author | chriszero <zerov83@gmail.com> | 2015-05-22 19:46:31 +0200 |
---|---|---|
committer | chriszero <zerov83@gmail.com> | 2015-05-22 19:46:31 +0200 |
commit | fc8dc9531193e872dd65914f8ffa1491bc5cf9ff (patch) | |
tree | 870b9a8b3505c233634c1482fb708e3ca3b53ac5 | |
parent | 85ee18100e392214445dd12e9c007f59ed8d28d7 (diff) | |
download | vdr-plugin-plex-fc8dc9531193e872dd65914f8ffa1491bc5cf9ff.tar.gz vdr-plugin-plex-fc8dc9531193e872dd65914f8ffa1491bc5cf9ff.tar.bz2 |
Fixes complie error
-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); |