Feature #312
closedSystem.HasAddon() boolean condition
100%
Description
Feature requested on the forums by Byron to so can add "XBMC Subtitles" to a skin, see:
http://www.xbmc4xbox.org.uk/forum/viewtopic.php?f=15&t=2939&p=23273
System.HasAddon() boolean condition
http://wiki.xbmc.org/index.php?title=List_of_boolean_conditions
Please see attached a patch and a test script, please review.
Implemented was aimed at scripts and obviously we don't have an Addons database yet, so it checks for addon (script) directory on disk. It doesn't read and check the addon.xml in all addon folders (thought might be too expensive, especially if used with a skin), so it just deduces the location from the addon id, e.g. for "script.xbmc.subtitles" it checks "special://xbmc/scripts/xbmc subtitles".
Files
Updated by dandar3 over 10 years ago
- File System.HasAddon.patch added
- File System.HasAddon.patch added
Updated by dandar3 over 10 years ago
- File test_hasaddon.py test_hasaddon.py added
- File test_hasaddon.py added
Updated by buzz over 10 years ago
- Status changed from New to Feedback
- Assignee set to dandar3
please can you supply a patch for this without the cosmetic / and other changes? for example adding additional { } for 1 liner if else. cosmetic changes should be done as separate commits. thanks.
Updated by dandar3 over 10 years ago
- File System.HasAddon.patch System.HasAddon.patch added
- Assignee changed from dandar3 to buzz
Understood. Updated patch attached.
Updated by buzz over 10 years ago
- Category set to Other (un-categorized)
- Status changed from Feedback to Closed
- Target version changed from Future / Pending to 3.5
- % Done changed from 0 to 100
- Resolution set to fixed
added in r32873 with minor changes (2 lines of tabs -> spaces and addition of copyright header). many thanks.