From 933fca78e65c146b3cf16eefce6410b21e18cdbe Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 12 Apr 2015 14:58:21 -0400 Subject: support sync for live tv recordings --- MediaBrowser.Model/Dto/BaseItemDto.cs | 8 +++++++- MediaBrowser.Model/Dto/IHasSyncInfo.cs | 13 +++++++++++++ MediaBrowser.Model/LiveTv/RecordingInfoDto.cs | 24 +++++++++++++++++++++++- MediaBrowser.Model/MediaBrowser.Model.csproj | 1 + 4 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 MediaBrowser.Model/Dto/IHasSyncInfo.cs (limited to 'MediaBrowser.Model') diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs index d984fe89e5..6b223ea069 100644 --- a/MediaBrowser.Model/Dto/BaseItemDto.cs +++ b/MediaBrowser.Model/Dto/BaseItemDto.cs @@ -3,6 +3,7 @@ using MediaBrowser.Model.Entities; using MediaBrowser.Model.Extensions; using MediaBrowser.Model.Library; using MediaBrowser.Model.Providers; +using MediaBrowser.Model.Sync; using System; using System.Collections.Generic; using System.ComponentModel; @@ -16,7 +17,7 @@ namespace MediaBrowser.Model.Dto /// This holds information about a BaseItem in a format that is convenient for the client. /// [DebuggerDisplay("Name = {Name}, ID = {Id}, Type = {Type}")] - public class BaseItemDto : IHasProviderIds, IHasPropertyChangedEvent, IItemDto, IHasServerId + public class BaseItemDto : IHasProviderIds, IHasPropertyChangedEvent, IItemDto, IHasServerId, IHasSyncInfo { /// /// Gets or sets the name. @@ -87,6 +88,11 @@ namespace MediaBrowser.Model.Dto /// /// null if [is synced] contains no value, true if [is synced]; otherwise, false. public bool? IsSynced { get; set; } + /// + /// Gets or sets the synchronize status. + /// + /// The synchronize status. + public SyncJobItemStatus? SyncStatus { get; set; } /// /// Gets or sets the DVD season number. diff --git a/MediaBrowser.Model/Dto/IHasSyncInfo.cs b/MediaBrowser.Model/Dto/IHasSyncInfo.cs new file mode 100644 index 0000000000..d2cf1f8cfe --- /dev/null +++ b/MediaBrowser.Model/Dto/IHasSyncInfo.cs @@ -0,0 +1,13 @@ +using MediaBrowser.Model.Sync; + +namespace MediaBrowser.Model.Dto +{ + public interface IHasSyncInfo + { + string Id { get; } + bool? SupportsSync { get; set; } + bool? HasSyncJob { get; set; } + bool? IsSynced { get; set; } + SyncJobItemStatus? SyncStatus { get; set; } + } +} diff --git a/MediaBrowser.Model/LiveTv/RecordingInfoDto.cs b/MediaBrowser.Model/LiveTv/RecordingInfoDto.cs index d6d6980381..0988b11a6e 100644 --- a/MediaBrowser.Model/LiveTv/RecordingInfoDto.cs +++ b/MediaBrowser.Model/LiveTv/RecordingInfoDto.cs @@ -2,6 +2,7 @@ using MediaBrowser.Model.Entities; using MediaBrowser.Model.Extensions; using MediaBrowser.Model.Library; +using MediaBrowser.Model.Sync; using System; using System.Collections.Generic; using System.ComponentModel; @@ -11,7 +12,7 @@ using System.Runtime.Serialization; namespace MediaBrowser.Model.LiveTv { [DebuggerDisplay("Name = {Name}, ChannelName = {ChannelName}")] - public class RecordingInfoDto : IHasPropertyChangedEvent, IItemDto, IHasServerId + public class RecordingInfoDto : IHasPropertyChangedEvent, IItemDto, IHasServerId, IHasSyncInfo { /// /// Id of the recording. @@ -35,6 +36,27 @@ namespace MediaBrowser.Model.LiveTv /// /// The original primary image aspect ratio. public double? OriginalPrimaryImageAspectRatio { get; set; } + + /// + /// Gets or sets a value indicating whether [supports synchronize]. + /// + /// null if [supports synchronize] contains no value, true if [supports synchronize]; otherwise, false. + public bool? SupportsSync { get; set; } + /// + /// Gets or sets a value indicating whether this instance has synchronize job. + /// + /// null if [has synchronize job] contains no value, true if [has synchronize job]; otherwise, false. + public bool? HasSyncJob { get; set; } + /// + /// Gets or sets a value indicating whether this instance is synced. + /// + /// null if [is synced] contains no value, true if [is synced]; otherwise, false. + public bool? IsSynced { get; set; } + /// + /// Gets or sets the synchronize status. + /// + /// The synchronize status. + public SyncJobItemStatus? SyncStatus { get; set; } /// /// Gets or sets the series timer identifier. diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj index 2a210b7a2f..eb36712c2f 100644 --- a/MediaBrowser.Model/MediaBrowser.Model.csproj +++ b/MediaBrowser.Model/MediaBrowser.Model.csproj @@ -138,6 +138,7 @@ + -- cgit v1.2.3