LNReader-Android
LNReader-Android copied to clipboard
Thumbs not showing on one of my phones
I'm trying to migrate BakaReader Ex from one of my phones (ASUS Zenfone 2, Android 5.1.1) to another (ASUS Zenfone Selfie, Android 6.0.1). Something seems to be wrong, though - no matter what i try, thumbs don't seem to work on my new phone and all i see is placeholders (sometimes with alt text, sometimes not).
I've tried:
- Moving data with Titanium Backup (TB) to a fresh installation of BakaReader Ex or one restored with TB (1.1.37, yeah, first time i actually tried to migrate was more than 4 years ago).
- Moving data/com.erakk.lnreader manually to a fresh installation or one restored with TB (1.1.37).
- Making novel database and images backups and importing them in a fresh installation or in one restored with TB (1.1.37). Images backup doesn't seem to back up thumbs, actually, only full-res images - trying to make an image backup when "Process All Images" is disabled gives me "Failed to zip files: No entries" error. Manually copying thumbs (which are stored directly in /files/project/ directory) afterwards didn't help.
I've also tried to relink images after every thing i tried, but it didn't help - it always said that 0 images were updated. I took a look in the log files (here's one), and i didn't see anything there concerning thumbs.
So, i've tried updating my Selfie to LineageOS 15.1 (Android 8.1) - made no difference.
I also checked the fresh installation and noticed that thumbs are placed into the /files/project/thumbs directory (sorted in single-character-named folders by filename's first character), unlike on my Zenfone 2. So i tried batch renaming the files into corresponding format and putting them in corresponding folders, but that didn't help either.
Here's what i have, every thumb is just like that. Covers are okay though, surprisingly.
hiya, the apps not actively developed anymore. I'm using https://novelupdates.inverse.cc/ now
Yeah, i did notice that was the case, but i've got some novels downloaded that were C&D'd, and wanted to preserve those, at the very least. This seems very weird to me that everything works fine on old phone, yet fails to work on a newer one. Maybe there is some other log i can look at to try to figure this out?
Oh boy, i think i actually resolved my conundrum.
I've been juggling files around and it finally hit me that if BakaReader doesn't fix thumbs in the database for me, then i just need to do it myself. So i got myself DB Browser, opened up pages.db, found the table of interest (novel_books_content), extracted it into CSV and instantly noticed that most of the thumbs have paths like file:///storage/sdcard0/Android/data/com.erakk.lnreader/files/project/thumb.php_f=High_school_DxD_Volume_19_Cover-Mini.jpg&width=85, while few have something like file:///storage/emulated/0/Android/data/com.erakk.lnreader/files/project/thumb.php_f=C3_01-Cover.jpg&width=82. Turns out some of the thumbs actually worked on my Selfie! But latter work on the Zenfone 2 as well - i've checked directories and it seems that, unlike on Selfie, /sdcard0/ and /emulated/0/ were symlinked. A few regexp replaces later, i have a CSV with paths changed to /emulated/0/ (also, changed weird php names to /thumbs/N/Name-XXpx.ext, while at it), imported it into the db file in place of original table (don't forget to set attributes as they originally were, or BakaReader will slow down to a crawl!), and, voila, thumbs are present once again.
Though, i think there might be some weird files left like file:///storage/emulated/0/Android/data/com.erakk.lnreader/files/project/thumbs/C/CtG_v02%3F-84px.jpeg_. The actual file was saved as CtG_v02_-84px.jpeg_, so BakaReader doesn't pick it up.