From 36bd4cbee21b6e2bc89bc57342af7d0bef48dad6 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Wed, 6 Oct 2021 22:36:57 -0700 Subject: [PATCH] chromecast: fixup mimetype detection --- plugins/chromecast/src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/chromecast/src/main.ts b/plugins/chromecast/src/main.ts index 5fe127446..8a6015c30 100644 --- a/plugins/chromecast/src/main.ts +++ b/plugins/chromecast/src/main.ts @@ -163,7 +163,7 @@ class CastDevice extends ScryptedDeviceBase implements MediaPlayer, Refresh, Eng this.sendMediaToClient(options && (options as any).title, url, // prefer the provided mime type hint, otherwise infer from url. - options.mimeType || mime.getType(url)); + options.mimeType || mime.getType(new URL(url).pathname)); return; }