I've been reading into developing a simple plugin for plex and I can't really get started.
The few examples and tutorials I've found didn't really help me much.
What I want is a plugin which reads a HTML directory and can play all the files (all are mp4 coded) found there. Could someone please point me to a simple example where I can see how this would be done?
Getting metadata information, menu hierachy and such can be done later. For now I just want to play files from a html server.
As I understand do I need to define a URLService in the Info.plist.
I don't really see where this service is used in the __init__.py.
In the __init__.py all magic happens: the menus get created and filled with the links to the video files.
Is that correct? I'd be glad for any help and am sorry if I missed somethign curcial in the documentation.
If all the files are presented on one page, then an url service is not the best approach. If the files are contained within separate sub-directories, then an url service could prove quite useful. Probably best if you include some sample HTML, either real or made-up but representative.
You have to create a ServiceInfo.plist that tells it to look for the URL Service named 30C3 and give it the pattern of the URLs that will be passed to it.
You are using the Info.plist but that should just be for the basics about your channel and the clients it supports. The Framework Documentation is out of date in this area. It is noted here in the this pinned Missing From Framework document - https://forums.plex.tv/topic/87324-missing-from-the-official-plugin-documentation/ (click the link to see the full document)
The file folder structure is a little off too. Instead of URLService, it should be called Services and contain a folder called URL that contains the ServiceInfo.plist and the folder called 30C3.
Here is link to an example of a channel that still has a URL service directly connected to it. It may not be that similar to your particular projec, but it does show you the file folder structure and the basic structure of the files themselves.
Usually if it says it cannot find a URL service once you have all the files and folders in place, then either you haven't rebooted Plex so it will recognize your plugin properly or the regex you used for your URL pattern is not correct, so Plex is unable to find a Service with a pattern that matches the URL you are trying to process.
A URL Service cannot work with a list of videos all on one page (because the input URL is not unique for 1 video). But a channel/plugin can work without a URL Service. Attached to this post is an example of how this CCC channel could work.
Edit: There's a bug in the Plex for Home Theater client where the details screen (the screen you see before you play a video) is blank if we're not using a URL Service.