MusicBrainz NGS + AcoustId Tagger [MM3&4] v1.25 2012-01-29

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

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

Topic review
   

Expand view Topic review: MusicBrainz NGS + AcoustId Tagger [MM3&4] v1.25 2012-01-29

Re: MusicBrainz NGS + AcoustId Tagger [MM3&4] v1.25 2012-01-

by oeyoeve » Sat Apr 02, 2016 2:34 pm

I removed the MusicBrainz Tagger [MM3] v2.0 2008-03-29 and installed the NGS Tagger instead, but the result was depressing....
All it does is to add a number of fingerprintID's to my files, then it reports that no album was found in MB (!?)
I am just testing this on a few selected albums, all of which was found in MB using MusicBrainz Tagger [MM3] v2.0 2008-03-29 and Picard and FooBar2k, but fails with the NGS tagger.

I must be doing something wrong since everybody else seems so terribly happy with it....?
First of all, I do not see the point in having these fingerprints added to my tags. What I want is to have the basic MBID's added.
Then I read in the forum that this is impossible with MM4 (?). Well, MusicBrainz Tagger [MM3] v2.0 2008-03-29 did it perfectly well, so that cannot be true.

Can someone please lead me to the light... ?

Re: MusicBrainz NGS + AcoustId Tagger [MM3&4] v1.25 2012-01-

by Peke » Wed Oct 28, 2015 4:45 pm

Just follow instructions above.

Re: MusicBrainz NGS + AcoustId Tagger [MM3&4] v1.25 2012-01-

by Plotino » Mon Oct 26, 2015 3:53 am

Hi,

please, someone can tell me how apply the CUSTOM CODE?

Re: MusicBrainz NGS + AcoustId Tagger [MM3&4] v1.25 2012-01-

by wwootton1 » Thu Oct 02, 2014 9:02 am

Just found and started using this awesome script. The tgread is quite old. Just wondering if there is a more recent version or more current development on this I'm not finding.

Re: MusicBrainz NGS + AcoustId Tagger [MM3&4] v1.25 2012-01-

by Ekaf » Mon Jul 22, 2013 10:30 pm

I am probably missing something obvious here... But how can I use this amazing(!) addon to tag my songs with the composer field?! It frequently finds a match that shows me the composers (even labeled as composers:) but then does not tag them as such (all other fields seem to tag fine).

It may be tagging the composers into 'original lyricist'... Is there a way to just have 'composers' tagged as such? Ideally it would be great to also have other fields such as lyricist and writer onto composer.

If it is not possible to tag composers with this addon, are there others that will 'tag' onto the composer field?! How do others do it?

Re: MusicBrainz NGS + AcoustId Tagger [MM3&4] v1.25 2012-01-

by RetroSonic » Thu Jan 10, 2013 12:30 pm

MusicBrainz NGS fan wrote:I have also problem with Overflow expcetion on line 4176 and I found that there is problem with decimal separator if your default locale is not en-US. I'm using sk-SK and decimal separator for this culture is comma. then munkresme.xml looks like:

Code: Select all

<matrix><row><col>0,166666666666667</col></row></matrix>
and when munkres.exe is trying to proceed this xml, is throwing an error:

Code: Select all

ValueError: invalid literal for float(): 0,166666666666667
in this case, munkresindexes.xml stays empty and this causes error mentioned in previous post.

Code: Select all

Set objMunkresIndexes = objMunkresXML.selectNodes("/matrix/index")
this line returns empty array and next if statement will be true. foreach loop inside will be never executed and cost and i variables will stay initialized to zero.
logme call on line 4176 throws an exception because it tries to divide by zero:

Code: Select all

logme "cost: " & Round(cost / i, 6)
to fix this I made some changes to the function order_items (marked as CUSTOM CODE)

Code: Select all

Function order_items(items, trackinfo):
    '"""Orders the items based on how they match some canonical track
    'information. Returns a list of Items whose length is equal to the
    'length of ``trackinfo``. This always produces a result if the
    'numbers of items is at most the number of TrackInfo objects
    '(otherwise, returns None). In the case of a partial match, the
    'returned list may contain None in some positions.
    '"""
    '# Make sure lengths match: If there is less items, it might just be that
    '# there is some tracks missing.
    If items.Count > trackinfo.Count Then
			Set order_items = Nothing
			MunkresCost = 200
			Exit Function
		End If

		'to compare the dicts in case of issues:
