jellyfin/MediaBrowser.Controller/Entities/AudioBook.cs

72 lines
1.7 KiB
C#
Raw Normal View History

2016-12-12 05:49:19 +00:00
using System;
2017-10-06 15:49:22 +00:00
using MediaBrowser.Controller.Providers;
2016-12-12 05:49:19 +00:00
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Serialization;
using MediaBrowser.Model.Entities;
namespace MediaBrowser.Controller.Entities
{
2017-10-06 15:49:22 +00:00
public class AudioBook : Audio.Audio, IHasSeries, IHasLookupInfo<SongInfo>
2016-12-12 05:49:19 +00:00
{
[IgnoreDataMember]
public override bool SupportsPositionTicksResume
{
get
{
return true;
}
}
2017-01-09 17:05:34 +00:00
[IgnoreDataMember]
public override bool SupportsPlayedStatus
{
get
{
return true;
}
}
2016-12-12 05:49:19 +00:00
[IgnoreDataMember]
public string SeriesPresentationUniqueKey { get; set; }
[IgnoreDataMember]
public string SeriesName { get; set; }
[IgnoreDataMember]
public Guid? SeriesId { get; set; }
public string FindSeriesSortName()
{
2017-05-05 17:55:38 +00:00
return SeriesName;
2016-12-12 05:49:19 +00:00
}
public string FindSeriesName()
{
return SeriesName;
}
public string FindSeriesPresentationUniqueKey()
{
return SeriesPresentationUniqueKey;
}
2017-02-10 20:06:52 +00:00
public override double? GetDefaultPrimaryImageAspectRatio()
{
return null;
}
2016-12-12 05:49:19 +00:00
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;
}
}
}