summaryrefslogtreecommitdiff
path: root/plexSdOsd.cpp
diff options
context:
space:
mode:
authorchriszero <zerov83@gmail.com>2015-05-20 21:18:14 +0200
committerchriszero <zerov83@gmail.com>2015-05-20 21:18:14 +0200
commit709ebb92273ae0af7aae79dfeb55e3ddf17324af (patch)
treeadf10eeaa71b65dfd5343c8d8c31b5728ec334b1 /plexSdOsd.cpp
parent86cfa7fa64406971990160db56b71c7a71dcf3e5 (diff)
downloadvdr-plugin-plex-709ebb92273ae0af7aae79dfeb55e3ddf17324af.tar.gz
vdr-plugin-plex-709ebb92273ae0af7aae79dfeb55e3ddf17324af.tar.bz2
- Added handling for disapearing or not reachable plexservers
Diffstat (limited to 'plexSdOsd.cpp')
-rw-r--r--plexSdOsd.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/plexSdOsd.cpp b/plexSdOsd.cpp
index a8dbdf2..ac0c26a 100644
--- a/plexSdOsd.cpp
+++ b/plexSdOsd.cpp
@@ -64,12 +64,13 @@ void cPlexSdOsd::Flush()
eOSState cPlexSdOsd::ProcessKey(eKeys Key)
{
eOSState state = eOSState::osContinue;
- plexclient::Video* vid = dynamic_cast<plexclient::Video*>(m_pBrowserGrid->SelectedObject());
+ plexclient::Video* vid = NULL;
if (m_pBrowserGrid->DrawTime())
m_pBrowserGrid->Flush();
if(m_messageDisplayed) {
+ vid = dynamic_cast<plexclient::Video*>(m_pBrowserGrid->SelectedObject());
switch (Key & ~k_Repeat) {
case kOk:
vid->m_iMyPlayOffset = vid->m_lViewoffset/1000;
@@ -111,6 +112,7 @@ eOSState cPlexSdOsd::ProcessKey(eKeys Key)
Flush();
break;
case kRed:
+ vid = dynamic_cast<plexclient::Video*>(m_pBrowserGrid->SelectedObject());
if(vid) {
if(vid->m_iViewCount > 0) vid->SetUnwatched();
else vid->SetWatched();
@@ -133,6 +135,7 @@ eOSState cPlexSdOsd::ProcessKey(eKeys Key)
}
if(state == eOSState::osUser1) {
+ vid = dynamic_cast<plexclient::Video*>(m_pBrowserGrid->SelectedObject());
if(vid->m_iMyPlayOffset == 0 && vid->m_lViewoffset > 0 ) {
cString message = cString::sprintf(tr("'Ok' to start from %ld minutes, 'Back' to start from beginning."), vid->m_lViewoffset / 60000);
DrawMessage(std::string(message));