iTunes 12.7 introduced the "Downloaded" playlist that can be made accessible in the Library section of the Sidebar. Ostensibly, this playlist contains all the tracks you have downloaded in one way or another from the Apple Store, iCloud Music Library and Apple Music.
Unfortunately, the Downloaded playlist is inaccessible to AppleScript. The following script should 1) get a reference to the selected playlist and 2) get a reference to the selected tracks, but it does neither:
Thus, any script that needs this information to work with the Downloaded playlist will fail.