tags:

views:

114

answers:

1

Hi

Can i get some help to parse .pls / m3u formats in phonon player. So far i know phonon doesn't support playlist. When any playlist is entered in open location it gives an error like codecs text/text-uri not found.

+1  A: 

Here is description of m3u format:

And here is pls:

After using open dialog you can just simply check if extension is matching m3u or pls format, and then parse file and add multiple sources to the list. It's the only way you could achieve what you need. As for me it is not Phonon task (but phonon could provide some help) to parse playlists

Kamil Klimek
I shall elaborate my problem:I have to parse a playlist containing many urls which may be refering to one common server. eg: if we open following link "http://yp.shoutcast.com/sbin/tunein-station.pls?id=9446" with gedit we see number of urls. I need to parse this list in Qt. Till now i am unable to get any reference of how to even open this location
ruby
QNetworkAccessManager to get playlist from url. Still you're able to somehow parse it. You cen gues by received data, or gues by file name in url. Start with retrieving it (to buffer or hdd) with QNetworkAccessManager... It's realy easy... Look for "get" method
Kamil Klimek
Thanks..could u plz elaborate t a bit or give me some code snippet as what i am doing so far is not opening my playlist
ruby
just connect to QNetworkReply::finished signal, and use readAll to get contents of playlist. Then do something with that data (parse it)
Kamil Klimek
I did the following bt it gives me no responseQNetworkAccessManager *manager = new QNetworkAccessManager(this); manager->get(QNetworkRequest(QUrl("http://yp.shoutcast.com/sbin/tunein-station.pls?id=1281102"))); QNetworkRequest request; QNetworkReply *reply = manager->get(request); qDebug()<<reply->header(QNetworkRequest::LocationHeader); qDebug()<<reply->url();
ruby
Nothing seems to work :(..Need help...urgent
ruby