Loss of artwork when iTunes folder isn't located
I keep my iTunes folder (and library file) on an external drive connected to my iMac. Recently I used the drive somewhere else and forgot to plug it back into my Mac before I opened up iTunes. On opening, my TV shows were still listed but had no artwork. That's when I realised the drive wasn't plugged in so fine, iTunes didn't get all the data it needed. I quit iTunes, plugged in the drive, and started it again. Same problem. I noticed that the itunes folder path in preferences had automatically created another empty iTunes library at the default internal path, and was no longer searching my external drive. How do I make iTunes just forget whatever happened and open my library like normal from my external drive with all my files and metadata and artwork intact?
Is there a way to prevent iTunes from changing this path or creating a new iTunes library any time my external drive happens to be unplugged? It's just messed with my entire library, for basically no reason.