A self-hosted media server and file management system
Vue ffmpegfile-serverjellyfinlaravelmediamedia-playermedia-servermediabrowsermediaservermusicmusic-librarymusic-playermusicplayerself-hostedvuejs
feat: extended metadata
aminnausinf9510006610f
diff --git a/resources/js/components/cards/data/attachments/FontCard.vue b/resources/js/components/cards/data/attachments/FontCard.vuenew file mode 100644index 00000000..bddfc605--- /dev/null+++ b/resources/js/components/cards/data/attachments/FontCard.vue@@ -0,0 +1,18 @@+<script setup lang="ts">+import type { FontInfoResource } from '@/contracts/mediaInfo';++import { formatFileSize, toFormattedDate } from '@/service/util';++defineProps<{ data: FontInfoResource }>();+</script>+<template>+ <div class="data-card text-foreground-2 w-full space-y-2 rounded-lg px-3 py-2 shadow-sm" v-if="data">+ <div class="space-y-1">+ <p class="text-foreground-0 truncate">{{ data.file_name }}</p>+ </div>+ <div class="flex shrink-0 justify-between">+ <p>{{ formatFileSize(data.size) }}</p>+ <p>{{ toFormattedDate(data.created_at) }}</p>+ </div>+ </div>+</template>diff --git a/resources/js/components/cards/data/attachments/SubtitleCard.vue b/resources/js/components/cards/data/attachments/SubtitleCard.vuenew file mode 100644index 00000000..b26940c3--- /dev/null+++ b/resources/js/components/cards/data/attachments/SubtitleCard.vue@@ -0,0 +1,49 @@+<script setup lang="ts">+import type { SubtitleInfoResource } from '@/contracts/mediaInfo';++import { toFormattedDate } from '@/service/util';++import MediaTag from '@/components/labels/MediaTag.vue';++defineProps<{ track: SubtitleInfoResource }>();++const parseSubtitleFormat = (format?: string) => {+ switch (format?.toLowerCase()) {+ case 'srt':+ return 'subrip';+ case 'vtt':+ return 'WebVTT';+ case 'ass':+ case 'ssa':+ return 'ASS';+ default:+ return 'none';+ }+};+</script>+<template>+ <div class="data-card text-foreground-2 w-full space-y-2 rounded-lg px-3 py-2 shadow-sm">+ <div class="flex items-center justify-between gap-2">+ <p class="text-foreground-0 truncate">+ <span class="text-foreground-2 font-normal">{{ track.track_id }}.</span>+ {{ track.title || 'Untitled track' }}+ </p>+ <div class="flex shrink-0 gap-1">+ <MediaTag v-if="track.is_default" class="bg-primary! text-foreground-i! dark:bg-white!">Default</MediaTag>+ <MediaTag v-if="track.is_forced" class="text-foreground-7! dark:text-foreground-0! bg-neutral-200! dark:bg-neutral-400!">Forced</MediaTag>+ <MediaTag v-if="track.external_path" class="text-foreground-7! dark:text-foreground-0! bg-neutral-200! dark:bg-neutral-400!">External</MediaTag>+ </div>+ </div>++ <div class="flex justify-between gap-2">+ <div class="flex flex-wrap gap-x-1 tracking-wide uppercase">+ <span>{{ track.language ?? 'und' }}</span>+ ·+ <span> {{ parseSubtitleFormat(track.codec) }}</span>+ </div>+ <p>+ {{ toFormattedDate(track.created_at) }}+ </p>+ </div>+ </div>+</template>diff --git a/resources/js/components/forms/EditFolder.vue b/resources/js/components/forms/EditFolder.vueindex 3ec7f9b5..50597678 100644--- a/resources/js/components/forms/EditFolder.vue+++ b/resources/js/components/forms/EditFolder.vue@@ -249,7 +249,7 @@ watch(tagsQuery, () => {class="text-foreground-2 hover:text-foreground-0 xs:-ms-1 xs:mr-auto xs:max-h-none xs:px-1 max-h-6 gap-1.5 p-0 text-xs transition-colors"@click="() => handleEditFolderImages(props.folder)">- <ProIconsPhoto class="size-3.5" />+ <ProIconsPhoto class="size-4" />Edit Images</ButtonBase><ButtonForm variant="reset" :disabled="form.processing" @click="$emit('handleFinish')">Cancel</ButtonForm>diff --git a/resources/js/components/forms/EditVideo.vue b/resources/js/components/forms/EditVideo.vueindex e052992b..36e06480 100755--- a/resources/js/components/forms/EditVideo.vue+++ b/resources/js/components/forms/EditVideo.vue@@ -259,7 +259,7 @@ watch(tagsQuery, () => {class="text-foreground-2 hover:text-foreground-0 xs:-ms-1 xs:mr-auto xs:max-h-none xs:px-1 max-h-6 gap-1.5 p-0 text-xs transition-colors"@click="() => handleEditMediaImages(props.video, stateDirectory.id)">- <ProIconsPhoto class="size-3.5" />+ <ProIconsPhoto class="size-4" />Edit Images</ButtonBase><ButtonForm variant="reset" :disabled="form.processing" @click="$emit('handleFinish')">Cancel</ButtonForm>diff --git a/resources/js/components/media/FontsInfo.vue b/resources/js/components/media/FontsInfo.vuenew file mode 100644index 00000000..6f49c451--- /dev/null+++ b/resources/js/components/media/FontsInfo.vue@@ -0,0 +1,63 @@+<script setup lang="ts">+import type { FontInfoResource, MediaInfoResource } from '@/contracts/mediaInfo';+import type { VideoResource } from '@/contracts/media.ts';+import type { SortDir } from '@aminnausin/cedar-ui';++import { computed, ref } from 'vue';+import { sortObject } from '@aminnausin/cedar-ui';+import { TableBase } from '@/components/cedar-ui/table';++import FontCard from '@/components/cards/data/attachments/FontCard.vue';++const props = defineProps<{ data: VideoResource; mediaInfo: MediaInfoResource }>();+const search = ref('');+const sortKey = ref<keyof FontInfoResource>('file_name');+const sortDir = ref<SortDir>(1);++const handleSort = (key: keyof FontInfoResource, dir: SortDir) => {+ sortKey.value = key;+ sortDir.value = dir;+};++const sortingOptions = ref<{ title: string; value: keyof FontInfoResource }[]>([+ {+ title: 'File Name',+ value: 'file_name',+ },+ {+ title: 'Size',+ value: 'size',+ },+ {+ title: 'Date Created',+ value: 'created_at',+ },+]);++const filteredFonts = computed<FontInfoResource[]>(() => {+ return [...(search.value ? props.mediaInfo.fonts.filter((font) => font.file_name?.toLowerCase().includes(search.value?.toLowerCase())) : props.mediaInfo.fonts)].sort(+ sortObject<FontInfoResource>(sortKey.value, sortDir.value, ['created_at', 'updated_at']),+ );+});+</script>++<template>+ <div class="flex flex-col gap-2 text-sm">+ <TableBase+ ref="fontTable"+ :class="'w-full flex-1'"+ :pagination-class="'sm:justify-around! xl:justify-between!'"+ :table-styles="'w-full'"+ :data="filteredFonts"+ :row="FontCard"+ :useToolbar="true"+ :force-vertical-toolbar="true"+ :startAscending="true"+ :sort-action="handleSort"+ :sorting-options="sortingOptions"+ v-model="search"+ />++ <p v-if="!filteredFonts.length" class="text-foreground-2 py-4 text-center text-xs tracking-wider uppercase">No fonts match "{{ search }}"</p>+ </div>+</template>diff --git a/resources/js/components/media/ImageInfo.vue b/resources/js/components/media/ImageInfo.vuenew file mode 100644index 00000000..fbedc406--- /dev/null+++ b/resources/js/components/media/ImageInfo.vue@@ -0,0 +1,60 @@+<script setup lang="ts">+import type { ImageType, VideoResource } from '@/contracts/media';++import { computed } from 'vue';++import ImageCard from '@/components/cards/data/ImageCard.vue';++import ProIconsPhotoOff from '@/components/icons/ProIconsPhotoOff.vue';++const props = defineProps<{ data: VideoResource }>();++const primaryImageIds = computed<Record<ImageType, number | undefined>>(() => ({ poster: props.data.metadata?.poster_image?.id }) as Record<ImageType, number | undefined>);++const imageGroups = computed(() =>+ [+ {+ label: 'Poster',+ images: props.data.metadata?.images?.filter((img) => img.type === 'poster') ?? [],+ },+ {+ label: 'Preview',+ images: props.data.metadata?.images?.filter((img) => img.type === 'preview') ?? [],+ },+ ].filter((g) => g.images.length),+);+</script>++<template>+ <div class="space-y-6">+ <div v-for="imageGroup in imageGroups" class="space-y-2" :key="imageGroup.label">+ <p>{{ imageGroup.label }}s</p>+ <div class="xms:text-sm @container flex flex-1 flex-col gap-4 text-xs">+ <div+ v-if="imageGroup.images.length > 0"+ :class="[+ 'grid w-full grid-cols-1 gap-2',+ {+ '@4xl:grid-cols-4': imageGroup.images.length >= 4,+ '@[42rem]:grid-cols-3': imageGroup.images.length > 2,+ '@sm:grid-cols-2': imageGroup.images.length >= 2,+ },+ ]"+ >+ <ImageCard+ v-for="image in imageGroup.images"+ :data="image"+ :key="image.id"+ :is-read-only="true"+ :is-primary="image.id == primaryImageIds[image.type]"+ :is-folder="false"+ />+ </div>+ <div v-else class="text-foreground-1 my-auto flex w-full items-center justify-center gap-1 py-8 tracking-widest">+ <ProIconsPhotoOff class="size-6" />+ <span> No images yet </span>+ </div>+ </div>+ </div>+ </div>+</template>diff --git a/resources/js/components/media/MediaInfoRow.vue b/resources/js/components/media/MediaInfoRow.vuenew file mode 100644index 00000000..83bce220--- /dev/null+++ b/resources/js/components/media/MediaInfoRow.vue@@ -0,0 +1,23 @@+<script setup lang="ts">+import { RouterLink } from 'vue-router';+import { cn } from '@aminnausin/cedar-ui';++import IconShare from '@/components/icons/IconShare.vue';++defineProps<{ title: string; value?: any; to?: string; valueClass?: string; iconClass?: string; tooltip?: string }>();+</script>+<template>+ <div class="space-y-0.5" :title="tooltip">+ <div class="text-nowrap">{{ title }}</div>+ <slot>+ <component+ :class="cn('text-foreground-1 flex items-center gap-1 text-xs text-nowrap', { 'hover:text-primary dark:hover:text-primary-muted': to }, valueClass)"+ :is="to ? RouterLink : 'div'"+ :to="to"+ >+ {{ value ?? '—' }}+ <IconShare v-if="to" :class="cn('size-4', iconClass)" />+ </component>+ </slot>+ </div>+</template>diff --git a/resources/js/components/media/MetadataInfo.vue b/resources/js/components/media/MetadataInfo.vuenew file mode 100644index 00000000..f739bee0--- /dev/null+++ b/resources/js/components/media/MetadataInfo.vue@@ -0,0 +1,135 @@+<script setup lang="ts">+import type { VideoResource } from '@/contracts/media';++import { formatFileSize, toFormattedDate } from '@/service/util';+import { computed, ref } from 'vue';+import { MediaType } from '@/types/types';++import MediaTag from '@/components/labels/MediaTag.vue';++import ProiconsChevronRight from '~icons/proicons/chevron-right';++declare type Tab = 'metadata' | 'images' | 'subtitles' | 'fonts';++const props = defineProps<{ data: VideoResource }>();++const isAudio = computed(() => props.data.metadata?.media_type === MediaType.AUDIO);++const tabs = computed<Tab[]>(() => {+ const tabs: Tab[] = ['metadata', 'images'];++ if (isAudio.value) return tabs;++ if (props.data.subtitles.length) tabs.push('subtitles');+ if (props.data.fonts?.length) tabs.push('fonts');++ return tabs;+});+const activeTab = ref(tabs.value.at(0) ?? 'metadata');++const sumBy = <T,>(arr: T[] | undefined, fn: (item: T) => number): number => (arr ?? []).reduce((acc, item) => acc + fn(item), 0);++const videoInfo = computed(() => ({}));+const audioInfo = computed(() => ({}));++const metadataItems = computed<{ label: string; items: { label: string; value: any; to?: string }[] }[]>(() => {+ if (!props.data.metadata) return [];++ const mediaImages = props.data.metadata.images ?? [];+ const mediaImageSize = sumBy(mediaImages, (img) => img.size ?? 0);++ return [+ {+ label: 'Metadata',+ items: [+ { label: 'Title', value: props.data.title },+ props.data.title !== props.data.name && { label: 'Name', value: props.data.name },+ { label: 'Views', value: props.data.view_count },+ props.data.duration && { label: 'Duration', value: props.data.duration },+ ...(isAudio?.value+ ? [+ { label: 'Artist', value: props.data.artist },+ { label: 'Album', value: props.data.album },+ { label: 'Disc', value: props.data.season },+ { label: 'Track', value: props.data.episode },+ ]+ : [+ { label: 'Season', value: props.data.season },+ { label: 'Episode', value: props.data.episode },+ ]),+ props.data.released_at && { label: 'Released', value: props.data.released_at },+ ].filter(Boolean) as { label: string; value: any; to?: string }[],+ },++ !isAudio.value && {+ label: 'Video',+ items: [+ { label: 'Resolution', value: `${props.data.metadata.resolution_width}x${props.data.metadata.resolution_height}` },+ { label: 'Codec', value: props.data.metadata.codec },+ ],+ },+ {+ label: 'Audio',+ items: [{ label: 'Bitrate', value: props.data.metadata.bitrate }],+ },++ {+ label: 'Attachments',+ items: [+ { label: 'Images', value: props.data.metadata.images?.length },+ { label: 'Images Size', value: formatFileSize(mediaImageSize) },+ ...(!isAudio?.value+ ? [+ { label: 'Subtitles', value: props.data.subtitles.length },+ { label: 'Fonts', value: props.data.fonts?.length },+ ]+ : []),+ ].filter(Boolean) as { label: string; value: any; to?: string }[],+ },+ {+ label: 'Timestamps',+ items: [+ { label: 'Created', value: toFormattedDate(props.data.created_at) },+ { label: 'Last Updated', value: toFormattedDate(props.data.updated_at) },+ { label: 'Last Edited', value: props.data.edited_at ? toFormattedDate(props.data.edited_at) : 'Never' },+ ],+ },+ ].filter(Boolean) as { label: string; items: { label: string; value: any; to?: string }[] }[];+});+</script>++<template>+ <div v-if="data" class="flex flex-col gap-4 text-sm">+ <template v-for="(group, index) in metadataItems" :key="index">+ <div class="flex flex-col gap-0.5">+ <p class="">{{ group.label }}</p>+ <div class="ms-4 flex flex-col gap-x-6">+ <div v-for="item in group.items" :key="item.label" class="whitespace-pre-wrap">+ <span class="text-foreground-1">{{ item.label }}: </span>	<span class="text-foreground-0">{{ item.value }}</span>+ </div>++ <div v-if="group.label === 'Metadata' && data.video_tags.length" title="Tags" class="flex gap-1 pt-4">+ <span class="text-foreground-1">Tags: </span>+ <span class="flex flex-wrap gap-1" v-if="data.video_tags.length">+ <MediaTag v-for="tag in data.video_tags" :key="tag.id" class="text-foreground-0 pointer-events-none py-0.5 text-xs">+ {{ tag.name }}+ </MediaTag>+ </span>+ </div>++ <details v-if="group.label === 'Metadata' && data.description" class="group flex w-full flex-col open:gap-2" hidden>+ <summary class="hover:text-foreground-0 flex w-fit cursor-pointer items-center gap-1.5 transition-colors">+ <ProiconsChevronRight class="-ms-1 size-3 transition-transform duration-200 group-open:rotate-90" />++ Description+ </summary>++ <p class="scrollbar-minimal bg-surface-2 text-foreground-1 overflow-x-auto rounded-lg p-3 text-xs leading-relaxed whitespace-pre-wrap shadow-sm">+ {{ data.description }}+ </p>+ </details>+ </div>+ </div>+ </template>+ </div>+</template>diff --git a/resources/js/components/media/RawInfo.vue b/resources/js/components/media/RawInfo.vuenew file mode 100644index 00000000..2482028b--- /dev/null+++ b/resources/js/components/media/RawInfo.vue@@ -0,0 +1,47 @@+<script setup lang="ts">+import type { MediaInfoResource } from '@/contracts/mediaInfo';+import type { VideoResource } from '@/contracts/media';++import ProiconsChevronRight from '~icons/proicons/chevron-right';++defineProps<{ data: VideoResource; mediaInfo: MediaInfoResource }>();+</script>++<template>+ <div class="flex flex-col gap-4">+ <details class="group/raw-metadata flex flex-col open:gap-2">+ <summary class="hover:text-foreground-0 flex w-fit cursor-pointer items-center gap-1.5 transition-colors">+ <ProiconsChevronRight class="-ms-1 size-3 transition-transform duration-200 group-open/raw-metadata:rotate-90" />++ Raw Metadata+ </summary>++ <pre class="scrollbar-minimal bg-surface-2 text-foreground-1 max-h-90 overflow-x-auto rounded-lg p-3 text-xs leading-relaxed whitespace-pre-wrap shadow-sm">{{+ JSON.stringify(+ {+ ...data,+ metadata: {+ ...data.metadata,+ lyrics: '...',+ },+ fonts: '...',+ },+ null,+ 2,+ )+ }}</pre>+ </details>++ <details class="group/raw-info flex flex-col open:gap-2">+ <summary class="hover:text-foreground-0 flex w-fit cursor-pointer items-center gap-1.5 transition-colors">+ <ProiconsChevronRight class="-ms-1 size-3 transition-transform duration-200 group-open/raw-info:rotate-90" />++ Raw Media Info+ </summary>++ <pre class="scrollbar-minimal bg-surface-2 text-foreground-1 max-h-90 overflow-x-auto rounded-lg p-3 text-xs leading-relaxed whitespace-pre-wrap shadow-sm">{{+ JSON.stringify(mediaInfo.raw_metadata, null, 2)+ }}</pre>+ </details>+ </div>+</template>diff --git a/resources/js/components/media/SubtitlesInfo.vue b/resources/js/components/media/SubtitlesInfo.vuenew file mode 100644index 00000000..9d3e8403--- /dev/null+++ b/resources/js/components/media/SubtitlesInfo.vue@@ -0,0 +1,14 @@+<script setup lang="ts">+import type { MediaInfoResource } from '@/contracts/mediaInfo';+import type { VideoResource } from '@/contracts/media.ts';++import SubtitleCard from '@/components/cards/data/attachments/SubtitleCard.vue';++defineProps<{ data: VideoResource; mediaInfo: MediaInfoResource }>();+</script>++<template>+ <div class="flex flex-col gap-2 text-sm">+ <SubtitleCard v-for="track in mediaInfo.subtitles" :key="track.id" :track="track" />+ </div>+</template>diff --git a/resources/js/components/modals/MediaInfoModal.vue b/resources/js/components/modals/MediaInfoModal.vuenew file mode 100644index 00000000..f18f32ca--- /dev/null+++ b/resources/js/components/modals/MediaInfoModal.vue@@ -0,0 +1,112 @@+<!-- MediaInfoModal.vue -->+<script setup lang="ts">+import type { MediaMetadataEditorProps } from '@/types/modals.ts';+import type { Component } from 'vue';++import { handleEditMediaImages } from '@/service/media/mediaActions';+import { useContentStore } from '@/stores/ContentStore.ts';+import { getMediaDetails } from '@/service/media/media.ts';+import { useModalStore } from '@/stores/ModalStore';+import { computed, ref } from 'vue';+import { storeToRefs } from 'pinia';+import { ButtonBase } from '@/components/cedar-ui/button/index.ts';+import { MediaType } from '@/types/types';+import { BaseModal } from '@/components/cedar-ui/modal';+import { useQuery } from '@tanstack/vue-query';+import { cn } from '@aminnausin/cedar-ui';++import ModalFormFooter from '@/components/forms/ModalFormFooter.vue';+import EditItemHeader from '@/components/headers/EditItemHeader.vue';+import SubtitlesInfo from '@/components/media/SubtitlesInfo.vue';+import MetadataInfo from '@/components/media/MetadataInfo.vue';+import FontsInfo from '@/components/media/FontsInfo.vue';+import ImageInfo from '@/components/media/ImageInfo.vue';+import RawInfo from '@/components/media/RawInfo.vue';++import ProIconsPhoto from '@/components/icons/ProIconsPhoto.vue';++declare type Tab = 'metadata' | 'images' | 'subtitles' | 'fonts' | 'raw';++const modal = useModalStore();++const { title, mediaResource: data } = modal.getProps<MediaMetadataEditorProps>();+const { stateDirectory } = storeToRefs(useContentStore());++const isAudio = computed(() => data.metadata?.media_type === MediaType.AUDIO);+const mediaId = computed(() => data.id);++const tabs = computed<Tab[]>(() => {+ const tabs: Tab[] = ['metadata', 'images', 'raw'];++ if (isAudio.value) return tabs;++ if (data.subtitles.length) tabs.push('subtitles');+ if (data.fonts?.length) tabs.push('fonts');++ return tabs;+});++const activeTab = ref<Tab>(tabs.value.at(0) ?? 'metadata');+const panels: Record<Tab, Component> = {+ metadata: MetadataInfo,+ images: ImageInfo,+ subtitles: SubtitlesInfo,+ fonts: FontsInfo,+ raw: RawInfo,+};++const { data: mediaInfo } = useQuery({+ queryKey: ['video-info', mediaId.value],+ queryFn: () => getMediaDetails(mediaId.value),+ enabled: computed(() => modal.isOpen),+});+</script>++<template>+ <BaseModal>+ <template #title>{{ title }}</template>+ <template #description v-if="data.edited_at && data.metadata?.editor_id">+ <EditItemHeader :edited_at="data.edited_at" :editor_id="data.metadata.editor_id" />+ </template>+ <div class="contents text-sm">+ <div class="bg-surface-3/50 dark:bg-surface-3 mr-auto flex w-fit gap-0.5 rounded-lg p-0.5">+ <ButtonBase+ v-for="tab in tabs"+ :key="tab"+ :class="+ cn('h-7 rounded-md px-3 py-1 capitalize transition-colors', {+ 'bg-surface-1 dark:bg-surface-4 text-primary-active dark:text-primary-muted shadow-sm': activeTab === tab,+ 'text-foreground-2 hover:text-foreground-0': activeTab !== tab,+ })+ "+ @click="activeTab = tab"+ >+ {{ tab }}+ </ButtonBase>+ </div>++ <component :is="panels[activeTab]" :data="data" :media-info="mediaInfo" />++ <ModalFormFooter class="*:h-9">+ <ButtonBase+ variant="transparent"+ type="button"+ class="text-foreground-2 hover:text-foreground-0 xs:-ms-1 xs:max-h-none xs:px-1 max-h-6 gap-1.5 p-0 text-xs transition-colors"+ @click="() => {}"+ >+ <ProIconsPhoto class="size-4" />+ Edit Metadata+ </ButtonBase>+ <ButtonBase+ variant="transparent"+ type="button"+ class="text-foreground-2 hover:text-foreground-0 xs:-ms-1 xs:mr-auto xs:max-h-none xs:px-1 max-h-6 gap-1.5 p-0 text-xs transition-colors"+ @click="() => handleEditMediaImages(data, stateDirectory.id)"+ >+ <ProIconsPhoto class="size-4" />+ Edit Images+ </ButtonBase>+ </ModalFormFooter>+ </div>+ </BaseModal>+</template>diff --git a/resources/js/components/video/VideoInfoPanel.vue b/resources/js/components/video/VideoInfoPanel.vueindex 140cf21d..84526621 100755--- a/resources/js/components/video/VideoInfoPanel.vue+++ b/resources/js/components/video/VideoInfoPanel.vue@@ -25,6 +25,7 @@ import { useAuth } from '@/composables/auth/useAuth';import EditFolderModal from '@/components/modals/EditFolderModal.vue';import EditMediaModal from '@/components/modals/EditMediaModal.vue';+import MediaInfoModal from '@/components/modals/MediaInfoModal.vue';import useMetaData from '@/composables/useMetaData';import ShareModal from '@/components/modals/ShareModal.vue';import LazyImage from '@/components/lazy/LazyImage.vue';@@ -65,6 +66,11 @@ const popoverItems = computed(() => {text: 'Share',action: handleShare,},+ {+ icon: ProiconsInfoSquare,+ text: 'Metadata',+ action: handleMetadataInfo,+ },{icon: TablerDownload,text: 'Download',@@ -139,6 +145,20 @@ const handleShare = () => {});};+const handleMetadataInfo = () => {+ if (!stateVideo.value.id) {+ toast.error('ID Missing');+ return;+ }+ const metadataInfo = stateVideo.value.metadata ? { titleTooltip: `UUID: ${stateVideo.value.metadata.uuid}` } : {};++ modal.open(MediaInfoModal, {+ title: `${mediaTypeDescription.value} Metadata`,+ mediaResource: stateVideo.value,+ ...metadataInfo,+ });+};+const handleEdit = () => {if (!stateVideo.value.id) {toast.error('ID Missing');diff --git a/resources/js/contracts/mediaInfo.ts b/resources/js/contracts/mediaInfo.tsindex 5e9bf679..0a7e80c7 100644--- a/resources/js/contracts/mediaInfo.ts+++ b/resources/js/contracts/mediaInfo.ts@@ -22,4 +22,5 @@ export interface MediaInfoResource {subtitles: SubtitleInfoResource[];fonts: FontInfoResource[];storyboard?: StoryboardResource;+ raw_metadata: any;}