Skip to content

Reference Script Functions Nowplaying

Kristopher Barrantes edited this page Nov 5, 2026 · 2 revisions

Now playing script functions

Also on the Cuebot Docs site.

Functions for C# (Cb.Call) and Python (a cb method each, or cb.call). See Script functions for how to use them.

A Run Python code step in the action editor

nowplaying.control

Presses a media button for your music player, like play, pause or next song. Fails with an error when no music player is open.

Value In Python What to put in
command command Optional. Which button: "PlayPause", "Play", "Pause", "Next" or "Previous". Default "PlayPause".
player player Optional. Part of the player's name, like "vlc". Leave it out for the player that is playing now.

Gives back: The name of the player that got the button press.

C#

var answer = await Cb.Call("nowplaying.control", new { command = "Next" });

Python

answer = cb.nowplaying_control(command="Next")

nowplaying.get

Tells you which song is playing on your computer right now, from any music player (or Spotify when you are signed in).

Gives back: found (false when no player is open), title, artist, album, player (its name), artUrl (cover picture link), duration in seconds, link and playing (true/false).

C#

var answer = await Cb.Call("nowplaying.get");

Python

answer = cb.nowplaying_get()

Clone this wiki locally