AudioBook.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. using System;
  2. using MediaBrowser.Controller.Providers;
  3. using MediaBrowser.Model.Configuration;
  4. using MediaBrowser.Model.Serialization;
  5. using MediaBrowser.Model.Entities;
  6. namespace MediaBrowser.Controller.Entities
  7. {
  8. public class AudioBook : Audio.Audio, IHasSeries, IHasLookupInfo<SongInfo>
  9. {
  10. [IgnoreDataMember]
  11. public override bool SupportsPositionTicksResume
  12. {
  13. get
  14. {
  15. return true;
  16. }
  17. }
  18. [IgnoreDataMember]
  19. public override bool SupportsPlayedStatus
  20. {
  21. get
  22. {
  23. return true;
  24. }
  25. }
  26. [IgnoreDataMember]
  27. public string SeriesPresentationUniqueKey { get; set; }
  28. [IgnoreDataMember]
  29. public string SeriesName { get; set; }
  30. [IgnoreDataMember]
  31. public Guid? SeriesId { get; set; }
  32. public string FindSeriesSortName()
  33. {
  34. return SeriesName;
  35. }
  36. public string FindSeriesName()
  37. {
  38. return SeriesName;
  39. }
  40. public string FindSeriesPresentationUniqueKey()
  41. {
  42. return SeriesPresentationUniqueKey;
  43. }
  44. public override double? GetDefaultPrimaryImageAspectRatio()
  45. {
  46. return null;
  47. }
  48. public Guid? FindSeriesId()
  49. {
  50. return SeriesId;
  51. }
  52. public override bool CanDownload()
  53. {
  54. var locationType = LocationType;
  55. return locationType != LocationType.Remote &&
  56. locationType != LocationType.Virtual;
  57. }
  58. public override UnratedItem GetBlockUnratedType()
  59. {
  60. return UnratedItem.Book;
  61. }
  62. }
  63. }