MySQL - Watched flag not sticking
#1
Hi all,

I moved my library to MySQL yesterday so that I can share it with multiple XBMC instances. All is working fine, however once watching a movie the watched flag only stays on screen momentarily before disappearing again. I assumed that the call to write the flag to the database was failing somewhere however on checking I can see it has updated correctly.

Database entry in files table:

Code:
SELECT *
FROM `files`
WHERE `idFile` = 554

idFile    idPath     strFilename         playCount     lastPlayed         dateAdded
554       935        SomeFileName.mkv    1             5/1/2014 17:49     26/12/2013 3:11

Here is the relevant log details:

Code:
17:49:40 T:140382029031232   DEBUG: ------ Window Deinit (DialogContextMenu.xml) ------
17:49:40 T:140382029031232   DEBUG: Mysql execute: update files set playCount=1,lastPlayed='2014-01-05 17:49:40' where idFile=554
17:49:40 T:140382029031232   DEBUG: CAnnouncementManager - Announcement: OnUpdate from xbmc
17:49:40 T:140382029031232   DEBUG: GOT ANNOUNCEMENT, type: 16, from xbmc, message OnUpdate
17:49:40 T:140382029031232   DEBUG: CGUIMediaWindow::GetDirectory (videodb://2/2/4/-2/?tvshowid=4&xsp=%7b%22order%22%3a%7b%22direction%22%3a%22ascending%22%2c%22method%22%3a%22sorttitle%22%7d%2c%22rules%22%3a%7b%22and%22%3a%5b%7b%22field%22%3a%22path%22%2c%22operator%22%3a%22startswith%22%2c%22value%22%3a%5b%22nfs%3a%2f%2f192.168.0.19%2fMultimedia%2fTV%2f%22%5d%7d%5d%7d%2c%22type%22%3a%22tvshows%22%7d)
17:49:40 T:140382029031232   DEBUG:   ParentPath = [videodb://2/2/4/-2/?tvshowid=4&xsp=%7b%22order%22%3a%7b%22direction%22%3a%22ascending%22%2c%22method%22%3a%22sorttitle%22%7d%2c%22rules%22%3a%7b%22and%22%3a%5b%7b%22field%22%3a%22path%22%2c%22operator%22%3a%22startswith%22%2c%22value%22%3a%5b%22nfs%3a%2f%2f192.168.0.19%2fMultimedia%2fTV%2f%22%5d%7d%5d%7d%2c%22type%22%3a%22tvshows%22%7d]
17:49:40 T:140379881977600  NOTICE: Thread Jobworker start, auto delete: true
17:49:40 T:140379881977600   DEBUG: GetStackedTvShowList query: select idShow from tvshow where c00 like (select c00 from tvshow where idShow=4) order by idShow
17:49:40 T:140381491590912   DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "VideoLibrary.GetEpisodeDetails", "params": {"properties": ["streamdetails"], "episodeid":189 }, "id": 1}
17:49:40 T:140381491590912   DEBUG: JSONRPC: Calling videolibrary.getepisodedetails
17:49:40 T:140379881977600   DEBUG: GetStackedTvShowList query: select idShow from tvshow where c00 like (select c00 from tvshow where idShow=4) order by idShow
17:49:40 T:140379881977600   DEBUG: RunQuery took 18 ms for 13 items query: select * from episodeview  WHERE episodeview.idShow = 4
17:49:40 T:140379881977600   DEBUG: RunQuery took 10 ms for 0 items query: select * from movieview join movielinktvshow on movielinktvshow.idMovie=movieview.idMovie WHERE movielinktvshow.idShow = 4
17:49:40 T:140382029031232   DEBUG: WindowVideoNav::GetDirectory
17:49:40 T:140381491590912   DEBUG: script.videolanguage: {"id":1,"jsonrpc":"2.0","result":{"episodedetails":{"episodeid":189,"label":"Off The Record","streamdetails":{"audio":[{"channels":6,"codec":"ac3","language":""}],"subtitle":[],"video":[{"aspect":1.7777800559997558594,"codec":"h264","duration":2514,"height":720,"width":1280}]}}}}
17:49:40 T:140377477551872  NOTICE: Thread BackgroundLoader start, auto delete: false
17:49:41 T:140377477551872   DEBUG: Thread BackgroundLoader 140377477551872 terminating
17:49:41 T:140377477551872  NOTICE: Thread BackgroundLoader start, auto delete: false
17:49:41 T:140377477551872   DEBUG: Thread BackgroundLoader 140377477551872 terminating
17:49:41 T:140381491590912   DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "VideoLibrary.GetEpisodeDetails", "params": {"properties": ["streamdetails"], "episodeid":189 }, "id": 1}
17:49:41 T:140381491590912   DEBUG: JSONRPC: Calling videolibrary.getepisodedetails
17:49:41 T:140381491590912   DEBUG: script.videolanguage: {"id":1,"jsonrpc":"2.0","result":{"episodedetails":{"episodeid":189,"label":"Off The Record","streamdetails":{"audio":[{"channels":6,"codec":"ac3","language":""}],"subtitle":[],"video":[{"aspect":1.7777800559997558594,"codec":"h264","duration":2514,"height":720,"width":1280}]}}}}
17:49:46 T:140380997674752    INFO: JSONRPC Server: Disconnection detected
17:49:50 T:140382024656640   DEBUG: Suspended the Sink

Looking through the log it appears as though XBMC is updating the playCount and lastPlayed fields on the files table, but not on the episodeview table.

Code:
SELECT `idEpisode` , `idFile` , `playCount` , `lastPlayed`
FROM `episodeview`
WHERE `idFile` = 554

idEpisode    idFile    playCount    lastPlayed
188          554       NULL         NULL

Is there a setting I need somewhere to ensure the episodeview table gets updated as well, or is this a bug?


Thanks,
Jordan
Reply
#2
OK, the watch flag not sticking was annoying, but now I can't scan any new items in to my database. Going to remove it and start again tomorrow unless anyone has any better ideas?
Reply
#3
Dropped the databases and let one of my clients recreate them, rescanned all info in from my original nfo's and now everything is fine. Something must have gone funky in the original set up.
Reply

Logout Mark Read Team Forum Stats Members Help
MySQL - Watched flag not sticking0