--- Dirk Meyer <[EMAIL PROTECTED]> escreveu: > Gustavo Sverzut Barbieri wrote: > > Dischi, > > > > Did you changed the way VideoItem works? Before we did have > > videoitem.plot, videoitem.tagline, ... but now we still have these > > attributes, but they're empty. > > No, IIRC this is like that some time now. > > > Instead there is a videoitem.info, which is a dictionary and has > the > > keys plot, tagline, etc... > > Yes, all minor informations should be inside the info dict. Later > this > dict will be filled by mmpython which works on a dict base.
Ok > > As I'm working on info_area and I have to deal with those > > information, I hacked a workaround and it works ok. > > You could use item.getattr(name). I changed this in your skin. I also > prevented your skin from 'eval' everything you don't know. Only > 'and', > 'or' and 'not' are allowed now to prevent abuse. using item.gettattr( b ) you get a string... if you want to know how many items you have in a playlist you will get how many chars have in the text represention of that array. Also, I didn't understand this code: elif b[:4] == 'len(' and b.find(')') > 0 and \ len(b) - b.find(')') < 5: exp += ' item.getattr("%s") %s' % \ (b[:b.find(')')+1], \ b[b.find(')')+1:]) why the clause: len(b) - b.find(')') < 5 ? also, how you get the length using that? :) > > However would be cool if we define a standard so DirItem, > VideoItem, > > AudioItem, ... all use the same way. > > Yes, getattr(a) is the way to go. It searches for item.a and for > item.info[a]. Every item has this function. Ok, but how to workaround the problem of len()? Gustavo _______________________________________________________________________ Yahoo! Mail Mais espaço, mais segurança e gratuito: caixa postal de 6MB, antivírus, proteção contra spam. http://br.mail.yahoo.com/ ------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php _______________________________________________ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel