INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Is there an MCWS (or MCC) option to export a playlist as m3u?  (Read 2645 times)

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3981
Is there an MCWS (or MCC) option to export a playlist as m3u?
« on: December 27, 2015, 11:08:55 am »

I can see there are an MCWS commands to dump a playlist, the only output options appear to be MPL (which contains a whole load of info) and a list of file keys. MC itself lets you export a playlist into other formats like m3u. Is there a way to programmatically access this functionality? e.g. to issue an MCWS command that yields a playlist as m3u.

Obviously I can parse the MPL programmatically to make an m3u but just wondering if there is a way to avoid this.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42053
  • Shoes gone again!
Re: Is there an MCWS (or MCC) option to export a playlist as m3u?
« Reply #1 on: December 27, 2015, 12:04:22 pm »

I think I could probably add this once I'm back.  Bump this to remind me if it isn't done in a couple weeks.
Logged
Matt Ashland, JRiver Media Center

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3981
Re: Is there an MCWS (or MCC) option to export a playlist as m3u?
« Reply #2 on: December 27, 2015, 04:43:21 pm »

I will do that, thanks.

In the meantime, a workaround for linux/cygwin users

Code: [Select]
    PLAYLIST_ID=$(curl -s http://${JRMC_HOST}:${JRMC_PORT}/MCWS/v1/Playlists/List?Token=${MCWS_AUTH_TOKEN} | xmlstarlet sel -t -m "/Response/Item/Field[@Name=\"Path\"][text()=\"${PLAYLIST_PATH}\"]/../Field[@Name=\"ID\"]" -v 'text()'\
    curl -s "http://${JRMC_HOST}:${JRMC_PORT}/MCWS/v1/Playlist/Files?Playlist=${PLAYLIST_ID}&Fields=Filename&Token=${MCWS_AUTH_TOKEN}" | xmlstarlet sel -t -m '/MPL/Item/Field[@Name="Filename"]' -v "text()" -n - > /tmp/${1}.m3u
}

Logged

Skeezix

  • Galactic Citizen
  • ****
  • Posts: 294
Re: Is there an MCWS (or MCC) option to export a playlist as m3u?
« Reply #3 on: December 28, 2015, 03:47:49 pm »

MC stores playlists in M3U format at Users\ID\AppData\roaming\J River\Media Center 21\Library\Playlists. Wouldn't that suffice?
Logged
* HP Pavilion Desktop 510-p114
* Windows 10 Home 22H2 19045.4412
* Firefox 126; Thunderbird 116

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42053
  • Shoes gone again!
Re: Is there an MCWS (or MCC) option to export a playlist as m3u?
« Reply #4 on: January 11, 2016, 10:56:58 am »

Coming next build:
NEW: The action for a files command in MCWS accepts "m3u" to create an m3u format playlist.
Logged
Matt Ashland, JRiver Media Center

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3981
Re: Is there an MCWS (or MCC) option to export a playlist as m3u?
« Reply #5 on: January 11, 2016, 11:11:31 am »

thanks
Logged
Pages: [1]   Go Up