Your result $\cos(\pi\sin\theta)=\cos(\frac{1}{2}π-\pi\cos\theta)$ implies that $\frac{1}{2}π-\pi\cos\theta = 2n\pi \pm \pi\sin\theta$, so $$\cos \theta \pm \sin \theta = \tfrac{1}{2}-2n.$$ The left hand side is $\sqrt{2}\cos(\theta \mp \tfrac{1}{4}\pi)$, so you want to solve $$\cos(\theta \mp \tfrac{1}{4}\pi)=\frac{1}{2\sqrt{2}}.$$ ($n$ must be zero, as all other values of $n$ give values for the cosine outside the range $[-1,1]$.)
Now, if $\cos\alpha = \dfrac{1}{2\sqrt{2}}$, $\cos 2\alpha =-\tfrac{3}{4}$ and $\cos 4 \alpha = \tfrac{1}{8}$, so $$\cos(4\theta \mp \pi)=\tfrac{1}{8},$$ which I think leads to the answer in the textbook.
However, I think the answer in the text book is incorrect. The obvious solution (just find $\theta$) $$\theta =2n\pi \pm \arccos\frac{1}{2\sqrt{2}}\pm \tfrac{1}{4}\pi$$ is the correct one. The problem is that $\cos\alpha = \dfrac{1}{2\sqrt{2}} \implies \cos 4 \alpha = \tfrac{1}{8}$, but the reverse is not true, so the textbook's method introduces spurious roots - in fact, only half of the answers given are actually solutions of the original equation.