diff options
author | chriszero <zerov83@gmail.com> | 2015-02-21 15:33:48 +0100 |
---|---|---|
committer | chriszero <zerov83@gmail.com> | 2015-02-21 15:33:48 +0100 |
commit | 37043899a114c20b50d26ceb2992c2e670b6024e (patch) | |
tree | 7b2fa140f0c1516ec6b98db484144b997a09e946 /plex.cpp | |
parent | 8f5d88e50d24cde272662520901defef42d575c6 (diff) | |
download | vdr-plugin-plex-37043899a114c20b50d26ceb2992c2e670b6024e.tar.gz vdr-plugin-plex-37043899a114c20b50d26ceb2992c2e670b6024e.tar.bz2 |
Add feature "playmarks"
Diffstat (limited to 'plex.cpp')
-rw-r--r-- | plex.cpp | 36 |
1 files changed, 22 insertions, 14 deletions
@@ -2,19 +2,6 @@ #include "SubscriptionManager.h" #include "plex.h" -/** -** Play a file. -** -** @param filename path and file name -*/ -static void PlayFile(plexclient::Video Vid) -{ - isyslog("[plex]: play file '%s'\n", Vid.m_sKey.c_str()); - cControl* control = cHlsPlayerControl::Create(Vid); - if(control) { - cControl::Launch(control); - } -} ////////////////////////////////////////////////////////////////////////////// // cOsdMenu @@ -111,7 +98,7 @@ eOSState cPlexBrowser::ProcessSelected() if(item->IsVideo()) { - PlayFile(*item->GetAttachedVideo()); + cMyPlugin::PlayFile(*item->GetAttachedVideo()); return osEnd; } @@ -365,4 +352,25 @@ bool cMyPlugin::SetupParse(const char *name, const char *value) return true; } +/** +** Play a file. +** +** @param filename path and file name +*/ +void cMyPlugin::PlayFile(plexclient::Video Vid) +{ + isyslog("[plex]: play file '%s'\n", Vid.m_sKey.c_str()); + if(Vid.m_lViewoffset > 0 ) { + cString message = cString::sprintf(tr("To start from %ld minutes, press Ok."), Vid.m_lViewoffset / 60000); + eKeys response = Skins.Message(eMessageType::mtInfo, message, 5); + if(response == kOk) { + Vid.m_iMyPlayOffset = Vid.m_lViewoffset/1000; + } + } + cControl* control = cHlsPlayerControl::Create(Vid); + if(control) { + cControl::Launch(control); + } +} + VDRPLUGINCREATOR(cMyPlugin); // Don't touch this! |