I’m writing an app to help set groupings in an iTunes library so that shuffle by grouping works for classical music (I’m surprised I couldn’t find one). In windows I can use the code below and access the iTunes library as Python objects. What would I need to do to make the same code run under macOS and Windows?
import win32com.client
iTunesApp = win32com.client.Dispatch("iTunes.Application")
mainLibrary = iTunesApp.LibraryPlaylist;
tracks = mainLibrary.Tracks;
for i in range(1,tracks.Count+1):
...