mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-03 22:38:30 +01:00
moved media streams to the database
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using MediaBrowser.Model.Entities;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
@@ -13,7 +12,6 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
{
|
||||
public Audio()
|
||||
{
|
||||
MediaStreams = new List<MediaStream>();
|
||||
Artists = new List<string>();
|
||||
}
|
||||
|
||||
@@ -22,13 +20,13 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
/// </summary>
|
||||
/// <value>The language.</value>
|
||||
public string Language { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the media streams.
|
||||
/// </summary>
|
||||
/// <value>The media streams.</value>
|
||||
public List<MediaStream> MediaStreams { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance has embedded image.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance has embedded image; otherwise, <c>false</c>.</value>
|
||||
public bool HasEmbeddedImage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Override this to true if class should be grouped under a container in indicies
|
||||
/// The container class should be defined via IndexContainer
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
public class Book : BaseItem
|
||||
public class Book : BaseItem, IHasTags
|
||||
{
|
||||
public override string MediaType
|
||||
{
|
||||
@@ -10,6 +11,11 @@ namespace MediaBrowser.Controller.Entities
|
||||
return Model.Entities.MediaType.Book;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the tags.
|
||||
/// </summary>
|
||||
/// <value>The tags.</value>
|
||||
public List<string> Tags { get; set; }
|
||||
|
||||
public string SeriesName { get; set; }
|
||||
|
||||
@@ -31,5 +37,10 @@ namespace MediaBrowser.Controller.Entities
|
||||
return !IsInMixedFolder;
|
||||
}
|
||||
}
|
||||
|
||||
public Book()
|
||||
{
|
||||
Tags = new List<string>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
10
MediaBrowser.Controller/Entities/IHasMediaStreams.cs
Normal file
10
MediaBrowser.Controller/Entities/IHasMediaStreams.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// This is essentially a marker interface
|
||||
/// </summary>
|
||||
public interface IHasMediaStreams
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -12,5 +12,10 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// </summary>
|
||||
/// <value>The screenshot image paths.</value>
|
||||
List<string> ScreenshotImagePaths { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Validates the screenshots.
|
||||
/// </summary>
|
||||
void ValidateScreenshots();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,11 +22,28 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
public Video()
|
||||
{
|
||||
MediaStreams = new List<MediaStream>();
|
||||
PlayableStreamFileNames = new List<string>();
|
||||
AdditionalPartIds = new List<Guid>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance has subtitles.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance has subtitles; otherwise, <c>false</c>.</value>
|
||||
public bool HasSubtitles { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the video bit rate.
|
||||
/// </summary>
|
||||
/// <value>The video bit rate.</value>
|
||||
public int? VideoBitRate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the default index of the video stream.
|
||||
/// </summary>
|
||||
/// <value>The default index of the video stream.</value>
|
||||
public int? DefaultVideoStreamIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the video.
|
||||
/// </summary>
|
||||
@@ -45,12 +62,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// <value>The video3 D format.</value>
|
||||
public Video3DFormat? Video3DFormat { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the media streams.
|
||||
/// </summary>
|
||||
/// <value>The media streams.</value>
|
||||
public List<MediaStream> MediaStreams { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If the video is a folder-rip, this will hold the file list for the largest playlist
|
||||
/// </summary>
|
||||
@@ -70,7 +81,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// </summary>
|
||||
/// <value>The aspect ratio.</value>
|
||||
public string AspectRatio { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Should be overridden to return the proper folder where metadata lives
|
||||
/// </summary>
|
||||
@@ -122,16 +133,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
.ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The default video stream for this video. Use this to determine media info for this item.
|
||||
/// </summary>
|
||||
/// <value>The default video stream.</value>
|
||||
[IgnoreDataMember]
|
||||
public MediaStream DefaultVideoStream
|
||||
{
|
||||
get { return MediaStreams != null ? MediaStreams.FirstOrDefault(s => s.Type == MediaStreamType.Video) : null; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether [is3 D].
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user