From 1be8451257b8c8e483ce23f1a3b39f1f279b46ce Mon Sep 17 00:00:00 2001 From: Gal Tsubery Date: Fri, 6 Dec 2024 12:25:22 -0600 Subject: [PATCH] Allow manually fetching video details --- app/admin/media_items.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/admin/media_items.rb b/app/admin/media_items.rb index 854c892..f599011 100644 --- a/app/admin/media_items.rb +++ b/app/admin/media_items.rb @@ -16,4 +16,13 @@ f.input :libraries, :as => :select, :input_html => { :multiple => true } f.actions end + + action_item :fetch_details, only: [:show, :edit] do + link_to "Fetch Details", fetch_details_admin_media_item_path(resource) + end + + member_action :fetch_details, method: :get do + resource.update(updated_at: nil, reachable: nil) + redirect_to admin_media_item_path, notice: "Fetched!" + end end