diff --git a/voicelink/player.py b/voicelink/player.py index f3c2f71..ff0e1d8 100644 --- a/voicelink/player.py +++ b/voicelink/player.py @@ -74,8 +74,7 @@ async def connect_channel(ctx: Union[commands.Context, Interaction], channel: Vo ctx.bot if isinstance(ctx, commands.Context) else ctx.client, channel, ctx )) - if player.is_ipc_connected: - await player.send_ws({"op": "createPlayer", "members_id": [member.id for member in channel.members]}) + await player.send_ws({"op": "createPlayer", "members_id": [member.id for member in channel.members]}) return player diff --git a/web/static/css/main.css b/web/static/css/main.css index 04e9754..538b958 100644 --- a/web/static/css/main.css +++ b/web/static/css/main.css @@ -591,6 +591,7 @@ a { .context-menu { display: none; position: absolute; + z-index: 1; } .context-menu ul { diff --git a/web/static/js/action.js b/web/static/js/action.js index 6e7f9fb..b6c8260 100644 --- a/web/static/js/action.js +++ b/web/static/js/action.js @@ -19,11 +19,13 @@ $(document).ready(function () { context.drawImage(img, 0, startY, width, height, 0, 0, width, height); getMainColorsFromImage(4) .then(colors => { - $(".thumbnail-background").css({ + var bg = $(".thumbnail-background"); + bg.css({ "background": `linear-gradient(-132deg, ${colors[0]}, ${colors[1]}, ${colors[2]}, ${colors[3]})`, "width": "70%", "padding-bottom": "70%", - }).fadeIn(200); + }); + bg.fadeIn(200); $("#largeImage").fadeIn(200); }) .catch(error => { return }); diff --git a/web/static/js/objects.js b/web/static/js/objects.js index 5dfcd39..7be1585 100644 --- a/web/static/js/objects.js +++ b/web/static/js/objects.js @@ -456,8 +456,13 @@ class Player { $("#author").text(""); $("#position").text("00:00"); $("#length").text("00:00"); - $("#image").fadeOut(200); - $("#largeImage").fadeOut(200); + $("#image").fadeOut(function () { + $(this).removeAttr("src"); + }); + $("#largeImage").fadeOut(function () { + $(this).removeAttr("src"); + }); + $(".thumbnail-background").fadeOut(200); } else { $("#title").text(currentTrack.title); $("#author").text(currentTrack.author); @@ -471,8 +476,10 @@ class Player { image += currentTrack.imageUrl; if ($("#largeImage").attr("src") != image) { - $(".thumbnail-background").fadeOut(200); - $("#largeImage").fadeOut(200).attr("src", image); + $(".thumbnail-background").fadeOut(100); + $("#largeImage").fadeOut(function() { + $(this).attr("src", image); + }); } }