diff options
author | chriszero <zerov83@gmail.com> | 2015-01-18 20:27:16 +0100 |
---|---|---|
committer | chriszero <zerov83@gmail.com> | 2015-01-18 20:27:16 +0100 |
commit | 8d7655c7eb7086a56b7722908291c163d596843d (patch) | |
tree | 61181d40ebc59a3155bc53748a9096f302cf6116 /Plexservice.cpp | |
parent | d3777dd6bcb11ceea85eca91e670d7872ba7b1ea (diff) | |
download | vdr-plugin-plex-8d7655c7eb7086a56b7722908291c163d596843d.tar.gz vdr-plugin-plex-8d7655c7eb7086a56b7722908291c163d596843d.tar.bz2 |
Implemented skip backwards/forward. Key Green/Yellow
Diffstat (limited to 'Plexservice.cpp')
-rw-r--r-- | Plexservice.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Plexservice.cpp b/Plexservice.cpp index 710cef0..ce803c3 100644 --- a/Plexservice.cpp +++ b/Plexservice.cpp @@ -298,15 +298,16 @@ std::string Plexservice::encode(std::string message) } -std::string Plexservice::GetUniversalTranscodeUrl(Video* video) +std::string Plexservice::GetUniversalTranscodeUrl(Video* video, int offset, PlexServer* server) { + PlexServer* pSrv = server ? server : video->m_pServer; std::stringstream params; params << "/video/:/transcode/universal/start.m3u8?"; - params << "path=" << encode(pServer->GetUri() + video->m_sKey); + params << "path=" << encode(pSrv->GetUri() + video->m_sKey); params << "&mediaIndex=0"; params << "&partIndex=0"; params << "&protocol=hls"; - params << "&offset=0"; + params << "&offset=" << offset; params << "&fastSeek=1"; params << "&directPlay=0"; params << "&directStream=1"; @@ -319,7 +320,7 @@ std::string Plexservice::GetUniversalTranscodeUrl(Video* video) params << "&session=" << encode(Config::GetInstance().GetUUID()); // TODO: generate Random SessionID - return pServer->GetUri() + params.str(); + return pSrv->GetUri() + params.str(); } } |