Replies: 10 comments
-
Capturing some notes on possible implementation:
|
Beta Was this translation helpful? Give feedback.
-
Opened enhancement issue #21 for the above. |
Beta Was this translation helpful? Give feedback.
-
Should be possible with v1.22 |
Beta Was this translation helpful? Give feedback.
-
Expanding on the above, whatever script the user actually invokes (e.g., kodi_panel_fb.py) has the ability, prior to invoking New entries can be added to either dictionary, existing entries can be modified (pointing to a user-specific function), and existing entries can be deleted. The user's setup.toml file can specify layout elements / fields that make use of those new "special treatments" by using the same string as gets specified for the dictionary entries. |
Beta Was this translation helpful? Give feedback.
-
To be sure to understand: If I modify in my define a function in my
And then add it to the I could then invoke a vcodec field in any of my layouts? Alternatively I could use any heuristic with screen_mode and/or layout_name to change the returned value |
Beta Was this translation helpful? Give feedback.
-
Yes, that's the idea. Your syntax for adding the new entry to the The only other caveat regards the
That somewhat lengthy statement can be shortened, I believe, if one changes the
The
Python documentation on import is available online: https://docs.python.org/3/reference/simple_stmts.html#import Similar namespace-qualification is likely needed anywhere you need to refer to global variables or types that are defined within the kodi_panel_display.py file. I think that's really the primary hurdle for augmenting kodi_panel functionality via "external" code. (Python also has an |
Beta Was this translation helpful? Give feedback.
-
Very clear on that, I think I will create a new branch on my fork that will just copy kodi_panel_display.py from your master and make all my special treatment in the starting script. One other though, would it not be better to move the |
Beta Was this translation helpful? Give feedback.
-
If the table / dictionary resided in the startup script, then code within kodi_panel_display.py wouldn't have any access to it. (As kodi_panel_display is what gets imported, it doesn't get to "know" the name of the importing module.) Giving |
Beta Was this translation helpful? Give feedback.
-
The to-be-released v1.30 permits the |
Beta Was this translation helpful? Give feedback.
-
I confirm every thing work I have added a lookup for video codec as mentionned: see the commit in my fork nico1080@0ec9fda And also a lookup for channel number that will send back |
Beta Was this translation helpful? Give feedback.
-
The kodi_panel_display.py script contain various "special treatment" eg: artist, codec, acodec, full_codec etc
In My case I have changed some of them to get different behaviour (eg: different concatenation on full_codec)
Having a separate user file to define theses treatment will allow to update main script without loosing the treatments.
Beta Was this translation helpful? Give feedback.
All reactions