mirror of https://github.com/jellyfin/jellyfin.git
Ensure uuid is always used with eventing
This commit is contained in:
parent
6f2e74f76c
commit
d1e045f662
|
@ -47,7 +47,7 @@ namespace MediaBrowser.Dlna.Eventing
|
||||||
public EventSubscriptionResponse CreateEventSubscription(string notificationType, int? timeoutSeconds, string callbackUrl)
|
public EventSubscriptionResponse CreateEventSubscription(string notificationType, int? timeoutSeconds, string callbackUrl)
|
||||||
{
|
{
|
||||||
var timeout = timeoutSeconds ?? 300;
|
var timeout = timeoutSeconds ?? 300;
|
||||||
var id = Guid.NewGuid().ToString("N");
|
var id = "uuid:" + Guid.NewGuid().ToString("N");
|
||||||
|
|
||||||
_logger.Debug("Creating event subscription for {0} with timeout of {1} to {2}",
|
_logger.Debug("Creating event subscription for {0} with timeout of {1} to {2}",
|
||||||
notificationType,
|
notificationType,
|
||||||
|
@ -88,7 +88,7 @@ namespace MediaBrowser.Dlna.Eventing
|
||||||
ContentType = "text/plain"
|
ContentType = "text/plain"
|
||||||
};
|
};
|
||||||
|
|
||||||
response.Headers["SID"] = "uuid:" + subscriptionId;
|
response.Headers["SID"] = subscriptionId;
|
||||||
response.Headers["TIMEOUT"] = "SECOND-" + timeoutSeconds.ToString(_usCulture);
|
response.Headers["TIMEOUT"] = "SECOND-" + timeoutSeconds.ToString(_usCulture);
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
|
@ -147,7 +147,7 @@ namespace MediaBrowser.Dlna.Eventing
|
||||||
|
|
||||||
options.RequestHeaders.Add("NT", subscription.NotificationType);
|
options.RequestHeaders.Add("NT", subscription.NotificationType);
|
||||||
options.RequestHeaders.Add("NTS", "upnp:propchange");
|
options.RequestHeaders.Add("NTS", "upnp:propchange");
|
||||||
options.RequestHeaders.Add("SID", "uuid:" + subscription.Id);
|
options.RequestHeaders.Add("SID", subscription.Id);
|
||||||
options.RequestHeaders.Add("SEQ", subscription.TriggerCount.ToString(_usCulture));
|
options.RequestHeaders.Add("SEQ", subscription.TriggerCount.ToString(_usCulture));
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|
Loading…
Reference in New Issue