Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#2030 closed enhancement (wontfix)

iTunes playlist importer

Reported by: frank.lynch@… Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: mythmusic Version: head
Severity: low Keywords: iTunes playlist mythmusic
Cc: frank.lynch@… Ticket locked: no

Description

The attached patch depends on Colins update to mythmusic:

http://svn.mythtv.org/trac/ticket/1919

This patch imports itunes playlists into mythmuisc. Simply copy your itunes library file (iTunes Music Library.xml normally found under MyDocuments? or MyMusic? on Windows) into the mythmusic search path and scan for new music.

Attachments (3)

patch.diff.gz (52.3 KB) - added by frank.lynch@… 13 years ago.
iTunes playlist importer for mythmusic
itunes.patch.depends-1919.gz (4.2 KB) - added by frank.lynch@… 13 years ago.
itunes.patch.trunk.gz (4.0 KB) - added by anonymous 13 years ago.

Download all attachments as: .zip

Change History (8)

Changed 13 years ago by frank.lynch@…

Attachment: patch.diff.gz added

iTunes playlist importer for mythmusic

Changed 13 years ago by frank.lynch@…

Changed 13 years ago by anonymous

Attachment: itunes.patch.trunk.gz added

comment:1 Changed 13 years ago by frank.lynch@…

I just uploaded a diff file (called itunes.patch.depends-1919.gz) its based off of colin's svn repository. It should be easy to apply this patch to trunk once 1919 has been comitted.

The second patch I've uploaded (called itunes.patch.trunk.gz) should apply cleanly to the current svn head. It does not depend on 1919 in any way.

comment:2 Changed 13 years ago by Isaac Richards

Milestone: 0.20

Sorry for the delay in getting to this, but wouldn't it be a bit simpler to write the parser using the Qt DOM interface? Seems to be quite a bit of code for this..

comment:3 in reply to:  2 Changed 13 years ago by anonymous

Milestone: 0.20

Replying to ijr:

Sorry for the delay in getting to this, but wouldn't it be a bit simpler to write the parser using the Qt DOM interface? Seems to be quite a bit of code for this..

My first choice would have been a StAX based parser, but unfortunately I couldn't find one for Qt. My second choice was DOM and I even had a working implementation, but when I used real data (my iTunes library.xml file is about 50MB on disk) the Qt DOM parser just wasn't up to the job. Its memory requirements were ridiculous and performance was unacceptably bad. So I ended up with SAX as it is known to be supperior to DOM when it comes to conserving memory and dealing with large documents. The downside is of couse that its a little more complex and as you pointed out there is more code.

Would you reconsider committing this with the SAX based implementation?

If you insist I can resurrect the old DOM based implementation and put another patch together for mythmusic but be warned that the Qt DOM performance is abysmal.

If you don't like the idea of integrating this into mythmusic then is there a possibility that I can contribute this as a standalone utility for the contrib directory?

Hope you don't mind me setting the milestone back to 0.20 :-)

comment:4 Changed 13 years ago by Isaac Richards

Milestone: 0.20
Resolution: wontfix
Status: newclosed

I won't accept the code as is, so, yes, I do mind you changing the milestone.

comment:5 Changed 13 years ago by Isaac Richards

If you want to rework it so it's not 7 files and almost 800 lines of code, I'd almost certainly accept the SAX parser - even more likely if you change things so that it'd be easy to add other formats.

Note: See TracTickets for help on using tickets.