Script Help - Editing Album Art

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Script Help - Editing Album Art

by trixmoto » Tue Apr 01, 2008 6:35 am

Sounds like a good idea - I'm sure he won't mind as long as you mention the fact that it's a modification of his script. Maybe send him a PM first to see what he thinks. :)

by fenrir » Tue Apr 01, 2008 6:30 am

thank u so much..

i'd give it a go..
Basically modifying WebSearch Panels script to add more buttons other than the default Lyrics & Comment button.

Thinking of adding a button for as many Tags as possible. Have all of them working (with the clean up text) except for the AlbumArt part.

Hope jn does not mind

by trixmoto » Tue Apr 01, 2008 6:21 am

I think you need to have a physical file, unfortunately. Personally I've found this method best...

Code: Select all

Set img = itm.AlbumArt.AddNew            
img.RelativePicturePath = relpath(newpath,itm.Path)
img.ItemType = 3
img.ItemStorage = 0
Where "relpath" is...

Code: Select all

Function relpath(relp,path)
  relpath = relp
  Dim temp : temp = Left(path,InStrRev(path,"\"))
 
  'check same folder
  If InStr(relp,temp) = 1 Then
    relpath = Mid(relp,Len(temp)+1)
    Exit Function
  End If
 
  'check parent folders
  If Left(temp,2) = "\\" Then
    temp = Mid(temp,3)
  End If
  If Left(relp,2) = "\\" Then
    relp = Mid(relp,3)
  End If
  Dim tp : tp = Left(temp,InStr(temp,"\"))
  Dim tr : tr = Left(relp,InStr(relp,"\"))
  If (UCase(tp) = UCase(tr)) Then
    While (UCase(tp) = UCase(tr))
      temp = Mid(temp,Len(tp)+1)
      relp = Mid(relp,Len(tr)+1)
      tp = Left(temp,InStr(temp,"\"))
      tr = Left(relp,InStr(relp,"\"))
    WEnd
    relpath = ""
    While (InStr(temp,"\") > 0)
      relpath = relpath&"..\"
      temp = Mid(temp,Len(tp)+1)
      tp = Left(temp,InStr(temp,"\"))
    WEnd
    relpath = relpath&relp
  End If
End Function

by fenrir » Tue Apr 01, 2008 3:43 am

Umm.. another help..
SDBAlbumArtItem does not allow to set an Image property..

Any idea how to add an art to the AlbumArt tag?

I would rather not create an image at the temp location and then add it via PicturePath, as far as possible ie.

by trixmoto » Tue Apr 01, 2008 3:21 am

Yeah, AlbumArt is what you're after. :)

by fenrir » Tue Apr 01, 2008 12:15 am

Nevermind. Got it

.AlbumArt

Script Help - Editing Album Art

by fenrir » Tue Apr 01, 2008 12:05 am

How do i access the Cover ?

Code: Select all

   	
With SDB.Player.CurrentSong
        .Covers = GetImageFromClipboard
        .UpdateDB
        .WriteTags
End With
.Covers = GetImageFromClipboard //// .Covers is wrong here.. any idea what it should be?

I'm trying to write the current image on the clipboard to the song's album art

Top