2010-06-15, 07:55
They dropped TVSHOWVIEW in new versions
And i was never able to find a way to do joins on http queries, seems no more choice than go to json
Edit : Well seems i was drunk when i tried :p
Works ok to simulate the view
And i was never able to find a way to do joins on http queries, seems no more choice than go to json
Edit : Well seems i was drunk when i tried :p
Code:
http://ip:port/xbmcCmds/xbmcHttp?command=queryvideodatabase%28SELECT%20tvshow.*,%20path.strPath%20AS%20strPath,%20counts.totalcount%20AS%20totalCount,%20counts.watchedcount%20AS%20watchedCount,%20counts.totalcount=counts.watchedcount%20AS%20watched%20FROM%20tvshow%20JOIN%20tvshowlinkpath%20ON%20tvshow.idShow=tvshowlinkpath.idShow%20JOIN%20path%20ON%20path.idpath=tvshowlinkpath.idPath%20LEFT%20OUTER%20join%20%28SELECT%20tvshow.idShow%20AS%20idShow,%20count%281%29%20AS%20totalCount,%20count%28files.playCount%29%20AS%20watchedCount%20FROM%20tvshow%20JOIN%20tvshowlinkepisode%20ON%20tvshow.idShow=tvshowlinkepisode.idShow%20JOIN%20episode%20ON%20episode.idEpisode=tvshowlinkepisode.idEpisode%20JOIN%20files%20ON%20files.idFile=episode.idFile%20GROUP%20BY%20tvshow.idShow%29%20counts%20ON%20tvshow.idShow=counts.idShow%29
Works ok to simulate the view