Skip to content

Web Methods Queue

Accalia de Elementia edited this page Jun 22, 2012 · 7 revisions

Back to Web Methods

Queue Methods

These methods inspect and manipulate the current playlist and playback status.

Contents

Queue Query Methods ------------------- These methods query the queue for information. They do not alter the status of the queue or playback. ##queueList [Back to top][top]

queueList()

Get a list of songs in the play queue.

Example Usage

code

xml = XMLRPC.queueList()
json = JSONRPC2('queueList', [])

common example code

result

[
    {
        "album": "Frieden",
        "artist": "Extrabreit",
        "track": "12/13",
        "title": "Sch\u00f6nes Lied",
        "disc": null,
        "file": "Misc/lied.mp3",
        "time": 195,
        "id": 23
    },
    {
        ...
    },
    ...
]
##queueCurrent [Back to top][top]

queueCurrent()

Get the currently playing song.

Example Usage

code

xml = XMLRPC.queueCurrent()
json = JSONRPC2('queueCurrent', [])

common example code

result


{
    "album": "Frieden",
     "artist": "Extrabreit",
     "track": "12/13",
     "title": "Sch\u00f6nes Lied",
     "disc": null,
     "file": "Misc/lied.mp3",
     "time": 195,
     "id": 23
}
##queueStatus [Back to top][top]

queueStatus()

Get the general playback status.

Example Usage

code

xml = XMLRPC.queueStatus()
json = JSONRPC2('queueStatus', [])

common example code

result

{
    "voluem": 14,
    "mixrampdb": 0.0,
    "repeat": true,
    "consume": false,
    "random": false,
    "state": "stop",
    "xfade": 0.0,
    "playlistlength": 29,
    "single": false,
    "mixrampdelay": NaN,
    "audio": "44100:24:2",
    "bitrate": 128
}
Playlist Manipulation Methods ----------------------------- These methods manipulate the saving and restoring of named playlists. ##queueLoad [Back to top][top]

queueLoad(name)

Load the playlist name into the play queue. If the queue is currently playing playback will continue according to set playback modifiers.

Example Usage

code

xml = XMLRPC.queueLoad("Lied")
json = JSONRPC2('queueLoad', ['Lied'])

common example code

result

[
    {
        "album": "Frieden",
        "artist": "Extrabreit",
        "track": "12/13",
        "title": "Sch\u00f6nes Lied",
        "disc": null,
        "file": "Misc/lied.mp3",
        "time": 195,
        "id": 23
    },
    {
        ...
    },
    ...
]
##queueSave [Back to top][top]

queueSave(name)

Save play queue as playlist name. Will overwrite playlist name if it already exists.

Example Usage

code

xml = XMLRPC.queueSave("Lied")
json = JSONRPC2('queueSave', ['Lied'])

common example code

result

null
Queue Manipulation Methods -------------------------- These methods query manipulate the songs in the play queue. They alter the status of the queue but usually do not alter the status of playback. ##queueAdd [Back to top][top]

queueAdd(path)

Add the contents of path to the end of the play queue.

queueAdd(path, position)

Add the contents of path to the play queue at position.

Example Usage

code

xml = XMLRPC.queueAdd("Misc/lied.mp3")
json = JSONRPC2('queueAdd', ['Misc/lied.mp3'])

common example code

result

[
    ...,
    {
        ...
    },
    {
        "album": "Frieden",
        "artist": "Extrabreit",
        "track": "12/13",
        "title": "Sch\u00f6nes Lied",
        "disc": null,
        "file": "Misc/lied.mp3",
        "time": 195,
        "id": 23
    }
]

code

xml = XMLRPC.queueLoad("Misc/lied.mp3", 0)
json = JSONRPC2('queueLoad', ['Misc/lied.mp3', 0])

common example code

result

[
    {
        "album": "Frieden",
        "artist": "Extrabreit",
        "track": "12/13",
        "title": "Sch\u00f6nes Lied",
        "disc": null,
        "file": "Misc/lied.mp3",
        "time": 195,
        "id": 23
    },
    {
        ...
    },
    ...
]
##queueClear [Back to top][top]

queueClear()

Remove all songs from the play queue. Will stop playback if currently playing.

Example Usage

code

xml = XMLRPC.queueClear()
json = JSONRPC2('queueClear', [])

common example code

result

[]
##queueMove [Back to top][top]

queueMove(songid, position)

Move song with id songid to position in the play queue.

Example Usage

code

xml = XMLRPC.queueMove(23, 4)
json = JSONRPC2('queueMove', [23, 4])

common example code

result

