Scott Rossi wrote:
Recently, Thomas McGrath III wrote:
I have a project that involves iTunes. I want to extract locally a
users playlists and song/podcast list from their computer and do some
things in Rev. I then want to put/import some content back into iTunes.
I figure I can use Applescript on the Mac but I don't know about
iTunes for Windows. Is anyone familiar with doing things like this on
Windows?
What are the options available? On the extraction side can I use an
output from iTunes? Is there an XML file etc.?
On the importing side is it acceptable to just ask the user to drop/
import a folder into iTunes from my output? Or is there a way to send
a command to iTunes to tell it to do the import?
I am just starting this project and any and all help or input is
greatly appreciated.
As Sims suggested, you might be able to parse an XML file to get what you
need. If you're looking to *talk* to iTunes, you need to use COM, according
to Apple. An SDK is here:
http://developer.apple.com/sdk/itunescomsdk.html
If you build an external, please let me know. I've been interested in this
for months.
I knew an external was beyond me, so I built a "proof-of-concept" web
server. It's written in Python, using the COM interface (i.e. Windows
specific). For now it implements only a few commands:
version - returns a version string
stop - stops the server
backTrack - go to previous track
nextTrack - skip to next track
getCurrentTrack - get info on track currently playing
track number, duration (seconds) and track name -
separated by ":"
getCurrentTrack?all - get ALL info on track currently playing
attribute name : attribute
getLibrary - returns album/artist/track for everything in the Library
playlist (":" separated)
addFile?pathname - adds the file (or folder of files) <pathname> to
the library playlist.
If you want to try it (and have Python installed on your windows
machine), you can find it at
http://www.tweedly.net/RunRev/iTunesHTTP.pys
If you haven't got Python, you can download it (and the Windows COM
interface) at
http://www.python.org/2.4.2/
If you don't want to install Python but want to play with this, let me
know and I'll build an executable and put it up on my site. And if there
is a specific other command you'd like to be supported, just let me know
and I can add them (assuming the COM interface supports it, and assuming
I can figure it out :-)
I didn't, in the end, build a Rev library - it's a set of simple URL
calls, e.g.
put URL ("http:127.0.0.1:7979/getCurrentTrack") into myVar
or
put URL ("http:127.0.0.1:7979/getLibrary") into myVar
set the itemDel to ":"
repeat for each line L in myVar
put item 1 of L into myTrackName
put item 2 of L into myArtist
put item 3 of L into myAlbum
etc.
end repeat
or
put URL ("http:127.0.0.1:7979/addFile?D:/NewMusic") into myVar
--
Alex Tweedly http://www.tweedly.net
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.1/207 - Release Date: 19/12/2005
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution