Shared Prefs[] between Plug-in and URLService

Hi, I’m sorry if this has been answered before (search didn’t turn up any results).



I’m trying to share the Settings of my plugins main code with a URLService also provided by this plugin.

Accessing Prefs[somekey] in the main code works just as expected, however doing the same in my URLService results in:



<br />
KeyError: "No preference named 'somename'"<br />




Am I doing anything wrong or is sharing Prefs not a supported feature?


I ran into a similar issue and did not figure out how to share them.
I did come up with a workaround, I passed the settings as part of the url, then parsed them out in the service.

Hi Shirk,

In another topic Mike posted what you are looking for too: http://forums.plexapp.com/index.php/topic/41008-urlservice-needs-login-info/page__view__findpost__p__260178

Thanks for pointing to that topic (I had skimmed it before but at that time I didn’t even have an up to date folder layout…).



Am I understanding it right - I move the Prefs to ServicePrefs.json and my Plugin will still be able to access them via Prefs?



One other thing… Why are the recent Plex API so out of sync with the plugin docu? It’s seriously no fun to poke around in the actual API implementation to learn how things work…

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