add imdb url to search result items

This commit is contained in:
Joe Ardent 2024-01-15 16:37:38 -08:00
parent 785913fdba
commit 8ca6751a87
3 changed files with 16 additions and 4 deletions

View File

@ -55,10 +55,13 @@ fn main() {
} }
async fn ensure_omega(pool: &SqlitePool) { async fn ensure_omega(pool: &SqlitePool) {
User::omega() let omega = User::try_get("omega", pool).await.unwrap();
.try_insert(pool) if omega.is_none() {
.await User::omega()
.expect("Could not ensure Omega"); .try_insert(pool)
.await
.expect("Could not ensure Omega");
}
} }
async fn generate_invites(quest: Iq, number: u8, pool: &SqlitePool) -> Vec<Julid> { async fn generate_invites(quest: Iq, number: u8, pool: &SqlitePool) -> Vec<Julid> {

View File

@ -11,6 +11,7 @@
<thead> <thead>
<tr> <tr>
<th>Title</th> <th>Title</th>
<th>Link</th>
<th>Type</th> <th>Type</th>
<th>Year</th> <th>Year</th>
<th>Watching?</th> <th>Watching?</th>

View File

@ -1,5 +1,13 @@
<tr id="watchlist-item-{{watch.id}}"> <tr id="watchlist-item-{{watch.id}}">
<td><span class="watchtitle"><a href="/watch/{{watch.id}}">{{watch.title}}</a></span></td> <td><span class="watchtitle"><a href="/watch/{{watch.id}}">{{watch.title}}</a></span></td>
<td><span>
{% match watch.metadata_url %}
{% when Some with (mdurl) %}
<a href="{{ mdurl }}">{{ mdurl }}</a>
{% when None %}
{% endmatch %}
</span>
</td>
<td>{{watch.kind}}</td> <td>{{watch.kind}}</td>
<td> {% call m::get_or_default(watch.year(), "when??") -%}</td> <td> {% call m::get_or_default(watch.year(), "when??") -%}</td>
<td> <td>