Another great library is the Instituto Cervantes Biblioteca. In order to receive your card you fill out a quick form and they make a copy of your NIE (you don’t need to be enrolled in their school). You will receive an email letting you know when your card is available for pick-up. This library is great if you are attending school or taking Spanish classes AND they have a large selection of films. It is also a great quiet little hide away where you can use the wifi and is never super crowded.
I hear their spanish classes are great but a bit costly like most classes in Madrid. However, if a class is backed by instituto cervantes then it is supposed to be quality. I just couldn’t vouch for it but their library is great!