diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-12-12 00:49:19 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-12-12 00:49:19 -0500 |
| commit | 1aff48b93b72fe7d418b4798f504bd0d145f44e8 (patch) | |
| tree | 5557717b3ecbf79d7fbb6f531102f5bceafd4fa5 /MediaBrowser.Controller/Entities/AudioBook.cs | |
| parent | a8d9a3440d0143aa7cf564f21aff2eadc4b88e6a (diff) | |
move book support into the core
Diffstat (limited to 'MediaBrowser.Controller/Entities/AudioBook.cs')
| -rw-r--r-- | MediaBrowser.Controller/Entities/AudioBook.cs | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Entities/AudioBook.cs b/MediaBrowser.Controller/Entities/AudioBook.cs new file mode 100644 index 000000000..efeb9b497 --- /dev/null +++ b/MediaBrowser.Controller/Entities/AudioBook.cs @@ -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; + } + } +} |
