Do not rely on database column ext.

Since firmware version 6.4 seems to ignore this column, we also look at the file name suffix.
This commit is contained in:
Martin Brodbeck 2021-08-06 11:00:16 +02:00
parent e1beced72c
commit 49853f9d2f

View file

@ -30,7 +30,7 @@ fn get_epubs_from_database(tx: &Transaction) -> Vec<BookEntry> {
ON books.id = btg.bookid
LEFT OUTER JOIN genres
ON genres.id = btg.genreid
WHERE files.storageid = 1 AND books.ext = 'epub'
WHERE files.storageid = 1 AND (books.ext = 'epub' OR files.filename LIKE '%.epub')
ORDER BY books.id"#,
)
.unwrap();