ginjaninja 624 Posted 5 hours ago Posted 5 hours ago (edited) I wish to make my plugin available to end users on the Webclient, so i have registered a page controller / page just for users with EnableInUserMenu = true, It works fine other than i have to press f5 after every action for non admins. Claude tells me its becuase the Emby page wiring is hard coded to "sendmessagetoadminsessions" and not "sendmessagetousersessions"...but regardless does this make any sense and is there a way to make pages responsive to users. https://github.com/ginjaninja1/ManageComingSoon/tree/main/UI testing on 4.10.0.21 thanks Edited 5 hours ago by ginjaninja
ginjaninja 624 Posted 1 hour ago Author Posted 1 hour ago (edited) 4 hours ago, Luke said: Hi, after what actions? Thanks @Luke, bear with me , becuase i am guessing what matters to investigating this. I have a genericui buttonitem with a command handle "AddToList" public override Task<IPluginUIView> RunCommand(string itemId, string commandId, string data) { if (commandId == "AddToList") { HandleAddToList(); return Task.FromResult<IPluginUIView>(this); } Claude says the smoking gun in is PageControllerHostbase in that it is the something in the chain hardwired to "SendMessageToAdminSessions" // Emby.Web.GenericUI.Control.PageHosts.PageControllerHostBase protected void NotifyPageChangeDelayed(IUIView uiView) { Task.Run(async delegate { await Task.Delay(500).ConfigureAwait(continueOnCapturedContext: false); UIViewInfo data = new UIViewInfo(uiView) { IsPageChangeInfo = true }; await sessionManager.SendMessageToAdminSessions("UIPageInfoChanged", data, CancellationToken.None).ConfigureAwait(continueOnCapturedContext: false); }); } private void CurrentUIViewOnUIViewInfoChanged( object sender, GenericEventArgs<IUIView> e) { if (IsInitialized) { this.UIPageInfoChanged?.Invoke(this, e); UIViewInfo data = new UIViewInfo(e.Argument); sessionManager.SendMessageToAdminSessions( "UIPageInfoChanged", data, CancellationToken.None); } } Edited 1 hour ago by ginjaninja
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now