summaryrefslogtreecommitdiff
path: root/Plexservice.cpp
diff options
context:
space:
mode:
authorchriszero <zerov83@gmail.com>2015-04-04 15:10:52 +0200
committerchriszero <zerov83@gmail.com>2015-04-04 15:10:52 +0200
commit21ee9e67ff7029c099c9fd772d3dc3e23c955199 (patch)
tree254ecef54be3682aea55ff747f3d2912e5732faf /Plexservice.cpp
parentb3a59b06a977129bd773ff46f4fd66e0057fb9cd (diff)
downloadvdr-plugin-plex-21ee9e67ff7029c099c9fd772d3dc3e23c955199.tar.gz
vdr-plugin-plex-21ee9e67ff7029c099c9fd772d3dc3e23c955199.tar.bz2
more skindesigner support
Diffstat (limited to 'Plexservice.cpp')
-rw-r--r--Plexservice.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/Plexservice.cpp b/Plexservice.cpp
index 41f9579..b86dac3 100644
--- a/Plexservice.cpp
+++ b/Plexservice.cpp
@@ -1,6 +1,7 @@
#include "Plexservice.h"
#include "PlexHelper.h"
+#include "plexgdm.h"
#include <memory>
namespace plexclient
@@ -112,7 +113,7 @@ std::shared_ptr<MediaContainer> Plexservice::GetSection(std::string section, boo
dsyslog("[plex] URI: http://%s:%d%s", pServer->GetIpAdress().c_str(), pServer->GetPort(), uri.c_str());
- std::shared_ptr<MediaContainer> pAllsections(new MediaContainer(&rs, *pServer));
+ std::shared_ptr<MediaContainer> pAllsections(new MediaContainer(&rs, pServer));
session.abort();
return pAllsections;
@@ -135,6 +136,11 @@ std::shared_ptr<MediaContainer> Plexservice::GetLastSection(bool current)
return NULL;
}
+bool Plexservice::IsRoot()
+{
+ return m_vUriStack.size() <= 1;
+}
+
std::unique_ptr<Poco::Net::HTTPRequest> Plexservice::CreateRequest(std::string path)
{
std::unique_ptr<Poco::Net::HTTPRequest> pRequest = std::unique_ptr<Poco::Net::HTTPRequest>(new Poco::Net::HTTPRequest(Poco::Net::HTTPRequest::HTTP_GET,
@@ -164,7 +170,7 @@ MediaContainer Plexservice::GetMediaContainer(std::string fullUrl)
Poco::Net::HTTPResponse response;
std::istream &rs = session.receiveResponse(response);
- MediaContainer allsections(&rs, PlexServer(fileuri.getHost(), fileuri.getPort()));
+ MediaContainer allsections(&rs, plexgdm::GetInstance().GetServer(fileuri.getHost(), fileuri.getPort()));
session.abort();
return allsections;
@@ -180,7 +186,7 @@ std::string Plexservice::encode(std::string message)
std::string Plexservice::GetUniversalTranscodeUrl(Video* video, int offset, PlexServer* server)
{
- PlexServer* pSrv = server ? server : &video->m_Server;
+ PlexServer* pSrv = server ? server : video->m_pServer;
std::stringstream params;
params << "/video/:/transcode/universal/start.m3u8?";
params << "path=" << encode(pSrv->GetUri() + video->m_sKey);