(2014-08-06, 00:43)janbar Wrote: (2014-08-05, 22:46)Natronch Wrote: Already tried that. Deleted all livetv recordings and moved the remaining recordings into a backup table. The problem still persists. Where else, yould this "Channel 0" come from. I already tried to debug into it. But do not have more information yet.
You could try to get the full list of your channels using:
Code:
http://localhost:6544/Channel/GetChannelInfoList?Details=false
Replacing 'locahost' by ip or your backend.
Then check the result for "<ChanId></ChanId>" or "<ChanId>0</ChanId>" or something invalid.
EDIT: If nothing weird found, i could add a check for channel with id 0 and then log a warning before trash it. That will help to debug.
Ok, it does not seem to be on xbmc side. I did some more debugging:
Code:
GET /Channel/GetChannelInfoList?SourceID=%31&StartIndex=%30&Count=%31%30%30 HTTP/1.1
This request returns a bunch of channels with id 0, but these channels do not contain any information and are not stored in the mythtv database. No clue where the come from. Probably a bug in mythtv.
Here a sample of such a channel:
Code:
<ChannelInfo><ChanId>0</ChanId><ChanNum></ChanNum><CallSign></CallSign><IconURL></IconURL><ChannelName></ChannelName><MplexId>0</MplexId><TransportId>0</TransportId><ServiceId>0</ServiceId><NetworkId>0</NetworkId><ATSCMajorChan>0</ATSCMajorChan><ATSCMinorChan>0</ATSCMinorChan><Format></Format><Modulation></Modulation><Frequency>0</Frequency><FrequencyId></FrequencyId><FrequencyTable></FrequencyTable><FineTune>0</FineTune><SIStandard></SIStandard><ChanFilters></ChanFilters><SourceId>0</SourceId><InputId>0</InputId><CommFree>0</CommFree><UseEIT>false</UseEIT><Visible>true</Visible><XMLTVID></XMLTVID><DefaultAuth></DefaultAuth><Programs/></ChannelInfo>
I therefore suggest adding the following patch to filter out these channels.
Code:
diff --git a/lib/cppmyth/cppmyth/src/mythwsapi.cpp b/lib/cppmyth/cppmyth/src/mythwsapi.cpp
index bf100fc..9f11df8 100644
--- a/lib/cppmyth/cppmyth/src/mythwsapi.cpp
+++ b/lib/cppmyth/cppmyth/src/mythwsapi.cpp
@@ -747,8 +747,12 @@ ChannelListPtr WSAPI::GetChannelList75(uint32_t sourceid, bool onlyVisible)
ChannelPtr channel(new Channel()); // Using default constructor
// Bind the new channel
MythJSON::BindObject(chan, channel.get(), bindchan);
- if (!onlyVisible || channel->visible)
- ret->push_back(channel);
+ if (channel->chanId == 0) {
+ DBG(MYTH_DBG_WARN, "%s: Got channel with 0 id",__FUNCTION__);
+ } else {
+ if ((!onlyVisible || channel->visible))
+ ret->push_back(channel);
+ }
}
DBG(MYTH_DBG_DEBUG, "%s: received count(%d)\n", __FUNCTION__, count);
req_index += count; // Set next requested index
@@ -825,7 +829,11 @@ ChannelListPtr WSAPI::GetChannelList82(uint32_t sourceid, bool onlyVisible)
ChannelPtr channel(new Channel()); // Using default constructor
// Bind the new channel
MythJSON::BindObject(chan, channel.get(), bindchan);
- ret->push_back(channel);
+ if (channel->chanId == 0) {
+ DBG(MYTH_DBG_WARN, "%s: Got channel with 0 id",__FUNCTION__);
+ } else {
+ ret->push_back(channel);
+ }
}
DBG(MYTH_DBG_DEBUG, "%s: received count(%d)\n", __FUNCTION__, count);
req_index += count; // Set next requested index