update program titles

This commit is contained in:
Luke Pulverenti
2017-01-21 15:27:07 -05:00
parent 0bf95da493
commit 2ef30a3ba8
27 changed files with 288 additions and 286 deletions

View File

@@ -72,12 +72,7 @@ namespace MediaBrowser.Controller.Channels
IsRemote = true
};
var bitrate = (AudioBitrate ?? 0) + (VideoBitrate ?? 0);
if (bitrate > 0)
{
source.Bitrate = bitrate;
}
source.InferTotalBitrate();
return source;
}

View File

@@ -267,15 +267,8 @@ namespace MediaBrowser.Controller.Entities.Audio
}
}
var bitrate = i.TotalBitrate ??
info.MediaStreams.Where(m => m.Type == MediaStreamType.Audio)
.Select(m => m.BitRate ?? 0)
.Sum();
if (bitrate > 0)
{
info.Bitrate = bitrate;
}
info.Bitrate = i.TotalBitrate;
info.InferTotalBitrate();
return info;
}

View File

@@ -197,7 +197,7 @@ namespace MediaBrowser.Controller.Entities
public InternalItemsQuery()
{
MinSimilarityScore = 1;
MinSimilarityScore = 20;
GroupByPresentationUniqueKey = true;
EnableTotalRecordCount = true;

View File

@@ -649,22 +649,8 @@ namespace MediaBrowser.Controller.Entities
}
}
try
{
var bitrate = i.TotalBitrate ??
info.MediaStreams.Where(m => m.Type != MediaStreamType.Subtitle && !string.Equals(m.Codec, "mjpeg", StringComparison.OrdinalIgnoreCase))
.Select(m => m.BitRate ?? 0)
.Sum();
if (bitrate > 0)
{
info.Bitrate = bitrate;
}
}
catch (OverflowException ex)
{
Logger.ErrorException("Error calculating total bitrate", ex);
}
info.Bitrate = i.TotalBitrate;
info.InferTotalBitrate();
return info;
}

View File

@@ -21,6 +21,12 @@ namespace MediaBrowser.Controller
/// <returns>SystemInfo.</returns>
Task<SystemInfo> GetSystemInfo();
/// <summary>
/// Gets a value indicating whether this instance is running as service.
/// </summary>
/// <value><c>true</c> if this instance is running as service; otherwise, <c>false</c>.</value>
bool IsRunningAsService { get; }
/// <summary>
/// Gets a value indicating whether [supports automatic run at startup].
/// </summary>