Replies: 4 comments
-
See kodi_panel v1.24. The existing video selection if-elif heuristic was moved to A user's invoking script can override that variable like so: kodi_panel_display.VIDEO_SELECT_FUNC = my_selection_func The function is passed the dictionary of InfoLabels retrieved from Kodi. (Note that Python provides a mechanism to permit for shorter namespace references. Look for "import as" documentation. Shortening the name for kodi_panel_display would permit for less verbose override assignments.) I think the full customization that is now possible for the selection function addresses this idea. |
Beta Was this translation helpful? Give feedback.
-
I am not sur to understand how this work. When I suggested this feature, I thought that the I also see you added autoselection for audio section. Does it benefit the same feature? |
Beta Was this translation helpful? Give feedback.
-
The override would in the script that contains the call to
The above are the scripts that a user directly invokes, so that is where execution first starts. If you examine the current kodi_panel_fb.py, you will see this section of code prior to the
Those last two assignment statements serve as overrides for the default A similar approach is what's intended for a heuristic function override. I think the only "tricky part" is that references to the enumerated class may have to be qualified with the relevant namespace. That is, an assignment to
Other than that, since the dictionary of InfoLabels gets passed in, I think the if-elif tree would look similar to what's in the default function.
It should behave identically, and also permit for user customization of the heuristic function. The default selection function on the audio side is just empty (it returns the current |
Beta Was this translation helpful? Give feedback.
-
Ok, I think got it, I will try it this weekend. I have to write in my
|
Beta Was this translation helpful? Give feedback.
-
Kodi also have a section for video addon and musicvideo.
Currently the autoselect feature will not detect these kodi section.
Video addon detection should work with
info["Player.Filenameandpath"].startswith("plugin://")
musicvideo detection with
VideoPlayer.Artist
infolabel but I do not use it so I can’t check it.I do not think there is mor kodi section for video
Beta Was this translation helpful? Give feedback.
All reactions