Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

The iTunes application allows a track to be marked as "skip when shuffling", meaning it will never be played when the iPod is in shuffle (i.e. random) play mode.

It is possible to set up a smart playlist to find all tracks by genre, play count, last played, etc. but there doesn't seem to be an easy way to see which tracks have been marked as "skip when shuffling".

Does anyone have ideas about how I could query this information?

share|improve this question
    
What is your platform (Mac OS X or Windows)? Should be possible with AppleScript on Mac OS X, maybe some other way on Windows. –  Chris Johnsen Oct 27 '09 at 5:49
    
@Chris - I am using Windows. –  LeopardSkinPillBoxHat Oct 27 '09 at 23:24

2 Answers 2

up vote 2 down vote accepted

If you are on Mac OS X, you could try the following AppleScript. It finds all the unshuffable tracks of the source you pick and puts them in a new, “dumb” playlist.

If you are on Windows, then maybe you could adapt the ‘logic’ of this script to whatever COM language you have at hand. See Windows Solutions section of Doug's AppleScripts for iTunes.

I don't have an iPod, so I could not test it with iPod tracks, but it worked to find "unshuffable" tracks in my normal library.

-- Pick a source (main library/iPod)
tell application "iTunes" to set allSources to sources
set possibleSources to {}
repeat with aSource in allSources
    using terms from application "iTunes"
    	if kind of aSource is in {library, iPod, device} then -- shared library, unknown
    		set end of possibleSources to contents of aSource
    	end if
    end using terms from
end repeat
set sourceStrs to {}
set n to 1
repeat with aSource in possibleSources
    using terms from application "iTunes"

    	tell aSource to set end of sourceStrs to "" & n & ". " & name & " (" & id & "/" & persistent ID & ")"
    end using terms from
end repeat

choose from list sourceStrs without multiple selections allowed
set theSourceStr to first item of result
text 1 through ((offset of "." in theSourceStr) - 1) of theSourceStr as integer
set theSource to item result of possibleSources

-- Make a new (dumb) playlist to hold the found tracks
tell (current date) to ¬
    set playlistName to "Unshuffables on " & short date string & " at " & time string
using terms from application "iTunes"
    tell theSource to set unshuffablesPlaylist to make new playlist with properties {name:playlistName}
end using terms from

-- Find all "unshuffable" tracks and add them to the new playlist.
using terms from application "iTunes"
    repeat with aPlaylist in library playlists of theSource
    	duplicate (tracks of aPlaylist whose shufflable is false) to unshuffablesPlaylist
    end repeat
end using terms from
share|improve this answer
    
Thanks for the explanation Chris - I am using Windows. –  LeopardSkinPillBoxHat Oct 27 '09 at 23:25
    
Sorry you couldn't directly use the code. If I had a Windows machine handy I might try my hand at iTunes' COM interface. I have a feeling that the core of that AppleScript (make playlist, find unshuffable tracks, add them to the new playlist) is possible through COM with either JScript or VBScript. –  Chris Johnsen Oct 28 '09 at 3:16

Most definitely! Although you cannot directly create a smart playlist to contain only unchecked items, there is a bit of a 'work around' to make one.

  1. First, create a smart playlist to match the following rules, with the key emphasis on "Match only checked items":

    playlist 1 rules

  2. Then create another with these rules, where the "Checked Items" is the playlist you just created.

    playlist 2 rules

share|improve this answer
    
“Skip when shuffling” (select a track, Get Info, Options tab) is not the same as “checked” (the check mark before the name of a track in list view). –  Chris Johnsen Oct 27 '09 at 7:11
    
Thanks Josh, but Chris is right. I already have a playlist to pick up "unchecked tracks" but it's "exclude from shuffle" that I'm having trouble with. –  LeopardSkinPillBoxHat Oct 27 '09 at 23:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.