  We study the inverse spectral problem for the Schr\"odinger operator $H$ on
the two-dimensional torus with even magnetic field $B(x)$ and even electric
potential $V(x)$. V.Guillemin [11] proved that the spectrum of $H$ determines
$B(x)$ and $V(x)$. A simple proof of Guillemin's results was given by the
authors in [3]. In the present paper we consider gauge equivalent classes of
magnetic potentials and give conditions which imply that the gauge equivalence
class and the spectrum of $H$ determine the magnetic field and the electric
potential. We also show that generically the spectrum and the magnetic field
determine the "extended" gauge equivalence class of the magnetic potential. The
proof is a modification of the proof in [3] with some corrections and
clarifications.
