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-01-18, 19:17)bitbanger Wrote: [ -> ]Sorry for the slightly OT question, but when I login to trakt.tv website and I check the calendar for my account, I see some TV shows that I'm not interested in. Is that because the service is not yet in a stable status or did I miss something in the changes?

Maybe you watched a Episode of this Show and you have it still in your collection?
(2015-01-18, 19:17)bitbanger Wrote: [ -> ]Sorry for the slightly OT question, but when I login to trakt.tv website and I check the calendar for my account, I see some TV shows that I'm not interested in. Is that because the service is not yet in a stable status or did I miss something in the changes?
in a word 'yes', trakt is still unstable, wrt your example its also worth noting that the tv side took a major hit during migration to tvdb in v2, in many cases movie collections were fine while tv collections were lost completely or their content was significantly different and just generally 'messed up', reports of issues like yours are still seen on the trakt vip forums atm, shows that can not be found are because they are identified incorrectly or not at all, thats very high level so no nitpicking please (lol), i dont think it will be too much longer until they work out all the 'bugs' in trakt itself and all the applications out there (like kodi via trakt add-on) adjust their code accordingly, what a wonderful world it will be Big Grin
(2015-01-18, 19:17)bitbanger Wrote: [ -> ]Sorry for the slightly OT question, but when I login to trakt.tv website and I check the calendar for my account, I see some TV shows that I'm not interested in. Is that because the service is not yet in a stable status or did I miss something in the changes?

In the meantime, I wrote a chrome extension that allows you to hide certain shows from the calendar (it also adds a month view option and some other options.)
https://chrome.google.com/webstore/detai...ekphkjbepn
(2015-01-18, 18:54)S7eele Wrote: [ -> ]
(2015-01-18, 13:35)ToddeSwe Wrote: [ -> ]
(2015-01-18, 09:11)S7eele Wrote: [ -> ]not sure if its what your looking for but if you look back a couple pages (at most) in the thread you will find links to forks of the add-on that one person in particular (razze) is working on updating, if i have time ill post a link but like i said, they are just a page or two back in this thread

Hi and thanks!

I have some problems with understanding where to find a released version but is this the one to try:

on 17 Jul 2014 2.3.2 … 8f81631 zip tar.gz

i'm using 2.3.1 now so ... Smile
the version currently being worked on says 2.3.2 when u look at the version number in kodi, it doewnloads from github as script.trakt-dev.zip but i wouldn't recommend running it as its very unstable, there is a link to it in this post:

http://forum.kodi.tv/showthread.php?pid=...pid1894562

may be a good idea to wait a bit more unless you want to get into the development aspects, all the best

Hi and thanks

I installed it. Let's see what happens. [SMILING FACE WITH SMILING EYES]
If everything fails I'll reinstall the old one again.
(2015-01-18, 20:41)Jephuff Wrote: [ -> ]
(2015-01-18, 19:17)bitbanger Wrote: [ -> ]Sorry for the slightly OT question, but when I login to trakt.tv website and I check the calendar for my account, I see some TV shows that I'm not interested in. Is that because the service is not yet in a stable status or did I miss something in the changes?

In the meantime, I wrote a chrome extension that allows you to hide certain shows from the calendar (it also adds a month view option and some other options.)
https://chrome.google.com/webstore/detai...ekphkjbepn
@Jephuff i dont think i ever said it on the trakt vip forum so saying it now, thanks! Cool
(2015-01-18, 21:21)S7eele Wrote: [ -> ]
(2015-01-18, 20:41)Jephuff Wrote: [ -> ]In the meantime, I wrote a chrome extension that allows you to hide certain shows from the calendar (it also adds a month view option and some other options.)
https://chrome.google.com/webstore/detai...ekphkjbepn
@Jephuff i dont think i ever said it on the trakt vip forum so saying it now, thanks! Cool

