Genre Finder 5.0 - Updated 05/08/2012

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

Moderators: Peke, Gurus

Kevinowpb
Posts: 129
Joined: Sat Dec 22, 2007 10:18 am
Location: West Palm Beach
Contact:

Re: Genre Finder 4.1 [MM2+3]

Post by Kevinowpb »

Hmmm.. not sure.. I've backed up and restrored so many times... I'll uninstall it, and pull down the one from your site.. see what happens.

trixmoto wrote:Are you sure you're using version 4.1? The reason I ask is because line 533 does not contain a "commit", but line 527 does. Modified the script in anyway?
Owyn
Posts: 2018
Joined: Fri Mar 21, 2008 10:55 am
Location: Canada

Re: Genre Finder 4.1 [MM2+3]

Post by Owyn »

Testing this script to use in cleanup of a collection of primarily covers and bootlegs from various music blogs.

As always, thanks for the various configuration options. Getting the white list right has been "interesting".
Just keep running a test and then checking the log. :o

Got "key not in collection" error. Bex fixed the same problem in his last update for SQL Viewer.

Edit: Error specific to Genre Finder
- Line 466, Col 8
- Unchecking "Check Library" avoids error
Cogito cogito ergo cogito sum. (Ambrose Bierce)
I drink therefore I am. (Monty Python)
Vista 32bit Home Premium SP2 / MM3.2.1.1297 Gold / Last.Fm 1.0.2.22 / IE8
Dell Inspiron 530 (1.8 Core2 / 2GB)
Skin: Vitreous Blue
Scripts: Add/Remove Playstat|Advanced Duplicate Find & Fix|Album Art Tagger|Backup|Batch Art Finder|Calculate Cover Size|Case&Leading Zero Fixer|DB_Audit|DB_Clean|DB_Schema|Event Logger|Genre Finder|Lyricator|Magic Nodes|MM2VLC|Monkey Rok|MusicIP Tagger|PUID Generator|RegExp Find & Replace|Right Click for Scripts|Scriptreloader|SQL Viewer|Stats(Filtered)|Tagging Inconsistencies
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Genre Finder 4.1 [MM2+3]

Post by trixmoto »

Ok, I'll check this out and get it sorted in the next version.
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.
Owyn
Posts: 2018
Joined: Fri Mar 21, 2008 10:55 am
Location: Canada

Re: Genre Finder 4.1 [MM2+3]

Post by Owyn »

Been working (for a while) on getting whitelist done.

Current status (still WIP as I bring in new test cases):

Code: Select all

Alt Country,Alt-Country=Alt Country,Americana,British,Canadian,Bluegrass,Classical,Doo Wop,Irish,R&B,Pop Rock,Soul,Blues%=Blues,Celtic%=Celtic,%Country=Country,Country%=Country,Flute%=Flute,Folk%=Folk,Gospel%=Gospel,Guitar%=Guitar,Indie%=Indie,Jazz%=Jazz,Pop%=Pop,Rock%=Rock,Vocal%=Vocal,World%=World
I think that an extension of the syntax to support contains would be handy. Thinking of, e.g.
The existing syntax:
%Jazz -> Ends with "Jazz"
Jazz% -> Starts with "Jazz"

New syntax:
%Jazz% -> Contains "Jazz"

Looks like a fairly simple change to the IsInList function.
Cogito cogito ergo cogito sum. (Ambrose Bierce)
I drink therefore I am. (Monty Python)
Vista 32bit Home Premium SP2 / MM3.2.1.1297 Gold / Last.Fm 1.0.2.22 / IE8
Dell Inspiron 530 (1.8 Core2 / 2GB)
Skin: Vitreous Blue
Scripts: Add/Remove Playstat|Advanced Duplicate Find & Fix|Album Art Tagger|Backup|Batch Art Finder|Calculate Cover Size|Case&Leading Zero Fixer|DB_Audit|DB_Clean|DB_Schema|Event Logger|Genre Finder|Lyricator|Magic Nodes|MM2VLC|Monkey Rok|MusicIP Tagger|PUID Generator|RegExp Find & Replace|Right Click for Scripts|Scriptreloader|SQL Viewer|Stats(Filtered)|Tagging Inconsistencies
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Genre Finder 4.1 [MM2+3]

