💥 fix(center-window/big-media): art url not showing if file protocol is specified
This commit is contained in:
@@ -174,13 +174,13 @@ export function BigMedia(): Gtk.Widget {
|
|||||||
* */
|
* */
|
||||||
function getAlbumArt(player: AstalMpris.Player): Binding<string | undefined> {
|
function getAlbumArt(player: AstalMpris.Player): Binding<string | undefined> {
|
||||||
return bind(player, "artUrl").as((artUrl: string) => {
|
return bind(player, "artUrl").as((artUrl: string) => {
|
||||||
const finalUrl: string = artUrl;
|
|
||||||
|
|
||||||
if(/^(https|http)$/.test(finalUrl.split("://")[0]))
|
if(!artUrl)
|
||||||
return artUrl;
|
return undefined;
|
||||||
else if(artUrl.startsWith("/"))
|
|
||||||
|
if(artUrl.startsWith("/"))
|
||||||
return "file://" + artUrl;
|
return "file://" + artUrl;
|
||||||
|
|
||||||
return undefined;
|
return artUrl;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user