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

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

Moderators: Peke, Gurus

nohitter151
Posts: 23640
Joined: Wed Aug 09, 2006 10:20 am
Location: NJ, USA
Contact:

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

Post by nohitter151 »

Mizery_Made wrote:I don't see native support for Unused Genre's, only Albums and Artists. Unless it's a "hidden" task.
http://www.ventismedia.com/mantis/view.php?id=6241
MediaMonkey user since 2006
Need help? Got a suggestion? Can't find something?

Please no PMs in reply to a post. Just reply in the thread.
Batalanto!
Posts: 72
Joined: Sun Nov 05, 2006 4:24 am

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

Post by Batalanto! »

billrigsby wrote:Tried using this script, "Goto File->Remove Unused... To run the script"
Got the message "No Unused Genres Found"
I no this is not the case, Can this be used to edit the Genre list or only remove a genre if it is unused?

Should I look for a different script?


Bill
Bill,

As I understand it, the script mentioned will only delete unused genres that the user themselves added to their MM list. Therefore, the genres that are automatically loaded in MM cannot be deleted at this time. The reason given by technical is that they are tied into other programming code that - if deleted - would make functioning unstable.

I hope that helps. If anyone knows otherwise or has further info, please feel free to add it. I've received much help on this forum and want to pay it forward.

Peace!
Batalanto!
Posts: 72
Joined: Sun Nov 05, 2006 4:24 am

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

Post by Batalanto! »

Bex wrote:MM can now remove unused genres natively with: File->Maintain Library->Optimize Database

This script only removes unused Genres and classifications. What function were looking for?
Bex,

In following your direction, there are two options available:

1. Optimize Database (Quick)
2. Optimize Database (Complete)

Which are you recommending and what are the differences, as best you understand them?

Peace!
Mizery_Made
Posts: 2283
Joined: Tue Aug 29, 2006 1:09 pm
Location: Kansas City, Missouri, United States

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

Post by Mizery_Made »

@nightrocket, I don't believe that's true. My database only has 8 genres in it, so obviously the "automatic/default" genres (or at least most of them) have been removed here. I don't recall if that was done by this script, or perhaps it was an SQL query from Bex prior to him writing this script.
Batalanto!
Posts: 72
Joined: Sun Nov 05, 2006 4:24 am

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

Post by Batalanto! »

Mizery_Made wrote:@nightrocket, I don't believe that's true. My database only has 8 genres in it, so obviously the "automatic/default" genres (or at least most of them) have been removed here. I don't recall if that was done by this script, or perhaps it was an SQL query from Bex prior to him writing this script.
Glad I'm not the only one up at this hour!

Mizery, here is a cut and paste of what I was referencing. It's from Bex first post in this string, at the bottom:

"Here's a small script which removes genres you don't use, from the dropdown list in the properties. Well, only custom made genres can be removed and not any of these listed here since they are part of ID3v1 specification. Removing any of those leads to unwanted strange behavior of genres in MM.
I have had this function as a query in MS Access for a while but I thought I should turn it into a script and share it with the community.Enjoy!/Bex."

Now, if you know how to erase ALL unused genres, I'm all ears. Anybody else know how to do it without "breaking" the program?

Peace.
Mizery_Made
Posts: 2283
Joined: Tue Aug 29, 2006 1:09 pm
Location: Kansas City, Missouri, United States

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

Post by Mizery_Made »

I do believe that information is outdated. If you notice, that quote contains a reference to MS Access. MM2.x used that format for the database, while MM3 converted over to SQLite. I'm almost positive that handling of the genres changed between the two versions, with the ID3v1 genres no longer being "default genres" in MM3. In fact, I just started up MM3 with a clean DB (though a few files were scanned in automatically due to File Monitor) and only one genre was present (mind you, coming from the scanned files) suggesting to me that the "default genres" are no longer hard-coded into the program. Therefor, this script should remove any genre in your database that isn't currently in use (though as mentioned, MM appears to do this natively. I can't say... cause I cleaned out my genres years ago and haven't added any that later needed to be deleted), especially since the first post also states "- Changed script so all Unused Genres are removed".
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

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

Post by Bex »

Mizery_Made is right and I removed the outdated MM2 information from the first post.

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
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
smokiibear

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

Post by smokiibear »

I'm using MM3.2 and attempting to remove unused genres with tehe optimize database (Complete), but the empty folders don't get deleted? Any ideas?
Guest

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

Post by Guest »

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
Mizery_Made
Posts: 2283
Joined: Tue Aug 29, 2006 1:09 pm
Location: Kansas City, Missouri, United States

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

Post by Mizery_Made »

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?
elliottdp
Posts: 27
Joined: Tue Mar 22, 2011 1:27 pm

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

Post by elliottdp »

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.
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

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

Post by Bex »

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

Why didn't you just download the installer?
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
elliottdp
Posts: 27
Joined: Tue Mar 22, 2011 1:27 pm

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

Post by elliottdp »

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.
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

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

Post by Bex »

Thanks, glad you liked it!
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
elliottdp
Posts: 27
Joined: Tue Mar 22, 2011 1:27 pm

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

Post by elliottdp »

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