'		For j = 0 To items.Count - 1
'			logme items.Item(j).Title & " - " & items.Item(j).TrackOrderStr
'		Next
'
'		For j = 0 To trackinfo.Count - 1
'			logme trackinfo.Item(j).Title & " - " & trackinfo.Item(j).TrackOrderStr
'		Next
	'CUSTOM CODE START
	Dim locale
	locale = GetLocale
	SetLocale("en-US")
	'CUSTOM CODE END

    '# Construct the cost matrix.
    j = 0
    Dim costs : Set costs = CreateObject("Scripting.Dictionary")
    xml = "<matrix>"
    For j = 0 To items.Count - 1
    	Set cur_item = items.Item(j)
    	'Set cur_item = items.Item(key)
    	xml = xml & "<row>"
      For i = 0 To trackinfo.Count - 1
      'For i, canon_item in enumerate(trackinfo):
       	xml = xml & "<col>" & track_distance(cur_item, trackinfo.Item(i), trackinfo.Item(i).TrackOrderStr, False) & "</col>"
       	SDB.ProcessMessages
        'row.append(track_distance(cur_item, canon_item, i+1))
      Next
      'costs.append(row)
    	xml = xml & "</row>"
    Next
    xml = xml & "</matrix>"

    Dim objFSO, logf
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Dim tmpXMLPath: tmpXMLPath = SDB.ScriptsPath & sScriptDir & "munkresme.xml"
    Set logf = objFSO.OpenTextFile(tmpXMLPath, 2, True)
    logf.WriteLine xml
		logf.Close
		Set logf = Nothing
		Set objFSO = Nothing
    
    '# Find a minimum-cost bipartite matching.
    'matching = Munkres().compute(costs)
    Set objMunkresXML = Munkres()

    '# Order items based on the matching.
    'ordered_items = [None]*len(trackinfo)
    'for cur_idx, canon_idx in matching:
    '    ordered_items[canon_idx] = items[cur_idx]
    'return ordered_items
    Set objMunkresIndexes = objMunkresXML.selectNodes("/matrix/index")
    If Not objMunkresIndexes Is Nothing Then
			
			'create a blank dict with the correct size
	    Dim ordered_items : Set ordered_items = CreateObject("Scripting.Dictionary")
	    For i = 0 To trackinfo.Count
	    	Set objTemp = Nothing
	    	ordered_items.Add i, objTemp
	    Next

			cost = 0.0
			i = 0
    	For Each mindex in objMunkresIndexes
    		i = i +1
    		Set nodeRow = mindex.selectSingleNode("row")
    		Set nodeCol = mindex.selectSingleNode("col")
    		Set nodeCost = mindex.selectSingleNode("cost")
    		rowindex = CInt(nodeRow.Text)
    		colindex = CInt(nodeCol.Text)
    		'logme nodeCost.Text
    		cost = cost + nodeCost.Text
    		'Set ordered_items.Item(colindex) = items.Item(rowindex)			'rowindex = index in NewTracks?  colindex= index in mbitems?
    		ordered_items.Item(rowindex) = colindex
    		'logme mindex.selectSingleNode("row").Text & ", " & mindex.selectSingleNode("col").Text
    	Next
		'CUSTOM CODE START
		If i > 0 Then
			logme "cost: " & Round(cost / i, 6)
			MunkresCost = Round(cost / i, 4)
			SetLocale(locale)
			Set order_items = ordered_items
		Else
			MunkresCost = 100
			SetLocale(locale)
			Set order_items = Nothing
		End If    
		'CUSTOM CODE END
    Else
    	MunkresCost = 100
		'CUSTOM CODE START
		SetLocale(locale)
		'CUSTOM CODE END
    	Set order_items = Nothing
    End If    
End Function
hope it helps.
Many thanks for this. It works like a charm...

Re: MusicBrainz NGS + AcoustId Tagger [MM3&4] v1.25 2012-01-

by karanits » Wed Nov 14, 2012 8:17 am

solution found for
Generating AcoustID Fingerprint for: <song path>... Failed

MM is installed in a directory which contains spaces. so putting fpcalc.exe in root of drive and hard-coding the location in the script corrected the problem.

so

Code: Select all

Dim fpcalcexe: fpcalcexe = fso.GetFile(SDB.ScriptsPath & sScriptDir & "fpcalc.exe").ShortPath
is changed to

