Merge pull request #3342 from BaronGreenback/BugFix2

Fix for [DLNA] Many log messages from Media Renderers trying to see old events
pull/3316/head^2
dkanada 5 years ago committed by GitHub
commit 215ab39e00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -31,18 +31,26 @@ namespace Emby.Dlna.Eventing
public EventSubscriptionResponse RenewEventSubscription(string subscriptionId, string notificationType, string requestedTimeoutString, string callbackUrl) public EventSubscriptionResponse RenewEventSubscription(string subscriptionId, string notificationType, string requestedTimeoutString, string callbackUrl)
{ {
var subscription = GetSubscription(subscriptionId, false); var subscription = GetSubscription(subscriptionId, false);
if (subscription != null)
{
subscription.TimeoutSeconds = ParseTimeout(requestedTimeoutString) ?? 300;
int timeoutSeconds = subscription.TimeoutSeconds;
subscription.SubscriptionTime = DateTime.UtcNow;
subscription.TimeoutSeconds = ParseTimeout(requestedTimeoutString) ?? 300; _logger.LogDebug(
int timeoutSeconds = subscription.TimeoutSeconds; "Renewing event subscription for {0} with timeout of {1} to {2}",
subscription.SubscriptionTime = DateTime.UtcNow; subscription.NotificationType,
timeoutSeconds,
subscription.CallbackUrl);
_logger.LogDebug( return GetEventSubscriptionResponse(subscriptionId, requestedTimeoutString, timeoutSeconds);
"Renewing event subscription for {0} with timeout of {1} to {2}", }
subscription.NotificationType,
timeoutSeconds,
subscription.CallbackUrl);
return GetEventSubscriptionResponse(subscriptionId, requestedTimeoutString, timeoutSeconds); return new EventSubscriptionResponse
{
Content = string.Empty,
ContentType = "text/plain"
};
} }
public EventSubscriptionResponse CreateEventSubscription(string notificationType, string requestedTimeoutString, string callbackUrl) public EventSubscriptionResponse CreateEventSubscription(string notificationType, string requestedTimeoutString, string callbackUrl)

Loading…
Cancel
Save