Posts tagged
rtunes —
all matching results
When it comes to the merits of many open source software systems I'm not the most generous guy (in terms of compliments),
but in general open is always better then closed!
I had to release a new version of rTunes this weekend because of a wincom id change with iTunes 7.4.2.4. There was this
nagging issue with rTunes and really slow web serving when I was using a remote computer, this was really irking me and since I
was updating the source I thought I'd track this down. So off I went and started dropping in some profiling code, after the
first test I had a pretty good idea of what was going on (and also why no one had complained about this issue yet.) Python's
BaseHTTPServer generates a log entry when you send a response, the problem as it turns out, the log entry wants to print the
host name which means it does a DNS "fully qualified name lookup" and there's the rub; I'm running DNS at home (and yes it's
not properly setup where Windows is concerned but it works for my purposes) but these name lookups were taking 4 secs on my
network which is ridiculous performance, so it was simple to override the address_string to simply return the IP. If you've
ever setup Apache you know they strongly recommend turning off name lookups, no kidding, so why this library has this as a
default is kind of weird and a little bit dumb. After changing this behaviour performance improved by two orders of magnitude,
woohoo.
The whole point of this story is that given the documentation of the BaseHTTPServer library and most other libraries of all
sorts (free and commercial), without the source I would have spent significantly more time tracking down this issue with a
closed source opaque library.
Vive la open source!
I'm happy to get this out the door along with a major fix for DNS Fully Qualified Name look ups, "use the IP Luke".
The remote versions for windows will follow shortly.
Enjoy, and let me know if there are any new features you'd like to see.
Get rTunes here: http://agwego.com/rtunes
I just got the first report in that iTunes 7.4.2.4 breaks rTunes, here we go again Apple, can't you maintain a stable
interface for crying out loud. The good news, is I have no problems connecting with the raw source, it's only the compiled
version that is having difficulties right now. If you'd like the instructions on installing python and the necessary packages
to get rTunes working leave a comment and I'll post them.
Update:
The release of 7.4.2.4 changed the com signature which means the hard-coded com signature in the binary package is out of
sync, unfortunately there doesn't seem to be a better way at this time when it comes to py2exe.
I should have a new version out this evening, I just need to package and test, and I also found a very annoying
"bug/design feature" in the http lib which was making rTunes very slow when DNS is being used on a local network, like my home
network.
Well it's sort of an emulator, it seems to have the most realistic rendering on FireFox and Safari 3.0, as always IE seems
to be out to lunch when it comes to rendering the page.
I've done a quick rTunes skin for the iPhone it looks the best in landscape mode, no artwork in portrait mode. Unfortunately
it will probably be quite some time before I get my hands on one of these little beasts to do any real testing. I'll package up
this release in the next day or two, there are also a couple of minor bug fixes as well.
Check out http://testiphone.com/ seen via DZone.com
I find this somewhat amusing but mostly exasperating:
To save album artwork with the Apple com library on Windows you do the following:
artwork = self.GetCurrentTrackArtwork()
if artwork and len( artwork ):
artwork[0].SaveArtworkToFile("/PATH/TO/THE/FILE" )
Looks pretty simple, nice and clean, no problems, but take a look at the AppleScript library on OS X:
artwork = self.GetCurrentTrackArtwork()
data = artwork.data
# PNG HEADER ? P N G
substr = [ 0x89, 0x50, 0x4E, 0x47 ]
idx = self.FindSubstring( data, substr )
graphic = None
if idx:
graphic = data[idx:-1 ]
fout = file( ARTWORK_IMAGE, "wb" )
fout.write( graphic )
fout.close()
return
# JPEG HEADER J F I F
substr = [ 0xFF, 0xD8, 0xFF, 0xE0, 0x00, 0x10, 0x4A, 0x46, 0x49, 0x46, ]
idx = self.FindSubstring( data, substr )
if idx:
graphic = data[idx:-1 ]
fout = file( ARTWORK_IMAGE, "wb" )
fout.write( graphic )
fout.close()
To say there was a little hoop jumping going on here is an understatement, I also had to write the substring method to
search for the ordinal values, and if Apple adds a new graphic format for the cover art, my OS X version breaks and I have to
release a fix, not exactly flexible or easy to use, but maybe that's the point. Tsk, tsk, tsk...
I'm very happy to announce I finally have a working version with no loss of features in the port. Album art support was
looking pretty iffy for a while, until I made a break through this morning and some very dirty image hacking to strip off the
.itc header of PNG and JPEG images, very frustrating.
The app is supposed to be in Rosetta (universal) binaries, but please let me know if it works on intel macs, since I only
have an old G4 which is running 10.3.9 and is very slow.
Download your rTunes app
I have a working port of rTunes for OS X, all I need to do is clean up the distribution, and make sure it will run on intel
macs since I'm using a very old and slow G4.
My plan is to release on Monday.
I'm happy to get half of this monkey off my back, the Windows version is available, after I discovered that iTunes version 7
broke rTunes version 0.8 badly. This release has only been tested with version 7.2.0.34 of iTunes, let me know if you run into
any issues. I've included a new application rTunesRemote which you can hookup to a RF based USB remote control unit like ATI's
Remote Wonder and then control your iTunes from anywhere in the house (or your RF range of the remote.)
I had quite a few issues packaging this since iTunes changed the windows com interface in version 7.
The Mac version is near completion, but I have to go back and test against version 7 of iTunes, also it may seem odd, but
the Windows com access is superior than native Mac access where python is concerned. Once the testing is done, I have to figure
out the packaging of the application and various minor platform issues like power pc vs. intel.
Get your update here: http://agwego.com/rtunes
From TechCrunch:
Avvenu has a new product that allows you to listen to your iTunes music connection from any web browser on a Windows PC, Mac, or Windows Mobile 5 smartphone. MobileCrunch covered an early version of the product that only worked on Windows Mobile phones here.
The base computer storing the music must be a Windows PC. As long as that base PC is powered on and online, your entire iTunes music library will stream to the browser on the remote computer, and playlists will also be available. Avvenu also allows users to store up to 250 songs on their servers, allowing you to play those songs remotely without your base PC online (this is getting into a legal gray area).
This might be pretty easy to do with rTunes, maybe a possible new feature once I finish the Apple port.
On New Years day I was noodling around with the source and solved a long standing problem that has been irking me, namely multi-threading the server so it can handle AJAX requests properly, the only caveat being that threading doesn't seem to work on the Mac, c'est la vie.
After adding a machine independence layer, I have an almost fully functional Apple rTunes, so far only album art and multi-threading aren't working, and we don't need either to operate iTunes, so the last major step is App'ify rTunes, which is going to take me a couple of weeks to figure out, given my day job, business trips and life.
I'm going to try and use py2app which will allow me to share the config between both Windows and Mac OSX, and of course there's all the testing that has to be done, PowerPC vs. Intel, 10.3, vs. 10.4 etc.
I've received enough requests for the Macintosh port that I'm going to start work on it next week.
Post haste.
Well, never say never, after a couple of emails, here is a new version with slightly better support for PSP, plus a bug fix and the addition of Album Art. Note: for psp users unless you resize the album art the entire page isn’t going to fit on the psp screen. I’m working on more update to resize the graphic and place everything onto the brushed metal background.
If you like it leave a comment or send me an email.
www.agwego.com/rtunes

This is probably the final release of rTunes, I’ve converted the tool to AJAX and barring a few minor concurrency issues with the single threaded web server I’m using (which I’m not planning to fix) it all works nicely. I’ve added a slider for the volume and integrated the playlist picker into the graphic.
It also turns out that iTunes offers no programmatic way to select the AirPort Express you want send music to. A big thumbs down to you Apple.
I’ve had some requests for the ability to pick music from your library, but at this time I have too many other things to work on.
Enjoy…
www.agwego.com/rtunes

I’ve made the interface look much nicer and more compact. Photoshop is about as intuitive as lisp. I plan to add a slider for the volume control, still not sure about the best way to integrate the playlist picker.
www.agwego.com/rtunes

I just released rTunes 0.5 which is a simple self contained web server that is used to remotely control Apples iTunes. I created this becuase my AirPort Express sometimes causes iTunes to freeze up, and this remote access allows me to restart iTunes with out having to run up a flight of stairs, and I saw something on Engadget to do this, but you had to install a Web Server, and PHP and then load the scripts, etc. Frankly I want something simple, no installers with a very small footprint and hopefully a single binary. I think rTunes fits the bill.
www.agwego.com/rtunes

Posts tagged
rtunes —
all matching results
|
|
|