I’ve seen a few threads about playing local media in a plugin, and the solution seems to be that you need to set PlexPluginCodePolicy to Elevated in the plist file, and then return a MovieObject.
Could I also use local files for artwork/thumbs this way? If so, I’m missing something. I’ve elevated PlexPluginCodePolicy, but setting, for instance, art to “/path/to/my/image.jpg” doesn’t work. Is this in any way possible?
Is there some reason you wouldn't want to add the artwork to the plugin bundle?
Yes, I have my reasons for wanting to keep the artwork external.
Without going too much into it, I am working on a plugin to handle content of a type that PMS isn’t really designed for, and I’d like to have art related to each item. By keeping it external, I both a ) keep the plugin from growing unnecessarily large and b ) make it easier to edit/add to the art.
Fair, enough. There isn’t really official framework support for that sort of thing but…
It can be done. Here’s a link to a little plugin that I wrote a while back as a proof of concept. It imports the python os module to allow working with the file-system outside of Plex. You’ll need to use the Elevated Code Policy to make use of that sort of thing.
Thanks for the reply. I’m going about the artwork a different way, so that’s not an issue anymore.
However, I now need to play local video files. Is the plugin you posted working? Because anytime I try to play anything with it I get “Error While Opening File”
It was working the last time I messed with it. That was quite a while ago now. Something in the framework or PMS may have changed since then and broken the plugin.
Yeah, I think something broke it, that or I’m doing something wrong. That’s a shame, because I’m having trouble getting past this step. I’ve had limited success with an xbmc command, but this is very slow, taking upwards of 25 or 30 seconds to start the video.
Apparently that function is currently not working. I’m not sure whether it will receive much attention since it’s not a “supported” use-case for plugins.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.