Newbie-Script: Import lyrics from Evillyrics (check code,pls

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

Moderators: Peke, Gurus

gh0st
Posts: 10
Joined: Wed Sep 26, 2007 7:20 pm
Contact:

Post by gh0st »

I get the same:

0 out of 1 lyrics imported
check lyrics manually etc....
I'm not waking up, I'm initiating my boot process.
gh0st
Posts: 10
Joined: Wed Sep 26, 2007 7:20 pm
Contact:

Post by gh0st »

Anything else I can do?
I'm not waking up, I'm initiating my boot process.
Big_Berny
Posts: 1784
Joined: Mon Nov 28, 2005 11:55 am
Location: Switzerland
Contact:

Post by Big_Berny »

Then you don't have installed the last version I posted here... As this version shows anaother message. Check my last post with code (last page).
Image
Scripts in use: Genre Finder / Last.fm DJ / Magic Nodes / AutoRateAccurate / Last.FM Node
Skins in use: ZuneSkin SP / Eclipse SP
AutoRateAccurate 3.0.0 (New) - Rates all your songs in less than 5 seconds!
About me: icoaching - internet | marketing | design
Vyper
Posts: 845
Joined: Tue May 23, 2006 5:53 pm

Post by Vyper »

Getting the same error as ghost and I've got your latest version.


Let me make sure I understand how this is supposed to work.


When I highlight a song in my database and then run this script, if there is a .txt file (formatted artist - title.txt) in the evillyrics/cache directory, the contents of that .txt file are written into the lyrics portion of the song's tag, correct?


If so, it's not working for me either.
Stop Button Freak
Big_Berny
Posts: 1784
Joined: Mon Nov 28, 2005 11:55 am
Location: Switzerland
Contact:

Post by Big_Berny »

Well with following script (which I already posted on the last page) it sould show you "Missing lyric-files:" and "Lyrics-tag already exists:".

This information is needed to find out where the problem is...

Code: Select all

EDIT: Code removed. Check the last post later in the thread.
Last edited by Big_Berny on Mon Oct 01, 2007 4:29 pm, edited 1 time in total.
Image
Scripts in use: Genre Finder / Last.fm DJ / Magic Nodes / AutoRateAccurate / Last.FM Node
Skins in use: ZuneSkin SP / Eclipse SP
AutoRateAccurate 3.0.0 (New) - Rates all your songs in less than 5 seconds!
About me: icoaching - internet | marketing | design
Vyper
Posts: 845
Joined: Tue May 23, 2006 5:53 pm

Post by Vyper »

The script from the last page is the one I used but just to be sure, I just tried the script on this page with the same result.

In the Evillyrics cache/B folder is Bobby Vinton - I Love How You Love Me.txt.

The script isn't putting anything into the lyrics tag of that song in my database when I highlight it and run the script.
Stop Button Freak
Big_Berny
Posts: 1784
Joined: Mon Nov 28, 2005 11:55 am
Location: Switzerland
Contact:

Post by Big_Berny »

Could you please read my posts! If you want me to find the bug I need more informations! Select a song where evillyrics shows the lyric but the script doesn't save it into the tag. Then select that song again, run my script and tell me the numbers behind "Missing lyric-files:" and "Lyrics-tag already exists:".

Thanks!
Image
Scripts in use: Genre Finder / Last.fm DJ / Magic Nodes / AutoRateAccurate / Last.FM Node
Skins in use: ZuneSkin SP / Eclipse SP
AutoRateAccurate 3.0.0 (New) - Rates all your songs in less than 5 seconds!
About me: icoaching - internet | marketing | design
Vyper
Posts: 845
Joined: Tue May 23, 2006 5:53 pm

Post by Vyper »

Big_Berny wrote:Could you please read my posts!
Calm down BB, I'd like to work with you on this .... I already said I was getting the same error as ghost but I'll do as you just requested.

Here's what I get when I select a song that Evillyrics says I have lyrics for:


Image


:)
Stop Button Freak
Big_Berny
Posts: 1784
Joined: Mon Nov 28, 2005 11:55 am
Location: Switzerland
Contact:

