Page 1 of 1
Album Art Help
Posted: Thu Sep 22, 2005 3:08 pm
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
Posted: Fri Sep 23, 2005 12:49 am
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?

Posted: Fri Sep 23, 2005 5:16 am
by jackpoe
Maybe both
is that possible?
Posted: Fri Sep 23, 2005 6:10 am
by onkel_enno
With Jiri's Scripting Engine, nearly everything is possible
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
Posted: Fri Sep 23, 2005 3:55 pm
by jackpoe
HAHA - thanks, but...
What do I do with it?
Posted: Sat Sep 24, 2005 6:55 am
by psyXonova
Posted: Sat Sep 24, 2005 10:53 am
by judas
LOL...

Posted: Sun Sep 25, 2005 8:09 am
by onkel_enno
LOL
Thought you know how to work with scripts.
If not, you should describe what you want with more details.