Genre Finder 5.0 - Updated 05/08/2012

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

Moderators: Peke, Gurus

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Ok, here goes!! You can select any field from the list, and then choose a white- or black-list, then you can list the specified items in a comma separated list...

Genre | White | Pop,Rock,Jazz

If you want you can use an automatic whitelist, this means that all the current values in the database for that field are used...

Genre | White | *

If you want you can now used the automatic whitelist from another field...

Custom1 | White | *Genre

If you want to include values which is not in the automatic whitelist, you can add them - you can also remove them (I call these "modifications")...

Genre | White | *+Pop+Rock-Jazz-Sountrack

You can also use a wildcard character in the modifications, either at the beginning or the end...

Genre | White | *+Pop%+%Rock-Jazz-Soundtrack

I think that's most stuff covered, hopefully it should be fairly powerful and allow you to do most things. If you set the log level up higher and check out the logfile then the list is written there so you can check that your modifications are working as expected. :)
[/b]
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
bob61
Posts: 157
Joined: Sun Dec 09, 2007 4:52 pm

Post by bob61 »

trixmoto wrote:Ok, here goes!! You can select any field from the list, and then choose a white- or black-list, then you can list the specified items in a comma separated list...
Thanks for posting the examples of how to configure, but just want to be sure I understand what's expected as a result.
Genre | White | Pop,Rock,Jazz
This will only import matches where Genre from Last.fm is either Pop, Rock or Jazz. No other hits - correct?
If you want you can use an automatic whitelist, this means that all the current values in the database for that field are used...

