Bug 469138 - Cover cache not created properly on first run, covers not shown in UI
Summary: Cover cache not created properly on first run, covers not shown in UI
Status: RESOLVED FIXED
Alias: None
Product: Arianna
Classification: Applications
Component: general (show other bugs)
Version: 1.0.1
Platform: NixOS Linux
: NOR normal
Target Milestone: ---
Assignee: Carl Schwan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-29 12:30 UTC by Tom Hall
Modified: 2023-05-27 12:20 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Hall 2023-04-29 12:30:10 UTC
SUMMARY
The first time you run arianna on a new system, it doesn't appear to create the cover cache directory until too late, so covers are not show for any books added during the initial run.

STEPS TO REPRODUCE
1. Run arianna for the first time on a clean system/vm and add a book (either put the book somewhere baloo can find it, or manually add it in arianna -> book cover doesn't show, message in stdout:
```
qrc:/content/ui/GridBrowserDelegate.qml:117:13: QML Image: Cannot open: file:///home/thrall/.cache/arianna/covers/9781580805193%00b3235430-024c-4f9c-babb-9d95a0ba4e7c.jpg
```
cache directory (`~/.cache/arianna/covers`) doesn't exist.

2. Close arianna
3. Reopen arianna and add a second book (again, either place a new file where baloo can find it or add manually) -> second book's cover appears in arianna. No warning in stdout. All books added afterwards show their covers.

The first book never loads its cover unless you remove and re-add it.
OBSERVED RESULT


EXPECTED RESULT
On first run, Arianna creates the cover cache directory and displays all covers in the UI.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Tom Hall 2023-04-29 12:40:36 UTC
Note, second book can't be a copy of the first book, otherwise it just looks for the same cache entry and doesn't create the cache.
Comment 2 Carl Schwan 2023-05-27 12:20:10 UTC
Git commit 44c26f41ad7cd01118eaa6bc413c98a34bab0cfc by Carl Schwan.
Committed on 27/05/2023 at 12:20.
Pushed by carlschwan into branch 'master'.

Fix path of book covers

Create uuid instead of using book id which can have invalid characters.
Fixed-In: 1.1

M  +2    -3    src/booklistmodel.cpp

https://invent.kde.org/graphics/arianna/-/commit/44c26f41ad7cd01118eaa6bc413c98a34bab0cfc