mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-26 12:05:04 +01:00
update program titles
This commit is contained in:
@@ -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; }
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user