Kodi Community Forum
[RELEASE] trakt.tv tv/movie scrobbler - 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: Service Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=152)
+---- Thread: [RELEASE] trakt.tv tv/movie scrobbler (/showthread.php?tid=138745)



RE: [RELEASE] trakt.tv tv/movie scrobbler - S7eele - 2015-01-24

(2015-01-24, 04:00)Razze Wrote:
(2015-01-19, 14:41)ironhidePT Wrote:
(2015-01-16, 20:13)Razze Wrote: 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_Python_Scripts_with_Eclipse

I'm working in plain sublime 3 with some packages for pythong programming, most of the time. Also running pyCharm some times, but really just ignoring the kodi side of things. Just starting kodi and trying, starting kodi and trying (call me dumb Wink )

(2015-01-22, 06:02)roach9 Wrote: They don't provide an awesome service.
They provide a service.

For a scrobbling site to make an update like this without first getting their add-ons from respective programs (like Plex and Kodi) in a row is backwards.

They reached out to every developer they had the chance to (plex does have an update afaik btw)
See here: http://www.programmableweb.com/news/launch-trakt-api-2.0-highlights-importance-api-deprecation-policy/analysis/2015/01/16

(2015-01-22, 17:55)aptalca Wrote: [...]

Trakt's mistake was to break the old api when they introduced the new one. Essentially they broke all third party addons overnight. They should have had a transition period where both apis worked side by side

The old one isn't broken, they ported the important parts (the ones the devs were asking for in the community)
But some of these are so slow now, they in fact slow down the v2 calls. So would be nice if they could die asap.
And side by side with the real old one wouldn't work because it's a complete rewrite on a new database etc.

(2015-01-22, 21:40)komplex Wrote: Image


What Razzeee is doing over at https://github.com/Razzeee/script.trakt/tree/dev seems to be on the right track as the sync added movies to my collection when i just tested it, it didnt add tv shows but he/they look to be moving along fast, it did add everything as tomorrow tho o_O

Can you check your timezone settings under http://trakt.tv/settings#timezone-settings
Let me know if this fixes anything, thx


@everyone wanting to donate
i'm really flattered, but it would be quiet unfair as I'm using librarys from other devs and there are people helping out with pull requests etc.
That being said, I would really appreciate anyone signing up for vip trakt instead. They do have some big and very cool plans and need every help they can get.


Does anyone have a clue why my subscription to this thread didn't send me any mails for days?
no idea, notifications have been working fine for me, let see if u get this notification @Razze


RE: [RELEASE] trakt.tv tv/movie scrobbler - Razze - 2015-01-24

It's like they reactivated after my post ^^


RE: [RELEASE] trakt.tv tv/movie scrobbler - S7eele - 2015-01-24

(2015-01-24, 21:23)Razze Wrote: It's like they reactivated after my post ^^
awesome, watever works right?


RE: [RELEASE] trakt.tv tv/movie scrobbler - Win a 2 - 2015-01-25

gr8 work, Razze!

I am still on rectifyer's version of the script, which nearly stopped working in all parts.

I would appreciate a small summary of what is working and what is not working:
- with "original" script.trak
- your master
- your dev branch (esp. what is currently preventing the dev branch to become the master?)


RE: [RELEASE] trakt.tv tv/movie scrobbler - komplex - 2015-01-25

Image
Image

I think its adding the shows i've watched in the last 2/3 weeks that i missed adding manually to trakt, this is the latest dev branch, also the "clean trakt movie collection" is working too. Great work :p

Code:
12:53:01 T:32204  NOTICE: [trakt] [Movies Sync] Getting movie collection from trakt.tv
12:53:02 T:32204  NOTICE: [trakt] [Movies Sync] Compared movies, found 0 to add.
12:53:02 T:32204  NOTICE: [trakt] [Movies Sync] trakt.tv movie collection is up to date.
12:53:02 T:32204  NOTICE: [trakt] [Movies Sync] XBMC movie playcount is up to date.
12:53:02 T:32204  NOTICE: [trakt] [Movies Sync] Starting to remove.
12:53:02 T:32204  NOTICE: [trakt] [Movies Sync] Compared movies, found 42 to remove.
12:53:02 T:32204  NOTICE: [trakt] [Movies Sync] 42 movie(s) will be removed from trakt.tv collection.
12:53:02 T:32204  NOTICE: [trakt] [Movies Sync] Movies removed:



RE: [RELEASE] trakt.tv tv/movie scrobbler - Razze - 2015-01-25

(2015-01-25, 12:58)Win a 2 Wrote: gr8 work, Razze!

I am still on rectifyer's version of the script, which nearly stopped working in all parts.

I would appreciate a small summary of what is working and what is not working:
- with "original" script.trak
- your master
- your dev branch (esp. what is currently preventing the dev branch to become the master?)

