blob: ab72b2c8e1c94ce4da2e767c7ddeeaf84288e9a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Net;
using MediaBrowser.Controller.LiveTv;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.Logging;
using MediaBrowser.Model.Serialization;
namespace MediaBrowser.Plugins.NextPvr
{
/// <summary>
/// Class LiveTvService
/// </summary>
public class LiveTvService : ILiveTvService
{
private readonly ILogger _logger;
private IApplicationPaths _appPaths;
private IJsonSerializer _json;
private IHttpClient _httpClient;
public LiveTvService(ILogger logger)
{
_logger = logger;
}
/// <summary>
/// Gets the channels async.
/// </summary>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{IEnumerable{ChannelInfo}}.</returns>
public Task<IEnumerable<ChannelInfo>> GetChannelsAsync(CancellationToken cancellationToken)
{
//using (var stream = await _httpClient.Get(new HttpRequestOptions()
// {
// Url = "",
// CancellationToken = cancellationToken
// }))
//{
//}
_logger.Info("GetChannelsAsync");
var channels = new List<ChannelInfo>
{
new ChannelInfo
{
Name = "NBC",
ServiceName = Name
}
};
return Task.FromResult<IEnumerable<ChannelInfo>>(channels);
}
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name
{
get { return "Next Pvr"; }
}
}
}
|