INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Clear Library Database without losing custom views & settings?  (Read 705 times)

amargolis

  • Junior Woodchuck
  • **
  • Posts: 61

I do a lot of importing different contents into the same library "template." This blank library template, when backed up, is 33MB, even though I back it up from a state with no files imported. And, when doing auto-import, Media Center checks for changes against 600k+ songs, even though I have not yet imported any songs into this instance of the library.

Is there a way to complete clear out the library database without losing all the custom views and settings I have created? I have a LOT of customization that I have integrated and tweaked over the years...

Thanks in advance!
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Clear Library Database without losing custom views & settings?
« Reply #1 on: June 13, 2018, 07:01:45 pm »

Yes. MC maintains a number of additional databases other than the main one shown by most Views. These additional databases (including Optical Discs, Removed Files, and others) are accessible, however. You just have to make a special "maintenance" View (or Smartlist) to see them.

1. Make a new "container" Library View which doesn't live under Audio, Video, or Images in the Tree. (I call mine "Advanced", but you could call yours Maintenance or something else like that.) To do this, right-click on any of your existing Views, and choose Add Library View. Pick the Empty View preset, give it a name, and select (root) as the Location. Then, open Customize View on your new view, and uncheck Settings > Tree > Allow Tree Selection. This will make it work like the other top-level views where you can't actually choose it, because it will open up and select the last-most-used one of its "children".

2. Then, right click on this new container View in the Tree, and add another one. This time choose Panes, and give it a name like All Databases. Make sure the Location is set to the one you created in step 1.

3. Customize View on the new All Databases View, and then click Included Files > Set rules for file display. Import this rule: ~d=a ~sort=[Filename]

4. Then, back at Customize View, remove the Genre/Artist/Album categories (which are in the default "Panes" type View). Add a new Category, and change the type to Expression. Give it a name like "Database" and in Expression to Group by, paste in: FileDBLocation().

5. You may want to add additional Categories like File Location, Media Type, Media Sub Type, etc.

Now, when you open up this View it will show EVERYTHING in all of the Media Center databases, and you can filter them with that fancy first Expression Pane I had you add in #4 above, to show only the contents of one particular database.

If you want to clear all of the files out of MC entirely, come to this view, Control-A, hit Delete, and choose the Remove-Only option. You may need to do this twice to fully clear it out because the first time, it will move some files to the Removed Items database.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Spike1000

  • Citizen of the Universe
  • *****
  • Posts: 641
Re: Clear Library Database without losing custom views & settings?
« Reply #2 on: June 14, 2018, 03:28:21 am »

Nice work Glynor!

Spike

swiv3d

  • Guest
Re: Clear Library Database without losing custom views & settings?
« Reply #3 on: June 14, 2018, 07:13:32 am »

"Amazing", said the Gruffalo!!
Logged

amargolis

  • Junior Woodchuck
  • **
  • Posts: 61
Re: Clear Library Database without losing custom views & settings?
« Reply #4 on: June 14, 2018, 10:42:04 am »

Once again, Glynor, this is so incredibly helpful! I really can't thank you enough for taking the time to put it down so clearly. Worked like a charm. Much appreciated!
Logged
Pages: [1]   Go Up