Quantcast
Channel: Plex Channel Plugins — Plex Forums
Viewing all articles
Browse latest Browse all 5522

[BETA] UnSupported Services Tools (looking for testers)

$
0
0

How to Help with Beta Testing


Please refer to the UnSupported Services Tools Beta Testing Wiki.


What is this?


UnSupportedServices.bundle (USS):

This plugin creates a new system Services channel in Plex Media Server (PMS) to supplement the current official Services.bundle. The intent of this channel is to keep a centralized list of hosts available to multiple channels just as the current Services bundle does.

I plan to make a few channels that will require this UnSupported Services channel. Since PMS service code is delegated via alphanumeric listing, this will solve the issue created when making channels that require the same video host.

UnSupportedServicesTools.bundle (USST):

This plugin creates a new channel in PMS to manage the installation and future updates of the UnSupportedServices.bundle. The intent of this channel is to keep a clean install of the UnSupportedServices.bundle inbetween updates.


Why not use WebTools UASv2?


Two main reasons:

  1. After the USS installs, currently running plugins with service code need to be refreshed
  2. After a USS upgrade, the System.bundle needs to be restarted to correctly register the new service code

Currently, WebTools UASv2 only tires to refresh the channel being installed. Since this is service code and has no __init__.py file, it refreshes nothing and returns no error. If it at least returned an error then the WebTools is setup to restart the System.bundle upon a refresh error.

Thus I spent time (heavily borrowing from Plex's source code) to recreate proper install and update procedures for service code plugins.


Why not submit my Service code to the official Services.bundle?


At the time I started creating the USS plugin, the official Services.bundle was only updated with every PMS release. As of PMS v0.9.17.2 the Services.bundle is now dynamically updated independently of PMS releases. This would potentially make my UnSupportedServices.bundle unnecessary. For now, I'm going to continue to pursue implementing the UnSupportedServices.bundle, but may someday work at getting its code integrated into the official Services.bundle and phase out this plugin.


Notes


If there are copyright issues in regards to reusing some of Plex's source code, then please let me know what needs to be done. Honestly, I far more enjoy writing up the service code for video hosts instead of creating the custom installer. Really, the installer has been a frustrating issue for me over the past couple of months, hence the [BETA] release instead of a normal [REL].

If you want to use the USS along side your own channel, then here is an example I'm currently working on.

  1. If parsing your channels metadata, then send both the site URL and the host URL as one string to your URL Service code
  2. Make a function to split the site and host URLs (within the service code) so that the host URL can be used with the MediaObjectsForURL function and the site URL will be used with the MetadataObjectForURL function
  3. Parse for the hosted metadata (ie. write a MetadataObjectForURL)
  4. Follow the example to use the Service code to correctly parse and return the video links for MediaObjectsForURL function

You can also forgo writing service code and directly add URLService.MetadataObjectForURL(url) to your __init__.py code in-place-of a VideoClipObject().

If further explanation is needed just ask. I do plan on writing up a Wiki page later to give a more detailed explanation, and may write an example channel for others to follow.


If I've posted this to the wrong thread then sorry, please move it or tell me where it should go.

Please ask for more info as needed


Viewing all articles
Browse latest Browse all 5522

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>