Apple Driver - adriancooney/polytunes GitHub Wiki

Apple Music Driver

To connect Polytunes to Apple Music, we do so by setting the following variables:

  • APPLE_LIBRARY or --apple-library - The path to your iTunes Library export (.xml).

The driver for Apple Music reads the contents of your library from an XML file exported from iTunes. Yeah, this sucks because you have to re-export the library file anytime you make changes to your library but do you know what else sucks? Apple Music. (It's crappyness was the reason this tool was created!). To create your library export in iTunes, go to File > Library > Export Library and save the file somewhere. Next, take the path to that library file and pass it to Polytunes:

$ polytunes library -d apple --apple-library ~/Desktop/Library.xml playlists
[*] Getting Apple playlists..
    -> 2015 (120 tracks).
    -> Music (1919 tracks).
    -> Podcasts (25 tracks).
    -> Summer (52 tracks).
    -> Winter (68 tracks).
    -> Chill (2 tracks).
    -> Electronic (302 tracks).

Remember, you can also set is as an environment variable if you get tired typing out the path all the time. See configuring drivers.