fix(ags): fix box undefined error on player
This commit is contained in:
parent
2ad9d8bfdb
commit
90b34ca9ef
1 changed files with 12 additions and 10 deletions
|
@ -1,6 +1,6 @@
|
|||
const { CACHE_DIR, execAsync, ensureDirectory, lookUpIcon } = ags.Utils;
|
||||
const { Button, Icon, Label, Box, Stack, Slider, CenterBox } = ags.Widget;
|
||||
const { GLib, Gtk, Gdk } = imports.gi;
|
||||
const { execAsync, lookUpIcon } = ags.Utils;
|
||||
const { Button, Icon, Label, Stack, Slider, CenterBox } = ags.Widget;
|
||||
const { Gdk } = imports.gi;
|
||||
const display = Gdk.Display.get_default();
|
||||
|
||||
import { EventBox } from '../misc/cursorbox.js';
|
||||
|
@ -33,6 +33,7 @@ export const CoverArt = (player, params) => CenterBox({
|
|||
[player, box => {
|
||||
execAsync(['bash', '-c', `[[ -f "${player.coverPath}" ]] && coloryou "${player.coverPath}"`])
|
||||
.then(out => {
|
||||
if (box) {
|
||||
player.colors.value = JSON.parse(out);
|
||||
|
||||
box.setStyle(`background: radial-gradient(circle,
|
||||
|
@ -41,6 +42,7 @@ export const CoverArt = (player, params) => CenterBox({
|
|||
url("${player.coverPath}");
|
||||
background-size: cover;
|
||||
background-position: center;`);
|
||||
}
|
||||
}).catch(err => { if (err !== "") print(err) });
|
||||
}],
|
||||
],
|
||||
|
|
Loading…
Reference in a new issue