예제 #1
0
        public void onMessage(HTSMessage response)
        {
            if (response != null)
            {
                switch (response.Method)
                {
                case "tagAdd":
                case "tagUpdate":
                case "tagDelete":
                    //_logger.Fatal("[TVHclient] tad add/update/delete" + response.ToString());
                    break;

                case "channelAdd":
                case "channelUpdate":
                    _channelDataHelper.Add(response);
                    break;

                case "eventAdd":
                case "eventUpdate":
                case "eventDelete":
                    // should not happen as we don't subscribe for this events.
                    break;

                //case "subscriptionStart":
                //case "subscriptionGrace":
                //case "subscriptionStop":
                //case "subscriptionSkip":
                //case "subscriptionSpeed":
                //case "subscriptionStatus":
                //    _logger.Fatal("[TVHclient] subscription events " + response.ToString());
                //    break;

                //case "queueStatus":
                //    _logger.Fatal("[TVHclient] queueStatus event " + response.ToString());
                //    break;

                //case "signalStatus":
                //    _logger.Fatal("[TVHclient] signalStatus event " + response.ToString());
                //    break;

                //case "timeshiftStatus":
                //    _logger.Fatal("[TVHclient] timeshiftStatus event " + response.ToString());
                //    break;

                //case "muxpkt": // streaming data
                //    _logger.Fatal("[TVHclient] muxpkt event " + response.ToString());
                //    break;

                case "initialSyncCompleted":
                    OnInitialDataLoadComplete();
                    break;

                default:
                    //_logger.Fatal("[TVHclient] Method '" + response.Method + "' not handled in LiveTvService.cs");
                    break;
                }
            }
        }
예제 #2
0
        public void onMessage(HTSMessage response)
        {
            if (response != null)
            {
                switch (response.Method)
                {
                case "tagAdd":
                case "tagUpdate":
                case "tagDelete":
                    //_logger.LogCritical("[TVHclient] tad add/update/delete {resp}", response.ToString());
                    break;

                case "channelAdd":
                case "channelUpdate":
                    _channelDataHelper.Add(response);
                    break;

                case "dvrEntryAdd":
                    _dvrDataHelper.dvrEntryAdd(response);
                    break;

                case "dvrEntryUpdate":
                    _dvrDataHelper.dvrEntryUpdate(response);
                    break;

                case "dvrEntryDelete":
                    _dvrDataHelper.dvrEntryDelete(response);
                    break;

                case "autorecEntryAdd":
                    _autorecDataHelper.autorecEntryAdd(response);
                    break;

                case "autorecEntryUpdate":
                    _autorecDataHelper.autorecEntryUpdate(response);
                    break;

                case "autorecEntryDelete":
                    _autorecDataHelper.autorecEntryDelete(response);
                    break;

                case "eventAdd":
                case "eventUpdate":
                case "eventDelete":
                    // should not happen as we don't subscribe for this events.
                    break;

                //case "subscriptionStart":
                //case "subscriptionGrace":
                //case "subscriptionStop":
                //case "subscriptionSkip":
                //case "subscriptionSpeed":
                //case "subscriptionStatus":
                //    _logger.LogCritical("[TVHclient] subscription events {resp}", response.ToString());
                //    break;

                //case "queueStatus":
                //    _logger.LogCritical("[TVHclient] queueStatus event {resp}", response.ToString());
                //    break;

                //case "signalStatus":
                //    _logger.LogCritical("[TVHclient] signalStatus event {resp}", response.ToString());
                //    break;

                //case "timeshiftStatus":
                //    _logger.LogCritical("[TVHclient] timeshiftStatus event {resp}", response.ToString());
                //    break;

                //case "muxpkt": // streaming data
                //    _logger.LogCritical("[TVHclient] muxpkt event {resp}", response.ToString());
                //    break;

                case "initialSyncCompleted":
                    _initialLoadFinished = true;
                    break;

                default:
                    //_logger.LogCritical("[TVHclient] Method '{method}' not handled in LiveTvService.cs", response.Method);
                    break;
                }
            }
        }