Project

General

Profile

Actions

Feature #312

closed

System.HasAddon() boolean condition

Added by dandar3 over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Other (un-categorized)
Target version:
Start date:
26/07/2014
Due date:
% Done:

100%

Resolution:
fixed

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

test_hasaddon.py (395 Bytes) test_hasaddon.py dandar3, 26/07/2014 05:58 PM
System.HasAddon.patch (3.79 KB) System.HasAddon.patch dandar3, 18/08/2014 08:38 PM
Actions #1

Updated by dandar3 over 9 years ago

  • File System.HasAddon.patch added
  • File System.HasAddon.patch added
Actions #2

Updated by dandar3 over 9 years ago

  • File deleted (System.HasAddon.patch)
Actions #3

Updated by dandar3 over 9 years ago

Actions #4

Updated by dandar3 over 9 years ago

  • File deleted (test_hasaddon.py)
Actions #5

Updated by buzz over 9 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.

Actions #6

Updated by dandar3 over 9 years ago

Understood. Updated patch attached.

Actions #7

Updated by dandar3 over 9 years ago

  • File deleted (System.HasAddon.patch)
Actions #8

Updated by buzz over 9 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.

Actions

Also available in: Atom PDF