Great. Thanks. I don't really understand the whole TV/Radio situation. It sounds like you can't have both a channel 5 radio and channel 5 TV. Is that right? Weird, but there must be some way around it?
Anyway please try the attached update to the XSql plugin which should help to auto-generate the payloadxml for radio and tv channels.
I suggest you delete your options.xml from the XSql plugins folder, but if you don't want to do that, then edit your options.xml in the plugin folder it and add the following entries to the <genXML> sectino so it looks like this:
<genXml>
<genXmlParam dataType="Music" queryString="select idArtist,strArtist from artist" xmlFilename="xbmcArtists" useSubStrings="True" />
<genXmlParam dataType="Music" queryString="select idAlbum,strAlbum from album" xmlFilename="xbmcAlbums" useSubStrings="True" />
<genXmlParam dataType="Music" queryString="select idSong,strTitle from song" xmlFilename="xbmcSongs" useSubStrings="True" />
<genXmlParam dataType="Music" queryString="select idGenre,strGenre from genre" xmlFilename="xbmcGenres" useSubStrings="False" />
<genXmlParam dataType="Music" queryString="select distinct idSong,strTitle,strArtists from songview where strArtists!=""" xmlFilename="XbmcSongsByArtist" useSubStrings="False" />
<genXmlParam dataType="Video" queryString="select idShow,c00 from tvshow" xmlFilename="xbmcTvShowTitles" useSubStrings="True" />
<genXmlParam dataType="Video" queryString="select idMovie,c00 from movie" xmlFilename="xbmcMovieIDs" useSubStrings="True" />
<genXmlParam dataType="Video" queryString="select strpath||strfilename,c00 from movieview" xmlFilename="xbmcMovies" useSubStrings="True" />
<genXmlParam dataType="TV" queryString="select idChannel, sChannelName from channels where bIsRadio=1" xmlFilename="xbmcRadioChannels" useSubStrings="true" />
<genXmlParam dataType="TV" queryString="select idChannel, sChannelName from channels where bIsRadio=0" xmlFilename="xbmcTvChannels" useSubStrings="true" />
</genXml>
the new lines are:
<genXmlParam dataType="TV" queryString="select idChannel, sChannelName from channels where bIsRadio=1" xmlFilename="xbmcRadioChannels" useSubStrings="true" />
<genXmlParam dataType="TV" queryString="select idChannel, sChannelName from channels where bIsRadio=0" xmlFilename="xbmcTvChannels" useSubStrings="true" />
I hope it's clear but if you need help let me know. Note that you can customize this depending on your needs. For example if you just want one command for TV and Radio you could create a single query, instead of the two separate ones
example:
<genXmlParam dataType="TV" queryString="select idChannel, sChannelName from channels" xmlFilename="xbmcAllChannels" useSubStrings="true" />