On Fri, 2003-11-14 at 19:56, Bastien Nocera wrote: > Heya, > > Is there any code in RB that does some playlist parsing before playing > an iRadio? (Answer to which I guess is no). Well, that depends. If you do something like 'rhythmbox /path/to/playlist.pls', the playlist will be parsed, any iradio URIs will be added to the list, and then the last one added will start playing. > Or where should I add it? You want to be able to have a single iradio station entry point to a playlist, and parse the playlist every time it's played, right? And just pick a random entry from the playlist or something? Doing something like that would kind of break the current abstractions we have in rb. I'm not saying it's necessarily a bad idea, it just doesn't cleanly fit in at the moment. The least ugly way might be to have a little bit of code in RBShellPlayer which, right before opening an entry, checks whether it's an iradio url, and whether the URI ends in .pls or something. If so, parse it there and pick a random one. Or instead of just looking at the URI, you could try getting the mime type of the URI, and checking with rb_playlist_can_handle. The thing I don't quite like about that is it will end up making two connections to the station. I know if I was a server maintainer, I'd be irritated if a client always opened it twice. But trying to get the mime type back after opening it in monkey-media and stuff would be hairy...
This is a digitally signed message part