MediaTracker icon indicating copy to clipboard operation
MediaTracker copied to clipboard

Trakt.tv import doesn't import much info

Open BanCrash opened this issue 2 years ago • 5 comments

Hi, finally with Lists added I started from scratch and tried to import my Trakt.tv info, but it seems that it doesn't import much info:

EDIT:

Peliculas = Movies Programas = Shows Temporadas = Seasons Episodios = Episodes Lista de seguimiento = Watchlist Historial de visionado = Seen history Puntuaciones = Scores

image

It doesn't import any episode watched nor any movie watched, while my trakt.tv profile has 2 pages of series progress and 678 movies watched:

image image

In the logs I don't see anything relevant.

I'm using the last commit of the repository manually compiled, but after that I also tried with npm install -g mediatracker and in that version it has the same result.

BanCrash avatar May 11 '22 11:05 BanCrash

I've saw in the Trakt.tv api that they send the information in pages, could be that MediaTracker is only reading the first page? I see that there are a few episodes and movies added as watched, and I checked my history and all the stuff before May 3 is not added, but all after May 3 included until yesterday (when I did the import) is added.

So I think the issue could be that is only reading the first page?

EDIT: I remade the import and it added all elements duplicated, and also added the new elements that I've saw yesterday and today, but it didn't add the elements of the 2 firsts days (May 3 and May 4 were added on the previous import, but in this import they are not imported). So I think this is the case, it's only reading the first page.

EDIT2:

image https://trakt.docs.apiary.io/#reference/users/history/get-watched-history

And also, on the introduction: image

BanCrash avatar May 12 '22 17:05 BanCrash

Thank you. Pagination is optional for watchlist and ratings, so I incorrectly assumed it's also optional for history, now I see it's not

bonukai avatar May 12 '22 18:05 bonukai

not sure what exactly is going on with mine, as it's barely importing anything at all from trakt.. A couple things are just stuck at ?/{number} .. ontop of it not really importing fully or at all :/

05-28-2022_11-36-22 05-28-2022_11-35-58

This is running from source. I let it sit for a while in hopes that maybe it was still just importing, but nothing ever changed.

JourneyOver avatar May 28 '22 16:05 JourneyOver

Hello, can confirm mine only gets 6 tv shows as well, and not much else. They are all my watchlists as far as I can say, and no history imported.

Edit: Yup, only watchlist is imported to gui

{"state":"updating-metadata","exportSummary":{"watchlist":{"movies":2,"shows":6},"seen":{"movies":0,"episodes":10},"ratings":{"movies":249,"shows":73,"seasons":1,"episodes":233}}}

Ardakilic avatar Oct 31 '22 00:10 Ardakilic

Hi, I am having problems importing from trakt too. I have a some personal list and nothing on my watchlist list and, of course, a bunch of watched movies/episodes. When I try import from trakt I am able to successfully authenticate with trakt but then I am stuck on the importing page witch briefly states "exporting" to turn nearly immediately to "importing" without any other progress and no import ever happening. Screenshot 2022-10-31 alle 14 45 23

blackph0en1x avatar Oct 31 '22 13:10 blackph0en1x

Hi @bonukai , did you get any progress on this matter? After the data lose I would like to get all the info I can from Trakt to be sure that all these years of stats don't get lost.

BanCrash avatar Dec 22 '22 05:12 BanCrash

I started working on that long time ago, it only needs some tests, I will try to finish it soon. I wish I could have more time to work on this project

bonukai avatar Dec 28 '22 13:12 bonukai

I started working on that long time ago, it only needs some tests, I will try to finish it soon. I wish I could have more time to work on this project

Sure, I understand that. Thanks for the update!

BanCrash avatar Dec 28 '22 14:12 BanCrash

@bonukai it is the same behavior with me. Only the contents of the watchlist are imported.

Thank you at this point for your efforts! I really appreciate it.

Can you tell when to test the revised import?

Buddinski88 avatar Jan 16 '23 09:01 Buddinski88

I am literally sick of Trakt. I mark things watched and later they don't show as watched. I looked into the code, but I wouldn't know how to make the tests. I might be able to cobble the functionaility together, but you said you got that done already. Is there any way that I can help? Make some fake data file or something?

phirestalker avatar Apr 18 '23 22:04 phirestalker

@phirestalker I've just published all the changes I was working on to a branch wip, including TraktTv import. There are few big changes there, if you could test it manually, that would be very helpful.

bonukai avatar Apr 22 '23 00:04 bonukai

It seems that with that version its importing more info, but I have to execute several times the import to have all the media:

Second time of importing the same account (the first time I didn't made a screenshot, but it imported less items): imagen

Third time: imagen

Fourth time: imagen

etc.

As you can see, on each import the quantity gets higher but never reach the maximum (for example, "Episodios" (Episodes) started on 1523 on the second import, and in the 4th reached 3603, but didn't reach the 6891 items that are on my trakt profile).

BanCrash avatar Apr 22 '23 09:04 BanCrash

@bonukai I've found these little issues (the one on this issue and #488 & #489 ), but in general I'm really happy with this update, great job!

BanCrash avatar Apr 22 '23 09:04 BanCrash

Fired up a docker from that branch. How do I know it is doing something? The numbers are not changing, but it says importing for the past 5 minutes.

phirestalker avatar Apr 22 '23 21:04 phirestalker

I did the first one wrong. I had to edit the docker-compose.yaml to use the local Dockerfile. I see the same behavior as @BanCrash.

git show
commit 99207bedd77a722d5056b607569dfa0ff7c5650f (HEAD -> wip, origin/wip)
Author: bonukai <[email protected]>
Date:   Sat Apr 22 15:27:25 2023 +0100

phirestalker avatar Apr 23 '23 00:04 phirestalker

@phirestalker Could you please try again, I have just added some changes

bonukai avatar Apr 23 '23 00:04 bonukai

I noticed it kept what it had before. Should I delete the db when I try again? If so, where can I find it?

phirestalker avatar Apr 23 '23 00:04 phirestalker

You can use the same database, importing items again will add only those items that are not in your database

bonukai avatar Apr 23 '23 00:04 bonukai

It almost imported everything on the first try. The second try it gave an error.

First time

Screenshot 2023-04-22 at 5 41 08 PM

Second time

Screenshot 2023-04-22 at 5 42 41 PM

phirestalker avatar Apr 23 '23 00:04 phirestalker

@phirestalker this issue should be solved now

bonukai avatar Apr 23 '23 01:04 bonukai

@BanCrash I've updated the how metadata is downloaded and this should fix the problem you are experiencing here, where you need to run the import multiple times

bonukai avatar Apr 23 '23 01:04 bonukai

Now if item is not found by tmdb id it will also be search by imdb id, maybe this will help to import all items

bonukai avatar Apr 23 '23 01:04 bonukai

Hi again @bonukai , I used the import on my previous database and it imported everything, but then for more testing I deleted the database and tried to import and I got this huge error: (I put in a .txt because it's so big)

Error.txt

BanCrash avatar Apr 23 '23 07:04 BanCrash

@BanCrash I forgot there is a limit to how many records can be inserted at once, it should be fixed now, thank you.

bonukai avatar Apr 23 '23 12:04 bonukai

I tried with the new updates. I did not delete my database, seeing if it would fill in the missing ones. I got an error that I have attached here. MediaTracker error.txt

phirestalker avatar Apr 23 '23 13:04 phirestalker

@BanCrash I forgot there is a limit to how many records can be inserted at once, it should be fixed now, thank you.

@bonukai Ok, now on the first attempt after deleting the database I got this:

imagen

Importing again doesn't have any change so it seems that this is the maximum I'm gonna get. Another suggestion arrives then, could you add to the log the items that are missing?

Debugging myself I achieve to print to the console four items: Test1: Trakt 411426 Slug: vader-episode-i-2018 Tmbd: 560927

Test1: Trakt 185335 Slug: shrek-3d-the-story-continues-2003 Tmbd: 288306

Test1: Trakt 72222 Slug: huerfanos-electronicos IMDB: tt3317336

Test1: Trakt 109068 Slug: overwatch IMBD tt4332152

But there are a lot more missing and I don't know how to continue.

In any case thank you for taking time fixing this!

BanCrash avatar Apr 23 '23 13:04 BanCrash

@phirestalker this have been now fixed.

@BanCrash Now after importing all not imported items will be displayed on the page. It looks like they are not in TMDb database and TMDb ids on Trakt are invalid for those items

bonukai avatar Apr 29 '23 02:04 bonukai

@phirestalker this have been now fixed.

@BanCrash Now after importing all not imported items will be displayed on the page. It looks like they are not in TMDb database and TMDb ids on Trakt are invalid for those items

Just tested and it works like a charm, thanks!

For my side I think this issue can be closed, let's see what @phirestalker say.

BanCrash avatar Apr 29 '23 08:04 BanCrash

I love it! Quick question. For upcoming titles that are missing on TMDB, does it use the IMDB id and keep it? Thank you for working on this.

EDIT: sorry if I wasn't clear, I think it's ready for primetime.

phirestalker avatar Apr 29 '23 12:04 phirestalker

No, the items the are not on the IMDb are simply omitted. After looking at some examples, I think this is the best solution.

For example Vader- Episode I has invalid TMDb id, just like Shrek +3D - The Story Continues. A Overwatch shows links to Overwatch game on IMDB, there are two separate entries for the same Tv Show Divorce and Divorce.

I think it's better to keep only TMDb as the only source

bonukai avatar Apr 29 '23 19:04 bonukai