With only hours to spare ahead of a potential blackout, the YES Network and Comcast have agreed to new terms.