It would seem that the Music/Library is a smart playlist.
It does not get listed as user playlist 1, because it actually slips in to the list of smart playlist names in the M’s in the English case.
Still trying to see if I can find a way to it without having to use its Smart Playlist name.
Are you all saying that there is no library playlist property in the updated iTunes? In that case many iTunes scripts are now broken in the updated version. Almost all the scripts begin with getting the library playlist.
tell application "iTunes"
activate
set lib_pl to first library playlist
set view of first browser window to lib_pl
end tell
‘special kind’ Man staring me in the face all that time.
I suspect that ‘set view of browser window 1 to user playlist “Music”’ would work in all Languages also.
I created two playlists called music one smart one not.
'set view of browser window 1 to user playlist “Music” only ever goes to the ‘Special’ Music playlist (library 1)
I tried that too, but in other languages that main playlist is not called “Music”; It’s localized. (Pick a different language in System Preferences and see for yourself).
The library playlist class still exists; However, I believe the “main” playlist a user uses has changed (like Mark mentioned). Consider this:
tell application "iTunes"
count (tracks of library playlist 1)
end tell
My “Music” playlist has 840 songs, but the above script returns 880 (the other 40 items are videos and podcasts).
tell application "iTunes"
set view of front browser window to (get some playlist whose special kind is Music)
end tell
The Music playlist, however, is not the entire library, like “Library” playlist used to be. “Music” only displays audio tracks and PDFs. A workaround is to create a Smart Playlist with the criteria “size” - “is greater than” - “0”; name it “Everything”. To display it, use this:
tell application "iTunes"
set view of front browser window to playlist "Everything"
end tell