[Bugfix]: Misc. bugfixes 2024-04-16 (#189)

* Manually installed mutagen

* Stopped upgrade form from submitting on enter

* Gracefully handle duplicate enqueued downloads

* Update metadata thumbnail fetcher to use the best jpg available
This commit is contained in:
Kieran
2024-04-16 17:37:39 -07:00
committed by GitHub
parent 4721957875
commit 618711691b
9 changed files with 60 additions and 20 deletions
@@ -50,7 +50,13 @@ defmodule PinchflatWeb.MediaItems.MediaItemController do
def force_download(conn, %{"media_item_id" => id}) do
media_item = Media.get_media_item!(id)
{:ok, _} = MediaDownloadWorker.kickoff_with_task(media_item, %{force: true})
:ok =
case MediaDownloadWorker.kickoff_with_task(media_item, %{force: true}) do
{:ok, _} -> :ok
{:error, :duplicate_job} -> :ok
err -> err
end
conn
|> put_flash(:info, "Download task enqueued.")