with "original":
scrobble start should work (no pause or resume)

master:
(hard to recall can be totally wrong)
scrobble, with all status pause etc, normal ratings

dev:
scrobble, with all status pause etc, normal ratings, sync (add to trakt, update kodi watched, cleanup)
I also removed some features for now, lists are gone, same for the context menu

there are some more things we need to test, some todos and some more questions I need to ask
some people reported that skins break the addon behavior, someone reported there are ssl problems etc I need to look after these first.


RE: [RELEASE] trakt.tv tv/movie scrobbler - Shryukt - 2015-01-25

Thanks @Razze for your work
I use : https://github.com/Razzeee/script.trakt/tree/dev branch

And for me, since this morning (french time zone) : latest commit 45c78c1668
- Episode sync watched status : OK
- Add show and episodes to collection : OK
But
- Add Movies to collection : NOK
- Movies sync watched status : NOK
Code:
14:16:45 T:1804  NOTICE: [trakt] [Movies Sync] Getting movie data from Kodi
14:16:45 T:1804  NOTICE: [trakt] [Movies Sync] Kodi JSON Result: '[{u'movieid': 1, u'title': u'2 Guns', , u'lastplayed': u'2014-11-23 15:31:20', u'label': u'2 Guns', u'imdbnumber': u'tt1272878'[...]
14:16:45 T:1804  NOTICE: [trakt] [Movies Sync] Getting movie collection from trakt.tv
14:17:14 T:1804  NOTICE: [trakt] [Movies Sync] Compared movies, found 0 to add.
14:17:14 T:1804  NOTICE: [trakt] [Movies Sync] trakt.tv movie collection is up to date.
14:17:14 T:1804  NOTICE: [trakt] [Movies Sync] Starting to remove.
14:17:14 T:1804  NOTICE: [trakt] [Movies Sync] Compared movies, found 0 to remove.
14:17:14 T:1804  NOTICE: [trakt] [Movies Sync] trakt.tv movie collection is clean, no movies to remove.
14:17:14 T:1804  NOTICE: [trakt] [Movies Sync] Movies on trakt.tv (486), movies in Kodi (494).
14:17:14 T:1804  NOTICE: [trakt] [Movies Sync] Complete.
The plugins find "Movies on trakt.tv (486), movies in Kodi (494)." but don't add the missing to trakt Collection.
Some of them are already watched on Kodi.


RE: [RELEASE] trakt.tv tv/movie scrobbler - darzur - 2015-01-25

Hi Razze,

I have a question about updates of your script. If I'll install dev version from your github will it update automatically from within KODI?


RE: [RELEASE] trakt.tv tv/movie scrobbler - Shryukt - 2015-01-25

@darzur No, you need to update with the repo on github.

Edit my previous post :
I clone your repo but on sync.py I Have this on line 160 :
same as https://github.com/Razzeee/script.trakt/blob/dev/sync.py
Code:
    #todo move this to utilities?
    def __countMovies(self, movies, mode='collected'):
        count = 0

        if 'movies' in movies:
            movies = movies['movies']
        for movie in movies:            
            if mode in movie and movie[mode]:
                count += 1
                    
        return count
But on the github file https://github.com/Razzeee/script.trakt/blob/c95dd71b01bdcf6f382b3c0efee49b4c2d97f9c3/sync.py this block is missing.
Maybe a wrong sync and maybe this is why Movie doesn't work for me ?


RE: [RELEASE] trakt.tv tv/movie scrobbler - darzur - 2015-01-25

Thanks @Shryukt,

Script isn't working anyway. I'm getting following errors:

Code:
14:47:20  34.531475 T:2906649664  NOTICE: Thread LanguageInvoker start, auto delete: false
14:47:20  34.540287 T:2671752256  NOTICE: Thread AlarmClock start, auto delete: false
14:47:23  37.109329 T:2906649664  NOTICE: -->Python Interpreter Initialized<--
14:47:23  37.234051 T:2917020736   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.ImportError'>
                                            Error Contents: No module named six
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/script.trakt/default.py", line 6, in <module>
                                                from service import traktService
                                              File "/storage/.kodi/addons/script.trakt/service.py", line 9, in <module>
                                                from traktapi import traktAPI
                                              File "/storage/.kodi/addons/script.trakt/traktapi.py", line 9, in <module>
                                                from trakt import Trakt
                                              File "/storage/.kodi/addons/script.trakt/trakt/__init__.py", line 1, in <module>
                                                from trakt.client import TraktClient, __version__
                                              File "/storage/.kodi/addons/script.trakt/trakt/client.py", line 3, in <module>
                                                from trakt.interfaces import construct_map
                                              File "/storage/.kodi/addons/script.trakt/trakt/interfaces/__init__.py", line 1, in <module>
                                                from trakt.interfaces.base import Interface
                                              File "/storage/.kodi/addons/script.trakt/trakt/interfaces/base/__init__.py", line 3, in <module>
                                                from trakt.media_mapper import MediaMapper
                                              File "/storage/.kodi/addons/script.trakt/trakt/media_mapper.py", line 1, in <module>
                                                from trakt.objects import Episode, Movie, Show, Season
                                              File "/storage/.kodi/addons/script.trakt/trakt/objects.py", line 1, in <module>
                                                from trakt.core.helpers import to_datetime
                                              File "/storage/.kodi/addons/script.trakt/trakt/core/helpers.py", line 1, in <module>
                                                import arrow
                                              File "/storage/.kodi/addons/script.trakt/arrow/__init__.py", line 3, in <module>
                                                from .arrow import Arrow
                                              File "/storage/.kodi/addons/script.trakt/arrow/arrow.py", line 11, in <module>
                                                from dateutil import tz as dateutil_tz
                                              File "/storage/.kodi/addons/script.trakt/dateutil/tz.py", line 16, in <module>
                                                from six import string_types, PY3
                                            ImportError: No module named six
                                            -->End of Python script error report<--
14:47:31  44.996387 T:2906649664  NOTICE: Thread LanguageInvoker start, auto delete: false
14:47:31  45.453968 T:2906649664  NOTICE: -->Python Interpreter Initialized<--
14:47:32  45.995407 T:2906649664  NOTICE: [trakt] Queuing for dispatch: {'action': 'manualSync', 'silent': False, 'library': 'all'}
14:47:45  58.700809 T:2906649664  NOTICE: Thread LanguageInvoker start, auto delete: false
14:47:45  59.182018 T:2906649664  NOTICE: -->Python Interpreter Initialized<--
14:47:46  59.774017 T:2906649664  NOTICE: [trakt] Queuing for dispatch: {'action': 'manualSync', 'silent': False, 'library': 'all'}

Will try master branch.


RE: [RELEASE] trakt.tv tv/movie scrobbler - Shryukt - 2015-01-25

@darzur You need two extra modules :
"you have to install six and requests from the kodi addon library" officiel repo.

The master branch doesn't work, use dev branch with those two add.


RE: [RELEASE] trakt.tv tv/movie scrobbler - ikbal - 2015-01-25

hello whether my site can connect with thetvdb
I want my site to connect with thetvdb


RE: [RELEASE] trakt.tv tv/movie scrobbler - flabbamann - 2015-01-25

(2015-01-25, 16:04)ikbal Wrote: hello whether my site can connect with thetvdb
I want my site to connect with thetvdb

you should ask this on their forums.
http://forums.thetvdb.com/


RE: [RELEASE] trakt.tv tv/movie scrobbler - darzur - 2015-01-25

Thanks,

Didn't know that. Installed six and it's working now. Smile


RE: [RELEASE] trakt.tv tv/movie scrobbler - hazeman - 2015-01-25

(2015-01-25, 15:36)Shryukt Wrote: Thanks @Razze for your work
I use : https://github.com/Razzeee/script.trakt/tree/dev branch

And for me, since this morning (french time zone) : latest commit 45c78c1668
- Episode sync watched status : OK
- Add show and episodes to collection : OK
But
- Add Movies to collection : NOK
- Movies sync watched status : NOK
Code:
14:16:45 T:1804  NOTICE: [trakt] [Movies Sync] Getting movie data from Kodi
14:16:45 T:1804  NOTICE: [trakt] [Movies Sync] Kodi JSON Result: '[{u'movieid': 1, u'title': u'2 Guns', , u'lastplayed': u'2014-11-23 15:31:20', u'label': u'2 Guns', u'imdbnumber': u'tt1272878'[...]
14:16:45 T:1804  NOTICE: [trakt] [Movies Sync] Getting movie collection from trakt.tv
14:17:14 T:1804  NOTICE: [trakt] [Movies Sync] Compared movies, found 0 to add.
14:17:14 T:1804  NOTICE: [trakt] [Movies Sync] trakt.tv movie collection is up to date.
14:17:14 T:1804  NOTICE: [trakt] [Movies Sync] Starting to remove.
14:17:14 T:1804  NOTICE: [trakt] [Movies Sync] Compared movies, found 0 to remove.
14:17:14 T:1804  NOTICE: [trakt] [Movies Sync] trakt.tv movie collection is clean, no movies to remove.
14:17:14 T:1804  NOTICE: [trakt] [Movies Sync] Movies on trakt.tv (486), movies in Kodi (494).
14:17:14 T:1804  NOTICE: [trakt] [Movies Sync] Complete.
The plugins find "Movies on trakt.tv (486), movies in Kodi (494)." but don't add the missing to trakt Collection.
Some of them are already watched on Kodi.
Same for me