Recently my Apple TV (160GB version) has stopped syncing with my copy of iTunes.

Previously it synced fine and when ever I lunched iTunes it would show up under my devices. But now it behaves rather strangely. Every now and again my Apple TV shows up in iTunes (E.g. every few days for about 2 minutes when previously it was always there) and when I try and press the sync button it says it is syncing but nothing ever syncs.

Does anyone know what the problem might be?

Both my MacBook and Apple TV are connected wirelessly to an Apple AirPort Extreme (both are within range and show up as connected to the base station).

I have checked and I have iTunes music sharing allowed on my MacBook.

Any help on getting this fixed would be really useful.

EDIT: I also just noticed that my Apple TV no longer connects to You Tube. Although in AirPort utility it says my Apple TV is connected to the base station (signal = -79, Noise = -92, Rate = 1) and my Apple TV says it's connected to the network.