aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/LiveTv
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/LiveTv')
-rw-r--r--MediaBrowser.Controller/LiveTv/ILiveTvItem.cs4
-rw-r--r--MediaBrowser.Controller/LiveTv/ILiveTvManager.cs16
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs21
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvChannel.cs11
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvProgram.cs6
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs23
6 files changed, 74 insertions, 7 deletions
diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvItem.cs b/MediaBrowser.Controller/LiveTv/ILiveTvItem.cs
index d3334e8ea..6c277a2e1 100644
--- a/MediaBrowser.Controller/LiveTv/ILiveTvItem.cs
+++ b/MediaBrowser.Controller/LiveTv/ILiveTvItem.cs
@@ -1,8 +1,10 @@
-
+using System;
+
namespace MediaBrowser.Controller.LiveTv
{
public interface ILiveTvItem
{
+ Guid Id { get; }
string ServiceName { get; set; }
}
}
diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
index 0b58a9232..d5b5d92a6 100644
--- a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
+++ b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
@@ -301,5 +301,21 @@ namespace MediaBrowser.Controller.LiveTv
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task&lt;QueryResult&lt;BaseItem&gt;&gt;.</returns>
Task<QueryResult<BaseItem>> GetInternalRecordings(RecordingQuery query, CancellationToken cancellationToken);
+
+ /// <summary>
+ /// Gets the recording media sources.
+ /// </summary>
+ /// <param name="id">The identifier.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>Task&lt;IEnumerable&lt;MediaSourceInfo&gt;&gt;.</returns>
+ Task<IEnumerable<MediaSourceInfo>> GetRecordingMediaSources(string id, CancellationToken cancellationToken);
+
+ /// <summary>
+ /// Gets the channel media sources.
+ /// </summary>
+ /// <param name="id">The identifier.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>Task&lt;IEnumerable&lt;MediaSourceInfo&gt;&gt;.</returns>
+ Task<IEnumerable<MediaSourceInfo>> GetChannelMediaSources(string id, CancellationToken cancellationToken);
}
}
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs
index 9815066ef..0dc296d5a 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs
@@ -1,10 +1,12 @@
-using System.Runtime.Serialization;
-using MediaBrowser.Controller.Entities;
+using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Model.Configuration;
+using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Users;
+using System.Collections.Generic;
using System.Linq;
+using System.Runtime.Serialization;
namespace MediaBrowser.Controller.LiveTv
{
@@ -99,5 +101,20 @@ namespace MediaBrowser.Controller.LiveTv
{
return user.Policy.EnableLiveTvManagement;
}
+
+ public override IEnumerable<MediaSourceInfo> GetMediaSources(bool enablePathSubstitution)
+ {
+ var list = base.GetMediaSources(enablePathSubstitution).ToList();
+
+ foreach (var mediaSource in list)
+ {
+ if (string.IsNullOrWhiteSpace(mediaSource.Path))
+ {
+ mediaSource.Type = MediaSourceType.Placeholder;
+ }
+ }
+
+ return list;
+ }
}
}
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
index 75e418bcc..cb10003ed 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
@@ -82,6 +82,15 @@ namespace MediaBrowser.Controller.LiveTv
/// <value><c>null</c> if [has image] contains no value, <c>true</c> if [has image]; otherwise, <c>false</c>.</value>
public bool? HasProviderImage { get; set; }
+ public override LocationType LocationType
+ {
+ get
+ {
+ // TODO: This should be removed
+ return LocationType.Remote;
+ }
+ }
+
protected override string CreateSortName()
{
double number = 0;
@@ -127,7 +136,7 @@ namespace MediaBrowser.Controller.LiveTv
Name = Name,
Path = Path,
RunTimeTicks = RunTimeTicks,
- Type = MediaSourceType.Default
+ Type = MediaSourceType.Placeholder
};
list.Add(info);
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
index 0b07d8b6d..0609df4c6 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
@@ -35,6 +35,12 @@ namespace MediaBrowser.Controller.LiveTv
public string ExternalChannelId { get; set; }
/// <summary>
+ /// Gets or sets the original air date.
+ /// </summary>
+ /// <value>The original air date.</value>
+ public DateTime? OriginalAirDate { get; set; }
+
+ /// <summary>
/// Gets or sets the type of the channel.
/// </summary>
/// <value>The type of the channel.</value>
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
index 207684d55..3669f9440 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
@@ -1,9 +1,11 @@
-using System.Runtime.Serialization;
-using MediaBrowser.Controller.Entities;
+using MediaBrowser.Controller.Entities;
using MediaBrowser.Model.Configuration;
+using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
-using System.Linq;
using MediaBrowser.Model.Users;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.Serialization;
namespace MediaBrowser.Controller.LiveTv
{
@@ -97,5 +99,20 @@ namespace MediaBrowser.Controller.LiveTv
{
return user.Policy.EnableLiveTvManagement;
}
+
+ public override IEnumerable<MediaSourceInfo> GetMediaSources(bool enablePathSubstitution)
+ {
+ var list = base.GetMediaSources(enablePathSubstitution).ToList();
+
+ foreach (var mediaSource in list)
+ {
+ if (string.IsNullOrWhiteSpace(mediaSource.Path))
+ {
+ mediaSource.Type = MediaSourceType.Placeholder;
+ }
+ }
+
+ return list;
+ }
}
}