I’ve been compiling my own builds of Media Browser ever since a repository was made available to me. For the majority of that time, the majority of the issues I had to contend with dealt with the expected bugs of untested code. However, many months ago, the caching system was introduced in order to speed up the loading of our libraries. This was a very welcomed edition as it tremendously sped up the loading of my collection, which consists of somewhere over 10,000 individual movie files (not to mention the image and metadata files that accompany them). What this introduced was a new issue, unfortunately. It doesn’t happen that often, but when it does, it can make upgrading a nightmare when you depend on the watched status that is one of Media Browser’s media management features.
Every once in a while, a change to the underlying code renders all, or most, cached items no longer valid. This usually is a result in the hashes that are calculated due to a new way cache is handled or, I can only assume, when a tracked value is added or modified. This normally does not affect playstate and/or the display preferences of the cache, but if you’re like me and use the fairly new SQLite caching functionality, it can be disastrous. No longer can you just delete the contents of your ImageCache, children, items and providerdata folders – you have a single little cache.db file that secretly holds all of this information. When those contents become invalidated, you can end up with some real funky results when running Media Browser again.
So, what can we do about this? Live with it? Wait until a new system is put into place that protects our precious cache? Well, those were not answers for me and with the latest build (edits made 4/19), my watched status was lost for, hopefully, the last time. I am going to show you what to do so that you too can save your watched status and display preferences even after your cache has become invalidated while using the experimental SQLite functionality!
I will outline this step-by-step:
- Close Media Center and backup your cache.db file, located in C:\Programdata\MediaBrowser\Cache, to a safe location. A simple copy and paste to your safe location will do.
- Browse into your C:\Programdata\MediaBrowser\ImageCache directory and delete everything. More than likely, the majority of your ImageCache has become invalidated also, so there’s no sense in keeping it. Depending on the size of your collection, this could be over a GB of space saved. CTRL+A then Delete will make quick work of it.
- Download SQLite Administrator from here. Provided for free by Orbmu2k. It will be a zip file without an installer, so just extract wherever you can easily get to it.
- Run the SQLite Administrator application.
- Click the Database menu item and choose Open. Browser to C:\Programdata\MediaBrowser\Cache and choose to Open the cache.db file.
- All available Tables and whatnot will be displayed in the left-hand window of the application.
- We want to completely drop the tables that have become invalidated so that they will get repopulated with valid data.
- Right-click on the children table and choose Delete Table. Repeat for:
- You will notice that entries under Indexes will also disappear – this is normal.
- You should now have only two Tables – display_prefs and play_states. There will also be additional “folders”, but we won’t concern ourselves with those.
- You can now click on Database and choose Exit to close the application. You’re done!
- Open Media Center, start up Media Browser and let it start repopulating your cache!
Please keep in mind, this is not a fix. This merely provides a way for you to retain the coveted watched status and also your display preferences. All of your images and metadata will need to be fetched (whether by local or Internet sources), so it may take a while for it to complete.