Closed vishwasmittal closed 5 years ago
Spawns a Goroutine checks walks down the file tree, starting from the shares, and create a .fscache/thumbnails
directories in each directory and creates low-resolution thumbnails for each image.
TODOs:
[ ] Run the goroutine periodically and check the last-modified date for images and cache.
[ ] Add a new query parameter in the /files
path named as cache
which will be a bool
specifying whether to send the metadata with the list of files. The default will be false
@csoni111 @cpg the thumbnail feature is almost completed. Awaiting review. Please review it and suggest the changes.
Instead of running the createThumbnailCache()
func periodically, you can do this:
1) Run the createThumbnailCache()
func once on program start.
2) Add a fileWatcher using fsNotify library to keep track of changing files, and update/create new thumbnails for any change in image files.
Ref: https://medium.com/@skdomino/watch-this-file-watching-in-go-5b5a247cf71f
@csoni111 I have made the necessary changes as you asked.
@csoni111 please review it.
Fixes #19