Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Using a Smart Playlist to sync small iPods' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Using a Smart Playlist to sync small iPods
Authored by: filmsmith on Feb 20, '04 01:37:52PM

Dang. I never thought I'd have to say this but... yours is so much smaller and more efficient than mine.

Having compared the two, I see how to trim the bloat in mine, though I can only trim some. Mostly, I have extra lines to compensate for iTunes seemingly crappy 'Shuffle' system. However, a few lines in mine that I prefer are those that pass over tracks that aren't enabled and also includes tracks whose album fields are empty. I also threw in some stuff to update my iPod as soon as it's finished. Basically, I set this script to run when I wake up monday morning and by the time I'm ready to go, I have a newly randomized iPod with all the New Releases included.

I think I see why yours is faster than mine. Mine uses a brute force to try and find albums that haven't been chosen, so odds are good that, as the script nears completion, it will take longer to find unused albums. Yours seems to solve this with "if (random number) < albumsPercent then" though I'll need to test it this eve.

Thanks for hook-up. I'm always curious to see how other people tackle scrips.



[ Reply to This | # ]
Using a Smart Playlist to sync small iPods
Authored by: sjonke on Feb 20, '04 01:56:17PM

Regarding passing over tracks that aren't enabled, you get that for free by setting the smart playlist to only include enabled tracks! Use the smart playlist to do as much of the work as possible.

---
--- What?



[ Reply to This | # ]
Never mind! Here's the solution.
Authored by: sjonke on Feb 20, '04 01:59:27PM
Oh, never mind - I see what you mean. Good point. I changed the duplicate line to the following to resolve that:

duplicate (every track of playlist "Library" whose album is currAlbum and enabled is true) to playlist albumPlaylist

---
--- What?

[ Reply to This | # ]

Never mind! Here's the solution.
Authored by: filmsmith on Feb 20, '04 02:01:13PM

Look at that! Had no idea I could do it that way.

Thanks again!



[ Reply to This | # ]
Never mind! Here's the solution.
Authored by: sjonke on Feb 20, '04 02:12:23PM

There are some powerful constructs in Applescript, they're just poorly documented and inconsistently implemented. An application's dictionary only tells you half the story.

My script presumes you don't have two or more albums with the same name, though that is certainly possible. You could include the artist name in there (... and artist is someName) - I didn't put that in because it was easier/faster to just save the album name in a list and it's not an issue for my library.

---
--- What?



[ Reply to This | # ]