Thanks to both of you Smile
(2015-01-18, 20:41)Jephuff Wrote: [ -> ]In the meantime, I wrote a chrome extension that allows you to hide certain shows from the calendar (it also adds a month view option and some other options.)
https://chrome.google.com/webstore/detai...ekphkjbepn
I have to thank You too: This extension makes it much less painless to browse the new trakt-site. I'm sure, that the guys from trakt will improve the webinterface, but until then Your extension is a great help to me Nod
Hi,

First of all #S7eele thank you for keeping us all informed, and special tanks to Razze for all his efforts in trying to get the addon working again!

I am new to this forum and have no real experiance in python programming, so excuse me if this is a stupid sugestion.
But i noticed an error in the last versions of Razze (the ones from this week), at the bottom I enclosed the error message.
I don't know if you are already aware of this.

It looks like it's a TypeError in the sync.py file on line 213.
Again i don't know much about python, but i think it's in the [p] on that line.
I'm not sure how to fix it, but maybe someone could have a look at it.

Sorry if you guys are already aware of this.

Thanks again for all the good work, keep it up!

ERROR: Exception in thread trakt-sync:
Traceback (most recent call last):
File "C:\Program Files (x86)\XBMC\system\python\Lib\threading.py", line 808, in __bootstrap_inner
self.run()
File "C:\Program Files (x86)\XBMC\addons\script.trakt\service.py", line 310, in run
sync.sync()
File "C:\Program Files (x86)\XBMC\addons\script.trakt\sync.py", line 707, in sync
self.syncEpisodes()
File "C:\Program Files (x86)\XBMC\addons\script.trakt\sync.py", line 392, in syncEpisodes
traktShowsAdd = self.compareShows(xbmcShows, traktShows)
File "C:\Program Files (x86)\XBMC\addons\script.trakt\sync.py", line 213, in compareShows
a = show_col1[p][season]
TypeError: list indices must be integers, not dict
Sorry i forgot to mention that this error occurs when syncing of the TV Shows is at 12%.
It does get the data form KODI and from Trakt correctly but it gives this error when the script is trying to compare the TV Show ID's form those two lists.
I have tested this at XBMC version 13.2 (Gotham) and on KODI version 14.0 (Helix), both give exactly the same error at the same moment.
(2015-01-16, 20:13)Razze Wrote: [ -> ]
(2015-01-16, 17:48)ironhidePT Wrote: [ -> ]Hi Razee. I've been lurking this thread for the past 2 weeks, since after the Trakt update the watchlist for the many episodes of the many tv shows stopped working due to the new API, and waiting on an update of the XMBC/Kodi plugin or in this case, your script.

But the thing is: This situation is seriously driving me mad because I'm having trouble to keep up with what I've already watched and not, and I don't want to mark the episodes as watched manually on Trakt. And it happens that I am a software engineer and have some free time this weekend, so I created an account just to say that, if you need some help with the code, I'm available. Feel free to send me a PM or something if that's the case. Wink

Would be very nice.

