File tree 5 files changed +66
-3
lines changed
5 files changed +66
-3
lines changed Original file line number Diff line number Diff line change @@ -14,11 +14,9 @@ const getImage = require("./getImage");
14
14
15
15
app . get ( "/giphy/" , async ( req , res ) => {
16
16
const str = req . query . s ;
17
-
18
17
const image = await getImage ( str ) ;
19
18
20
19
io . emit ( "show-image" , { image, text : str } ) ;
21
-
22
20
res . send ( `sent ${ str } -> ${ image } ` ) ;
23
21
} ) ;
24
22
@@ -36,6 +34,16 @@ const getTrack = async () => {
36
34
} ;
37
35
}
38
36
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
+
39
47
return {
40
48
...track ,
41
49
dj : "...." ,
Original file line number Diff line number Diff line change 16
16
< div class ="c ">
17
17
< div class ="beercontainer "> Kaljat ~< span id ="beertemp " /> </ div >
18
18
< 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 >
19
25
< div class ="trackinfo ">
20
26
< img
21
27
class ="albumart "
168
174
const parrot = `<img class="parrot" src="https://cultofthepartyparrot.com/parrots/parrot.gif" />` ;
169
175
170
176
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
+ ) {
172
189
// Undefined track!
173
190
174
191
e . trackinfo . style . display = "none" ;
Original file line number Diff line number Diff line change 5
5
font-family : "Fira Mono" , monospace;
6
6
}
7
7
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
+
8
46
body {
9
47
display : flex;
10
48
flex-direction : column;
You can’t perform that action at this time.
0 commit comments