aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.ServerApplication
diff options
context:
space:
mode:
authorLuis Miguel Almánzar <ruisu15@gmail.com>2013-11-02 21:19:43 -0400
committerLuis Miguel Almánzar <ruisu15@gmail.com>2013-11-02 21:19:43 -0400
commitce8821c94256e365a217480c077c7f0c4cb42b2c (patch)
tree59952b63e492f6cb2a3da2986c17245166b98b6b /MediaBrowser.ServerApplication
parent8a0606e9704f98e368cea4a1391b21fb7e2dec03 (diff)
parent96d4b9c43b69c0a31196487994476024d3d8b13b (diff)
Merge branch 'master' of github.com:MediaBrowser/MediaBrowser
Diffstat (limited to 'MediaBrowser.ServerApplication')
-rw-r--r--MediaBrowser.ServerApplication/NextPvr/LiveTvService.cs66
1 files changed, 66 insertions, 0 deletions
diff --git a/MediaBrowser.ServerApplication/NextPvr/LiveTvService.cs b/MediaBrowser.ServerApplication/NextPvr/LiveTvService.cs
new file mode 100644
index 0000000000..ab72b2c8e1
--- /dev/null
+++ b/MediaBrowser.ServerApplication/NextPvr/LiveTvService.cs
@@ -0,0 +1,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"; }
+ }
+ }
+}