Kodi Community Forum

Full Version: [RELEASE] trakt.tv tv/movie scrobbler
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2015-02-13, 21:55)Razze Wrote: [ -> ]If there are no more errors surfacing, we might be good to go.
Has anyone used it with gotham, multipart episodes, multipart films and can confirm it works?
Will check myself if I got the time.

(2015-02-13, 20:54)Piers Wrote: [ -> ]
(2015-02-13, 17:54)Razze Wrote: [ -> ]Not in the initial 3.0.0 release. As most people seem to care most about scrobble and sync and I want to get that out asap.
Contextmenus are gone too. Can't really say much about these as I never used them and don't really know what they did.


How could I miss that? Big Grin
Not really sure how to write a guide for skinners :/

There's not any need for a guide, you don't need to do anything Smile Any skinner is welcome to take the 1080 version I've made including the textures. It should serve as a thought-out base for them to build upon, if they wish to do so. Or they can take the 720 version included with the add-on and do the same, along with the textures if they wish.

Did you decide about whether or not to include a secondary skin option (a dark version)?

Maybe Martijn can answer as to whether or not that works the same way as a regular skin, since he appears to pop in here quite often.


Have you considered starting a new thread yet for your version? It would certainly make sense - maybe keeping this one open for development talk. Yours, from what I can see after using it for a couple of days, is stable. I have found a couple of issues but those are all relating to issues with trakt servers and not the add-on.

Don't really see the reason for a darker version as the screen is dimming, but if you want to do it. Just add the images and a new xml **Dark.xml referencing the new images.
Then I can add a setting and to the needed things.

(2015-02-13, 21:00)vc4u Wrote: [ -> ]Guys,

I've just updated Trakt addon from Razzes Dev branch from github. I'm now receiving following error lines when Kodi starts in kodi debug log.

Code:
00:15:50 T:98436   ERROR: [script.trakt] Starting new HTTPS connection (1): api-v2launch.trakt.tv
00:15:50 T:98436  NOTICE: .
00:15:55 T:98436   ERROR: [script.trakt] "POST /auth/login HTTP/1.1" 200 None
00:15:55 T:98436  NOTICE: .

And then the log shows this error message when I Launch Trakt plugin.

Code:
00:23:47 T:101312   ERROR: [script.trakt] Resetting dropped connection: api-v2launch.trakt.tv
00:23:47 T:101312  NOTICE: .
00:23:52 T:101312   ERROR: [script.trakt] "GET /sync/collection/movies HTTP/1.1" 200 None
00:23:52 T:101312  NOTICE: .
00:23:55 T:101312   ERROR: [script.trakt] "GET /sync/watched/movies HTTP/1.1" 200 None
00:23:55 T:101312  NOTICE: .
00:24:00 T:101312   ERROR: [script.trakt] "POST /sync/collection HTTP/1.1" 201 None
00:24:00 T:101312  NOTICE: .
00:24:04 T:101312   ERROR: [script.trakt] "POST /sync/history HTTP/1.1" 201 None
00:24:04 T:101312  NOTICE: .
00:24:35 T:101312   ERROR: [script.trakt] "GET /sync/collection/shows HTTP/1.1" 200 None
00:24:35 T:101312  NOTICE: .
00:24:50 T:101312   ERROR: [script.trakt] "GET /sync/watched/shows HTTP/1.1" 200 None
00:24:50 T:101312  NOTICE: .
00:24:52 T:101312   ERROR: [script.trakt] "POST /sync/collection HTTP/1.1" 201 None
00:24:52 T:101312  NOTICE: .
00:24:52 T:101312   ERROR: [script.trakt] "POST /sync/collection HTTP/1.1" 201 None
00:24:52 T:101312  NOTICE: .
00:25:17 T:101312   ERROR: Exception in thread trakt-sync:
                                            Traceback (most recent call last):
                                              File "C:\Program Files (x86)\Kodi\system\python\Lib\threading.py", line 810, in __bootstrap_inner
                                                self.run()
                                              File "C:\Users\Varun\AppData\Roaming\Kodi\addons\script.trakt\service.py", line 290, in run
                                                sync.sync()
                                              File "C:\Users\Varun\AppData\Roaming\Kodi\addons\script.trakt\sync.py", line 760, in sync
                                                self.__syncEpisodes()
                                              File "C:\Users\Varun\AppData\Roaming\Kodi\addons\script.trakt\sync.py", line 446, in __syncEpisodes
                                                self.__addEpisodesToTraktWatched(kodiShowsWatched, traktShowsWatched)
                                              File "C:\Users\Varun\AppData\Roaming\Kodi\addons\script.trakt\sync.py", line 237, in __addEpisodesToTraktWatched
                                                result = self.traktapi.addToHistory(s)
                                              File "C:\Users\Varun\AppData\Roaming\Kodi\addons\script.trakt\traktapi.py", line 151, in addToHistory
                                                result = Trakt['sync/history'].add(mediaObject)
                                              File "C:\Users\Varun\AppData\Roaming\Kodi\addons\script.trakt\trakt\interfaces\base\__init__.py", line 18, in wrap
                                                return func(*args, **kwargs)
                                              File "C:\Users\Varun\AppData\Roaming\Kodi\addons\script.trakt\trakt\interfaces\sync\core\mixins.py", line 49, in add
                                                data=items
                                              File "C:\Users\Varun\AppData\Roaming\Kodi\addons\script.trakt\trakt\core\http.py", line 89, in post
                                                return self.request('POST', path, params, data, **kwargs)
                                              File "C:\Users\Varun\AppData\Roaming\Kodi\addons\script.trakt\trakt\core\http.py", line 66, in request
                                                response = self.session.send(prepared, timeout=timeout)
                                              File "C:\Users\Varun\AppData\Roaming\Kodi\addons\script.module.requests\lib\requests\sessions.py", line 569, in send
                                                r = adapter.send(request, **kwargs)
                                              File "C:\Users\Varun\AppData\Roaming\Kodi\addons\script.module.requests\lib\requests\adapters.py", line 422, in send
                                                raise ReadTimeout(e, request=request)
                                            ReadTimeout: HTTPSConnectionPool(host='api-v2launch.trakt.tv', port=443): Read timed out. (read timeout=24)

