trakt / script.trakt

Trakt.tv movie and TV show scrobbler for Kodi
GNU General Public License v2.0
319 stars 149 forks source link

Sync collection only works for just a portion of my movies collection #476

Closed rgrico closed 4 years ago

rgrico commented 4 years ago

Hi,

I've tried several times but aparently the execution of "script.trakt" addon only syncs a portion of my full movie collection.

I've attached the "error.log" file... kodi.log

Just an excerpt from the log file:

[Movies Sync] Compared movies, found 1744 to add. [Movies Sync] 1744 movie(s) will be added to Trakt.tv collection. ... [Movies Sync] Movies on Trakt.tv (1055), movies in Kodi (2770).

Thanks in advance!

nogoer commented 4 years ago

I can only help in offering suggestions, but my best guess is the movies it's not adding to trakt are ones that the titles don't match or titles cant be found. Looking at your log a lot of these appear to be foreign titles so it's possible they are just unknown. I would identify some of the missing titles and then do a search on trakt or themoviedb and see if the movie can be found. Maybe theres issues with character encoding or special characters in the titles as well.

rgrico commented 4 years ago

@nogoer all of this movies have been scraped with TMDB previously and as fas as I know the script uses the internal TMDB or TVDB identification number stored on my KODI database to perform the sync process with the Trakt.tv service.

Just an example... movies like "7 vírgenes", "9 Extraños" and "11:11 El mal tiene un nuevo número" that you can see in the log file doesn't even have this name in the file or in the metadata of the file. The title you're viewing in the logfile have been retrieved from TMDB database when doing an update of my library and stored in the internal Kodi database. The Log file shows the TMDB local description but I'm pretty sure that the script internally uses the ID in the HTTP POST message.

You can see this when clicking the TMDB button of this links... ("7 vírgenes") https://trakt.tv/movies/7-virgins-2005 goes to https://www.themoviedb.org/movie/481 ("9 Extraños") https://trakt.tv/movies/house-of-9-2005 goes to https://www.themoviedb.org/movie/19166 ("11:11 El mal tiene un nuevo número") https://trakt.tv/movies/11-11-2004 goes to https://www.themoviedb.org/movie/16843

So I don't know how this could be a problem for the script, also keep in mind that the log doesn't show any errors when syncing the movies, answers with a "HTTP 201" standard OK for a HTTP REST POST message.

I'm more inclined to think that must be a limit in the amount of synced items of a POST message in the Trakt.tv service, because it's a huuuuge sync of movies... but I couldn't find any info to justify this.

Anyway... thanks for your answer!

razzeee commented 4 years ago

Are you using Metadata files or only the files as scraping source?

On Fri, Oct 11, 2019, 18:33 rgrico notifications@github.com wrote:

@nogoer https://github.com/nogoer all of this movies have been scraped with TMDB previously and as fas as I know the script uses the internal TMDB or TVDB identification number stored on my KODI database to perform the sync process with the Trakt.tv service.

Just an example... movies like "7 vírgenes", "9 Extraños" and "11:11 El mal tiene un nuevo número" that you can see in the log file doesn't even have this name in the file or in the metadata of the file. The title you're viewing in the logfile have been retrieved from TMDB database when doing an update of my library and stored in the internal Kodi database. The Log file shows the TMDB local description but I'm pretty sure that the script internally uses the ID in the HTTP POST message.

You can see this when clicking the TMDB button of this links... ("7 vírgenes") https://trakt.tv/movies/7-virgins-2005 goes to https://www.themoviedb.org/movie/**481 ("9 Extraños") https://trakt.tv/movies/house-of-9-2005 goes to https://www.themoviedb.org/movie/19166 ("11:11 El mal tiene un nuevo número") https://trakt.tv/movies/11-11-2004 goes to https://www.themoviedb.org/movie/16843**

Note: I've marked in bold text the TMDB internal ID.

So I don't know how this could be a problem for the script, also keep in mind that the log doesn't show any errors when uploading the movies, answers with a "HTTP 201" standard OK for a HTTP REST POST message.

