Jump to content

Trakt full sync problem


parsaria

Recommended Posts

parsaria

Does any one have a clue why a initial sync is not performed to Trakt.TV it does not give me an error.

Collection is exported to Trakt fine btw, but the watch status is the problem here.

But if you see movie now it updates the watch status as i noticed.

 

in the log it only says:

 

2017-07-09 16:39:08.4527 Debug Trakt: TraktResponse Added Movies: 0

2017-07-09 16:39:08.4527 Debug Trakt: TraktResponse Added Shows: 0

 

 

log.txt

Link to comment
Share on other sites

paulsalter

No expert on these logs, but

 

just under the bit you quoted it is saying it synced the watch state of 250 movies

 

10 Cloverfield lane is the first on 2016-06-21

 

Is this movie not flagged as watched on Trakt?

Link to comment
Share on other sites

parsaria

Na, i am just wondering that my self also, there is no indication why it should not sync, but no historical watch statuses are synced.

Link to comment
Share on other sites

parsaria

i think i don't understand what you are pointing at , i just started using trakt and wanted to import my watch statuses into trakt.....

Link to comment
Share on other sites

Ok, I am not a trakt user myself but I am just guessing that they would probably have that kind of history in your trakt account on the website. I could be wrong though.

Link to comment
Share on other sites

parsaria

Ist't the plug-in suppose to sync the watched status  from emby into your trakt account, or am i just being dumb here??

 

And if that is the case is there anything in the log that could give any clue why that is not happening?

Link to comment
Share on other sites

parsaria

To be honest I don't know for sure, but i also don't know why that is relevant because like i said the collection are exported fine i see every tv-show and movies in my Trakt.tv bu there is no watch status at all.

 

I just was looking the trakt.tv API manual. and saw the following.

 

in the example of trakt.tv API manual

"watched_at": "2014-09-01T09:10:11.000Z"

 

but in my log every where i see 

"watched_at":"2017-05-23T23:32:41Z"

 

Could it be that formating on a synology nas is different in mono??

Link to comment
Share on other sites

parsaria
<?xml version="1.0"?>


  <TraktUsers>

    <TraktUser>

      <UserName>username</UserName>

      <Password>*******</Password>

      <LinkedMbUserId>*******</LinkedMbUserId>

      <UsesAdvancedRating>false</UsesAdvancedRating>

      <UserToken>******</UserToken>

      <SkipUnwatchedImportFromTrakt>true</SkipUnwatchedImportFromTrakt>

      <PostWatchedHistory>true</PostWatchedHistory>

      <ExtraLogging>true</ExtraLogging>

      <ExportMediaInfo>false</ExportMediaInfo>

      <LocationsExcluded>

        <string>/volume2/video</string>

        <string>/volume2/music</string>

        <string>/volume2/photos</string>

      </LocationsExcluded>

    </TraktUser>

  </TraktUsers>

</PluginConfiguration>

Link to comment
Share on other sites

parsaria

Cool thank's. I am very curios what the problem might be!! Mostly I handle this problems my self, but this time I had no clue.

Link to comment
Share on other sites

Angelblue05

I can't get it to work, but in my case it fails because it's trying to authenticate someone that has no trakt account set up and no information set up in the plugin... Something is broke, the sync library to trakt failed because of it.

 

Looks like this line is causing the issue: https://github.com/MediaBrowser/trakt/blob/master/Trakt/ScheduledTasks/SyncLibraryTask.cs#L95

If there's no trakt user, then the task should not run for this particular user but it does and throws an error when trying to authenticate.

 

https://pastebin.com/a6CJgexP

Edited by Angelblue05
Link to comment
Share on other sites

parsaria
I removed these line of-course!

 

So right now i am confused, but i can change my password of trakt and give you the private message of the real settings, if that is what you want.

 

<UserName>username</UserName>

<Password>*******</Password>

<LinkedMbUserId>*******</LinkedMbUserId>

<UserToken>******</UserToken>
Link to comment
Share on other sites

Angelblue05

No, don't remove anything. :) I still haven't been able to reproduce your bug because I'm stuck with another bug. So I'll let you know once I'm at the point of testing your issue.

Link to comment
Share on other sites

parsaria

Then i know what your problem is you need to remove extra settings in Trakt.xml of the extra users, had that problem myself also.

 

Somehow the Trakt Plugin save messes with the users.

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

Angelblue05

Oh! Ok, thanks. I will check it out.

 

Edit: Yep you are right, now it works. I ran the schedule task and what I marked as watched manually was not reported to trakt. Hmm.

Edited by Angelblue05
Link to comment
Share on other sites

parsaria

Could it be this :

 

in the example of trakt.tv API manual

"watched_at": "2014-09-01T09:10:11.000Z"

 

but in my log every where i see 

"watched_at":"2017-05-23T23:32:41Z"

Link to comment
Share on other sites

Angelblue05

Honestly, I don't think it is that, because when you just finish watching something, it also sends that same time format and it works then.

I'm looking and will let you know if I find something. :)

  • Like 1
Link to comment
Share on other sites

parsaria

Indeed you are right when you finish watching it works.

 

But i am glad the problem is reproducible so we can work on it.

 

Thanks for the support.

  • Like 1
Link to comment
Share on other sites

Angelblue05

I don't think there's anything wrong with the code. At least I could not find anything wrong. The response the server sends follows the docs. I tested the trakt api site and it won't to add the watched status, request was succesful but trakt does nothing (beautiful apiary  :wub:  wish we had something as sleek as that for emby, but I digress)... Might have to contact trakt directly.

{
  "added": {
    "movies": 0,
    "episodes": 0
  },
  "not_found": {
    "movies": [],
    "shows": [],
    "seasons": [],
    "episodes": [],
    "people": []
  }
}

@@Luke

 

https://github.com/MediaBrowser/trakt/blob/master/Trakt/Helpers/UserHelpers.cs#L33

Please add the following. It seems if you hit save in the plugin config on an account that has no trakt account setup, it creates a failed entry in the xml which then causes auth errors which crashes the trakt schedule task to sync emby to trakt.

else if (string.IsNullOrWhiteSpace(tUser.UserName) || string.IsNullOrWhiteSpace(tUser.Password))
{
    return false;
}
<TraktUser>
      <UserName /> ??
      <Password /> ??
      <LinkedMbUserId>72847ba4055b45c289de7a6d6e5a892a</LinkedMbUserId>
      <UsesAdvancedRating>false</UsesAdvancedRating>
      <SkipUnwatchedImportFromTrakt>true</SkipUnwatchedImportFromTrakt>
      <PostWatchedHistory>true</PostWatchedHistory>
      <ExtraLogging>false</ExtraLogging>
      <ExportMediaInfo>false</ExportMediaInfo>
      <LocationsExcluded />
    </TraktUser>
Edited by Angelblue05
Link to comment
Share on other sites

parsaria

Maybe it is also good to add a XML Element in the feature called "Disabled" so you can select this in the UI with a checkbox.

<TraktUser>
      <UserName /> ??
      <Password /> ??
      <LinkedMbUserId>72847ba4055b45c289de7a6d6e5a892a</LinkedMbUserId>
      <UsesAdvancedRating>false</UsesAdvancedRating>
      <SkipUnwatchedImportFromTrakt>true</SkipUnwatchedImportFromTrakt>
      <PostWatchedHistory>true</PostWatchedHistory>
      <ExtraLogging>false</ExtraLogging>
      <ExportMediaInfo>false</ExportMediaInfo>
      <LocationsExcluded />
      <Disabled>false</Disabled>
</TraktUser>
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...