These Forums Are Going Away!

These forums are currently read-only, but will be going away entirely in mid-august. All active discussion has moved elsewhere. Visit the Songbird Developers Google Group for developer topics, and Get Satisfaction for everything else.

ITunes Playlist Reader available

I've implemented an iTunes playlist reader and have it available at ftp://ftp.windjay.com/songbird/SongbirdPlaylistReaders-1.0.0.xpi I know developer services are being worked on, so if this is useful, maybe someone in the bird nest can add it to the sources. I couldn't find a way in the playlist reader API to read more than one playlist. Thus, this reader only reads the first playlist in the iTunes playlist XML file. Also, I've only tried this on a small playlist. I'm not sure how it will perform on a large one. To install, copy the comonent file to C:\Program Files\Songbird\components and delete Application Data\Pioneers of the Inevitable\Songbird\Profiles\*\compreg.dat. The next time Songbird is run, the reader should be registered and iTunes XML playlists should be importable.
mig Says:   
If you wrap that as an XPI, you can offer it as something that can people can automatically install through mozilla's extensions API. We're not quite ready to take code submissions, yet, tho.
ErikStaats Says:   
I've added an XPI wrapper for my iTunes playlist reader at ftp://ftp.windjay.com/songbird/SongbirdPlaylistReaders.xpi This can be installed by pasting it into the Songbird location bar or by downloading it locally and running the extension manager from Songbird. The extension manager is located under the Help menu (took me a while to find it there). I'll add rating fields to the import and see if I can bring up a playlist selection dialog to choose which playlist from the iTunes XML file to import. I'm not sure what I can do about the JavaScript being unresponsive for large playlists. I'll also look into creating a reader for pls and m3u formats. These look pretty simple compared to iTunes.
ErikStaats Says:   
Oops, pls and m3u support is already available. Someone posted a request that these be added, so I assumed they weren't there. Any other playlist support requests?
firepol Says:   
Ok as i discovered this place I'll post here my feedback about the itunes playlist reader. Here my previous comment and your reply > How big was your playlist? I have several playlists in itunes (containing 38, 2, 18, 103 etc. songs). > So did it fail completely or was it able to import your library? It imported only my full library (~2500 songs). No playlist was imported... > I'll look into the other fields you mentioned. I think that first songbird should support the other fields or metadata. mig said that they are not actually supported so i'm not sure they'll be saved but you can try... Just a question, where is the songbird library saved? itunes has an .xml and an .itl file, but songbird I can't figure out... Looking forward to see a new version of your itunes reader. I'll stay tuned ;-)
ErikStaats Says:   
The iTunes playlist XML file stores the full library as the first playlist, which is what my reader adds. I guess of all the playlists it could add, this one would be the most useful. It looks like the Songbird playlists get stored in a SQLite database. I'm not sure where that database is stored. I'll look into the iTunes .itl file. I haven't used iTunes much. Is there a way to export a specific playlist in iTunes?
mig Says:   
If they're in the column picker, they'll be saved (assuming you put them in the proper table columns with SQL or our js wrappers). The XUL tree display (both for columns and cells) is built directly from the results out of the table being requested for display -- for instance, the download playlist looks very different than the library because it has very different metadata columns (used for different purposes). The current list of table columns can be found in sbIMediaLibrary.js in the CreateDefaultLibrary call. Songbird keeps its data in SQLite database files found in the "db" subfolder. There's currently no "Export" functionality, but there's an sbIPlaylistWriter API ready for it. PS: If you use the File->New Remote Playlist menu item, you can "Subscribe" to your iTunes library as if it were a podcast and update the Songbird library automatically if you add new tracks to iTunes.....
blair_tree Says:   
i'm looking to develop an extension as well, one that would be reading data from the sqlite db. i'm not able to interact with the db, however. if i try to 'attach' to it with sqlite, it fails. could you provide some guidance here?
mig Says:   
errr... check out sbIDatabaseQuery and sbIDatabaseResult
ErikStaats Says:   
I've uploaded version 1.0.0 of the iTunes playlist reader extension to ftp://ftp.windjay.com/songbird/SongbirdPlaylistReaders-1.0.0.xpi I figured out how to use the playlist database API to import and create all of the iTunes playlists. This will include the full library, as iTunes exports that as its own playlist. I've also added support for importing the ratings fields. iTunes exports these in the range of 0-100. I'm not sure what ranges Songbird or other players use. I can add some scaling if Songbird defines a range.
torusturtle Says:   
Thank you for the xpi! Unfortunately it doesn't work here. I'll get the following warning:
Warning: Unresponsive script A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.
and when stopping I get this:
Alert [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [sbIPlaylistReader.Read]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: file:///F:/Program%20Files/Multimedia/Songbird/components/sbIPlaylistReaderManager.js :: anonymous :: line 226" data: no]
It added a new Playlist but it's empty (the arrows new stop looping)
ErikStaats Says:   
What happens when you continue the script? It can take a while to import the whole list. I'm not yet sure what to do to avoid the message.
torusturtle Says:   
If I click on "Continue Script" the window disapears and pops up again less then a second later, asking the same question. This can go on for ages. :-(
mig Says:   
One of the things you could do is separate the XML parsing from the actual calls that add the files to the media library. It wouldn't block the UI if you just parsed the xml data to a big object array, then used a timer object to call you back every X seconds and add a Y more objects at a time to the media library. As this progressed, the library would automatically update. Otherwise, if someone has an _enormous_ media library, it could take a very long time for all of the SQL queries to be constructed and run at once.
MothBox Says:   
I'd like to see something like this built in. Where you can import iTunes and WMP libary's and playlists into songbird. Maybe be able to see and play shared media on iTunes and WMP accross a network too.
jazzman Says:   
Hey, I've tried to download the add-on but on both links that you've supplied I get the error: "The connection to the server was reset while the page was loading" and was wondering if there is an updated link of some sort? Also I know that with this playlist reader you've made that you could just import cd's into iTunes then save the playlist and then import into Songbird but I was wondering if you could make Songbird to read m4a files as more than half of my music collection is from cd's.
ronen Says:   
m4a playback is coming very soon in version 0.1.1.
ErikStaats Says:   
Hmm... When I try the link to the 1.0.0 version from home, it works fine, but from the office it doesn't work. However, I was able to browse the FTP site and then successfully select and download the file. Try going to the following link: ftp://ftp.windjay.com/songbird I'll have to send an e-mail to my hosting service provider.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Keep me posted!

Sign up to be notified of new releases & important updates.


Get a Songbird Tshirt

Songbird Buttons


Get Songbird
Get Songbird
Get Songbird
Get Songbird


More buttons for your blog...