Jump to content

Trakt not updating properly


foghat

Recommended Posts

Hi,

 

Does anyone have trakt working properly with xbmb3c?  It works fine when viewing using MBT or MBS.

 

I have it installed in MBS.  If I watch something in kodi, the watched status properly updates on MBS, but the trakt widget in my signature does not update. 

 

Looking at the trakt website, it seems anything I watch in Kodi is showing up as watched.  However it is marked as 'manually marked as seen' vs. 'scrobbled from Media Browser'

 

I am assuming the' manually marked as watched' is what is causing the widget to not update?

 

Anyone have any thoughts?  I guess I could install the xbmc trakt plugin - though I like to keep things as centralized with MBS as possible.

Link to comment
Share on other sites

Redshirt

If your making a call to the playback stopped event as per normal. The trakt server plugin will report completion of the movie. I have no idea what any trakt plugin installed in xbmc will do though. I think that's where the issue is. The wrong plugin.

Link to comment
Share on other sites

xnappo

But he says he has the Trakt server plugin, not the XBMC one.

 

I checked our code, looks right to me:

    def playbackStopped(self, itemId, ticks):
        if(self.client != None):
            try:
                self.logMsg("Sending Playback Stopped")
                messageData = {}
                messageData["MessageType"] = "PlaybackStopped"
                messageData["Data"] = itemId + "|" + str(ticks)
                messageString = json.dumps(messageData)
                self.client.send(messageString)
            except Exception, e:
                self.logMsg("Exception : " + str(e), level=0)            
        else:
            self.logMsg("Sending Playback Stopped NO Object ERROR")

@@foghat - have you tried the latest version (0.9.603)?  We have made some changes in correcting some headers we send to the server, there is a slight chance that will make a difference.

 

xnappo

Edited by xnappo
Link to comment
Share on other sites

I'd love to see a server log. So I can see if the trakt plugin is even being notified.

 

Here you go. Looks like it is in touch during playback.  fyi, I had fast forwarded the show and then pressed stop at closing credits.

 

I'm no dev guy.  But maybe the timeout errors at the end there is just bad luck?

server-63550051200.txt

Link to comment
Share on other sites

Redshirt

Looks like the Trakt plugin is trying to scrobble to trakt.tv, but the request is timing out. I don't log the message body when I post, so can't say if the info is malformed or if it's something with trakt.tv ignoring the requests now.

Link to comment
Share on other sites

Redshirt

Actually @@xnappo

 

Looking at the Trakt logging. It's possible the playback position may not be reported to the server. So the plugin isn't even scrobbling. Instead it's just sending notification that the client is no longer watching anything.

Link to comment
Share on other sites

But he says he has the Trakt server plugin, not the XBMC one.

 

I checked our code, looks right to me:

    def playbackStopped(self, itemId, ticks):
        if(self.client != None):
            try:
                self.logMsg("Sending Playback Stopped")
                messageData = {}
                messageData["MessageType"] = "PlaybackStopped"
                messageData["Data"] = itemId + "|" + str(ticks)
                messageString = json.dumps(messageData)
                self.client.send(messageString)
            except Exception, e:
                self.logMsg("Exception : " + str(e), level=0)            
        else:
            self.logMsg("Sending Playback Stopped NO Object ERROR")

@@foghat - have you tried the latest version (0.9.603)?  We have made some changes in correcting some headers we send to the server, there is a slight chance that will make a difference.

 

xnappo

 

I will have to check the version when I get home.  I did just install kodi and setup xbmb3c yesterday.  Using this repository.

 

http://cdn.mediabrow...bmb3c-1.0.2.zip

 

To confirm:

- I do not have the xbmc trakt plugin installed.  Only on MBS.

- MBS is reporting as watched

- trakt MBS server plugin must be reporting as watched, as I can see the show is showing as watched on trakt website. 

 

However, how it is marked as watched on trakt site is different when movie was watched in kodi vs. MBT:

- kodi = 'manually marked as seen'

- MBT/MBS = 'scrobbled from Media Browser'

Link to comment
Share on other sites

Ok, I think I might see the problem.

 

.603 should be out by now.  Make sure you are on .603.

 

Then open:

 

plugin.video.xbmb3c\lib\service.py

 