Post by trixmoto »

I thought I'd added this in the last release, but I've just checked the code and I haven't. That might mean there was a result why I didn't, but I've put it on my list to have another look at in the next version so we'll see.
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.
Owyn
Posts: 2018
Joined: Fri Mar 21, 2008 10:55 am
Location: Canada

Re: Genre Finder 4.1 [MM2+3]

Post by Owyn »

Thanks. This will be another very useful tool once I tune it.

I have been testing the white list against some large compilation sets that I have which tend to be major genre specific, e.g. Ken Burns Jazz, The Chess Story Box Set, Top 500 Country, etc.

Getting fairly close to letting Genre Finder actually change something. The main albums section of my library is fairly closely coded to AMG album genre and style but, I am less happy with my multi-artist major genre/label compilations and definitely unhappy with the genres from music blogs. Plan on including Genre Finder as part of my cleanup procedures for new tracks from blogs (about 50 tracks/week).
Cogito cogito ergo cogito sum. (Ambrose Bierce)
I drink therefore I am. (Monty Python)
Vista 32bit Home Premium SP2 / MM3.2.1.1297 Gold / Last.Fm 1.0.2.22 / IE8
Dell Inspiron 530 (1.8 Core2 / 2GB)
Skin: Vitreous Blue
Scripts: Add/Remove Playstat|Advanced Duplicate Find & Fix|Album Art Tagger|Backup|Batch Art Finder|Calculate Cover Size|Case&Leading Zero Fixer|DB_Audit|DB_Clean|DB_Schema|Event Logger|Genre Finder|Lyricator|Magic Nodes|MM2VLC|Monkey Rok|MusicIP Tagger|PUID Generator|RegExp Find & Replace|Right Click for Scripts|Scriptreloader|SQL Viewer|Stats(Filtered)|Tagging Inconsistencies
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Genre Finder 4.1 [MM2+3]

Post by trixmoto »

Excellent, I'm glad you're finding it useful :)
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.
Owyn
Posts: 2018
Joined: Fri Mar 21, 2008 10:55 am
Location: Canada

Re: Genre Finder 4.1 [MM2+3]

Post by Owyn »

Well Genre Finder is now in use for cleanup of new music blog downloads. Not ready for prime time for more extensive use.

Looking at 2 changes(hacks) or maybe enhancements from you (wheedle, wheedle). Heh, probably both.

1)Preserve Genre list
New list, e.g. "Cover,Favs,Xmas" of existing track genre to be preserved in the new genre string. e.g. if the tracks existing Genres includes "Xmas" and the suggested genre is "Folk", then the new Genre list for the track would be "Folk; Xmas".
Add second test for existing genre OK after preserved genres appended.

2)Option to leave existing Genres unchanged when suggested Genre is Unknown, i.e. blank.
Uncheck tracks with Unknown genre when option in effect.
Cogito cogito ergo cogito sum. (Ambrose Bierce)
I drink therefore I am. (Monty Python)
Vista 32bit Home Premium SP2 / MM3.2.1.1297 Gold / Last.Fm 1.0.2.22 / IE8
Dell Inspiron 530 (1.8 Core2 / 2GB)
Skin: Vitreous Blue
Scripts: Add/Remove Playstat|Advanced Duplicate Find & Fix|Album Art Tagger|Backup|Batch Art Finder|Calculate Cover Size|Case&Leading Zero Fixer|DB_Audit|DB_Clean|DB_Schema|Event Logger|Genre Finder|Lyricator|Magic Nodes|MM2VLC|Monkey Rok|MusicIP Tagger|PUID Generator|RegExp Find & Replace|Right Click for Scripts|Scriptreloader|SQL Viewer|Stats(Filtered)|Tagging Inconsistencies
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Genre Finder 4.1 [MM2+3]