Genre | White | *
Now here. not sure when you say "current values in the database", should this only be those values that are currently displayed under Genre node would be returned as a result? I ask because I processed a selection of files where Genre was blank (which is why I'm looking to use this great tool) yesterday and one of the returned results as "Gothic", this Gothic did not exist in my current list of genre's. I was able to confirm this after the fact as only this one title now appeared under Gothic once processed. Is there some place the "whitelist" is stored other than those listed under the Genre node under "Library"?

Also, does this automatically convert a hit from Last.fm that might return Indie Rock (which is not in my list of Genre's) so that it would instead hit to Rock (which is in my Genre list)? What I'd want to do is be sure any hit of "Rock" from Last.fm (Heavy Metal Rock, Metal Rock, Classic Rock, Monkey Rock) would all be set to Rock Genre.
If you want you can now used the automatic whitelist from another field...

Custom1 | White | *Genre
So in this example, if Custome1 held only the current values "Apple" and "Moose" the script would return any matches from the Last.fm tags returned with these values in the Genre list, correct?
If you want to include values which is not in the automatic whitelist, you can add them - you can also remove them (I call these "modifications")...

Genre | White | *+Pop+Rock-Jazz-Sountrack
In the example above, what you are showing is that Pop and Rock would not already exist in the Whitelist, therefore these would now be added for any hits found. Additionally, this same list says that any hit on Jazz and Sountrack would not be processed - would these be matched against some other existing value in the Genre whitelist or just ignored?
You can also use a wildcard character in the modifications, either at the beginning or the end...

Genre | White | *+Pop%+%Rock-Jazz-Soundtrack
Here's where you lose me as to exactly what the expected results would be. Taking just the first value "+Pop%", would this then return all hits that started with Pop, so if there was Pop1, Pop2 and PopGreen return as the values from the Last.fm tags these would be added as three new Genre's in the list (and therefore become part of the whitelist for next processing?

If so, I thought in reading through all the other options there is a way to map these to another Genre, so in the above example I'd want Pop1, Pop2 and PopGreen to be derived into the Genre "Pop", is that possible?
I think that's most stuff covered, hopefully it should be fairly powerful and allow you to do most things. If you set the log level up higher and check out the logfile then the list is written there so you can check that your modifications are working as expected. :)
[/b]
Thanks for taking the time to summarize the options and would appreciate you verifying if what I noted above as what would be expected is correct or not. Looks like a very powerful tool, just want to be sure I use it properly and most effectively (and that I don't make a mess along the way : :o )
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Yes, if you specify a whitelist then only these values should be allowed.

With the automatic whitelist the values are taken from the database, so maybe you have some genres in the database which are not appearing in your tree, I'm not sure why this would be.

I forgot to mention one other thing. You can add translations using the equals sign - by the sound of it you want...

Genre | White | *%Rock=Rock

Yes, the current Genre values would be used to populate the Custom1 field in my earlier example.

The modifications are applied to the whitelist, so in my example Pop and Rock would be added (if they didn't already exist in the list) and Jazz and Soundtrack would be removed (if they did already exist in the list). Then only values returned from Last.Fm that were in the list would be used.

The values are not added to the automatic whitelist during the processing. The first time the whitelist is calculated it is then stored for the rest of the processing to improve performance.

You can play around with these options by increasing the log level and ticking the confirmation screen option. Then you can cancel thus not making any changes, and check the logfile to see what happened with the lists.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
MM3 monkey
Posts: 455
Joined: Mon Aug 27, 2007 2:34 am

Post by MM3 monkey »

Thanks for asking all these questions, bob61. Please keep it up.

I'd love to have "idiots guides" for this script and other ones ('extract fields' and especially magic nodes).

Even the (very valuable) information you've gleaned above will soon just be hidden away on page 12 of the script thread.

I'm eagerly anticipating the 'changes to the website' which are going to come with the official release of MM3. Hopefully it will involve a structure for making information about scripts easier to find - and better still, some good tutorials and examples.

As always I want to make clear that above all I am very grateful to all the scripters and skinners for anything :)
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Post by nynaevelan »

Ok, I have a question but mine is a little more complicated. I use the GF but I do not have it update the genre field, instead it updates the Mood field because I have my genre's set up differently but I want to know the original genre's of the tracks so that is why the Mood field is being updated. Is it possible to setup the whitelist to check the database in the genre and mood fields but only update the mood field?
If not, don't worry about it.

Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
bob61
Posts: 157
Joined: Sun Dec 09, 2007 4:52 pm

Post by bob61 »

trixmoto wrote:Yes, if you specify a whitelist then only these values should be allowed.

With the automatic whitelist the values are taken from the database, so maybe you have some genres in the database which are not appearing in your tree, I'm not sure why this would be.
I've taken a look into the mm.db file, noticed in the Genres table there are lots of GenreNames which have 0 usage count. Maybe a bug in MM3? Dunno, but see that once I moved the one title from Gothic MM3 deleted that GenreName as it's no longer listed in the table. You see any issue with going in at the table level then and deleting all the genres that show 0 UsageCount. This should then give me a clean whitelist.

As a follow-up, it must be some type of bug in MM3 that kept these 0 usage Genre's. I just did a test, copied one file from Vocal into Rock/Soul (which showed 0 usage). I then copied it back to Vocal and MM3 deleted the Rock/Soul - so not sure why I have all these stranded Genres, but at least I know why the cause was and how to work around it.
I forgot to mention one other thing. You can add translations using the equals sign - by the sound of it you want...

Genre | White | *%Rock=Rock
If I follow that example - any Last.fm tag that has Heavy Metal Rock, Pop Rock and Classic Rock would then be translated to Rock - that's nice. If I had "Rock and Roll" or "Rock/Roll" though I'd have to add another line like this: Genre | White | *Rock%=Rock, that correct?

Yes, the current Genre values would be used to populate the Custom1 field in my earlier example.
I'll have to play around with that - thanks.
The modifications are applied to the whitelist, so in my example Pop and Rock would be added (if they didn't already exist in the list) and Jazz and Soundtrack would be removed (if they did already exist in the list). Then only values returned from Last.Fm that were in the list would be used.
Good to know that the "-" will remove them from the list. If there are songs with "Jazz" already and I include -Jazz in the whitelist, what happens to all the titles that were tagged as "Jazz"?
The values are not added to the automatic whitelist during the processing. The first time the whitelist is calculated it is then stored for the rest of the processing to improve performance.

You can play around with these options by increasing the log level and ticking the confirmation screen option. Then you can cancel thus not making any changes, and check the logfile to see what happened with the lists.
Thanks for your time in providing the response.
Last edited by bob61 on Fri Jan 04, 2008 11:54 am, edited 1 time in total.
bob61
Posts: 157
Joined: Sun Dec 09, 2007 4:52 pm

Post by bob61 »

MM3 monkey wrote:Thanks for asking all these questions, bob61. Please keep it up.

I'd love to have "idiots guides" for this script and other ones ('extract fields' and especially magic nodes).

Even the (very valuable) information you've gleaned above will soon just be hidden away on page 12 of the script thread.

I'm eagerly anticipating the 'changes to the website' which are going to come with the official release of MM3. Hopefully it will involve a structure for making information about scripts easier to find - and better still, some good tutorials and examples.
Agree with you - if MM gets a site set-up for script and skins that will be a big step forward as a lot of the background / usage should then be stored as part of the script description (with ability to modify). Would I've seen on some other sites with support threads is they set-up a Wiki in the thread so it appears right after the original message. Users can then update and post additional details - it becomes the users guide more or less online.
As always I want to make clear that above all I am very grateful to all the scripters and skinners for anything :)
Ditto!
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

@nynaevelan - at the moment this is not possible, you can only get the automatic whitelist from a single field.

@bob61 - no, there shouldn't be anything wrong with cleaning up your database. These might have been moved over from MM2 if you converted your existing database. Yes, your rock example is correct. The tracks tagged as jazz in this case will only be updated if they are being processed by the script an another tag is found to replace it with.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
bob61
Posts: 157
Joined: Sun Dec 09, 2007 4:52 pm

Post by bob61 »

Input: Artist=Crazy Train, Song=Butterfly

I tried this:
Genre | White | *%Rock=Rock
Also tried:
Genre | White | *,%Rock=Rock

I received the error messages:
"There was a problem querying the database: Error executing SQL "SELECT FROM Song" : near "FROM" : syntax error (1.1)
and Error #2147418113
File: "C:\Program Files\MediaMonkey3\Scripts\Auto\GenreFinder.vbs, Line:1545, Column: 16

I then ran with no selection:
Returns "Rock" as Genre

I ran with Whitelist = "*"
Also returns "Rock" as Genre

So not sure what's going wrong with the using of % wildcard and =.
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Post by nynaevelan »

trixmoto wrote:@nynaevelan - at the moment this is not possible, you can only get the automatic whitelist from a single field.
Thanks, I figured as much. This is not a critical issue for me so I am content to keep it as a manual process.

Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

@bob61 - I'll check this out and see what I can do, maybe mixing the wildcard and translation doesn't work at the moment.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
bob61
Posts: 157
Joined: Sun Dec 09, 2007 4:52 pm

Post by bob61 »

trixmoto wrote:@bob61 - I'll check this out and see what I can do, maybe mixing the wildcard and translation doesn't work at the moment.
Thanks for the response trixmoto - now you know why I was trying to understand all the features of your whitelist options - something wasn't working right and wasn't sure if it was me, or the code - usually me ;)
riffcat
Posts: 13
Joined: Fri Dec 07, 2007 8:23 pm

Is artist mode for MM3 coming soon?

Post by riffcat »

Is artist mode for MM3 coming soon?
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Depends on your definition of "soon"! :lol:
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
riffcat
Posts: 13
Joined: Fri Dec 07, 2007 8:23 pm

Post by riffcat »

take your time; im only turning blue. :x
Post Reply