Skip to content

Commit e2edcdc

Browse files
author
Joonas Haaparanta
committed
Kirill
1 parent 7d9ae95 commit e2edcdc

File tree

5 files changed

+66
-3
lines changed

5 files changed

+66
-3
lines changed

main.js

+10-2
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@ const getImage = require("./getImage");
1414

1515
app.get("/giphy/", async (req, res) => {
1616
const str = req.query.s;
17-
1817
const image = await getImage(str);
1918

2019
io.emit("show-image", { image, text: str });
21-
2220
res.send(`sent ${str} -> ${image}`);
2321
});
2422

@@ -36,6 +34,16 @@ const getTrack = async () => {
3634
};
3735
}
3836

37+
// "x-sonos-vli:RINCON_949F3E50938801400:1,airplay:d9d8916f85d85c6408e4fc55a78af190"
38+
if (track.uri && track.uri.includes("airplay")) {
39+
return {
40+
...track,
41+
dj: " Null ",
42+
isFridaySong: false,
43+
airplay: "Kirill"
44+
};
45+
}
46+
3947
return {
4048
...track,
4149
dj: "....",

public/dwi.png

457 Bytes
Loading

public/index.html

+18-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
<div class="c">
1717
<div class="beercontainer">Kaljat ~<span id="beertemp" /></div>
1818
<div class="silence" style="display: none;">🙉</div>
19+
<div class="airplay">
20+
<div class="airplay-image">
21+
<img src="dwi.png" id="glass" />
22+
<img id="airplay" src="kirill.png" />
23+
</div>
24+
</div>
1925
<div class="trackinfo">
2026
<img
2127
class="albumart"
@@ -168,7 +174,18 @@
168174
const parrot = `<img class="parrot" src="https://cultofthepartyparrot.com/parrots/parrot.gif" />`;
169175

170176
function updateTrackData(e, track) {
171-
if (track.position === null && track.duration === null) {
177+
console.log("track", track);
178+
179+
if (track.airplay && track.airplay === "Kirill") {
180+
e.trackinfo.style.display = "none";
181+
e.albumart.forEach(x => {
182+
x.src = "/jungle.jpg";
183+
});
184+
} else if (
185+
track.position === null &&
186+
track.duration === null &&
187+
!track.airplay
188+
) {
172189
// Undefined track!
173190

174191
e.trackinfo.style.display = "none";

public/kirill.png

116 KB
Loading

public/main.css

+38
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,44 @@ body {
55
font-family: "Fira Mono", monospace;
66
}
77

8+
#glass {
9+
position: absolute;
10+
width: 300px;
11+
margin-left: -20px;
12+
top: 130px;
13+
animation: Glass-drop;
14+
animation-duration: 2s;
15+
16+
animation-iteration-count: infinite;
17+
animation-direction: normal;
18+
/* animation-timing-function: linear; */
19+
}
20+
21+
@keyframes Glass-drop {
22+
from {
23+
transform: translateY(-200px);
24+
}
25+
to {
26+
transform: translateY(0);
27+
}
28+
}
29+
30+
.airplay-image {
31+
position: relative;
32+
width: 500px;
33+
height: 500px;
34+
display: flex;
35+
justify-content: center;
36+
}
37+
38+
.airplay {
39+
display: flex;
40+
justify-content: center;
41+
align-items: center;
42+
position: relative;
43+
height: 100%;
44+
}
45+
846
body {
947
display: flex;
1048
flex-direction: column;

0 commit comments

Comments
 (0)