Reindexing Media Center Library

So after building my new file server (yes, I know I’ve been promising you a blog entry on that), I had to remap my Vista Media Center to look for videos in a different location. However, for some reason, deleting existing “watched folders” was problematic for Media Center. It would leave random folders inside “My Videos” and other areas, which was annoying. I had unlinked my music share because I didn’t really listen to music on my media center, but none of the music would disappear from “My Music”.

When I open “My Videos”, I would see Local Disk (C:) and \\KrunkFS\Public because I used to have C:\Public\Unwatched and \\KrunkFS\Public\Music linked.

I tried searching the web, but I’ve found people hitting this problem, but never a solution. However, I have on advantage that others don’t, I work at Microsoft. Sending a email to the Media Center team was a simple as locating what their distribution list alias is.

My email:

I was wondering if there’s a way to reset the Windows Vista Media Center library. This past weekend, I moved some folders around and removed it from the watched folders list. However, remnants of the previously watched folders still exist. What’s funkier is that now Local Disk (C:) is being shown in “My Videos” when C:\Public\Videos was removed from my library setup.

Another example would be the music I was storing in \\server\Public\Music which was mapped to Z:\. Removing that folder from the watch list now brings up a \\server\Public in “My Videos”.

I tried rebooting or leaving Media Center on for a couple hours hoping it’ll clear the cache, but that didn’t work.

I wasn’t able to find anything remotely sounding to what I wanted in the settings/tasks area.

I was wondering if there’s something I’m missing or if there’s another way to force it to reset or completely reindex the library.

Thanks in advance.

It turns out that Media Center and WMP11 (Windows Media Player) share the same library and if I had searched for how to fix library problems in WMP11, I would’ve found the solution.

Someone pointed me to this KB article: You cannot view, add, or delete items in the library in Windows Media Player 11, which gives directions on how to reset the library. It mentions that the library has entered a corrupted state and you’ll probably have to delete the entire library.

I had no problem with doing that as I just wanted to reset the library completely and do a re-index.

The instructions are:

  1. Exit Windows Media Player.
  2. For Windows XP:
    Click Start, click Run, type %userprofile%\Local Settings\Application Data\Microsoft\Media Player, and then click OK.
    For Windows Vista:
    Click Start, click Run, type %LOCALAPPDATA%\Microsoft\Media Player, and then click OK.
  3. Select all the files in the folder, and then click Delete on the File menu.
    Note You do not have to delete the folders that are in this folder.
  4. Restart Windows Media Player.
    Note Windows Media Player automatically rebuilds the database.

After deleting all the files, Media Center’s library was completely reset. I readded the folders I wanted and everything has worked fine since.