[
    { ... },
    { ... },
    { ... },
    {
        "album": "Frieden",
        "artist": "Extrabreit",
        "track": "12/13",
        "title": "Sch\u00f6nes Lied",
        "disc": null,
        "file": "Misc/lied.mp3",
        "time": 195,
        "id": 23
    },
    {
        ...
    },
    ...
]
##queueNext [Back to top][top]

queueNext()

Advance the play queue by one song and return the now playing song. If the play queue is not playing it will also start playback.

Example Usage

code

xml = XMLRPC.queueNext()
json = JSONRPC2('queueNext', [])

common example code

result

{
    "album": "Frieden",
    "artist": "Extrabreit",
    "track": "12/13",
    "title": "Sch\u00f6nes Lied",
    "disc": null,
    "file": "Misc/lied.mp3",
    "time": 195,
    "id": 23
}
##queuePrev [Back to top][top]

queuePrev()

Rewind the play queue by one song and return the now playing song. If the play queue is not playing it will also start playback.

Example Usage

code

xml = XMLRPC.queuePrev()
json = JSONRPC2('queuePrev', [])

common example code

result

{
    "album": "Frieden",
    "artist": "Extrabreit",
    "track": "12/13",
    "title": "Sch\u00f6nes Lied",
    "disc": null,
    "file": "Misc/lied.mp3",
    "time": 195,
    "id": 23
}
##queueRandomize [Back to top][top]

queueRandomize()

Randomly reorder the songs in the play queue. This is not the same as queueRandom which affects playback order.

Example Usage

code

xml = XMLRPC.queueRandomize()
json = JSONRPC2('queueRandomize', [])

common example code

result

[
    {
        "album": "Frieden",
        "artist": "Extrabreit",
        "track": "12/13",
        "title": "Sch\u00f6nes Lied",
        "disc": null,
        "file": "Misc/lied.mp3",
        "time": 195,
        "id": 23
    },
    {
        ...
    },
    ...
]
##queueRemove [Back to top][top]

queueRemove(songid)

Remove song with id songid from the play queue.

Example Usage

code

xml = XMLRPC.queueRemove(23)
json = JSONRPC2('queueRemove', [23])

common example code

result

[
    {
        ...
    },
    {
        ...
    },
    ...
]
##queueReplace [Back to top][top]

queueReplace(path)

Replace the contents of the play queue with the contents of path. If the queue is playing playback will continue according to set playback modifiers.

Example Usage

code

xml = XMLRPC.queueReplace('Misc/lied.mp3')
json = JSONRPC2('queueReplace', ['Misc/lied.mp3'])

common example code

result

[
    {
        "album": "Frieden",
        "artist": "Extrabreit",
        "track": "12/13",
        "title": "Sch\u00f6nes Lied",
        "disc": null,
        "file": "Misc/lied.mp3",
        "time": 195,
        "id": 23
    }
]
Queue Status Manipulation Methods --------------------------------- These methods manipulate the status of the play queue. They do not alter the contents of the play queue. ##queueConsume [Back to top][top]

queueConsume()

Get the queue consume mode.

queueConsume(mode)

Set the queue consume mode to mode. If the queue is in consume mode songs will be removed from the queue once they are played.

Example Usage

code

xml = XMLRPC.queueConsume()
json = JSONRPC2('queueConsume', [])

common example code

result

false

Example Usage

code

xml = XMLRPC.queueConsume(True)
json = JSONRPC2('queueConsume', [True])

common example code

result

true
##queueCrossfade [Back to top][top]

queueCrossfade()

Get the playback crossfade length.

queueCrossfade(length)

Set the queue crossfade length to length.

Example Usage

code

xml = XMLRPC.queueCrossfade()
json = JSONRPC2('queueCrossfade', [])

common example code

result

0.0

Example Usage

code

xml = XMLRPC.queueCrossfade(1.5)
json = JSONRPC2('queueCrossfade', [1.5])

common example code

result

1.5
##queueMixrampdB [Back to top][top]

queueMixrampdB()

Get the Mixramp volume adjust decibel level.

queueMixrampdB(decibels)

Set the Mixramp volume adjust decibel level to decibels.

Example Usage

code

xml = XMLRPC.queueMixrampdB()
json = JSONRPC2('queueMixrampdB', [])

common example code

result

0.0

Example Usage

code

xml = XMLRPC.queueMixrampdB(1.5)
json = JSONRPC2('queuemixrampdB', [1.5])

common example code

result

1.5
##queueMixrampDelay [Back to top][top]

queueMixrampDelay()

Get the Mixramp volume adjust delay time.

queueMixrampDelay(delay)

Set the Mixramp volume adjust delay time to delay

Example Usage

code

xml = XMLRPC.queueMixrampDelay()
json = JSONRPC2('queueMixrampDelay', [])

