aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller')
-rw-r--r--MediaBrowser.Controller/Channels/ChannelAudioItem.cs1
-rw-r--r--MediaBrowser.Controller/Channels/ChannelFolderItem.cs1
-rw-r--r--MediaBrowser.Controller/Channels/ChannelVideoItem.cs1
-rw-r--r--MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs9
-rw-r--r--MediaBrowser.Controller/Entities/BaseItem.cs6
-rw-r--r--MediaBrowser.Controller/Entities/IHasId.cs9
-rw-r--r--MediaBrowser.Controller/Entities/IHasImages.cs9
-rw-r--r--MediaBrowser.Controller/Entities/IHasMediaSources.cs9
-rw-r--r--MediaBrowser.Controller/Entities/IHasProgramAttributes.cs19
-rw-r--r--MediaBrowser.Controller/Entities/IHasStartDate.cs9
-rw-r--r--MediaBrowser.Controller/Entities/IHasUserData.cs9
-rw-r--r--MediaBrowser.Controller/Entities/InternalItemsQuery.cs13
-rw-r--r--MediaBrowser.Controller/Library/ILibraryManager.cs8
-rw-r--r--MediaBrowser.Controller/Library/IUserDataManager.cs8
-rw-r--r--MediaBrowser.Controller/LiveTv/ILiveTvItem.cs6
-rw-r--r--MediaBrowser.Controller/LiveTv/ILiveTvManager.cs28
-rw-r--r--MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs20
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs31
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvProgram.cs20
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs31
-rw-r--r--MediaBrowser.Controller/MediaBrowser.Controller.csproj4
-rw-r--r--MediaBrowser.Controller/Persistence/IDisplayPreferencesRepository.cs6
-rw-r--r--MediaBrowser.Controller/Persistence/IItemRepository.cs29
-rw-r--r--MediaBrowser.Controller/Session/ISessionManager.cs4
-rw-r--r--MediaBrowser.Controller/Subtitles/ISubtitleProvider.cs8
-rw-r--r--MediaBrowser.Controller/Sync/ISyncManager.cs2
-rw-r--r--MediaBrowser.Controller/Sync/ISyncRepository.cs2
-rw-r--r--MediaBrowser.Controller/Sync/SyncedItemProgress.cs10
28 files changed, 226 insertions, 86 deletions
diff --git a/MediaBrowser.Controller/Channels/ChannelAudioItem.cs b/MediaBrowser.Controller/Channels/ChannelAudioItem.cs
index 82fe66c7b..aa4b6731c 100644
--- a/MediaBrowser.Controller/Channels/ChannelAudioItem.cs
+++ b/MediaBrowser.Controller/Channels/ChannelAudioItem.cs
@@ -15,7 +15,6 @@ namespace MediaBrowser.Controller.Channels
{
public string ExternalId { get; set; }
- public string ChannelId { get; set; }
public string DataVersion { get; set; }
public ChannelItemType ChannelItemType { get; set; }
diff --git a/MediaBrowser.Controller/Channels/ChannelFolderItem.cs b/MediaBrowser.Controller/Channels/ChannelFolderItem.cs
index 641d37161..7e9da52a9 100644
--- a/MediaBrowser.Controller/Channels/ChannelFolderItem.cs
+++ b/MediaBrowser.Controller/Channels/ChannelFolderItem.cs
@@ -12,7 +12,6 @@ namespace MediaBrowser.Controller.Channels
{
public string ExternalId { get; set; }
- public string ChannelId { get; set; }
public string DataVersion { get; set; }
public ChannelItemType ChannelItemType { get; set; }
diff --git a/MediaBrowser.Controller/Channels/ChannelVideoItem.cs b/MediaBrowser.Controller/Channels/ChannelVideoItem.cs
index ef3cc7cba..ca5e343f8 100644
--- a/MediaBrowser.Controller/Channels/ChannelVideoItem.cs
+++ b/MediaBrowser.Controller/Channels/ChannelVideoItem.cs
@@ -16,7 +16,6 @@ namespace MediaBrowser.Controller.Channels
{
public string ExternalId { get; set; }
- public string ChannelId { get; set; }
public string DataVersion { get; set; }
public ChannelItemType ChannelItemType { get; set; }
diff --git a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs
index c060f53a6..8a77d7616 100644
--- a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs
+++ b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs
@@ -121,6 +121,15 @@ namespace MediaBrowser.Controller.Entities.Audio
.Select(i => i.GetLookupInfo())
.ToList();
+ var album = id.SongInfos
+ .Select(i => i.Album)
+ .FirstOrDefault(i => !string.IsNullOrWhiteSpace(i));
+
+ if (!string.IsNullOrWhiteSpace(album))
+ {
+ id.Name = album;
+ }
+
return id;
}
}
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs
index 8b6cbdc93..014b3ae6a 100644
--- a/MediaBrowser.Controller/Entities/BaseItem.cs
+++ b/MediaBrowser.Controller/Entities/BaseItem.cs
@@ -59,6 +59,12 @@ namespace MediaBrowser.Controller.Entities
public List<ItemImageInfo> ImageInfos { get; set; }
+ /// <summary>
+ /// Gets or sets the channel identifier.
+ /// </summary>
+ /// <value>The channel identifier.</value>
+ public string ChannelId { get; set; }
+
[IgnoreDataMember]
public virtual bool SupportsAddingToPlaylist
{
diff --git a/MediaBrowser.Controller/Entities/IHasId.cs b/MediaBrowser.Controller/Entities/IHasId.cs
new file mode 100644
index 000000000..9698adf7a
--- /dev/null
+++ b/MediaBrowser.Controller/Entities/IHasId.cs
@@ -0,0 +1,9 @@
+using System;
+
+namespace MediaBrowser.Controller.Entities
+{
+ public interface IHasId
+ {
+ Guid Id { get; }
+ }
+}
diff --git a/MediaBrowser.Controller/Entities/IHasImages.cs b/MediaBrowser.Controller/Entities/IHasImages.cs
index 1871d7b68..ffb351c94 100644
--- a/MediaBrowser.Controller/Entities/IHasImages.cs
+++ b/MediaBrowser.Controller/Entities/IHasImages.cs
@@ -1,13 +1,12 @@
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Entities;
-using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Entities
{
- public interface IHasImages : IHasProviderIds
+ public interface IHasImages : IHasProviderIds, IHasId
{
/// <summary>
/// Gets the name.
@@ -28,12 +27,6 @@ namespace MediaBrowser.Controller.Entities
string FileNameWithoutExtension { get; }
/// <summary>
- /// Gets the identifier.
- /// </summary>
- /// <value>The identifier.</value>
- Guid Id { get; }
-
- /// <summary>
/// Gets the type of the location.
/// </summary>
/// <value>The type of the location.</value>
diff --git a/MediaBrowser.Controller/Entities/IHasMediaSources.cs b/MediaBrowser.Controller/Entities/IHasMediaSources.cs
index 17a147806..85ce3c781 100644
--- a/MediaBrowser.Controller/Entities/IHasMediaSources.cs
+++ b/MediaBrowser.Controller/Entities/IHasMediaSources.cs
@@ -1,18 +1,11 @@
using MediaBrowser.Model.Dto;
-using System;
using System.Collections.Generic;
namespace MediaBrowser.Controller.Entities
{
- public interface IHasMediaSources
+ public interface IHasMediaSources : IHasId
{
/// <summary>
- /// Gets the identifier.
- /// </summary>
- /// <value>The identifier.</value>
- Guid Id { get; }
-
- /// <summary>
/// Gets the media sources.
/// </summary>
/// <param name="enablePathSubstitution">if set to <c>true</c> [enable path substitution].</param>
diff --git a/MediaBrowser.Controller/Entities/IHasProgramAttributes.cs b/MediaBrowser.Controller/Entities/IHasProgramAttributes.cs
new file mode 100644
index 000000000..391c8f7a7
--- /dev/null
+++ b/MediaBrowser.Controller/Entities/IHasProgramAttributes.cs
@@ -0,0 +1,19 @@
+using MediaBrowser.Model.LiveTv;
+using System;
+
+namespace MediaBrowser.Controller.Entities
+{
+ public interface IHasProgramAttributes
+ {
+ bool IsMovie { get; set; }
+ bool IsSports { get; set; }
+ bool IsNews { get; set; }
+ bool IsKids { get; set; }
+ bool IsRepeat { get; set; }
+ bool? IsHD { get; set; }
+ bool IsLive { get; set; }
+ bool IsPremiere { get; set; }
+ ProgramAudio? Audio { get; set; }
+ DateTime? OriginalAirDate { get; set; }
+ }
+}
diff --git a/MediaBrowser.Controller/Entities/IHasStartDate.cs b/MediaBrowser.Controller/Entities/IHasStartDate.cs
new file mode 100644
index 000000000..a6714fb96
--- /dev/null
+++ b/MediaBrowser.Controller/Entities/IHasStartDate.cs
@@ -0,0 +1,9 @@
+using System;
+
+namespace MediaBrowser.Controller.Entities
+{
+ public interface IHasStartDate
+ {
+ DateTime StartDate { get; set; }
+ }
+}
diff --git a/MediaBrowser.Controller/Entities/IHasUserData.cs b/MediaBrowser.Controller/Entities/IHasUserData.cs
index d576d90c4..34a820853 100644
--- a/MediaBrowser.Controller/Entities/IHasUserData.cs
+++ b/MediaBrowser.Controller/Entities/IHasUserData.cs
@@ -1,20 +1,13 @@
using MediaBrowser.Model.Dto;
-using System;
namespace MediaBrowser.Controller.Entities
{
/// <summary>
/// Interface IHasUserData
/// </summary>
- public interface IHasUserData
+ public interface IHasUserData : IHasId
{
/// <summary>
- /// Gets or sets the identifier.
- /// </summary>
- /// <value>The identifier.</value>
- Guid Id { get; set; }
-
- /// <summary>
/// Gets the user data key.
/// </summary>
/// <returns>System.String.</returns>
diff --git a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs
index 727f756f1..faa9bc875 100644
--- a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs
+++ b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs
@@ -73,6 +73,18 @@ namespace MediaBrowser.Controller.Entities
public string[] Tags { get; set; }
public string[] OfficialRatings { get; set; }
+ public DateTime? MinStartDate { get; set; }
+ public DateTime? MaxStartDate { get; set; }
+ public DateTime? MinEndDate { get; set; }
+ public DateTime? MaxEndDate { get; set; }
+ public bool? IsAiring { get; set; }
+
+ public bool? IsMovie { get; set; }
+ public bool? IsSports { get; set; }
+ public bool? IsKids { get; set; }
+
+ public string[] ChannelIds { get; set; }
+
public InternalItemsQuery()
{
Tags = new string[] { };
@@ -89,6 +101,7 @@ namespace MediaBrowser.Controller.Entities
Years = new int[] { };
PersonTypes = new string[] { };
PersonIds = new string[] { };
+ ChannelIds = new string[] { };
}
}
}
diff --git a/MediaBrowser.Controller/Library/ILibraryManager.cs b/MediaBrowser.Controller/Library/ILibraryManager.cs
index c00912115..aa8799fa6 100644
--- a/MediaBrowser.Controller/Library/ILibraryManager.cs
+++ b/MediaBrowser.Controller/Library/ILibraryManager.cs
@@ -10,6 +10,7 @@ using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
+using MediaBrowser.Model.Querying;
namespace MediaBrowser.Controller.Library
{
@@ -133,6 +134,13 @@ namespace MediaBrowser.Controller.Library
BaseItem GetItemById(Guid id);
/// <summary>
+ /// Gets the items.
+ /// </summary>
+ /// <param name="query">The query.</param>
+ /// <returns>QueryResult&lt;BaseItem&gt;.</returns>
+ QueryResult<BaseItem> GetItems(InternalItemsQuery query);
+
+ /// <summary>
/// Gets the memory item by identifier.
/// </summary>
/// <param name="id">The identifier.</param>
diff --git a/MediaBrowser.Controller/Library/IUserDataManager.cs b/MediaBrowser.Controller/Library/IUserDataManager.cs
index f230f1472..56ac14e9d 100644
--- a/MediaBrowser.Controller/Library/IUserDataManager.cs
+++ b/MediaBrowser.Controller/Library/IUserDataManager.cs
@@ -35,6 +35,14 @@ namespace MediaBrowser.Controller.Library
/// <param name="userId">The user id.</param>
/// <param name="key">The key.</param>
/// <returns>Task{UserItemData}.</returns>
+ UserItemData GetUserData(string userId, string key);
+
+ /// <summary>
+ /// Gets the user data.
+ /// </summary>
+ /// <param name="userId">The user id.</param>
+ /// <param name="key">The key.</param>
+ /// <returns>Task{UserItemData}.</returns>
UserItemData GetUserData(Guid userId, string key);
/// <summary>
diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvItem.cs b/MediaBrowser.Controller/LiveTv/ILiveTvItem.cs
index 6c277a2e1..36727f4ae 100644
--- a/MediaBrowser.Controller/LiveTv/ILiveTvItem.cs
+++ b/MediaBrowser.Controller/LiveTv/ILiveTvItem.cs
@@ -1,10 +1,10 @@
-using System;
+using MediaBrowser.Controller.Entities;
namespace MediaBrowser.Controller.LiveTv
{
- public interface ILiveTvItem
+ public interface ILiveTvItem : IHasId
{
- Guid Id { get; }
string ServiceName { get; set; }
+ string ExternalId { get; set; }
}
}
diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
index 53eb18e7a..3aa1f66ef 100644
--- a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
+++ b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
@@ -79,7 +79,7 @@ namespace MediaBrowser.Controller.LiveTv
/// <param name="cancellationToken">The cancellation token.</param>
/// <param name="user">The user.</param>
/// <returns>Task{RecordingInfoDto}.</returns>
- Task<RecordingInfoDto> GetRecording(string id, DtoOptions options, CancellationToken cancellationToken, User user = null);
+ Task<BaseItemDto> GetRecording(string id, DtoOptions options, CancellationToken cancellationToken, User user = null);
/// <summary>
/// Gets the channel.
@@ -113,7 +113,7 @@ namespace MediaBrowser.Controller.LiveTv
/// <param name="options">The options.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>QueryResult{RecordingInfoDto}.</returns>
- Task<QueryResult<RecordingInfoDto>> GetRecordings(RecordingQuery query, DtoOptions options, CancellationToken cancellationToken);
+ Task<QueryResult<BaseItemDto>> GetRecordings(RecordingQuery query, DtoOptions options, CancellationToken cancellationToken);
/// <summary>
/// Gets the timers.
@@ -170,7 +170,7 @@ namespace MediaBrowser.Controller.LiveTv
/// <param name="cancellationToken">The cancellation token.</param>
/// <param name="user">The user.</param>
/// <returns>Task{ProgramInfoDto}.</returns>
- Task<ProgramInfoDto> GetProgram(string id, CancellationToken cancellationToken, User user = null);
+ Task<BaseItemDto> GetProgram(string id, CancellationToken cancellationToken, User user = null);
/// <summary>
/// Gets the programs.
@@ -178,7 +178,7 @@ namespace MediaBrowser.Controller.LiveTv
/// <param name="query">The query.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>IEnumerable{ProgramInfo}.</returns>
- Task<QueryResult<ProgramInfoDto>> GetPrograms(ProgramQuery query, CancellationToken cancellationToken);
+ Task<QueryResult<BaseItemDto>> GetPrograms(ProgramQuery query, CancellationToken cancellationToken);
/// <summary>
/// Updates the timer.
@@ -218,7 +218,7 @@ namespace MediaBrowser.Controller.LiveTv
/// <param name="query">The query.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{QueryResult{RecordingGroupDto}}.</returns>
- Task<QueryResult<RecordingGroupDto>> GetRecordingGroups(RecordingGroupQuery query, CancellationToken cancellationToken);
+ Task<QueryResult<BaseItemDto>> GetRecordingGroups(RecordingGroupQuery query, CancellationToken cancellationToken);
/// <summary>
/// Closes the live stream.
@@ -240,7 +240,7 @@ namespace MediaBrowser.Controller.LiveTv
/// <param name="query">The query.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{QueryResult{ProgramInfoDto}}.</returns>
- Task<QueryResult<ProgramInfoDto>> GetRecommendedPrograms(RecommendedProgramQuery query,
+ Task<QueryResult<BaseItemDto>> GetRecommendedPrograms(RecommendedProgramQuery query,
CancellationToken cancellationToken);
/// <summary>
@@ -321,5 +321,21 @@ namespace MediaBrowser.Controller.LiveTv
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task&lt;IEnumerable&lt;MediaSourceInfo&gt;&gt;.</returns>
Task<IEnumerable<MediaSourceInfo>> GetChannelMediaSources(string id, CancellationToken cancellationToken);
+
+ /// <summary>
+ /// Adds the information to recording dto.
+ /// </summary>
+ /// <param name="item">The item.</param>
+ /// <param name="dto">The dto.</param>
+ /// <param name="user">The user.</param>
+ void AddInfoToRecordingDto(BaseItem item, BaseItemDto dto, User user = null);
+
+ /// <summary>
+ /// Adds the information to program dto.
+ /// </summary>
+ /// <param name="item">The item.</param>
+ /// <param name="dto">The dto.</param>
+ /// <param name="user">The user.</param>
+ void AddInfoToProgramDto(BaseItem item, BaseItemDto dto, User user = null);
}
}
diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs b/MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs
index 93e1e576a..1dd267c93 100644
--- a/MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs
+++ b/MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs
@@ -2,19 +2,21 @@
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Library;
+using MediaBrowser.Model.LiveTv;
+using System;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.LiveTv
{
- public interface ILiveTvRecording : IHasImages, IHasMediaSources, IHasUserData, ILiveTvItem
+ public interface ILiveTvRecording : IHasImages, IHasMediaSources, IHasUserData, ILiveTvItem, IHasStartDate, IHasProgramAttributes
{
+ string ChannelId { get; }
+ string ProgramId { get; set; }
string MediaType { get; }
string Container { get; }
- RecordingInfo RecordingInfo { get; set; }
-
long? RunTimeTicks { get; set; }
string GetClientTypeName();
@@ -28,5 +30,17 @@ namespace MediaBrowser.Controller.LiveTv
bool CanDelete();
bool CanDelete(User user);
+
+ string ProviderImagePath { get; set; }
+
+ string ProviderImageUrl { get; set; }
+
+ string ExternalId { get; set; }
+ string EpisodeTitle { get; set; }
+ bool IsSeries { get; set; }
+ string SeriesTimerId { get; set; }
+ RecordingStatus Status { get; set; }
+ DateTime? EndDate { get; set; }
+ ChannelType ChannelType { get; set; }
}
}
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs
index 0dc296d5a..3da12cd80 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs
@@ -3,7 +3,9 @@ using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
+using MediaBrowser.Model.LiveTv;
using MediaBrowser.Model.Users;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
@@ -12,6 +14,27 @@ namespace MediaBrowser.Controller.LiveTv
{
public class LiveTvAudioRecording : Audio, ILiveTvRecording
{
+ public string ExternalId { get; set; }
+ public string ProviderImagePath { get; set; }
+ public string ProviderImageUrl { get; set; }
+ public string EpisodeTitle { get; set; }
+ public bool IsSeries { get; set; }
+ public string SeriesTimerId { get; set; }
+ public DateTime StartDate { get; set; }
+ public RecordingStatus Status { get; set; }
+ public bool IsSports { get; set; }
+ public bool IsNews { get; set; }
+ public bool IsKids { get; set; }
+ public bool IsRepeat { get; set; }
+ public bool IsMovie { get; set; }
+ public bool? IsHD { get; set; }
+ public bool IsLive { get; set; }
+ public bool IsPremiere { get; set; }
+ public ChannelType ChannelType { get; set; }
+ public string ProgramId { get; set; }
+ public ProgramAudio? Audio { get; set; }
+ public DateTime? OriginalAirDate { get; set; }
+
/// <summary>
/// Gets the user data key.
/// </summary>
@@ -20,16 +43,14 @@ namespace MediaBrowser.Controller.LiveTv
{
var name = GetClientTypeName();
- if (!string.IsNullOrEmpty(RecordingInfo.ProgramId))
+ if (!string.IsNullOrEmpty(ProgramId))
{
- return name + "-" + RecordingInfo.ProgramId;
+ return name + "-" + ProgramId;
}
- return name + "-" + RecordingInfo.Name + (RecordingInfo.EpisodeTitle ?? string.Empty);
+ return name + "-" + Name + (EpisodeTitle ?? string.Empty);
}
- public RecordingInfo RecordingInfo { get; set; }
-
public string ServiceName { get; set; }
/// <summary>
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
index 0609df4c6..8232c5c7a 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
@@ -1,5 +1,4 @@
using MediaBrowser.Controller.Entities;
-using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.LiveTv;
@@ -7,12 +6,10 @@ using MediaBrowser.Model.Users;
using System;
using System.Linq;
using System.Runtime.Serialization;
-using System.Threading;
-using System.Threading.Tasks;
namespace MediaBrowser.Controller.LiveTv
{
- public class LiveTvProgram : BaseItem, ILiveTvItem, IHasLookupInfo<LiveTvProgramLookupInfo>
+ public class LiveTvProgram : BaseItem, ILiveTvItem, IHasLookupInfo<LiveTvProgramLookupInfo>, IHasStartDate, IHasProgramAttributes
{
/// <summary>
/// Gets the user data key.
@@ -29,12 +26,6 @@ namespace MediaBrowser.Controller.LiveTv
public string ExternalId { get; set; }
/// <summary>
- /// Gets or sets the channel identifier.
- /// </summary>
- /// <value>The channel identifier.</value>
- public string ExternalChannelId { get; set; }
-
- /// <summary>
/// Gets or sets the original air date.
/// </summary>
/// <value>The original air date.</value>
@@ -204,15 +195,6 @@ namespace MediaBrowser.Controller.LiveTv
return "Program";
}
- public override Task UpdateToRepository(ItemUpdateType updateReason, CancellationToken cancellationToken)
- {
- DateLastSaved = DateTime.UtcNow;
-
- // Avoid library manager and keep out of in-memory cache
- // Not great that this class has to know about that, but we'll improve that later.
- return ItemRepository.SaveItem(this, cancellationToken);
- }
-
protected override bool GetBlockUnratedValue(UserPolicy config)
{
return config.BlockUnratedItems.Contains(UnratedItem.LiveTvProgram);
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
index 3669f9440..179c33d09 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
@@ -2,7 +2,9 @@
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
+using MediaBrowser.Model.LiveTv;
using MediaBrowser.Model.Users;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
@@ -11,6 +13,27 @@ namespace MediaBrowser.Controller.LiveTv
{
public class LiveTvVideoRecording : Video, ILiveTvRecording
{
+ public string ExternalId { get; set; }
+ public string ProviderImagePath { get; set; }
+ public string ProviderImageUrl { get; set; }
+ public string EpisodeTitle { get; set; }
+ public bool IsSeries { get; set; }
+ public string SeriesTimerId { get; set; }
+ public DateTime StartDate { get; set; }
+ public RecordingStatus Status { get; set; }
+ public bool IsSports { get; set; }
+ public bool IsNews { get; set; }
+ public bool IsKids { get; set; }
+ public bool IsRepeat { get; set; }
+ public bool IsMovie { get; set; }
+ public bool? IsHD { get; set; }
+ public bool IsLive { get; set; }
+ public bool IsPremiere { get; set; }
+ public ChannelType ChannelType { get; set; }
+ public string ProgramId { get; set; }
+ public ProgramAudio? Audio { get; set; }
+ public DateTime? OriginalAirDate { get; set; }
+
/// <summary>
/// Gets the user data key.
/// </summary>
@@ -19,16 +42,14 @@ namespace MediaBrowser.Controller.LiveTv
{
var name = GetClientTypeName();
- if (!string.IsNullOrEmpty(RecordingInfo.ProgramId))
+ if (!string.IsNullOrEmpty(ProgramId))
{
- return name + "-" + RecordingInfo.ProgramId;
+ return name + "-" + ProgramId;
}
- return name + "-" + RecordingInfo.Name + (RecordingInfo.EpisodeTitle ?? string.Empty);
+ return name + "-" + Name + (EpisodeTitle ?? string.Empty);
}
- public RecordingInfo RecordingInfo { get; set; }
-
public string ServiceName { get; set; }
[IgnoreDataMember]
diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj
index b66e6b9c8..bf86c049f 100644
--- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj
+++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj
@@ -142,6 +142,7 @@
<Compile Include="Entities\IHasBudget.cs" />
<Compile Include="Entities\IHasCriticRating.cs" />
<Compile Include="Entities\IHasDisplayOrder.cs" />
+ <Compile Include="Entities\IHasId.cs" />
<Compile Include="Entities\IHasImages.cs" />
<Compile Include="Entities\IHasKeywords.cs" />
<Compile Include="Entities\IHasMediaSources.cs" />
@@ -149,10 +150,12 @@
<Compile Include="Entities\IHasOriginalTitle.cs" />
<Compile Include="Entities\IHasPreferredMetadataLanguage.cs" />
<Compile Include="Entities\IHasProductionLocations.cs" />
+ <Compile Include="Entities\IHasProgramAttributes.cs" />
<Compile Include="Entities\IHasScreenshots.cs" />
<Compile Include="Entities\IHasSeries.cs" />
<Compile Include="Entities\IHasShortOverview.cs" />
<Compile Include="Entities\IHasSpecialFeatures.cs" />
+ <Compile Include="Entities\IHasStartDate.cs" />
<Compile Include="Entities\IHasTaglines.cs" />
<Compile Include="Entities\IHasTags.cs" />
<Compile Include="Entities\IHasThemeMedia.cs" />
@@ -408,6 +411,7 @@
<Compile Include="Sync\ISyncProvider.cs" />
<Compile Include="Sync\ISyncRepository.cs" />
<Compile Include="Sync\SyncedFileInfo.cs" />
+ <Compile Include="Sync\SyncedItemProgress.cs" />
<Compile Include="Themes\IAppThemeManager.cs" />
<Compile Include="Themes\InternalThemeImage.cs" />
<Compile Include="TV\ITVSeriesManager.cs" />
diff --git a/MediaBrowser.Controller/Persistence/IDisplayPreferencesRepository.cs b/MediaBrowser.Controller/Persistence/IDisplayPreferencesRepository.cs
index 66fac3462..17de730cb 100644
--- a/MediaBrowser.Controller/Persistence/IDisplayPreferencesRepository.cs
+++ b/MediaBrowser.Controller/Persistence/IDisplayPreferencesRepository.cs
@@ -25,9 +25,9 @@ namespace MediaBrowser.Controller.Persistence
/// <param name="client">The client.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
- Task SaveDisplayPreferences(DisplayPreferences displayPreferences, Guid userId, string client,
+ Task SaveDisplayPreferences(DisplayPreferences displayPreferences, string userId, string client,
CancellationToken cancellationToken);
-
+
/// <summary>
/// Saves all display preferences for a user
/// </summary>
@@ -44,7 +44,7 @@ namespace MediaBrowser.Controller.Persistence
/// <param name="userId">The user id.</param>
/// <param name="client">The client.</param>
/// <returns>Task{DisplayPreferences}.</returns>
- DisplayPreferences GetDisplayPreferences(string displayPreferencesId, Guid userId, string client);
+ DisplayPreferences GetDisplayPreferences(string displayPreferencesId, string userId, string client);
/// <summary>
/// Gets all display preferences for the given user.
diff --git a/MediaBrowser.Controller/Persistence/IItemRepository.cs b/MediaBrowser.Controller/Persistence/IItemRepository.cs
index aa5376ec3..7c02a0ea1 100644
--- a/MediaBrowser.Controller/Persistence/IItemRepository.cs
+++ b/MediaBrowser.Controller/Persistence/IItemRepository.cs
@@ -4,6 +4,7 @@ using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
+using MediaBrowser.Model.Querying;
namespace MediaBrowser.Controller.Persistence
{
@@ -103,13 +104,6 @@ namespace MediaBrowser.Controller.Persistence
IEnumerable<Guid> GetChildren(Guid parentId);
/// <summary>
- /// Gets the type of the items of.
- /// </summary>
- /// <param name="type">The type.</param>
- /// <returns>IEnumerable{Guid}.</returns>
- IEnumerable<Guid> GetItemIdsOfType(Type type);
-
- /// <summary>
/// Saves the children.
/// </summary>
/// <param name="parentId">The parent id.</param>
@@ -135,11 +129,24 @@ namespace MediaBrowser.Controller.Persistence
Task SaveMediaStreams(Guid id, IEnumerable<MediaStream> streams, CancellationToken cancellationToken);
/// <summary>
- /// Gets the type of the items of.
+ /// Gets the item ids.
/// </summary>
- /// <param name="type">The type.</param>
- /// <returns>IEnumerable&lt;BaseItem&gt;.</returns>
- IEnumerable<BaseItem> GetItemsOfType(Type type);
+ /// <param name="query">The query.</param>
+ /// <returns>IEnumerable&lt;Guid&gt;.</returns>
+ QueryResult<Guid> GetItemIds(InternalItemsQuery query);
+ /// <summary>
+ /// Gets the items.
+ /// </summary>
+ /// <param name="query">The query.</param>
+ /// <returns>QueryResult&lt;BaseItem&gt;.</returns>
+ QueryResult<BaseItem> GetItems(InternalItemsQuery query);
+
+ /// <summary>
+ /// Gets the item ids list.
+ /// </summary>
+ /// <param name="query">The query.</param>
+ /// <returns>List&lt;Guid&gt;.</returns>
+ List<Guid> GetItemIdsList(InternalItemsQuery query);
}
}
diff --git a/MediaBrowser.Controller/Session/ISessionManager.cs b/MediaBrowser.Controller/Session/ISessionManager.cs
index 80025171d..dc9612c84 100644
--- a/MediaBrowser.Controller/Session/ISessionManager.cs
+++ b/MediaBrowser.Controller/Session/ISessionManager.cs
@@ -220,14 +220,14 @@ namespace MediaBrowser.Controller.Session
/// </summary>
/// <param name="sessionId">The session identifier.</param>
/// <param name="userId">The user identifier.</param>
- void AddAdditionalUser(string sessionId, Guid userId);
+ void AddAdditionalUser(string sessionId, string userId);
/// <summary>
/// Removes the additional user.
/// </summary>
/// <param name="sessionId">The session identifier.</param>
/// <param name="userId">The user identifier.</param>
- void RemoveAdditionalUser(string sessionId, Guid userId);
+ void RemoveAdditionalUser(string sessionId, string userId);
/// <summary>
/// Reports the now viewing item.
diff --git a/MediaBrowser.Controller/Subtitles/ISubtitleProvider.cs b/MediaBrowser.Controller/Subtitles/ISubtitleProvider.cs
index dceea0cc6..5cb106fec 100644
--- a/MediaBrowser.Controller/Subtitles/ISubtitleProvider.cs
+++ b/MediaBrowser.Controller/Subtitles/ISubtitleProvider.cs
@@ -1,4 +1,5 @@
using MediaBrowser.Controller.Providers;
+using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Providers;
using System.Collections.Generic;
using System.Threading;
@@ -35,5 +36,12 @@ namespace MediaBrowser.Controller.Subtitles
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{SubtitleResponse}.</returns>
Task<SubtitleResponse> GetSubtitles(string id, CancellationToken cancellationToken);
+
+ /// <summary>
+ /// Gets the supported languages.
+ /// </summary>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>Task&lt;IEnumerable&lt;NameIdPair&gt;&gt;.</returns>
+ Task<IEnumerable<NameIdPair>> GetSupportedLanguages(CancellationToken cancellationToken);
}
}
diff --git a/MediaBrowser.Controller/Sync/ISyncManager.cs b/MediaBrowser.Controller/Sync/ISyncManager.cs
index 97591551c..fd373050f 100644
--- a/MediaBrowser.Controller/Sync/ISyncManager.cs
+++ b/MediaBrowser.Controller/Sync/ISyncManager.cs
@@ -152,7 +152,7 @@ namespace MediaBrowser.Controller.Sync
/// </summary>
/// <param name="query">The query.</param>
/// <returns>QueryResult&lt;System.String&gt;.</returns>
- QueryResult<string> GetLibraryItemIds(SyncJobItemQuery query);
+ QueryResult<SyncedItemProgress> GetSyncedItemProgresses(SyncJobItemQuery query);
/// <summary>
/// Reports the synchronize job item transfer beginning.
diff --git a/MediaBrowser.Controller/Sync/ISyncRepository.cs b/MediaBrowser.Controller/Sync/ISyncRepository.cs
index 315f5f541..2af09dbaa 100644
--- a/MediaBrowser.Controller/Sync/ISyncRepository.cs
+++ b/MediaBrowser.Controller/Sync/ISyncRepository.cs
@@ -74,6 +74,6 @@ namespace MediaBrowser.Controller.Sync
/// </summary>
/// <param name="query">The query.</param>
/// <returns>QueryResult&lt;System.String&gt;.</returns>
- QueryResult<string> GetLibraryItemIds(SyncJobItemQuery query);
+ QueryResult<SyncedItemProgress> GetSyncedItemProgresses(SyncJobItemQuery query);
}
}
diff --git a/MediaBrowser.Controller/Sync/SyncedItemProgress.cs b/MediaBrowser.Controller/Sync/SyncedItemProgress.cs
new file mode 100644
index 000000000..edb42eb0f
--- /dev/null
+++ b/MediaBrowser.Controller/Sync/SyncedItemProgress.cs
@@ -0,0 +1,10 @@
+using MediaBrowser.Model.Sync;
+
+namespace MediaBrowser.Controller.Sync
+{
+ public class SyncedItemProgress
+ {
+ public string ItemId { get; set; }
+ public SyncJobItemStatus Status { get; set; }
+ }
+}