Saturday, November 15, 2008

Performance improvements...

One of the reasons that I originally wrote ooTunes was because I was very put off with the poor performance of other alternatives.  I tried DOT.Tunes (it was using 10% of my cpu all the time, and resyncing with my iTunes library took minutes).  I tried slimserver and found that in order to keep the slimserver database in sync with my iTunes library I had to run a 1 hour long sync.  I chose to do this during the night, since it bogged down my computer and made playing music from the library skip and buffer.  I spent a lot of time tacking on additional functionality (like marking songs played when I played them, etc.) but it was obnoxious not to be able to see changes to a playlist for as much as 24 hours.  So, ooTunes was born.  I spent a lot of time writing and optimizing the code that reads the iTunes library.  It now is parsed in under 5 seconds, without freezing up my computer, and that's on a library with 14,000 tracks!  This means, what you see through ooTunes is basically what you have in your iTunes library.  If it isn't, reload  the page, and it will be.  


Well, I spent several of the last few days further increasing the pageload speed.  I found that a lot of the time when refreshing the page (usually re-reading the iTunes library is the biggest part of that, though it only re-reads it if there have been changes since the last read), was spent reading online playlist from mp3tunes and pandora.  Many people don't use these so they wouldn't be seeing the slowdown, but for me, it was taking an extra few seconds each time I reloaded.  So I made changes to do a better job caching those as well.  (the demo will now load about twice as fast as it used to, on a fresh login!)


The other area that I've spent (probably too much) time optimizing in the last few days is the load speed on the iPhone or iPod touch.  I found it a bit frustrating on my large library (granted, I also have a not-yet-released feature of my photo library being loaded, which is something like 2000 more playlists to render) but I still thought it could use some speedup.  So I've reduced the image sizes using some cool compression tools that compress images losslessly, and more importantly, I ditched the dependency on Scriptaculous/prototype on the iPhone!  I seriously regret ever having started using Scriptaculous, it brings in something like 60kb (compressed) of javascript libraries for a few tasks (mostly the drag and drop of songs on playlists, etc. in the regular browser)... and there's no fine grained modularity (no way to say, I only want this feature, give me the bare minimum javascript library!)  So, the iPhone interface now loads in about half as much time as it used to (at least on my own library).  There is still a lot of room for improvement, but I'm pleased with the progress that's been made.


I also made some needed changes to the interface on the iPhone.  No longer do you have to tap 10 times to get a song to play (it's still more than anyone would like but I've reduced it as much as I can, tapping a song once now loads the song and one more time on the quicktime play button and it should begin playing).  Radio stations and movies are even better.  One tap and they are playing!   (the reason is that they don't do back to back playlists so they don't require the little play button to be pushed).  I wish apple would give us some REAL javascript controls for the embedded quicktime player, but it doesn't seem to be top on their priorities.  However, it's much better now that I fixed my own problems.  


Now if only I could have made more progress on MooTunes.  It's coming along but my love for "speed optimizing" just overwhelmed my love of making tons of money!


Also, please send me your suggestions and requests for improvements!  I would have probably never made some of these changes if someone wouldn't have spoken out about it!


Tuesday, November 11, 2008

App store rejects... it's time for change!

In following a thread on the macrumors forums about another app (castcatcher) that was rejected (an update actually) on grounds of using too much bandwidth.  This one maybe is a bit too close to home for me, so it's got me a bit more worried than the "pull my finger" app that didn't make the cut. Is anyone aware of a petition to apple to be more open about their acceptance of apps? (too lazy to google but strangely not lazy enough to not write about this).

It seems that if enough registered developers signed a reasonably written, petition (and had some of the major developers of major indy apps) sign on, they may be able to be heard. My guess is that those with a lot of success are scared to "bite the hand that feeds them" but the uncertainly is extremely demoralizing to a developer. I'm not going to stop developing because of the fear, but it does certainly make me want to hedge my bets and not "risk everything" on the hopes that my apps get accepted into the store. True innovation, however probably does require more of the "risk everything" attitude. It may simply take getting some exposure on the front of a few of the apple news sites, and a few big developers in an "open letter" to bring about some change. Does the NDA override our right to unite and beg for some clearer groundrules? Is there any reason the SDK can't include the same tests that Apple themselves are using to vet applications (if such things truly exist? Things are appearing more subjective these days... and admittedly some have to be judgement calls, but something like bandwidth usage is easily implemented in a test suite).

