Page 5 of 5

Re: Remove Unused Genres/Classification 1.2.1 (2008-02-18)

Posted: Mon Jan 30, 2012 8:30 am
by MMuser2011
Bex wrote:I think Optimize Database (Quick) is sufficient to remove unused Genres, if not use Optimize Database (Complete).
The difference between Quick and Complete is explained here:
http://www.ventismedia.com/mantis/view.php?id=5110
Unfortunately, BOTH optimizations doesn't remove unused Genres. I checked it before the quick run, after the quick run and after the complete run with MM4 v1466. The number of 1232 genres in my MM.DB is unchanged!

I'm sure that I have cleaned all my tracks with strange genres like '9' or '131' or wrong separated genres, like 'Dance-pop, Urban, Adult Contemporary, R&B, Pop'. In the Genre-Node, they don't appear anymore. UsageCount is 0.

In the issue 5110, jiri answers:
You can check the exact SQLs that are executed in the debug log, but there's not much interesting - just some consistency checks and SQLite's VACUUM.
Could someone with the debug-version please check, if unused genres really should be cleaned? According to 5043 a similar issue should be fixed. I can not confirm this, just repeat the steps in the error description and you will see, the old genre will still be in the database. The usage counter is 0 for the old, and 1 for the new one.

I have no coding skills and therefore I can't understand the triggerlines in the table GENRES:

Code: Select all

CREATE TRIGGER delete_GenresSongs DELETE ON GenresSongs
BEGIN
  UPDATE Genres SET UsageCount=UsageCount-1 WHERE Genres.IDGenre=old.IDGenre;
  DELETE FROM  Genres WHERE Genres.IDGenre=old.IDGenre AND Genres.UsageCount=0;
END;
Especially the 'old.IDGenre' is a mistery for me.

I'm interested in a solution because every change of genres takes several seconds until I can choose from the drop-down box or type in a known genre. I hope to speed up this step with fewer entries.

Re: Remove Unused Genres/Classification 1.2.1 (2008-02-18)

Posted: Mon May 28, 2012 7:16 pm
by greggw
I'm using MediaMonkey 4.0.5.1491 and I can confirm that Optimize database (Quick) and Optimize database (Complete) do not remove unused Genres from some dialog boxes. For example, if I Edit a Collection and go to the Criteria tab and Add Search Criteria and select Genres as the Property, the resulting Values checklist contains genres that are not in my collection. Likewise if I create or edit an AutoPlaylist (Advanced) and add Genre as a Search Criteria, the Values checklist contains genres that are not in my collection. (When I say genres that are not in my collection, I mean that the genres do not appear in the Genre node for my entire music collection.)

Before I upgraded to MM4, I could use Bex's script to remove the Genres that are not in my collection from these checklist. Now that I'm using MM4, I don't know how to remove these genres.

-- greggw

Re: Remove Unused Genres/Classification 1.2.1 (2008-02-18)

Posted: Mon May 28, 2012 9:16 pm
by Lowlander
This addon still works and you can use File > Remove Unused > Genres

Re: Remove Unused Genres/Classification 1.2.1 (2008-02-18)

Posted: Tue May 29, 2012 5:11 am
by greggw
I was able to install Bex's script in MM4 and it did remove the unused genres. Thanks!

-- Gregg

Re: Remove Unused Genres/Classification 1.2.1 (2008-02-18)

Posted: Wed Jun 11, 2014 1:25 am
by kum
It works fine

Re: Remove Unused Genres/Classification 1.2.1 (2008-02-18)

Posted: Tue Jan 27, 2015 5:24 am
by anatole
bonjour,
Le script marche super Merci

remove unused genre MM4

Posted: Wed Jan 16, 2019 11:58 am
by nolagunnesch
I have a script for MM3 that will not work for MM4 to remove unused genre. I've tried rebooting, etc... nothing removes them permanently. They are in the dropdown suggestions and still appear in the actual list as well. Previous versions of MM didn't have this issue. Any help out there?

Thanks.

Re: Remove Unused Genres/Classification 1.2.1 (2008-02-18)

Posted: Sun Nov 01, 2020 4:03 pm
by nigelc
The script works in MM4, it just erroneously says that none where found when it completes but they all actually gone.
Thank you so much, it's great to get rid of them.