It appears to me that anomalous error situations can occur in the code when the list of LCN information sent by the IceTV has some entries that fail to match scanned channels in the T series.
The problems are the one that the user encountered and that multiple copies of the same timer error might be sent.
If a user has, for example, their IceTV My Account>Guide settings for a channel set to "All", but one of the LCNs in the list has an ONID/TSID/SID triple that's not in the T series scan database, then the following can happen if the user sets an IceTV recording that causes a timer conflict:
- If the non-matching channel is processed before the matching channel with a timer conflict, the timer response (iceTimer[]) is added to the response queue (update_queue) initially with the error message "No matching service". When the matching channel with the timer conflict is processed the error message in the timer response is changed to "Timer conflict: ...", but the timer response is added to the response queue again. When the loop completes and the timer hasn't been sent the timer response is added to the response queue once more, so that the IceTV server is sent a "Timer conflict: ..." message three times. It seems to handle these multiple responses OK, but they shouldn't be there. But in this instance, the user should see an appropriate error message.
- If the matching channel with the timer conflict is processed before the non-matching channel, the final state of the timer response will be "No matching service", even though a matching service was in fact found (but couldn't be recorded from). The timer response will again have been placed in the response queue three times.
- In the case where a matching channel is processed after the non-matching channel and the timer can be created, an "Added" timer response is put into the response queue, even though in normal circumstances the response is not put in the queue.
Code: Select all
for channel in channels: