Become a member of the iLounge Forums. Register Now!
To start viewing messages, select the forum that you want to visit from the selection below.
If this is your first visit, be sure to check out the Forum FAQ and Forum Policy.
If this is your first visit, be sure to check out the Forum FAQ and Forum Policy.
Topic: Changing a Rating on a desktop's Shared Playlist from a laptop.
|
|
#1
|
||
|
Freshman Lounger
Join Date: Nov 2003
Posts: 9
|
I've been trying to find a way to do this for way too long.
I listen to the shared playlist from my desktop machine--the one with all the music--from my laptop. However, since it's a shared playlist, I can't make any changes to the Ratings on my desktop's playlist from the laptop without a lot of hastle (third-party iTunes network remote, VNC, etc.) This is a real drag since a lot of my music sorting and playlist management relies on Ratings. I've been using Synergy and loving it, especially the ability to raise or lower the rating of a song with a keyboard shortcut. However, since you can't make changes to a remote playlist, this functionality is nonexistent when listening to a Shared Playlist. What I'd love to have is a way to do the following: (1) based on the song currently playing in iTunes, (2) on the remote machine, tell iTunes / change the Library file to (3.1) increment and decrement the Rating of that song and/or (3.2) display the song's current rating and let me enter a new rating (in number of stars). I have admin access on both machines, so this method could be executed by using scripts with the Terminal and a connection to the desktop machine, Remote Apple Events, or some other voodoo, so be it; whatever works. I can't help but think that most of the necessary parts for this have already been completed; they just haven't been joined together for this particular task. I'm a total AppleScript n00b, otherwise I'd just cobble it together myself... but RTFM takes time, and no reason to reinvent the wheel. :-) Any ideas? |
||
|
|
|
Become a member of the iLounge Forums and the ad above will disappear.
|
|
#2
|
||
![]() Join Date: Jun 2003
Location: Providence, RI, USA
Posts: 705
|
I haven't done much network scripting, so I'm not sure of how to actually tap the iTunes app on the other machine ("using terms from" comes to mind). However, I have mentioned elsewhere that you can get quite a bit of necessary info about a shared track. By getting its name, album and artist, you pretty much know where to look for it on the remote machine. I'm just not sure how to access the iTunes on the other machine, which is what you would need to do to change a track's tags. (set thisSharedTrack to some track of library playlist 1 of [remote iTunes application] whose name is myName and album is myAlbum and artist is myArtist...?)
Not for nothin', but this kind of talk could lead to the sort of file sharing that Apple frowns upon.
__________________
Visit Doug's AppleScripts for iTunes |
||
|
|
|
|
|
#3
|
|||
|
Freshman Lounger
Join Date: Nov 2003
Posts: 9
|
Thanks for the interest
Quote:
I completely understand why Shared Playlists are so tightly restricted... but wouldn't it be nice (considerate, even?) to have "administrator" or "owner" access to playlists through a separate password? I submited a feature request to Apple for something like this a while ago... maybe if enough others subit one... :-) |
|||
|
|
|
|
|
#4
|
||
![]() Join Date: Jun 2003
Location: Providence, RI, USA
Posts: 705
|
After some experimenting, I've put up a couple of tips on controlling iTunes on a remote machine, and also how to copy the currently playing shared track from the remote machine to the local machine. The article, "Control iTunes On A Remote Machine" uses UPMs so you can open the example scripts in your own Script Editor.
__________________
Visit Doug's AppleScripts for iTunes |
||
|
|
|
|
|
#5
|
|||
|
Freshman Lounger
Join Date: Nov 2003
Posts: 9
|
Quote:
BTW, the link in your post is broken; leads to a 404. The link to your Control iTunes on a Remote Machine article is http://www.malcolmadams.com/itunes/i...mcontrol.shtml. One thing I'm still wondering about... I've got my headphones plugged into my laptop, listening to music from my laptop's iTunes, which is playing Prodigy's "Smack My ##### Up"?which is on a Shared Playlist; the actual MP3 is on my desktop system in the other room. I look at the Rating and see it's only a 4. Travisty! It should be a 5, naturally. But since it's on a Shared Playlist from my desktop, I can't make any changes to the Rating from my laptop! How can the script be adapted to enable changing the Rating of a song that you're currently listenting to when it's on a Shared Playlist? Last edited by darkside; 11-22-2003 at 12:20 PM. |
|||
|
|
|
|
|
#6
|
||
![]() Join Date: Jun 2003
Location: Providence, RI, USA
Posts: 705
|
Something like this:
Code:
global remMachine
-- change this to your info:
set remMachine to "eppc://username:userpass@remote_ip"
tell application "iTunes"
if player state is not stopped and class of current track is shared track then
tell current track to set {nom, alb, art, siz} to {name, album, artist, size}
set rate to button returned of (display dialog "Add or Subtract a Rating star to \"" & nom & "\"" buttons {"Cancel", "Subtract", "Add"})
try
with timeout of 300 seconds
tell me to getSharedTrack(nom, alb, art, siz, rate)
end timeout
end try
end if
end tell
--
to getSharedTrack(nom, alb, art, siz, rate)
using terms from application "iTunes"
try
tell application "iTunes" of machine remMachine
if exists (some file track of library playlist 1 whose name is nom and album is alb and artist is art and size is siz) then
set theTrack to (some file track of library playlist 1 whose name is nom and album is alb and artist is art and size is siz)
tell theTrack
if rate is "Subtract" then
if rating is not 0 then set rating to (get rating - 20)
else if rating is not 100 then
set rating to (get rating + 20)
end if
end tell
end if
end tell
on error errM number errN
display dialog (errM & space & errN)
end try
end using terms from
end getSharedTrack
__________________
Visit Doug's AppleScripts for iTunes Last edited by Doug Adams; 11-21-2003 at 04:40 PM. |
||
|
|
|
|
|
#7
|
||
|
Freshman Lounger
Join Date: Nov 2003
Posts: 9
|
Excellent! With a bit of tweaking, this does exactly what I wanted it to!
One interesting note; the script didn't like my password for the remote machine as I entered it in the script, so it threw up a system dialog to log into the remote machine... with the option to save it in the Keychain! My reauthentication timeout hasn't come around yet, but if it works as I hope, this means you won't have to hard code the username and password into the script; just the IP of the remote machine. Note: I'm running Panther 10.3.1, in case that has bearing on the login handling. |
||
|
|
|
Topic: Changing a Rating on a desktop's Shared Playlist from a laptop.
Become a member of the iLounge Forums. Register Now!
To start viewing messages, select the forum that you want to visit from the selection below.
If this is your first visit, be sure to check out the Forum FAQ and Forum Policy.
If this is your first visit, be sure to check out the Forum FAQ and Forum Policy.
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
View iLounge History. Read our old Forums Archive (2001-2003)
All times are GMT -4. The time now is 05:06 PM.
All times are GMT -4. The time now is 05:06 PM.












Linear Mode




