added delete helper

This commit is contained in:
Luke Pulverenti 2016-12-08 10:40:20 -05:00
parent 9ed3c31175
commit 56fb08eeed
3 changed files with 21 additions and 16 deletions

View File

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

View File

@ -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();
}
}

View File

@ -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)