Kodi Community Forum
[RELEASE] Watchlist script (was 'Adding Plex's 'On Deck' feature to XBMC') - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+---- Forum: Skin helper addons (https://forum.kodi.tv/forumdisplay.php?fid=300)
+---- Thread: [RELEASE] Watchlist script (was 'Adding Plex's 'On Deck' feature to XBMC') (/showthread.php?tid=113702)



- fmronan - 2012-01-31

When I watch a TV series and launches watchlist is good, but when I restart xbmc, the list is empty again, test with Aeon Nox and Glass, same problem


- `Black - 2012-01-31

Can't reproduce both problems... could you post a debug log?


- fmronan - 2012-01-31

no error just empty
Code:
14:12:14 T:2825882480   DEBUG: GetStackedTvShowList query: select idShow from tvshow where c00 like (select c00 from tvshow where idShow=6) order by idShow
14:12:14 T:2825882480   DEBUG: RunQuery took 1 ms for 5 items query: select * from episodeview where idShow = 6
14:12:14 T:2825882480   DEBUG: RunQuery took 1 ms for 0 items query: select * from movieview join movielinktvshow on movielinktvshow.idMovie=movieview.idMovie where movielinktvshow.idShow = 6
14:12:14 T:2825882480   DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "VideoLibrary.GetSeasons", "params": {"properties": ["season", "thumbnail"], "tvshowid":2}, "id": 1}
14:12:14 T:2825882480   DEBUG: JSONRPC: Calling videolibrary.getseasons
14:12:14 T:2825882480   DEBUG: GetStackedTvShowList query: select idShow from tvshow where c00 like (select c00 from tvshow where idShow=2) order by idShow
14:12:14 T:2825882480   DEBUG: RunQuery took 1 ms for 2 items query: select episode.c12,path.strPath,tvshow.c00,tvshow.c08,tvshow.c14,tvshow.c13,count(1),count(files.playCount) from episode join tvshowlinkepisode on tvshowlinkepisode.idEpisode=episode.idEpisode join tvshow on tvshow.idShow=tvshowlinkepisode.idShow join files on files.idFile=episode.idFile  join tvshowlinkpath on tvshowlinkpath.idShow = tvshow.idShow join path on path.idPath = tvshowlinkpath.idPath where tvshow.idShow = 2  group by episode.c12
14:12:14 T:2825882480   DEBUG: RunQuery took 1 ms for 0 items query: select * from movieview join movielinktvshow on movielinktvshow.idMovie=movieview.idMovie where movielinktvshow.idShow = 2
14:12:14 T:2825882480   DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "VideoLibrary.GetEpisodes", "params": {"properties": ["playcount", "plot", "season", "episode", "showtitle", "thumbnail", "fanart", "file", "lastplayed", "rating"], "sort": {"method": "episode"}, "tvshowid":2}, "id": 1}
14:12:14 T:2825882480   DEBUG: JSONRPC: Calling videolibrary.getepisodes
14:12:14 T:2825882480   DEBUG: GetStackedTvShowList query: select idShow from tvshow where c00 like (select c00 from tvshow where idShow=2) order by idShow
14:12:14 T:2825882480   DEBUG: RunQuery took 1 ms for 14 items query: select * from episodeview where idShow = 2
14:12:14 T:2825882480   DEBUG: RunQuery took 1 ms for 0 items query: select * from movieview join movielinktvshow on movielinktvshow.idMovie=movieview.idMovie where movielinktvshow.idShow = 2
14:12:14 T:2825882480   DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "VideoLibrary.GetSeasons", "params": {"properties": ["season", "thumbnail"], "tvshowid":1}, "id": 1}
14:12:14 T:2825882480   DEBUG: JSONRPC: Calling videolibrary.getseasons
14:12:14 T:2825882480   DEBUG: GetStackedTvShowList query: select idShow from tvshow where c00 like (select c00 from tvshow where idShow=1) order by idShow
14:12:14 T:2825882480   DEBUG: RunQuery took 1 ms for 1 items query: select episode.c12,path.strPath,tvshow.c00,tvshow.c08,tvshow.c14,tvshow.c13,count(1),count(files.playCount) from episode join tvshowlinkepisode on tvshowlinkepisode.idEpisode=episode.idEpisode join tvshow on tvshow.idShow=tvshowlinkepisode.idShow join files on files.idFile=episode.idFile  join tvshowlinkpath on tvshowlinkpath.idShow = tvshow.idShow join path on path.idPath = tvshowlinkpath.idPath where tvshow.idShow = 1  group by episode.c12
14:12:14 T:2825882480   DEBUG: RunQuery took 1 ms for 0 items query: select * from movieview join movielinktvshow on movielinktvshow.idMovie=movieview.idMovie where movielinktvshow.idShow = 1
14:12:14 T:2825882480   DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "VideoLibrary.GetEpisodes", "params": {"properties": ["playcount", "plot", "season", "episode", "showtitle", "thumbnail", "fanart", "file", "lastplayed", "rating"], "sort": {"method": "episode"}, "tvshowid":1}, "id": 1}
14:12:14 T:2825882480   DEBUG: JSONRPC: Calling videolibrary.getepisodes
14:12:14 T:2825882480   DEBUG: GetStackedTvShowList query: select idShow from tvshow where c00 like (select c00 from tvshow where idShow=1) order by idShow
14:12:14 T:2825882480   DEBUG: RunQuery took 0 ms for 6 items query: select * from episodeview where idShow = 1
14:12:14 T:2825882480   DEBUG: RunQuery took 1 ms for 0 items query: select * from movieview join movielinktvshow on movielinktvshow.idMovie=movieview.idMovie where movielinktvshow.idShow = 1
14:12:14 T:2825882480   DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "VideoLibrary.GetSeasons", "params": {"properties": ["season", "thumbnail"], "tvshowid":5}, "id": 1}
14:12:14 T:2825882480   DEBUG: JSONRPC: Calling videolibrary.getseasons
14:12:14 T:2825882480   DEBUG: GetStackedTvShowList query: select idShow from tvshow where c00 like (select c00 from tvshow where idShow=5) order by idShow
14:12:14 T:2825882480   DEBUG: RunQuery took 0 ms for 3 items query: select episode.c12,path.strPath,tvshow.c00,tvshow.c08,tvshow.c14,tvshow.c13,count(1),count(files.playCount) from episode join tvshowlinkepisode on tvshowlinkepisode.idEpisode=episode.idEpisode join tvshow on tvshow.idShow=tvshowlinkepisode.idShow join files on files.idFile=episode.idFile  join tvshowlinkpath on tvshowlinkpath.idShow = tvshow.idShow join path on path.idPath = tvshowlinkpath.idPath where tvshow.idShow = 5  group by episode.c12
14:12:14 T:2825882480   DEBUG: RunQuery took 0 ms for 0 items query: select * from movieview join movielinktvshow on movielinktvshow.idMovie=movieview.idMovie where movielinktvshow.idShow = 5
14:12:14 T:2825882480   DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "VideoLibrary.GetEpisodes", "params": {"properties": ["playcount", "plot", "season", "episode", "showtitle", "thumbnail", "fanart", "file", "lastplayed", "rating"], "sort": {"method": "episode"}, "tvshowid":5}, "id": 1}
14:12:14 T:2825882480   DEBUG: JSONRPC: Calling videolibrary.getepisodes
14:12:14 T:2825882480   DEBUG: GetStackedTvShowList query: select idShow from tvshow where c00 like (select c00 from tvshow where idShow=5) order by idShow
14:12:14 T:2825882480   DEBUG: RunQuery took 1 ms for 30 items query: select * from episodeview where idShow = 5
14:12:14 T:2825882480   DEBUG: RunQuery took 0 ms for 0 items query: select * from movieview join movielinktvshow on movielinktvshow.idMovie=movieview.idMovie where movielinktvshow.idShow = 5
14:12:14 T:2825882480   DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "VideoLibrary.GetSeasons", "params": {"properties": ["season", "thumbnail"], "tvshowid":4}, "id": 1}
14:12:14 T:2825882480   DEBUG: JSONRPC: Calling videolibrary.getseasons
14:12:14 T:2825882480   DEBUG: GetStackedTvShowList query: select idShow from tvshow where c00 like (select c00 from tvshow where idShow=4) order by idShow
14:12:14 T:2825882480   DEBUG: RunQuery took 0 ms for 1 items query: select episode.c12,path.strPath,tvshow.c00,tvshow.c08,tvshow.c14,tvshow.c13,count(1),count(files.playCount) from episode join tvshowlinkepisode on tvshowlinkepisode.idEpisode=episode.idEpisode join tvshow on tvshow.idShow=tvshowlinkepisode.idShow join files on files.idFile=episode.idFile  join tvshowlinkpath on tvshowlinkpath.idShow = tvshow.idShow join path on path.idPath = tvshowlinkpath.idPath where tvshow.idShow = 4  group by episode.c12
14:12:14 T:2825882480   DEBUG: RunQuery took 1 ms for 0 items query: select * from movieview join movielinktvshow on movielinktvshow.idMovie=movieview.idMovie where movielinktvshow.idShow = 4
14:12:14 T:2825882480   DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "VideoLibrary.GetEpisodes", "params": {"properties": ["playcount", "plot", "season", "episode", "showtitle", "thumbnail", "fanart", "file", "lastplayed", "rating"], "sort": {"method": "episode"}, "tvshowid":4}, "id": 1}
14:12:14 T:2825882480   DEBUG: JSONRPC: Calling videolibrary.getepisodes
14:12:14 T:2825882480   DEBUG: GetStackedTvShowList query: select idShow from tvshow where c00 like (select c00 from tvshow where idShow=4) order by idShow
14:12:14 T:2825882480   DEBUG: RunQuery took 1 ms for 12 items query: select * from episodeview where idShow = 4
14:12:14 T:2825882480   DEBUG: RunQuery took 1 ms for 0 items query: select * from movieview join movielinktvshow on movielinktvshow.idMovie=movieview.idMovie where movielinktvshow.idShow = 4
14:12:14 T:2825882480   DEBUG: script.watchlist: tv show list: 15 items
14:12:14 T:2825882480   DEBUG: script.watchlist: episode list: 0 items



- `Black - 2012-01-31

Do you have any shows, where you at least started an episode or have watched an episode and have at least one new episode?

@smush420
That was a problem I fixed yesterday... should work with the version from post #434


- fmronan - 2012-01-31

I use the last version of your scrit and I have unwatched episode two with dexter. your script run fast now with try:
import json as simplejson
except: import simplejson
Image


- smush420 - 2012-01-31

hey `Black, the version in post 434 is the one I tried.

here's a log

http://pastebin.com/8j8Xq3f0


- `Black - 2012-01-31

Forgot to remove some logs, there was an encoding error... please try script.watchlist-0.1.9.zip.


- smush420 - 2012-01-31

Same problem still not working


- ezechiel1917 - 2012-01-31

`Black Wrote:Forgot to remove some logs, there was an encoding error... please try script.watchlist-0.1.9.zip.

this version fixed partially watched episodes of new shows previously not in the list, but episodes thumb is not refreshed (default episode image is shown instead).

however first I had to revert
Code:
try: import json as simplejson
except: import simplejson

back to
Code:
import simplejson

because I was getting script error at startup:
Quote:17:29:43 T:2902465392 ERROR: Traceback (most recent call last):
File "/home/xbmc/.xbmc/addons/script.watchlist/default.py", line 550, in <module>
Main()
File "/home/xbmc/.xbmc/addons/script.watchlist/default.py", line 29, in __init__
self._fetch_info()
File "/home/xbmc/.xbmc/addons/script.watchlist/default.py", line 54, in _fetch_info
self._fetch_tvshows()
File "/home/xbmc/.xbmc/addons/script.watchlist/default.py", line 111, in _fetch_tvshows
json_response = simplejson.loads(json_query)
AttributeError: 'module' object has no attribute 'loads'
17:29:43 T:2902465392 INFO: -->End of Python script error report<--
17:29:43 T:2902465392 INFO: Python script stopped
17:29:43 T:2902465392 DEBUG: Thread XBPyThread 2902465392 terminating

any idea why?


- `Black - 2012-01-31

smush420 Wrote:Same problem still not working

New debug log please.

@ezechiel1917
You're using a pvr build, right? Please try with the Eden beta2. Maybe it's a Linux problem. I'll fix the thumbnail problem.


- Martijn - 2012-01-31

Working without problems so far. Custom-built from master git branch yesterday.


- FrostBox - 2012-01-31

ezechiel1917 Wrote:this version fixed partially watched episodes of new shows previously not in the list, but episodes thumb is not refreshed (default episode image is shown instead).

however first I had to revert
Code:
try: import json as simplejson
except: import simplejson
back to
Code:
import simplejson
because I was getting script error at startup:


any idea why?

wow! bizarre bug!
which version of xbmc and OS you use and python version on xbmc!

try this
PHP Code:
try:
    
import json as simplejson
    assert hasattr
simplejson"loads" )
except:
    
import simplejson 



- Hitcher - 2012-01-31

Just a thought but if you're trying to install from ZIP doesn't XBMC use the one found in /packages if the versions match?


- fmronan - 2012-01-31

same for me eden beta2 and ubuntu


- smush420 - 2012-01-31

Here ya go black

http://pastebin.com/bqYPczU0