diff options
Diffstat (limited to 'MediaBrowser.Model')
| -rw-r--r-- | MediaBrowser.Model/ApiClient/IApiClient.cs | 90 | ||||
| -rw-r--r-- | MediaBrowser.Model/Configuration/AutoOrganize.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Model/Configuration/DlnaOptions.cs | 8 | ||||
| -rw-r--r-- | MediaBrowser.Model/Configuration/ServerConfiguration.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/RecommendationDto.cs | 29 | ||||
| -rw-r--r-- | MediaBrowser.Model/Entities/BaseItemInfo.cs | 24 | ||||
| -rw-r--r-- | MediaBrowser.Model/MediaBrowser.Model.csproj | 2 | ||||
| -rw-r--r-- | MediaBrowser.Model/Querying/ItemQuery.cs | 12 | ||||
| -rw-r--r-- | MediaBrowser.Model/Querying/ItemSortBy.cs | 10 | ||||
| -rw-r--r-- | MediaBrowser.Model/Querying/ItemsByNameQuery.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Model/Querying/NextUpQuery.cs | 28 | ||||
| -rw-r--r-- | MediaBrowser.Model/Search/SearchQuery.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Model/Session/BrowseRequest.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Model/Session/MessageCommand.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Model/Session/PlayRequest.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Model/Session/PlaystateCommand.cs | 2 |
16 files changed, 208 insertions, 23 deletions
diff --git a/MediaBrowser.Model/ApiClient/IApiClient.cs b/MediaBrowser.Model/ApiClient/IApiClient.cs index d4d2a8124..46d3dcc3f 100644 --- a/MediaBrowser.Model/ApiClient/IApiClient.cs +++ b/MediaBrowser.Model/ApiClient/IApiClient.cs @@ -244,7 +244,7 @@ namespace MediaBrowser.Model.ApiClient /// <param name="query">The query.</param> /// <returns>Task{ItemsResult}.</returns> Task<ItemsResult> GetSeasonsAsync(SeasonQuery query); - + /// <summary> /// Queries for items /// </summary> @@ -346,7 +346,14 @@ namespace MediaBrowser.Model.ApiClient /// </summary> /// <param name="query">The query.</param> /// <returns>Task{ItemsResult}.</returns> - Task<ItemsResult> GetNextUpAsync(NextUpQuery query); + Task<ItemsResult> GetNextUpEpisodesAsync(NextUpQuery query); + + /// <summary> + /// Gets the upcoming episodes asynchronous. + /// </summary> + /// <param name="query">The query.</param> + /// <returns>Task{ItemsResult}.</returns> + Task<ItemsResult> GetUpcomingEpisodesAsync(NextUpQuery query); /// <summary> /// Gets a genre @@ -772,7 +779,7 @@ namespace MediaBrowser.Model.ApiClient /// <param name="options">The options.</param> /// <returns>System.String.</returns> string GetImageUrl(ProgramInfoDto item, ImageOptions options); - + /// <summary> /// Gets an image url that can be used to download an image from the api /// </summary> @@ -902,7 +909,7 @@ namespace MediaBrowser.Model.ApiClient /// <param name="options">The options.</param> /// <returns>System.String.</returns> string GetThumbImageUrl(BaseItemDto item, ImageOptions options); - + /// <summary> /// Gets the url needed to stream an audio file /// </summary> @@ -958,7 +965,7 @@ namespace MediaBrowser.Model.ApiClient /// <param name="cancellationToken">The cancellation token.</param> /// <returns>Task{ChannelInfoDto}.</returns> Task<ChannelInfoDto> GetLiveTvChannelAsync(string id, string userId, CancellationToken cancellationToken); - + /// <summary> /// Gets the live tv recordings asynchronous. /// </summary> @@ -975,7 +982,7 @@ namespace MediaBrowser.Model.ApiClient /// <param name="cancellationToken">The cancellation token.</param> /// <returns>Task{RecordingInfoDto}.</returns> Task<RecordingInfoDto> GetLiveTvRecordingAsync(string id, string userId, CancellationToken cancellationToken); - + /// <summary> /// Gets the live tv recording groups asynchronous. /// </summary> @@ -992,7 +999,7 @@ namespace MediaBrowser.Model.ApiClient /// <param name="cancellationToken">The cancellation token.</param> /// <returns>Task{RecordingGroupDto}.</returns> Task<RecordingGroupDto> GetLiveTvRecordingGroupAsync(string id, string userId, CancellationToken cancellationToken); - + /// <summary> /// Gets the live tv timers asynchronous. /// </summary> @@ -1010,13 +1017,54 @@ namespace MediaBrowser.Model.ApiClient Task<QueryResult<ProgramInfoDto>> GetLiveTvProgramsAsync(ProgramQuery query, CancellationToken cancellationToken); /// <summary> + /// Gets the live tv program asynchronous. + /// </summary> + /// <param name="id">The identifier.</param> + /// <param name="userId">The user identifier.</param> + /// <param name="cancellationToken">The cancellation token.</param> + /// <returns>Task{ProgramInfoDto}.</returns> + Task<ProgramInfoDto> GetLiveTvProgramAsync(string id, string userId, CancellationToken cancellationToken); + + /// <summary> /// Gets the recommended live tv programs asynchronous. /// </summary> /// <param name="query">The query.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns>Task{QueryResult{ProgramInfoDto}}.</returns> Task<QueryResult<ProgramInfoDto>> GetRecommendedLiveTvProgramsAsync(RecommendedProgramQuery query, CancellationToken cancellationToken); - + + /// <summary> + /// Creates the live tv timer asynchronous. + /// </summary> + /// <param name="timer">The timer.</param> + /// <param name="cancellationToken">The cancellation token.</param> + /// <returns>Task.</returns> + Task CreateLiveTvTimerAsync(TimerInfoDto timer, CancellationToken cancellationToken); + + /// <summary> + /// Updates the live tv timer asynchronous. + /// </summary> + /// <param name="timer">The timer.</param> + /// <param name="cancellationToken">The cancellation token.</param> + /// <returns>Task.</returns> + Task UpdateLiveTvTimerAsync(TimerInfoDto timer, CancellationToken cancellationToken); + + /// <summary> + /// Creates the live tv series timer asynchronous. + /// </summary> + /// <param name="timer">The timer.</param> + /// <param name="cancellationToken">The cancellation token.</param> + /// <returns>Task.</returns> + Task CreateLiveTvSeriesTimerAsync(SeriesTimerInfoDto timer, CancellationToken cancellationToken); + + /// <summary> + /// Updates the live tv series timer asynchronous. + /// </summary> + /// <param name="timer">The timer.</param> + /// <param name="cancellationToken">The cancellation token.</param> + /// <returns>Task.</returns> + Task UpdateLiveTvSeriesTimerAsync(SeriesTimerInfoDto timer, CancellationToken cancellationToken); + /// <summary> /// Gets the live tv timer asynchronous. /// </summary> @@ -1024,7 +1072,7 @@ namespace MediaBrowser.Model.ApiClient /// <param name="cancellationToken">The cancellation token.</param> /// <returns>Task{TimerInfoDto}.</returns> Task<TimerInfoDto> GetLiveTvTimerAsync(string id, CancellationToken cancellationToken); - + /// <summary> /// Gets the live tv series timers asynchronous. /// </summary> @@ -1056,7 +1104,7 @@ namespace MediaBrowser.Model.ApiClient /// <param name="cancellationToken">The cancellation token.</param> /// <returns>Task.</returns> Task CancelLiveTvSeriesTimerAsync(string id, CancellationToken cancellationToken); - + /// <summary> /// Deletes the live tv recording asynchronous. /// </summary> @@ -1064,5 +1112,27 @@ namespace MediaBrowser.Model.ApiClient /// <param name="cancellationToken">The cancellation token.</param> /// <returns>Task.</returns> Task DeleteLiveTvRecordingAsync(string id, CancellationToken cancellationToken); + + /// <summary> + /// Gets the default timer information. + /// </summary> + /// <param name="cancellationToken">The cancellation token.</param> + /// <returns>Task{SeriesTimerInfoDto}.</returns> + Task<SeriesTimerInfoDto> GetDefaultLiveTvTimerInfo(CancellationToken cancellationToken); + + /// <summary> + /// Gets the live tv guide information. + /// </summary> + /// <param name="cancellationToken">The cancellation token.</param> + /// <returns>Task{GuideInfo}.</returns> + Task<GuideInfo> GetLiveTvGuideInfo(CancellationToken cancellationToken); + + /// <summary> + /// Gets the default timer information. + /// </summary> + /// <param name="programId">The program identifier.</param> + /// <param name="cancellationToken">The cancellation token.</param> + /// <returns>Task{SeriesTimerInfoDto}.</returns> + Task<SeriesTimerInfoDto> GetDefaultLiveTvTimerInfo(string programId, CancellationToken cancellationToken); } }
\ No newline at end of file diff --git a/MediaBrowser.Model/Configuration/AutoOrganize.cs b/MediaBrowser.Model/Configuration/AutoOrganize.cs index a30aa36d8..fe32d4a80 100644 --- a/MediaBrowser.Model/Configuration/AutoOrganize.cs +++ b/MediaBrowser.Model/Configuration/AutoOrganize.cs @@ -19,6 +19,8 @@ namespace MediaBrowser.Model.Configuration public bool DeleteEmptyFolders { get; set; } + public bool CopyOriginalFile { get; set; } + public TvFileOrganizationOptions() { MinFileSizeMb = 50; @@ -31,6 +33,8 @@ namespace MediaBrowser.Model.Configuration MultiEpisodeNamePattern = "%sn - %sx%0e-x%0ed - %en.%ext"; SeasonFolderPattern = "Season %s"; SeasonZeroFolderName = "Season 0"; + + CopyOriginalFile = false; } } } diff --git a/MediaBrowser.Model/Configuration/DlnaOptions.cs b/MediaBrowser.Model/Configuration/DlnaOptions.cs new file mode 100644 index 000000000..e6c24fdfb --- /dev/null +++ b/MediaBrowser.Model/Configuration/DlnaOptions.cs @@ -0,0 +1,8 @@ + +namespace MediaBrowser.Model.Configuration +{ + public class DlnaOptions + { + public bool EnablePlayTo { get; set; } + } +} diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs index 0bff8a1bd..c2765754e 100644 --- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs +++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs @@ -212,6 +212,8 @@ namespace MediaBrowser.Model.Configuration public string ServerName { get; set; } public string WanDdns { get; set; } + public DlnaOptions DlnaOptions { get; set; } + /// <summary> /// Initializes a new instance of the <see cref="ServerConfiguration" /> class. /// </summary> @@ -271,6 +273,8 @@ namespace MediaBrowser.Model.Configuration }; MetadataOptions = options.ToArray(); + + DlnaOptions = new DlnaOptions(); } } diff --git a/MediaBrowser.Model/Dto/RecommendationDto.cs b/MediaBrowser.Model/Dto/RecommendationDto.cs new file mode 100644 index 000000000..68b71e466 --- /dev/null +++ b/MediaBrowser.Model/Dto/RecommendationDto.cs @@ -0,0 +1,29 @@ + +namespace MediaBrowser.Model.Dto +{ + public class RecommendationDto + { + public BaseItemDto[] Items { get; set; } + + public RecommendationType RecommendationType { get; set; } + + public string BaselineItemName { get; set; } + + public string CategoryId { get; set; } + } + + public enum RecommendationType + { + SimilarToRecentlyPlayed = 0, + + SimilarToLikedItem = 1, + + HasDirectorFromRecentlyPlayed = 2, + + HasActorFromRecentlyPlayed = 3, + + HasLikedDirector = 4, + + HasLikedActor = 5 + } +} diff --git a/MediaBrowser.Model/Entities/BaseItemInfo.cs b/MediaBrowser.Model/Entities/BaseItemInfo.cs index 49f3e2d8f..b704bdb57 100644 --- a/MediaBrowser.Model/Entities/BaseItemInfo.cs +++ b/MediaBrowser.Model/Entities/BaseItemInfo.cs @@ -47,6 +47,30 @@ namespace MediaBrowser.Model.Entities public Guid? PrimaryImageTag { get; set; } /// <summary> + /// Gets or sets the thumb image tag. + /// </summary> + /// <value>The thumb image tag.</value> + public Guid? ThumbImageTag { get; set; } + + /// <summary> + /// Gets or sets the thumb item identifier. + /// </summary> + /// <value>The thumb item identifier.</value> + public string ThumbItemId { get; set; } + + /// <summary> + /// Gets or sets the thumb image tag. + /// </summary> + /// <value>The thumb image tag.</value> + public Guid? BackdropImageTag { get; set; } + + /// <summary> + /// Gets or sets the thumb item identifier. + /// </summary> + /// <value>The thumb item identifier.</value> + public string BackdropItemId { get; set; } + + /// <summary> /// Gets a value indicating whether this instance has primary image. /// </summary> /// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value> diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj index 10aedb3ba..45172da43 100644 --- a/MediaBrowser.Model/MediaBrowser.Model.csproj +++ b/MediaBrowser.Model/MediaBrowser.Model.csproj @@ -60,6 +60,7 @@ <Compile Include="ApiClient\ServerEventArgs.cs" /> <Compile Include="Configuration\AutoOrganize.cs" /> <Compile Include="Configuration\BaseApplicationConfiguration.cs" /> + <Compile Include="Configuration\DlnaOptions.cs" /> <Compile Include="Configuration\ManualLoginCategory.cs" /> <Compile Include="Configuration\MetadataPlugin.cs" /> <Compile Include="Configuration\MetadataOptions.cs" /> @@ -73,6 +74,7 @@ <Compile Include="Dto\ItemByNameCounts.cs" /> <Compile Include="Dto\ItemCounts.cs" /> <Compile Include="Dto\ItemIndex.cs" /> + <Compile Include="Dto\RecommendationDto.cs" /> <Compile Include="Entities\PackageReviewInfo.cs" /> <Compile Include="FileOrganization\FileOrganizationResult.cs" /> <Compile Include="FileOrganization\FileOrganizationQuery.cs" /> diff --git a/MediaBrowser.Model/Querying/ItemQuery.cs b/MediaBrowser.Model/Querying/ItemQuery.cs index bc769b786..aee1ca947 100644 --- a/MediaBrowser.Model/Querying/ItemQuery.cs +++ b/MediaBrowser.Model/Querying/ItemQuery.cs @@ -219,6 +219,18 @@ namespace MediaBrowser.Model.Querying public string NameStartsWithOrGreater { get; set; } /// <summary> + /// Gets or sets the name starts with. + /// </summary> + /// <value>The name starts with or greater.</value> + public string NameStartsWith { get; set; } + + /// <summary> + /// Gets or sets the name starts with. + /// </summary> + /// <value>The name lessthan.</value> + public string NameLessThan { get; set; } + + /// <summary> /// Gets or sets the album artist starts with or greater. /// </summary> /// <value>The album artist starts with or greater.</value> diff --git a/MediaBrowser.Model/Querying/ItemSortBy.cs b/MediaBrowser.Model/Querying/ItemSortBy.cs index 09b8f0e18..c91e0bafa 100644 --- a/MediaBrowser.Model/Querying/ItemSortBy.cs +++ b/MediaBrowser.Model/Querying/ItemSortBy.cs @@ -75,16 +75,12 @@ namespace MediaBrowser.Model.Querying public const string IsFolder = "IsFolder"; public const string IsUnplayed = "IsUnplayed"; public const string IsPlayed = "IsPlayed"; - public const string TrailerCount = "TrailerCount"; - public const string MovieCount = "MovieCount"; - public const string SeriesCount = "SeriesCount"; - public const string EpisodeCount = "EpisodeCount"; - public const string SongCount = "SongCount"; - public const string AlbumCount = "AlbumCount"; - public const string MusicVideoCount = "MusicVideoCount"; public const string SeriesSortName = "SeriesSortName"; public const string VideoBitRate = "VideoBitRate"; public const string AirTime = "AirTime"; public const string Metascore = "Metascore"; + public const string Studio = "Studio"; + public const string Players = "Players"; + public const string GameSystem = "GameSystem"; } } diff --git a/MediaBrowser.Model/Querying/ItemsByNameQuery.cs b/MediaBrowser.Model/Querying/ItemsByNameQuery.cs index eafc322ab..4227dc0c5 100644 --- a/MediaBrowser.Model/Querying/ItemsByNameQuery.cs +++ b/MediaBrowser.Model/Querying/ItemsByNameQuery.cs @@ -86,6 +86,10 @@ namespace MediaBrowser.Model.Querying public string NameStartsWithOrGreater { get; set; } /// <summary> + /// Gets or sets the name starts with + /// </summary> + /// <value>The name starts with or greater.</value> + public string NameStartsWith { get; set; } /// Gets or sets the name less than. /// </summary> /// <value>The name less than.</value> diff --git a/MediaBrowser.Model/Querying/NextUpQuery.cs b/MediaBrowser.Model/Querying/NextUpQuery.cs index 4f5d47a04..cdce2e307 100644 --- a/MediaBrowser.Model/Querying/NextUpQuery.cs +++ b/MediaBrowser.Model/Querying/NextUpQuery.cs @@ -33,4 +33,32 @@ namespace MediaBrowser.Model.Querying /// <value>The fields.</value> public ItemFields[] Fields { get; set; } } + + public class UpcomingEpisodesQuery + { + /// <summary> + /// Gets or sets the user id. + /// </summary> + /// <value>The user id.</value> + public string UserId { get; set; } + + /// <summary> + /// Skips over a given number of items within the results. Use for paging. + /// </summary> + /// <value>The start index.</value> + public int? StartIndex { get; set; } + + /// <summary> + /// The maximum number of items to return + /// </summary> + /// <value>The limit.</value> + public int? Limit { get; set; } + + /// <summary> + /// Fields to return within the items, in addition to basic information + /// </summary> + /// <value>The fields.</value> + public ItemFields[] Fields { get; set; } + } + } diff --git a/MediaBrowser.Model/Search/SearchQuery.cs b/MediaBrowser.Model/Search/SearchQuery.cs index 87ff7af66..678dfd39d 100644 --- a/MediaBrowser.Model/Search/SearchQuery.cs +++ b/MediaBrowser.Model/Search/SearchQuery.cs @@ -33,6 +33,8 @@ namespace MediaBrowser.Model.Search public bool IncludeStudios { get; set; } public bool IncludeArtists { get; set; } + public string[] IncludeItemTypes { get; set; } + public SearchQuery() { IncludeArtists = true; @@ -40,6 +42,8 @@ namespace MediaBrowser.Model.Search IncludeMedia = true; IncludePeople = true; IncludeStudios = true; + + IncludeItemTypes = new string[] { }; } } } diff --git a/MediaBrowser.Model/Session/BrowseRequest.cs b/MediaBrowser.Model/Session/BrowseRequest.cs index abb3a30ab..e2cdcc1b2 100644 --- a/MediaBrowser.Model/Session/BrowseRequest.cs +++ b/MediaBrowser.Model/Session/BrowseRequest.cs @@ -23,7 +23,7 @@ namespace MediaBrowser.Model.Session /// </summary> /// <value>The name of the item.</value> public string ItemName { get; set; } - + /// <summary> /// Gets or sets the context (Movies, Music, Tv, etc) /// Applicable to genres, studios and persons only because the context of items and artists can be inferred. @@ -40,4 +40,4 @@ namespace MediaBrowser.Model.Session public const string TvShows = "TvShows"; public const string Games = "Games"; } -} +}
\ No newline at end of file diff --git a/MediaBrowser.Model/Session/MessageCommand.cs b/MediaBrowser.Model/Session/MessageCommand.cs index 5ab580815..b028765ed 100644 --- a/MediaBrowser.Model/Session/MessageCommand.cs +++ b/MediaBrowser.Model/Session/MessageCommand.cs @@ -4,9 +4,9 @@ namespace MediaBrowser.Model.Session public class MessageCommand { public string Header { get; set; } - + public string Text { get; set; } public long? TimeoutMs { get; set; } } -} +}
\ No newline at end of file diff --git a/MediaBrowser.Model/Session/PlayRequest.cs b/MediaBrowser.Model/Session/PlayRequest.cs index c9bb58693..57f6c37f5 100644 --- a/MediaBrowser.Model/Session/PlayRequest.cs +++ b/MediaBrowser.Model/Session/PlayRequest.cs @@ -43,4 +43,4 @@ namespace MediaBrowser.Model.Session /// </summary> PlayLast } -} +}
\ No newline at end of file diff --git a/MediaBrowser.Model/Session/PlaystateCommand.cs b/MediaBrowser.Model/Session/PlaystateCommand.cs index 7e85d9d27..918f4f70f 100644 --- a/MediaBrowser.Model/Session/PlaystateCommand.cs +++ b/MediaBrowser.Model/Session/PlaystateCommand.cs @@ -38,4 +38,4 @@ namespace MediaBrowser.Model.Session public long? SeekPositionTicks { get; set; } } -} +}
\ No newline at end of file |
