iTunes Question
August 16, 2005 10:27 AM   Subscribe

When I'm looking at a song in my iTunes library is there a way to tell which of my playlists it appears on? I can't seem to find a way, or an answer on Google. (4.0.1 if it matters.)
posted by OmieWise to Media & Arts (9 answers total)
 
Best answer: Right click (or control click) the song, and in the menu there's an item called Playlists, which give you that info.
posted by cillit bang at 10:30 AM on August 16, 2005


Response by poster: < Three minutes. Thanks cillit bang. AskMe rocks.
posted by OmieWise at 10:37 AM on August 16, 2005


That is cool, I wish I had my powerbook with me today to try this out. I've got the same trouble OmieWise has, I think. Too many songlists that are too similar.
posted by fenriq at 11:04 AM on August 16, 2005


Also, why haven't you updated iTunes?
posted by Plutor at 11:45 AM on August 16, 2005


piggybacking on this question (since it's been answered), is there a good way to do this for a bunch of selected songs at once? I actually wrote an applescript to do this, which I could paste if anyone wants, but I was hoping for something more elegant (and fast - my script is quite slow on a large library).
posted by advil at 12:30 PM on August 16, 2005


Response by poster: advil-I'd love to see the script.

Plutor-2 reasons, general laziness and also the feeling that every successive iteration of iTunes contains some new DRM screw from Apple. I could be wrong about that, but I'm also still running 10.2.8, so this version works just fine.
posted by OmieWise at 12:40 PM on August 16, 2005


advil-I'd love to see the script

I might as well, but be warned, this isn't pretty. I was basically figuring out applescript at the same time as writing this. It also uses some application called "progressbarmetal" which is a simple progress bar I presumably got off the web, but google isn't turning up where I got it anymore. I put those lines in "try" blocks, so it should work without this, but the reason I added them in the first place is b/c the script is so damn slow you need some indication of what it's doing. As I said, I'd rather have something better.

On preview: If mefi supported the <font> tag this would be all pretty, but alas, it does not.

tell application "iTunes"
    if selection is not {} then
        set sel to a reference to selection
        set len to (count items of sel)
        set t to "Results:
"
        set alllists to every user playlist of container of container of item 1 of sel
        set tlist to {}
        set idlist to {}
        repeat with i from 1 to len
            set end of tlist to ("Playlists for \"" & (get name of item i of sel) & "\":
")
            set end of idlist to (get database ID of item i of sel)
        end repeat
        try
            tell application "progressbarmetal"
                setwindowtitle ("checking playlists")
                setprogressvalue (1)
                set position of window "checking playlists" to {100, 100}
            end tell
        end try
        set max to length of alllists
        set lc to 1
        repeat with pl in alllists
            set plname to (get name of pl)
            try
                tell application "progressbarmetal"
                    setwindowtitle ("checking " & plname)
                    setprogressvalue ((lc * 100) / max)
                end tell
            end try
            
            
            set c to 1
            repeat with s_id in idlist
                if ((not smart of pl) and (exists (some track of pl whose database ID is s_id))) then
                    set item c of tlist to ((get item c of tlist) & " " & plname & "
")
                end if
                set c to c + 1
            end repeat
            set lc to lc + 1
        end repeat
        tell application "TextEdit"
            activate
            make new document at front -- (tlist as string) at front
            set text of document 1 to (tlist as string)
        end tell
    end if
end tell


posted by advil at 2:22 PM on August 16, 2005


aaah, so that's what Applescript looks like.

PS. font tags are evil/wrong anyway. If you want to post source code try using the <code> tag.
posted by bruceyeah at 5:33 PM on August 16, 2005


font tags are evil/wrong anyway.

While I don't disagree, mefi doesn't seem to allow inline styles either, and the applescript colorizer I have will work without one of these (I'm not even sure it supports css at all). Also:


a non-indented line inside a <code> block
an indented line inside a <code> block


The pre tag won't work either as mefi inserts gratuitous linebreaks after every line, making it doublespaced (and ugly).
posted by advil at 6:48 PM on August 16, 2005


« Older Where can I find a decent Wonder Woman costume?   |   Thirty-something honeymooners need cruise... Newer »
This thread is closed to new comments.