Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 5 of 5
  1. #1

    playlist play with wipePlaylist

    Hello!

    I'm currently implementing some nice stuff via the CLI in PHP to integrate to the home automation (things like doorbell, background sound for TTS).

    Before I start, I backup the current playlist, where "backup" is the playlist name to save:
    Code:
    $playermac playlist save backup silent:1
    Then I call my output by playlist play <something>.

    After that, I resume the playlist by
    Code:
    $playermac playlist resume backup wipePlaylist:1
    Because the wipePlaylist:1 does not work, I am not sure how the format of <taggedParameters> is. <taggedParameters> is used several times in the CLI documentation, but I am not sure, if the format wipePlaylist:1 is correct in this case (same with silent:1).

    Can you help me? Thanks!
    Christian



    From Documentation:
    <playerid> playlist resume <playlist> <taggedParameters>

    Replace the current playlist with the playlist specified by p2, starting at the song that was playing when the file was saved. (Resuming works only with M3U files saved with the "playlist save" command below.) Shortcut: use a bare playlist name (without leading directories or trailing .m3u suffix) to load a playlist in the saved playlists folder.

    Optional tagged parameters are noplay, which when non-zero will not auto-start the track, and wipePlaylist, which will destroy the saved playlist from both the filesystem and from the DB (these tagged params are typically used for resuming a temporarily cached playlist, e.g. after exiting alarm sound preview on squeezeplay devices).

  2. #2
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,530

    playlist play with wipePlaylist

    Isn't this the use case for the "playlist preview" command?

    Michael


    Am 12.01.16 um 09:06 schrieb christiantf:
    >
    > Hello!
    >
    > I'm currently implementing some nice stuff via the CLI in PHP to
    > integrate to the home automation (things like doorbell, background sound
    > for TTS).
    >
    > Before I start, I backup the current playlist, where "backup" is the
    > playlist name to save:
    >
    > Code:
    > --------------------
    > $playermac playlist save backup silent:1
    > --------------------
    >
    >
    > Then I call my output by playlist play <something>.
    >
    > After that, I resume the playlist by
    >
    > Code:
    > --------------------
    > $playermac playlist resume backup wipePlaylist:1
    > --------------------
    >
    >
    > Because the wipePlaylist:1 does not work, I am not sure how the format
    > of <taggedParameters> is. <taggedParameters> is used several times in
    > the CLI documentation, but I am not sure, if the format wipePlaylist:1
    > is correct in this case (same with silent:1).
    >
    > Can you help me? Thanks!
    > Christian
    >
    >
    > FROM DOCUMENTATION:
    > <playerid> playlist resume <playlist> <taggedParameters>
    >
    > Replace the current playlist with the playlist specified by p2, starting
    > at the song that was playing when the file was saved. (Resuming works
    > only with M3U files saved with the "playlist save" command below.)
    > Shortcut: use a bare playlist name (without leading directories or
    > trailing .m3u suffix) to load a playlist in the saved playlists folder.
    >
    > Optional tagged parameters are noplay, which when non-zero will not
    > auto-start the track, and wipePlaylist, which will destroy the saved
    > playlist from both the filesystem and from the DB (these tagged params
    > are typically used for resuming a temporarily cached playlist, e.g.
    > after exiting alarm sound preview on squeezeplay devices).
    >
    >
    > ------------------------------------------------------------------------
    > christiantf's Profile: http://forums.slimdevices.com/member.php?userid=63330
    > View this thread: http://forums.slimdevices.com/showthread.php?t=104999
    >
    >

  3. #3
    Quote Originally Posted by mherger View Post
    Isn't this the use case for the "playlist preview" command?
    I tried, but I couldn't get used to it, running my mp3 file.

    Christian

  4. #4
    Can confirm that wipePlaylist:1 is correct (and case sensitive!) and works with the playlist preview. I'm using the following for a JSON request to retrieve and resume the playlist created with the preview request.

    LUA
    Code:
    uuid = "MA:CA:DD:RE:SS:00";
    
    local data = {
      id		= 1,
      method	= "slim.request",
      params	= {
        uuid,
        {
          "playlist",
          "resume",
          "tempplaylist_" .. string.gsub(uuid, ":", ""),
          "wipePlaylist:1",
        },
      },
    };
    Works a treat to play my door bell throughout the house.

  5. #5
    Junior Member
    Join Date
    Nov 2018
    Posts
    4
    Quote Originally Posted by cpntainsprky View Post
    Can confirm that wipePlaylist:1 is correct (and case sensitive!) and works with the playlist preview. I'm using the following for a JSON request to retrieve and resume the playlist created with the preview request.

    LUA
    Code:
    uuid = "MA:CA:DD:RE:SS:00";
    
    local data = {
      id		= 1,
      method	= "slim.request",
      params	= {
        uuid,
        {
          "playlist",
          "resume",
          "tempplaylist_" .. string.gsub(uuid, ":", ""),
          "wipePlaylist:1",
        },
      },
    };
    Works a treat to play my door bell throughout the house.
    Sorry to bring back an old thread, but it's not working for me.

    I'm trying to play a small playlist with a couple of alarm sounds and (after the alarms playlist is finished) return to the current playlist.

    As I understand it I have to use a combination of the 'playlist preview' and 'playlist resume' commands? Can you supply an example?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •