How does one handle this. Say, path www.somesite.com/watch has different media and URLs than www.somesite.com/video. So, the rules are different, everything is different as far as the service would be concerned. So, how would this work, it appears you can only have 1 ServiceInfo.plist. Would I have multiple “keys” within the dict in that file? In that way, there could be multiple subdirectories under Services/URL. Or, is there a different way this is done?
Here is an example of one I recently wrote with two URL services - github.com/shopgirl284/RTUSA.bundle/tree/master/Contents/Services
But it can be confusing to have two URL services for one website, so it is always a better practice to try to combine them, especially if you think you may eventually want to add your URL service to the Services.bundle.
In the MetadataforURL() if you cannot pull data from a SMIL or XML file that is the same, the meta options from the HTML page can be used with try/excepts or code like og_url = html.xpath('//meta[@name="og:url" or @property="og:url"]/@content') to get multiple options if needed. And if you know the URLs are different, you can more easily use if/else to define separate media objects. You can also separate the pulls of data either in the PlayVideo() function or through functions pulled by the PlayVideo() function.
I have found that you can find some good examples in the existing Services bundle. From the main page of the bundle (github.com/plexinc-plugins/Services.bundle), you can search for any term and get some good examples. (As you will see the Search at the top changes to search this repository, so you can get some good examples of individual URL services with key words)
Perfect, thanks!