LiveTvAudioRecording.cs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. using MediaBrowser.Controller.Entities.Audio;
  2. using MediaBrowser.Model.Entities;
  3. namespace MediaBrowser.Controller.LiveTv
  4. {
  5. public class LiveTvAudioRecording : Audio, ILiveTvRecording
  6. {
  7. /// <summary>
  8. /// Gets the user data key.
  9. /// </summary>
  10. /// <returns>System.String.</returns>
  11. public override string GetUserDataKey()
  12. {
  13. var name = GetClientTypeName();
  14. if (!string.IsNullOrEmpty(RecordingInfo.ProgramId))
  15. {
  16. return name + "-" + RecordingInfo.ProgramId;
  17. }
  18. return name + "-" + RecordingInfo.Name + (RecordingInfo.EpisodeTitle ?? string.Empty);
  19. }
  20. public RecordingInfo RecordingInfo { get; set; }
  21. public string ServiceName { get; set; }
  22. /// <summary>
  23. /// Gets a value indicating whether this instance is owned item.
  24. /// </summary>
  25. /// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value>
  26. public override bool IsOwnedItem
  27. {
  28. get
  29. {
  30. return false;
  31. }
  32. }
  33. public override string MediaType
  34. {
  35. get
  36. {
  37. return Model.Entities.MediaType.Audio;
  38. }
  39. }
  40. public override LocationType LocationType
  41. {
  42. get
  43. {
  44. if (!string.IsNullOrEmpty(Path))
  45. {
  46. return base.LocationType;
  47. }
  48. return LocationType.Remote;
  49. }
  50. }
  51. public override string GetClientTypeName()
  52. {
  53. return "Recording";
  54. }
  55. public override bool IsSaveLocalMetadataEnabled()
  56. {
  57. return false;
  58. }
  59. public override bool SupportsLocalMetadata
  60. {
  61. get
  62. {
  63. return false;
  64. }
  65. }
  66. }
  67. }