wout clymans wrote: > hello, > > I am trying to improve the local freevo website because i think the > library part could do a lot better! > > here are the things i want to add: > -show albumcovers > -show artist/album/genre/runtime,... from audiofiles > -show moviecover + info > -show image thumbnail > -show image slideshow > -play movie/audio files on the local machine or on the freevo machine > -ask for a password when you enter a password protected directory > > what currently works on my system (after 2 days of programming): > -show albumcovers > -show artist/album/genre/runtime,... from audiofiles > -show image thumbnail > -ask for a password when you enter a password protected directory > > screenshots: > Show album covers <http://clymans.sin.khk.be/website.png> > Show audio info <http://clymans.sin.khk.be/website2.png> > > Where i need help: > -explain how i could read a fxd-file and get the information from the > movie? > > this is what i already found out: > adjust the function video/plugins/fxdhandler.parse_video_child(fxd, > node, dirname) > > fxd = fxdparser.FXD(fxdfile) > node = ? > dirname = the name from the dir > > now i need to know how to create the node...i saw it was a > "xml.utils.qp_xml._element instance" but i have no idea how to create it. > > If you have suggestions / remarks or if you want to help, just let me know!
This is just a stupid little script I wrote to see how it's possible. import freevo.util as util fxd_file = '/freevo/record/20061023_1815_King_of_Queens_-_Die_Klette.fxd' parser = util.fxdparser.FXD(fxd_file) parser.parse() # it's recursive! ;-) for a in parser.tree.tree.children: print a.name, a.attrs, a.first_cdata for b in a.children: print ' ', b.name, b.attrs, b.first_cdata for c in b.children: print ' ', c.name, c.attrs, c.first_cdata for d in c.children: print ' ', d.name, d.attrs, d.first_cdata Duncan BTW it prints, excluding email wrap around. copyright {} The information in this file are from the Internet Movie Database (IMDb). Please visit http://www.imdb.com for more informations. source {('', u'url'): u'http://www.imdb.com/Title?None'} movie {('', u'title'): u'King of Queens - Die Klette'} video {} file {('', u'id'): u'f1'} 20061023_1815_King_of_Queens_-_Die_Klette.mpeg info {} rating {} plot {} Carrie und Sara sind eifrig mit Hochzeitsvorbereitungen für eine Freundin beschäftigt - da können sie weder Doug noch Arthur gebrauchen. Doug flüchtet zu seinen Freunden, und als Arthur bettelt, mitgenommen zu werden, erbarmt sich Doug, obwohl er fürchtet, dass die Nervensäge ihnen den Abend verderben wird. Obwohl es tatsächlich so kommt, nimmt er sich vor, seinen Schwiegervater auch in Zukunft mitzunehmen, denn Carrie bedankt sich dafür mit einer heissen Liebesnacht ... tagline {} recording_timestamp {} 1161619921.2 year {} 10-23 18:15 genre {} runtime {} None ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Freevo-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel