fix: audio detection of .oggs
parent
23b3388ea5
commit
e21c29cb02
|
@ -91,8 +91,6 @@
|
|||
/>
|
||||
{:else if types.fragment}
|
||||
<FragmentViewer {address} detail={false} />
|
||||
{:else if types.video}
|
||||
<VideoViewer {address} detail={false} />
|
||||
{:else if types.audio}
|
||||
<div class="audiopreview image">
|
||||
{#if handled && imageLoaded != address}
|
||||
|
@ -101,7 +99,7 @@
|
|||
</div>
|
||||
{/if}
|
||||
<img
|
||||
src="{API_URL}/thumb/{address}"
|
||||
src="{API_URL}/thumb/{address}?mime=audio"
|
||||
alt="Thumbnail for {address}..."
|
||||
on:load={() => (imageLoaded = address)}
|
||||
on:error={() => (handled = false)}
|
||||
|
@ -112,6 +110,8 @@
|
|||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{:else if types.video}
|
||||
<VideoViewer {address} detail={false} />
|
||||
{:else}
|
||||
<div class="image" class:loaded={imageLoaded == address || !handled}>
|
||||
{#if handled && imageLoaded != address}
|
||||
|
|
|
@ -9,8 +9,9 @@ export function getTypes(entity: UpObject, entityInfo: EntityInfo) {
|
|||
["video", "application/x-matroska"].some((p) => mimeType.startsWith(p)) ||
|
||||
entity?.identify().some((l) => l.endsWith(".avi"));
|
||||
const audio =
|
||||
["audio", "application/x-riff"].some((p) => mimeType.startsWith(p)) &&
|
||||
!video;
|
||||
(["audio", "application/x-riff"].some((p) => mimeType.startsWith(p)) &&
|
||||
!video) ||
|
||||
entity?.identify().some((l) => l.endsWith(".ogg"));
|
||||
const image = mimeType.startsWith("image");
|
||||
const text = mimeType.startsWith("text");
|
||||
const pdf = mimeType.startsWith("application/pdf");
|
||||
|
|
Loading…
Reference in New Issue