LiveTvVideoRecording.cs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. using MediaBrowser.Controller.Entities;
  2. using MediaBrowser.Model.Entities;
  3. namespace MediaBrowser.Controller.LiveTv
  4. {
  5. public class LiveTvVideoRecording : Video, 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. public override string MediaType
  23. {
  24. get
  25. {
  26. return Model.Entities.MediaType.Video;
  27. }
  28. }
  29. public override LocationType LocationType
  30. {
  31. get
  32. {
  33. if (!string.IsNullOrEmpty(Path))
  34. {
  35. return base.LocationType;
  36. }
  37. return LocationType.Remote;
  38. }
  39. }
  40. /// <summary>
  41. /// Gets a value indicating whether this instance is owned item.
  42. /// </summary>
  43. /// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value>
  44. public override bool IsOwnedItem
  45. {
  46. get
  47. {
  48. return false;
  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. }