Post by trixmoto »

1) So as well as having the white list, you also want another preserve list? Then after getting the suggestion(s) any values from the preserve list would also be added to the end of the suggested value?

2) This has been added to my list, I'm surprised this isn't already a feature! :oops:
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.
Owyn
Posts: 2018
Joined: Fri Mar 21, 2008 10:55 am
Location: Canada

Re: Genre Finder 4.1 [MM2+3]

Post by Owyn »

trixmoto wrote:1) So as well as having the white list, you also want another preserve list? Then after getting the suggestion(s) any values from the preserve list would also be added to the end of the suggested value?
Yeah.
The Whitelist operates on the last.fm genres. I have got it to the point that it works well (for me) on Artist data.
The Preservelist would operate on the existing track genres. It's scope is global but is applied discretely per track.

There are two use cases.
1)Preserve special genre tagging that is unique (and important) to the user. e.g. I use "Favs" to generate an auto-playlist of tracks which are always to be copied to my portable player.
2)Preserve specific album genre, e.g. the genre "Swing" might be common to a Swing Bands compilation album. Expected use would be to edit GF Options before running the tool.
2) This has been added to my list, I'm surprised this isn't already a feature! :oops:
:D
Cogito cogito ergo cogito sum. (Ambrose Bierce)
I drink therefore I am. (Monty Python)
Vista 32bit Home Premium SP2 / MM3.2.1.1297 Gold / Last.Fm 1.0.2.22 / IE8
Dell Inspiron 530 (1.8 Core2 / 2GB)
Skin: Vitreous Blue
Scripts: Add/Remove Playstat|Advanced Duplicate Find & Fix|Album Art Tagger|Backup|Batch Art Finder|Calculate Cover Size|Case&Leading Zero Fixer|DB_Audit|DB_Clean|DB_Schema|Event Logger|Genre Finder|Lyricator|Magic Nodes|MM2VLC|Monkey Rok|MusicIP Tagger|PUID Generator|RegExp Find & Replace|Right Click for Scripts|Scriptreloader|SQL Viewer|Stats(Filtered)|Tagging Inconsistencies
Owyn
Posts: 2018
Joined: Fri Mar 21, 2008 10:55 am
Location: Canada

Re: Genre Finder 4.1 [MM2+3]

Post by Owyn »

Added Blacklist="Jazzapedia,Martin Scorsese%"

This kind of broke things, e.g.

Code: Select all

Runmode:artists
Suggestions...
Multiple values...
@http://ws.audioscrobbler.com/2.0/?method=artist.getTopTags&api_key=6cfe51c9bf7e77d6449e63ac0db2ac24&artist=Albert+Collins
Genre 'Rock' translated to 'Rock'.
Genre 'Classic Rock' is not in whitelist
'Albert Collins' contains artist name (Albert Collins)
Albert Collins - Frosty: Genre=Blues; Guitar; Blues Rock; Rock; Classic Rock; Texas Blues
Albert Collins - Frosty: Genre=Blues; Guitar; Blues Rock; Rock; Classic Rock; Texas Blues
@http://ws.audioscrobbler.com/2.0/?method=artist.getTopTags&api_key=6cfe51c9bf7e77d6449e63ac0db2ac24&artist=Albert+King
Genre 'Rhythm And Blues' translated to 'R&B'.
Albert King - Born Under The Bad Sign: Genre=Blues; R&B; Rhythm And Blues; Guitar; Electric Blues; Classic Blues; Blues Rock; Soul
Albert King - Born Under The Bad Sign: Genre=Blues; R&B; Rhythm And Blues; Guitar; Electric Blues; Classic Blues; Blues Rock; Soul
@http://ws.audioscrobbler.com/2.0/?method=artist.getTopTags&api_key=6cfe51c9bf7e77d6449e63ac0db2ac24&artist=Ali+Farka+Tour%C3%A9
Genre 'African' is not in whitelist
Genre 'World' translated to 'World'.
Genre 'Mali' is not in whitelist
Genre 'Africa' is not in whitelist
Genre 'World Music' translated to 'World'.
Ali Farka Touré - Timbarma: Genre=African; World; Blues; Mali; Africa; World Music; Folk
and the best one

