summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchriszero <zerov83@gmail.com>2015-09-27 19:21:00 +0200
committerchriszero <zerov83@gmail.com>2015-09-27 19:23:14 +0200
commit392422114a66f937feaf96473cbf9e4b3404b309 (patch)
tree68334c2294a3b0e6b48ec91db485160231ebd110
parent502854e94772d1d6e9af4bc25fc80a3284019baf (diff)
downloadvdr-plugin-plex-392422114a66f937feaf96473cbf9e4b3404b309.tar.gz
vdr-plugin-plex-392422114a66f937feaf96473cbf9e4b3404b309.tar.bz2
Corrections to MpvService
-rw-r--r--plex.cpp11
-rw-r--r--services.h16
2 files changed, 16 insertions, 11 deletions
diff --git a/plex.cpp b/plex.cpp
index cf09120..f0042f3 100644
--- a/plex.cpp
+++ b/plex.cpp
@@ -172,12 +172,15 @@ void cMyPlugin::PlayFile(plexclient::Video Vid)
cPlugin* mpvPlugin = cPluginManager::GetPlugin("mpv");
if(Config::GetInstance().UseMpv && mpvPlugin) {
- Mpv_StartPlayService_v1_0_t req;
+ Mpv_PlayFile req;
+ Mpv_SetTitle reqTitle;
char* file = (char*)(Vid.m_pServer->GetUri() + Vid.m_Media.m_sPartKey).c_str();
+
req.Filename = file;
- req.Title = (char*)Vid.GetTitle().c_str();
- //req.Title = &Vid.GetTitle().c_str();
- mpvPlugin->Service(MPV_START_PLAY_SERVICE, &req);
+ mpvPlugin->Service(MPV_PLAY_FILE, &req);
+
+ reqTitle.Title = (char*)Vid.GetTitle().c_str();
+ mpvPlugin->Service(MPV_SET_TITLE, &reqTitle);
return;
} else if (Config::GetInstance().UseMpv) {
diff --git a/services.h b/services.h
index 14099e3..eea4641 100644
--- a/services.h
+++ b/services.h
@@ -1,14 +1,16 @@
#pragma once
-#define MPV_START_PLAY_SERVICE "Mpv-StartPlayService_v1_0"
-#define MPV_SET_TITLE_SERVICE "Mpv-SetTitleService_v1_0"
+#define MPV_PLAY_FILE "Mpv_PlayFile"
+#define MPV_SET_TITLE "Mpv_SetTitle"
+// play the given Filename, this can be a media file or a playlist
typedef struct
{
- char* Filename;
- char* Title;
-} Mpv_StartPlayService_v1_0_t;
+ char *Filename;
+} Mpv_PlayFile;
+
+// Overrides the displayed title in replay info
typedef struct
{
- char* Title;
-} Mpv_SetTitleService_v1_0_t; \ No newline at end of file
+ char *Title;
+} Mpv_SetTitle;