There could still be appeals in store for this case, but regardless of the outcome of this case, CDL could still be quite legal (and I think ought to be -- libraries ability to lend out books without publisher permission or license has been a huge gain for society, and I think must be able to continue in the electronic realm; and I think there are good legal arguments for it, on extension of first-sale doctrine to electronic realm and on fair use).
It was not helpful for the case of CDL to have this pretty bad ("uncontrolled digital lending"?) case decided first though, I agree this was not a very strategic move.