Skip to content

Instantly share code, notes, and snippets.

@Wunst
Wunst / main.mjs
Created June 6, 2022 17:29
Node.js application that reorders the queue of a Sonos smart speaker so that "Ecstasy" by Lou Reed is always the last track
import { Sonos } from "sonos";
const host = "192.168.1.32";
const port = 1400;
/**
* Prüft ob ein Element der Wiedergabeliste "Ecstasy" von Lou Reed ist
*/
function isEcstasy(item) {
return item.uri == "x-sonos-spotify:spotify%3atrack%3a3RGStGuuUNSftwmTz4b3hm?sid=9&flags=8232&sn=3";