Open
Description
I personally probably don't need this, but just as an idea:
Hashing the pathname has a number of disadvantages, well mostly one,... what if the file (or an of its parent dirs) is moved?
- What I've described in chapters files as sidecars mpv-player/mpv#11248, namely hashing the file’s contents. Just with some minor change, namely not hashing the full file, but perhaps only the first 1MB or so.... or perhaps better somewhere in the middle of the file. Of course this won’t work with streamed file.
- Another idea would be to attach XATTRs to the file and use UUIDs. But again, wouldn't work on streamed data, and sometimes XATTRs may get "lost".
Maybe one could just keep hashing the pathname for any paths that don't start with /
or file:
Activity
mar04 commentedon Feb 1, 2023
I followed what mpv does with it's 'watch later' feature - that is hashing paths. Other options have their pros but also cons, as you mentioned, we would have to deal with special cases and I'm not sure it's worth it.