Пример #1
0
    def __call__(self, abctext, uuid, makeMP3):
        # need to remove 'view' at the end if present
        abctune = uuidToObject(uuid)
        sm = getSecurityManager()
        if not sm.checkPermission(ModifyPortalContent, abctune):
            return
        abctune.abc = abctext
        addTuneType(abctune)
        addOrigins(abctune)
        addKeys(abctune)
        _make_midi(abctune)
        _make_score(abctune)

        # _make_PDFscore(abctune)
        if makeMP3 != '0':
            _make_mp3(abctune)
            logger.info('lance _make_mp3')
        # import pdb;pdb.set_trace()
        abctune.modification_date = DateTime()
        logger.info(abctune.modified())
        logger.info('"' + abctune.title + '" updated')
        parent = abctune.aq_parent
        if parent.portal_type == 'abctuneset':
            # logger.info('in updateTune.updateTune')
            updateTuneSet(parent)
        site = getSite()
        catalog = site.portal_catalog
        catalog.reindexObject(abctune)
        return 1
Пример #2
0
def tuneInTuneSetModified(context, event):
    logger.info('(ITuneInTuneSetModified)abctune.tuneInTuneSetModified Event')
    updateTuneSet(context.aq_parent)