I am revamping the Movie2k Plugin so people can have access to the four main sites that the plugin now supports without having to change them in the plugins preferences and restarting Plex Media Server.
I noticed on Plex/Web the search does not show up unless it's in def MainMenu(): I have now moved the search to a function called def SubMainMenu():
The reason being so people can search the site they choose from the main menu along with all of the other site goodies.
With the Movie2k plugin I have two search functions under the def SubMainMenu():, one for Movie2k site search, the other for a Trailers search of another site and on the Roku Plex Channel this works flawlessly with this setup. Even with the new input screen developed for non search related input of text. If I have to move it back to the def MainMenu(): function then this will force people to have to go to preferences and change the SiteURL and restart Plex Media Server. I want to use the SiteURL section now for only the Proxy Sites set up for Movie4k.to.
My question is there a way to get the search to show up on Plex/Web with the above setup or can Plex/Web be updated to support Search and Text input like the Roku Plex Channel?
I’ve mentioned the issue (Plex/Web only providing access to Search in the top-level menu) to the developer before. I hope that it is something that will be addressed but I have no knowledge of any ETA. I’m not aware of any work-arounds at present.
I had a thought for a work around. Is there a way to detect clients within the plugin framework? If so I can make a default search for the main site show up only when somebody uses Plex/Web under def MainMenu(): and then disable it for other clients.
That worked like a champ... Only thing at this time Plex/Web Search will only be for the site Movie4k.to the main site.
Do you think I should add in Preferences a Plex/Web Search option for the Site URL? Maybe you know why when you select the Site URL from preferences it does not seem to update the global variable even if you exit the plugin and go back in which is set when you enter the plugin. Takes restarting Plex Media Server. All my other Preference options work well.
Do you think I should add in Preferences a Plex/Web Search option for the Site URL? Maybe you know why when you select the Site URL from preferences it does not seem to update the global variable even if you exit the plugin and go back in which is set when you enter the plugin. Takes restarting Plex Media Server. All my other Preference options work well.
Looks to me like in your code you set up the calls to Prefs[] as global variables. I believe the way the plugin framework behaves, those global variables are evaluated once at start-up and then they are not changed/re-evaluated until next restart. If you want those values to reflect changes in the prefs, I find it's better to poll the prefs when you need the value. You can do so either directly:
url = Prefs['url']
or via a separate function (I do this in several of my plugins):
Thanks again Mikedm139 I don't know why I didn't think of that... Right and only way to update a global is to use gobal url but in this case if you switch the values in preferences it's not going to update still. So your way is better. -_-