ShokoAnime / ShokoServer

Repository for Shoko Server.
http://shokoanime.com/shoko-server/
MIT License
386 stars 75 forks source link

fix: add last modified and update file watcher #1017

Closed revam closed 1 year ago

revam commented 1 year ago

Changes

da3dsoul commented 1 year ago

No. Firstly, why? Secondly, you are inverting control and making filesystem watcher dependent on both other code and a database connection. Thirdly, this breaks the current recommended method to re-sort files, which is to move them back to a drop source. Explain the purpose, and we can discuss it

revam commented 1 year ago

For other people looking at this, the discussion happened on discord.

revam commented 1 year ago

Thirdly, this breaks the current recommended method to re-sort files, which is to move them back to a drop source.

Also, I explicitly tried to avoid that with the initial implementation. It only affected the events fired when the file metadata (e.g. last write, last access, file size changed, file permission changed, etc.) were changed. So moving files would still be picked up... i think. I didn't try to move any files but I think that would fire a removed followed by a added event and not a changed event.

da3dsoul commented 1 year ago

Looks good