using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Persistence;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Controller.Resolvers;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.MediaInfo;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Entities
{
///
/// Class Video
///
public class Video : BaseItem,
IHasAspectRatio,
IHasTags,
ISupportsPlaceHolders,
IHasMediaSources,
IHasShortOverview,
IThemeMedia
{
public bool IsMultiPart { get; set; }
public bool HasLocalAlternateVersions { get; set; }
public Guid? PrimaryVersionId { get; set; }
public List AdditionalPartIds { get; set; }
public List LocalAlternateVersionIds { get; set; }
public bool IsThemeMedia { get; set; }
public string FormatName { get; set; }
public long? Size { get; set; }
public string Container { get; set; }
public int? TotalBitrate { get; set; }
public string ShortOverview { get; set; }
///
/// Gets or sets the timestamp.
///
/// The timestamp.
public TransportStreamTimestamp? Timestamp { get; set; }
public Video()
{
PlayableStreamFileNames = new List();
AdditionalPartIds = new List();
LocalAlternateVersionIds = new List();
Tags = new List();
SubtitleFiles = new List();
LinkedAlternateVersions = new List();
}
public override bool SupportsAddingToPlaylist
{
get { return LocationType == LocationType.FileSystem && RunTimeTicks.HasValue; }
}
[IgnoreDataMember]
public int MediaSourceCount
{
get
{
return LinkedAlternateVersions.Count + LocalAlternateVersionIds.Count + 1;
}
}
public List LinkedAlternateVersions { get; set; }
///
/// Gets the linked children.
///
/// IEnumerable{BaseItem}.
public IEnumerable