Req Better way to store "watched" flags for shows
#1
Hi there,

I often move tv shows around in the file structure to stay organized, and every time I will loose the "watched" info... so I wonder, why not just save the "watched" flag NOT with the full path of a video file, but with a hash of the file itself? That way Kodi could always recognize this exact file, no matter where in the file tree it currently resides. I would soooo Love that!!
Reply
#2
The 'problem' with that is that Kodi stores the full (network) drive path for each video file. And this method is not going to change anytime soon. Some extra file/database management tools would be welcome inside Kodi, but given the small number of available developers, that is gonna remain on our big wish list.

You can store the watched/resume statuses into nfo files via the Video Library Export function, then move your files, do a Video Clean Library action, and then rescrape the videos from their new location.
There are also 3rd party tools like Trakt, I personally use a PHP tool for my video database management.

The better question is perhaps why your files need to moved "often" in the first place. I save videos in an organized manner, and they basically never move again.
Reply
#3
You can also use the WatchedList addon... https://kodi.tv/addons/matrix/service.watchedlist
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#4
Well, I got my reasons and it's kind of pointless discussing them, isn't it. But for the record, I have a folder for the stuff I'm about to watch, stuff that I've watched already and want to keep for a while, sometimes I reorganize stuff to better find what's what...etc. So, that's how I did it for years and it fits me. I'm a dev myself, so I thought well, using the hash instead of the full path can't be such a big deal - and you guys probably thought about something like that before. But if there are reasons that make it more difficult than it seems, so be it. Thanks.
Reply
#5
(2022-07-11, 21:44)Karellen Wrote: You can also use the WatchedList addon... https://kodi.tv/addons/matrix/service.watchedlist
Thanks. Will check it out.
Reply
#6
Not to strain your patience too far... but is it really that difficult to insert a new column "hash" into the video table, and then look up the watched-flag not by file path but by the hash of that file? The only real issue I can see with that is that the computation of the hash of a large file may take a long time... too long probably for GB-files. I'm not too familiar with video formats, but I assume it would be sufficient to only take the first 100kB or so to uniquely identify a video file in any reasonably large set of files. So taking perhaps the first block of a file only to calc the hash might be enough for all practical purposes. Another solution to this would be to cache the hashes somewhere and only recalc them if files have been moved or renamed and the info got lost. With this method one could identify each file no matter the location or file name, but not the semantics of the file (which movie, which episode...), which is what WatchedList seems to be doing.

But I know that sometimes the technicalities are way more difficult than it looks from the outside. Just a suggestion.
Reply

Logout Mark Read Team Forum Stats Members Help
Better way to store "watched" flags for shows0