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.
638 stars 36 forks source link

"Watched Date" field not importing from letterboxd #87

Closed digi10 closed 6 years ago

digi10 commented 6 years ago

Hi, First, thanks for creating this utility - very useful!
I'm trying to import into Trakt a short test movie list (10 films) that I exported from letterboxd, but TraktRater doesn't appear to be setting the Trakt Watched Date properly. I've tried this several ways, even going into the letterboxd CSV export files and changing the Date field (normally set to export date) in the CSV files to match the Watched Date field in the Diary CSV, but it still isn't working. As a further test, in TraktRater options I turned on the third checkbox (set Watched Date to Release Date if the Watched Date is not available in export), and this DOES result in Watched Date = Release Date in Trakt. So this is telling me that the parser is not correctly finding the Watched Date data in the CSV files coming from letterboxd, even though they are there. I hope you can take a look into this and make a quick fix! Many thanks!

damienhaynes commented 6 years ago

Are you importing the Diary file with the Watched file? Because I will only process the watched date from the Diary file?

digi10 commented 6 years ago

baseline.zip Hi Damien, Thanks for the quick response! I actually tried it both of the following ways with the same result:

  1. Import with all three file paths set on the letterboxd tab of Trakt Rater: watched, diary, ratings.
  2. Import with only the diary file path set.

In both cases, the Trakt Watched date was not filled in properly. I'm attaching the three sample files I've been using.

damienhaynes commented 6 years ago

Just reading the code again, what should happen is this:

There could be a bug, but need to double check that is not what you see first e.g.

Ratings.csv Date,Name,Year,Letterboxd URI,Rating 2016-03-22,London Has Fallen,2016,https://letterboxd.com/film/london-has-fallen/,3.5

Diary.csv Date,Name,Year,Letterboxd URI,Rating,Tags,Watched Date 2016-03-22,London Has Fallen,2016,https://letterboxd.com/ltfearme/film/london-has-fallen/,3.5,Hoyts,2016-03-20

In this case it will import Long Has Fallen with watched date 2016-03-20 (at least that's what it should do).

damienhaynes commented 6 years ago

Thanks, just from a quick inspection it looks like your date format is MM\DD\YYYY where the program was expecting DD-MM-YYYY. This might very well be the reason its not working. Will double check and fix if that is the case.

damienhaynes commented 6 years ago

That was indeed the problem, I will make a fix to better support different date formats. I didn't expect the CSV export from their site to use different formats.

damienhaynes commented 6 years ago

Please use new release: https://github.com/damienhaynes/TraktRater/releases/download/2.3.3/TraktRater_v2.3.3.exe

digi10 commented 6 years ago

Thanks for the lightning fast update Damien! I will try this out ASAP and report back on how the new version works.

digi10 commented 6 years ago

Damien, Sorry it took so long to get back to you on this! Thanks for making the update. Importing from letterboxd with "Watched Date" format of MM/DD/YYYY is basically working now. The only odd thing I notice is that it is setting the Trakt watch date to 1 day earlier than what is in the letterboxd csv file. For example, a letterboxd watched date of 12/30/2017 is showing up in Trakt as 12/29/2017. This is consistent for every title I import in the test file I sent to you earlier.

damienhaynes commented 6 years ago

When I send the watched date over the API, its done in UTC (I do not convert, as I do not know what the timezone is in the csv file). The date time shown on trakt will presumably in your local time which is defined in https://trakt.tv/settings.

Do you know what time-zone the CSV dates are using?

digi10 commented 6 years ago

Ok, yes - that is the issue. Thanks again for the help!