Display Tree of Media

I’m working on a Volumio plugin. I’d like to display the playable media in a directory-tree-like fashion. For example, Pandora -> Channel or Media Library -> Artist -> Album -> Song

In my plugin, I thought I should load up the MediaInputSource which allowed the MediaPlayerDetails.xaml to display the “root” level media … but which mechanism can/should be used to allow the media tree to be traversed?

Thanks /keith

Most of the official integrations use the MediaBrowser capability for that type of functionality (Sonos, Yamaha, Denon, etc). However that isn’t available for plugins yet. I’m not sure what’s the best way to achieve this. I suppose you could use MediaInputSource & just change the SupportedInputSources array every time the user clicks an item. The tricky thing with that is “Back” button functionality. You’ll probably have to add your own custom Back button to that template. I’m not sure how well this will work but I suppose it’s worth a try.

Thank you Bill … It’s kind of what I was thinking I might have to do. So Integrations are at a different level than the plugins. A generalized tree browser feature would be a great addition :wink: … in the meantime I’ll have fun trying what you suggest. /keith

I coded up displaying the Media in the InputSource as you had suggested, and added an additional entry for a “<-Back” button where appropriate, supported by a stack (see below). It works, except when you traverse multiple layers upward, because pressing the “<-Back” button only works once; the subsequent click is not considered a change (well, that’s my guess anyway)

Q: How does one write an “integration”? Are there examples?
Q: Can I provide anything in my JS plugin to expose a MediaBrowser capability?

I don’t understand why the back button would only work once. Use a MediaCommand for that functionality if you need it. MediaCommands can be executed multiple times. You are probably going to have to edit the default templates to get it working with your browse functionality.

Official integrations are built into the app itself. They are not plugins. Users can only write plugins.

There is nothing you can do to implement MediaBrowser functionality. This is something I need to work on to make that available to plugins. There hasn’t really been any demand for that until now.

1 Like