display programs on channel page

This commit is contained in:
Luke Pulverenti
2013-11-25 15:39:23 -05:00
parent 4054846a6e
commit a641059c57
23 changed files with 283 additions and 144 deletions

View File

@@ -83,7 +83,7 @@ namespace MediaBrowser.Model.ApiClient
/// <param name="startIndex">The start index.</param>
/// <param name="limit">The limit.</param>
/// <returns>Task{ItemReviewsResult}.</returns>
Task<ItemReviewsResult> GetCriticReviews(string itemId, CancellationToken cancellationToken, int? startIndex = null, int? limit = null);
Task<QueryResult<ItemReview>> GetCriticReviews(string itemId, CancellationToken cancellationToken, int? startIndex = null, int? limit = null);
/// <summary>
/// Gets the theme songs async.

View File

@@ -18,12 +18,6 @@ namespace MediaBrowser.Model.LiveTv
/// </summary>
/// <value>The identifier.</value>
public string Id { get; set; }
/// <summary>
/// Gets or sets the channel identifier.
/// </summary>
/// <value>The channel identifier.</value>
public string ChannelId { get; set; }
/// <summary>
/// Gets or sets the logo image tag.

View File

@@ -1,32 +1,39 @@
using System;
using System.Collections.Generic;
namespace MediaBrowser.Model.LiveTv
{
public class ProgramInfo
public class ProgramInfoDto
{
/// <summary>
/// Id of the program.
/// </summary>
public string Id { get; set; }
/// <summary>
/// Gets or sets the external identifier.
/// </summary>
/// <value>The external identifier.</value>
public string ExternalId { get; set; }
/// <summary>
/// Gets or sets the channel identifier.
/// </summary>
/// <value>The channel identifier.</value>
public string ChannelId { get; set; }
/// <summary>
/// Gets or sets the recording identifier.
/// </summary>
/// <value>The recording identifier.</value>
public string RecordingId { get; set; }
/// <summary>
/// Gets or sets the name of the service.
/// </summary>
/// <value>The name of the service.</value>
public string ServiceName { get; set; }
/// <summary>
/// Gets or sets the external channel identifier.
/// </summary>
/// <value>The external channel identifier.</value>
public string ExternalChannelId { get; set; }
/// <summary>
/// Name of the program
/// </summary>
@@ -50,6 +57,11 @@ namespace MediaBrowser.Model.LiveTv
/// <summary>
/// Genre of the program.
/// </summary>
public string Genre { get; set; }
public List<string> Genres { get; set; }
public ProgramInfoDto()
{
Genres = new List<string>();
}
}
}

View File

@@ -3,7 +3,7 @@ using System.Collections.Generic;
namespace MediaBrowser.Model.LiveTv
{
public class RecordingInfo
public class RecordingInfoDto
{
/// <summary>
/// Id of the recording.

View File

@@ -5,10 +5,6 @@
/// </summary>
public class RecordingQuery
{
/// <summary>
/// Gets or sets a value indicating whether this instance has recorded.
/// </summary>
/// <value><c>null</c> if [has recorded] contains no value, <c>true</c> if [has recorded]; otherwise, <c>false</c>.</value>
public bool? HasRecorded { get; set; }
public string ChannelId { get; set; }
}
}

View File

@@ -62,7 +62,7 @@
<Compile Include="Entities\PackageReviewInfo.cs" />
<Compile Include="LiveTv\ChannelInfoDto.cs" />
<Compile Include="LiveTv\ChannelQuery.cs" />
<Compile Include="LiveTv\ProgramInfo.cs" />
<Compile Include="LiveTv\ProgramInfoDto.cs" />
<Compile Include="LiveTv\ProgramQuery.cs" />
<Compile Include="LiveTv\RecordingQuery.cs" />
<Compile Include="Providers\ImageProviderInfo.cs" />
@@ -80,7 +80,7 @@
<Compile Include="IO\IIsoMounter.cs" />
<Compile Include="LiveTv\ChannelType.cs" />
<Compile Include="LiveTv\LiveTvServiceInfo.cs" />
<Compile Include="LiveTv\RecordingInfo.cs" />
<Compile Include="LiveTv\RecordingInfoDto.cs" />
<Compile Include="Net\WebSocketMessage.cs" />
<Compile Include="Net\WebSocketMessageType.cs" />
<Compile Include="Net\WebSocketState.cs" />
@@ -93,10 +93,10 @@
<Compile Include="Querying\ArtistsQuery.cs" />
<Compile Include="Querying\EpisodeQuery.cs" />
<Compile Include="Querying\ItemCountsQuery.cs" />
<Compile Include="Querying\ItemReviewsResult.cs" />
<Compile Include="Querying\ItemsByNameQuery.cs" />
<Compile Include="Entities\BaseItemInfo.cs" />
<Compile Include="Querying\NextUpQuery.cs" />
<Compile Include="Querying\QueryResult.cs" />
<Compile Include="Querying\SessionQuery.cs" />
<Compile Include="Querying\SimilarItemsQuery.cs" />
<Compile Include="Querying\UserQuery.cs" />

View File

@@ -1,17 +1,13 @@
using MediaBrowser.Model.Entities;

namespace MediaBrowser.Model.Querying
{
/// <summary>
/// Class ItemReviewsResult
/// </summary>
public class ItemReviewsResult
public class QueryResult<T>
{
/// <summary>
/// Gets or sets the item reviews.
/// Gets or sets the items.
/// </summary>
/// <value>The item reviews.</value>
public ItemReview[] ItemReviews { get; set; }
/// <value>The items.</value>
public T[] Items { get; set; }
/// <summary>
/// The total number of records available
@@ -22,9 +18,9 @@ namespace MediaBrowser.Model.Querying
/// <summary>
/// Initializes a new instance of the <see cref="ItemsResult" /> class.
/// </summary>
public ItemReviewsResult()
public QueryResult()
{
ItemReviews = new ItemReview[] { };
Items = new T[] { };
}
}
}
}