diff --git a/CONTRIBUTORS b/CONTRIBUTORS index ebe6de9..ee65eff 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -235,3 +235,4 @@ Guy Martin Martin1234 for suggesting a service call, returning the number of clients + for implementing GetCurrentlyTunedTransponder() on client diff --git a/HISTORY b/HISTORY index 2d75055..48daf57 100644 --- a/HISTORY +++ b/HISTORY @@ -1,6 +1,7 @@ VDR Plugin 'streamdev' Revision History --------------------------------------- +- implemented GetCurrentlyTunedTransponder() on client (thanks to Martin1234) - added service call returning the number of clients (suggested by Martin1234) - added SVDRP commands to list and disconnect clients (thanks to Guy Martin) - fixed recplayer issues with large TS files (>4GB) diff --git a/client/device.c b/client/device.c index de0865f..3bc0dbd 100644 --- a/client/device.c +++ b/client/device.c @@ -88,6 +88,12 @@ bool cStreamdevDevice::IsTunedToTransponder(const cChannel *Channel) Channel->Transponder() == m_Channel->Transponder(); } +const cChannel *cStreamdevDevice::GetCurrentlyTunedTransponder(void) const { + if (m_ClientSocket->DataSocket(siLive) != NULL) + return m_Channel; + return NULL; +} + bool cStreamdevDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers) const { if (m_Disabled || Channel == m_DenyChannel) diff --git a/client/device.h b/client/device.h index 1edf956..c4e3a43 100644 --- a/client/device.h +++ b/client/device.h @@ -66,6 +66,7 @@ public: #else virtual bool IsTunedToTransponder(const cChannel *Channel); #endif + virtual const cChannel *GetCurrentlyTunedTransponder(void) const; virtual cString DeviceName(void) const; virtual cString DeviceType(void) const; virtual int SignalStrength(void) const;