Add auto refresh
Automatically reload books when added or removed.
Added reload on SIGUSR1: 355b60589106f99a5975f27a945e121f8ebc1353
Because of issues with https://github.com/fsnotify/fsnotify, I may just resort to polling.
I guess you never implemented this? Would be a nice feature to have.
I'm probably going to implement this in the next version the way I did in repogen.
https://github.com/geek1011/repogen/blob/80e716da1180b084116410b1c65c98534fab636e/main.go#L75-L133
The reasons why I haven't done it yet is:
- I needed to make sure I don't run out of file descriptors or other things like that for large libraries
- I needed to make sure I don't read from an ebook if it is, lets say, still being copied
- I needed to find an efficient way to check for changes, even if the file size or date is the same
- I needed to make sure that nothing will put BookBrowser into an endless refresh loop
- I needed to make sure this works on Windows, and I rarely use it anymore
- I wanted to test this before implementing it
Of course, I can see it's pretty complicated. I really like your book server, so I just thought I would let you know, this would be a nice feature to have. If you need further testing on Windows, let me know, since that's what I use.
Yep, no problem.