Skip to content

Commit

Permalink
fixed ValidateTvControllerParams stacktrace error.log in EPG grabbing…
Browse files Browse the repository at this point in the history
… situations (thx morpheus)
  • Loading branch information
gibman committed Oct 7, 2012
1 parent be4e442 commit eaf4ed4
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions TvEngine3/Mediaportal/TV/Server/TvControl/VirtualCard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,42 +153,42 @@ private void InitStaticProperties()
string userName = _user.Name;
int cardId = _user.CardId;


var controllerService = GlobalServiceProvider.Get<IControllerService>();
if (!string.IsNullOrWhiteSpace(userName))
{
_isTimeshifting = GlobalServiceProvider.Get<IControllerService>().IsTimeShifting(userName);
_isScrambled = GlobalServiceProvider.Get<IControllerService>().IsScrambled(userName);
_hasTeletext = GlobalServiceProvider.Get<IControllerService>().HasTeletext(userName);
_rtspUrl = GlobalServiceProvider.Get<IControllerService>().GetStreamingUrl(userName);
_recordingFileName = GlobalServiceProvider.Get<IControllerService>().RecordingFileName(userName);
_idChannel = GlobalServiceProvider.Get<IControllerService>().CurrentDbChannel(userName);
_channelName = GlobalServiceProvider.Get<IControllerService>().CurrentChannelName(userName);
_isTimeshifting = controllerService.IsTimeShifting(userName);
_isScrambled = controllerService.IsScrambled(userName);
_hasTeletext = controllerService.HasTeletext(userName);
_rtspUrl = controllerService.GetStreamingUrl(userName);
_recordingFileName = controllerService.RecordingFileName(userName);
_idChannel = controllerService.CurrentDbChannel(userName);
_channelName = controllerService.CurrentChannelName(userName);

if (_idChannel > 0)
{
IChannel channel = GlobalServiceProvider.Get<IControllerService>().CurrentChannel(userName, _idChannel);
IChannel channel = controllerService.CurrentChannel(userName, _idChannel);
if (channel != null)
{
_mediaType = channel.MediaType;
}
}
if (cardId > 0)
if (cardId > 0 && _user.UserType == UserType.Normal)
{
_timeShiftFileName = GlobalServiceProvider.Get<IControllerService>().TimeShiftFileName(userName, cardId);
_timeShiftFileName = controllerService.TimeShiftFileName(userName, cardId);
}
}

if (cardId > 0)
{
if (_idChannel > 0)
{
_isRecording = GlobalServiceProvider.Get<IControllerService>().IsRecording(_idChannel, cardId);
_isRecording = controllerService.IsRecording(_idChannel, cardId);
}

_isScanning = GlobalServiceProvider.Get<IControllerService>().IsScanning(cardId);
_isGrabbingEpg = GlobalServiceProvider.Get<IControllerService>().IsGrabbingEpg(cardId);
_name = GlobalServiceProvider.Get<IControllerService>().CardName(cardId);
_cardType = GlobalServiceProvider.Get<IControllerService>().Type(cardId);
_isScanning = controllerService.IsScanning(cardId);
_isGrabbingEpg = controllerService.IsGrabbingEpg(cardId);
_name = controllerService.CardName(cardId);
_cardType = controllerService.Type(cardId);
}
}

Expand Down

0 comments on commit eaf4ed4

Please sign in to comment.