Jump to content

How to use Playlists API?


Recommended Posts

TheExterminator
Posted

I figured out why it wasn't working thanks

TheExterminator
Posted

If anyone is interested, I'm working on an app that uses the API to export the playlists in m3u format. Let me know if you're interested

Posted

I figured out why it wasn't working thanks

 

What was the solution?

TheExterminator
Posted (edited)

I wasn't forming the url correctly. If anyone wants to know what url worked, the url in the format:

 

http://embyurl:8096/emby/Items?format=json&Recursive=true&IncludeItemTypes=Playlist&api_key=MYAPIKEY

 

gives you an object with all playlists.

 

I looped through each playlist in this object and retrieved all of the tracks for the current playlist by calling

 

http://embyurl:8096/emby/Playlists/<playlistid>/Items?Fields=Path&api_key=MYAPIKEY

 

I added Fields=Path because its needed to also include the full path to the track so it can be written to the m3u.

 

I actually finished my app and can now export my Emby playlists in m3u format which can be added to your music folder so it will be picked up as a playlist the next time that you scan your music library.

Edited by TheExterminator
Posted

I actually finished my app and can now export my Emby playlists in m3u format which can be added to your music folder so it will be picked up as a playlist the next time that you scan your music library.

 

:huh:  What am I missing?  If your playlists are in Emby already, why do they need to be exported so that they can be read in by the Emby library scan...?

TheExterminator
Posted (edited)

You might of missed my other post but the reason that I did this is because I have 2 playlists that for some reason are stored as XML, not m3u8 and I want to have them all as m3u8. I looked online but didn't find a reliable XML to m3u8 converter so I made my own tool to export the playlists as m3u8

Edited by TheExterminator
Posted

Truthfully when i have chance i would just like to deprecate our playlist xml and build them based on m3u8. Not sure when I will get to that though.

TheExterminator
Posted

Well in the meantime, if anyone has an xml playlist, my app seems to work well at saving playlists as m3u so you can replace your xml playlist

Posted

Okay.  Thanks for the explanation.

  • 2 years later...
Newvalho
Posted

I know this is an old topic however @TheExterminator, is your xml to m3u conversion available for public usage.  I created a playlist within Emby and didn't realize it would save as XML and would like to convert to M3U

  • 4 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...