Post by Big_Berny »

Sorry, but it takes hours to find a bug if nobody follows my instructions.

Please use this version for a test on one of these songs and note the path which will be shown. After that click in windows on start/run, enter the exact path and click ok. Does the text-file with the lyric open? If not try to check the path by yourself and post it (the path) here please.

Code: Select all

EDIT: Code removed. Check last post.
Last edited by Big_Berny on Mon Oct 01, 2007 4:26 pm, edited 2 times in total.
Image
Scripts in use: Genre Finder / Last.fm DJ / Magic Nodes / AutoRateAccurate / Last.FM Node
Skins in use: ZuneSkin SP / Eclipse SP
AutoRateAccurate 3.0.0 (New) - Rates all your songs in less than 5 seconds!
About me: icoaching - internet | marketing | design
gh0st
Posts: 10
Joined: Wed Sep 26, 2007 7:20 pm
Contact:

Post by gh0st »

Berny, I deleted all previous versions of this script and made a new one jsut to be sure this is the correct one. I get:

0 out of 1 lyric imported

missing lyric-files: 1
Lyrics tag already exists: 0
I'm not waking up, I'm initiating my boot process.
Vyper
Posts: 845
Joined: Tue May 23, 2006 5:53 pm

Post by Vyper »

Okay, I replaced my script with the one in your last past and when I highlighted a song that doesn't have any lyrics in the tag but does have lyrics in Evillyrics' cache and ran your script, this is what I got:


Image


When I closed that error box, this one was behind it:


Image
Stop Button Freak
Big_Berny
Posts: 1784
Joined: Mon Nov 28, 2005 11:55 am
Location: Switzerland
Contact:

Post by Big_Berny »

Ok, I think I found the problem. Use this script. Should work now. At least I hope so...

Code: Select all

Sub EvilTagger 

'This scripts imports the Lyrics from Evillyrics 
'set the Evillyrics Cache options to "Cache organization ---> by first letter" 
' 
'Script will check if the lyrics.txt file of the selected songs exists 
'and import it then to the lyrics tag 
'Filename must be "Artist - Title.txt" 
'Possible erros are strange characters in the Artist or Title Tag, e.g. "C'est la vie" or "ä/22*~" 

'Here are the ini-Lines 
'[Eviltagger] 
'FileName=Eviltagger.vbs 
'ProcName=Eviltagger 
'Order=10 
'DisplayName=EvilTagger 
'Description=Import Lyrics from Evillyrics 
'Language=VBScript 
'ScriptType=0 


DIM path, filename 
DIM list, itm 
DIM headline,lyrics, line 
DIM msg, errorcounter, filecounter, ignored, msgtext 

'###################################################### 
'Set the Errorcounter to his starting point 
errorcounter = 0 
ignored = 0 

'Set the Path to the Evillyrics Lyrics 
'Evillyrics Options must be set to "Cache organization ---> by first letter"   --> see below 
path = "C:\Program Files\Evillyrics\Lyrics\" 
'###################################################### 

' Get list of selected tracks from MediaMonkey 
Set list = SDB.CurrentSongList 
filecounter = list.count 

