babluboy / bookworm

A simple ebook reader for Elementary OS
GNU General Public License v3.0
1.32k stars 100 forks source link

multiples copies of books #218

Closed Danimp46 closed 5 years ago

Danimp46 commented 5 years ago

I've reinstalled bookworm, but in the library it displays multiple copies of a book, and when I try to delete them, they won't disappear I don't know what to do

babluboy commented 5 years ago

@Danimp46 Thanks for raising this issue. I am guessing this might be due to the re-install and the DB will have data from an older version cross impacting the new version.

The easiest way to resolve the issue will be to delete the existing DB in the location: /home/sid/.config/bookworm/bookworm.db and restart bookworm. This will re-create the DB and you can either add books or in preferences set the scan location to where you have your ebooks so that they will be automatically loaded when you close bookworm.

However, before you delete the db as suggested above, for me to understand the issue better, can you please run bookworm from the terminal in debug mode with the command: com.github.babluboy.bookworm --debug > ~/bookworm_debug.txt and then try to delete the duplicate books. After you close bookworm you can attach the bookworm_debug.txt in your home directory to this issue.

Danimp46 commented 5 years ago

@babluboy Thank you so much, I had to run the debug mode a couple of times before I could delete all the duplicates books but finally I did it! bookworm_debug.txt

Kind regards, Dani

babluboy commented 5 years ago

@Danimp46 good to know that you managed to clean up the library. The auto addition (discovery of books) happens in the background when you close bookworm. I'm suspecting that the removal did not happen properly before the same book was auto discovered leading to duplicate of the book.

Running in debug does not do anything special, only the debug output is recorded. I forgot to mention that the command com.github.babluboy.bookworm --debug > ~/bookworm_debug.txt will overwrite the log each time debug is run. It should have been com.github.babluboy.bookworm --debug >> ~/bookworm_debug.txt - that would have appended the output instead of overwritting the data. So all I got from the debug log you attached is the details of the last run which does not give me any clue to the issue - the previous or first run would have the details I was looking for.

Closing the issue, but if this happens again, please run the com.github.babluboy.bookworm --debug >> ~/bookworm_debug.txt command and send me the debug log.