Script doesn't work, please help....

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

Moderators: Peke, Gurus

SpOiLeR
Posts: 14
Joined: Fri Dec 05, 2003 4:57 pm

Script doesn't work, please help....

Post by SpOiLeR »

Script below doesn't work. It does it's job but when I change the view
and then get back, tracks that were previously updated now again have old
AlbumArtist data. Is this a bug of sripting system or I'm doing something
wrong? Plese help... I am able to change track properties manually and then
these changes are permanent, but if I do it with this script, changes
disapear... (MediaMonkey 2.4.2.874, WinXP SP2)

Code: Select all

' A simple script that copies the content of Artist 
' field into Album Artist of selected tracks

' [CopyAlbumArtistArtist]
' FileName=CopyAlbumArtistArtist.vbs
' ProcName=CopyAlbumArtistArtist
' Order=4
' DisplayName=&Artist => Album Artist
' Description=Copy Artist into Album Artist
' Language=VBScript
' ScriptType=0

Sub CopyAlbumArtistArtist
  ' Define variables
  Dim list, itm, i

  ' Get list of selected tracks from MediaMonkey
  Set list = SDB.SelectedSongList
  If list.count=0 Then
  Set list = SDB.AllVisibleSongList
  End If

  ' Process all selected tracks
  For i=0 To list.count-1
    Set itm = list.Item(i)

    ' copy the fields
    itm.AlbumArtistName = itm.ArtistName

    ' Update the changes in DB
    itm.UpdateDB
  Next
End Sub
tvjunky
Posts: 5
Joined: Sun Aug 21, 2005 12:58 pm

Post by tvjunky »

I think the reason you are experiencing this behavior is because the wrong AlbumArtist is reread from the file's Tag whenever you reload the folder. Calling "itm.WriteTags" for every song will probably solve your problem.
If you're bored also have a look at the help file.

hth, tvjunky
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Also, if you don't have an <album> specified then the <album artist> will not be displayed. I think your problem was more likely to be about writing to the tags, but thought I'd mention this for others.
Post Reply