From 5685ba8a1ad88b8b128d5fbcda8c19122cc38984 Mon Sep 17 00:00:00 2001 From: FoxxMD Date: Wed, 30 Sep 2026 13:44:42 +0000 Subject: [PATCH] fix(tuneshine): Try using blob for image --- src/backend/common/vendor/tuneshine/TuneshineApiClient.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/backend/common/vendor/tuneshine/TuneshineApiClient.ts b/src/backend/common/vendor/tuneshine/TuneshineApiClient.ts index 77537d28..e37eb3d0 100644 --- a/src/backend/common/vendor/tuneshine/TuneshineApiClient.ts +++ b/src/backend/common/vendor/tuneshine/TuneshineApiClient.ts @@ -85,9 +85,9 @@ export class TuneshineApiClient extends AbstractApiClient { // } //const formData = new FormData(); - let imageContents: string; + let imageContents: Blob; try { - imageContents = (await this.convertToWebp({ url: artUrl })).toString(); + imageContents = new Blob([(await this.convertToWebp({ url: artUrl }))], {type: 'image/webp'}); //formData.append('image', (await this.convertToWebp({ url: artUrl })).toString()); } catch (e) { throw new Error('Failed to process art image before sending Now Playing data', {cause: e}); @@ -101,11 +101,12 @@ export class TuneshineApiClient extends AbstractApiClient { const fd = new FormData(); for (const name in body) { // @ts-expect-error not sure how to fix this but its fine - fd.append(name, body[name] as string); + fd.append(name, body[name]); } return fd; }, body: { + // @ts-expect-error blob is the correct type here image: imageContents, metadata: JSON.stringify(metadata) }, -- 2.51.2