1. Just let me know what you want to work on (so that we don't do the same things).
2. Create a fork from my dev branch https://github.com/Razzeee/script.trakt/tree/dev
3. Add your code, test it
4. Create a pull request
5. Start at 1 again Wink

Thanks. What do you use for development? I'm trying to configure Eclipse with PyDev but I'm having trouble adding the Kodi folders as path/workspace as it's described here:

http://kodi.wiki/view/HOW-TO:Debug_Pytho...th_Eclipse
(2015-01-19, 13:05)starkiller Wrote: [ -> ]Sorry i forgot to mention that this error occurs when syncing of the TV Shows is at 12%.
It does get the data form KODI and from Trakt correctly but it gives this error when the script is trying to compare the TV Show ID's form those two lists.
I have tested this at XBMC version 13.2 (Gotham) and on KODI version 14.0 (Helix), both give exactly the same error at the same moment.

The most I get is 10% while syncing TV before the script just stops. Smile Been doing that since Trakt API v2 went live (even with the latest updates from Razzee). Movies sync fine for me but none of my TV Series sync.

I'm using Kodi via OpenElec (also tried Gotham). I might try installing KODI on Windows tomorrow and see if it gets any further.
(2015-01-19, 12:53)starkiller Wrote: [ -> ]Hi,

First of all #S7eele thank you for keeping us all informed, and special tanks to Razze for all his efforts in trying to get the addon working again!

I am new to this forum and have no real experiance in python programming, so excuse me if this is a stupid sugestion.
But i noticed an error in the last versions of Razze (the ones from this week), at the bottom I enclosed the error message.
I don't know if you are already aware of this.

It looks like it's a TypeError in the sync.py file on line 213.
Again i don't know much about python, but i think it's in the [p] on that line.
I'm not sure how to fix it, but maybe someone could have a look at it.

Sorry if you guys are already aware of this.

Thanks again for all the good work, keep it up!

ERROR: Exception in thread trakt-sync:
Traceback (most recent call last):
File "C:\Program Files (x86)\XBMC\system\python\Lib\threading.py", line 808, in __bootstrap_inner
self.run()
File "C:\Program Files (x86)\XBMC\addons\script.trakt\service.py", line 310, in run
sync.sync()
File "C:\Program Files (x86)\XBMC\addons\script.trakt\sync.py", line 707, in sync
self.syncEpisodes()
File "C:\Program Files (x86)\XBMC\addons\script.trakt\sync.py", line 392, in syncEpisodes
traktShowsAdd = self.compareShows(xbmcShows, traktShows)
File "C:\Program Files (x86)\XBMC\addons\script.trakt\sync.py", line 213, in compareShows
a = show_col1[p][season]
TypeError: list indices must be integers, not dict

I have been looking into this error some more, it looks like the problem is in the format of the show-data of kodi (show_col1), specifically in the season format.
I have managed to take a look at how the show_col1 looks like just before the error occurs, and have enclosed that here:

NOTICE: [trakt] show_col1 {'seasons': [{'episodes': [{'ids': {'tvdb': u'4936768'}, 'number': 2, 'collected_at': '2015-01-19T19:45:35.610000'}], 'number': 3}, {'episodes': [{'ids': {'tvdb': u'4936769'}, 'number': 3, 'collected_at': '2015-01-19T19:45:35.610000'}], 'number': 3}, .....and so on......, 'year': 2012, 'ids': {'tvdb': u'257655'}, 'title': u'Arrow'}

It looks like the seasons aren't properly defined, the seasons are showing a list of episodes without the proper specification of what season it actualy is.
This data (show_col1) is specified in the sync.py file at line 112 till 153.
Especially line 130 is intresting: this line returnes all the information from Kodi in the following format:

NOTICE: [trakt] data: {u'episodes': [{u'episode': 2, u'uniqueid': {u'unknown': u'4936768'}, u'season': 3, u'episodeid': 2402, u'label': u'3x02. Sara', u'file': u'*****', u'playcount': 1}, .... etc....

In line 141 The data that is collected at line 130 is reformatted and stripped to the form that is later used in show_col1, this looks like this:

NOTICE: [trakt] episodes: [{'episodes': [{'ids': {'tvdb': u'4936768'}, 'number': 2, 'collected_at': '2015-01-19T21:01:15.152000'}], 'number': 3}, .....etc....

First of all i find it odd that both the episode number and the season number are named number in this format.
Second it's strange that the playcount from the data of line 141 isn't used in this new format.

I think the real problem is in line 143 witch states that the seasons just equel the eppisodes and this seems odd to me.

I hope someone can make sense of all this mess, i tryed my best but i can't figure out what's ectualy going wrong here.
Maybey someone more fimilliar with this addon code and more python skills can fix this.

I am not sure if this is the correct place to discuss the code itself but i don't know were i schould post this otherwise.
Sorry if this forum isn't ment for stuff like this.
This is a dict. Number is just part of the key
(2015-01-19, 22:34)starkiller Wrote: [ -> ]
(2015-01-19, 12:53)starkiller Wrote: [ -> ]Hi,

First of all #S7eele thank you for keeping us all informed, and special tanks to Razze for all his efforts in trying to get the addon working again!

I am new to this forum and have no real experiance in python programming, so excuse me if this is a stupid sugestion.
But i noticed an error in the last versions of Razze (the ones from this week), at the bottom I enclosed the error message.
I don't know if you are already aware of this.

It looks like it's a TypeError in the sync.py file on line 213.
Again i don't know much about python, but i think it's in the [p] on that line.
I'm not sure how to fix it, but maybe someone could have a look at it.

Sorry if you guys are already aware of this.

Thanks again for all the good work, keep it up!

ERROR: Exception in thread trakt-sync:
Traceback (most recent call last):
File "C:\Program Files (x86)\XBMC\system\python\Lib\threading.py", line 808, in __bootstrap_inner
self.run()
File "C:\Program Files (x86)\XBMC\addons\script.trakt\service.py", line 310, in run
sync.sync()
File "C:\Program Files (x86)\XBMC\addons\script.trakt\sync.py", line 707, in sync
self.syncEpisodes()
File "C:\Program Files (x86)\XBMC\addons\script.trakt\sync.py", line 392, in syncEpisodes
traktShowsAdd = self.compareShows(xbmcShows, traktShows)
File "C:\Program Files (x86)\XBMC\addons\script.trakt\sync.py", line 213, in compareShows
a = show_col1[p][season]
TypeError: list indices must be integers, not dict

I have been looking into this error some more, it looks like the problem is in the format of the show-data of kodi (show_col1), specifically in the season format.
I have managed to take a look at how the show_col1 looks like just before the error occurs, and have enclosed that here:

NOTICE: [trakt] show_col1 {'seasons': [{'episodes': [{'ids': {'tvdb': u'4936768'}, 'number': 2, 'collected_at': '2015-01-19T19:45:35.610000'}], 'number': 3}, {'episodes': [{'ids': {'tvdb': u'4936769'}, 'number': 3, 'collected_at': '2015-01-19T19:45:35.610000'}], 'number': 3}, .....and so on......, 'year': 2012, 'ids': {'tvdb': u'257655'}, 'title': u'Arrow'}

It looks like the seasons aren't properly defined, the seasons are showing a list of episodes without the proper specification of what season it actualy is.
This data (show_col1) is specified in the sync.py file at line 112 till 153.
Especially line 130 is intresting: this line returnes all the information from Kodi in the following format:

NOTICE: [trakt] data: {u'episodes': [{u'episode': 2, u'uniqueid': {u'unknown': u'4936768'}, u'season': 3, u'episodeid': 2402, u'label': u'3x02. Sara', u'file': u'*****', u'playcount': 1}, .... etc....

In line 141 The data that is collected at line 130 is reformatted and stripped to the form that is later used in show_col1, this looks like this:

NOTICE: [trakt] episodes: [{'episodes': [{'ids': {'tvdb': u'4936768'}, 'number': 2, 'collected_at': '2015-01-19T21:01:15.152000'}], 'number': 3}, .....etc....

First of all i find it odd that both the episode number and the season number are named number in this format.
Second it's strange that the playcount from the data of line 141 isn't used in this new format.

I think the real problem is in line 143 witch states that the seasons just equel the eppisodes and this seems odd to me.

I hope someone can make sense of all this mess, i tryed my best but i can't figure out what's ectualy going wrong here.
Maybey someone more fimilliar with this addon code and more python skills can fix this.

I am not sure if this is the correct place to discuss the code itself but i don't know were i schould post this otherwise.
Sorry if this forum isn't ment for stuff like this.

no problems, both @Razze branches are definitely works in progress so errors are to be expected, im not sure razze is ready to start looking at specific issues yet but it would probably be better to post them on github, obviously only razze can say exactly when and where he wants feedback

wrt your specific issue, sync is definitely a problem area still and as mentioned above errors are to be expected atm, the tv side was especially hard hit because of the change to tvdb

p.s. - if your not already familiar with it check pastebin out, i asked the question and he suggested i post logs for him there (not directly in thread), a practice you should probably use here too Wink
Any news from rectifyer when a new kodi version will come?