Using local resources for plug-in

A little help please
For the plug-in I'm working on. The thumbnails for the items in the menu are stored locally but not in the plug-in bundle, eg. (/Applications/ExampleApp/ExampleSubFolder/example-thumb.png). I can't bundle them because they're sourced/used by an external program and the folder contents change over time.

I'm having trouble getting the thumbs recognized. I set the thumb variable to the path (as above) and pass that to my mediaContainer, but all that shows in the client is the greyed-out Plex logo.

Is there a specific way to pass local paths that I'm missing?

EDIT: Apparently, the local thumbs are .jpg not .png. Is that a problem?

The format shouldn’t be a problem, but IIRC, for security reasons plug-ins are usually allowed to access resources on the filesystem outside of their own bundle. However, there’s a couple of lines you can throw in the Info.plist to help.



<br />
        <key>PlexPluginCodePolicy</key><br />
        <string>Elevated</string><br />




Not that I'm not sure if this is the issue, but it might be part of the problem, at least :)

The other thing to check for is the XML coming back from the plug-in. You can see what the thumb="" attribute is set to.

Thanks Elan.



After a chat rethinking how some users might want to use the plug-in, I decided not to use the local info. At first I thought that It would be better to avoid duplicating work that had already been done (finding/downloading thumbs), but it made the code a lot whole lot more complicated and less predictable.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.