This doesn't seem like your on the latest version. Just had a case where this happend and it was solved by updating.

(2015-02-13, 21:55)Bon3 Wrote: [ -> ]Hi Guys, just updated Kodi to 14.1 and installed SIX + REQUESTS.. But now im getting trakt script error.. Smile worked before updating like a charm, do i need anything other than six and requests?

Should be everything care to give us a log?

I don't see a need for a darker skin, but someone mentioned it. If there's a need after release then it can be added. Smile
(2015-02-14, 00:16)Piers Wrote: [ -> ]
(2015-02-13, 21:55)Razze Wrote: [ -> ]If there are no more errors surfacing, we might be good to go.
Has anyone used it with gotham, multipart episodes, multipart films and can confirm it works?
Will check myself if I got the time.

(2015-02-13, 20:54)Piers Wrote: [ -> ]There's not any need for a guide, you don't need to do anything Smile Any skinner is welcome to take the 1080 version I've made including the textures. It should serve as a thought-out base for them to build upon, if they wish to do so. Or they can take the 720 version included with the add-on and do the same, along with the textures if they wish.

Did you decide about whether or not to include a secondary skin option (a dark version)?

Maybe Martijn can answer as to whether or not that works the same way as a regular skin, since he appears to pop in here quite often.


Have you considered starting a new thread yet for your version? It would certainly make sense - maybe keeping this one open for development talk. Yours, from what I can see after using it for a couple of days, is stable. I have found a couple of issues but those are all relating to issues with trakt servers and not the add-on.

Don't really see the reason for a darker version as the screen is dimming, but if you want to do it. Just add the images and a new xml **Dark.xml referencing the new images.
Then I can add a setting and to the needed things.

(2015-02-13, 21:00)vc4u Wrote: [ -> ]Guys,

I've just updated Trakt addon from Razzes Dev branch from github. I'm now receiving following error lines when Kodi starts in kodi debug log.

Code:
00:15:50 T:98436   ERROR: [script.trakt] Starting new HTTPS connection (1): api-v2launch.trakt.tv
00:15:50 T:98436  NOTICE: .
00:15:55 T:98436   ERROR: [script.trakt] "POST /auth/login HTTP/1.1" 200 None
00:15:55 T:98436  NOTICE: .

And then the log shows this error message when I Launch Trakt plugin.

Code:
00:23:47 T:101312   ERROR: [script.trakt] Resetting dropped connection: api-v2launch.trakt.tv
00:23:47 T:101312  NOTICE: .
00:23:52 T:101312   ERROR: [script.trakt] "GET /sync/collection/movies HTTP/1.1" 200 None
00:23:52 T:101312  NOTICE: .
00:23:55 T:101312   ERROR: [script.trakt] "GET /sync/watched/movies HTTP/1.1" 200 None
00:23:55 T:101312  NOTICE: .
00:24:00 T:101312   ERROR: [script.trakt] "POST /sync/collection HTTP/1.1" 201 None
00:24:00 T:101312  NOTICE: .
00:24:04 T:101312   ERROR: [script.trakt] "POST /sync/history HTTP/1.1" 201 None
00:24:04 T:101312  NOTICE: .
00:24:35 T:101312   ERROR: [script.trakt] "GET /sync/collection/shows HTTP/1.1" 200 None
00:24:35 T:101312  NOTICE: .
00:24:50 T:101312   ERROR: [script.trakt] "GET /sync/watched/shows HTTP/1.1" 200 None
00:24:50 T:101312  NOTICE: .
00:24:52 T:101312   ERROR: [script.trakt] "POST /sync/collection HTTP/1.1" 201 None
00:24:52 T:101312  NOTICE: .
00:24:52 T:101312   ERROR: [script.trakt] "POST /sync/collection HTTP/1.1" 201 None
00:24:52 T:101312  NOTICE: .
00:25:17 T:101312   ERROR: Exception in thread trakt-sync:
                                            Traceback (most recent call last):
                                              File "C:\Program Files (x86)\Kodi\system\python\Lib\threading.py", line 810, in __bootstrap_inner
                                                self.run()
                                              File "C:\Users\Varun\AppData\Roaming\Kodi\addons\script.trakt\service.py", line 290, in run
                                                sync.sync()
                                              File "C:\Users\Varun\AppData\Roaming\Kodi\addons\script.trakt\sync.py", line 760, in sync
                                                self.__syncEpisodes()
                                              File "C:\Users\Varun\AppData\Roaming\Kodi\addons\script.trakt\sync.py", line 446, in __syncEpisodes
                                                self.__addEpisodesToTraktWatched(kodiShowsWatched, traktShowsWatched)
                                              File "C:\Users\Varun\AppData\Roaming\Kodi\addons\script.trakt\sync.py", line 237, in __addEpisodesToTraktWatched
                                                result = self.traktapi.addToHistory(s)
                                              File "C:\Users\Varun\AppData\Roaming\Kodi\addons\script.trakt\traktapi.py", line 151, in addToHistory
                                                result = Trakt['sync/history'].add(mediaObject)
                                              File "C:\Users\Varun\AppData\Roaming\Kodi\addons\script.trakt\trakt\interfaces\base\__init__.py", line 18, in wrap
                                                return func(*args, **kwargs)
                                              File "C:\Users\Varun\AppData\Roaming\Kodi\addons\script.trakt\trakt\interfaces\sync\core\mixins.py", line 49, in add
                                                data=items
                                              File "C:\Users\Varun\AppData\Roaming\Kodi\addons\script.trakt\trakt\core\http.py", line 89, in post
                                                return self.request('POST', path, params, data, **kwargs)
                                              File "C:\Users\Varun\AppData\Roaming\Kodi\addons\script.trakt\trakt\core\http.py", line 66, in request
                                                response = self.session.send(prepared, timeout=timeout)
                                              File "C:\Users\Varun\AppData\Roaming\Kodi\addons\script.module.requests\lib\requests\sessions.py", line 569, in send
                                                r = adapter.send(request, **kwargs)
                                              File "C:\Users\Varun\AppData\Roaming\Kodi\addons\script.module.requests\lib\requests\adapters.py", line 422, in send
                                                raise ReadTimeout(e, request=request)
                                            ReadTimeout: HTTPSConnectionPool(host='api-v2launch.trakt.tv', port=443): Read timed out. (read timeout=24)

This doesn't seem like your on the latest version. Just had a case where this happend and it was solved by updating.

(2015-02-13, 21:55)Bon3 Wrote: [ -> ]Hi Guys, just updated Kodi to 14.1 and installed SIX + REQUESTS.. But now im getting trakt script error.. Smile worked before updating like a charm, do i need anything other than six and requests?

Should be everything care to give us a log?

