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
Album Art Help
-
- Posts: 2153
- Joined: Fri Jan 14, 2005 1:45 am
- Location: Germany
- Contact:
-
- Posts: 2153
- Joined: Fri Jan 14, 2005 1:45 am
- Location: Germany
- Contact:
With Jiri's Scripting Engine, nearly everything is possible
Maybe that helps you a little:
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
-
- Posts: 2153
- Joined: Fri Jan 14, 2005 1:45 am
- Location: Germany
- Contact: