Album Art Help

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

Moderators: Peke, Gurus

jackpoe
Posts: 3
Joined: Thu Sep 22, 2005 3:06 pm

Album Art Help

Post by jackpoe »

Can anyone tell me how to assign the image file name to a field? For instance - say I select all 10 tracks in an album and I assign one image as the album art - I need the file name recorded as part of the database.

Help!
Thanks in advance
-Jack
onkel_enno
Posts: 2153
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

Post by onkel_enno »

For the stupid ones like me:
Do you want to know which album arts are already linked to these tracks or do you want to add a new album art to these tracks?
8)
jackpoe
Posts: 3
Joined: Thu Sep 22, 2005 3:06 pm

Post by jackpoe »

Maybe both :D
is that possible?
onkel_enno
Posts: 2153
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

Post by onkel_enno »

With Jiri's Scripting Engine, nearly everything is possible :lol:

Maybe that helps you a little:

Code: Select all

Dim SDB
Set SDB = CreateObject( "SongsDB.SDBApplication")

Dim Songs
Set Songs = SDB.SelectedSongList

Dim a
Dim strSongs
for a = 0 to Songs.Count -1
	if strSongs <> "" then strSongs = strSongs & ", "
	strSongs = strSongs & Songs.Item(a).ID
next

Dim SQL
SQL =       "SELECT FIRST(Songs.SongPath) AS SongPath, Covers.CoverPath, Medias.DriveLetter "
SQL = SQL & "FROM (Songs INNER JOIN Covers ON (Songs.ID = Covers.IDSong AND Songs.ID IN (" & strSongs & "))) "
SQL = SQL & "     INNER JOIN Medias ON Songs.IDMedia = Medias.IDMedia "
SQL = SQL & "GROUP BY Covers.CoverPath, Covers.CoverType, Medias.DriveLetter "
SQL = SQL & "HAVING Covers.CoverType = 3"

Dim DS
Set DS = SDB.DataBase.OpenSQL(SQL)

Dim Drive
Dim Cover
while not DS.EOF
	
	if mid(DS.StringByName("CoverPath"), 2, 1) =":" then
		Cover = DS.StringByName("CoverPath")
	else
		Drive = Chr(DS.ValueByName("DriveLetter") + 65)
		Path =  Mid(DS.StringByName("SongPath"), 1, InstrRev(DS.StringByName("SongPath"), "\"))
		Cover = Drive & Path & DS.StringByName("CoverPath")
	end if
	
	msgbox Cover
	
	DS.Next
Wend
jackpoe
Posts: 3
Joined: Thu Sep 22, 2005 3:06 pm

Post by jackpoe »

HAHA - thanks, but...
What do I do with it?
psyXonova
Posts: 785
Joined: Fri May 20, 2005 3:57 am
Location: Nicosia, Cyprus
Contact:

Post by psyXonova »

jackpoe wrote:HAHA - thanks, but...
What do I do with it?
:roll: :-? :o :( :-?
judas
Posts: 572
Joined: Thu Jun 02, 2005 11:26 pm
Location: Bogotá, Colombia

Post by judas »

LOL... :P
onkel_enno
Posts: 2153
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

Post by onkel_enno »

LOL

Thought you know how to work with scripts.
If not, you should describe what you want with more details.
Post Reply