Skip to content

Commit

Permalink
fix: The imported resource does not show icon
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed May 8, 2023
1 parent 9a37dde commit 6e96cc7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion xmcl-runtime/lib/services/ResourceService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,10 @@ export class ResourceService extends AbstractService implements IResourceService
const option = options[index]

if (option.metadata || option.uris || option.icons) {
await upsertMetadata(option.metadata ?? {}, option.uris ?? [], option.icons ?? [], resolved.fileName, resolved.hash, this.context)
const data = await upsertMetadata(option.metadata ?? {}, option.uris ?? [], option.icons ?? [], resolved.fileName, resolved.hash, this.context)
resolved.icons = resolved.icons ? [...resolved.icons, ...data.icons] : data.icons
resolved.uris = resolved.uris ? [...resolved.uris, ...data.uris] : data.uris
resolved.metadata = data
}

const storedPath = await tryPersistResource(resolved, this.getPath(), this.context)
Expand Down

0 comments on commit 6e96cc7

Please sign in to comment.