WIP Context Item Addons - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +--- Thread: WIP Context Item Addons (/showthread.php?tid=144770) |
Re: Context Item Addons - Martijn - 2013-04-11 Sure you can help :) Devs will be able to give you some pointers on where to start. RE: Context Item Addons - cosmicr - 2013-04-11 I've always wanted to add the functionality to copy a local version of the file to be played before playing it, then delete afterwards (for those of us with slow networks). This would be perfect for that. RE: Context Item Addons - Robotica - 2013-09-05 Yes this would nicely integrate addons, via settings, in skins without needed work for skinners RE: Context Item Addons - Robotica - 2013-09-06 Also, I made a post once about the picture section, including the context menu. Maybe thuis brings soms inspiration as well. I think uniforming the picture setting the way audio and video works, would bring a better and more consistent user experience. RE: Context Item Addons - Fice - 2013-10-05 Hi, just wanted to let you guys know, that I've just rebased my PR (have removed "addon.hasSetting()" visibility expression for now. will add that one again later). I haven't pushed yet, as the commits are a real mess, will have to clean this up a bit. Right now I'm working on the ContextMenuManager so he knows when an item has been disabled/enabled/updated/installed/uninstalled Done. I also started some work, so context items can be added to the new "manage" submenu (basically working, not extensively tested though). Done I was also thinking about letting python developers group their items into their own submenus. Done E.g. contextual facebook, google+, twitter addons could go into one "Socialise" submenu. Also cleaned up and pushed Is there anything else you guys want me to do in order to get this one ready? RE: Context Item Addons - ruuk - 2014-10-04 (2012-11-10, 15:26)Fice Wrote: b) Keep asynchron but supply the context item addon with the list item. This is just an idea, which only makes sense if there is no more straightforward way to do it, but perhaps we could serialize the listitem and then add something like xbmc.deserializeListItem() for the addon to use. Of course I don't know how hard it would be to serialize a ListItem or if there are any limits on the string size passed to addons. Thanks for your work on this so far. Hopefully we can get this in eventually RE: Context Item Addons - Karnagious - 2014-10-05 I have recently tried to serialise a listitem using pickle to pass it between the addon and services processes of my addon. But an error occurs with the Label method in the listitem class; traceback says pickles problem is that it should be a string or unicode. RE: Context Item Addons - Karnagious - 2014-10-05 P.S. As I couldnt pickle the instances of ListItem, I have changed them to a generic class and am trying to add xbmcgui.ListItem to each instances __bases__. But you can only do that with classes, and type(xbmcgui.ListItem) returns 'type'. What am I missing here? RE: Context Item Addons - Fice - 2014-10-06 I just had a look at how i did it from the c++ side: Code: XBMCAddon::xbmcgui::ListItem* arg = new XBMCAddon::xbmcgui::ListItem(item); My pr is rather outdated, perhabs sth. broke listitem serialized in curent master. Perhabs it's best you create a new thread with your question? RE: Context Item Addons - takoi - 2014-10-07 Going back on topic: what happened to this project Fice? It was a really good idea. RE: Context Item Addons - Fice - 2014-10-07 little free time and it somewhat got lost Everytime I could have worked on it, kodi was on feature freeze (no sense in rebasing then). Other thant that it just needs to be reviewed. I promise I will ping on my PR the moment helix is out the door. RE: Context Item Addons - takoi - 2014-10-15 Just tested this yesterday after you rebased.. and it's awesome! I need this in my life. Maybe it will event make it into kodi. The "freeze" part in "feature freeze" seems to be extremely relaxed at the moment lol. RE: Context Item Addons - jjd-uk - 2014-10-15 (2014-10-15, 13:00)takoi Wrote: The "freeze" part in "feature freeze" seems to be extremely relaxed at the moment lol. It all depends on what you define as a fix RE: Context Item Addons - Fice - 2014-10-15 It has the helix tag, that gives hope Here are some test-builds if someone else want's to try it: (test Context Item addons are included (not that they do anything useful, but you can have a look in the addons.xml as examples) If you want access to the listitem in you addon, it is in sys.item (already changed in my pr to sys.listitem but the builds are from before) OSX: OSX x86_64 OSX i386 Win: Unfortunately failed Android: Android x86 Android arm iOS atv2 Btw: Is there a chance you're interested in a "Queue after current" context item? the one feature I really miss from winamp times RE: Context Item Addons - MassIV - 2014-10-15 StringCompare(info,string) For like a bool provided by addon. When you have two context items you can make one visible and one hidden while the context menu is open. Code: StringCompare(Window(Home).Property(key),true) Quote:Returns true if the info equals the string. Please note that string can also be a $LOCALIZE[] or info label (without $INFO prefix). And that in a panelview or similar this only works on the focused item. Both arguments are evaluated on the fly, unlike substring. SubString(info,string) Anywhere in string Code: SubString(listitem.path,login=true) Ends with. Code: SubString(listitem.path,avi,right) Is not + starts with Code: !SubString(listitem.path,https,left) Quote:Returns true if the string is found anywhere in the info |