common example code

result

NaN

Example Usage

code

xml = XMLRPC.queueMixrampDelay(.75)
json = JSONRPC2('queueMixrampDelay', [.75])

common example code

result

0.75
##queuePause [Back to top][top]

queuePause()

Pause playback of the play queue. Will nave no effect if the queue is not currently playing.

Example Usage

code

xml = XMLRPC.queuePause()
json = JSONRPC2('queuePause', [])

common example code

result

{
    "album": "Frieden",
    "artist": "Extrabreit",
    "track": "12/13",
    "title": "Sch\u00f6nes Lied",
    "disc": null,
    "file": "Misc/lied.mp3",
    "time": 195,
    "id": 23
}
##queuePlay [Back to top][top]

queuePlay()

Start playback of the play queue. Will have no effect if the play queue is empty.

queuePlay(position)

Start playback of the play queue at position. Will raise an error if the position is invalid.

Example Usage

code

xml = XMLRPC.queuePlay()
json = JSONRPC2('queuePlay', [])

common example code

result

{
    "album": "Frieden",
    "artist": "Extrabreit",
    "track": "12/13",
    "title": "Sch\u00f6nes Lied",
    "disc": null,
    "file": "Misc/lied.mp3",
    "time": 195,
    "id": 23
}

Example Usage

code

xml = XMLRPC.queuePlay(20)
json = JSONRPC2('queuePlay', [20])

common example code

result

{
    "album": "Frieden",
    "artist": "Extrabreit",
    "track": "12/13",
    "title": "Sch\u00f6nes Lied",
    "disc": null,
    "file": "Misc/lied.mp3",
    "time": 195,
    "id": 23
}
##queueRandom [Back to top][top]

queueRandom()

Get the queue randomize order mode.

queueRandom(mode)

Set the queue randomize order mode to mode. If queue is in randomize mode the next song will be chosen at random from the queue. This is different from queueRandomize which shuffles the order of songs in the queue.

Example Usage

code

xml = XMLRPC.queueRandom()
json = JSONRPC2('queueRandom', [])

common example code

result

false

Example Usage

code

xml = XMLRPC.queueRandom(True)
json = JSONRPC2('queueRandom', [True])

common example code

result

true
##queueRepeat [Back to top][top]

queueRepeat()

Get the queue repeat mode.

queueRepeat(mode)

Set the queue repeat mode to mode. In repeat mode the play queue will loop back to beginning on completion, if single mode is also active the current song will be continuously looped.

Example Usage

code

xml = XMLRPC.queueRepeat()
json = JSONRPC2('queueRepeat', [])

common example code

result

false

Example Usage

code

xml = XMLRPC.queueRepeat(True)
json = JSONRPC2('queueRepeat', [True])

common example code

result

true
##queueSingle [Back to top][top]

queueSingle()

Get the queue single song mode.

queueSingle(mode)

Set the queue single song mode to mode. If queue is in single song mode the queue will not advance to the next song once the current song is complete. This can be used with repeat to continuously loop a single song.

Example Usage

code

xml = XMLRPC.queueSingle()
json = JSONRPC2('queueSingle', [])

common example code

result

false

Example Usage

code

xml = XMLRPC.queueSingle(True)
json = JSONRPC2('queueSingle', [True])

common example code

result

true
##queueStop [Back to top][top]

queueStop()

Stop playback of the play queue and seek to 0:00 in current song.

Example Usage

code

xml = XMLRPC.queueStop()
json = JSONRPC2('queueStop', [])

common example code

result

{
    "album": "Frieden",
    "artist": "Extrabreit",
    "track": "12/13",
    "title": "Sch\u00f6nes Lied",
    "disc": null,
    "file": "Misc/lied.mp3",
    "time": 195,
    "id": 23
}
##queueToggle [Back to top][top]

queueToggle()

Start playback if not currently playing, else pause playback.

Example Usage

code

xml = XMLRPC.queueToggle()
json = JSONRPC2('queueToggle', [])

common example code

result

{
    "album": "Frieden",
    "artist": "Extrabreit",
    "track": "12/13",
    "title": "Sch\u00f6nes Lied",
    "disc": null,
    "file": "Misc/lied.mp3",
    "time": 195,
    "id": 23
}
##queueVolume [Back to top][top]

queueVolume()

Get the volume of playback output.

queueVolume(volume)

Set the volume of playback output to volume

Example Usage

code

xml = XMLRPC.queueVolume()
json = JSONRPC2('queueVolume', [])

common example code

result

14

Example Usage

code

xml = XMLRPC.queueVolume(72)
json = JSONRPC2('queueVolume', [72])

common example code

result

72

Clone this wiki locally