how filter songs by cover art size?
Moderator: Gurus
how filter songs by cover art size?
Just wondering, is there a way to filter songs by cover art size? I mean show only albums with a tagged image lower than 500*500 or any other size? I'm trying to update all my small size cover art, with better quality scans. I think, Trixmoto once mentioned something about a similar script, but i could not find the post. Thanks in advance, all help is appreciated!!
This is not possible with MediaMonkey. It should be possible with scripts, but it might take a lot of processing as image meta-data are not stored in the library.
Download MediaMonkey | License
Help: Knowledge Base | MediaMonkey for Windows 5 | MediaMonkey for Android
Lowlander (MediaMonkey user since 2003)
Help: Knowledge Base | MediaMonkey for Windows 5 | MediaMonkey for Android
Lowlander (MediaMonkey user since 2003)
-
- Posts: 2153
- Joined: Fri Jan 14, 2005 1:45 am
- Location: Germany
- Contact:
I've done a small Script some time ago. It scan through the Library and shows alls tracks that have Album Arts below the given resolution. (const Resolution)
Maybe it helps:
Tip: Save the Result in a Playlist if you don't want to perform the search each time again.
Maybe it helps:
Code: Select all
'Create a File LowResCover.vbs in MediaMonkey\Scripts
'and add the Following to Scripts.ini
'[LowResCover]
'FileName=LowResCover.vbs
'ProcName=OnStartUp
'Order=6
'DisplayName=Low Resolution Covers
'Description=Shows all Tracks, which Cover's have a low Quality
'Language=VBScript
'ScriptType=0
Option Explicit
const Resolution = 90000 '300x300
Sub OnStartUp()
Dim FSO
Dim SDB
Dim objShell
Dim Progress
Set FSO = CreateObject("Scripting.FileSystemObject")
Set SDB = CreateObject( "SongsDB.SDBApplication")
Set objShell = CreateObject("Shell.Application")
Set Progress = SDB.Progress
const SQLSelect = "SELECT Songs.ID, Medias.DriveLetter, Songs.SongPath, Covers.CoverPath, Artists.Artist, Songs.SongTitle"
const SQLFrom = "FROM Artists RIGHT JOIN ((Medias INNER JOIN Songs ON Medias.IDMedia = Songs.IDMedia) INNER JOIN Covers ON Songs.ID = Covers.IDSong) ON Artists.ID = Songs.IDArtist"
const SQLWhere = "WHERE Covers.CoverStorage=1"
Dim objFile
Dim objFolder
Dim objFolderItem
Dim Drive
Dim Path
Dim Cover
Dim RecordSet
Dim Width
Dim Height
Dim LowRes
SDB.MainTree.CurrentNode = SDB.MainTree.Node_MyComputer 'to get sure that no other Titles are displayed
SDB.MainTree.CurrentNode = SDB.MainTree.Node_Library
Set RecordSet = SDB.DataBase.OpenSQL("Select Count(*) " & SQLFrom & " " & SQLWhere)
Progress.MaxValue = RecordSet.ValueByIndex(0)
Progress.Value = 0
Set RecordSet = SDB.DataBase.OpenSQL(SQLSelect & " " & SQLFrom & " " & SQLWhere)
Do While not RecordSet.EoF
Progress.Text = SDB.Localize("Current song") & ": " & RecordSet.StringByName("Artist") & " - " & RecordSet.StringByName("SongTitle")
If Mid(RecordSet.StringByName("CoverPath"), 2, 1) = ":" Then
Cover = RecordSet.StringByName("CoverPath")
ElseIf Left(RecordSet.StringByName("CoverPath"), 2) = "\\" Then
'Network Path
Cover = RecordSet.StringByName("CoverPath")
Else
On Error Resume Next
If Left(RecordSet.StringByName("SongPath"), 2) = "\\" Then
'Network Path
Path = FSO.GetFile(RecordSet.StringByName("SongPath")).ParentFolder
Else
Drive = Chr(RecordSet.ValueByName("DriveLetter") + 65)
Path = FSO.GetFile(Drive & RecordSet.StringByName("SongPath")).ParentFolder
End If
On Error GoTo 0
Cover = Path & "\" & RecordSet.StringByName("CoverPath")
End If
'Check Resolution
if FSO.FileExists(Cover) then
Set objFile = FSO.GetFile(Cover)
Set objFolder = objShell.Namespace(objFile.ParentFolder + "\")
set objFolderItem = objFolder.ParseName(objFile.Name)
Width = objFolder.GetDetailsOf(objFolderItem, 27)
Height = objFolder.GetDetailsOf(objFolderItem, 28)
if (Right(Width, 5) = "Pixel") and (Right(Height, 5) = "Pixel") then
Width = Int(Left(Width, Len(Width) - 5))
Height = Int(Left(Height, Len(Height) - 5))
if (Width * Height) < Resolution then
LowRes = LowRes & RecordSet.StringByName("ID") & ", "
end if
end if
end if
RecordSet.Next
Progress.Increase
if Progress.Terminate then
Exit Do
end if
Loop
if Len(LowRes)>2 then
LowRes = Left(LowRes, Len(LowRes)-2)
Dim Tracks
Set Tracks = SDB.MainTracksWindow
Tracks.AddTracksFromQuery("And Songs.ID In (" + LowRes + ")")
Tracks.FinishAdding
Set Tracks = Nothing
end if
Set RecordSet = Nothing
Set FSO = Nothing
Set SDB = Nothing
Set Progress = Nothing
end Sub
-
- Posts: 2153
- Joined: Fri Jan 14, 2005 1:45 am
- Location: Germany
- Contact:
The Result is shown, when the Process is finished first. So wait and see.
Checking the album arts attached to the mp3 wasn't possible the time I wrote the script. I'll see if I can improve it.
EDIT:
Here it is:
Now you have to select the Tracks you want to check (maybe the whole library).
After the Process has finished, all Tracks are shown (or not) which have small Album Arts.
Checking the album arts attached to the mp3 wasn't possible the time I wrote the script. I'll see if I can improve it.
EDIT:
Here it is:
Now you have to select the Tracks you want to check (maybe the whole library).
After the Process has finished, all Tracks are shown (or not) which have small Album Arts.
Code: Select all
'Create a File LowResCover.vbs in MediaMonkey\Scripts
'and add the Following to Scripts.ini
'[LowResCover]
'FileName=LowResCover.vbs
'ProcName=OnStartUp
'Order=6
'DisplayName=Low Resolution Covers
'Description=Shows all Tracks, which Cover's have a low Quality
'Language=VBScript
'ScriptType=0
Option Explicit
const Resolution = 90000 '300x300
Sub OnStartUp()
Dim Progress
Dim Tracklist
Dim Track
Dim CoverList
Dim Cover
Dim a, b
Dim LowRes
Set Progress = SDB.Progress
Set Tracklist = SDB.SelectedSongList
Progress.MaxValue = Tracklist.Count-1
for a = 0 to Tracklist.Count-1
Set Track = Tracklist.Item(a)
Progress.Value = a
Progress.Text = SDB.Localize("Current song") & ": " & Track.ArtistName & " - " & Track.Title
Set CoverList = Track.AlbumArt
for b = 0 to CoverList.Count-1
Set Cover = Coverlist.Item(b).Image
if Cover.Height*Cover.Width<=Resolution then
LowRes = LowRes & Tracklist.Item(a).ID & ", "
Exit For
end if
Set Cover = Nothing
next
Set CoverList = Nothing
Set Track = Nothing
next
SDB.MainTree.CurrentNode = SDB.MainTree.Node_Library
if Len(LowRes)>2 then
LowRes = Left(LowRes, Len(LowRes)-2)
Dim Tracks
Set Tracks = SDB.MainTracksWindow
Tracks.AddTracksFromQuery("And Songs.ID In (" + LowRes + ")")
Tracks.FinishAdding
Set Tracks = Nothing
end if
Set Tracklist = Nothing
Set Progress = Nothing
end Sub