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

An AppleScript to help with 'last played' in iTunes Apps
I like iTunes, since it gives you the chance to listen to your songs in almost every way. I rated all my songs, and I like to play 5-star songs more often, 4-star songs less often, and I like to listen to songs which are the least recently played ones. But what if you want to listen to all 5-star songs which are not played already today?

Party shuffle goes into the picture here:
  • Create a smart playlist with the following parameters: 'My rating' 'is' 5-star and 'Last played' 'is not in the last' 1 'days'
  • Set the 'Display n upcoming songs' to 0.
  • Set the Party shuffle to this playlist.
But there seem to be a slight problem with the handling of the "Last played" field in iTunes: It is set after iTunes chooses the next song, so you might have duplicates! This is very annoying, so I figured out a little AppleScript to handle this. Run it alongside with iTunes. It sets the last played field 10 seconds before the end of the song. Note that it has slight limitations, which might be fixed by others:
  • It assumes that you don't fast forward in the songs (rewind is allowed, though). If you often do this, then replace the delay time_to_enter with delay my min_delay. (you even eliminate the if from there). I did not do this, since the original version eats less CPU power.
  • When you start this script, iTunes has to be running.
I hope this helps!
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[5,488 views]  

An AppleScript to help with 'last played' in iTunes | 3 comments | Create New Account
Click here to return to the 'An AppleScript to help with 'last played' in iTunes' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An AppleScript to help with 'last played' in iTunes
Authored by: DougAdams on Jun 26, '06 08:03:28AM

To be specific, Last Played is set when the song plays through to its finish time, not neccessarily when something else starts playing.

---
Doug's AppleScripts for iTunes
http://www.dougscripts.com/itunes/



[ Reply to This | # ]
An AppleScript to help with 'last played' in iTunes
Authored by: gfxmonk on Jun 26, '06 08:47:06AM

Why not just play the smart playlist on shuffle instead of using party shuffle? That'll automatically avoid duplicates...



[ Reply to This | # ]
An AppleScript to help with 'last played' in iTunes
Authored by: mrlitman on Jun 28, '06 08:39:31AM

When playing from Party Shuffle it is easy to explicitly choose songs you would like to hear by adding to Party Shuffle. When those songs have finished Party Shuffle will keep picking songs from the source playlist without any dead air.



[ Reply to This | # ]