Look for line 238 indicated with ----> below:

                    if(gotDeleted == 0):
                        setPosition(positionurl + '/Progress?PositionTicks=0', 'POST')
                        if(newWebSocketThread != None):
                            newWebSocketThread.playbackStopped(item_id, str(0))
---->                   markWatched(watchedurl)

Comment out that 'markedWatched' by putting a '#' before it.  This line is explicitly marking the file as watched rather than relying on the server's math.  Maybe that is the problem.

 

I don't use Trakt so can't test myself.

 

xnappo

How do I get to .603?  I am at .602.  Uninstalling and then reinstalling does not do it.  The update option does not seem to do anything.

Link to comment
Share on other sites

xnappo

Ok, I think I might see the problem.

 

.603 should be out by now.  Make sure you are on .603.

 

Then open:

 

plugin.video.xbmb3c\lib\service.py

 

Look for line 238 indicated with ----> below:

                    if(gotDeleted == 0):
                        setPosition(positionurl + '/Progress?PositionTicks=0', 'POST')
                        if(newWebSocketThread != None):
                            newWebSocketThread.playbackStopped(item_id, str(0))
---->                   markWatched(watchedurl)

Comment out that 'markedWatched' by putting a '#' before it.  This line is explicitly marking the file as watched rather than relying on the server's math.  Maybe that is the problem.

 

I don't use Trakt so can't test myself.

 

xnappo

Edited by xnappo
Link to comment
Share on other sites

xnappo

How do I get to .603?  I am at .602.  Uninstalling and then reinstalling does not do it.  The update option does not seem to do anything.

Go into System->AddOns and right click the XBMB3C repository and do a 'force refresh'.

 

Or something like that - going from memory.

 

xnappo

Link to comment
Share on other sites

Ok, I think I might see the problem.

 

.603 should be out by now.  Make sure you are on .603.

 

Then open:

 

plugin.video.xbmb3c\lib\service.py

 

Look for line 238 indicated with ----> below:

                    if(gotDeleted == 0):
                        setPosition(positionurl + '/Progress?PositionTicks=0', 'POST')
                        if(newWebSocketThread != None):
                            newWebSocketThread.playbackStopped(item_id, str(0))
---->                   markWatched(watchedurl)

Comment out that 'markedWatched' by putting a '#' before it.  This line is explicitly marking the file as watched rather than relying on the server's math.  Maybe that is the problem.

 

I don't use Trakt so can't test myself.

 

xnappo

 

Hopefully I can give it a try tonight - in process of getting house painted so bit of a war zone right now. 

 

Trakt account is free - in case you want to give it a go on your own before.  Just install the MBS plugin, enter your trakt account info, have kodi 'watch' a show, then check your profile on trakt, select the 'more' option for whatever you viewed (tv or movie) and see what it says.

 

I am betting if it says 'scrobbled from Media Browser', then the signature widget will work properly.

Link to comment
Share on other sites

Redshirt

I suspect the solution xnappo mentioned will stop the the xbmc trakt plugin from marking things as seen. Now just to figure out why the trakt server plugin isn't sending the scrobble to trakt.tv on playback completion.

Link to comment
Share on other sites

xnappo

@@Redshirt - he isn't using the XBMC Trakt plugin, just the server plugin.  We are currently sending the server 'playback stopped' AND sending it 'marked item watched'.  The change will allow the server to make the determination if it is close enough to the end to mark watched.

 

xnappo

Link to comment
Share on other sites

Redshirt

Your right. My mistake. I saw "widget" in the OP and thought it was something running in the client. ...me shuffles away.

Edited by Redshirt
  • Like 1
Link to comment
Share on other sites

@@foghat - yes I know Trakt is free, but I could care less about this, so will rely on you to test :D

 

 

Fair enough.  So I just have to restart kodi after commenting out that line to make sure it sees the change?

Link to comment
Share on other sites

K, so i did that. 

 

Now it doesn't even show up as watched in trakt at all.  It is still showing as watched in MBS.  So I don't know.  Maybe it takes more time for the status to update in trakt.  Usually it is pretty quick though.

 

Weird thing is, while I was watching the show, it was showing as 'currently watching' on trakt site.

 

I don't care about this that much either.  I suspect having that line commented out and letting MBS handle it is the way to go though.  Maybe @@Luke will comment?

Link to comment
Share on other sites

Redshirt

I'd love to see a server log. So I can see if the trakt plugin is even being notified.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...