damienhaynes / TraktRater

TraktRater is a tool written in C# to help users transfer user episode, show and movie user ratings and watchlists from multiple media database sites around the web.
623 stars 36 forks source link

Importing list from letterboxd not importing movies #141

Closed Norin-Radd closed 2 years ago

Norin-Radd commented 2 years ago

Hi,

When importing lists from letterboxd to trakt it creates the list but the list is empty with no movies added to list.

Its strange because it happens with lists with more than 100 movies.

error that appears on log

2022-04-02 14:53:09.459 [ERR ] [][08]: Error reading row 'Row: '445' (1 based) Type: 'TraktRater.Sites.API.Letterboxd.LetterboxdListItem' Field Index: '-1' (0 based)

damienhaynes commented 2 years ago

It sounds like something possibly wrong with the csv data (around line 445), could you attach it here?

Norin-Radd commented 2 years ago

theres more lines with it. i cant add this lists.

edit: figured it out... first description of list was being added in more than one row (because of enter), and there were some movie titles on csv with "movietitle".

So i removed the space enters and the quotes and imported fine.

Thanks

edit2: after all, removing the quotes and removing the comma didnt add specific movies, also movies with greek characters were not added, theres no english title for the movie and its available on trakt, i mannualy added movies to the trakt list.

damienhaynes commented 2 years ago

Okay, thanks for the update. If you feel there is specific ways that it could be parsed better and/or improve matching on trakt I can look into it. I will close this task for now.

Norin-Radd commented 2 years ago

Sorry to open this again, i can't import this particular list to trakt, don't know what is wrong with the csv.

in-search-of-the-last-action-heroes-1.csv

got this error to all rows of the file, i try to fix manually the csv but it doesnt import 2022-04-12 13:37:53.400 [ERR ] [][03]: Error reading row 'Row: '2' (1 based) Type: 'TraktRater.Sites.API.Letterboxd.LetterboxdListItem' Field Index: '-1' (0 based)

harristom commented 2 years ago

I'm having the same problem with every row of my exported Watchlist, nothing gets uploaded to Trakt

20220423_065828.log watchlist-tsharris-2022-04-19-17-34-utc.csv

damienhaynes commented 2 years ago

@harristom I didnt have any issues importing your watchlist:

