Skip to content

Commit

Permalink
Compatibility update
Browse files Browse the repository at this point in the history
  • Loading branch information
LukePulverenti committed Feb 18, 2018
1 parent 4578ba8 commit db8cd9a
Show file tree
Hide file tree
Showing 6 changed files with 597 additions and 231 deletions.
8 changes: 4 additions & 4 deletions TVHeadEnd/DataHelper/DvrDataHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ public void dvrEntryDelete(HTSMessage message)
}
}

public Task<IEnumerable<RecordingInfo>> buildDvrInfos(CancellationToken cancellationToken)
public Task<IEnumerable<MyRecordingInfo>> buildDvrInfos(CancellationToken cancellationToken)
{
return Task.Factory.StartNew<IEnumerable<RecordingInfo>>(() =>
return Task.Factory.StartNew<IEnumerable<MyRecordingInfo>>(() =>
{
lock (_data)
{
List<RecordingInfo> result = new List<RecordingInfo>();
List<MyRecordingInfo> result = new List<MyRecordingInfo>();
foreach (KeyValuePair<string, HTSMessage> entry in _data)
{
if (cancellationToken.IsCancellationRequested)
Expand All @@ -92,7 +92,7 @@ public Task<IEnumerable<RecordingInfo>> buildDvrInfos(CancellationToken cancella
}

HTSMessage m = entry.Value;
RecordingInfo ri = new RecordingInfo();
MyRecordingInfo ri = new MyRecordingInfo();

try
{
Expand Down
18 changes: 17 additions & 1 deletion TVHeadEnd/HTSConnectionHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,22 @@ public ImageStream GetChannelImage(string channelId, CancellationToken cancellat
}
}

public string GetChannelImageUrl(string channelId)
{
_logger.Info("[TVHclient] HTSConnectionHandler.GetChannelImage() channelId: " + channelId);

String channelIcon = _channelDataHelper.GetChannelIcon4ChannelId(channelId);

if (channelIcon.StartsWith("http"))
{
return _channelDataHelper.GetChannelIcon4ChannelId(channelId);
}
else
{
return "http://" + _tvhServerName + ":" + _httpPort + _webRoot + "/" + channelIcon; ;
}
}

public Dictionary<string, string> GetHeaders()
{
return new Dictionary<string, string>(_headers);
Expand Down Expand Up @@ -372,7 +388,7 @@ public bool GetForceDeinterlace()
return _forceDeinterlace;
}

public Task<IEnumerable<RecordingInfo>> BuildDvrInfos(CancellationToken cancellationToken)
public Task<IEnumerable<MyRecordingInfo>> BuildDvrInfos(CancellationToken cancellationToken)
{
return _dvrDataHelper.buildDvrInfos(cancellationToken);
}
Expand Down
Loading

0 comments on commit db8cd9a

Please sign in to comment.