Sorry if this has been answered, but I can't find it anywhere.
I downloaded a bunch of music on my Nexus 5 at work, with the hopes that my computer would see what I downloaded and download the same music, keeping my libraries consistent. Spotify definitely used to do this, as my computer still has the first round of what synced, without any interaction from me (that I can remember).
I now have over a thousand songs on my phone that I would like on my computer, and so far the only solution seems to be to add each song to a playlist and sync the playlist.
Make sure that you are on the same WiFi network and Windows & third party firewalls are configured to allow the Spotify connection through.
Another point to note is that sometimes if a track is stored locally & is also available to stream then when you sync to your device it will automatically use the Spotify streaming version but the data from your playlist. If for some reason the metadata such as track length differs this can cause conflict and break the track. In this instance you are best off removing the local file from your playlist on the desktop and adding the track from the Spotify server then re-sync. This should fix this issue.
Please use the search feature before posting a problem/bug/idea. What's a Spotify Rock Star, and how do I become one? Using Spotify Since March 10th 2009 Twitter: @mechanimal82