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

Update 'Last Played Date' for skipped iTunes tracks Apps
I use smart playlists to feed into Party Shuffle in iTunes. One of the criteria I use is "last played," to prevent songs from coming up too often. Unfortunately, "last played" only gets updated automatically when the song finishes, so if I skip a track it doesn't get removed from the pool. This always bugged me, so I made the following tiny Applescript:
tell application "iTunes"
  set played date of current track to current date
  next track
end tell
Assign it a hotkey using your favorite method of assigning hotkeys to AppleScripts (I use Quicksilver), and you're all set! Best of all, this method leaves Play Count untouched.

[robg adds: This is a very handy AppleScript; I have been opening the iTunes window for songs I wish to skip, then dragging the play bar nearly to the end, which lets the song finish and then removes it from recently played. This is much simpler. I attached it to a hotkey using Butler.]
    •    
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)
 
[8,473 views]  

Update 'Last Played Date' for skipped iTunes tracks | 10 comments | Create New Account
Click here to return to the 'Update 'Last Played Date' for skipped iTunes tracks' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Update 'Last Played Date' for skipped iTunes tracks
Authored by: pembery on May 20, '04 12:17:13PM

Great hint - now I just need similar functionality on my iPod...



[ Reply to This | # ]
Update 'Last Played Date' for skipped iTunes tracks
Authored by: jaguarcy on May 20, '04 01:20:43PM

I often skip the last few minutes of songs (mainly because I listen to 7-10 minute long versions), but even if I don't I might find myself skipping to the next track when there's less than half a minute left. As a result, I want iTunes to update not only the last played date, but also the play count. I use Salling Clicker to control iTunes from my Erricsson T68i phone, but this could easily be hotkeyed through Butler.


tell application "iTunes"
	set pos to (duration of current track) - 3
	if pos is less than 1 then set pos to 1
	set player position to pos
end tell

Wouldn't it be nice if iTunes automatically updated the play count if, let's say, 2/3 or 3/4 of the song was played, instead of only updating it after the song ends?



[ Reply to This | # ]
Update 'Last Played Date' for skipped iTunes tracks
Authored by: GammaRay Rob on May 20, '04 02:33:47PM
You can set the play count (at least in the latest version of iTunes!). I had to modify the submitted script a little so that my smart playlist would continue playing after the current track dropped off the list:


tell application "iTunes"
	get played count of current track
	set myCount to result
	set played count of current track to myCount + 1
	set played date of current track to current date
	next track
	play
end tell

Rob

---
-- This line no sig

[ Reply to This | # ]

Update 'Last Played Date' for skipped iTunes tracks
Authored by: jakacmar on May 20, '04 09:38:47PM
I have it on good authority that Doug of "Doug's AppleScripts for iTunes" is planning on adding a section to the site for just this kind of little script that is handy when assigned a keyboard shortcut. I'd definitely recommend that you send him this script to be added to the new section since it's a site specifially dedicated to these kinds of things and people looking for this type of thing would probably be more likely to look there than here. I'd do it myself but I don't want to steal other's work ;-)

[ Reply to This | # ]
Update 'Last Played Date' for skipped iTunes tracks
Authored by: jaguarcy on May 21, '04 10:50:05AM

Yes, but I have it linked to a button on my phone. This means that I'm listening to my special playlist (or party shuffle playlist, same thing) so I WANT the song to finish playing so that it's removed from the playlist, not just updating the count.

And before anyone says that updating the play count removes the song (because I really don't know since I haven't tested it), there are several times when I press a button by accident. I.e. I might not want to have the song removed from my playlist because it's played... So this gives me 3 seconds to either jump to the beginning or to the next song without updating the play count :)



[ Reply to This | # ]
Update 'Last Played Date' for skipped iTunes tracks
Authored by: dave_x on May 21, '04 12:04:51PM
I use iMote for skipping songs and found you can still use this script code with it. Show the package contents of iMote then nav to Contents>MacOS>Resources and open the goToNextTrack.scpt file in a text editor. Paste the above code and save. Thanks for this script!

[ Reply to This | # ]
The downside, and how it could be fixed.
Authored by: A. Square on May 20, '04 02:47:00PM

The only problem I've had with using this script is you can no longer easily see which songs you've been listening to, and which songs you've been skipping. Of course, even if you use "last played" as it was intended, you can't tell how many times you've listened to a track in a given time period.

What I'd love to see is an app that periodically looked at your iTunes Library XML file (where all the play counts are stored), and tells you how many times you've played each track in the past time period. This way, you could have a view of what's in heavy rotation for that week, month, or whatever. By using the play counts to compare, you'd get two benefits: one, it would work with this script, and two, you'd see if songs got played more than once in the time period.

Does any such app exist? Anyone want to write it?



[ Reply to This | # ]
The downside, and how it could be fixed.
Authored by: tunesmith on Mar 14, '06 11:47:11PM

You know, you could have the skip script adjust "date modified" instead of "date last played". I've never been able to think of a useful use for "date modified" anyway.



[ Reply to This | # ]
Update 'Last Played Date' for skipped iTunes tracks
Authored by: DougAdams on May 20, '04 02:48:36PM
Check out New Last Played Date. It set last Played Date of selected tracks to today or today minus your number of days.

[ Reply to This | # ]
Update 'Last Played Date' for skipped iTunes tracks
Authored by: hyfen on Mar 17, '08 12:23:54AM
To be a bit fancier, you can set the date to be updated only after you've listened to X percent of the track:

tell application "iTunes"
	if player position / (duration of current track) > 0.6 then
		set played date of current track to current date
	end if
	next track
end tell


[ Reply to This | # ]