Code: Select all

@http://ws.audioscrobbler.com/2.0/?method=artist.getTopTags&api_key=6cfe51c9bf7e77d6449e63ac0db2ac24&artist=Count+Basie+Orchestra+with+Jimmy+Rushing
Genre 'Jazzapedia' is in blacklist.
Count Basie Orchestra with Jimmy Rushing - Going To Chicago Blues: Genre=Jazzapedia
Time to break open the code. More to follow.
Cogito cogito ergo cogito sum. (Ambrose Bierce)
I drink therefore I am. (Monty Python)
Vista 32bit Home Premium SP2 / MM3.2.1.1297 Gold / Last.Fm 1.0.2.22 / IE8
Dell Inspiron 530 (1.8 Core2 / 2GB)
Skin: Vitreous Blue
Scripts: Add/Remove Playstat|Advanced Duplicate Find & Fix|Album Art Tagger|Backup|Batch Art Finder|Calculate Cover Size|Case&Leading Zero Fixer|DB_Audit|DB_Clean|DB_Schema|Event Logger|Genre Finder|Lyricator|Magic Nodes|MM2VLC|Monkey Rok|MusicIP Tagger|PUID Generator|RegExp Find & Replace|Right Click for Scripts|Scriptreloader|SQL Viewer|Stats(Filtered)|Tagging Inconsistencies
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Genre Finder 4.1 [MM2+3]

Post by trixmoto »

I've added the preservation list idea to my list, but I think it may be difficult to include in the current implementation so no promises! :)

One thing to double check is that once you've changed your settings you should restart MM, otherwise if you're in artist or album mode there is some caching that may produce so strange results. That "Jazzapedia" example is a bit worrying, please let me know if you find out what's causing that one! :-?
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.
Owyn
Posts: 2018
Joined: Fri Mar 21, 2008 10:55 am
Location: Canada

Re: Genre Finder 4.1 [MM2+3]

Post by Owyn »

I've already started putting the pieces in place. Hold off on any changes on your side for a day.

Diff, hopefully, to follow.

Edit:

Code: Select all

One thing to double check is that once you've changed your settings you should restart MM, otherwise if you're in artist or album mode there is some caching that may produce so strange results. That "Jazzapedia" example is a bit worrying, please let me know if you find out what's causing that one!
I am going to force a cache clear on run for the purposes of testing. I am making too many changes to restart each time, besides, it interrupts the music I'm playing. :D
Cogito cogito ergo cogito sum. (Ambrose Bierce)
I drink therefore I am. (Monty Python)
Vista 32bit Home Premium SP2 / MM3.2.1.1297 Gold / Last.Fm 1.0.2.22 / IE8
Dell Inspiron 530 (1.8 Core2 / 2GB)
Skin: Vitreous Blue
Scripts: Add/Remove Playstat|Advanced Duplicate Find & Fix|Album Art Tagger|Backup|Batch Art Finder|Calculate Cover Size|Case&Leading Zero Fixer|DB_Audit|DB_Clean|DB_Schema|Event Logger|Genre Finder|Lyricator|Magic Nodes|MM2VLC|Monkey Rok|MusicIP Tagger|PUID Generator|RegExp Find & Replace|Right Click for Scripts|Scriptreloader|SQL Viewer|Stats(Filtered)|Tagging Inconsistencies
Owyn
Posts: 2018
Joined: Fri Mar 21, 2008 10:55 am
Location: Canada

