Navy commander loses carrier job over lewd videos