'Update movie information inside media[\'doc\'][\'info\']
@param media_id: document id
@param default_title: default title, if empty, use first one or existing one
@param extended: update with extended info (parses more info, actors, images from some info providers)
@return: dict, with media'

def update(self, media_id=None, identifier=None, default_title=None, extended=False):

    if self.shuttingDown():
        return
    lock_key = (('media.get.%s' % media_id) if media_id else identifier)
    self.acquireLock(lock_key)
    media = {}
    try:
        db = get_db()
        if media_id:
            media = db.get('id', media_id)
        else:
            media = db.get('media', ('imdb-%s' % identifier), with_doc=True)['doc']
        info = fireEvent('movie.info', merge=True, extended=extended, identifier=getIdentifier(media))
        try:
            del info['in_wanted']
        except:
            pass
        try:
            del info['in_library']
        except:
            pass
        if ((not info) or (len(info) == 0)):
            log.error('Could    not    update,    no    movie    info    to    work    with:    %s', identifier)
            return False
        media['info'] = info
        titles = info.get('titles', [])
        log.debug('Adding    titles:    %s', titles)
        if (default_title or (media.get('title') == 'UNKNOWN') or (len(media.get('title', '')) == 0)):
            media['title'] = self.getDefaultTitle(info, default_title)
        image_urls = info.get('images', [])
        self.getPoster(media, image_urls)
        db.update(media)
    except:
        log.error('Failed    update    media:    %s', traceback.format_exc())
    self.releaseLock(lock_key)
    return media
