💥 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> {
|
||||
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;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user