Page 25 of 26

Re: Lyricator - Batch Lyrics Updater v0.9.6b [MM3]

Posted: Fri Mar 12, 2010 6:33 pm
by Owyn
Say wrote:But i need save it globally for many... really many mp3 songs. :D Is it possible?
Well, No. Not directly with Lyricator any way.

You could:
- Get the lyrics for a track with Lyricator
- Edit Properties, Lyrics tab, select all and copy (Ctrl-A, Ctrl-C) the lyrics, Cancel edit
- Select all the tracks you want to apply the lyric to
- Edit Properties, Lyrics tab, paste the lyric (Ctrl-V) if needed, Click OK to Properties

Re: Lyricator - Batch Lyrics Updater v0.9.6b [MM3]

Posted: Sat Mar 13, 2010 7:22 am
by Say
Owyn wrote:
Say wrote:But i need save it globally for many... really many mp3 songs. :D Is it possible?
Well, No. Not directly with Lyricator any way.

You could:
- Get the lyrics for a track with Lyricator
- Edit Properties, Lyrics tab, select all and copy (Ctrl-A, Ctrl-C) the lyrics, Cancel edit
- Select all the tracks you want to apply the lyric to
- Edit Properties, Lyrics tab, paste the lyric (Ctrl-V) if needed, Click OK to Properties
I have about 10k songs... No, thaks :lol:

So there isn't anyway to download and save globally lyrics to ID3 tags? :(

Re: Lyricator - Batch Lyrics Updater v0.9.6b [MM3]

Posted: Sat Mar 13, 2010 8:59 am
by Owyn
What you are asking for does not make sense.
e.g. I spent some time yesterday getting all my tracks with title "I Saw The Light' correctly tagged. There are at least 3 distinct versions of this song title with different lyricists & lyrics, ie.
- Hank Williams, the most well known version
- Todd Rungren, the more recent song
- Rev. Gary Davis, a country blues

I finally ended up having to play each track to confirm which version it was.

How could Lyricator, or any other software, possibly resolve that?

Re: Lyricator - Batch Lyrics Updater v0.9.6b [MM3]

Posted: Sat Mar 13, 2010 12:00 pm
by Say
Sorry, English isn't my mother tongue.

I want:
- select about 10000 songs (or less, but not just one song :D )
- check for lyrics and wait
- lyrics collectively save into ID3 tag of every fonded ones
... finally read text during listening on my iPod Touch :)

Is it understandable? :oops:

Re: Lyricator - Batch Lyrics Updater v0.9.6b [MM3]

Posted: Sat Mar 13, 2010 12:17 pm
by Owyn
That is exactly what Lyricator does, however, I tend to work with smaller batches of similar tracks. I frequently find that tracks with no resulting lyrics are caused by tagging errors. GIGO (Garbage In, Garbage Out).

Re: Lyricator - Batch Lyrics Updater v0.9.6b [MM3]

Posted: Sat Mar 13, 2010 12:56 pm
by Say
Owyn wrote:That is exactly what Lyricator does, however, I tend to work with smaller batches of similar tracks. I frequently find that tracks with no resulting lyrics are caused by tagging errors. GIGO (Garbage In, Garbage Out).
Yes, I know but doesn't work correctly. Just sometimes and only for a few songs. So I asked for alternatives...

Re: Lyricator - Batch Lyrics Updater v0.9.6b [MM3]

Posted: Sat Mar 13, 2010 1:07 pm
by nohitter151
Say wrote:
Owyn wrote:That is exactly what Lyricator does, however, I tend to work with smaller batches of similar tracks. I frequently find that tracks with no resulting lyrics are caused by tagging errors. GIGO (Garbage In, Garbage Out).
Yes, I know but doesn't work correctly. Just sometimes and only for a few songs. So I asked for alternatives...
And I already listed them:
http://www.mediamonkey.com/forum/viewto ... 45#p247845

Re: Lyricator - Batch Lyrics Updater v0.9.6b [MM3]

