Browse Source

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.
master
Martin Brodbeck 6 months ago
parent
commit
49853f9d2f
  1. 2
      src/database.rs

2
src/database.rs

@ -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();

Loading…
Cancel
Save