43 Replies to “Reindexing Media Center Library”

  1. Or had you gone into WMP11 you could actually remove items from the library. MC allows you to add items to the watch list, and remove them from the watch list (so it’ll stop scanning them), but anything it already saw it continues to see.

  2. I had gone into WMP11, but I wasn’t able to find a way remove folders. Basically, after I removed “C:\Public\Unwatched” and “\\KrunkFS\Public\Videos”, 2 new folders were introduced into my index: “Local Disk (C:)” and “\\KrunkFS\Public” and I wasn’t able to remove them at all.

    I understood that I could remove the music items like you said, but even after that, the folders didn’t go away.

  3. So perhaps you can e-mail them again and ask how you can reset ALL settings for Vista MCE? I’ve got a small computer connected to my TV that I use to watch .avi videos. It used to play perfectly but then I got the (genius) idea to also set up the tv tuner card. Ever since then we can’t even watch .avi videos because they stutter too badly.

    I also set up a tv tuner card on my laptop in Vista MCE (including the guide) and ever since the the laptop has been acting odd. I’d like a way to nuke all the settings in MCE completely but can’t find any method to do it.

  4. Its is doing the reindexing after deleteting the files as I type this.
    The different directories with albums show up in the window. The one thing I don’t understand is the mess of the pictures. I have spent many hours adding the right cover inside all of my MP3’s and also have a folder.jpg with the cover in each album’s directory. And in the window I see 60% of the albums images with a totally wrong cover. Any idea?

  5. Thanks so much for your help. I ended up with duplicate entries for every song in the library, and this allowed me to clear that right up.

    Thanks!

  6. Thank you for this. I was tearing my hair out after I spent 5 hours cleaning up my music folders only to find out that VMC was still showing the old cache.

  7. I am dying here. I have tried everything I can think of to DELETE the Windows Media Center Library. It is full of duplicate DVD titles. I have deleted the entire directory under C:\Users\G1\AppData\Local\Microsoft\Media Player but WMC just rebuilds it, and the duplicates are still there. I can’t use Media Player to delete the duplicates, because it does not index the ripped DVD files. If I am deleting everything under the directory above, then WHERE is it getting this library data from? I am going insane. BTW, http://support.microsoft.com/kb/940161 explains why I can never delete some of the watched folders. But, as it stands now, it is not watching any folder twice. So, the duplicates must be from a time when it was. That is why I am trying to find out how to delete the library. Anyone have any ideas?

  8. Are you using any external tools/plugins like MyMovies?

    How about moving your DVD rips to a different folder, delete the library meta data and rescan?

  9. No, I have tried some of the plugins and found them to be more trouble than they are worth. The data for the DVDs was about 50% inaccurate, and I didn’t have the patience to correct all of them. I can try moving the titles, but the thing that is throwing me is that whenever I delete the library and then open media center, the titles are all immediately there. So, this is leading me to believe that there must be another file somewhere. I don’t see how it could rebuild the list instantly like that.

  10. Well, that could be the case, but I wouldn’t know where it would be.

    Moving the files to a different directory would force it to hopefully delete the old stale entries since it no longer exists.

  11. Finally a blog that describes the same problem I have. In my case D:\ is showing up in VMC under Picture Library and Video Library. I followed the steps as outlined above, but unfortuantely for some reason I cannot delete the following file: CurrentDatabase_360.wmdb This file is approx 70mb and I noticed this file gets updated everytime you close VMC. Anyone any ideas why I cannot delete it and complete all the steps above. Thanks.

  12. Just figured that some other windows media player applications are still running in the background, such as wmp network sharing. Did end the process in task manager. The steps above worked afterwards, could delete the CurrentDatabase file. Awesome! Crunk4Ever!

  13. I have found this ‘fix’ before and tried it quite a few times but while it refreshes the index it still does not find and index all of the music files. Sometimes it leaves out whole albums other times it just leaves songs out of an album, picking up some and not others.

    ANy hints would be appreciated as it is painful going direct to the folders to find songs to play because media player will not pick them up

  14. I am having a similar issue…but repairing the libray in WMP does not seem to correct the problem in Media Center. I also have a netwok server for audio/video media.

    I had to send my 360 off to Microsoft for repair, and thought that it would be a good time re-organize my music collection. I went thru thru my music and changed the ID3 tags to reflect the title/artist/album artist that I wanted WMP to sort by…and upon getting my 360 back, I set-up ‘watched’ folders in WMC. I then had WMC grab all the music.

    After locating & loading all the music files in the WMC library…I set-up the ‘watched’ folders in Media Center on my 360. After discovering the music files, the number of artists/songs in WMP appeared differently than they had in Media Player. I went through WMP and made a few more adjustments to songs that still appeared (in WMP) with inaccurate artist/album info – mostly spelling corrections. The WMP library would not manually change the info – but i found that playing the track would force the updates to work. What this caused though, is Media Center to discover the new listings as additional tracks.

    I am hoping that the changes in WMP will eventually sync itself with Media Center – but it is certainly not something that happens quickly…I had Media Center up & running for the entire day and have seen very few changes to the Media Center file structure…and NO change to the overall number of tracks that are showing available in Media Center.

    Another interesting finding… When I set-up WMP on my wife’s computer. It’s WMP is setup to mirror my ‘watched’ network folders – it found a different number of tracks than were found & loaded into my WMP library (again, watching the exact same folders).

    – One interesting thing I found:Media Player and Media Center both sort their libraries by the ID3 Tag info. You can see this data by clicking on the ‘details’ tab within the properties of the music file. I found that many tracks were gettign mis-categorized due to the ‘title’ on the ID3 details being different than the file name. Additionally, if teh artist/album artist info is incorrect and/or missing from teh ID3 – if can be overlooked by both WMP and WMC.

    Hope this helps – and thanks for the info.
    Jumpman

  15. Thanks Jumperman – will try checking id3 tags on all my missing media files next weekend.

    In the mean time. Do you know if there are any illegal “symbols” or characters like “: ; – /” or that would make MCE miss the files autmatically?

    Best regards and thank you all for much of the info I have also been looking for…

  16. Seriously, I have had most of the problems listed above. It’s playing a Mariah Carey song right now that is not in the folder I picked to play and as far as I know, doesn’t even exist on my computer!

    How about Microsoft just fixes it? Can you pull some strings?

    I have never owned a Mac/Apple but am forced to iTunes.

    The programming involved with looking up directories and indexing their entries is pretty straight-forward, since MC and WMP share WMP’s database that should make it even more straight forward.

    Frankly, this is just crap. It better be fixed in Win 7

  17. I have tried everything that that was said above. I deleted all the files in %LOCALAPPDATA…\Media Player. I tried stopping the processes. Tried deleting all files again. When I open Media Center and go to Stop Watching Folders, all the folders are still there. I clear all the check marks and go back in and they are still there. Does anyone have any other ideas?

  18. Having tried everything mentioned above….

    I had a dir [C:\TV Time\Deletable\A TV SHOW\Season 1], and Media Center would NOT delete the file from Media Center. I would delete it from the hard drive. And Media Center WOULD STILL PLAY IT. So, I move the dir (Season 1) to (Deletable) [C:\TV Time\Deletable\Season 1]. Media Center had to rebuild the database. Dare I move it back! Yea right! Soon as I have 10 free hours to fix another Microsoft glich.

    Doesn’t anyone at Microsoft actually USE Windows?

    “I will put up with all the errors, lock-ups, crashes, and other things your crack head, third world programmers can’t seem to correct. But aren’t you ashamed, that 14 year old Russian girls can program better than your people?” – Cat Springs

  19. Although my problem seems the same or similar, your instructions don’t fix the problem — can anyone help?
    My “Recorded TV” content does not show up in WMC but it is visible in WMP. If I follow your instructions, I see WMP correctly rebuilds the lib but it still does not show up in WMC — it just says “can’t find lib or there’s no content”. Other libs are fine, it’s just the Recorded TV that doesn’t work.
    Frustratingly, there is one folder that WMC will not let me uncheck for Recorded TV. It’s the same folder that contains the files it can’t find.
    I was really happy with WMC until this. I even bought another xbox to work as an extender. Now all the shows have disappeared and I’ve spent hours & hours trying to figure this out.
    Any help gratefully received.

  20. This is now the second time I have had to do this – thanks so much for the help. You must have saved hundreds of people many hours of frustration.

  21. Great article, thanks a ton! Tell your friends in the Media group to add a refresh library button or something. 😉

  22. Windows Media Center finds all of my Video Content as it should. Windows Media Player does not and doesn’t see new folders with video content, even though those folders are visible by Media Center. Since W7MP shares the database with WMC, how come W7MP cannot see content in newly added folders?

    1. It’s very likely your library could be corrupted or just out of sync. Your best bet would be to reset the library and see if it the problem still occurs.

      1. I’ve tried that and much more, including reinstalling WMC and WMP. The Libraries are working fine in Media Center, but they don’t work right in Media Player. Can you explain that? They share the same database, don’t they?

  23. Guys, I know this problem has existed forever….and I think I have found the underlying issue (and hence solution). Perhaps it has already been said somewhere but here goes.
    I have had all the above problems on a Vista Home Premium 64bit HP PC….could not resolve this unwatch folder pain in the arse…

    Turns out that the Registry stores all the paths that you watch and VMC refers to this setting when it launches….so to stop the folder watching go to….
    Start>Run>Regedit
    Click on….
    HKEY_CURRENT_USER>Software>Microsoft>Windows>CurrentVersion>Media Center>MediaFolders>Movies
    This is where you will find Folder0, Folder1, etc based on the number of watched folders you have….you will see in the far right column the file paths that you are trying to “unwatch”
    If you only want to watch 1 movie directory then delete all the (Folder1 and on) folders, then right click Folder0 and select Modify…in the Folder Data field, type the path of your movies and click OK. (All my Movies are on a single 3TB drive labelled E so my value was “E:\”
    Now, right click on FolderCount, it should be the last entry after the FolderX items….and select Modify…change the Value Data number to the number of Folders you have….this is crucial to match to the number of folders bcuz if you forget (like me) you will crash VMC…
    Close out of RegEdit and launch Media Center, click on DVD library and it should only be the folders you want…
    Hope this helps someone avoid going nuts.
    Darren

  24. Thank you, Darren. I had the prob with Media Centre on W7U, went through your process, although nothing needed changing, reopened Media Centre and the problem was solved! Genius.

  25. This is very good information — unfortunately, it doesn’t seem to apply to a WHS 2011 system that is setup as a media server. Which %LOCALAPPDATA% user needs to be rebuilt?

    In addition to using this machine as a media and file server and backup machine, I’ve also “shanghai’d” it into acting as an app server. I’ve got several user logins and each one can be used to run applications (using RDP, the machine is headless). So it begs the question as to which user? I tried administrator, but refreshing that WMP library didn’t fix the problems I’m seeing with a corrupted WMC library.

    Can you ask your internal contacts how to refresh the WMC library on a WHS 2011 machine?

  26. Discovered a few more tidbits… The appropriate user, I believe, is “MediaStreamingAdmin” — but I can’t delete the files in the directory you advise because they are “in use” by some process. When I try to kill the only process owned by “MediaStreamingAdmin” (which is called “MediaStreamingProvider.exe”) it immediately restarts, so I can’t get rid of the files (I’m assuming this is the owner of the resources that is causing my attempts to delete to fail).

    There’s also a registry key named “MediaLibraryCreateNewDatabase” that I thought might allow me to force a rebuild, but I can’t modify that, either! I’m doing all of this logged in as Administrator on the machine, to no avail…

    Please contact the internal Media Center folks who put together the bits for WHS 2011 for a few clues, this has been very frustrating trying to get the corrupted database fixed.

    Thanks in advance…

    1. Sorry, but I left Microsoft awhile back and haven’t really played with WHS 2011 enough to be able to help you. But a pointer that may help you:

      The executable you’re trying to kill may be a service and that’s why it’s auto restarting. If you go into Services (services.msc), try to find it there and see if you can stop it.

      Best of luck!

      1. Thanks for the suggestion. I recently had to rebuild my WHS 2011 machine because the boot partition failed (on a RAID drive — what luck!).

        In the process of rebuilding the machine I’ve found that the fundamental problem I was having with the media library not getting updated properly has to do with getting the Media Center software to recognize additions/deletions to the various media library folders. It turns out that since WHS is normally configured as a file server, it only watches for changes to network shares — meaning it does not watch for file additions/deletions on the internal drives (e.g., D:\ServerFolders\*), rather only to the network file access events (e.g., \\whs-server\music\*).

        So, if you’ve reconfigured the WHS machine to allow using it as an app server as well as a file server, as I have, and you are logged into the machine as a local user, the simplest way to get the machine to recognized additions/deletions to the media directories is to copy those files to the UNC share, not to the internal drive. In other words, if I have an MP3 that I wish to add to the music library, rather than copying it to D:\ServerFolders\Music\Artist\Album\song.mp3 you need to copy it to \\whs-server\Music\Artist\Album\song.mp3 (where “whs-server” is the network hostname of your WHS 2011 machine). It’s a round-a-bout way to get copy files into media directories, especially if all you’re doing is moving them around on the server or updating/modifying them on the server, but it does work.

        Once you get that down things work great! You may still have to kill the MediaStreamingProvider.exe service occassionally to effect a larger update, but for small stuff this works.

        The alternative approach is to simply kill the MediaStreamingProvider.exe service permanently and configure Windows Media Player under one of the users to stream media, as you would on any standard Windows machine. This makes it easier to manage the library and update tags, etc.

  27. Unfortunately, none of this worked for me. Windows 7.
    Also, how do i get WMC to recognize my movies in “Folders” as opposed to only in “Date Taken”??

  28. After spending hours and almost throwing pc trough the window, I found this page… Thank you very much!!! Everything works now!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.