ok so i’ve been a kodi addon developer for awhile and was looking to make some plex channels but for the life of me I can’t get a my basic plugin to play a single video url. I’ve been able to create a plugin channel to display menu content and items and such but I can’t get it to play the video url i’m passing to it. I’ve looked at the plugin log and com.plexapp.system.log and it doesn’t indicate what’s wrong. when viewing it from the plex server page it just tells me “this channel is not responding” and if i play it from the plex client it always just spins. Last line in the log after requesting the plugin url is always like the following:
response: [200] MediaContainer, 999 byes
Can any give me a simple code snippet that for example just plays this video url? videos.lstudio.com/high/WT_S4_Ep1_HI.mp4 it doesn’t have to be anything fancy just the simplest code to play that url.
Playing online content with Plex can be different than Kodi plugins. Plex does not use the Flash Player.
In Plex you create a URL service that takes the URL address of the web page for the video (the one with the Flash Player) and uses that address to find all the info Plex needs to play it. The URL service pulls all the Metadata from the page and finds where all the media info is, including the location of the actual media file, and uses that to create the media object. The Plex players/clients read this info as an XML file to determine how to play the video.
The Services.bundle (github.com/plexinc-plugins/Services.bundle) contains most of the URL services, but you can include a URLservice in your channel bundle (only URL services that are added to the Services.bundle will work with the PlexIt feature).
Every URL service has a URL pattern using Regex in the ServiceInfo.plist to tell it the type of URLs that are handled by that URL service. When you create an EpisdoeObject or VideoClipObject and give a url value, it searches for an existing Plex URL service to process that video url.
When you have a direct link to the video file (like the mp4 you attached), you do not have to use or create a URL service, but you need to create a CreateVideoClipObject function to build the MediaObject in your plugin. HGTV has a good example of this - github.com/plexinc-plugins/HGTV.bundle/blob/master/Contents/Code/init.py#L185.
The link you gave does not works because you are most likely using a VideoClipObject() or EpisodeObjet() and putting that URL you attached in the url field. That sends that URL to the existing Lstudio URL service - github.com/plexinc-plugins/Services.bundle/tree/master/Contents/Service%20Sets/com.plexapp.plugins.lstudio. I did a URL service lookup with the URL you attached and it is picked up by the LStudio URL service, but it returns a Media Not Avalable error in the com.plexapp.system.log because it fails to find the metadata that URL service is trying to pull.
EDIT
The Lstudio URL service has recently been rewritten and the URL pattern needs to be tighten up to exclude old videos that may be still floating around out there. If you go to the LStudio website you will notice that Web Therapy is no longer available through their website. But if you click on any of the “Watch Episode” links on that site, the video URL it brings up will work with the Lstudio URL service And example is lstudio.com/post/124009638181/red-band-trailer-episode-9-featuring-adam. updated for the new URLs used by the web site.