Jump to content

Request to get Json response


Recommended Posts

Posted (edited)

I have created a music library and I am trying to get json response for it but haven't been able to find a way to get the response I want with emby api.

I would really appreciate if anyone could help me!

I have a folder structure like this: 

Music:
	Album1:
		Music1.mp3
		Music2.mp3
	Album2:
		Music1.mp3
		Music2.mp3

and I am trying to get response like this:

Items[
	Album1: {
		AlbumName
		Music1: {
			Name
			....
		}
		Music2: {
			Name
			....
		}
	},
	Album2: {
		AlbumName
		Music1: {
			Name
			....
		}
		Music2: {
			Name
			....
		}
	}
]	

 

Edited by dummy456
  • Like 1
Posted

oh ok, so currently I have managed to figure out get albums like the following, but is there any way I can also get an objects of songs as well in the same array by adding something to the url?

http://emby:port/emby/Items?Recursive=true&IncludeItemTypes=MusicAlbum&api_key="key"

{
	"Items": [
		{
			"Name": "Album1",
			"IsFolder": true,
			"Type": "MusicAlbum",
		},
		{
			"Name": "Album2",
			"IsFolder": true,
			"Type": "MusicAlbum",
		},
		{
			"Name": "Album3",
			"IsFolder": true,
			"Type": "MusicAlbum",
		}
	],
	"TotalRecordCount": 3
}

 

Posted

Hi, no you'd have to get the songs using a separate query from the albums.

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...