SchizoDuckie/DuckieTV

Trakt.tv sync not working

ManoharOfficial opened this issue ยท 20 comments

What build of DuckieTV are you using (Standalone / Chrome Extension (New Tab / Browser Action))
New Tab & Standalone (both same issue described below)

What version of DuckieTV are you using (Stable 1.1.x / Nightly yyyymmddHHMM)
nightly-202303121925

What is your Operating System (Windows, Mac, Linux, Android)
Windows 10

Describe the problem you are having and steps to reproduce if available
'Push shows to Trakt.tv' does not sync with my account in trakt. Tried renewing credentials, and even re-login using pin, but not syncing.

I read in a closed issue that trakt is limiting the number of API calls to their db. How many per day is a free account (like mine) allowed?

Trakt.tv API has a rate limiting, see https://trakt.docs.apiary.io/#introduction/rate-limiting
When exceeded, the wait period between retries grows so that eventually each request can be waiting minutes, hours, days.
I've also seen a user whose was getting a 423 Locked account error, preventing API access. see https://trakt.docs.apiary.io/#introduction/locked-user-account

The first thing to do is on the Dtv app press the F12 key to open the Development tools page and click on the Console Tab to view the log, and look for messages from the Trakt.tv API to see what the error code is.
see https://trakt.docs.apiary.io/#introduction/status-codes

I am getting error code 429 and 423. just opened a ticket on trakt support website.
Tried removing the app from my account (along with all remaining removed as well) and re-authenticated.
Sync still puts out the same errors in the attached screenshot
Capture

So, I got a response from the support team

"It looks like DuckieTV stuffed your account with 268k play history items. Your play history has been de-duplicated to the best of our ability, and your API access has been unlocked.

Before using Trakt's API again, make sure to find a fix from this third party applications developer, or disable it entirely."

How do I make sure that play history items don't go that high?
Edit: Sorry accidentally hit 'close with comment'

The sync generally only pushes data to trakt when you mark an episode, season or show as watched but the app has no way of knwing if the content is already marked as watched in trakt.tv so it will cause duplicate plays if you mark things as watched that are already marked as watched in trakt but this shouldn't be an issue under normal usage unless there is a potential bug.

However, this probably would happen if you use the Push to Trakt functions that pushes all data from DuckieTV to Trakt. As mentioned the app doesnt know the state of your Trakt account so it'll push duplicate watch entries for everything and if you have a large library and have been using the sync for some time, pushing will result in a lot of duplicates which isnt strictly an issue however it seems trakt does lock accounts maybe if too much data gets updated at once? I don't know. I've seen locked account errors from trakt pretty often, not sure exactly what cases it.

Did you use the push data to trakt button?

Well, you would normally only ever press the push shows to trakt.tv once, the first time you want to load your initial set of Dtv shows and episode history to trakt.tv.
After that, as long as you have the Trakt.tv Watched Sync enabled, then Dtv sends a collection record to Trakt.tv when you download an episode, and a history record when you use Dtv to click on an episode and mark it as watched.

I myself have been using Trakt.tv with Dtv since I joined the Dtv team back in 2017, and my Trakt.tv history consists of 25705 play records and Dtv has 21064 episodes, so under normal operations there is not usually any problems.

If you want you could let us take a look at your Dtv settings.

  • Go to dtv>(i)About DuckieTV
  • and on that side panel scroll down to the Statistics section
  • Click on that header which should copy the stats to your clipboard
  • Open a blank plain text editor and paste and save the file as stats.txt or whatever,
  • then drag/drop the file here.
    Avoid pasting straight into a comment box here, we've had github lockout users for spamming before.

Did you use the push data to trakt button?

Yes, once I saw my watch history hasn't been updated since December, I used the 'push data to trakt'. It did nothing, so I tried multiple times (after re-authorizing, removing and adding dtv form trakt apps)

  • Click on that header which should copy the stats to your clipboard

I couldn't copy the info by this method, but I selected all and copied everything and cleaned it up. Please do let me know if I removed the necessary bits.
stats.txt

yeah, I should have specified that this is for the standalone.
which of the two do you usually use, the newtab or the standalone?

I exclusively use the newtab. But, it's been acting strange, thinking of moving to standalone

update : even the standalone version seems to send duplicate entries. I do have both newtab and standalone on the same computer (but different install locations & separate local db) newtab doesn't have access to trakt, only standalone
image

yeah, but if you have got both standalone and newtab running and talking with the same trakt.tv account then you are going to get duplicates.
so to begin with, disconnect one of them from the trakt.tv sync.

ok. so to recap.
You are now going to use standalone exclusively with trakt.tv, correct?
If so, I would like to see the settings for your standalone please, thanks.
Also, your newtab stats show that the trakt.tv sync is enabled. so that needs to be disabled to be certain it is not the source of duplicates whenever you start that app in the browser.
In the dtv>settings>Trakt.tv>trakt.tv sync should have an red X next to the header.
Do not use the push to Trakt.tv button, it is only meant to be used for the initial setup of Dtv, not as a regular manual update of the trakt.tv account ;-)
And tomorrow Id like you to monitor and check that trakt.tv is [edit] NOT getting duplicate records when you are using the standalone for downloads and watched updates.
Hopefully you will get back to a normal run.

I now disabled the newtab extension altogether.

You are now going to use standalone exclusively with trakt.tv, correct?

yes. I made sure to clear credentials from newtab before even logging into standalone. (I did all this after I sent the log. sorry, should've been more clear)
stats.txt

I notice that tixati is not connected to Dtv standalone. Is this normal for you to not have tixati up and running whenever you have Dtv active?
As a matter of routine, it is important that tixati be up and running before starting Dtv. And if you shutdown tixati then you should also shutdown Dtv as the app does not handle disconnections to clients well.
This will prevent Dtv from trying to use the standby method of sending torrents to tixati via the OS filetype interface, which asks the OS to launch the tixati app in order to process the torrent passes to it via the OS.
In this scenario, the torrent is loaded to the client, but because Dtv did not pass the torrent via its client interface, it cannot monitor the torrent progress and mark the download as complete.
This could possibly lead to complications downstream with the trakt.tv sync.

I rarely ever use the inbuilt search or download functions. My ISP is very tricky about alternate domains and blocking them. They work sometimes, but very unreliable. I just open the calendar, click search for torrent, copy the text, paste it in tpb open in a tor window and download manually from there.

I C.
in which case I suggest you set the torrent client to none in the dtv>settings>torrent>choose your torrent client>none
this will prevent Dtv from cluttering the console log [edit] (every 15 seconds) with failed attempts to connected to a client that you do not intend to use ;-)

So logically, you are manually setting the status of your episodes on Dtv by clicking the downloaded and watched buttons as needed.
Good to know. Further data for the mill. ;-)

OH, and as part of the monitoring, is to have the console log open so you can see if there are any trakt.tv related messages when you manually set an episode as downloaded or watched.
If it becomes necessary I can set up a special build to generate trace records of the Dtv-trakt.tv traffic in your log so we can be sure that your dtv standalone is not miss-behaving ;-)

So, i've tested with today's Superman ep and it works great!