![]() |
Adding internet stations to maemo 5 media player
Media player in Maemo 5 stores the internet radio station in a sqlite database. The database is located in '/home/seadog/.mafw.db' and contains only one table 'iradiobookmarks' with three columns 'id', 'key', 'value'.
Id is a integer value and it's not unique Key is a string defining the type of data stored in value. Value is a blob build in a special way explained later. Each station must have at least three entries in the database with the same id (so they are grouped) and with keys "title", "mime-type" and "uri". Other keys also exist like "last-played" etc. "Title" defines the title which is shown in the UI "Mime-type" is "audio" for radio stations "Uri" is the location of the stream The "value" column contains the actual value of the "key" column. Because "value" can store different kind of data, depending on the "key" column, is defined as a binary blob. The format of the blob is "\x01\x00\x00\x00@\x00\x00\x00string that we want\x00" Because value is a blob we need some easy python scripting to produce valid entries in our database. Code:
def findLargestId(cursor): So for example to store a station with name "Foobar FM" and stream location "mms://example.com/stream.asx" we call insertIntoDb(cursor, "Foobar FM", "mms://example.com/stream.asx") and the function updates the station uri if the station is already there, or makes a new entry. Note: Before updating the database you should stop the media play internet daemon by typing /usr/bin/mafw.sh stop mafw-iradio-source and after updating enable it again /usr/bin/mafw.sh start mafw-radio-source If you ignore this step you want see your new entries until you reboot and you may destroy the database. You can find a working example of database updating the internet radio stations list under the devel repository named 'greekiradio'. The application creates feeds for greek internet radio stations from www.eradio.gr and inserts them into the database. http://maemo.org/packages/view/greekiradio/ |
Re: Adding internet stations to maemo 5 media player
Thanks for this great post. I'm now working on a package to add/remove all the Digitally Imported streams thanks to all the work you've done.
|
Re: Adding internet stations to maemo 5 media player
HMmh, so you're able to listen to asx using the Maemo Media Player? It never worked for me (it says the codecs aren't supported, even with extra codecs installed :/)
|
Re: Adding internet stations to maemo 5 media player
Quote:
|
Re: Adding internet stations to maemo 5 media player
Quote:
|
Re: Adding internet stations to maemo 5 media player
I love the stations added to the mediaplayer by greek iradio, but there are many that i dont need. Is it possible to remove them many at once? I dont want to remove them one by one. I removed the application after first installation, but reinstalled it now. If i use the "remove stations" button there is nothing happening. Any help? I copied some of the stations that were added so its ok to remove all of the others.
Thanks in advance |
Re: Adding internet stations to maemo 5 media player
Quote:
You can try to delete the whole radio database by typing ~$ /usr/bin/mafw.sh stop mafw-iradio-source ~$ rm ~/.mafw.db ~$ /usr/bin/mafw.sh start mafw-iradio-source in you terminal and then updating the list from the application. Hope that helps, -g |
Re: Adding internet stations to maemo 5 media player
Excellent app and thanks also for the detailed instructions.
Would you like to also add localisation for the Greek iRadio too? See here for info http://talk.maemo.org/showthread.php?t=43652 |
Re: Adding internet stations to maemo 5 media player
Quote:
Hi, Yes I will add greek localization to the app,asap. thnx for the link. ;) |
Re: Adding internet stations to maemo 5 media player
Thanks. I always wondered why the N900 radio station list is so small compared to Nokia Internet Radio on Symbian.
|
All times are GMT. The time now is 03:27. |
vBulletin® Version 3.8.8