roaku 797 Posted January 6, 2021 Share Posted January 6, 2021 I've got a plugin going that needs to be able to access mediastream info about each *version* of an Item. I've found this endpoint that provides the data I need: /Items/[itemid]/PlaybackInfo And I've loaded up the ApiClient in my C# project and am now working on actually retrieving API data from within the plugin. My questions are: Is making http requests to the API the only option from a Plugin context, or is there a native C# API to fetch the same data? If making http is the only approach, is there an Emby class that can provide server context info like hostname or ip and port? Thanks for taking a look. Link to comment Share on other sites More sharing options...
roaku 797 Posted January 7, 2021 Author Share Posted January 7, 2021 (edited) I have since discovered ILibraryManager and that Item has a GetMediaSources method built in. This delivers the data I need natively: item.GetMediaSources(true, false, _libraryManager.GetLibraryOptions(item)); Edited January 7, 2021 by roaku Link to comment Share on other sites More sharing options...
Luke 37166 Posted January 7, 2021 Share Posted January 7, 2021 Hi, yes that's probably close enough to getting you what you want. That's what the /PlaybackInfo api uses. Link to comment Share on other sites More sharing options...
roaku 797 Posted January 7, 2021 Author Share Posted January 7, 2021 Ok thanks. Feel free to clue me in if there's some method argument tweaking or something I can do to get even closer to what PlaybackInfo is doing. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now