Twas the night before Christmas and….
To cut a long story short the PC that runs my Window Media Center (MCE) got switched on and off at the wall twice whilst Christmas tree lights were being put up.
Now the PC is running WIndows 8.1 on modern hardware, so it should have been OK, and mostly was. However I found a problem that MCE was not showing any music, video or pictures in its libraries but the recorded TV library was fine. I suspected the issue was that my media is on an external USB3 RAID unit, so there was a chance that on one of the unintended reboots the drives had not spun up in time and MCE had ‘forgotten’ about the external drive.
So I tried to re-add the missing libraries via MCE > Tasks > Settings > Media Libraries. The wizard ran OK allowing me to select the folders on the external disk, but when I got to the end the final dialog closed virtually instantly. I would normally have expected it to count up all the media files as they were found. Also if I went back into the wizard I could not see the folder I had just added.
A bit of searching on the web told me that MCE shares its libraries with Windows Media Player, and there was a a good chance they were corrupted. In fact running the Windows Media Player trouble-shooter told me as as much. So I deleted the contents of %LOCALAPPDATA%\Microsoft\Media Player folder as suggested. It had no useful effect on the problem. The only change was the final dialog in the wizard did appear to count the media files it found now, taking a few minutes before it closed. But the results of the scan were not saved.
So I switched my focus to Media Player (WMP). I quickly saw this was showing the same problems. If I selected WMP > Organise > Manage libraries no dialog was shown for music, video or pictures. However the dialog did appear for Recorded TV which we know was working in MCE.
Also if I selected WMP > Organise > Options… > Rip Music, there was no rip location set, and you could not set it if you pressed the Change button.
The web quickly showed me I was not alone in this problem, as shown in this post and others on the Microsoft forums. It is worth noting that this thread, and the others, do seem to focus on Windows 7 or Vista. Remember I was on a PC that was a new install of Windows 8 and in place upgraded to 8.1 via the Windows Store, but I don’t think was the issue.
Anyway I tried everything I could find the posts
- Restarted services
- Deleted the WMP databases (again)
- Uninstalled and re-install WMP via the WIndows Control panel > Install Products > Windows feature
- Checked the permissions on folder containing the media
Everything seemed to point to a missing folder. The threads talked about WMP being set to use a Rip folder that it could not find. As my data was on an external RAID this seemed reasonable. However on checking [HKEY_CURRENT_USER\Software\Microsoft\MediaPlayer\Preferences\HME\LastSharedFolders] there were no paths that could not be resolved.
So I decided to have a good look at what was going on under the covers with Sysinternals Procmon, but could see nothing obvious, no missing folders, not registry key calls missed.
In the end the pointer to the actual fix was on page 8 of the thread by Tim de Baets. Turns out the issue was with the media libraries in C:\Users\<your username>\AppData\Roaming\Microsoft\Windows\Libraries. If I tried to a open any of these in Windows Explorer I got an error dialog in the form 'Music-library-ms' is not longer working. So I deleted the Pictures, Music and Video library folders in C:\Users\<your username>\AppData\Roaming\Microsoft\Windows\Libraries, which was not a problem as they were all empty.
When I reloaded WMP I could now open the WMP > Organise > Manage libraries dialogs and re-add the folders on my RAID disk, also I could set the Rip folder.
As these settings were shared with MCE my problem was fixed, ready for a Christmas of recording TV, looking at family photos and playing music.
Whether it was the power outages that caused the problem, I have my doubts, as power cuts have not been an issue in the past. maybe it is some strange permission hangover from the upgrade from Windows 8 > 8.1 I doubt I will ever find out.