Suppose a transparent medium where speed of light is $c/n$, an inertial frame of reference $K$ which is stationary relatively to the medium and an inertial frame of reference $K'$ which is moving with speed $V$ according to $K$ along the $x$ axis. Also suppose that a light beam is travelling through the medium and its frequency measured from $K$ is $f$ and from $K'$ is $f'$ and the angle between the $x$ axis and the bean is $\theta$ and $\theta'$ respectively. If we know $n,f,\theta'$(or $\theta$ or both) and $V$ how can we calculate $f'$?
From a book I have read the transformation was the following:
$$f'~=~\frac{f}{\gamma (1+\beta n\cos\theta')},$$ where $$\gamma~=~\frac{1}{\sqrt{1-\beta^2}},\qquad \text{and}\qquad \beta~=~v/c.$$
I can prove it with momentum-energy Lorentz transformations only if I suppose that light is moving with same speed ($c/n$) both in $K$ and $K'$ which (I think) is wrong according to speed transformation. Does the speed of light when moving through a transparent medium change when observed form a different inertial frame of reference or not?