Kodi Community Forum
[RELEASE] Trakt Utilities (addon for Trakt.tv usage) - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151)
+---- Thread: [RELEASE] Trakt Utilities (addon for Trakt.tv usage) (/showthread.php?tid=98582)



- lowfi - 2011-10-17

Im having issues scrobbling files using tu0.6.4 using xbmc live builds from 15-10. Updating/Syncing works great. This wasnt happening for me using older builds (early oct).

Unfortunatly im at work atm so cant post the log. Anyone else expierencing this?


- mimesis - 2011-10-17

othrayte Wrote:Wow, ok, I had a look through that add-on, it was a little hard to follow how it worked. But what I think I've found out says that the add-on only passes limited info to xbmc, it looks like it passes the title (including the year, even when it is unimportant), the plot (which is nice, but not what tu needs, and xbmc won't pass it on) and sometimes the rating (ie MPAA certification). For some reason it was thought unimportant to tell xbmc what season or episode it was (haven't tried movies) and also the year (which is most important form movies) was missing. Due to the really confusing nature of the addon I would have to say that I will not have time to implement the needed changes myself, but if you pass this message on the the developer in charge they should be able to help you.

What about this version of icefilms? I have been using both, this version does crash seldomly but provides all the metadata/fanart/backdrops/etc. This is a modified version of icefilms.

http://forum.xbmc.org/showpost.php?p=905585&postcount=3333


- Jete246 - 2011-10-17

othrayte Wrote:Yeah we have been having some trouble with that in recent versions, a lot of work went into v0.6.4 to make that one more stable. In my work on v0.7.x I'm changing around a lot of the back-end parts of TU and I will be taking a look at some point at ensuring that shutdowns happen as quickly as is feasible.
Cool, and thanks for the info!


- icky - 2011-10-17

mimesis Wrote:What about this version of icefilms? I have been using both, this version does crash seldomly but provides all the metadata/fanart/backdrops/etc. This is a modified version of icefilms.

http://forum.xbmc.org/showpost.php?p=905585&postcount=3333

from what i understand the coding in the icefilms plugin.... well its a bit of a mess.

othraye would be better doing it for icelibrary as the main part they nicked form the icefilms addon is the megaupload routines other tha that it was mainly built from scratch


- mimesis - 2011-10-17

icky Wrote:from what i understand the coding in the icefilms plugin.... well its a bit of a mess.

othraye would be better doing it for icelibrary as the main part they nicked form the icefilms addon is the megaupload routines other tha that it was mainly built from scratch

Well what exactly would be required from a video addon to be compatible with TU? I'm doing my research at the moment and am looking into learning python and creating my own plugins. And hell, if plugins don't work with trakt I may just fork the projects and make them compatible just so I can better learn python.

From what I understand you need the plugin to pass the following, is there anything I'm forgetting?

Title
Year
Season/Episode (if a tv show)


- othrayte - 2011-10-19

mimesis Wrote:Well what exactly would be required from a video addon to be compatible with TU? I'm doing my research at the moment and am looking into learning python and creating my own plugins. And hell, if plugins don't work with trakt I may just fork the projects and make them compatible just so I can better learn python.

From what I understand you need the plugin to pass the following, is there anything I'm forgetting?

Title
Year
Season/Episode (if a tv show)

Yeah, those are the correct bits of data, but for many plugins they have other info that they should also be passing, episode titles for instance. The tricky thing is finding the relevant info in the plugin, passing the actual info on to xbmc is quite easy. I'll edit this message and add the details when I'm off my phone.

Edit:
Ok, so what you need to look for in the addon that you are trying to make work is the line of code where it plays the item (actually where it tells xbmc to play the item :Confusedplitting hairs:Smile, this usually looks like this:
Code:
xbmc.Player().play(<something might be in here>)
or this:
Code:
rpccmd = json.dumps({'jsonrpc': '2.0', 'method': 'Player.Open', 'params': {'item': {'movieid': int(idMovie)}}, 'id': 1})
result = xbmc.executeJSONRPC(rpccmd)
result = json.loads(result)

If you don't find these or they arn't the ones your looking for then it might be passed to xbmc as set of listitems, and when the user chooses one xbmc uses the info in the listitem to play it. This is how icelibrary works.

For the first and third options the answer is simple, when creating the listitem like this:
Code:
list_item = xbmcgui.ListItem('', iconImage="DefaultVideoBig.png", thumbnailImage='')
(note the icon and thumbnail arguments aren't necessary.)

you add some extra info like this:
Code:
list_item = xbmcgui.ListItem(name, iconImage="DefaultVideoBig.png", thumbnailImage='', path=url1)
info_dict = {    'tvshowtitle': "<show-title>",
    'title': "<episode-title>",
    'year': <show-year>,
    'season': <season-number>,
    'episode': <episode-number>,
}
list_item.setInfo('video', info_dict)

the json version I would have to look into specifics but as a general note if it is passing the movieid like in my example (the way TU does it) then xbmc is already pulling the info from it's db.

If this was incoherent try the post on this page:
http://forum.xbmc.org/showthread.php?tid=109572&page=45

If that is still incoherent, tell me and I'll allocate enough time to proof read what I write next time.


- FREAKJAM - 2011-10-19

I dont know if this is a addon bug, or XBMC-bug. Everytime I pause my tv-show, or when i want to download subtitles for it and press play again, it re-submits the tv-show to trakt.tv. I also synced my trakt.tv with my facebook account, meaning it spams my wall multiple times im watching the very same tv-show.

Can this be fixxed in some way?


- othrayte - 2011-10-19

FREAKJAM Wrote:I dont know if this is a addon bug, or XBMC-bug. Everytime I pause my tv-show, or when i want to download subtitles for it and press play again, it re-submits the tv-show to trakt.tv. I also synced my trakt.tv with my facebook account, meaning it spams my wall multiple times im watching the very same tv-show.

Can this be fixxed in some way?

I think what you might be seeing is TU change watch status to not watching whenever you pause the item, I can see how this might be a problem. If it is sending facebook messages when you unpause then I might consider changing the behaviour.


- Raytestrak - 2011-10-20

In my case, TU 0.6.4 ignores my ignore folder I've setup in the Trakt plugin. I have one share of series I want in Trakt and one share with anime which I've set to ignore. It's still being scrobbled though. Furthermore, after (almost) every episode I get an error: Episode already scrobbled. If I look at the trakt website, I see double entries of the same episode. Last night I watched The walking dead, and it got scrobbled at 21:06 and 21:14 and another episode has double entries at 21:58 and 22:03.


- schumi2004 - 2011-10-20

I was wondering if i could call sync scripts from my remote for videos and series?

RunScript(script.TraktUtilities) Huh


- rectifyer - 2011-10-20

@Raytestrak it sounds like you might have both plugins scrobbling? the API will try to catch duplicates so that is what that error message is indicating.


- othrayte - 2011-10-20

Raytestrak Wrote:In my case, TU 0.6.4 ignores my ignore folder I've setup in the Trakt plugin. I have one share of series I want in Trakt and one share with anime which I've set to ignore. It's still being scrobbled though. Furthermore, after (almost) every episode I get an error: Episode already scrobbled. If I look at the trakt website, I see double entries of the same episode. Last night I watched The walking dead, and it got scrobbled at 21:06 and 21:14 and another episode has double entries at 21:58 and 22:03.

The scrobbling in TU is designed to be used without the official trakt addon, if you are seeing doubles then both addons are trying to scrobble it.

TU doesn't currently support excluding folders, nor does it use and settings from the official trakt add-on, it runs independently of it.


- othrayte - 2011-10-20

schumi2004 Wrote:I was wondering if i could call sync scripts from my remote for videos and series?

RunScript(script.TraktUtilities) Huh

This is currently not supported but should be available in v0.7, when I finish it.


- schumi2004 - 2011-10-20

othrayte Wrote:This is currently not supported but should be available in v0.7, when I finish it.
Nice to know, thanks.

A other problem i ran in to is duplicate movies and series in my library.
Maybe it's a user error but i'm unsure.

The steps i perform are:

First i wiped my movie/series database to have a clean start.
I assign content in XBMC to the folders and let it roll (movie database updated)
Then i activated TU, i enabled sync on start-up.
Restarted Box/XBMC and it starts updating/syncing.

When i then go to my movie database i see duplicate items, where did it go wrong ?


- othrayte - 2011-10-20

schumi2004 Wrote:When i then go to my movie database i see duplicate items, where did it go wrong ?

I don't quite understand whee you are seeing duplicates, are you talking about what trakt calls your "collection" or something else?