-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use subdirectory media for thumbnails #31
Comments
Unfortunately its way more complicated.
Unfortunately it needs a major refactoring, maybe the best solution would be to have a dedicated 'previewPhoto' field on the directory. And one should fill this property on the server side. Sorry but I don't see any simple/elegant solution right now for this problem. |
Fair enough, I feared that and suspected as much when I wandered around LocalStorage but I hoped I could at least use the information on the client when it was there. I might be ambitious enough to try adding that field server-side myself, I'll see. |
I was thinking about this problem. I would not put too much effort in it. The file explorers not support this feature either. I reasonable feature around directories would be to show if a directory is empty or not. a) I think a server side solution would be too complex compared to what gain we could get from it.
Then you add a new photo to the b) A semi solution could be the one that you started implementing. P.S.: I've merged your PR, but you were not doing the commit with your github account (?), so you are not showing up as a contributor to the project. Sorry about that. |
I don't know how nice it is but you can iterate up through the parents, re-calculating their previews and stop at the first parent that doesn't change. To make sure you don't do this over and over during the index, you can add all changed folders to a queue during index then deal with them at the end. The update should also be doable with a nice fast recursive SQLite query if the database is around.
Hmm... With IndexedDB the cache can be made much larger, though that defers the problem rather than solves it. Still, I have 27k images in my database and it's only 3.5MB in total (the SQLite DB file), which should fit into localStorage on most browsers. IndexedDB should make this largely a non-issue though.
No worries, I noticed that when I sent the PR, it's okay. |
Is there any update on this? |
Not yet. Sorry. |
+1 on this, my photo gallery is quite bare without previews. |
PR #165 fixed this and the latest commit made some improvements to it. |
…lecting preview that is on the same path, adding tests) #31
I have many folders which don't themselves contain any media but contain a folder that does. E.g.
In cases like this, I'd really like "Folder 1" to show "Thing.jpg" as a thumbnail. I tried to do this with a basic BFS in bobobo1618@8043736 but there seems to be something missing.
The text was updated successfully, but these errors were encountered: