I am trying this code as a test to build a script to do some mass updates in MM for me. The new Genre shows in MM on the song I want it to show on, but when I update the library, the Genre tag is reset to the previous Genre(s). Your help is greatly appreciated!!
Sub TestAddGenre()
Dim SDB, Iter, objSong
Set SDB = CreateObject("SongsDB.SDBApplication")
SDB.ShutdownAfterDisconnect = False
Set Iter = SDB.Database.QuerySongs("AND Songs.ID=7522")
Set objSong = Iter.Item
objSong.Genre = "MyGenre"
objSong.Updatedb
objSong.writetags
Set objSong = Nothing
Set Iter = Nothing
Set SDB = Nothing
End Sub
Steve
Adding Genres to Song with VBScript
Moderators: Gurus, Addon Administrators
Adding Genres to Song with VBScript
Last edited by Lowlander on Thu Oct 13, 2011 10:25 am, edited 1 time in total.
Reason: Moved to correct sub-forum
Reason: Moved to correct sub-forum
Re: Adding Genres to Song with VBScript
I figured it out. The database is on a networked HTPC and I am trying to update from another PC on the network. I rescanned the HTPC C:/ drive with the network name instead of C:/ and I could update from the other PC. It created duplicate entries in the database (now it has two paths to the same file - 1)C:/ and 2) HTPC network name) but I can easily fix that.
Steve
Steve
Re: Adding Genres to Song with VBScript
BTW take a look at CustomFieldsTagger script by Steegy. http://www.mediamonkey.com/forum/viewto ... =2&t=58583
Working fine for bulk changing Genre field too.
Working fine for bulk changing Genre field too.
Re: Adding Genres to Song with VBScript
That looks like it may be useful. Thanks!