|
|
Rate iTunes songs on a wider scale
I've been using the following script for a year or two. I have it saved as n doing the modifications in case the next track starts playing (thus changing the "current track") while you're still deciding what to rate the past one. Lastly, if you rate the track 10 or less it automatically deactivates that track (unchecks it) and moves the playhead position to one second from the end of an application and have a keyboard shortcut assigned to it so that I can pop up the rating dialog no matter what application I'm in at the moment. It's similar to the above, but with a few additional features. My rating dialog box shows the artist and song title. It refereces the track being modified by ID rather than "current track" whethe track. I did this mostly because I assume that if I (or you) would rate something that low, you probably don't really want to hear it again. Feel free to modify to taste.
tell application "iTunes"
set curr_rating to the rating of the current track as text
set curr_track to the name of the current track
set curr_artist to the artist of the current track
set curr_dur to the duration of the current track
set curr_dbid to the database ID of the current track
end tell
set rate_dialog to (display dialog ("Rate "" & curr_track & "" by " & curr_artist) default answer curr_rating buttons {"Rate", "Cancel"} default button 1)
set new_rating to text returned of rate_dialog
if button returned of rate_dialog is "Rate" then
tell application "iTunes"
set rating of every track of playlist 1 whose database ID is curr_dbid to new_rating as number
if new_rating < 11 then
set played date of every track of playlist 1 whose database ID is curr_dbid to current date
set enabled of every track of playlist 1 whose database ID is curr_dbid to false
if the database ID of the current track is curr_dbid then
set player position to (curr_dur - 1)
end if
end if
end tell
end if
Rate iTunes songs on a wider scale
Also, if you don't want to rate the currently playing track, but instead want to rate the selected track, change any occurance of "current track" (lines 2-6 of the script) to "selection".
Rate iTunes songs on a wider scale
Here's my first script to set the rating. This one is for a selection (supporting multiple tracks). The default rating is the average of the current ratings.
Rate iTunes songs on a wider scale
Sorry about the munging of the intro paragraph above. It should read: |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.13 seconds |
|