From 5b8cf179a7472e2f5e9cdbe5fb728a0e7c735f5b Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 30 Mar 2016 20:45:08 +0200 Subject: Fixes mpv playback --- plex.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plex.cpp b/plex.cpp index 5455914..7aff066 100644 --- a/plex.cpp +++ b/plex.cpp @@ -265,15 +265,15 @@ void cMyPlugin::PlayFile(plexclient::Video Vid) Mpv_PlayFile req; Mpv_SetTitle reqTitle; - char* file; + std::string file; if(Config::GetInstance().UsePlexAccount && Vid.m_pServer->IsLocal() == false) { - file = (char*)plexclient::Plexservice::GetUniversalTranscodeUrl(&Vid, Vid.m_iMyPlayOffset, NULL, true).c_str(); + file = plexclient::Plexservice::GetUniversalTranscodeUrl(&Vid, Vid.m_iMyPlayOffset, NULL, true); } else { - file = (char*)(Vid.m_pServer->GetUri() + Vid.m_Media.m_sPartKey).c_str(); + file = (Vid.m_pServer->GetUri() + Vid.m_Media.m_sPartKey); } - - req.Filename = file; + + req.Filename = (char*)file.c_str(); mpvPlugin->Service(MPV_PLAY_FILE, &req); reqTitle.Title = (char*)Vid.GetTitle().c_str(); -- cgit v1.2.3