alexandria-book-collection-manager icon indicating copy to clipboard operation
alexandria-book-collection-manager copied to clipboard

Picture of book without ISBN disappears after restart

Open GuillaumeHM opened this issue 7 years ago • 2 comments

When I add a book with a picture and without ISBN field filled, the book with its picture appears in the book list of my_library_1 after clicking on ADD button. If I restart the software, book still appears but without the picture. But the picture file is still in the ~/.alexandria/my_library_1/.

This bug is annoying. My Alexandria version is 0.7.1

Note : there are also pictures of book I deleted from my_library_1 (moved to my_library_2) in the folder. There is also a lot of .cover.orig picture files. I think they appear when I change the picture of a book. There should be a way to clean up all these unneeded files.

Thanks for your help

GuillaumeHM avatar Nov 11 '17 16:11 GuillaumeHM

String.hash result isn't the same across run, so cover cannot be retrieved from book.ident

Maybe using Digest::MD5 here?

https://github.com/mvz/alexandria-book-collection-manager/blob/09326dfc35fe5b0dafdc48c7a121565bd66cdba2/lib/alexandria/models/book.rb#L42

g-maxime avatar Dec 29 '21 02:12 g-maxime

Thanks, @g-maxime for figuring this out!

mvz avatar Dec 29 '21 06:12 mvz