Page 4 of 5

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

Posted: Sun Feb 06, 2011 11:53 pm
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

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

Posted: Mon Feb 07, 2011 1:58 am
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!

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

Posted: Mon Feb 07, 2011 2:01 am
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!

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

Posted: Mon Feb 07, 2011 2:13 am
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.

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

Posted: Mon Feb 07, 2011 2:23 am
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.

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

Posted: Mon Feb 07, 2011 3:18 am
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".

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

Posted: Mon Feb 07, 2011 5:51 am
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

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

Posted: Sun Feb 20, 2011 5:19 am
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?

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

Posted: Tue Jun 14, 2011 12:37 pm
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

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

Posted: Tue Jun 14, 2011 1:12 pm
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?

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

Posted: Tue Jun 14, 2011 5:57 pm
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.

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

Posted: Wed Jun 15, 2011 1:49 am
by Bex
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)

Posted: Wed Jun 15, 2011 9:06 am
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.

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

Posted: Wed Jun 15, 2011 9:08 am
by Bex
Thanks, glad you liked it!

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

Posted: Wed Nov 23, 2011 9:03 am
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