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

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

MMuser2011
Posts: 1308
Joined: Mon Oct 17, 2011 8:28 am
Location: Central Europe

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

Post 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.
Magic Nodes v4.3.3 (2018-10-03) last free version SQL Viewer v2.4 (2009-10-25)
ExternalTools v1.4 (2011-05-09) iTunesMonkey 1.0 + Acoustid
Calculate Cover Size v1.7 (2012-10-23) RegExp Find & Replace v4.4.9 (2018-10-03) last free version
greggw
Posts: 34
Joined: Wed Apr 04, 2007 7:51 pm
Location: Indiana, USA

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

Post 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
Gregg W
Lowlander
Posts: 56465
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

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

Post by Lowlander »

This addon still works and you can use File > Remove Unused > Genres
greggw
Posts: 34
Joined: Wed Apr 04, 2007 7:51 pm
Location: Indiana, USA

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

Post by greggw »

I was able to install Bex's script in MM4 and it did remove the unused genres. Thanks!

-- Gregg
Gregg W
kum

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

Post by kum »

It works fine
anatole
Posts: 19
Joined: Sun Oct 13, 2013 4:36 am

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

Post by anatole »

bonjour,
Le script marche super Merci
nolagunnesch
Posts: 5
Joined: Sat Feb 09, 2013 6:05 pm

remove unused genre MM4

Post 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.
nigelc
Posts: 1
Joined: Sun Nov 01, 2020 11:35 am

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

Post 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.
Post Reply