mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 01:54:42 +01:00
move book support into the core
This commit is contained in:
@@ -1,6 +1,16 @@
|
||||
namespace MediaBrowser.Controller.Entities.Audio
|
||||
using MediaBrowser.Model.Serialization;
|
||||
|
||||
namespace MediaBrowser.Controller.Entities.Audio
|
||||
{
|
||||
public class AudioPodcast : Audio
|
||||
{
|
||||
[IgnoreDataMember]
|
||||
public override bool SupportsPositionTicksResume
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
64
MediaBrowser.Controller/Entities/AudioBook.cs
Normal file
64
MediaBrowser.Controller/Entities/AudioBook.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
using System;
|
||||
using MediaBrowser.Model.Configuration;
|
||||
using MediaBrowser.Model.Serialization;
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
public class AudioBook : Audio.Audio, IHasSeries
|
||||
{
|
||||
[IgnoreDataMember]
|
||||
public override bool SupportsPositionTicksResume
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public string SeriesPresentationUniqueKey { get; set; }
|
||||
[IgnoreDataMember]
|
||||
public string SeriesName { get; set; }
|
||||
[IgnoreDataMember]
|
||||
public Guid? SeriesId { get; set; }
|
||||
[IgnoreDataMember]
|
||||
public string SeriesSortName { get; set; }
|
||||
|
||||
public string FindSeriesSortName()
|
||||
{
|
||||
return SeriesSortName;
|
||||
}
|
||||
public string FindSeriesName()
|
||||
{
|
||||
return SeriesName;
|
||||
}
|
||||
public string FindSeriesPresentationUniqueKey()
|
||||
{
|
||||
return SeriesPresentationUniqueKey;
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public override bool EnableRefreshOnDateModifiedChange
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public Guid? FindSeriesId()
|
||||
{
|
||||
return SeriesId;
|
||||
}
|
||||
|
||||
public override bool CanDownload()
|
||||
{
|
||||
var locationType = LocationType;
|
||||
return locationType != LocationType.Remote &&
|
||||
locationType != LocationType.Virtual;
|
||||
}
|
||||
|
||||
public override UnratedItem GetBlockUnratedType()
|
||||
{
|
||||
return UnratedItem.Book;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -142,6 +142,15 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public virtual bool SupportsPositionTicksResume
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool DetectIsInMixedFolder()
|
||||
{
|
||||
if (SupportsIsInMixedFolderDetection)
|
||||
|
||||
@@ -264,6 +264,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// Our children are actually just references to the ones in the physical root...
|
||||
/// </summary>
|
||||
/// <value>The linked children.</value>
|
||||
[IgnoreDataMember]
|
||||
public override List<LinkedChild> LinkedChildren
|
||||
{
|
||||
get { return GetLinkedChildrenInternal(); }
|
||||
|
||||
@@ -193,9 +193,10 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
{
|
||||
return "Season " + ParentIndexNumber.Value.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
return "Season Unknown";
|
||||
}
|
||||
|
||||
return season == null ? SeasonName : season.Name;
|
||||
return season.Name;
|
||||
}
|
||||
|
||||
public string FindSeriesName()
|
||||
|
||||
@@ -44,6 +44,15 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public override bool SupportsPositionTicksResume
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
protected override bool SupportsIsInMixedFolderDetection
|
||||
{
|
||||
|
||||
@@ -46,6 +46,15 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
set { }
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public override bool SupportsPositionTicksResume
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this instance is owned item.
|
||||
/// </summary>
|
||||
|
||||
@@ -38,6 +38,15 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
}
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public override bool SupportsPositionTicksResume
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public override SourceType SourceType
|
||||
{
|
||||
|
||||
@@ -96,6 +96,7 @@
|
||||
<Compile Include="Drawing\ImageStream.cs" />
|
||||
<Compile Include="Dto\DtoOptions.cs" />
|
||||
<Compile Include="Dto\IDtoService.cs" />
|
||||
<Compile Include="Entities\AudioBook.cs" />
|
||||
<Compile Include="Entities\Audio\AudioPodcast.cs" />
|
||||
<Compile Include="Entities\Audio\IHasAlbumArtist.cs" />
|
||||
<Compile Include="Entities\Audio\IHasMusicGenres.cs" />
|
||||
|
||||
Reference in New Issue
Block a user