jellyfin/MediaBrowser.Controller/Entities/AudioBook.cs

78 lines
1.8 KiB
C#
Raw Normal View History

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