Quantcast

Forums | MacLife

You are not logged in.

#1 2006-06-13 5:27 am

brainiac_7
% rm -r brainiac_6
Moderator
From: CT Shoreline
Registered: 2000-10-09
Posts: 7253
Website

iPod Manual Sync: update playlist

I have a 2G Pod that can't hold all of my Library, so it's set to manual update. After adding a few tunes to a particular playlist in iTunes, if I drag the playlist to the Pod to update the playlist, I get duplicate tunes in my Pod's Library. Two each for every old tune in the Playlist.

I've tried first deleting the Pod playlist before updating, which worked exactly once, but every time since trying this method, it results in dupes.

Is this normal behavior, or is there a pref I can kill that might fix this? As you know, hunting down dupes on a Pod is a pain, and an Applescript isn't that helpful here.

Worst case I suppose I could enable Playlist Sync for the Pod, but I'd be relegated to Checkbox Hell; I have a little over 100 Playlists. I'm not in a hurry to go down this road.


http://imagegen.last.fm/basicrt10/recenttracks/5/F_Hole.gif

Offline

 

#2 2006-06-14 5:06 am

brainiac_7
% rm -r brainiac_6
Moderator
From: CT Shoreline
Registered: 2000-10-09
Posts: 7253
Website

Re: iPod Manual Sync: update playlist

What would be helpful in this instance would be to have the Option-Delete playlist function available on the iPod.


http://imagegen.last.fm/basicrt10/recenttracks/5/F_Hole.gif

Offline

 

#3 2006-06-14 11:12 am

RockoTDF
Member
Registered: 2006-06-12
Posts: 12

Re: iPod Manual Sync: update playlist

brainiac_7 wrote:

What would be helpful in this instance would be to have the Option-Delete playlist function available on the iPod.

I know.  Im lucky in that I have a 30g ipod, so having all the stuff on it isnt a big deal, but I wish there was a more effective way to manage so that when you delete something from iTunes it doesnt automaticallly come off the ipod.

Offline

 

#4 2006-06-14 5:28 pm

brainiac_7
% rm -r brainiac_6
Moderator
From: CT Shoreline
Registered: 2000-10-09
Posts: 7253
Website

Re: iPod Manual Sync: update playlist

Chalk up another interface inconsistency for Apple (such as the Folder metaphor on the Pod), the otherwise avant garde of usability.

I know they want to ride the rocket while it's hot, but for those of us who've been logged on since SoundJam and the early Rio, iTunes/iPod, its database, and interface have gotten pretty long in the tooth.

Real booleans for Smart Playlists is another item aching to be added.


http://imagegen.last.fm/basicrt10/recenttracks/5/F_Hole.gif

Offline

 

#5 2006-07-15 2:55 pm

Kosh
The Enigmatic One
From: Somewhere on or near Earth
Registered: 2003-01-18
Posts: 633

Re: iPod Manual Sync: update playlist

brainiac_7 wrote:

I have a 2G Pod that can't hold all of my Library, so it's set to manual update. After adding a few tunes to a particular playlist in iTunes, if I drag the playlist to the Pod to update the playlist, I get duplicate tunes in my Pod's Library. Two each for every old tune in the Playlist.

I've tried first deleting the Pod playlist before updating, which worked exactly once, but every time since trying this method, it results in dupes.

Is this normal behavior, or is there a pref I can kill that might fix this? As you know, hunting down dupes on a Pod is a pain, and an Applescript isn't that helpful here.

No, that isn't normal.  I also manually sync my iPod, and typically if I drag an existing playlist to my iPod, it only copies the additional songs.  I have noticed, however, that if I have updated some of the ID3 tags on a song, iTunes will (correctly) synchronize the updated song, but will not always delete the old version, leaving an orphaned duplicate.  Could something like this be happening to you?

I have an AppleScript written by Doug Adams that finds songs that aren't in any playlist, so checked his site for a version for iPods.  He seems to have one, but unfortunately, he now bundles his scripts in "enhanced" Zip files which he indicates the Finder knows how to deal with, but I am guessing that this is the 10.4 Finder, since neither 10.2.8 or 10.3.9 wanted to touch them.  In case you can deal with them, here's a link to Not in Any iPod Playlist on Doug Adams' iPod script site.

I went ahead and hacked up a version of the script myself that lists songs on the iPod that aren't in any iPod playlist.  I'll go ahead and paste the raw script here.  Open Script Editor, paste the text into a new script, Click the <Check Syntax> button to make sure it's happy, then save it as Not in Any Playlist iPod.scpt (or whatever name you prefer) in <~/Library/iTunes/Scripts> so it's available in the Script menu in iTunes, or just run it in Script Editor from anywhere.

