From a8c080ffd54edb0bc292187b252fe46704c1f185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionu=C8=9B=20Staicu?= Date: Sat, 7 Jun 2025 11:12:03 +0300 Subject: [PATCH] don't show download button on already downloaded items. --- .../controllers/sources/source_html/media_item_table_live.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pinchflat_web/controllers/sources/source_html/media_item_table_live.ex b/lib/pinchflat_web/controllers/sources/source_html/media_item_table_live.ex index 95dc9b0..3a97870 100644 --- a/lib/pinchflat_web/controllers/sources/source_html/media_item_table_live.ex +++ b/lib/pinchflat_web/controllers/sources/source_html/media_item_table_live.ex @@ -59,7 +59,7 @@ defmodule PinchflatWeb.Sources.MediaItemTableLive do <.link href={~p"/sources/#{@source.id}/media/#{media_item.id}/force_download"} - :if={!media_item.prevent_download} + :if={@media_state !== "downloaded"} method="post" target="_blank" data-confirm="Are you sure you force a download of this media?"