I don't see a need for a darker skin, but someone mentioned it. If there's a need after release then it can be added. Smile
I mentioned that the new graphics, while awesome, didnt look as i expected them to with my current kodi setup, its a preference thing and i completely understand that it is probably outside the scope of this effort and into the realm of skins, i also have the ability of customizing it myself to get it just the way i want it, bottom line is that i personally want things a lot darker and a bit smaller and/or more compact, ive apologized once already because i brought this up after very vocally supporting the new graphics but i do so again now, it was hard to tell how it looked until i saw it all together, afaic the subject can be dropped if deemed out of scope, sorry for bringing it up
(2015-02-13, 21:55)Razze Wrote: [ -> ]If there are no more errors surfacing, we might be good to go.
Has anyone used it with gotham, multipart episodes, multipart films and can confirm it works?
@Razze, assuming i understood what you were looking for wrt multipart movies and tv episodes:

i just tested two episodes from the blacklist:

s02e09 - luther braxton (1)
s02e10 - luther braxton (2)

wrt scrobbling, i encountered a few irregularities wrt the progress indicator, it occassionally reported the wrong timecor percentage complete, during playback of episode 1 the progress indicator was not near the end when playback stopped but everything else worked properly (scrobbled playback ended, rated properly, etc), start/stop/pause/resume and worked but at times the time/progress were reported incorrectly (showed 10% when it was actually 73%)

if time and progress discrepancies are indeed part of what you were looking for, i can provide more detail and capture logs as necessary, just let me know

hope i didnt completely miss what you were looking for and this can be of some help, ill continue to test so let me know if ive misunderstood, thx

p.s. - the more i thought on it the more i wondered if you were referring to library items based on .rar files or something like that

update - my wife just got home so i may not be able to do much more but i tried the mini-series klondike as well, three episodes that are simply labeled parts 1/2/3 (thought it might be a better test), pretty much the same results as above with basic scrobbling working (start/stop/pause/resume) but the progress and time were problematic, i was able to recreate one example:

i start an episode which shows up on trakt properly, i use my mouse on the progress bar in kodi to advance further into the episode, the progress/time does not update on trakt until i hit the button to either advance or rewind 30 secs, on two occasions this resulted in the episodes ending while the progress bar on trakt indicated it was below 20%, trakt did update and indicated the episode ended when the playback ended scrobble message was sent (from what i can tell), hope that makes some kind of sense, i dont know if this only happens on multipart episodes but im going to test that next
Will respond in more detail tomorrow, but I'm talking about children cartoons mostly check freakazoid for example. 3 Episodes on trakt.tv are one File in Kodi. Will all 3 be scrobbled when you watch it? The other way around would be movieX.avi.part1 and movieX.avi.part2 is this working? Or is it causing multiple checkins, wrong progress etc.
(2015-02-14, 03:33)Razze Wrote: [ -> ]Will respond in more detail tomorrow, but I'm talking about children cartoons mostly check freakazoid for example. 3 Episodes on trakt.tv are one File in Kodi. Will all 3 be scrobbled when you watch it? The other way around would be movieX.avi.part1 and movieX.avi.part2 is this working? Or is it causing multiple checkins, wrong progress etc.
roger that, checking freakazoid now and will post any updates later but wanted to make sure you saw my update above regarding issues with progress reporting in trakt, specifically the part about episodes ending with progress on trakt showing differently (17% in one case), only noticed it because i was watching VERY closely, talk with you tomorrow
What show was that, might also be caused by wrong length of the show / movie on trakt
(2015-02-14, 04:01)Razze Wrote: [ -> ]What show was that, might also be caused by wrong length of the show / movie on trakt
actually saw it across all three parts of klondike, gonna see if i can reproduce on any others, ill capture logs as i go but certainly not something that needs immediate attention, we can pick it up tomorrow as you indicated in your last post, doubt anyone will even notice unless they are watching and refreshing trakt website every couple of minutes, it may only happen when using the progress bar in kodi to ff or rewind
I did a fresh install of Kodi 14.1, downloaded the latest dev script from GitHub and installed from zip, six and requests were enabled, then I configured the trakt addon.

