added delete helper

pull/702/head
Luke Pulverenti 8 years ago
parent 9ed3c31175
commit 56fb08eeed

@ -214,16 +214,17 @@ namespace Emby.Dlna.Didl
AddVideoResource(writer, video, deviceId, filter, contentFeature, streamInfo);
}
foreach (var subtitle in streamInfo.GetSubtitleProfiles(false, _serverAddress, _accessToken))
var subtitleProfiles = streamInfo.GetSubtitleProfiles(false, _serverAddress, _accessToken)
.Where(subtitle => subtitle.DeliveryMethod == SubtitleDeliveryMethod.External)
.ToList();
foreach (var subtitle in subtitleProfiles)
{
if (subtitle.DeliveryMethod == SubtitleDeliveryMethod.External)
{
var subtitleAdded = AddSubtitleElement(writer, subtitle);
var subtitleAdded = AddSubtitleElement(writer, subtitle);
if (subtitleAdded && _profile.EnableSingleSubtitleLimit)
{
break;
}
if (subtitleAdded && _profile.EnableSingleSubtitleLimit)
{
break;
}
}
}

@ -115,18 +115,18 @@ namespace Emby.Server.Implementations.Notifications
statement.TryBind("@IsRead", false);
statement.TryBind("@UserId", userId.ToGuidParamValue());
var levels = new List<NotificationLevel>();
foreach (var row in statement.ExecuteQuery())
{
var levels = new List<NotificationLevel>();
levels.Add(GetLevel(row, 0));
}
result.UnreadCount = levels.Count;
result.UnreadCount = levels.Count;
if (levels.Count > 0)
{
result.MaxUnreadNotificationLevel = levels.Max();
}
if (levels.Count > 0)
{
result.MaxUnreadNotificationLevel = levels.Max();
}
}

@ -232,11 +232,15 @@ namespace MediaBrowser.Providers.TV
{
continue;
}
var now = DateTime.UtcNow;
var targetSeries = DetermineAppropriateSeries(series, tuple.Item1);
var seasonOffset = TvdbSeriesProvider.GetSeriesOffset(targetSeries.ProviderIds) ?? ((targetSeries.AnimeSeriesIndex ?? 1) - 1);
var unairedThresholdDays = 1;
now = now.AddDays(0 - unairedThresholdDays);
if (airDate.Value < now)
{
if (addMissingEpisodes)

Loading…
Cancel
Save