Wednesday, October 22, 2008

ooTunes, internet radio, last.fm, and airtunes

A recent request from a potential ooTunes user was whether ooTunes could be used to listen to windows media streams in iTunes, so that the audio could be played on their home stereo using airtunes (and the apple airport express).  Well, I'd been meaning to make a way to listen to a stream from ooTunes remotely but in iTunes, which would solve that issue, so I spent some time last night doing just that.  

Basically, you click the little "info" link* (the  at the beginning of the track in ooTunes), then click the "Play in iTunes" link which will download a .pls playlist which can be opened in iTunes to play that stream!

The latest version of ooTunes will let you listen to any of the internet radio stations compatible with ooTunes right through iTunes (even remotely) so you can pipe them to your stereo connected by Airtunes!

In fact, it will probably even let you listen to whatever stations you want (this includes last.fm streams, internet radio, etc.) on your appleTV as well (though I don't have one to test it on!).  If you have one, test it out and let me know if it works or not!

* You may also see the little "$" link there in the top corner.  That's so you can search for the lowest price on that song or album, if you were interested in buying it.  One day I hope to have that working with the currently playing song on a station, but the makers of that technology have been pretty unresponsive to requests from a little guy to license it.  Just FYI.

Tuesday, October 21, 2008

Some bugs fixed...

I finally took some time to fix some longstanding issues with ooTunes.  The biggest one is that now you can tell ooTunes to use a local address when you're on the same network as your ooTunes server... which is a) much faster and b) should work with routers that are dumb and can't connect to a local computer using a remote address).  It's off by default but if ooTunes detects that your router isn't working with local addresses, it's turned on automatically.  You can manually turn it on/off on the "remote access" preference page.  There are also some optimizations to speed up logging in, and more info about your current ip (both local and remote) on the "remote access" preference page.  If nothing else  I hope it will prevent lots of support emails asking "why can I connect from my iPhone, but not locally"? 

Create Genius Playlists in iTunes on the go using ooTunes ... thank you Applescript

I've been taking a break from the pain of getting a firewall-avoiding/live-video-playing ooTunes iPhone app finished to spend some time on the ooTunes Media Server.  I've fixed a number of longstanding bugs and added a few new features.

One major new feature is that (as promised) I've finally added Genius Playlist creation to ooTunes!  What this means is that when you're listening to a song on random in ooTunes, and you decide that you want to make a Genius playlist from it, it's as easy as dragging that track to the "Genius" playlist.  Well, I say it's "that easy", but that's not exactly correct (and it wasn't trivial to get working):

Caveat Emptor -- or six
  1. This is currently only working in a regular browser (not on the iPhone yet).
  2. This only works on Mac's (sorry PC, you've had a rough couple of years, I know).
  3. This only works on Mac's when you turn on "User interface scripting" also known as "Support for Assistive Devices"... 
  4. It requires iTunes to be brought to the front and may even have message boxes popup in iTunes on your ooTunes server computer.
  5. It may not work on non-english versions of iTunes. 
  6. You have to already have the track in your iTunes library, and "Genius" has to be updated since that track was added.

