updated audio thumbnail and library sync

This commit is contained in:
2026-04-22 18:23:16 -07:00
parent e928181855
commit 199914a9b2
4 changed files with 118 additions and 21 deletions
+2 -1
View File
@@ -118,7 +118,7 @@ export async function syncLibraryCache(servers: LibrarySyncServer[], options: {
const [tagMap, mediaInfoMap] = await Promise.all([
client.getFilesTags(ids, 8),
section.id === 'application' ? client.getFilesMediaInfo(ids, 6) : Promise.resolve({} as Record<number, { mimeType?: string; isVideo?: boolean }>),
client.getFilesMediaInfo(ids, 6),
])
for (const fileId of ids) {
@@ -138,6 +138,7 @@ export async function syncLibraryCache(servers: LibrarySyncServer[], options: {
tags: tags.length ? tags : undefined,
url: client.getFileUrl(fileId),
thumbnail: client.getThumbnailUrl(fileId),
hasThumbnail: mediaInfoMap[fileId]?.hasThumbnail,
mimeType: mediaInfoMap[fileId]?.mimeType,
isVideo: mediaInfoMap[fileId]?.isVideo ?? (section.id === 'video' ? true : undefined),
mediaKind: section.id,