Posted: Sat Mar 13, 2010 4:53 pm
by Boot
nohitter151 wrote:
Say wrote: Yes, I know but doesn't work correctly. Just sometimes and only for a few songs. So I asked for alternatives...
And I already listed them:
http://www.mediamonkey.com/forum/viewto ... 45#p247845
...which isn't what he needed.

Re: Lyricator - Batch Lyrics Updater v0.9.6b [MM3]

Posted: Sat Mar 13, 2010 5:38 pm
by nohitter151
Boot wrote:
nohitter151 wrote:
Say wrote: Yes, I know but doesn't work correctly. Just sometimes and only for a few songs. So I asked for alternatives...
And I already listed them:
http://www.mediamonkey.com/forum/viewto ... 45#p247845
...which isn't what he needed.
Ok fine. But that is it. There are no other alternatives other than that which are add-ons with MM.

Re: Lyricator - Batch Lyrics Updater v0.9.6b [MM3]

Posted: Sun Mar 14, 2010 7:46 am
by Say
nohitter151 wrote:... There are no other alternatives other than that which are add-ons with MM.
Ach, this is it. Thanks.

Re: Lyricator - Batch Lyrics Updater v0.9.6b [MM3]

Posted: Sun Mar 14, 2010 4:08 pm
by G-DIABLO
hello,
sorry for this later reply. (i renovate my room so my computer is disconnected for couple of days).
anyway i saw someone ask if the sites that lyricator use are maybe the source of the problem, but i checked it and it doesn't even get to the .js file, so it must be before this step.

and something else, if someone want to know how i change the script to work with hebrew:

note: i only use lyrics plugin site so i didn't check this changes for the other sites (because the lyrics plugin site find almost all the lyrics - after i run ip music tagger)

inside the if in line 44 i change the url to this url, (i took it from winamp plugin) with the origin url it doesn't worked.

Code: Select all

rLyricsPlugin = new Request({method:'get',url:'http://www.lyricsplugin.com/winamp03/plugin/',onSuccess:rSuccessLP,onException:rNextLP,onFailure:rNextLP,onCancel:rNextLP});
i create this function to replace the hebrew chars (i know i can do it with regular expression but it was faster for me to do it like this)(if someone want to change it to regular expression i will be happy).

Code: Select all

