Lyricsplugin Search Script

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

fenrir
Posts: 35
Joined: Tue Feb 12, 2008 12:05 pm

Post by fenrir » Wed Feb 13, 2008 12:55 pm

first post here =)

Love yr script. It is really amazing how fast the lyrics are searched.

But facing the same problem too. Also, any plan for a batch tagging. I mean no user intervention

Anyway kudos for the script. Really hope the error mentioned above is fixed soon

spacefish
Posts: 1427
Joined: Mon Jan 14, 2008 7:21 am
Location: Denmark

Post by spacefish » Thu Feb 14, 2008 4:22 am

Okay, this is pretty much happening at least once (and more!) on every album. It makes this method pretty much useless.

Does anyone have any idea what needs to be fixed? I'd be happy to edit the script myself if someone just tells me what to paste where. :cry:
Image
MM Gold 3.0.3.1183 : Vista HP SP1 (x86) : Zen Stone (2GB)
Zekton: An original MM3 skin by Eyal.
Scripts in Use: Add/Remove PlayStat | Auto Album DJ | AutoRateAccurate | Backup
Case & Leading Zero Fixer | Classification & Genre Changer | Clean Scripts.ini | Clear
Field | Custom Report | Discogs Auto-Tag Web Search | Forget Crossfade | Invert
Selection/Select None | Last 100... | Lyricator | Lyrics to Instrumental | MonkeyRok
MusicBrainz Tagger | My Custom Nodes | Now Playing Art Node | Play History & Stats
Right Click for Reports | Right Click for Scripts | Right Click for Web | Stop After Current
WebNodes

drjboulder
Posts: 1119
Joined: Mon Apr 09, 2007 12:03 am
Location: Boulder, Colorado, USA

Post by drjboulder » Thu Feb 14, 2008 4:31 am

spacefish wrote:Okay, this is pretty much happening at least once (and more!) on every album. It makes this method pretty much useless.

Does anyone have any idea what needs to be fixed? I'd be happy to edit the script myself if someone just tells me what to paste where. :cry:
I am scripting illiterate, but it must be some kind of time out issue.
BTW, when I get the error I switch to the next song and then switch back and it tags without problem.

But, yeah that is a PITA also.
D Rock
Image
MediaMonkeyGoldv3.0.3.1183
Vista Home Basic|4thGen 20GPod
Zune Small Player Skin w/ Aqua 4 Player Mod
Backup | Last FM Node | Scrobbler DJ | TopTracks | StayInSameStyleDJ
RadioDJ | RadioFreeMonkey | PrettyPictures | MiniLyricsEmbedder
LyricsViewer | Lyricator | LyricsPlugin | VisualizationEmbedder | MonkeyRok
RightClickForWeb | WebSearchPanels | WebNodes | MagicNodes | FavoritesNodes
NowPlayingArtNode |AutoRateAccurate | TaggingInconsistencies
AdvancedDuplicateFind&Fix | CaseModify | PlayHistory&Stats | Etc...

fenrir
Posts: 35
Joined: Tue Feb 12, 2008 12:05 pm

Post by fenrir » Thu Feb 14, 2008 4:43 am

Guess I spoke too soon.

It not working for any songs any more.. Tried restarting MM n everything.. Shows the lyrics but does not save it.. I'd see if i can do somethin abt the problem myself

spacefish
Posts: 1427
Joined: Mon Jan 14, 2008 7:21 am
Location: Denmark

Post by spacefish » Thu Feb 14, 2008 7:28 am

drjboulder wrote:
spacefish wrote:Okay, this is pretty much happening at least once (and more!) on every album. It makes this method pretty much useless.

Does anyone have any idea what needs to be fixed? I'd be happy to edit the script myself if someone just tells me what to paste where. :cry:
I am scripting illiterate, but it must be some kind of time out issue.
BTW, when I get the error I switch to the next song and then switch back and it tags without problem.
That doesn't work for me otherwise I'd just deal with it. I can "get lucky" and have it tag after closing the auto-tag window, but usually I need to restart MM for it to start working again. Until it doesn't.
Image
MM Gold 3.0.3.1183 : Vista HP SP1 (x86) : Zen Stone (2GB)
Zekton: An original MM3 skin by Eyal.
Scripts in Use: Add/Remove PlayStat | Auto Album DJ | AutoRateAccurate | Backup
Case & Leading Zero Fixer | Classification & Genre Changer | Clean Scripts.ini | Clear
Field | Custom Report | Discogs Auto-Tag Web Search | Forget Crossfade | Invert
Selection/Select None | Last 100... | Lyricator | Lyrics to Instrumental | MonkeyRok
MusicBrainz Tagger | My Custom Nodes | Now Playing Art Node | Play History & Stats
Right Click for Reports | Right Click for Scripts | Right Click for Web | Stop After Current
WebNodes

MyCsPiTTa
Posts: 128
Joined: Fri Dec 21, 2007 4:56 pm

Post by MyCsPiTTa » Thu Feb 14, 2008 3:55 pm

