def import_collectionmembership(self, record): # Don't add non-masters to collections: if record.itemUUID != getMasterAlias(record.itemUUID): return # Don't import Sidebar membership yet if record.collectionID == '@sidebar': return collection = eim.collection_for_name(record.collectionID) collection.add(eim.item_for_uuid(record.itemUUID))
def getItemForAlias(self, alias): if str(alias).startswith("@"): # a well-known-name return super(SharingTranslator, self).getItemForAlias(alias) uuid, recurrence_id = splitUUID(alias) if not recurrence_id: return super(SharingTranslator, self).getItemForAlias(alias) # a modification master = eim.item_for_uuid(uuid) return Recurrence(master).get_occurrence(recurrence_id)