Project

General

Profile

Feature #312

System.HasAddon() boolean condition

Added by dandar3 over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Other (un-categorized)
Target version:
Start date:
07/26/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, 07/26/2014 05:58 PM
System.HasAddon.patch (3.79 KB) System.HasAddon.patch dandar3, 08/18/2014 08:38 PM

Associated revisions

Revision 32873 (diff)
Added by buzz about 5 years ago

added: System.HasAddon() boolean condition. Thanks to dan dar3 for the patch. #312

History

#1

Updated by dandar3 over 5 years ago

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

Updated by dandar3 over 5 years ago

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

Updated by dandar3 over 5 years ago

#4

Updated by dandar3 over 5 years ago

  • File deleted (test_hasaddon.py)
#5

Updated by buzz about 5 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.

#6

Updated by dandar3 about 5 years ago

Understood. Updated patch attached.

#7

Updated by dandar3 about 5 years ago

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

Updated by buzz about 5 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.

Also available in: Atom PDF