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

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Remove Unused Genres/Classification 1.2.1 (2008-02-18)

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

by nigelc » Sun Nov 01, 2020 4:03 pm

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.

remove unused genre MM4

by nolagunnesch » Wed Jan 16, 2019 11:58 am

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)

by anatole » Tue Jan 27, 2015 5:24 am

bonjour,
Le script marche super Merci

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

by kum » Wed Jun 11, 2014 1:25 am

It works fine

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

by greggw » Tue May 29, 2012 5:11 am

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)

by Lowlander » Mon May 28, 2012 9:16 pm

This addon still works and you can use File > Remove Unused > Genres

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

by greggw » Mon May 28, 2012 7:16 pm

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)

by MMuser2011 » Mon Jan 30, 2012 8:30 am

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)

by elliottdp » Wed Nov 23, 2011 9:03 am

I have a new question regarding a variation of this problem and have not been able to figure it out.

I have used the removeunused genres. After restart however, two unused genres keep automatically popping up in the genre node, Hip Rap and Alternative.

I have genres Rap; Hip-Hop; Rock: Alternative; Rock: Hard and so on. Why would just Alternative keep generating?

Thanks

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

by Bex » Wed Jun 15, 2011 9:08 am

Thanks, glad you liked it!

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

by elliottdp » Wed Jun 15, 2011 9:06 am

Heh.

I didn't see the link to download the installer. I must have just read right past it. I'm a little blind sometimes. :)

Anyway... Was able to get rid of 403 unused genres. Absolutely excellent script.
Thank you so much. Saved me a ton of annoying time scrolling through stupid genres (overly specific) like House Trance, DJ Club Dance, (148), etc.

I prefer just broad genres... Electronic, R&B, Jazz, Classical...

Thanks again.

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

by Bex » Wed Jun 15, 2011 1:49 am

Short explanation:
If the script contains "Sub OnStartup" then it's an autoscript.

Why didn't you just download the installer?

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

by elliottdp » Tue Jun 14, 2011 5:57 pm

Thanks, Mizery Made.

Did not think to put it in the auto scripts folder. That did it.

Just for my knowledge and perhaps others, what determines whether a script goes in the auto folder or the scripts folder?

Thanks again.

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

by Mizery_Made » Tue Jun 14, 2011 1:12 pm

You haven't done things right, I don't think. I believe it should be "...Scripts\Auto\" and doesn't require an entry in the .ini. You should also find it under "File -> Remove Unused...", not "Tools -> Scripts -> Remove Unused...". Have you tried using the Install package provided in the first post?

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

by Guest » Tue Jun 14, 2011 12:37 pm

Hello.

I have MM version 3.25.1306. Windows Xp Pro.

I've copy and pasted Bex's script(have not changed it in the slightest) from above and I've created the .vbs filename necessary and notated the new script in the .ini file. Punctuation/capitalization and so on appears to match the other scripts I have.

The problem is when I select the Remove Unused from the Tools>Scripts pull down menu I get the following error:

Error #13-Microsoft VBScript runtime error
Type Mismatch: 'RemoveUnused'
File: "D:\MediaMonkey\Scripts\RemovedUnused.vbs"' Line: 1, Column: 0


Two things:
Not sure why the above error message specifies ...scripts\RemovedUnused.vbs... I named the file removeunused.vbs For yucks I then changed the .vbs file to removedunused.vbs, then got a message saying the file is not accessible. either being used or don't have admin access. hmmm???

I see that Bex has specified that it works in MM 3 Only in the post earlier. Does that mean it will work in any Version 3.xx.... or just in Version 3.00? Is this the problem?

or am I missing something? Help!

Here is my .ini file (Remove Unused is the last one listed):

Code: Select all

[Statistics]
FileName=Stats.vbs
ProcName=ShowStats
Order=1
DisplayName=&Statistics
Description=Library Statistics Report
Language=VBScript
ScriptType=1

[ExportHTML]
FileName=Export.vbs
ProcName=ExportHTML
Order=2
DisplayName=Track List (&HTML)
Description=Exports selected tracks to a .htm file
Language=VBScript
ScriptType=1

[ExportXML]
FileName=Export.vbs
ProcName=ExportXML
Order=3
DisplayName=Track List (&XML)
Description=Exports selected tracks to an .xml file
Language=VBScript
ScriptType=1

[ExportCSV]
FileName=Export.vbs
ProcName=ExportCSV
Order=4
DisplayName=Track List (CS&V)
Description=Exports selected tracks to a .csv file
Language=VBScript
ScriptType=1

[ExportXLS]
FileName=Export.vbs
ProcName=ExportXLS
Order=5
DisplayName=Track List (&Excel)
Description=Exports selected tracks to a .xls file
Language=VBScript
ScriptType=1

[AutoIncTrackN]
FileName=AutoIncTrackN.vbs
ProcName=AutoIncTrackNumbers
Order=6
DisplayName=Auto-&increment Track #s...
Description=Sequentially numbers Tracks
Language=VBScript
ScriptType=0

[SwapArtistTitle]
FileName=SwapArtistTitle.vbs
ProcName=SwapArtistTitle
Order=7
DisplayName=&Swap Artist and Title
Description=Swaps Artist and Title fields
Language=VBScript
ScriptType=0

[Case]
FileName=Case.vbs
ProcName=TitleCase
Order=8
DisplayName=Case Checker...
Description=Checks for correct capitalization
Language=VBScript
ScriptType=0

[ExportM3Us]
FileName=ExportM3Us.vbs
ProcName=ExportM3Us
Order=9
DisplayName=Export all Playlists...
Description=Exports all Playlists to .m3u
Language=VBScript
ScriptType=0

[ExportOPML]
FileName=ExportOPML.vbs
ProcName=ExportOPML
Order=10
DisplayName=Export subscribed Podcasts...
Description=Exports subscribed Podcasts to .opml file
Language=VBScript
ScriptType=0

[CustomReport]
Filename=CustomReport.vbs
Procname=CustomReport
Order=11
DisplayName=Custom Report
Description=Custom Report
Language=VBScript
ScriptType=1

[CustomReportAuto]
Filename=CustomReport.vbs
Procname=CustomReportAuto
Order=12
DisplayName=Custom Report Auto
Description=Custom Report with previous options
Language=VBScript
ScriptType=1

[JustListArtists]
Filename=JustListArtists.vbs
Procname=JustListArtists
Order=13
DisplayName=Just List Artists
Description=Just List Artists
Language=VBScript
ScriptType=1

[RemoveUnused]
Filename=RemoveUnused.vbs
Procname=RemoveUnused
Order=14
DisplayName=Remove Unused
Description=Remove unused properties, genres, etc.
Language=VBScript
ScriptType=0

Top