Delete library stills from disk before the catalog write, and stop caching their media.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-10-25 17:55:30 -05:00
co-authored by Cursor
parent 545a3d749b
commit 20359bfbd4
26 changed files with 635 additions and 247 deletions
+6 -4
View File
@@ -44,17 +44,19 @@
</div>
</template>
<script setup lang="ts">
import { libraryMediaUrl } from '~/shared/studio2/viewer.mjs'
const props = withDefaults(defineProps<{
asset?: any
hidden?: boolean
role: string
roleOptions: { id: string; label: string }[]
readonly?: boolean
}>(), { readonly: false, hidden: false })
version?: string | number
}>(), { readonly: false, hidden: false, version: 0 })
defineEmits(['pick', 'remove', 'mention', 'update:role'])
const thumbSrc = computed(() => {
if (!props.asset) return ''
if (props.asset.kind === 'clip') return `/api/library/clips/${props.asset.id}/thumb`
return `/api/library/stills/${props.asset.id}/thumb`
if (!props.asset?.id) return ''
if (props.asset.kind === 'clip') return libraryMediaUrl(`/api/library/clips/${props.asset.id}/thumb`, props.version)
return libraryMediaUrl(`/api/library/stills/${props.asset.id}/thumb`, props.version)
})
</script>