Re: Genre Finder 4.1 [MM2+3]

Post by Owyn »

Clearing cache had no impact on bug results. It does however make it much faster to do repetitive tests.

The problem is in the code starting at line 430.

Code: Select all

    If (str <> "") And (cnt >= min) Then
      arr = Split(que.Item("fld"),"|")
      For i = 0 To UBound(arr)
        fld = arr(i)  
        res = Acceptable(fld,str)
        If Not (res = "") Then
          fld = FieldToProp(Left(fld,1))
          If dic.Exists(fld) Then
            Dim tmp : tmp = dic.Item(fld)
            If Not IsDup(tmp,res) Then
              dic.Item(fld) = tmp&"; "&res
            End If                
          Else
            Call dic.Add(fld,res)
          End If
        End If
      Next
    Else
      If (Debug > 2) And (str <> "") And (cnt < min) Then
        Call out("'"&str&"' match value ("&cnt&") is below minimum ("&min&")")
      End If      
    End If
The code doesn't differentiate between whitelist or blacklist for a non-blank result from Acceptable.
Whitelist returns a value for items in or mapped by whitelist.
Blacklist returns a value for items not in blacklist.
Result. One or the other is always non-blank.
Cogito cogito ergo cogito sum. (Ambrose Bierce)
I drink therefore I am. (Monty Python)
Vista 32bit Home Premium SP2 / MM3.2.1.1297 Gold / Last.Fm 1.0.2.22 / IE8
Dell Inspiron 530 (1.8 Core2 / 2GB)
Skin: Vitreous Blue
Scripts: Add/Remove Playstat|Advanced Duplicate Find & Fix|Album Art Tagger|Backup|Batch Art Finder|Calculate Cover Size|Case&Leading Zero Fixer|DB_Audit|DB_Clean|DB_Schema|Event Logger|Genre Finder|Lyricator|Magic Nodes|MM2VLC|Monkey Rok|MusicIP Tagger|PUID Generator|RegExp Find & Replace|Right Click for Scripts|Scriptreloader|SQL Viewer|Stats(Filtered)|Tagging Inconsistencies
Owyn
Posts: 2018
Joined: Fri Mar 21, 2008 10:55 am
Location: Canada

Re: Genre Finder 4.1 [MM2+3]

Post by Owyn »

PS: Off to pull out a pile of debug code from my own version. It took me a bit to get my head around what was actually happening.

PPS: Also pulling out the code I started to work with for Unknown de-select. Best if I wait for something from you.

FYI: here is the code I used to clear the cache. Insert after line 190.

Code: Select all

  If ini.BoolValue("GenreFinder","ClearCache") Then
	If debug > 2 Then
		Dim cac1 : Set cac1 = SDB.Objects("GenreFinderCache")
		cac1.Removeall
		Set cac1 = Nothing
		Call out("Cache cleared...")
	End if
  End If
Cogito cogito ergo cogito sum. (Ambrose Bierce)
I drink therefore I am. (Monty Python)
Vista 32bit Home Premium SP2 / MM3.2.1.1297 Gold / Last.Fm 1.0.2.22 / IE8
Dell Inspiron 530 (1.8 Core2 / 2GB)
Skin: Vitreous Blue
Scripts: Add/Remove Playstat|Advanced Duplicate Find & Fix|Album Art Tagger|Backup|Batch Art Finder|Calculate Cover Size|Case&Leading Zero Fixer|DB_Audit|DB_Clean|DB_Schema|Event Logger|Genre Finder|Lyricator|Magic Nodes|MM2VLC|Monkey Rok|MusicIP Tagger|PUID Generator|RegExp Find & Replace|Right Click for Scripts|Scriptreloader|SQL Viewer|Stats(Filtered)|Tagging Inconsistencies
Post Reply