💥 fix(center-window/big-media): art url not showing if file protocol is specified

This commit is contained in:
retrozinndev
2025-03-10 20:24:05 -03:00
parent 902361d74e
commit 19c90581ae
+5 -5
View File
@@ -174,13 +174,13 @@ export function BigMedia(): Gtk.Widget {
* */
function getAlbumArt(player: AstalMpris.Player): Binding<string | undefined> {
return bind(player, "artUrl").as((artUrl: string) => {
const finalUrl: string = artUrl;
if(/^(https|http)$/.test(finalUrl.split("://")[0]))
return artUrl;
else if(artUrl.startsWith("/"))
if(!artUrl)
return undefined;
if(artUrl.startsWith("/"))
return "file://" + artUrl;
return undefined;
return artUrl;
});
}