1.0.0.4 - Update due to changes in ILiveTvService
Update due to changes in ILiveTvService
This commit is contained in:
+36
-29
@@ -1,8 +1,10 @@
|
|||||||
using MediaBrowser.Common.Extensions;
|
using MediaBrowser.Common.Extensions;
|
||||||
using MediaBrowser.Common.Net;
|
using MediaBrowser.Common.Net;
|
||||||
using MediaBrowser.Controller.Channels;
|
using MediaBrowser.Controller.Channels;
|
||||||
using MediaBrowser.Controller.Drawing;
|
using MediaBrowser.Controller.Drawing;
|
||||||
using MediaBrowser.Controller.LiveTv;
|
using MediaBrowser.Controller.LiveTv;
|
||||||
|
using MediaBrowser.Model.Dto;
|
||||||
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Logging;
|
using MediaBrowser.Model.Logging;
|
||||||
using MediaBrowser.Model.MediaInfo;
|
using MediaBrowser.Model.MediaInfo;
|
||||||
using MediaBrowser.Model.Net;
|
using MediaBrowser.Model.Net;
|
||||||
@@ -124,7 +126,8 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
{
|
{
|
||||||
// connect to VuPlus box to test connectivity and at same time get sRef for TV Bouquet.
|
// connect to VuPlus box to test connectivity and at same time get sRef for TV Bouquet.
|
||||||
tvBouquetSRef = await InitiateSession(cancellationToken, config.TVBouquet).ConfigureAwait(false);
|
tvBouquetSRef = await InitiateSession(cancellationToken, config.TVBouquet).ConfigureAwait(false);
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
// connect to VuPlus box to test connectivity.
|
// connect to VuPlus box to test connectivity.
|
||||||
String resultNotRequired = await InitiateSession(cancellationToken, null).ConfigureAwait(false);
|
String resultNotRequired = await InitiateSession(cancellationToken, null).ConfigureAwait(false);
|
||||||
@@ -327,7 +330,6 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Load channels for specified TV Bouquet only
|
// Load channels for specified TV Bouquet only
|
||||||
_logger.Info("[VuPlus] GetChannelsAsync for specified TV Bouquets");
|
|
||||||
int count = 1;
|
int count = 1;
|
||||||
|
|
||||||
XmlNodeList e2services = xml.GetElementsByTagName("e2service");
|
XmlNodeList e2services = xml.GetElementsByTagName("e2service");
|
||||||
@@ -681,6 +683,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
edate = edate.AddSeconds(edated); //add seconds
|
edate = edate.AddSeconds(edated); //add seconds
|
||||||
recordingInfo.EndDate = edate.ToUniversalTime();
|
recordingInfo.EndDate = edate.ToUniversalTime();
|
||||||
|
|
||||||
|
//recordingInfo.EpisodeTitle = e2title;
|
||||||
recordingInfo.EpisodeTitle = null;
|
recordingInfo.EpisodeTitle = null;
|
||||||
|
|
||||||
recordingInfo.Overview = e2description;
|
recordingInfo.Overview = e2description;
|
||||||
@@ -1138,13 +1141,22 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Task<List<MediaSourceInfo>> GetChannelStreamMediaSources(string channelId, CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task<List<MediaSourceInfo>> GetRecordingStreamMediaSources(string recordingId, CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the live channel stream, zap to channel if required.
|
/// Get the live channel stream, zap to channel if required.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cancellationToken">The CancellationToken</param>
|
/// <param name="cancellationToken">The CancellationToken</param>
|
||||||
/// <returns>ChannelMediaInfo</returns>
|
/// <returns>MediaSourceInfo</returns>
|
||||||
public async Task<ChannelMediaInfo> GetChannelStream(string channelOid, CancellationToken cancellationToken)
|
public async Task<MediaSourceInfo> GetChannelStream(string channelOid, string mediaSourceId, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
_logger.Info("[VuPlus] Start GetChannelStream");
|
_logger.Info("[VuPlus] Start GetChannelStream");
|
||||||
|
|
||||||
@@ -1164,7 +1176,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
string streamUrl = string.Format("{0}/{1}", baseUrl, channelOid);
|
string streamUrl = string.Format("{0}/{1}", baseUrl, channelOid);
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] GetChannelStream url: {0}", streamUrl));
|
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] GetChannelStream url: {0}", streamUrl));
|
||||||
|
|
||||||
return new ChannelMediaInfo
|
return new MediaSourceInfo
|
||||||
{
|
{
|
||||||
Id = _liveStreams.ToString(CultureInfo.InvariantCulture),
|
Id = _liveStreams.ToString(CultureInfo.InvariantCulture),
|
||||||
Path = streamUrl,
|
Path = streamUrl,
|
||||||
@@ -1286,7 +1298,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
/// <returns>IEnumerable<ProgramInfo></returns>
|
/// <returns>IEnumerable<ProgramInfo></returns>
|
||||||
public async Task<IEnumerable<ProgramInfo>> GetProgramsAsync(string channelId, DateTime startDateUtc, DateTime endDateUtc, CancellationToken cancellationToken)
|
public async Task<IEnumerable<ProgramInfo>> GetProgramsAsync(string channelId, DateTime startDateUtc, DateTime endDateUtc, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
_logger.Info(string.Format("[VuPlus] Start GetProgramsAsync for channelId: {0}",channelId));
|
_logger.Info("[VuPlus] Start GetProgramsAsync");
|
||||||
await EnsureConnectionAsync(cancellationToken).ConfigureAwait(false);
|
await EnsureConnectionAsync(cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
Random rnd = new Random();
|
Random rnd = new Random();
|
||||||
@@ -1400,7 +1412,9 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] GetProgramsAsync adding program for channel name : {0} program : {1}", e2eventservicename, e2eventtitle));
|
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] GetProgramsAsync adding program for channel name : {0} program : {1}", e2eventservicename, e2eventtitle));
|
||||||
programInfo.HasImage = false;
|
//programInfo.HasImage = false;
|
||||||
|
//programInfo.ImagePath = null;
|
||||||
|
//programInfo.ImageUrl = null;
|
||||||
if (count == 1)
|
if (count == 1)
|
||||||
{
|
{
|
||||||
foreach (ChannelInfo channelInfo in tvChannelInfos)
|
foreach (ChannelInfo channelInfo in tvChannelInfos)
|
||||||
@@ -1424,7 +1438,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
|
|
||||||
programInfo.ChannelId = e2eventservicereference;
|
programInfo.ChannelId = e2eventservicereference;
|
||||||
|
|
||||||
// the Id appears to have to be unique so will try to make it so
|
// for some reason the Id appears to have to be unique so will make it so
|
||||||
programInfo.Id = e2eventservicereference + "~" + e2eventid + "~" + count + "~" + rnd.Next();
|
programInfo.Id = e2eventservicereference + "~" + e2eventid + "~" + count + "~" + rnd.Next();
|
||||||
|
|
||||||
programInfo.Overview = e2eventdescriptionextended;
|
programInfo.Overview = e2eventdescriptionextended;
|
||||||
@@ -1440,19 +1454,19 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
genre.Add("Unknown");
|
genre.Add("Unknown");
|
||||||
programInfo.Genres = genre;
|
programInfo.Genres = genre;
|
||||||
|
|
||||||
programInfo.OriginalAirDate = null;
|
//programInfo.OriginalAirDate = null;
|
||||||
programInfo.Name = e2eventtitle;
|
programInfo.Name = e2eventtitle;
|
||||||
programInfo.OfficialRating = null;
|
//programInfo.OfficialRating = null;
|
||||||
programInfo.CommunityRating = null;
|
//programInfo.CommunityRating = null;
|
||||||
programInfo.EpisodeTitle = null;
|
//programInfo.EpisodeTitle = null;
|
||||||
programInfo.Audio = null;
|
//programInfo.Audio = null;
|
||||||
programInfo.IsHD = false;
|
//programInfo.IsHD = false;
|
||||||
programInfo.IsRepeat = false;
|
//programInfo.IsRepeat = false;
|
||||||
programInfo.IsSeries = false;
|
//programInfo.IsSeries = false;
|
||||||
programInfo.IsNews = false;
|
//programInfo.IsNews = false;
|
||||||
programInfo.IsMovie = false;
|
//programInfo.IsMovie = false;
|
||||||
programInfo.IsKids = false;
|
//programInfo.IsKids = false;
|
||||||
programInfo.IsSports = false;
|
//programInfo.IsSports = false;
|
||||||
|
|
||||||
programInfos.Add(programInfo);
|
programInfos.Add(programInfo);
|
||||||
count = count + 1;
|
count = count + 1;
|
||||||
@@ -1589,7 +1603,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public async Task<ChannelMediaInfo> GetRecordingStream(string recordingId, CancellationToken cancellationToken)
|
public async Task<MediaSourceInfo> GetRecordingStream(string recordingId, string mediaSourceId, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
@@ -1724,12 +1738,5 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<ImageStream> GetLiveTvChannelsAsync(string recordingId, CancellationToken cancellationToken)
|
|
||||||
{
|
|
||||||
// Leave as is. This is handled by supplying image url to RecordingInfo
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user