Skip to content

Commit

Permalink
Extend return message format of "IsTimeshifting" command
Browse files Browse the repository at this point in the history
  • Loading branch information
Romank1 authored and margro committed Oct 15, 2015
1 parent 9a0d2af commit bf2a1bc
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions TVServerKodi/Commands/IsTimeshifting.cs
Expand Up @@ -17,12 +17,13 @@ public IsTimeshifting(ConnectionHandler connection)
*/
public override void handleCommand(string command, string[] arguments, ref TvControl.IUser me)
{
string rtspUrl = TVServerConnection.getTimeshiftUrl(ref me);
TimeShiftURLs timeShiftURLs = TVServerConnection.getTimeshiftURLs(ref me);
bool result = true;
if (String.IsNullOrEmpty(rtspUrl))

if (timeShiftURLs == null || String.IsNullOrEmpty(timeShiftURLs.RTSPUrl) || String.IsNullOrEmpty(timeShiftURLs.TimeShiftFileName))
{
timeShiftURLs = new TimeShiftURLs { RTSPUrl = "", TimeShiftFileName = "" };
result = false;
rtspUrl = "";
}

// results = isShifting;url;chanInfo as in ListChannels
Expand All @@ -33,8 +34,8 @@ public override void handleCommand(string command, string[] arguments, ref TvCon
c = TVServerConnection.getTimeshiftInfo(ref me);
}

writer.write(writer.makeItemSmart(result.ToString(), rtspUrl, c));
writer.write(writer.makeItemSmart(result.ToString(), timeShiftURLs.RTSPUrl, timeShiftURLs.TimeShiftFileName, c));

}

public override string getCommandToHandle()
Expand Down

0 comments on commit bf2a1bc

Please sign in to comment.