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

@@ -1,8 +1,8 @@
using System;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Extensions;
using MediaBrowser.Model.MediaInfo;
using System.Collections.Generic;
using System.Linq;
using MediaBrowser.Model.Serialization;
namespace MediaBrowser.Model.Dto
@@ -72,6 +72,32 @@ namespace MediaBrowser.Model.Dto
SupportsProbing = true;
}
public void InferTotalBitrate()
{
if (Bitrate.HasValue || MediaStreams == null)
{
return;
}
var internalStreams = MediaStreams
.Where(i => !i.IsExternal)
.ToList();
if (internalStreams.Count == 0)
{
return;
}
var bitrate = internalStreams
.Select(m => m.BitRate ?? 0)
.Sum();
if (bitrate > 0)
{
Bitrate = bitrate;
}
}
public int? DefaultAudioStreamIndex { get; set; }
public int? DefaultSubtitleStreamIndex { get; set; }

View File

@@ -16,12 +16,6 @@ namespace MediaBrowser.Model.System
/// <value>The display name of the operating system.</value>
public string OperatingSystemDisplayName { get; set; }
/// <summary>
/// Gets or sets 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>
public bool IsRunningAsService { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [supports running as service].
/// </summary>