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

A script to upate the Shuffle's last played information Apps
Since I've gotten my iPod shuffle, the fact that it updates the play count but not the last played date during updating has been bothering me. Since many of my playlists rely on this property of a song, this is very annoying. So I wrote a little AppleScript (zip file 8KB download) that reads in the iPod shuffle's playlist before updating, and compares the playcount to the values after updating. For those songs where it changed, it adds "now" as played date.

The iPod shuffle has to be kept in the Sources list for the script to work, and its name must be unique (no other playlists of that name). Simply change the property my_iPod in the script to whatever your iPod is called, and run the script.

As always: Use at your own risk! I take no responsibility for loss of data or any other malfunction. Make a backup of you iTunes Library file before you start...

[robg adds: I haven't tested this one...]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[6,026 views]  

A script to upate the Shuffle's last played information | 9 comments | Create New Account
Click here to return to the 'A script to upate the Shuffle's last played information' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A script to upate the Shuffle's last played information
Authored by: dfbills on Apr 01, '05 10:07:01AM

good one- this really helps with smart playlists too!

---
-d



[ Reply to This | # ]
A script to upate the Shuffle's last played information
Authored by: amjbrown on Apr 01, '05 11:31:19AM
Good call! I can't believe Apple haven't fixed this - it seems a very simple and obvious thing to do to update played date with sync time and date. It must break thousands of smart playlists.

I have a similar solution, that also creates a timestamped playlist with the tracks you just enjoyed randomly. I posted it in the ipodlounge forums, and I've been hoping that someone would help me with the performance- it's lousy!!

Link to slow Applescript here

[ Reply to This | # ]

A script to upate the Shuffle's last played information
Authored by: zimmerleut on Apr 01, '05 03:14:36PM

Well, as you might have noticed, this script is also kinda slow. The reason for this seems to be that iTunes' way to look up songs via their database ID is slow. However, so far I haven't found a faster and secure alternative... So if any of you have a hint on that...

Jonas



[ Reply to This | # ]
A script to upate the Shuffle's last played information
Authored by: tinb on Apr 02, '05 03:39:39AM
Well, the Shuffle has no date and time settings, so taking "now" as "played date" is only a approximation. That is not good enough for an Apple product ;-)

[ Reply to This | # ]
An alternative
Authored by: artistry on Apr 02, '05 06:35:12AM

I think the iPod shuffle doesn't store time and date info so it can't add such details to its play count.

Because I'm using my shuffle to listen to music I've not played for a while I have a couple of linked smart playlists I use to get round the problem.

The first selects all rock music with a play count of zero. The Shuffleplaylist is updated from this.

A second smart playlist lists any rock music with a play count of '1' and last played date before 2003. This effectively lists any tracks I've listened to on my Shuffle.

I then select these and apply the 'new last played date' script from Doug's Apple Scripts site.

It's a bit of a complext workaround but it works - only because I'm being quite specific about the tracks I'm listening to on my shuffle, of course. In a couple of years when I've heard all the tracks I've got, it won't be so useful ;-)



[ Reply to This | # ]
A script to upate the Shuffle's last played information
Authored by: ahlstrominfo on Apr 03, '05 02:52:33PM
I've written a AppleScript for this one to. It uses the grouping field to save the current playcount, to compare to when updated later.

Script at iPodLounge below the slow script :-)

[ Reply to This | # ]
A script to upate the Shuffle's last played information
Authored by: roll on May 23, '05 06:10:23AM

Is this script broken under Tiger? Worked fine under Panther but has no effect now...



[ Reply to This | # ]
A script to upate the Shuffle's last played information
Authored by: zimmerleut on Aug 05, '05 10:19:32AM

OK, I've modified the script a bit and wrapped an application around it. If anyone is interested, you can download it from http://joner.lessjunkmorefunk.info/article13.html.

I've tested it with OS X 10.4.2 and iTunes 4.9 and it works well for me (although it's still darn slow...)

Jonas

[ Reply to This | # ]

iTunes 5 updates!
Authored by: TiBo on Sep 07, '05 03:19:47PM

Just installed iTunes 5 and synced my Shuffle. Last played is automaticly set to the date and time of syncing. Cool.



[ Reply to This | # ]