I'm on vacation and took a couple of SD-cards with me to have enough space for pics and vids.
So when I wanted to make a long video I unmounted my "normal" sdcard inserted a new one and recorded.
Later I wanted to listen to some music and re-inserted the original sd-card. But the Android Spotify App did no longer show all my downloaded playlists as downloaded an had switched to device storage. The folder on my external SD /storage/6735-6531/Android/data/com.spotify.music still was roughly 5GB in size so I assumed the music was still there. So I switched the storage in the app back to external SD. Instead of reloading the files from storage the app deleted almost all file, the folder is now roughly 40MB.
Is this normal/expected? and if so, is there a way to circumvent it next time once I downloaded all my songs again at the next WiFi. 😉
It seems to be a "design feature" that removing your SD card will unlink the cache and your downloaded music becomes unavailable. The only solution is to redownload everything after deleting the folder android>data>com.spotify.music on the SD card.
I haven't tried but it may be possible to prevent this happening by force stopping spotify before ejecting the SD card containing the cache and not launching spotify until the SD card has been reinserted.