I added one cartoon show to my library (Aaahh!!! Real Monsters) and it synced fine. One of the files is S01E02E03 (episodes 2 and 3 together). Kodi thought I was just watching episode 2. After watching the episode Kodi initially set episode 2 as watched, and then episode 3 as well. Trakt displayed my progress as only watching episode 2. It thought episode 2 was a full half hour episode (I suppose that's an issue with episodes being 30 minutes, and each story being listed as its own episode). This means the percentage watched was off. When episode 3 started, trakt still reported me watching episode 2. Also rewinding/fast-forwarding didn't seem to change the percentage on the trakt website. Should it?

After playback in Kodi had finished, the progress on trakt's website was still going up until 30 minutes had passed. Once it finished there was nothing in my history. Checked my logs and noticed an error "ERROR: EXCEPTION Thrown (PythonToCppException)" which looks similar to this one: https://github.com/Razzeee/script.trakt/issues/29 which is closed. Not sure what's going on there.

I tried adding episode bookmarks as well, but Kodi still seems to think it's only playing episode 2. The bookmark just tells it where to start playing episode 3 from I guess.

Hope that helps Smile
i created a new post so it doesnt get missed, im testing freakazoid and it is indeed problematic, playing episode 1 actually shows episodes 1-3 but as im guessing you suspected trakt only registered the playing and rating of episode 1, when episode 2 is played it actually displayed 28 - 31 and trakt registered the playing and rating of only episode 2

and now i realize i may not be much help here as i dont think i have any shows of this type on local media, the freakazoid test was using .strm files, not sure if its valid or not, i will look for local media files

update - i have been able to recreate the timing issues i described earlier on various episodes and movies so it has nothing to do with multipart anything, just happened to notice it because i had trakt website up and continually refreshed while i was testing, it appears to have something to do with using the progress bar in kodi to rewind or fast forward, using the + or - button (left or right on dpad) seemed to update the progress on the occasions that using the mouse (touchpad) to select a point on the kodi progress bar didnt, i can open a github issue and provide more detail and logs if necessary, just let me know how you want to proceed, it isnt really hurting anything afaik

i couldnt think of any movies that fell into the multi-part category, i tested grindhouse but its more of a double feature and i dont think thats the same, i will continue looking
razze github zip is giving me invalid file structure how do i fix that
Quite a few of these issues appear to be with trakt simply not keeping up. I have no idea about its structure but when testing (over 100 episodes in a few hours), it didn't like it. It's the exact same behaviour the previous add-on gave - trakt servers not enough bandwidth. I often found myself half way through watching E02, for example, and then it brought up a dialogue asking me to rate E01.
Seems like trakt is having issues at the moment, can't login via kodi. Will probably have to wait.

(2015-02-13, 23:56)RavRob Wrote: [ -> ]
(2015-02-13, 10:05)Razze Wrote: [ -> ]
(2015-02-13, 05:03)RavRob Wrote: [ -> ]I don't see much wrong with my log but I am not even sure what I am looking for. This is still about Trakt not capturing the Flash (any episodes)
Code:
http://pastebin.com/9DncjdRU

Tx for looking

so is this a strm? could you dump the self.curVideoInfo at the beginning of __scrobble and repost the log?

Sorry bro but I have no idea where or how to get that Self.curVideoinfo

I think I have recreated it here, will look into it later.

(2015-02-14, 09:39)clayboy Wrote: [ -> ]razze github zip is giving me invalid file structure how do i fix that

sorry, no clue. it seems to be working for everybody else.
Hi (again)

When i was posting that everything is working before was to let you guys know that it seems to be working here.
As you know i'm on 2.3.2 and i can't see that something fails to do what it is supposed to do.

It shares ALL my activities on facebook, even while i'm watching something it shows how much i have watched and how much is left.
It updates my collection as soon something new is added to my collection. What else should it do?
(2015-02-14, 17:34)ToddeSwe Wrote: [ -> ]Hi (again)

When i was posting that everything is working before was to let you guys know that it seems to be working here.
As you know i'm on 2.3.2 and i can't see that something fails to do what it is supposed to do.

It shares ALL my activities on facebook, even while i'm watching something it shows how much i have watched and how much is left.
It updates my collection as soon something new is added to my collection. What else should it do?

It's probably not stopping, when you pause something, same goes for seeking in the show/movie
Also it should sync watched to kodi from trakt and from trakt to kodi.

Not to mention that v1 of the api (the one your using, is slow and causing all other users to wait/have problems
Multiparts should now scrobble okay. Ratings won't show up, but it's probably quiet hard to handle 3 ratings at once. Probably won't fix this.

I tried to scrobble the flash and it's working for me now, from strm files. So this should also be fixed