I'm a little confused. Does this do the same as Miilyrics (i.e. search and scroll lyrics) but with the advantage that it can add lyrics to your whole library, not just the playing song? That'd be cool.

nohitter151
Posts: 23640
Joined: Wed Aug 09, 2006 10:20 am
Location: NJ, USA
Contact:

Post by nohitter151 » Thu Feb 14, 2008 4:09 pm

MyCsPiTTa wrote:I'm a little confused. Does this do the same as Miilyrics (i.e. search and scroll lyrics) but with the advantage that it can add lyrics to your whole library, not just the playing song? That'd be cool.
No, it gets plain (static) lyrics, and I believe only for 1 track at a time (correct me if I'm wrong), using a similar interface as "Auto Tag from Web".
MediaMonkey user since 2006
Need help? Got a suggestion? Can't find something?

Please no PMs in reply to a post. Just reply in the thread.

drjboulder
Posts: 1119
Joined: Mon Apr 09, 2007 12:03 am
Location: Boulder, Colorado, USA

Post by drjboulder » Thu Feb 14, 2008 10:42 pm

nohitter151 wrote:
MyCsPiTTa wrote:I'm a little confused. Does this do the same as Miilyrics (i.e. search and scroll lyrics) but with the advantage that it can add lyrics to your whole library, not just the playing song? That'd be cool.
No, it gets plain (static) lyrics, and I believe only for 1 track at a time (correct me if I'm wrong), using a similar interface as "Auto Tag from Web".
Exactly, except the interface is not similar - it is one and the same.
D Rock
Image
MediaMonkeyGoldv3.0.3.1183
Vista Home Basic|4thGen 20GPod
Zune Small Player Skin w/ Aqua 4 Player Mod
Backup | Last FM Node | Scrobbler DJ | TopTracks | StayInSameStyleDJ
RadioDJ | RadioFreeMonkey | PrettyPictures | MiniLyricsEmbedder
LyricsViewer | Lyricator | LyricsPlugin | VisualizationEmbedder | MonkeyRok
RightClickForWeb | WebSearchPanels | WebNodes | MagicNodes | FavoritesNodes
NowPlayingArtNode |AutoRateAccurate | TaggingInconsistencies
AdvancedDuplicateFind&Fix | CaseModify | PlayHistory&Stats | Etc...

Juanitoc

Re: error message

Post by Juanitoc » Fri Feb 22, 2008 7:28 pm

irshjet35 wrote:nice script although I get an error when trying to get the lyrics, I get an VBS Runtime error #424 object required 'lyrics' line 74 column 25. I can click past it and it works, just annoying
I finally found how to fix this problem!!! :D

replace the corresponding piece of code with this:



...............
url = "http://www.lyricsplugin.com/winamp03/plugin/?title=" & title & "&artist=" & artist
Browser.Interf.Navigate url

Set Tmr = SDB.CreateTimer(40)
Script.RegisterEvent Tmr, "OnTimer", "WebsiteLoaded"
End If

dim Doc
End Sub

Sub WebsiteLoaded(Timer)
Script.UnregisterEvents Tmr
Set Tmr = Nothing

If Len(Browser.Interf.LocationURL) < 10 Then ' A trick - wait until navigation to the search results page starts
Set Tmr = SDB.CreateTimer(40)
Script.RegisterEvent Tmr, "OnTimer", "WebsiteLoaded"
Exit Sub
End If

If Browser.Interf.ReadyState = 1 Or Browser.Interf.Busy Then
Set Tmr = SDB.CreateTimer(40)
Script.RegisterEvent Tmr, "OnTimer", "WebsiteLoaded"
Exit Sub
End If


Set Doc = Browser.Interf.Document
If IsObject(Doc) Then
Set lyrics = Doc.getElementById("lyrics")
...............

Guest

Post by Guest » Sat Feb 23, 2008 8:11 am

Hey, can you please explain the steps in a little more detail ?

justin_f
Posts: 92
Joined: Thu Nov 22, 2007 11:41 am
Location: Valpo, IN
Contact:

Post by justin_f » Sat Feb 23, 2008 5:05 pm

@ Juanitoc

Nicely done! I love this script, but that error was becoming a serious nuisance.

@ Guest

To use the fix described above, open up lyricsplugin.vbs, and locate the section of code that Juanitoc is referencing above. I believe that the line beginning " url =" is line 54. Start from there, and anything that Juanitoc has put in bold needs to be changed in lyricsplugin.vbs. The large section in bold (beginning with "If Len(Browser.Interf.LocationURL)") needs to be added to the code. Just paste it in the appropriate spot. Feel free to PM me if you have any questions.

Justin

Vyper
Posts: 845
Joined: Tue May 23, 2006 5:53 pm

Post by Vyper » Sat Feb 23, 2008 8:05 pm

Would someone do an old guy a favor and just repost the whole code with the fix?


:D
Stop Button Freak

spacefish
Posts: 1427
Joined: Mon Jan 14, 2008 7:21 am
Location: Denmark

Post by spacefish » Sun Feb 24, 2008 12:22 am

Thank you, Juanitoc! Seems to be working fine here. :D
Vyper wrote:Would someone do an old guy a favor and just repost the whole code with the fix?
Here ya go :)

Code: Select all

' Lyrics Plugin Search script
'
' This script is a plug-in into MediaMonkey Web Search dialog. You should save it to Scripts folder as
' lyricsplugin.vbs. It has to be in Scripts.ini file, where entries can be as follows:
'
' [SearchAMG]
' FileName=lyricsplugin.vbs
' ProcName=lyricsplugin
' Order=99
' DisplayName=lyricsplugin
' Language=VBScript
' ScriptType=3

' Global
Dim Browser
Dim Tmr
Dim Current

Sub StartSearch(Panel, SearchTerm, SearchArtist, SearchAlbum)
     Set Browser = SDB.UI.NewActiveX(Panel, "Shell.Explorer")
     Browser.Common.Align = 5 

     Dim Tracks
     Dim Results

     Set Tracks = SDB.Tools.WebSearch.NewTracks
     Set Results = SDB.NewStringList
    
     For i = 0 to Tracks.Count-1
          Results.Add Tracks.item(i).ArtistName & " - " & Tracks.item(i).Title
     Next

     SDB.Tools.WebSearch.SetSearchResults Results
     If Results.Count > 0 Then
          SDB.Tools.WebSearch.ResultIndex = 0
     End If
End Sub

Sub ShowResult(ResultID)
     If (ResultID >= 0)  Then
          Browser.SetHTMLDocument ""

          With SDB.Tools.WebSearch
               .ClearTracksData 
               .TrackChecked(ResultID) = True
               Set Track = .NewTracks.Item(ResultID)
          End With
          
          With Track
               title = .Title
               artist = .ArtistName
          End With
          
          url = "http://www.lyricsplugin.com/plugin/?title=" & title & "&artist=" & artist
          Browser.Interf.Navigate url
          
          Set Tmr = SDB.CreateTimer(40)
          Script.RegisterEvent Tmr, "OnTimer", "WebsiteLoaded"
     End If
     
     dim Doc
End Sub

Sub WebsiteLoaded(Timer)
     Script.UnregisterEvents Tmr
     Set Tmr = Nothing

If Len(Browser.Interf.LocationURL) < 10 Then ' A trick - wait until navigation to the search results page starts
Set Tmr = SDB.CreateTimer(40)
Script.RegisterEvent Tmr, "OnTimer", "WebsiteLoaded"
Exit Sub
End If

If Browser.Interf.ReadyState = 1 Or Browser.Interf.Busy Then
Set Tmr = SDB.CreateTimer(40)
Script.RegisterEvent Tmr, "OnTimer", "WebsiteLoaded"
Exit Sub
End If 

     Set Doc = Browser.Interf.Document
     If IsObject(Doc) Then
          Set lyrics = Doc.getElementById("lyrics")
          If IsObject(lyrics) Then
               For i = 0 To SDB.Tools.WebSearch.NewTracks.Count - 1
                    If SDB.Tools.WebSearch.TrackChecked(i)  Then
                         SDB.Tools.WebSearch.NewTracks.Item(i).Lyrics = lyrics.innerText
                    End If
               Next
               SDB.Tools.WebSearch.RefreshViews 
          End If
     End If
End Sub

Sub FinishSearch(Panel)
     Browser.Common.DestroyControl      
     Set Browser = Nothing              
End Sub
Image
MM Gold 3.0.3.1183 : Vista HP SP1 (x86) : Zen Stone (2GB)
Zekton: An original MM3 skin by Eyal.
Scripts in Use: Add/Remove PlayStat | Auto Album DJ | AutoRateAccurate | Backup
Case & Leading Zero Fixer | Classification & Genre Changer | Clean Scripts.ini | Clear
Field | Custom Report | Discogs Auto-Tag Web Search | Forget Crossfade | Invert
Selection/Select None | Last 100... | Lyricator | Lyrics to Instrumental | MonkeyRok
MusicBrainz Tagger | My Custom Nodes | Now Playing Art Node | Play History & Stats
Right Click for Reports | Right Click for Scripts | Right Click for Web | Stop After Current
WebNodes

Vyper
Posts: 845
Joined: Tue May 23, 2006 5:53 pm

Post by Vyper » Sun Feb 24, 2008 9:12 am

Thank you spacefish. :D
Stop Button Freak

Guest

Post by Guest » Tue Feb 26, 2008 1:56 am

nynaevelan wrote:
jn wrote:
nynaevelan wrote:As it is, it is nice but it would be nice to have something a little more automated.
Hm.. I personally dislike everything which runs automatically, as normally that will destroy things :-D
When I say automatically, I mean an option to easily save the tracks without having to keep going into a dialog for individual tracks. For instance, if you take a look at Trixmoto's Batch Album Art script, it gives you a list of all the art for all the tracks which you selected, and you get the option of which ones to save and which ones to skip. The majority of the time I am editing tracks in batch format, and an easier way to do this would be great. Especially since I still have over 1000 tracks which I need to find lyrics for.

Nyn
Please please please add the mass tagging option!! this is all this script requires now

Post Reply