Code: Select all

Dim fpcalcexe: fpcalcexe = fso.GetFile("d:\fpcalc.exe").ShortPath

Re: MusicBrainz NGS + AcoustId Tagger [MM3&4] v1.25 2012-01-

by karanits » Wed Nov 14, 2012 4:08 am

Hey i am getting error while generation AcoustID

Generating AcoustID Fingerprint for: <song path>... Failed

i know this has been asked before. I am using MM4, portable installation and on win 8. can anybody help. Can a portable installation have an effect on this script?
I have already tried replacing fpcalc.exe with chromaprint fpcalc.exe ... didnt work

Re: MusicBrainz NGS + AcoustId Tagger [MM3&4] v1.25 2012-01-

by xandora » Sun Nov 11, 2012 6:38 pm

I'm getting an issue when trying to apply the suggested tags using the Auto-Tag button.

Image

I'm using Windows 8, and this is the first time I've tried to tag an album since upgrading. Has anyone else run into this issue? Did you fix it?

EDIT: The issue is pointing to this line here:

Code: Select all

Line 3852:	  writetagscmd = "%comspec% /c " & writetagsexe & " write """ & fso.GetFile(mp3).ShortPath & """ """ &  tmpXMLPath & """"

Re: MusicBrainz NGS + AcoustId Tagger [MM3&4] v1.25 2012-01-

by bakker_be » Wed Nov 07, 2012 6:39 am

bakker_be wrote:Hi there,
all of a sudden, after months of flawless functioning this has started to act up. I get a message stating:

Code: Select all

Error #457 - This key is already associated with an element of this collection
this happens at line 1666, column 3.
OS: Win Server 2008 R2 (64-bit), fully up to date
MM: 4.0.6.1501 Gold
Update: it must have been something at either the Acoustid or the MusicBrainz end, as it's gone, tested it with the exact same albums that gave me the error.

Re: MusicBrainz NGS + AcoustId Tagger [MM3&4] v1.25 2012-01-

by bakker_be » Wed Nov 07, 2012 4:14 am

Hi there,
all of a sudden, after months of flawless functioning this has started to act up. I get a message stating:

Code: Select all

Error #457 - This key is already associated with an element of this collection
this happens at line 1666, column 3.
OS: Win Server 2008 R2 (64-bit), fully up to date
MM: 4.0.6.1501 Gold

Re: MusicBrainz NGS + AcoustId Tagger [MM3&4] v1.25 2012-01-

by booblers » Thu Sep 06, 2012 1:21 am

Did you read the security bulletin? At worst the flaw would result in high cpu utilization and that would only be if the hosts on the other side of the requests were compromised and interested in trolling you (musicbrainz, acoustid).

If you're really worried about it you might, in theory, be able to replace the dll with an updated one from 2.7.3 but you'd essentially have to install python to get it or find a replacement dll someone has posted online which is always going to be sketchy. Even after installing python you're likely going to have to generate the dll with py2exe and etc.

Maybe if musicbrainz or acoustid decide to start abusing my processor I'd goto the trouble of tracking down the build utilities and redoing it with 2.7.3 but it's not worth the effort at the moment since the threat is essentially 0.

Re: MusicBrainz NGS + AcoustId Tagger [MM3&4] v1.25 2012-01-

by dizman » Wed Sep 05, 2012 11:27 pm

Secunia is reporting the python27.dll is insecure, is there a way to remedy this?
Secunia Advisory
Dll Location on 64-bit Win7 machine:
C:\Users\Name\AppData\Roaming\MediaMonkey\Scripts\MusicBrainzTaggerNGS\munkres\python27.dll

Re: MusicBrainz NGS + AcoustId Tagger [MM3&4] v1.25 2012-01-

by cybermaven » Thu Aug 30, 2012 11:40 am

I'm running MM 4.0.6.1501. When installing the addon to my Win 7 Ultimate 64bit machine, MM freezes up. I am SO bummed out. :x This was absolute favorite addon.
ERROR:
Callstack location > user32.dll!75a32822()

Unhandled exception at 0x75a32822 in MediaMonkey.exe: 0xC000041D: An unhandled exception was encountered during a user callback.

Re: MusicBrainz NGS + AcoustId Tagger [MM3&4] v1.25 2012-01-

by Galdoran » Thu Jul 12, 2012 2:44 pm

OK. Tried it again and download worked this time!

Top