I'm more inclined to think that must be a limit in the amount of uploaded files of a POST message in the Trakt.tv service, because it's a huuuuge upload of files... but I couldn't find any info to justify this.

Anyway... thanks for your answer!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/trakt/script.trakt/issues/476?email_source=notifications&email_token=ABNLEZFTORPONNTXKSPVX3DQOCTHPA5CNFSM4I7E2NAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBARCPI#issuecomment-541135165, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNLEZCHIP35TP75F2ZINJDQOCTHPANCNFSM4I7E2NAA .

nogoer commented 4 years ago

@nogoer all of this movies have been scraped with TMDB previously and as fas as I know the script uses the internal TMDB or TVDB identification number stored on my KODI database to perform the sync process with the Trakt.tv service.

Just an example... movies like "7 vírgenes", "9 Extraños" and "11:11 El mal tiene un nuevo número" that you can see in the log file doesn't even have this name in the file or in the metadata of the file. The title you're viewing in the logfile have been retrieved from TMDB database when doing an update of my library and stored in the internal Kodi database. The Log file shows the TMDB local description but I'm pretty sure that the script internally uses the ID in the HTTP POST message.

You can see this when clicking the TMDB button of this links... ("7 vírgenes") https://trakt.tv/movies/7-virgins-2005 goes to https://www.themoviedb.org/movie/481 ("9 Extraños") https://trakt.tv/movies/house-of-9-2005 goes to https://www.themoviedb.org/movie/19166 ("11:11 El mal tiene un nuevo número") https://trakt.tv/movies/11-11-2004 goes to https://www.themoviedb.org/movie/16843

So I don't know how this could be a problem for the script, also keep in mind that the log doesn't show any errors when syncing the movies, answers with a "HTTP 201" standard OK for a HTTP REST POST message.

I'm more inclined to think that must be a limit in the amount of synced items of a POST message in the Trakt.tv service, because it's a huuuuge sync of movies... but I couldn't find any info to justify this.

Anyway... thanks for your answer!

Yeah it was just a starting point guess, but my next hunch would be like yours and it's the sheer quantity of movies thats causing a hiccup. Im also dealing with my own issues of tv show episodes not showing collected and or watched which is frustrating in it's own way.

As far as a POST though, this method is used because it doesnt really have a limit that im aware of. Im a web developer who does a lot of ecommerce API stuff and ive submitted POSTs with tons of data and not had any issues. So if this is an issue it's a conscious issue on Trakts side to limit how many records they process at once which is also a common thing so systems don't get tied up processing. Pagination is the way of dealing with this much data, but im sure this is out of scope for kodi and trakt devs since it's very uncommon to have thousands of movies and kodi addon would have to implement it so they page through during a sync update.

rgrico commented 4 years ago

Are you using Metadata files or only the files as scraping source?

@Razzeee Just the files. Thanks for answering!

razzeee commented 4 years ago

On vacation at the moment, thus not opening the log. I'm assuming your using kodi 18.4? Which scraper? Can you scrape the library again? Would you be able to look into the database?

rgrico commented 4 years ago

@Razzeee Yes, I'm using Kodi 18.4. I've taken a look at the "movie_view" database view with DBeaver and from 2770 movies in my library...

I've been using the "TheMovieDB" scraper for movies since I have this Kodi device.

I've checked the first movies of the batch that didn't get synced in the logfile and all of them have "uniqueid_type = unknown" and "uniqueid_value" with IMDB format (tt1781058...)

Could I re-scrap the entire library again without losing the "viewed" states?

Thanks!

razzeee commented 4 years ago

I don't think you can. But you might be able to manipulate the database to set the uniqueid type on the unknown items? Which might or might not help.

rgrico commented 4 years ago

@Razzeee Thanks for all the advice! Unfortunately now I don't have the time to perform operations like the one suggested.

I've uninstalled the trakt.tv addon and synced the viewstate of the movies using the "Watchedlist" Kodi Addon (that was anyway the purpose of using trakt.tv for me).