So why all the caveats?
1. Because I haven't come up with a clean way to do drag/drop on the iPhone like I can in a regular browser
2. I have to use AppleScript to create the Genius Playlist in iTunes, there's no equivalent commands for the windows COM interface to iTunes.
3 and 4. There is no menu command or shortcut key or AppleScript Library entry in iTunes to allow access to the "Start Genius" feature of iTunes... it's almost like... oh, I don't know... Apple DOESN'T WANT YOU TO BE ABLE TO DO THIS?!?... so it's fragile (could stop working with the next version of iTunes) and annoying (the Applescript has to simulate clicking a mouse on the button, which means iTunes has to be at the front, and a message box may appear if the track can't be used to create a Genius playlist).  
5. The button can't be found by anything but name so it's not going to work for other languages unless "Start Genius" is never translated to your language in iTunes.
6. Unfortunately, you can't create a genius playlist from any old song... I was hoping to make it so you could find music you DO own that's similar to music you DON'T own (ie, from pandora, last.fm, seeqpod, radio, etc.)  But you simply can't.  You must have the track in your iTunes library already, and you have to do the "Update Genius" after adding any new tracks, if you want them to work with the Genius Playlists.

So, there you go, I've made good on my promise, now try it out (although you can't in the demo cause I don't have enough legal tracks there for iTunes to make any suggestions... sorry!)

So there you have it, it'll only get better (hopefully).

Oh, and so no-one has to reinvent the wheel, here's a download of the applescript ooTunes uses (more or less).  Feel free to do what you like with it but, but please leave the comments in there and the copyright notice with the link to this post! 


(*

(C) Steven Woolley 2008, as part of ooTunes Media Server (see ootunes.com)

  

How to create an Genius Playlist in iTunes using applescript.  More info and issues discussed here:

http://ootunes.blogspot.com/2008/10/create-genius-playlists-in-itunes-on-go.html 

Feel free to use this code however you'd like, but please keep this comment intact so I hear feedback, etc., since I'd like to hear about updates, improvements, suggestions, etc. 

*)


set pid to "4B62C662B53FFB94" -- set this to your track's persistent id... or use some other method to get your "seed" track


set app_name to "iTunes"

tell application "iTunes"

try

with timeout of 10 seconds -- don't want to hang forever if, for instance, iTunes has a dialog box already open

set cur_track to (first track of playlist named "Music" whose persistent ID is pid)

reveal cur_track

end timeout

on error theError

return "Can't find track!"

end try

end tell


tell application "System Events"

tell process app_name -- this needs Assistive Devices support enabled see: System Preferences -> Universal Access -> "Enable access for assistive devices"

try

set b to first button of window app_name whose help is "Start Genius." -- that's about the only way to get the "Start Genius" button, but it will break on non-english versions (I'm guessing)

tell application "iTunes"

activate

end tell

click b

with timeout of 1 second -- this is a hack to "test" if the "can't create genius playlist..." dialog opened.  If it does, we'll timeout (hopefully) and then close the dialog so it doesn't freeze future applescript interaction

tell application "iTunes"

activate

end tell

end timeout

return ""

on error theError

if theError is "iTunes got an error: AppleEvent timed out." then

key code 36 -- close the dialog 

return "Can't create genius list from that track!"

end if

return theError

end try

end tell

return "Error creating genius playlist!"

end tell

Friday, October 10, 2008

Why you can not play live video on the iPhone

The question I and many others have about the iPhone is: 

Can we make it play live video?  

I'm not talking about prerecorded video (that's doable, and really easy, ooTunes does that already, along with tons of other apps, including the youtube app).  Also, I'm talking about this in the context of an officially released app in the app store, built using the iPhone SDK.  The problem has already been solved using the jailbreak toolchain, but doesn't work for official apps because of 3 and 5 below, and 4 below is still very applicable. 

I'd be ecstatic if someone would prove me wrong on any of this... so put in your comments, please!

So, nothing's impossible, but it's extraordinarily difficult for the following reasons:

  1. There is nothing built in to the iPhone to handle true rtsp streaming
  2. The only formats available to be played on the built in video player are .mov, x264 or mpeg4 all of which require a frame index in the moov atom at the beginning in order to be played as they're downloaded.  Unfortunately, for a live stream such information is simply not available until the encoding is finished.
  3. Should you desire to build your own video player, the SDK doesn't give access to the private frameworks that apple uses for video decoding or the raw framebuffer that a player would need to have fast display.  There are workarounds (that are suboptimal) but no one can show source thanks to the developer NDA that is still in effect. (technically this comment is probably out of line, though I've gleaned it from reading/searching the web, NOT from the sdk). 
  4. Without proper hardware optimized methods, you're going to be a battery hog, and probably limited in resolution.
  5. Now, imagining that all of the above is somehow overcome (which I am sure it has been by some)... now the question is: "Will apple accept your app into the store?"  It is against the terms of most (if not all) service provider's agreements to stream live anything (and video isn't going to be low bandwidth).

So, the options are:
  • Figure out a way to encode live video with predictable metadata (fixed frame boundaries and packet sizes)
  • Write your own video player from scratch to decode whatever type of stream you want (remember 3, 4 and 5 above)
  • File feature enhancements and otherwise petition Apple in hopes that they'll add support for RTSP or change their SDK to allow for this.
  • Encode in short snippets and try to play them back to back seamlessly, with no breaks... this way you almost have live video (delayed by the amount of time to encode and start playing a single snippet).
  • Give up on it?

So for ooTunes, I've learned the hard way all of the above.  My latest efforts have been in porting the ogg theora video codec.  I've gotten as far as decoding, but can't yet display fast enough due to 3 and 4 above.  It's questionable due to 5 whether it's even worth anyone's efforts.

