update live tv grid style

pull/702/head
Luke Pulverenti 10 years ago
parent 760f298dcc
commit 639d8d360f

@ -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)) 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}", LogConditionFailure(profile, "VideoContainerProfile", i, mediaSource);
profile.Name ?? "Unknown Profile",
i.Property,
mediaSource.Path ?? "Unknown path");
return null; 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)) 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}", LogConditionFailure(profile, "VideoCodecProfile", i, mediaSource);
profile.Name ?? "Unknown Profile",
i.Property,
mediaSource.Path ?? "Unknown path");
return null; return null;
} }
@ -639,10 +633,7 @@ namespace MediaBrowser.Model.Dlna
bool? isSecondaryAudio = audioStream == null ? null : mediaSource.IsSecondaryAudio(audioStream); bool? isSecondaryAudio = audioStream == null ? null : mediaSource.IsSecondaryAudio(audioStream);
if (!conditionProcessor.IsVideoAudioConditionSatisfied(i, audioChannels, audioBitrate, audioProfile, isSecondaryAudio)) if (!conditionProcessor.IsVideoAudioConditionSatisfied(i, audioChannels, audioBitrate, audioProfile, isSecondaryAudio))
{ {
_logger.Debug("Profile: {0}, DirectPlay=false. Reason=VideoAudioCodecProfile.{1} Path: {2}", LogConditionFailure(profile, "VideoAudioCodecProfile", i, mediaSource);
profile.Name ?? "Unknown Profile",
i.Property,
mediaSource.Path ?? "Unknown path");
return null; return null;
} }
@ -679,6 +670,18 @@ namespace MediaBrowser.Model.Dlna
return null; return 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, private bool IsEligibleForDirectPlay(MediaSourceInfo item,
int? maxBitrate, int? maxBitrate,
MediaStream subtitleStream, MediaStream subtitleStream,

@ -1007,12 +1007,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
innerProgress.RegisterAction(p => progress.Report(90 + (p * .1))); innerProgress.RegisterAction(p => progress.Report(90 + (p * .1)));
await CleanDatabaseInternal(progress, cancellationToken).ConfigureAwait(false); await CleanDatabaseInternal(progress, cancellationToken).ConfigureAwait(false);
foreach (var program in _programs.Values RefreshIfNeeded(_programs.Values.Where(i => (i.StartDate - DateTime.UtcNow).TotalDays <= 1).ToList());
.Where(i => (i.StartDate - DateTime.UtcNow).TotalDays <= 1)
.ToList())
{
RefreshIfNeeded(program);
}
} }
finally finally
{ {
@ -1145,8 +1140,6 @@ namespace MediaBrowser.Server.Implementations.LiveTv
_refreshedPrograms.Clear(); _refreshedPrograms.Clear();
progress.Report(90); progress.Report(90);
RefreshIfNeeded(programs.Take(500));
// Load these now which will prefetch metadata // Load these now which will prefetch metadata
var dtoOptions = new DtoOptions(); var dtoOptions = new DtoOptions();
dtoOptions.Fields.Remove(ItemFields.SyncInfo); dtoOptions.Fields.Remove(ItemFields.SyncInfo);

@ -206,7 +206,7 @@ namespace MediaBrowser.Server.Implementations.Sync
Condition = ProfileConditionType.LessThanEqual, Condition = ProfileConditionType.LessThanEqual,
Property = ProfileConditionValue.AudioChannels, Property = ProfileConditionValue.AudioChannels,
Value = "5", Value = "5",
IsRequired = true IsRequired = false
}, },
new ProfileCondition new ProfileCondition
{ {
@ -220,7 +220,7 @@ namespace MediaBrowser.Server.Implementations.Sync
codecProfiles.Add(new CodecProfile codecProfiles.Add(new CodecProfile
{ {
Type = CodecType.VideoAudio, Type = CodecType.VideoAudio,
Codec = "ac3", Codec = "aac,mp3",
Conditions = new[] Conditions = new[]
{ {
new ProfileCondition new ProfileCondition

Loading…
Cancel
Save