- August 29, 2009
- 1,730
- 1,124
- Home Country
- Netherlands
Thanks, looks really good, especially the JSON interface, the WebVirtualCard class and the multi user setup.
Regarding the CancelTimeShift problem: itt is that the StartTimeShifting() method changes the User object to pass to it: it adds a card and channel property. However, you don't save the changed User object, but just discard it and use the old User object when cancelling timeshifts. This patch fixes it (nicer would be to create a GetUserByUserName() which returns a reference, but I'm not that much into C# to do so):
Regarding the CancelTimeShift problem: itt is that the StartTimeShifting() method changes the User object to pass to it: it adds a card and channel property. However, you don't save the changed User object, but just discard it and use the old User object when cancelling timeshifts. This patch fixes it (nicer would be to create a GetUserByUserName() which returns a reference, but I'm not that much into C# to do so):
--- a/TV4Home/Server/TV4Home.Server.TVEInteractionLibrary/TVEInteraction.cs
+++ b/TV4Home/Server/TV4Home.Server.TVEInteractionLibrary/TVEInteraction.cs
@@ -371,8 +371,8 @@ namespace TV4Home.Server.TVEInteractionLibrary
throw new NullReferenceException("Couldn't get virtual card.");
// set card id and channel id of user, required for heartbeat and stopping of timeshifting
- currentUser.CardId = tvCard.Id;
- currentUser.IdChannel = channelId;
+ _tvUsers[userName].CardId = tvCard.Id;
+ _tvUsers[userName].IdChannel = channelId;
return tvCard;
}