The Free Software Media System - Server Backend & API
update live tv grid style
Luke Pulverenti639d8d360f6a
diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.csindex daeb50225a..02f77899f6 100644--- a/MediaBrowser.Model/Dlna/StreamBuilder.cs+++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs@@ -564,10 +564,7 @@ namespace MediaBrowser.Model.Dlna{if (!conditionProcessor.IsVideoConditionSatisfied(i, audioBitrate, audioChannels, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isCabac, refFrames, numVideoStreams, numAudioStreams)){- _logger.Debug("Profile: {0}, DirectPlay=false. Reason=VideoContainerProfile.{1} Path: {2}",- profile.Name ?? "Unknown Profile",- i.Property,- mediaSource.Path ?? "Unknown path");+ LogConditionFailure(profile, "VideoContainerProfile", i, mediaSource);return null;}@@ -600,10 +597,7 @@ namespace MediaBrowser.Model.Dlna{if (!conditionProcessor.IsVideoConditionSatisfied(i, audioBitrate, audioChannels, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isCabac, refFrames, numVideoStreams, numAudioStreams)){- _logger.Debug("Profile: {0}, DirectPlay=false. Reason=VideoCodecProfile.{1} Path: {2}",- profile.Name ?? "Unknown Profile",- i.Property,- mediaSource.Path ?? "Unknown path");+ LogConditionFailure(profile, "VideoCodecProfile", i, mediaSource);return null;}@@ -639,10 +633,7 @@ namespace MediaBrowser.Model.Dlnabool? isSecondaryAudio = audioStream == null ? null : mediaSource.IsSecondaryAudio(audioStream);if (!conditionProcessor.IsVideoAudioConditionSatisfied(i, audioChannels, audioBitrate, audioProfile, isSecondaryAudio)){- _logger.Debug("Profile: {0}, DirectPlay=false. Reason=VideoAudioCodecProfile.{1} Path: {2}",- profile.Name ?? "Unknown Profile",- i.Property,- mediaSource.Path ?? "Unknown path");+ LogConditionFailure(profile, "VideoAudioCodecProfile", i, mediaSource);return null;}@@ -679,6 +670,18 @@ namespace MediaBrowser.Model.Dlnareturn null;}+ private void LogConditionFailure(DeviceProfile profile, string type, ProfileCondition condition, MediaSourceInfo mediaSource)+ {+ _logger.Debug("Profile: {0}, DirectPlay=false. Reason={1}.{2} Condition: {3}. ConditionValue: {4}. IsRequired: {5}. Path: {6}",+ type,+ profile.Name ?? "Unknown Profile",+ condition.Property,+ condition.Condition,+ condition.Value ?? string.Empty,+ condition.IsRequired,+ mediaSource.Path ?? "Unknown path");+ }+private bool IsEligibleForDirectPlay(MediaSourceInfo item,int? maxBitrate,MediaStream subtitleStream,diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.csindex 3f164ee6f5..d704277c14 100644--- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs+++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs@@ -1007,12 +1007,7 @@ namespace MediaBrowser.Server.Implementations.LiveTvinnerProgress.RegisterAction(p => progress.Report(90 + (p * .1)));await CleanDatabaseInternal(progress, cancellationToken).ConfigureAwait(false);- foreach (var program in _programs.Values- .Where(i => (i.StartDate - DateTime.UtcNow).TotalDays <= 1)- .ToList())- {- RefreshIfNeeded(program);- }+ RefreshIfNeeded(_programs.Values.Where(i => (i.StartDate - DateTime.UtcNow).TotalDays <= 1).ToList());}finally{@@ -1145,8 +1140,6 @@ namespace MediaBrowser.Server.Implementations.LiveTv_refreshedPrograms.Clear();progress.Report(90);- RefreshIfNeeded(programs.Take(500));-// Load these now which will prefetch metadatavar dtoOptions = new DtoOptions();dtoOptions.Fields.Remove(ItemFields.SyncInfo);diff --git a/MediaBrowser.Server.Implementations/Sync/CloudSyncProfile.cs b/MediaBrowser.Server.Implementations/Sync/CloudSyncProfile.csindex f881a2055c..90135acfeb 100644--- a/MediaBrowser.Server.Implementations/Sync/CloudSyncProfile.cs+++ b/MediaBrowser.Server.Implementations/Sync/CloudSyncProfile.cs@@ -206,7 +206,7 @@ namespace MediaBrowser.Server.Implementations.SyncCondition = ProfileConditionType.LessThanEqual,Property = ProfileConditionValue.AudioChannels,Value = "5",- IsRequired = true+ IsRequired = false},new ProfileCondition{@@ -220,7 +220,7 @@ namespace MediaBrowser.Server.Implementations.SynccodecProfiles.Add(new CodecProfile{Type = CodecType.VideoAudio,- Codec = "ac3",+ Codec = "aac,mp3",Conditions = new[]{new ProfileCondition