update tuner setup

This commit is contained in:
Luke Pulverenti
2015-07-23 09:23:22 -04:00
parent f9f29de05e
commit 3fda8ec5c2
14 changed files with 262 additions and 65 deletions

View File

@@ -1,4 +1,5 @@
using MediaBrowser.Model.LiveTv;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.LiveTv;
using System;
using System.Collections.Generic;
using System.Threading;
@@ -9,7 +10,10 @@ namespace MediaBrowser.Controller.LiveTv
public interface IListingsProvider
{
string Name { get; }
string Type { get; }
Task<IEnumerable<ProgramInfo>> GetProgramsAsync(ListingsProviderInfo info, ChannelInfo channel, DateTime startDateUtc, DateTime endDateUtc, CancellationToken cancellationToken);
Task AddMetadata(ListingsProviderInfo info, List<ChannelInfo> channels, CancellationToken cancellationToken);
Task Validate(ListingsProviderInfo info);
Task<List<NameIdPair>> GetLineups(ListingsProviderInfo info, string location);
}
}

View File

@@ -56,12 +56,14 @@ namespace MediaBrowser.Controller.LiveTv
/// <param name="id">The identifier.</param>
/// <returns>Task.</returns>
Task CancelSeriesTimer(string id);
/// <summary>
/// Adds the parts.
/// </summary>
/// <param name="services">The services.</param>
void AddParts(IEnumerable<ILiveTvService> services);
/// <param name="tunerHosts">The tuner hosts.</param>
/// <param name="listingProviders">The listing providers.</param>
void AddParts(IEnumerable<ILiveTvService> services, IEnumerable<ITunerHost> tunerHosts, IEnumerable<IListingsProvider> listingProviders);
/// <summary>
/// Gets the channels.
@@ -337,5 +339,24 @@ namespace MediaBrowser.Controller.LiveTv
/// <param name="dto">The dto.</param>
/// <param name="user">The user.</param>
void AddInfoToProgramDto(BaseItem item, BaseItemDto dto, User user = null);
/// <summary>
/// Saves the tuner host.
/// </summary>
/// <param name="info">The information.</param>
/// <returns>Task.</returns>
Task SaveTunerHost(TunerHostInfo info);
/// <summary>
/// Saves the listing provider.
/// </summary>
/// <param name="info">The information.</param>
/// <returns>Task.</returns>
Task<ListingsProviderInfo> SaveListingProvider(ListingsProviderInfo info);
/// <summary>
/// Gets the lineups.
/// </summary>
/// <param name="providerId">The provider identifier.</param>
/// <param name="location">The location.</param>
/// <returns>Task&lt;List&lt;NameIdPair&gt;&gt;.</returns>
Task<List<NameIdPair>> GetLineups(string providerId, string location);
}
}

View File

@@ -46,5 +46,11 @@ namespace MediaBrowser.Controller.LiveTv
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task&lt;MediaSourceInfo&gt;.</returns>
Task<MediaSourceInfo> GetChannelStream(TunerHostInfo info, string channelId, string streamId, CancellationToken cancellationToken);
/// <summary>
/// Validates the specified information.
/// </summary>
/// <param name="info">The information.</param>
/// <returns>Task.</returns>
Task Validate(TunerHostInfo info);
}
}