No, this won't "fix" the problem, but at least it will help you find the orphans.  If it's gotten so bad that you have hundreds of orphans, and you don't care about playcounts on the iPod, it would probably be easier to wipe out the entire iPod library (or take the opportunity to reformat it with the latest firmware upgrade).

Code:

(* Not in Any Playlist iPod v1.0

"Not In Any Playlist" written by Doug Adams
iPod version hacked by Kosh

Get more free AppleScripts for iTunes and
help writing your own:
http://www.malcolmadams.com/itunes/
*)
global newContents

tell application "iTunes"
    
    set file_name to (choose file name with prompt "Enter a name for the text file:" default name "")
    if file_name is false then error number -128 -- cancel
    if file_name as string does not end with ".txt" then set file_name to ((file_name as string) & ".txt")
    
    display dialog "Gathering information..." buttons {""} giving up after 2
    
    set lib to a reference to (playlist 1 of (item 1 in (sources whose kind is iPod)))
    --    set lib to a reference to library playlist 1
    set c to count of every track of lib
    set everyP to (get a reference to every user playlist of (item 1 in (sources whose kind is iPod)))
    set allIDs to {}
    
    with timeout of 300000 seconds
        repeat with thisP in everyP
            if (class of thisP) is user playlist then
                if smart of thisP is true then
                    -- fugedabowdit
                else
                    repeat with tt from 1 to (count of every track of thisP)
                        copy (get database ID of track tt of thisP) to anid
                        if anid is not in allIDs then copy anid to end of allIDs
                    end repeat
                end if
            end if
        end repeat
    end timeout
    
    display dialog "Checking tracks..." buttons {""} giving up after 2
    set newContents to {}
    repeat with tt from 1 to count of every track of lib
        with timeout of 300000 seconds
            set aTr to (a reference to track tt of lib)
            tell aTr
                if allIDs does not contain database ID then
                    set nom to name
                    set alb to album
                    set art to artist
                    tell me to add_this_to_newContents(("- " & nom & " [artist: " & art & ", album: " & alb & "]" & return) as string)
                    -- beep
                end if
            end tell
        end timeout
    end repeat
end tell

set newContents to ("Not In Any Playlist - " & ((current date) as string) & return & return & (newContents as string))

try
    copy (a reference to (open for access file_name with write permission)) to fileRef
    write newContents to fileRef
    close access fileRef
on error errx number errNum
    close access fileRef
    display dialog "There has been an error creating the file:" & return & return & errx & return & "error number: " & errNum buttons {"Cancel"}
end try

set dMes2 to return & return & "Would you like to open the text file with TextEdit?"
set myEnding to (display dialog "Done!" & dMes2 buttons {"No, Just Quit", "Yes"} default button 2 with icon 1 giving up after 30)
if button returned of myEnding is "Yes" or gave up of myEnding is true then
    tell application "TextEdit"
        activate
        try
            open (file_name as alias)
        on error errMs
            display dialog errMs buttons {"Cancel"}
        end try
    end tell
end if
-------
to add_this_to_newContents(x)
    copy x as string to end of newContents
end add_this_to_newContents

They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.
  -- Benjamin Franklin, 1759

Offline

 

#6 2006-07-17 12:46 am

brainiac_7
% rm -r brainiac_6
Moderator
From: CT Shoreline
Registered: 2000-10-09
Posts: 7253
Website

Re: iPod Manual Sync: update playlist

Wow, that's an incredibly thoughtful response. Thank you! I do occasionally update my ID3 tags, but I'm not sure this could the cause of it. I have run that script in the past, and it seemed to work fine. I'll repeat my wish for the option delete command to work in an iPod playlist, as it does in iTunes.

Just in the last week, iTunes seems to be starting to become unstable. When my autosynched Pod is mounted, iTunes throws up a warning that it can't copy a certain tune because it can't find it (when in fact the tune is correctly linked in the Library), and yet the tune appears to be on the Pod despite the warning. Oh boy.


http://imagegen.last.fm/basicrt10/recenttracks/5/F_Hole.gif

Offline

 

#7 2006-07-17 8:26 pm

brainiac_7
% rm -r brainiac_6
Moderator
From: CT Shoreline
Registered: 2000-10-09
Posts: 7253
Website

Re: iPod Manual Sync: update playlist

Aha, one way my tunes may differ from download to download is that I've become an cover art junkie, adding art whenever I can find it, even though I use a Doug's Applescript to remove the artwork on the manually synched 30 GB Pod, due to disk space requirements (BTW, the last time I ran that script I freed up a GB!). So I'm still out of luck, though.


http://imagegen.last.fm/basicrt10/recenttracks/5/F_Hole.gif

Offline

 

Board footer

Powered by PunBB 1.2.6
© Copyright 2002–2005 Rickard Andersson