var replaceHebrewChars = function(s){
	s = replaceChars(s,'א',"%D7%90");
	s = replaceChars(s,'ב',"%D7%91");
	s = replaceChars(s,'ג',"%D7%92");
	s = replaceChars(s,'ד',"%D7%93");
	s = replaceChars(s,'ה',"%D7%94");
	s = replaceChars(s,'ו',"%D7%95");
	s = replaceChars(s,'ז',"%D7%96");
	s = replaceChars(s,'ח',"%D7%97");
	s = replaceChars(s,'ט',"%D7%98");
	s = replaceChars(s,'י',"%D7%99");
	s = replaceChars(s,'כ',"%D7%9B");
	s = replaceChars(s,'ל',"%D7%9C");
	s = replaceChars(s,'מ',"%D7%9E");
	s = replaceChars(s,'נ',"%D7%A0");
	s = replaceChars(s,'ס',"%D7%A1");
	s = replaceChars(s,'ע',"%D7%A2");
	s = replaceChars(s,'פ',"%D7%A4");
	s = replaceChars(s,'צ',"%D7%A6");
	s = replaceChars(s,'ק',"%D7%A7");
	s = replaceChars(s,'ר',"%D7%A8");
	s = replaceChars(s,'ש',"%D7%A9");
	s = replaceChars(s,'ת',"%D7%AA");
	
	s = replaceChars(s,'ם',"%D7%9D");
	s = replaceChars(s,'ך',"%D7%9A");
	s = replaceChars(s,'ף',"%D7%A3");
	s = replaceChars(s,'ן',"%D7%9F");
	s = replaceChars(s,'ץ',"%D7%A5");
	
	s = replaceChars(s,' ',"%20");
	 
	return s;
}
this is the replace char function (i dont remember if it was in the origin script, and because i dont have my computer i can't check it now).

Code: Select all

var replaceChars = function(entry, out, add) {
	temp = "" + entry; // temporary holder

	while (temp.indexOf(out)>-1) {
	pos= temp.indexOf(out);
	temp = "" + (temp.substring(0, pos) + add + temp.substring((pos + out.length), temp.length));

	}
	return temp;
}
i change searchSend function to be like this (of course you can ignore from the comment code).

Code: Select all

var searchSend = function(r, a, t) {
      
	//alert("title ->" + t + "   artist ->" + a);
	//var s = r.sendString.replace('%artist%', escape(replaceHebrewChars(a))).replace('%title%', escape(replaceHebrewChars(t)));// + '&random=' + $time();
	var s = r.sendString.replace('%artist%', a).replace('%title%', t);// + '&random=' + $time();
	
	s = replaceHebrewChars(s);
   //alert(s);
	r.send(s);
}

Re: Lyricator - Batch Lyrics Updater v0.9.6b [MM3]

Posted: Sun Mar 14, 2010 4:35 pm
by Owyn
Hmmm. Where did you get that substitution?

eg. Alef

Code: Select all

 s = replaceChars(s,'א',"%D7%90");
I thought that the Unicode hex would be x'05D0" (%05%D0).
http://www.i18nguy.com/unicode/hebrew.html

Edit:
Nevermind. UTF-8.
http://www.fileformat.info/info/unicode ... /index.htm

Re: Lyricator - Batch Lyrics Updater v0.9.6b [MM3]

Posted: Sun Mar 14, 2010 6:39 pm
by Owyn
@G-Diablo

Here is a fully tested encode function which should handle any of the character sets. I abstracted it from Trixmoto's Monkey Rok 5.0 script's Functions.vbs.

Encode.vbs

Code: Select all

' Code abstracted from Trixmoto's Monkey Rok script, Functions.vbs

Function EncodeUrl(sRawURL)
  'Const sValidChars = "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\/:" 'Owyn
  Const sAlpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
  Const sDigit = "1234567890"
  Const sSafe = "$-_@.&+-"
  Const sExtra = "!*""'(),"
  Const sExtAscii = "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ"
  Const sNonSpec = "\/:;#[]?"
  Dim sValidChars : sValidChars = sAlpha & sDigit & sSafe & sExtra & sNonSpec & sExtAscii
  Dim url : url = Replace(sRawURL,"+","%2B")
  If Len(url) > 0 Then
    Dim i : i = 1
    Do While i < Len(url)+1
      Dim s : s = Mid(url,i,1)
      If InStr(1,sValidChars,s,0) = 0 Then
        Dim d : d = AscW(s)
        If d < 0 Then
          d = d+65536
        End If      
        If d = 32 Or d > 65535 Then
          s = "+"
        Else
          If d < 128 Then
            s = DecToHex(d)
          ElseIf d < 2048 Then
            s = DecToUtf2(d)
          Else
            s = DecToUtf3(d)
          End If
        End If
      Else
        Select Case s
          Case "&"
            's = "%2526" 'Owyn
          Case "/"
            s = "%252F"
          Case "\"
            s = "%5C"
          Case ":"
            s = "%3A"
        End Select
      End If
      EncodeUrl = EncodeUrl&s
      i = i+1
    Loop
  End If
End Function

Function BinToHex(strBin)
  Dim d : d = 0
  Dim i : i = 0
  For i = Len(strBin) To 1 Step -1
    Select Case Mid(strBin,i,1)
      Case "0"
        'do nothing
      Case "1"
        d = d + (2^(Len(strBin)-i))
      Case Else
        BinToHex = "00"
        Exit Function
    End Select
  Next
  BinToHex = DecToHex(d)
End Function

Function DecToBin(intDec,e)
  DecToBin = ""
  Dim d : d = intDec
  While e >= 1
    If d >= e Then
      d = d - e
      DecToBin = DecToBin&"1"
    Else
      DecToBin = DecToBin&"0"
    End If
    e = e / 2
  Wend
End Function

Function DecToHex(d)
  If d < 16 Then
    DecToHex = "%0"&CStr(Hex(d))
  Else
    DecToHex = "%"&CStr(Hex(d))
  End If
End Function

Function DecToUtf2(d)
  Dim b : b = DecToBin(d,1024)
  Dim a : a = "110"&Left(b,5)
  b = "10"&Mid(b,6)
  DecToUtf2 = BinToHex(a)&BinToHex(b)
End Function 

Function DecToUtf3(d)
  Dim b : b = DecToBin(d,32768)
  Dim a : a = "1110"&Left(b,4)
  Dim c : c = "10"&Mid(b,11,6)
  b = "10"&Mid(b,5,6)
  DecToUtf3 = BinToHex(a)&BinToHex(b)&BinToHex(c)
End Function 

Function DecToUtf4(d)
  Dim b : b = DecToBin(d,557056)
  Dim a : a = "11110"&Left(b,3)
  Dim c : c = "10"&Mid(b,10,6)
  Dim e : e = "10"&Mid(b,16,6)
  b = "10"&Mid(b,4,6)
  DecToUtf4 = BinToHex(a)&BinToHex(b)&BinToHex(c)&BinToHex(e)
End Function 
Edit:
Usage example:

Code: Select all

html = html & "<div class=""artist"">" & EncodeUrl(.ArtistName)
Edit:
Updated code to include some missing subsidiary functions.

Edit:
Added ,-' to list of valid characters. Lyrics lookup not getting match with % substitutions of those characters

Edit:
This list needs a further expansion. Checking W3T spec for exact values.

Edit:
Updated code to pass through:
- Full W3T set (alpha|digit|safe|extra)
- Extended Ascii
This get's the yield from Lyricator back up to unmodified code levels.

Edit:
Added ;#[]? to NonSpec characters.

Re: Lyricator - Batch Lyrics Updater v0.9.6b [MM3]

Posted: Mon Mar 15, 2010 5:18 am
by Owyn
I tested using the samples provided at:
http://www.mediamonkey.comwww.mediamonk ... 45#p247868

Unmodified Lyricator failed on the cases where UTF-8 character sets were in Artist or Title tags. Worked with UTF-8 in Album (expected).

I appended the Encode.vbs code from the prior post to Lyricator.vbs and changed the code at 269 to use EncodeUrl.

Code: Select all

			'Owyn Added EncodeUrl 
			html = html & "<div class=""artist"">" & EncodeUrl(.ArtistName)
			If TryAllArtists Then
				If .Conductor <> "" Then html = html & ";" & EncodeUrl(.Conductor) End If
				If .InvolvedPeople <> "" Then html = html & ";" & EncodeUrl(.InvolvedPeople) End If
				If .Lyricist <> "" Then html = html & ";" & EncodeUrl(.Lyricist) End If
				If .MusicComposer <> "" Then html = html & ";" & EncodeUrl(.MusicComposer) End If
				If .OriginalArtist <> "" Then html = html & ";" & EncodeUrl(.OriginalArtist) End If
				If .OriginalLyricist <> "" Then html = html & ";" & EncodeUrl(.OriginalLyricist) End If
			End If
			html = html & "</div>"
			html = html & "<div class=""title"">" & EncodeUrl(.Title) & "</div>"
This eliminates the crashes in the test cases, but, does have cosmetic affects on the dialog.
I completed my test by getting Lyrics for a new album. Worked fine.

Hope this helps.

Re: Lyricator - Batch Lyrics Updater v0.9.6b [MM3]

Posted: Tue Mar 16, 2010 12:13 am
by Sirandar888
To those experiencing crashes using lyricator related to MSHTML.dll

Uninstall IE8 and lyricator will work again.