def modify_portlet_handler(ob, event):
    request = getRequest()
    language = component.getMultiAdapter((ob, request),
                                         name=u'plone_portal_state').language()
    if ob.update_youtube:
        reader = youtube.get_reader(ob.video_url, language)
        if reader:
            reader.read()
            ob.captions = reader.rawcontent
            ob.captions_format = 'transcript'
    def applyUpdate(self, data):
        extra = self.getExtra()

        if extra:
            url = self.context.getRemoteUrl()
            language = self.context.Language()
            reader = youtube.get_reader(url, language)

            if reader:
                reader.read()
                extra.captions = reader.rawcontent
                extra.captions_format = 'transcript'  # force format

            self.request.response.redirect(self.context.absolute_url())

            return True

        return False