[Enhancement] Added ability to detect when files have been deleted (#399)

* Added function for updating a media item's filepaths on-disk

* Added placeholder action to source page

* Turned the file sync into a job and properly hooked it up to the controller
This commit is contained in:
Kieran
2024-09-26 12:39:31 -07:00
committed by GitHub
parent 0163e85e76
commit a0b9e49486
10 changed files with 280 additions and 83 deletions
@@ -38,7 +38,7 @@
<.link
href={~p"/sources/#{@source}/force_download_pending"}
method="post"
data-confirm="Are you sure you want to force a download of all *pending* media items? This isn't normally needed."
data-confirm="Are you sure you want to force a download of all pending media items? This isn't normally needed."
>
Download Pending
</.link>
@@ -47,7 +47,7 @@
<.link
href={~p"/sources/#{@source}/force_redownload"}
method="post"
data-confirm="Are you sure you want to re-download all currently downloaded media items? This isn't normally needed and won't change anything if the files already exist."
data-confirm="Are you sure you want to re-download all currently downloaded media items? This doesn't upgrade your media, but will download any missing files if your settings have changed. This isn't normally needed."
>
Redownload Existing
</.link>
@@ -70,6 +70,15 @@
Refresh Metadata
</.link>
</:option>
<:option>
<.link
href={~p"/sources/#{@source}/sync_files_on_disk"}
method="post"
data-confirm="Are you sure you want to sync files? This will update media items if their files have been deleted. File addition or moves are not detected. This isn't normally needed."
>
Sync Files on Disk
</.link>
</:option>
<:option>
<div class="h-px w-full bg-bodydark2"></div>
</:option>