Add max recordings setting (issue #4128)