summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchriszero <zerov83@gmail.com>2015-02-19 20:45:07 +0100
committerchriszero <zerov83@gmail.com>2015-02-19 20:45:07 +0100
commit19ffb0aa62035038dc9375e75395f775162708c2 (patch)
tree5fb82f9947ef790bec965f40932b70fad539400d
parent7de1748cbaf31337f1f592cc9ee47f7872333f33 (diff)
downloadvdr-plugin-plex-19ffb0aa62035038dc9375e75395f775162708c2.tar.gz
vdr-plugin-plex-19ffb0aa62035038dc9375e75395f775162708c2.tar.bz2
Stops spamming the PMS if just a VDR recoding is playing
-rw-r--r--SubscriptionManager.cpp31
1 files changed, 16 insertions, 15 deletions
diff --git a/SubscriptionManager.cpp b/SubscriptionManager.cpp
index 47bd6f2..033776a 100644
--- a/SubscriptionManager.cpp
+++ b/SubscriptionManager.cpp
@@ -155,21 +155,21 @@ std::string SubscriptionManager::GetTimelineXml()
else msg << "playing";
msg << "\" time=\"" << current << "\" type=\"video\"";
-
- msg << " duration=\"" << total << "\"";
- msg << " seekRange=\"0-" << total << "\"";
- msg << " controllable=\"true\"";
- msg << " machineIdentifier=\"" << (pVid ? pVid->m_Server.GetUuid() : "") << "\"";
- msg << " protocol=\"http\"";
- msg << " address=\"" << (pVid ? pVid->m_Server.GetIpAdress() : "") << "\"";
- msg << " port=\"" << (pVid ? pVid->m_Server.GetPort() : 0) << "\"";
- msg << " guid=\"" << Config::GetInstance().GetUUID() << "\"";
- msg << " containerKey=\"" << (pVid ? pVid->m_sKey : "/library/metadata/900000") << "\"";
- msg << " key=\"" << (pVid ? pVid->m_sKey : "/library/metadata/900000") << "\"";
- msg << " ratingKey=\"" << (pVid ? pVid->m_iRatingKey : 900000) << "\"";
- msg << " volume=\"" << m_pStatus->Volume << "\"";
- msg << " shuffle=\"false\"";
-
+ if (!m_pStatus->PlayerStopped) {
+ msg << " duration=\"" << total << "\"";
+ msg << " seekRange=\"0-" << total << "\"";
+ msg << " controllable=\"true\"";
+ msg << " machineIdentifier=\"" << (pVid ? pVid->m_Server.GetUuid() : "") << "\"";
+ msg << " protocol=\"http\"";
+ msg << " address=\"" << (pVid ? pVid->m_Server.GetIpAdress() : "") << "\"";
+ msg << " port=\"" << (pVid ? pVid->m_Server.GetPort() : 0) << "\"";
+ msg << " guid=\"" << Config::GetInstance().GetUUID() << "\"";
+ msg << " containerKey=\"" << (pVid ? pVid->m_sKey : "/library/metadata/900000") << "\"";
+ msg << " key=\"" << (pVid ? pVid->m_sKey : "/library/metadata/900000") << "\"";
+ msg << " ratingKey=\"" << (pVid ? pVid->m_iRatingKey : 900000) << "\"";
+ msg << " volume=\"" << m_pStatus->Volume << "\"";
+ msg << " shuffle=\"false\"";
+ }
msg << "/>";
return msg.str();
}
@@ -255,6 +255,7 @@ void cSubscriberStatus::Replaying(const cControl* DvbPlayerControl, const char*
pVideo = &hlsControl->m_Video;
} else {
pVideo = NULL;
+ pControl = NULL;
}
SubscriptionManager::GetInstance().Notify();