diff options
author | David Robillard <d@drobilla.net> | 2020-02-17 13:16:24 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-02-17 13:16:24 +0100 |
commit | 221d838fa6140b2799aa54feb7b136b38c2ca0f4 (patch) | |
tree | c58576553c15da67adffb99e090983ea4eda49dd /bindings/python | |
parent | 411a93bd837fcba108a5976be2bec07311e037bc (diff) | |
download | lilv-221d838fa6140b2799aa54feb7b136b38c2ca0f4.tar.gz lilv-221d838fa6140b2799aa54feb7b136b38c2ca0f4.tar.bz2 lilv-221d838fa6140b2799aa54feb7b136b38c2ca0f4.zip |
Support checking if Python objects with URIs are in a Nodes
Diffstat (limited to 'bindings/python')
-rw-r--r-- | bindings/python/lilv.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bindings/python/lilv.py b/bindings/python/lilv.py index 2ba5c43..595ec00 100644 --- a/bindings/python/lilv.py +++ b/bindings/python/lilv.py @@ -1101,6 +1101,9 @@ class Nodes(Collection): c.nodes_free(self.collection) def __contains__(self, value): + if type(value) in [Plugin, PluginClass, UI]: + value = value.get_uri() + return c.nodes_contains(self.collection, value.node) def __len__(self): |