plugin.video.themoviedb.helper mouse buttons are swapped using recommended method
#1
My skin uses mouse control and it works very effectively. I've been chasing non working pieces of plugin.video.themoviedb.helper for days now only to realize completely by accident that if I use the keyboard to activate a function to play a movie or get actor info, that works no problem, but when I try to use a "left click" to activate the same thing, it doesn't.

Tried six ways to Sunday force a left click code... but come to find out, it completely responds to RIGHT clicking. Everything works exactly as expected if I right click instead of left click.

It is ONLY screwed up in the plugin.video.themoviedb.helper recommended conversion I've been spending time to move from embuary.helper.

I've traced the .py files, I can't see any on_move or anything "mouse" related that would cause the swap, but then again, I'm not a Python expert. 

Can anyone provide a thought on what I should be looking at as a temp mod in the .py files to see if I can correct the swap?

I am not open to adding any type of keymap file to fix this, the problem is in plugin.video.themoviedb.helper and needs to be resolved to keep everything in order.

Found the right click totally by accident, rest of skin is fully operational, it is squarely a plugin.video.themoviedb.helper problem.

Haven't seen JurialMonkey around or Mike, so its been like a ghost town. Can anyone help with a suggestion? I really need to get this sorted so I can finish this area up and move on to other parts of the skin that need to be updated.

Thanks for any insight and help.
Chris
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embuary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 10% TV Shows: 0% Music: 0%
Reply
#2
NM, I figured it out on my own. I'm not sure how jurialmunkey handles things like this, but for my skin, I need the left mouse click to be active within the plugin because you can't code it in the skin as an xml override. The other option I found was to do a keymap, mouse, select command.... but for any skin to expect people to add keymaps to fix plugin or script issues is completely unacceptable.

So I reverse engineered the plugin with some basic logic. First logic point, short right click worked (found by accident, but led to here), long right click led to same action set, short left click (main issue) not working.... LONG left click caused selection to work like short right click.... hmm.

This told me to start looking at the source IDs and sure enough, context click (i.e. right click) is set as 117 by the Kodi core. Reading through master/xbmc/guilib/Key.h I find ACTION_MOUSE_LEFT_CLICK so I sub in 100 for 117 and sure enough, left short click is now active.... right click is now disabled clearly because I have rerouted/subbed the routing ID, but the point is, the sub function works as expected.

I review the code and find that these are just initializer definitions and the code that drives this is nothing more than a bunch of if/then/else options. Solution, simple, replicate the 117 sub function, restore original 117 initializer, create a new left wheel mouse click set to 110, set the order so left click is checked before context (since that is how most drive a mouse), and bingo.... it "appears" to be a simple fix. I will continue to see if there is any byproduct issues with the change, but I can't see why since it is very specific to a mouse click input requirement.

This is all done in the recommendations.py file:

OLD (Lines ~25-30)
xml:

ACTION_CONTEXT_MENU = (117,)
ACTION_SHOW_INFO = (11,)
ACTION_SELECT = (7, )
ACTION_CLOSEWINDOW = (9, 10, 92, 216, 247, 257, 275, 61467, 61448,)
ID_VIDEOINFO = 12003

OLD (Lines ~130-141)
xml:

    def onAction(self, action):
        _action_id = action.getId()
        if _action_id in ACTION_CLOSEWINDOW:
            return self.do_close()
        if _action_id in ACTION_SHOW_INFO:
            return self.do_action()           
        if _action_id in ACTION_CONTEXT_MENU:
            return executebuiltin(self._context_action) if self._context_action else self.do_action()
        if _action_id in ACTION_SELECT:
            return self.do_action()



NEW (Lines ~25-30)
xml:

ACTION_MOUSE_LEFT_CLICK = (100,)
ACTION_CONTEXT_MENU = (117,)
ACTION_SHOW_INFO = (11,)
ACTION_SELECT = (7, )
ACTION_CLOSEWINDOW = (9, 10, 92, 216, 247, 257, 275, 61467, 61448,)
ID_VIDEOINFO = 12003

NEW (Lines ~130-141)
xml:

    def onAction(self, action):
        _action_id = action.getId()
        if _action_id in ACTION_CLOSEWINDOW:
            return self.do_close()
        if _action_id in ACTION_SHOW_INFO:
            return self.do_action()
        if _action_id in ACTION_MOUSE_LEFT_CLICK:
            return executebuiltin(self._context_action) if self._context_action else self.do_action()
           
        if _action_id in ACTION_CONTEXT_MENU:
            return executebuiltin(self._context_action) if self._context_action else self.do_action()
        if _action_id in ACTION_SELECT:
            return self.do_action()

There is also another issue where the collection sort order is reversed, but that is trivial fix of "asc" to "desc" in another file which I'll post later if anyone care to know how to change it since this is hard coded (and shouldn't be).

Greetz,
Chris
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embuary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 10% TV Shows: 0% Music: 0%
Reply
#3
Annnnnnnnnnd he just fucked my code doing an update 2 hours ago.... doesn't warn, just updates. WTF.
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embuary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 10% TV Shows: 0% Music: 0%
Reply
#4
Why do you think developers are reading the forums before they do an update? Make a PR in https://github.com/jurialmunkey/plugin.v...edb.helper if you want to see something changed.
Reply
#5
(2024-07-27, 13:10)Neo1973 Wrote: Why do you think developers are reading the forums before they do an update? Make a PR in https://github.com/jurialmunkey/plugin.v...edb.helper if you want to see something changed.

Mistake on my part.
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embuary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 10% TV Shows: 0% Music: 0%
Reply

Logout Mark Read Team Forum Stats Members Help
plugin.video.themoviedb.helper mouse buttons are swapped using recommended method0