diff --git a/src/db.rs b/src/db.rs index 3e3cd47..9cca161 100644 --- a/src/db.rs +++ b/src/db.rs @@ -36,15 +36,13 @@ pub fn get_db_pool() -> SqlitePool { tracing::info!("Connecting to DB at {db_filename}"); - let plugin = conf.julid_plugin; - let conn_opts = SqliteConnectOptions::new() .foreign_keys(true) .journal_mode(SqliteJournalMode::Wal) .synchronous(sqlx::sqlite::SqliteSynchronous::Normal) .filename(&db_filename) - // be sure to have run `make` so that the libjulid extension is built - .extension(plugin) + // be sure to have run `make julid` so that the libjulid extension is built + .extension(conf.julid_plugin) .busy_timeout(Duration::from_secs(TIMEOUT)) .create_if_missing(true) .optimize_on_close(true, None) diff --git a/templates/my_watches_page.html b/templates/my_watches_page.html index fad8f67..c6582a3 100644 --- a/templates/my_watches_page.html +++ b/templates/my_watches_page.html @@ -26,13 +26,22 @@

Here are your things to watch:

- + + + + + + + + + + + + {% for watch in watches %} + {% include "watchlist-item.html" %} + {% endfor %} + +
TitleLinkTypeYearWatching?
{% else %}

diff --git a/templates/search_watches_page.html b/templates/search_watches_page.html index a2e7039..61d39e4 100644 --- a/templates/search_watches_page.html +++ b/templates/search_watches_page.html @@ -43,8 +43,8 @@ - {% for res in results %} - {% include "watch-search-result.html" %} + {% for watch in results %} + {% include "watchlist-item.html" %} {% endfor %} diff --git a/templates/watch-search-result.html b/templates/watch-search-result.html deleted file mode 100644 index e94e884..0000000 --- a/templates/watch-search-result.html +++ /dev/null @@ -1,19 +0,0 @@ - - {{res.title}} - - {% match res.metadata_url %} - {% when Some with (mdurl) %} - {{ mdurl }} - {% when None %} - {% endmatch %} - - - {{res.kind}} - {% call m::get_or_default(res.release_date, "when??") -%} - - - ??? - - - diff --git a/templates/watchlist-item.html b/templates/watchlist-item.html new file mode 100644 index 0000000..0345a5f --- /dev/null +++ b/templates/watchlist-item.html @@ -0,0 +1,19 @@ + + {{watch.title}} + + {% match watch.metadata_url %} + {% when Some with (mdurl) %} + {{ mdurl }} + {% when None %} + {% endmatch %} + + + {{watch.kind}} + {% call m::get_or_default(watch.release_date, "when??") -%} + + + ??? + + +