IRecordingsManager.cs 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Threading.Tasks;
  4. using MediaBrowser.Controller.Entities;
  5. using MediaBrowser.Model.Entities;
  6. namespace MediaBrowser.Controller.LiveTv;
  7. /// <summary>
  8. /// Service responsible for managing LiveTV recordings.
  9. /// </summary>
  10. public interface IRecordingsManager
  11. {
  12. /// <summary>
  13. /// Gets the path for the provided timer id.
  14. /// </summary>
  15. /// <param name="id">The timer id.</param>
  16. /// <returns>The recording path, or <c>null</c> if none exists.</returns>
  17. string? GetActiveRecordingPath(string id);
  18. /// <summary>
  19. /// Gets the information for an active recording.
  20. /// </summary>
  21. /// <param name="path">The recording path.</param>
  22. /// <returns>The <see cref="ActiveRecordingInfo"/>, or <c>null</c> if none exists.</returns>
  23. ActiveRecordingInfo? GetActiveRecordingInfo(string path);
  24. /// <summary>
  25. /// Gets the recording folders.
  26. /// </summary>
  27. /// <returns>The <see cref="VirtualFolderInfo"/> for each recording folder.</returns>
  28. IEnumerable<VirtualFolderInfo> GetRecordingFolders();
  29. /// <summary>
  30. /// Ensures that the recording folders all exist, and removes unused folders.
  31. /// </summary>
  32. /// <returns>Task.</returns>
  33. Task CreateRecordingFolders();
  34. /// <summary>
  35. /// Cancels the recording with the provided timer id, if one is active.
  36. /// </summary>
  37. /// <param name="timerId">The timer id.</param>
  38. /// <param name="timer">The timer.</param>
  39. void CancelRecording(string timerId, TimerInfo? timer);
  40. /// <summary>
  41. /// Records a stream.
  42. /// </summary>
  43. /// <param name="recordingInfo">The recording info.</param>
  44. /// <param name="channel">The channel associated with the recording timer.</param>
  45. /// <param name="recordingEndDate">The time to stop recording.</param>
  46. /// <returns>Task representing the recording process.</returns>
  47. Task RecordStream(ActiveRecordingInfo recordingInfo, BaseItem channel, DateTime recordingEndDate);
  48. }