I'm reading some lecture notes which are an introduction to homotopy theory, and there is a short section on chain complexes, where the difference between a quasi-isomorphism and homotopy equivalence of chain complexes is explained. Then, the following proposition is stated:
Let $f: C_{\bullet} \to D_{\bullet}$ be a quasi-isomorphism of chain complexes. If $D_{\bullet}$ is projective OR $C_{\bullet}$ is injective, then $f$ is also a homotopy equivalence.
I would like to know a reference where a proof of this is given, or at least where this is discussed in a bit more detail. I have checked the textbooks of Weibel and Rotman, but I wasn't able to find anything. I don't know homological algebra too well, so maybe I didn't see a certain proposition or theorem in one of these books that implies this.
For what it's worth, I tried for about 15 minutes to do this by myself, and the only idea I had was to take an isomorphism in homology $h_{n}: H_{n}(D_{\bullet}) \to H_{n}(C_{\bullet})$ inverse to $f_{*}$ and try to find an epimorphism $D_{n} \to H_{n}(D_{\bullet})$ and $C_{n} \to H_{n}(C_{\bullet})$, and then lift the diagram which combines these three morphisms by projectivity of $D_{\bullet}$, finding a $g_{n}$ which would then ideally be an inverse homotopy equivalence to $f$.
Also, since $d:D_{n} \to D_{n-1}$ may not be zero (same for $C$), such an epimorphism might be hard to find, so I thought maybe being able to find a chain complex with differential zero which is homotopy equivalent to $D_{\bullet}$ would help, but that is probably equivalent to solving the problem itself, no?