Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Play Count path dependent?
#1
Does Kodi generate a hash of a file or of the file and its path? When a file has been marked as already watched it will be listed as unwatched when moved to another directory?
Reply
#2
If I remember well, the watch/unwatch status and counter are stored in the databases (wiki) that Kodi maintains.

So if it's moved, it basically becomes a new file for Kodi (you'll have to scan it back into the library if you want to view it that way), with reset status for watch and count.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#3
you are remembering well indeed DarrenHill

-----

detailed explanation

playcount is in the files table - files ( idFile integer primary key, idPath integer, strFilename text, playCount integer, lastPlayed text, dateAdded text)

all other table entries including movies and episodes use this playcount and is linked by idFile to it's content

filename is the full path to the file, when the path does not match an existing entry there is a new entry created for it i.e. when the file is moved

that new entry is defaulted to playCount NULL which is interpreted as unwatched

there is no playcount tracking for movies, episodes, other as it only tracks by file and then it also knows that file is a certain movie so that movie is in turn watched

-----

the best way so far to track based on content instead of file is using https://trakt.tv or similar
Reply
#4
(2023-09-12, 15:47)jepsizofye Wrote: the best way so far to track based on content instead of file is using https://trakt.tv or similar
 Or, export to separate nfo files then selectively rescan after moving the file (and nfo file).  Since Kodi 20 no advancedsetting entry is required.

scott s.
.
Reply
#5
Thanks for clearing that up, guys.
(2023-09-12, 13:15)DarrenHill Wrote: So if it's moved, it basically becomes a new file for Kodi (you'll have to scan it back into the library if you want to view it that way)
Let me get this straight: I'm still playing back files only so Kodi will always consider a moved file as new. Switching over to library use instead would help in that rescanning after moving a file would make Kodi recognize it as the same file and keep the play count?
Reply
#6
No, if the file is moved then it will be a new file in either mode.

If it's scanned into the library then moved, the library link will break and you will have an orphaned entry in the libary, at least until you do a clean library which will remove it.

Basically Kodi is not designed for the files in the sources to be moving around, and makes no effort to track them when they do.
There are methods to do it (such as Trakt mentioned above), but they are add-ons and not core Kodi.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#7
(2023-09-17, 09:00)tecc Wrote: Let me get this straight: I'm still playing back files only so Kodi will always consider a moved file as new. Switching over to library use instead would help in that rescanning after moving a file would make Kodi recognize it as the same file and keep the play count?
Close.  If you have scanned a video item to the library, exporting your library to separate (nfo) files will export your current playcount and resume point.  Then you move your files (and matching nfo files).  Now when you rescan (in the new location) the nfo file will be used as the scrape source and the playcount / resume points (and user rating).  Of course if you resume watching an item after you export, the exported values will be stale.

scott s.
.
Reply

Logout Mark Read Team Forum Stats Members Help
Play Count path dependent?0