public function searchMediaAction(Request $request)
    {
        $response = $this->getFilter($request);
        if ($response['success'] === false) {
            return $response['value'];
        }
        $filter = $response['crypted'];

        $mm = $this->getMediaManager();

        $q = ($request->query->has('q')) ? $request->query->get('q') : null;
        $type = ($request->query->has('type')) ? $request->query->get('type') : null;

        $medias = $mm->search($filter, $q, $type);

        return $this->createResponse($medias);
    }