aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/LiveTv
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-03-25 13:52:36 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-03-25 13:52:36 -0400
commitd9108f69f35080acb5ebefaefcd469595529afa2 (patch)
tree3f04e719877b9cdec9529ca34406b753f6492abc /MediaBrowser.Controller/LiveTv
parentd6832e7a41c2a24f7dd998284e8e4f6eacf1d188 (diff)
parent72fe76ab1008f0bd38157cc37cde45797b5f6417 (diff)
Merge branch 'master' of https://github.com/MediaBrowser/Emby
Diffstat (limited to 'MediaBrowser.Controller/LiveTv')
-rw-r--r--MediaBrowser.Controller/LiveTv/ILiveTvItem.cs10
-rw-r--r--MediaBrowser.Controller/LiveTv/ILiveTvManager.cs40
-rw-r--r--MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs4
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs14
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvChannel.cs15
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvProgram.cs12
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs14
-rw-r--r--MediaBrowser.Controller/LiveTv/RecordingGroup.cs10
8 files changed, 67 insertions, 52 deletions
diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvItem.cs b/MediaBrowser.Controller/LiveTv/ILiveTvItem.cs
deleted file mode 100644
index 36727f4aee..0000000000
--- a/MediaBrowser.Controller/LiveTv/ILiveTvItem.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-using MediaBrowser.Controller.Entities;
-
-namespace MediaBrowser.Controller.LiveTv
-{
- public interface ILiveTvItem : IHasId
- {
- string ServiceName { get; set; }
- string ExternalId { get; set; }
- }
-}
diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
index 501e48a74b..4cc7b27ea8 100644
--- a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
+++ b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
@@ -50,7 +50,7 @@ namespace MediaBrowser.Controller.LiveTv
/// </summary>
/// <param name="recording">The recording.</param>
/// <returns>Task.</returns>
- Task DeleteRecording(ILiveTvRecording recording);
+ Task DeleteRecording(BaseItem recording);
/// <summary>
/// Cancels the timer.
@@ -75,15 +75,6 @@ namespace MediaBrowser.Controller.LiveTv
void AddParts(IEnumerable<ILiveTvService> services, IEnumerable<ITunerHost> tunerHosts, IEnumerable<IListingsProvider> listingProviders);
/// <summary>
- /// Gets the channels.
- /// </summary>
- /// <param name="query">The query.</param>
- /// <param name="options">The options.</param>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <returns>IEnumerable{Channel}.</returns>
- Task<QueryResult<ChannelInfoDto>> GetChannels(LiveTvChannelQuery query, DtoOptions options, CancellationToken cancellationToken);
-
- /// <summary>
/// Gets the recording.
/// </summary>
/// <param name="id">The identifier.</param>
@@ -92,15 +83,6 @@ namespace MediaBrowser.Controller.LiveTv
/// <param name="user">The user.</param>
/// <returns>Task{RecordingInfoDto}.</returns>
Task<BaseItemDto> GetRecording(string id, DtoOptions options, CancellationToken cancellationToken, User user = null);
-
- /// <summary>
- /// Gets the channel.
- /// </summary>
- /// <param name="id">The identifier.</param>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <param name="user">The user.</param>
- /// <returns>Task{RecordingInfoDto}.</returns>
- Task<ChannelInfoDto> GetChannel(string id, CancellationToken cancellationToken, User user = null);
/// <summary>
/// Gets the timer.
@@ -156,7 +138,7 @@ namespace MediaBrowser.Controller.LiveTv
/// <param name="id">The identifier.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>LiveTvRecording.</returns>
- Task<ILiveTvRecording> GetInternalRecording(string id, CancellationToken cancellationToken);
+ Task<BaseItem> GetInternalRecording(string id, CancellationToken cancellationToken);
/// <summary>
/// Gets the recording stream.
@@ -385,10 +367,22 @@ namespace MediaBrowser.Controller.LiveTv
/// <summary>
/// Adds the channel information.
/// </summary>
- /// <param name="dto">The dto.</param>
- /// <param name="channel">The channel.</param>
+ /// <param name="items">The items.</param>
/// <param name="options">The options.</param>
/// <param name="user">The user.</param>
- void AddChannelInfo(BaseItemDto dto, LiveTvChannel channel, DtoOptions options, User user);
+ void AddChannelInfo(List<Tuple<BaseItemDto, LiveTvChannel>> items, DtoOptions options, User user);
+
+ /// <summary>
+ /// Called when [recording file deleted].
+ /// </summary>
+ /// <param name="recording">The recording.</param>
+ /// <returns>Task.</returns>
+ Task OnRecordingFileDeleted(BaseItem recording);
+
+ /// <summary>
+ /// Gets the sat ini mappings.
+ /// </summary>
+ /// <returns>List&lt;NameValuePair&gt;.</returns>
+ List<NameValuePair> GetSatIniMappings();
}
}
diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs b/MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs
index 5dc5f68cd2..257024d01e 100644
--- a/MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs
+++ b/MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs
@@ -9,8 +9,10 @@ using System.Threading.Tasks;
namespace MediaBrowser.Controller.LiveTv
{
- public interface ILiveTvRecording : IHasImages, IHasMediaSources, IHasUserData, ILiveTvItem, IHasStartDate, IHasProgramAttributes
+ public interface ILiveTvRecording : IHasImages, IHasMediaSources, IHasUserData, IHasStartDate, IHasProgramAttributes
{
+ string ServiceName { get; set; }
+ string ExternalId { get; set; }
string ChannelId { get; }
string MediaType { get; }
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs
index c3d843f85a..2657ade423 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs
@@ -39,6 +39,13 @@ namespace MediaBrowser.Controller.LiveTv
[IgnoreDataMember]
public bool IsPremiere { get; set; }
+ [IgnoreDataMember]
+ public override SourceType SourceType
+ {
+ get { return SourceType.LiveTV; }
+ set { }
+ }
+
/// <summary>
/// Gets the user data key.
/// </summary>
@@ -50,8 +57,6 @@ namespace MediaBrowser.Controller.LiveTv
return name + "-" + Name + (EpisodeTitle ?? string.Empty);
}
- public string ServiceName { get; set; }
-
/// <summary>
/// Gets a value indicating whether this instance is owned item.
/// </summary>
@@ -151,5 +156,10 @@ namespace MediaBrowser.Controller.LiveTv
{
return LiveTvManager.DeleteRecording(this);
}
+
+ public override Task OnFileDeleted()
+ {
+ return LiveTvManager.OnRecordingFileDeleted(this);
+ }
}
}
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
index 8c4ee92cda..24ec3f5e16 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
@@ -11,7 +11,7 @@ using System.Runtime.Serialization;
namespace MediaBrowser.Controller.LiveTv
{
- public class LiveTvChannel : BaseItem, IHasMediaSources, ILiveTvItem
+ public class LiveTvChannel : BaseItem, IHasMediaSources
{
/// <summary>
/// Gets the user data key.
@@ -40,6 +40,13 @@ namespace MediaBrowser.Controller.LiveTv
}
}
+ [IgnoreDataMember]
+ public override SourceType SourceType
+ {
+ get { return SourceType.LiveTV; }
+ set { }
+ }
+
/// <summary>
/// Gets or sets the number.
/// </summary>
@@ -52,12 +59,6 @@ namespace MediaBrowser.Controller.LiveTv
/// <value>The type of the channel.</value>
public ChannelType ChannelType { get; set; }
- /// <summary>
- /// Gets or sets the name of the service.
- /// </summary>
- /// <value>The name of the service.</value>
- public string ServiceName { get; set; }
-
[IgnoreDataMember]
public override LocationType LocationType
{
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
index fcd065e79f..684af9974d 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
@@ -11,7 +11,7 @@ using MediaBrowser.Model.Entities;
namespace MediaBrowser.Controller.LiveTv
{
- public class LiveTvProgram : BaseItem, ILiveTvItem, IHasLookupInfo<LiveTvProgramLookupInfo>, IHasStartDate, IHasProgramAttributes
+ public class LiveTvProgram : BaseItem, IHasLookupInfo<LiveTvProgramLookupInfo>, IHasStartDate, IHasProgramAttributes
{
/// <summary>
/// Gets the user data key.
@@ -39,12 +39,12 @@ namespace MediaBrowser.Controller.LiveTv
return base.CreateUserDataKey();
}
- /// <summary>
- /// Gets or sets the name.
- /// </summary>
- /// <value>The name.</value>
[IgnoreDataMember]
- public string ServiceName { get; set; }
+ public override SourceType SourceType
+ {
+ get { return SourceType.LiveTV; }
+ set { }
+ }
/// <summary>
/// The start date of the program, in UTC.
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
index 5492a29f30..6dff664388 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
@@ -39,6 +39,13 @@ namespace MediaBrowser.Controller.LiveTv
[IgnoreDataMember]
public bool IsPremiere { get; set; }
+ [IgnoreDataMember]
+ public override SourceType SourceType
+ {
+ get { return SourceType.LiveTV; }
+ set { }
+ }
+
/// <summary>
/// Gets the user data key.
/// </summary>
@@ -65,8 +72,6 @@ namespace MediaBrowser.Controller.LiveTv
return base.CreateUserDataKey();
}
- public string ServiceName { get; set; }
-
[IgnoreDataMember]
public override string MediaType
{
@@ -166,5 +171,10 @@ namespace MediaBrowser.Controller.LiveTv
{
return LiveTvManager.DeleteRecording(this);
}
+
+ public override Task OnFileDeleted()
+ {
+ return LiveTvManager.OnRecordingFileDeleted(this);
+ }
}
}
diff --git a/MediaBrowser.Controller/LiveTv/RecordingGroup.cs b/MediaBrowser.Controller/LiveTv/RecordingGroup.cs
index 2d58ef67f7..5c86de08b8 100644
--- a/MediaBrowser.Controller/LiveTv/RecordingGroup.cs
+++ b/MediaBrowser.Controller/LiveTv/RecordingGroup.cs
@@ -1,4 +1,5 @@
-using MediaBrowser.Controller.Entities;
+using System.Runtime.Serialization;
+using MediaBrowser.Controller.Entities;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Users;
@@ -24,5 +25,12 @@ namespace MediaBrowser.Controller.LiveTv
return false;
}
}
+
+ [IgnoreDataMember]
+ public override SourceType SourceType
+ {
+ get { return SourceType.LiveTV; }
+ set { }
+ }
}
}