Merge pull request 'Attempt to support books on sdcard' (#6) from sdcard into master

Reviewed-on: #6

Fixes #5
This commit is contained in:
Martin Brodbeck 2025-01-20 20:56:45 +01:00
commit 10091ef6d8

View file

@ -30,7 +30,7 @@ fn get_epubs_from_database(tx: &Transaction) -> Vec<BookEntry> {
r#" r#"
SELECT books.id, folders.name, files.filename, books.firstauthor, SELECT books.id, folders.name, files.filename, books.firstauthor,
books.author, genres.name, first_author_letter, series books.author, genres.name, first_author_letter, series
FROM books_impl books JOIN files FROM books_impl books JOIN files, storages
ON books.id = files.book_id ON books.id = files.book_id
JOIN folders JOIN folders
ON folders.id = files.folder_id ON folders.id = files.folder_id
@ -38,7 +38,7 @@ fn get_epubs_from_database(tx: &Transaction) -> Vec<BookEntry> {
ON books.id = btg.bookid ON books.id = btg.bookid
LEFT OUTER JOIN genres LEFT OUTER JOIN genres
ON genres.id = btg.genreid ON genres.id = btg.genreid
WHERE files.storageid = 1 AND {}.ext = 'epub' WHERE files.storageid IN (SELECT storages.id WHERE storages.type = 1) AND {}.ext = 'epub'
ORDER BY books.id"#, ORDER BY books.id"#,
&books_or_files &books_or_files
); );