Jump to content

Favorite Songs / Favorite Music Artists


speechles

Recommended Posts

@@Luke

 

I am trying to make music favorites work in the roku app. Having a few problems for obvious reasons. Maybe these arent ready for prime time?

 

Favorite songs:

url = url + "/Users/" + HttpEncode(getGlobalVar("user").Id) + "/Items?includeitemtypes=Audio"query.AddReplace("recursive", "true")query.AddReplace("fields", "PrimaryImageAspectRatio")query.AddReplace("sortby", "SortName")query.AddReplace("sortorder", "Ascending")query.AddReplace("filters", "IsFavorite")query.AddReplace("ImageTypeLimit", "1")
This returns a pretty much useless payload of inline items. It isnt formatted like an album so you have no playable path when building these lists.

e021f4e249833c353b3d470ecff61ad5.jpg

 

So I made a row showing every favorite song individually, just for effect. When you click into this it then groups them to make it appear as an album.

d6176834e5462d3d92941e8e8d8d0772.jpg

 

I now have a playlist of just favorite songs fairly easily. But because of the way the payload is formed the playable path is missing. This will crash of course. I see no way to make this possible. Is the favorite songs endpoint pretty much useless at the moment? Notice all the tracks indexes are 4. This is because the first is 4 the rest are? It seems to inherit this attribute when it should be assigned to every track individually.

 

Favorite albums. Works, no issues.

 

Favorite music artists:

url = url + "/Users/" + HttpEncode(getGlobalVar("user").Id) + "/Items?includeitemtypes=MusicArtist"query.AddReplace("recursive", "true")query.AddReplace("fields", "PrimaryImageAspectRatio")query.AddReplace("sortby", "SortName")query.AddReplace("sortorder", "Ascending")query.AddReplace("filters", "IsFavorite")query.AddReplace("ImageTypeLimit", "1")
This works as expected, but misses certain music artists I have favorited. It seems weird it just arbitrarily decides which to show.

abb5bc4027591385023b95e60476a545.jpg

 

I have in place the methods to favorite music artists and music albums and it works. Is the endpoint for favorite music artsts also not ready for primetime as it can miss some results?

 

I notice the web client only exposes the favorite albums. Favorite songs and favorite artists cannot be shown as a list. Is this the reason? Ive been scratching my head on this for days. Any answer would be appreciated. Thanks.

 

Edit: figured it out myself. musicartists uses a different endpoint. Songs need to have mediasources as a field. Now I can this happen.

Edited by speechles
Link to comment
Share on other sites

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