I want to delete the first entry and change the second to be the "Cover (front)". I wrote this Python script to make changes to whatever tracks are selected:
Code: Select all
import sys, os
import time
import win32com.client
import pythoncom
SDB = win32com.client.Dispatch('SongsDB.SDBApplication')
seltracks = [SDB.SelectedSongList.Item(i) for i in range(SDB.SelectedSongList.Count)]
for trk in seltracks:
if trk.AlbumArt.Count == 2 and trk.AlbumArt.Item(0).RelativePicturePath == u'.jpg':
trk.AlbumArt.Item(1).ItemType = 3
trk.AlbumArt.Delete(0)
trk.WriteTags()
trk.UpdateDB()
print "FIXED: " + trk.Title
else:
print " skip: " + trk.Title