commit 69f1c46e41644684b511d4ffdd09a370d89bb9d4
Author: Martin Gansser <mgansser(a)netcom-mail.de>
Date: Tue Oct 22 09:08:38 2024 +0200
Rebuilt for new VDR API version 2.7.3
...Removal-of-deprecated-interface-functions.patch | 75 ++++++++++++++++++++++
vdr-plex.spec | 18 ++++--
2 files changed, 89 insertions(+), 4 deletions(-)
---
diff --git a/0002-plex-Removal-of-deprecated-interface-functions.patch
b/0002-plex-Removal-of-deprecated-interface-functions.patch
new file mode 100644
index 0000000..df835de
--- /dev/null
+++ b/0002-plex-Removal-of-deprecated-interface-functions.patch
@@ -0,0 +1,75 @@
+--- vdr-plugin-plex-0.4.0/hlsPlayerControl.cpp.orig 2024-10-01 14:36:23.130354003 +0200
++++ vdr-plugin-plex-0.4.0/hlsPlayerControl.cpp 2024-10-01 14:38:42.126362390 +0200
+@@ -11,11 +11,17 @@
+ #include "MediaContainer.h"
+ #include "PVideo.h"
+ #include "cPlexOsdItem.h"
++#include <vdr/thread.h>
+
+ // static
+ cControl *cHlsPlayerControl::Create(plexclient::cVideo Video) {
+ // Stop already playing stream
++#if APIVERSNUM >= 20402
++ cMutexLock mtx;
++ cHlsPlayerControl *c = dynamic_cast<cHlsPlayerControl
*>(cControl::Control(mtx, true)); // Pass mtx and true/false as needed
++#else
+ cHlsPlayerControl *c = dynamic_cast<cHlsPlayerControl
*>(cControl::Control(true));
++#endif
+ if (c) {
+ c->Stop();
+ }
+--- vdr-plugin-plex-0.4.0/PlexHTTPRequestHandler.cpp.orig 2024-10-01 15:11:32.597732402
+0200
++++ vdr-plugin-plex-0.4.0/PlexHTTPRequestHandler.cpp 2024-10-01 15:14:36.822316479 +0200
+@@ -7,6 +7,7 @@
+
+ #include "hlsPlayerControl.h"
+ #include "services.h"
++#include <vdr/thread.h>
+
+ namespace plexclient {
+
+@@ -201,7 +202,14 @@
+
+ } else if (request.getURI().find("/playback") !=
std::string::npos) {
+ if (request.getURI().find("/playback/seekTo") !=
std::string::npos) {
++
++
++#if APIVERSNUM >= 20402
++ cMutexLock mtx;
++ cHlsPlayerControl *control = dynamic_cast<cHlsPlayerControl
*>(cControl::Control(mtx, true)); // Pass mtx and true/false as needed
++#else
+ cHlsPlayerControl *control = dynamic_cast<cHlsPlayerControl
*>(cControl::Control(true));
++#endif
+ if (query.find("offset") != query.end()) {
+ int offset = atoi(query["offset"].c_str()) / 1000;
+ if (control) {
+@@ -247,7 +255,13 @@
+ } else if (request.getURI().find("/playback/stop") !=
std::string::npos) {
+ cRemote::Put(kStop);
+ } else if (request.getURI().find("/playback/stepForward") !=
std::string::npos) {
++#if APIVERSNUM >= 20402
++ cMutexLock mtx;
++ cHlsPlayerControl *control = dynamic_cast<cHlsPlayerControl
*>(cControl::Control(mtx, true)); // Pass mtx and true/false as needed
++#else
+ cHlsPlayerControl *control = dynamic_cast<cHlsPlayerControl
*>(cControl::Control(true));
++#endif
++
+ if (control) {
+ control->JumpRelative(30);
+ } else if (cMyPlugin::PlayingFile) {
+@@ -261,7 +275,15 @@
+ } else
+ cRemote::Put(kFastFwd);
+ } else if (request.getURI().find("/playback/stepBack") !=
std::string::npos) {
++
++
++#if APIVERSNUM >= 20402
++ cMutexLock mtx;
++ cHlsPlayerControl *control = dynamic_cast<cHlsPlayerControl
*>(cControl::Control(mtx, true)); // Pass mtx and true/false as needed
++#else
+ cHlsPlayerControl *control = dynamic_cast<cHlsPlayerControl
*>(cControl::Control(true));
++#endif
++
+ if (control) {
+ control->JumpRelative(-15);
+ } else if (cMyPlugin::PlayingFile) {
diff --git a/vdr-plex.spec b/vdr-plex.spec
index dbad0de..e90d4a5 100644
--- a/vdr-plex.spec
+++ b/vdr-plex.spec
@@ -1,17 +1,21 @@
-# version we want build against
+# version we want to build against
%global vdr_version 2.6.3
-%if 0%{?fedora} >= 40
+# Set vdr_version based on Fedora version
+%if 0%{?fedora} >= 42
+%global vdr_version 2.7.2
+%elif 0%{?fedora} >= 40
%global vdr_version 2.6.9
%endif
Name: vdr-plex
Version: 0.4.0
-Release: 40%{?dist}
+Release: 42%{?dist}
Summary: A Plex Client for the VDR
-License: GPLv2
+License: GPL-2.0-only
URL:
https://github.com/chriszero/vdr-plugin-plex
Source: %url/archive/refs/tags/%{version}/%{name}-%{version}.tar.gz
Patch0: %{name}-namespace.patch
+Patch1: 0002-plex-Removal-of-deprecated-interface-functions.patch
BuildRequires: gcc-c++
BuildRequires: gettext
@@ -48,6 +52,12 @@ Cast Vimeo, Youtube, Apple-Trailers, and many other Plexchannels to
your VDR.
%{vdr_plugindir}/libvdr-*.so.%{vdr_apiversion}
%changelog
+* Tue Oct 22 2024 Martin Gansser <martinkg(a)fedoraproject.org> - 0.4.0-42
+- Rebuilt for new VDR API version 2.7.3
+
+* Tue Oct 01 2024 Martin Gansser <martinkg(a)fedoraproject.org> - 0.4.0-41
+- Add 0002-plex-Removal-of-deprecated-interface-functions.patch for vdr-2.7.x
+
* Fri Jul 26 2024 Martin Gansser <martinkg(a)fedoraproject.org> - 0.4.0-40
- Rebuilt for new VDR API version 2.6.9