iTunes 12.5+ plist setting for View As -> Songs by default?
I find the the default view of songs to "Songs" too white and it's irritating / abominable to view Playlist
that way. It does't show enough details for my taste so I'd rather see something else than the current default view (Playlist):
Instead, I would like to see content directly as the Songs view instead:
Does anyone know of a plist setting (in com.apple.iTunes.plist
) to change the default view of songs to "Songs" instead of the Playlist
setting?
Solution 1:
Another useful option is to set up a keyboard shortcut through System Preferences (⌘S is available).
Since the menu item "Songs" is used in multiple places, you have to use the full menu path when setting up the shortcut: View->View As->Songs
Solution 2:
I don't know how to change the default view mode for new playlists, but you can run a script like this in Script Editor to change the view mode of all existing playlists:
tell application "iTunes"
user playlists whose special kind is none and smart is false
repeat with p in result
set view of browser window 1 to p
tell application "System Events" to tell process "iTunes"
click menu item "Songs" of menu 1 of menu item "View As" of menu 1 of menu bar item "View" of menu bar 1
end tell
end repeat
end tell
I use a script like the one below to create most new playlists. It requires GNU xargs
and readlink
which you can install by running brew install findutils coreutils
.
osascript -e'on run {a}
set l to {}
repeat with f in (get paragraphs of a)
set end of l to POSIX file f
end repeat
tell application "iTunes"
if number of l is 1 then
tell application "Finder" to set n to name of (item 1 of l as alias)
delete playlists whose name is n
set p to make new user playlist with properties {name:n}
else
set p to make new user playlist
end if
with timeout of 0 seconds -- don't exit with an error if the add command takes over 20 seconds
add l to p
end
set view of browser window 1 to p
tell application "System Events" to tell process "iTunes"
click menu item "Songs" of menu 1 of menu item "View As" of menu 1 of menu bar item "View" of menu bar 1
end tell
end tell
end run' "$(printf %s\\n "${@-$(cat)}"|gxargs -rd\\n greadlink -f)"
If the System Events application is not on the list of applications in "System Preferences > Security & Privacy > Privacy > Accessibility", the script above results in an error like this: 636:751: execution error: System Events got an error: osascript is not allowed assistive access. (-1719)
.