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

Everything seems correct, but there is no update on Traktv site :S #146

Closed EricBatlle closed 1 year ago

EricBatlle commented 1 year ago

First of all, awesome job, REALLY awesome job with this project Damien, KUDOS for you!

My Issue: I've launched TraktRater from VisualStudio 2019.

I correctly logged in, set the token etc. Now I'm trying to load this ratings.csv file from IMDB which only contains 3 tv shows: ratings.csv

I click import, seems like everything goes okey, but nothing changes on my traktv profile: https://trakt.tv/users/lotan/history/shows

This is the log: 20221027_113714.log

As far as I can read, this looks strange to me: "Found 3 tv show ratings in CSV file" and then "Importing 0 tv show ratings to trakt.tv"

...where are the 3 tv show ratings? ^^'

Thanks for the help!

Edit: After some debugging, seems like the 3 items are lost in IMDb.cs line 183:

var lRatedCsvShows = lRatedCsvItems.Where(r => r.Type.ItemType() == IMDbType.Show && r.MyRating != null)
                                               .Select(s => s.ToTraktRatedShow()).ToList();
damienhaynes commented 1 year ago

Hey @EricBatlle, thanks.

Could you double check it's not been filtered out on line 196 where it filters out anything you already rated? I know you said you debugged and it filtered out on line 183, but your log suggests it got past that with 3 items.

EricBatlle commented 1 year ago

I've not debugged carefully enough, the list is removed after line 196:

lRatedCsvShows.RemoveAll(s => lCurrentUserShowRatings.Any(c => (c.Show.Ids.ImdbId == s.Ids.ImdbId) ||   (c.Show.Title.ToLowerInvariant() == s.Title.ToLowerInvariant() && c.Show.Year == s.Year)));

This seems to remove all, but if you check my Traktv profile, you'll see that I do not have 2 of 3 of the rated shows so I don't know why it removes all of them :(

damienhaynes commented 1 year ago

Okay, so what is happening is that the program filters out shows you have already rated, so it does not keep resending them (it probably should also check if the rating value has changed too). Anyway, you can see you have already rated these items here: https://trakt.tv/users/lotan/ratings

EricBatlle commented 1 year ago

:O now I see, and how can I MARK as watched them? is this a feature that your app has? Or maybe I can help you implementing it

damienhaynes commented 1 year ago

Note: the app won't mark a whole series as watched if rated, however it does that for episodes and movies.

EricBatlle commented 1 year ago

Note: the app won't mark a whole series as watched if rated, however it does that for episodes and movies.

hmmm I see, is this some API limitation? or why the app do not mark as watched the serie?

damienhaynes commented 1 year ago

:O now I see, and how can I MARK as watched them? is this a feature that your app has? Or maybe I can help you implementing it

Unfortunately not at the show level, I would need to add that as an option. The API supports it (I think).

EricBatlle commented 1 year ago

:O now I see, and how can I MARK as watched them? is this a feature that your app has? Or maybe I can help you implementing it

Unfortunately not at the show level, I would need to add that as an option. The API supports it (I think).

I can't find where is explained in the Traktv API, if you can provide me the link with the method, maybe I can help you integrating it to the app ^^

EricBatlle commented 1 year ago

Also @damienhaynes you have the "Mark as Watched" inside IMDbWeb.cs, is this not related? This concretly (line 354): var response = TraktAPI.AddMoviesToWatchedHistory(Helper.GetSyncWatchedMoviesData(movies.Skip(i * pageSize).Take(pageSize).ToList())); looks like the desired behaviour hmmm.

Also this option leads to confusion for me :( : TrakScreenshot

damienhaynes commented 1 year ago

That option will only work for episodes and movies (not shows), a little confusing.

Let's say there are 5 seasons of a tv show, you may have rated the tvshow but you may have only watched 1 season (10 episodes), not 5 seasons, therefore it would be wrong to mark the entire show as watched.

Jdbye commented 1 year ago

Note: the app won't mark a whole series as watched if rated, however it does that for episodes and movies.

hmmm I see, is this some API limitation? or why the app do not mark as watched the serie?

With how long shows typically go on for and how many shows are never ending, having the entire show marked as watched because you rated it on IMDB is usually not what I (and probably most other people) want. Since you're likely to leave ratings for still ongoing shows. Probably nobody has asked for it before. But it could maybe work as an option, if it only applied to already ended shows. The logic being you're more likely to have fully watched a show that already ended, than a show still receiving new seasons, so it should minimize false positives. The problem with false positives is that if you have a large library you may have set your media center (Kodi or Plex or whatever you use) set to only show unwatched shows to reduce clutter. So false positives would result in those shows disappearing from view and you might not even notice. Because of that, it's better IMO to manually go in and mark seasons as watched, than have to do the opposite. No matter how the program marks (or doesn't mark) shows, there will always be some manual work required to either mark or unmark shows that were incorrectly assumed as unwatched or watched, there is no perfect solution to what you're asking, but my suggestion might be the best/least likely to cause additional complaints.

EricBatlle commented 1 year ago

If someone like me, has a list of shows that are pretty confident are fully finished, or prefer to mark them all as finished and then manually "fix" the seasons that are not, I've modified the code so this can be done, pretty simple since the current app code is well arquitected (good job damien!).

If you want (@damienhaynes ) I can make a PR but what I've simply make is to mimic the way shows are added, and do the same with shows ^^