Missing Lyrics 1.3 - Update 11/01/2010

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

Moderators: Peke, Gurus

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Missing Lyrics 1.3 - Update 11/01/2010

Post by trixmoto »

This is a new script which creates a node under 'Files To Edit' which lists all the tracks in your current filter which do not have lyrics. This can then be used with my "Lyric Timer" script to quickly import lyrics from EvilLyrics and timestamp them.

The installer is available to download from my website.

Code: Select all

'
' MediaMonkey Script
'
' NAME: MissingLyrics 1.3
'
' AUTHOR: trixmoto (http://trixmoto.net)
' DATE : 11/01/2010
'
' INSTALL: Copy to Scripts\Auto\MissingLyrics.vbs
'
' Thanks to Psyxonova, my SQL guru!
' Thanks to DiddeLeeDoo for his more efficient code
' Thanks to Bex for the current filter code
'
' FIXES: Removed old MM2 code
'        Fixed to only show tracks in the current filter
'

Option Explicit

Sub OnStartup
  Dim node : Set node = SDB.Objects("MissingLyricsNode")
  If Not (node Is Nothing) Then
    node.Visible = False
  End If
  Set node = SDB.MainTree.CreateNode
  node.Caption = "Unknown Lyrics"
  node.IconIndex = 36
  node.UseScript = Script.ScriptPath
  node.OnFillTracksFunct = "ShowUnknown"
  Call SDB.MainTree.AddNode(SDB.MainTree.Node_FilesToEdit,node,2)
  Set SDB.Objects("MissingLyricsNode") = node
End Sub

Sub ShowUnknown(node)
  Dim sql : sql = "WHERE Songs.Lyrics=''"
  If Not (SDB.Database.ActiveFilterQuery = "") Then 
    sql = sql&" AND "&SDB.Database.ActiveFilterQuery
  End If
  SDB.MainTracksWindow.AddTracksFromQuery(sql)
  SDB.MainTracksWindow.FinishAdding
End Sub
Last edited by trixmoto on Wed Mar 19, 2008 4:35 pm, edited 3 times in total.
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.
nohitter151
Posts: 23640
Joined: Wed Aug 09, 2006 10:20 am
Location: NJ, USA
Contact:

Post by nohitter151 »

thanks trix!! now my life is complete!
nohitter151
Posts: 23640
Joined: Wed Aug 09, 2006 10:20 am
Location: NJ, USA
Contact:

Post by nohitter151 »

i found something weird.. i have this installed, it worked right away and showed the few songs i have without lyrics. i promptly found lyrics for them and pasted them into the properties, but 2 of my songs stay on the list even though i have lyrics for them. also, all of my tags have been sync'ed. why is it doing this?
DiddeLeeDoo
Posts: 1017
Joined: Wed Mar 01, 2006 1:09 am
Location: In a jungle down under
Contact:

Post by DiddeLeeDoo »

Trixmoto, you may want to try this as content in the sub

Code: Select all

    SQL="And Songs.ID IN (SELECT ID FROM Songs LEFT JOIN (SELECT IdSong FROM "&_
    "Memos WHERE MemoType=20000) As Lyr ON Songs.ID=Lyr.IdSong WHERE Lyr.IdSong Is Null)"
    SDB.MainTracksWindow.AddTracksFromQuery(SQL)
    SDB.MainTracksWindow.FinishAdding
Image
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

@nohitter - does restarting MM fix the problem?

@DiddleLeeDoo - thanks - I'll test this against mine for efficiency.
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.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

New version (1.1) is now available form my website - with improved efficiency thanks to DiddeLeeDoo. :)
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.
nohitter151
Posts: 23640
Joined: Wed Aug 09, 2006 10:20 am
Location: NJ, USA
Contact:

Post by nohitter151 »

no, i've restarted MM many times and the same 2 songs keep showing up. i'm going to try installing the new version, can i just install it right over the other one?
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex »

Good spotted DiddeLeeDoo!

The SQL in the first post does not give desired result. It actually only gives songs that exist in the memos table (i.e. has comments) AND does not have lyrics. So songs that doesn't have any comments or lyrics will not be displayed. This is due to the INNER JOIN link between Songs and Memos.

To get around it you'll have to do it as DiddeLeeDoo did, with an inline veiw linked by the LEFT JOIN syntax. That applies for all occasions when you want to find songs that doesnt exist in tables, which are linked to the Songs table with "One to Many" relationship. (i.e. Memos, Played, AddSongInfo and AddSongInfoInt)

Another way, which is equally fast, is this:

Code: Select all

and not exists (select * from memos where memotype = 20000 and idsong=songs.id)
/Bex
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
Teknojnky
Posts: 5537
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Post by Teknojnky »

You can also find files with no lyrics via auto-playlist:


Status is accessable
Lyrics equals ""

(leave lyrics value nothing)

and conversely, if you want to find files with lyrics, change the Lyrics equals, to does not equal.
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex »

Or with Magic Nodes:

Code: Select all

Songs with no lyrics|SQL filter: not exists (select * from memos where memotype = 20000 and idsong=songs.id)\<Artist>
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
DiddeLeeDoo
Posts: 1017
Joined: Wed Mar 01, 2006 1:09 am
Location: In a jungle down under
Contact:

Post by DiddeLeeDoo »

Gosh we're spoiled! ;)

Like that short version Bex!
Image
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

I used to do this with auto playlists - but I don't want to play all my songs without lyrics so I don't want them in a playlist. They needed editing, so I want them in a Files To Edit node! :)

Yes, version 1.1 can be installed over 1.0 - and this should fix your problem as described above.
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.
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex »

Yes, it's much nicer to have it in a Missing lyrics node!
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
DiddeLeeDoo
Posts: 1017
Joined: Wed Mar 01, 2006 1:09 am
Location: In a jungle down under
Contact:

Post by DiddeLeeDoo »

Did a tiny time test of the two SQLs and found that the two line one takes about 4 seconds and the one line one takes about 5 seconds.
Image
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

I'll leave the script as it is for the time being then! Until one of you comes up with something even faster! :lol:
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.
Post Reply