' Process all selected tracks 
For i=0 To list.count-1 
   Set itm = list.Item(i) 

   If itm.Lyrics = "" Then 'Trixmoto - ignore tracks with lyrics already 
    
      '################################################## 
      'set the headline of the Lyrics 
      headline = itm.artistname & " - " & itm.title & CHR(10) &"___________________________________" & CHR(10) 
      '################################################## 
    
      ' Create Filename 
      ' by adding the first letter of the artist to the path ("Cache organization ---> by first letter") 
      'and then the Evillyrics scheme 
        
      Dim cap : cap = UCase(Left(itm.ArtistName,1)) 
      If InStr("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ÄÁÀÂÃËÉÈÊÏÍÌÎÖÓÒÔÕÜÚÙÛÑ¿",cap) = 0 Then 
         if cap = "-" then 
            cap = "" 
         else 
            cap = "_" 
         end if 
      end If 
      Dim art : art = correctfilename(itm.ArtistName) 
      Dim tit : tit = correctfilename(itm.Title) 
      
      filename = path & "\" & cap &"\" & art & " - " & tit & ".txt" 
      Set filesys = CreateObject("Scripting.FileSystemObject") 
      If filesys.FileExists(filename) = true and itm.lyrics= "" Then 
       Set file = filesys.OpenTextFile(filename, 1, false) 
         lyrics = "" 
         lyrics = headline 'add headline to the beginning of the Lyrics 
         Do while not file.AtEndOfStream 
          line = file.ReadLine 
          if line="----------------" then 
            exit do 
          end if 
            lyrics = lyrics & chr(10) & line 
         Loop 
        itm.lyrics = lyrics 'write Lyrics to the Lyrics tag 
          itm.UpdateDB 
          itm.WriteTags 
      Else 
         errorcounter = errorcounter+1 
      End if  
   Else 
     ignored = ignored+1 
   End If 
Next 

'##################################################### 
'set the final message 
msgtxt = filecounter-errorcounter-ignored & " of " & filecounter& " lyrics imported" & CHR(10) & CHR(10)& "Missing lyric-files:" & CHR(9) & CHR(9) & errorcounter & CHR(10) & "Lyrics-tag already exists:" & CHR(9) & ignored 
'##################################################### 

'final user information 
Msg = SDB.MessageBox(msgtxt , mtInformation, Array(mbOk)) 

End sub 

Function correctfilename(str) 'Trixmoto - replaces special characters with underscore 
   Dim i,cap 
   For i = 1 To Len(str) 
      cap = Mid(str,i,1) 
      If InStr("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ÄÁÀÂÃËÉÈÊÏÍÌÎÖÓÒÔÕÜÚÙÛÑ¿. ",UCase(cap)) = 0 Then 
         if cap = "-" then 
            cap = "" 
         else 
            cap = "_" 
         end if 
       End If 
    correctfilename = correctfilename&cap 
   Next 
End Function
Image
Scripts in use: Genre Finder / Last.fm DJ / Magic Nodes / AutoRateAccurate / Last.FM Node
Skins in use: ZuneSkin SP / Eclipse SP
AutoRateAccurate 3.0.0 (New) - Rates all your songs in less than 5 seconds!
About me: icoaching - internet | marketing | design
Vyper
Posts: 845
Joined: Tue May 23, 2006 5:53 pm

Post by Vyper »

Awesome! Works like a charm now! You da man! Image
Stop Button Freak
Big_Berny
Posts: 1784
Joined: Mon Nov 28, 2005 11:55 am
Location: Switzerland
Contact:

Post by Big_Berny »

Well, it was a really stupid 'bug':

Code: Select all

'Set the Path to the Evillyrics Lyrics 
'Evillyrics Options must be set to "Cache organization ---> by first letter"   --> see below 
path = "C:\Program Files\Evillyrics\Lyrics\"
This lines you had to modify because there was 'C:\Programme\...' as I use a german windows. And the '%programfiles%' didn't work at all altough it showes correct in a messagebox... MM-Bug?

So maybe you have to modify the path-line if you use a non-english windows. Here with german vista 'program files' works too.
Image
Scripts in use: Genre Finder / Last.fm DJ / Magic Nodes / AutoRateAccurate / Last.FM Node
Skins in use: ZuneSkin SP / Eclipse SP
AutoRateAccurate 3.0.0 (New) - Rates all your songs in less than 5 seconds!
About me: icoaching - internet | marketing | design
gh0st
Posts: 10
Joined: Wed Sep 26, 2007 7:20 pm
Contact:

Post by gh0st »

Berny, it works! Thanks for all the help, you rock!
I'm not waking up, I'm initiating my boot process.
Post Reply