2022-04-24 07:56:02.109 [INFO] [][01]: Starting import from Letterboxd
2022-04-24 07:56:02.117 [INFO] [][01]: Reading Letterboxd ratings export...
2022-04-24 07:56:02.118 [INFO] [][01]: Reading Letterboxd watched export...
2022-04-24 07:56:02.136 [INFO] [][01]: Reading Letterboxd diary export...
2022-04-24 07:56:02.137 [INFO] [][01]: Reading Letterboxd custom lists export...
2022-04-24 07:56:02.138 [INFO] [][06]: Found 0 movie ratings in CSV file
2022-04-24 07:56:02.138 [INFO] [][01]: Requesting watched movies from trakt...
2022-04-24 07:56:02.139 [DEBG] [][06]: Address: http://api.trakt.tv/sync/watched/movies
2022-04-24 07:56:02.471 [DEBG] [][06]: Response: []
2022-04-24 07:56:02.472 [INFO] [][01]: Found 0 watched movies on trakt
2022-04-24 07:56:02.473 [INFO] [][01]: Filtering out watched movies that are already watched on trakt.tv
2022-04-24 07:56:02.473 [INFO] [][01]: Importing 33 Letterboxd movies as watched...
2022-04-24 07:56:02.474 [INFO] [][01]: Importing page 1/1 Letterboxd movies as watched...
2022-04-24 07:56:02.480 [DEBG] [][06]: Address: http://api.trakt.tv/sync/history, Post: {"movies":[{"ids":null,"title":"The Purple Rose of Cairo","year":1985,"watched_at":"2020-10-05T00:00:00Z"},{"ids":null,"title":"Dolemite","year":1975,"watched_at":"2020-10-05T00:00:00Z"},{"ids":null,"title":"First Cow","year":2019,"watched_at":"2020-10-05T00:00:00Z"},{"ids":null,"title":"Shanghai Express","year":1932,"watched_at":"2020-10-05T00:00:00Z"},{"ids":null,"title":"Fanny and Alexander","year":1982,"watched_at":"2020-10-11T00:00:00Z"},{"ids":null,"title":"It Follows","year":2014,"watched_at":"2020-11-02T00:00:00Z"},{"ids":null,"title":"The Wild Boys","year":2017,"watched_at":"2020-11-14T00:00:00Z"},{"ids":null,"title":"Stranger by the Lake","year":2013,"watched_at":"2020-11-14T00:00:00Z"},{"ids":null,"title":"Border","year":2018,"watched_at":"2020-11-14T00:00:00Z"},{"ids":null,"title":"Scenes from a Marriage","year":1974,"watched_at":"2020-12-07T00:00:00Z"},{"ids":null,"title":"The Thin Man","year":1934,"watched_at":"2020-12-25T00:00:00Z"},{"ids":null,"title":"The Great Silence","year":1968,"watched_at":"2021-01-09T00:00:00Z"},{"ids":null,"title":"Fail Safe","year":1964,"watched_at":"2021-01-12T00:00:00Z"},{"ids":null,"title":"The Master","year":2012,"watched_at":"2021-02-01T00:00:00Z"},{"ids":null,"title":"In the Mood for Love","year":2000,"watched_at":"2021-02-07T00:00:00Z"},{"ids":null,"title":"A Girl Walks Home Alone at Night","year":2014,"watched_at":"2021-04-18T00:00:00Z"},{"ids":null,"title":"Under the Shadow","year":2016,"watched_at":"2021-04-18T00:00:00Z"},{"ids":null,"title":"Girlhood","year":2014,"watched_at":"2021-04-18T00:00:00Z"},{"ids":null,"title":"James Acaster: Cold Lasagne Hate Myself 1999","year":2020,"watched_at":"2021-05-23T00:00:00Z"},{"ids":null,"title":"Flesh and the Devil","year":1926,"watched_at":"2021-07-01T00:00:00Z"},{"ids":null,"title":"Luca","year":2021,"watched_at":"2021-07-01T00:00:00Z"},{"ids":null,"title":"Good Time","year":2017,"watched_at":"2021-08-15T00:00:00Z"},{"ids":null,"title":"Another Round","year":2020,"watched_at":"2021-08-21T00:00:00Z"},{"ids":null,"title":"No Man of God","year":2021,"watched_at":"2021-09-09T00:00:00Z"},{"ids":null,"title":"Brighton Rock","year":1948,"watched_at":"2021-09-16T00:00:00Z"},{"ids":null,"title":"Tabloid","year":2010,"watched_at":"2021-10-12T00:00:00Z"},{"ids":null,"title":"Shoplifters","year":2018,"watched_at":"2021-11-01T00:00:00Z"},{"ids":null,"title":"Harvey","year":1950,"watched_at":"2021-11-15T00:00:00Z"},{"ids":null,"title":"Memories of Murder","year":2003,"watched_at":"2022-02-12T00:00:00Z"},{"ids":null,"title":"Stop Making Sense","year":1984,"watched_at":"2022-02-12T00:00:00Z"},{"ids":null,"title":"Finding Frances","year":2017,"watched_at":"2022-02-12T00:00:00Z"},{"ids":null,"title":"Kiss Me Deadly","year":1955,"watched_at":"2022-04-14T00:00:00Z"},{"ids":null,"title":"Everything Everywhere All at Once","year":2022,"watched_at":"2022-04-17T00:00:00Z"}]}
2022-04-24 07:56:03.496 [DEBG] [][06]: Response: {"added":{"movies":33,"episodes":0},"not_found":{"movies":[],"shows":[],"seasons":[],"episodes":[],"people":[],"users":[]}}
2022-04-24 07:56:03.497 [INFO] [][01]: Finished import from Letterboxd
2022-04-24 07:56:03.521 [INFO] [][01]: Import Complete!
damienhaynes commented 2 years ago