Hope that helps someone, and I also hope that someone can prove me wrong on some of the negative stuff above. 

Wednesday, October 1, 2008

Woohoo! Apple finally drops NDA on iPhone development!

See mac rumors note here:
Apple Drops iPhone Non Disclosure Agreement (NDA)

This is a wonderful thing for ooTunes!  I'm about halfway to getting video working (live video that is) but one of the libraries needed didn't have source available due to the NDA.  Now I don't have to reinvent the wheel!  Example code will be much more available, etc.  now if only I had 26 hours a day!  

Had to say something... after the meanish stuff I've said in the past.

Thursday, September 18, 2008

hallelujah!

I finally finished going through my latest list of radio stations from the ooTunes demo to mark them as working or not!  This resulted in about 2897 stations confirmed to be working with the iphone (and this is by no means a complete list of stations that will work).  This is good for at least 3 reasons:

  1. It forced me to finally get Real Audio streams to work
  2. It made me realize I really need a way to add streams directly from ooTunes (it's about half implemented already)
  3. I can FINALLY get back to listening to my own music and streams (instead of having to listen to conservative talk shows, sports shows, religious shows, and boring political news)
So, coming soon:  search and add stations from the your iPhone/browser, lots more radio stations (including BBC stations that didn't work before due to using Real Audio), Genius Playlist creation (even from songs you don't yet own, but like, ie, from seeqpod), and some bug fixes.

App Store humor

decision tree for apple accepting new apps to the app store
Enjoy!

Tuesday, September 9, 2008

Are Genius playlists the beginning of the end for last.fm and Pandora?

Good news for music lovers ... bad news for last.fm, pandora and the like...


iTunes' new Genius playlists are, well, genius!  With one of the most installed and (more importantly) most used music players apple would be foolish to NOT get users' play data and 

 

  1. use it to make their offerings better and
  2. use it to PROFIT!


So my initial impressions:



It is a bit scary signing up... anonymous, but... um, yeah, give us your iTunes Store account name and password... but it's anonymous, we promise!  Did we mention how anonymous it is?  Well it is totally anonymous!  


I'm not a "privacy" nut.  I recycled my tinfoil hat for some quick cash.  If I was, I wouldn't be blogging, or scrobbing with last.fm, etc.  I understand why they need the "privacy policy" and your account info (in fact, I actually read the privacy policy associated with enabling Genius in its entirety... it's actually short and sweet).  It's not a super big deal, and I applaud apple's upfrontness about it.


Okay, one hurdle down.  Next iTunes spent an hour or more reading my library and playcounts, dates, ratings, etc (it was probably closer to an hour and a half, but I have something like 14,000 tracks so your ymmv).  Then, after telling me it had been submitted, I was informed that Apple was

 processing the data.  A few minutes later:  Success!  


"You can start pestering the Genius!"  <-- this is NOT what it said, I forgot...


So, I tried it out, and it did a pretty good job, at least on the first few attempts, at least with the non-obscure stuff.


Biggest rightside downside?  

The Giant Genius sidebar... of course.  If you're like me, you may just want to hide that Genius sidebar right off the bat.    I refuse to buy tracks from the iTunes library before looking around to see if I can buy the real physical cd online for less.  I like tangibles, and don't mind the wait for delivery and ripping, but I'm probably in the minority there, given the success of the iTunes music store and certain less legitimate

 means...  Of course the sidebar might be good for recommendations even if you don't buy from iTunes, so I'll look into it eventually I'm sure.


(NOTE, I do applaud that it recognized probably the only major Johnny Cash album that I don't (yet) own, and didn't try to re-sell me all the stuff I already bought... that is smart use of info... something that last.fm and pandora really CAN'T do, at least not very well).


So, is this really the end for last.fm and pandora?  Not really... Until Apple/iTunes will let you actually play stuff (more than 30 seconds) from songs you don't yet own, they can't compete with the music discovery aspect of those guys... but if I were an investor in last.fm/pandora, I'd be a bit scared (given the licensing costs we've heard about...) and now this encroaching by Apple.  But, oh well, I'm pleased with apple's move, and competition is a good thing, right? Right?


And the best part of it all?  ooTunes didn't break with the update to iTunes 8.0!  In fact, genius playlists just show right up (both in a regular browser or in the iPhone).  The only problem is that it doesn't use a neat new icon for Genius lists (kinda gonna be hard to come up with an icon more genius than nerdlinger,  

but I guess we can give him a pocket protector or einstein hair or something.  Look for an update soon that fixes that minor issue, and HOPEFULLY a way to create a genius list on the fly, through ooTunes, using not only iTunes tracks, but maybe even pandora, last.fm, seeqpod, or other tracks (no promises on this, but if it's possible, I'll do it!).


Wednesday, August 20, 2008

list of radio streams that work on your iPhone with ooTunes

I spent a bit of time today exporting and making searchable the list of radio stations that I've confirmed to work on iphone and ipod touch via ooTunes.  This is (of course) an ever growing list, which I've built mostly by requests from folks who are wondering how to listen to streaming radio on their iphone, usually with a favorite station or two.  There are some great programs out there for streaming certain streams (AOL radio, Tuner, Flytunes.fm, etc.) but to my knowledge, ooTunes is the only one that allows windows media streams (.asf, .asx, .wmv, .wma, mms, etc.) to be streamed to iPhone.  So, without any further ado, check out the new searchable station list (I'll try to update it every few days), and as always, if you want to know if your favorite NPR station or specialty stream works, drop us a note and we'll look into it!

 

Tuesday, August 5, 2008

an undocumented change in iTunes interaction with applescript

Noticing a pattern here?  Apple changed the way that iTunes returns a track from most applescript calls.  Instead of returning a Track itself, it now returns a list with a single track in it.  Go figure, so this basically broke every bit if interaction between ooTunes and iTunes 7.7 or higher.  Since there's no documentation on it (that I've found), who knows if this was inadvertent or intentional.  We may never know.  It may change back, it might not.  Nevertheless, since this is pretty much the only easy way to interact with iTunes on Mac's, I'm betting there will be more than one broken application (since I already can think of a handful).  So, the latest release fixes this (and a number of other smaller bugs, mostly relating to windows and Quicktime).  

Also in this release, preliminary support for playing movies or viewing pdf's from a regular browser, instead of only on the iPhone/iPod Touch.  This feature is off by default, but can be turned on for just the session, or globally.  I used the excellent jquery media plugin to do the embedding based on mime type.  It's not perfect (yet), so add your comments below if you find problems or have suggestions!



Sunday, July 20, 2008

An undocumented change in Javascript on your iphone

Just thought I'd make a quick mention of a change that broke some ooTunes functionality in the safari browser on the new iphone 3g and iphone 2.0.  When picking a specific genre, artist or album from a playlist, ooTunes updates the list of songs using ajax, by listening for the "onchange" event on the select component.  Well, with the new firmware, that stopped working.  I did a few quick checks and thanks to someone with the new firmware, discovered that the event is simply never fired anymore.  The only event I found that I could use that would work the same on both firmware's was the "onblur" event.  This means now the playlist isn't updated until you click "done" whereas before, it updated as soon as something was picked from the list.  The change was already made and can be downloaded from the ooTunes website.

Thursday, July 17, 2008

A busy week for streaming radio to your iPhone

This week was the launch of the new, faster iPhone, and the opening of the iPhone app store.  While the launch had a few rough times, and the app store is pretty underwhelming, there are a few great things.  I already commented on the Pandora app (and should have blogged about the last.fm one, since imho it's waaaay better than the Pandora one).  Anywho, lots of cool stuff in the future, even if the app store's pretty anemic for now.

So, what's new with ooTunes?  I just uploaded a brand new version (0.3.3.3).  Here's a few of the changes/fixes/improvements:

ooTunes can now stream windows media streams (lots of internet radio stations use this format...  usually the stream address begins with mms://).  iTunes can't play these streams, but with the help of a wonderful free (and open source) program called VLC, you can now play these streams on your iPhone.  See the transcoding help section for the nitty gritty details.

Trying to keep up with the big guys, we added the ability to start a new Pandora station from a search term.  In the future we'll have a way to start one from any song in any of your playlists (like you can by dragging and dropping songs on the pandora playlist in a regular browser), but for now, manual search will have to do.

Continuous play playlists in mobilesafari (the browser on the iPhone) have been re-implemented.  Apple has left things in a pretty frustrating state when it comes to playing music in anything but the iPhone's own song library... (e.g. no javascript player controls or events in safari, no background processes in SDK applications, no way to keep playing when the phone is locked, no way to use the double button push to bring up the controls, the modal quicktime player in safari, the skip buttons won't skip to the next song in the quicktime player, can't show album art, etc., etc.)  Nonetheless, we've done the best we can given the current state of things.   The nice thing about playing music in mobile safari is that you CAN put it in the background and it will keep playing... you just can't show anything else (even art)... you can even lock the screen and it will keep playing... so it's the closest thing to "usable" that we have. 

Previously, we used a javascript timer to guess when the next song should be played.  Unfortunately that broke things when you put safari in the background since javascript stops... so we use genuine playlists now...  there are two (new) downsides to this... 
1.  You have to push "play" twice to get the playlist to start... once to load it, once to start it playing.
2.  When you put safari into the background or lock your phone, the next song doesn't start playing until it is COMPLETELY DOWNLOADED!  So, even though the player is CAPABLE of buffering and playing before the whole song is streamed, it choses not to when in the background... if you have a fast connection (wifi) this download is fast and it's not super annoying.  On slower connections, it's more annoying.  As a (crappy) workaround, you can simply switch back to Safari for one second and it starts playing, then go back to whatever else you were doing.  

Seriously though, it sucks that developers are left with two (differently) sub-par solutions for streaming music on a device that is designed to do so.  Hopefully apple will address this in the future. 

Bugs fixed:
windows iTunes interaction was broken in a previous release... songs should be marked played again with this version (if you have that turned on).

A "remember me" login option was added.  NOTE: you should be careful with this since it's stored in a cookie (it expires in 7 days), so you probably don't want to use it on a computer that others use.

Fixed a minor bug with the seeqpod playlist showing up as playable without anything to play.

Future:
Now that we have all the hooks in to use VLC, that opens the door for future support and transcoding of lots more formats and thus, lots more content.  

Apple says they're "processing"  my iphone developer program application.  Hopefully that gets approved quickly... I have a great "flashlight" application that just HAS to be in the store ASAP!



Thursday, July 10, 2008

Pandora on iPhone

Well, the news just hit that Pandora.com (finally) lets people listen and create stations, etc. from the iPhone. This is fantastic! This was one of the reason's I created ooTunes! Sure, ooTunes has let you listen to pandora on your iphone for almost half a year now, but with Pandora officially sanctioning and providing an app (funny how their app got accepted but ooTunes hasn't yet... thanks apple!), this can only be a positive thing.

Anyway, does this mean ooTunes is over? Not for me it doesn't. It does set the bar a bit higher though. ooTunes can scrobble your Pandora plays (I kinda doubt Pandora will do that, since last.fm is kinda a competitor) but we'll see. ooTunes also lets you play non-music streams (like npr news, and pretty much any stream you can play in iTunes or find in the iTunes radio stations section... just drag it to your library or a playlist, and ooTunes will pick it up and stream it.) ooTunes streams pandora, but ooTunes has other tricks up it's .. um.. pocket protector.

So, check out the new official pandora app! It suffers the same fate of all official SDK apps, in that you can't listen to music and switch apps (ooTunes lets you do this, with some caveat's, if you're playing ooTunes from mobile safari).

I guess I should list here the things that ooTunes will need to improve to catch up:
easily starting a new station
thumb up/down
stand alone application (come on apple!!! you know you want to email me!)
Pandora doesn't require you to run your own server and mess with your firewall.

Anything else I'm missing? Let me know!

Wednesday, July 2, 2008

Updates... Linux iphone streaming, last.fm ratings, etc.

A couple notes of fixes/improvements in the latest version...

1. The server will now run on Linux (or solaris, or any other *nix). It was an easy port (ooTunes is mostly written in java) but there were a few difficulties.
2. There is now an option to turn off all iTunes interaction globally. This means a) you can run without any dependence on iTunes and b) you won't have to have iTunes open while running ooTunes, unless you want iTunes' artwork or marking things played, etc.
3. Fixed a few minor bugs in the price search code (if you haven't seen, you can search 10 stores for prices of mp3 downloads or cd's). I've added a few new stores and fixed some bugs that were preventing finding some albums.
4. Fixed pandora integration in the browser. The pandora flash player wasn't working in all browsers. It should be working again.
5. Now, when you give a last.fm stream a low or high rating, it is marked "love" or "ban".
6. I've been working on a couple youtube demo videos... they may be a good place to find out about features that may not be documented yet.
That's all.
Enjoy!

P.S. Still waiting to hear back from Apple about being accepted to the iPhone Developer program... kinda frustrating, but at least ooTunes should work just fine in Safari on iPhone or iPod Touch, even the new 3G version.

Tuesday, July 1, 2008

Why last.fm will go on, and lala (if you have even heard of them) will die.

This week ooTunes had some ups and some downs. Lets start on the negative part (this is a blog after all). Lala changed their api recently so that you can't (easily) get access to your music that you have uploaded to their site, without going through lala.com. Hence, from here on out (or until lala decides to give people access to their stuff through an api), ooTunes will not be able to play your lala tracks. Sorry, but that's their prerogative (I think?) I would delete my thousands of songs I painstakingly uploaded to their server, but why not let it sit there, gathering dust?

Okay, some good news and then a short prediction....

The good news is, I got an email from Last.fm. They added ooTunes to their list of software that uses last.fm. (ooTunes can play streams from last.fm, and scrobbles tracks that are played and I've got more ideas for integrating with last.fm when I have more time, especially with their new api). Anywho, on top of that, they gave me a 12 month subscription to last.fm, to thank me! I was elated! (hence the !!!'s)

So, my prediction is... who will be around in oh... 5 years, last.fm or lala.com?

lala.com has some brilliant people working for them. They have great ideas, lots of money.. and they have (had?) a great community. Unfortunately, I don't think they'll last. I think their Music Label money is going to be their downfall, while last.fm's music label money seems to be a bit less... how shall I put this... evil. Maybe I'm just bitter cause one of the founders called ooTunes "slow and buggy"?

Then again, maybe lala.com simply never stood a chance?

Tuesday, May 20, 2008

New features...

Since I now link to this blog from ooTunes.com, I figured I probably should step away from coding to at least put something up here...


Soo.... I'll just put a short list of the bugfixes and new features added to the most recent ooTunes server release (0.3.1.3):


  1. Fixed stupid IE7 crash and burn on pandora (although it still doesn't appear to load the pandora mini-player?)

  2. Fixed loading of pandora query on new search.

  3. Fixed cleanup code for deleting cached mp3 file from SSPlaylist

  4. Lower timeouts for MP3Tunes login (it was taking forever!!!) and for seeqpod, and artwork cache code...

  5. Fixed some of the non-working radio stations from itunes by not making all url's lowercase... (duh!)



I'll discuss each briefly...


  1. IE7 is by far my least favorite browser to code for. Perhaps it's that my feelings for Microsoft are less than positive, perhaps it's that I've read too much negativity about it, but most likely, it's because a) it is always the browser of the 4 we support that doesn't work and b) because the error reporting is awful! This bug that I fixed was no exception. Basically, when loading the pandora mini-player into a frame on the page, IE7 throws up a totally useless error:


    Internet Explorer cannot open the Internet site http://demo.ootunes.com/playlist. Operation aborted.


    and then, on top of that, it kills the page completely and gives a blank page... not very helpful. Enter google... fortunately, everyone and his/her dog/cat has experienced this one (been around since IE5.5 at least) so there were some useful blog posts etc. that helped explain the issue... and Microsoft's own bug system (you'd think they'd try to actually fix those but...) So now it doesn't totally croak, but for some reason, the pandora mini-player still doesn't load. Step in the right direction.


  2. Plain and simple, the code to create a new pandora station was being ignored by an earlier request during a page load. Now the new station should appear and start playing correctly. This affected the desktop browsers, not iPhone/iPod touch mobile safari.


  3. In order to not litter your hard drive with cached audio files when transcoding is taking place, ooTunes deletes the last transcoded song when a new one is played. However, just in case, I make sure they are all deleted when you've played songs for awhile, this wasn't checking in the right directory.


  4. Yesterday when I was logging in to ooTunes, I found that it was taking FOREVER to load. I tracked it down and it was because mp3tunes was not responding, and the timeout was like a minute long. So, I changed the timeout to be 10 seconds, and did the same for seeqpod searches, as well as for checks for external artwork (typically by searching amazon).


  5. Finally, I figured out why several of the streaming radio stations from iTunes were not working in ooTunes but were in iTunes... I was using lowercase to find the url's for the streams, and accidentally converted them to lowercase.. but apparently some of those url's are case sensitive. I fixed it and every one I've tried so far works in ooTunes now (as long as it also works in iTunes). If you find a station that doesn't work, please let us know here and we'll try to get it working!



That's all for now...
Steve