@harristom I imported it as a Watchlist not a Custom list which I believe is what your issue is:

Reading Letterboxd custom list 'C:\Users\tom\Downloads\watchlist-tsharris-2022-04-19-17-34-utc.csv'

It is probably not in the correct form for custom list.

damienhaynes commented 2 years ago

@harristom a custom list should have these column headers: Position,Name,Year,URL,Description

damienhaynes commented 2 years ago

@Norin-Radd I see what the problem is in that list and I have a fix. It's because the header row is not in the expected position (row number). Here is a new TraktRater which has a fix (I will make it official very soon): TraktRater.zip

Norin-Radd commented 2 years ago

Hi,

The new release worked for me, thank you very much. :)

harristom commented 2 years ago

@harristom I didnt have any issues importing your watchlist:

2022-04-24 07:56:02.109 [INFO] [][01]: Starting import from Letterboxd
2022-04-24 07:56:02.117 [INFO] [][01]: Reading Letterboxd ratings export...
2022-04-24 07:56:02.118 [INFO] [][01]: Reading Letterboxd watched export...
2022-04-24 07:56:02.136 [INFO] [][01]: Reading Letterboxd diary export...
2022-04-24 07:56:02.137 [INFO] [][01]: Reading Letterboxd custom lists export...
2022-04-24 07:56:02.138 [INFO] [][06]: Found 0 movie ratings in CSV file
2022-04-24 07:56:02.138 [INFO] [][01]: Requesting watched movies from trakt...
2022-04-24 07:56:02.139 [DEBG] [][06]: Address: http://api.trakt.tv/sync/watched/movies
2022-04-24 07:56:02.471 [DEBG] [][06]: Response: []
2022-04-24 07:56:02.472 [INFO] [][01]: Found 0 watched movies on trakt
2022-04-24 07:56:02.473 [INFO] [][01]: Filtering out watched movies that are already watched on trakt.tv
2022-04-24 07:56:02.473 [INFO] [][01]: Importing 33 Letterboxd movies as watched...
2022-04-24 07:56:02.474 [INFO] [][01]: Importing page 1/1 Letterboxd movies as watched...
2022-04-24 07:56:02.480 [DEBG] [][06]: Address: http://api.trakt.tv/sync/history, Post: {"movies":[{"ids":null,"title":"The Purple Rose of Cairo","year":1985,"watched_at":"2020-10-05T00:00:00Z"},{"ids":null,"title":"Dolemite","year":1975,"watched_at":"2020-10-05T00:00:00Z"},{"ids":null,"title":"First Cow","year":2019,"watched_at":"2020-10-05T00:00:00Z"},{"ids":null,"title":"Shanghai Express","year":1932,"watched_at":"2020-10-05T00:00:00Z"},{"ids":null,"title":"Fanny and Alexander","year":1982,"watched_at":"2020-10-11T00:00:00Z"},{"ids":null,"title":"It Follows","year":2014,"watched_at":"2020-11-02T00:00:00Z"},{"ids":null,"title":"The Wild Boys","year":2017,"watched_at":"2020-11-14T00:00:00Z"},{"ids":null,"title":"Stranger by the Lake","year":2013,"watched_at":"2020-11-14T00:00:00Z"},{"ids":null,"title":"Border","year":2018,"watched_at":"2020-11-14T00:00:00Z"},{"ids":null,"title":"Scenes from a Marriage","year":1974,"watched_at":"2020-12-07T00:00:00Z"},{"ids":null,"title":"The Thin Man","year":1934,"watched_at":"2020-12-25T00:00:00Z"},{"ids":null,"title":"The Great Silence","year":1968,"watched_at":"2021-01-09T00:00:00Z"},{"ids":null,"title":"Fail Safe","year":1964,"watched_at":"2021-01-12T00:00:00Z"},{"ids":null,"title":"The Master","year":2012,"watched_at":"2021-02-01T00:00:00Z"},{"ids":null,"title":"In the Mood for Love","year":2000,"watched_at":"2021-02-07T00:00:00Z"},{"ids":null,"title":"A Girl Walks Home Alone at Night","year":2014,"watched_at":"2021-04-18T00:00:00Z"},{"ids":null,"title":"Under the Shadow","year":2016,"watched_at":"2021-04-18T00:00:00Z"},{"ids":null,"title":"Girlhood","year":2014,"watched_at":"2021-04-18T00:00:00Z"},{"ids":null,"title":"James Acaster: Cold Lasagne Hate Myself 1999","year":2020,"watched_at":"2021-05-23T00:00:00Z"},{"ids":null,"title":"Flesh and the Devil","year":1926,"watched_at":"2021-07-01T00:00:00Z"},{"ids":null,"title":"Luca","year":2021,"watched_at":"2021-07-01T00:00:00Z"},{"ids":null,"title":"Good Time","year":2017,"watched_at":"2021-08-15T00:00:00Z"},{"ids":null,"title":"Another Round","year":2020,"watched_at":"2021-08-21T00:00:00Z"},{"ids":null,"title":"No Man of God","year":2021,"watched_at":"2021-09-09T00:00:00Z"},{"ids":null,"title":"Brighton Rock","year":1948,"watched_at":"2021-09-16T00:00:00Z"},{"ids":null,"title":"Tabloid","year":2010,"watched_at":"2021-10-12T00:00:00Z"},{"ids":null,"title":"Shoplifters","year":2018,"watched_at":"2021-11-01T00:00:00Z"},{"ids":null,"title":"Harvey","year":1950,"watched_at":"2021-11-15T00:00:00Z"},{"ids":null,"title":"Memories of Murder","year":2003,"watched_at":"2022-02-12T00:00:00Z"},{"ids":null,"title":"Stop Making Sense","year":1984,"watched_at":"2022-02-12T00:00:00Z"},{"ids":null,"title":"Finding Frances","year":2017,"watched_at":"2022-02-12T00:00:00Z"},{"ids":null,"title":"Kiss Me Deadly","year":1955,"watched_at":"2022-04-14T00:00:00Z"},{"ids":null,"title":"Everything Everywhere All at Once","year":2022,"watched_at":"2022-04-17T00:00:00Z"}]}
2022-04-24 07:56:03.496 [DEBG] [][06]: Response: {"added":{"movies":33,"episodes":0},"not_found":{"movies":[],"shows":[],"seasons":[],"episodes":[],"people":[],"users":[]}}
2022-04-24 07:56:03.497 [INFO] [][01]: Finished import from Letterboxd
2022-04-24 07:56:03.521 [INFO] [][01]: Import Complete!

I don't see an option to import as a Watchlist. I think we are talking about 2 different things as I see that imported as "Watched", which I don't want to do. These are movies I will watch in the future (I thought Trakt also called this a Watchlist but I am new to it so maybe I'm wrong). You are right that I am adding the list in the custom lists section as I don't want to mark them as watched and there's not a Watchlist option. I am exporting the list from https://letterboxd.com/tsharris/watchlist/ and haven't edited the csv.

Maybe the new release fixes it but I'm not able to check right now as Windows Defender detects it as a Trojan and refuses to let me download it. I assume this is a misclassification by the heuristic detection and it will be working a few days so I will try again then.

damienhaynes commented 2 years ago

@harristom sorry for the confusion, the app indeed does not have a watchlist option. I will need to add support for that option.

damienhaynes commented 2 years ago

@harristom I added support for watchlist import (new option in dialog): TraktRater_v2.3.12.exe.zip

NB: you need to ignore the trojan detected, I'm not sure how to resolve that but I assure you I have not done anything malicious, of course that is totally up to you though ;)

harristom commented 2 years ago

I didn't mean to suggest you'd done anything malicious, just better safe than sorry and wait a day for Defender to update. Doesn't give any warnings now :)

New version works great, thank you so much!