Hi,

Tanja wrote:
> it seems that there is a lot of code duplication between tv.progam.py and 
> tv.plugins.scheduled.py.
> This probably can be avoided, if it would be possible to construct a 
> ProgamItem not only from the 
> output of kaa.epg.search but also from the output of 
> tvserver.recordings.list().
> But unfortunately the later returns a ipc.tvserver.Recording, if that class 
> would be a little more 
> like tvserver.Recording, that would help. I find it confusing that there is 
> more than one of such a 
> class BTW.
> What one would need would be data members like:
>       self.title = program.title
>          self.name  = program.title
>          self.start = program.start
>          self.stop  = program.stop
>          self.channel = program.channel
>          self.subtitle = program.subtitle
>          self.description = program.description
>          self.episode = program.episode
>          self.categories = ''
>          self.ratings = ''
> instead of a dictionary like ipc.tvserver.description['title']...
>
> Maybe there are good reasons for this, then please ignore my request.

No specific reason. The reason for two classes are that the tvserver
classes can do a bit more needed for the tvserver itself. But there is
no specific reason why the interface is different ... except I did not
compare it when writing. 

> There is probably another way to prevent the code duplication, but
> that would mean more complicated code in tv/progam.py.

The ipc.tvserver code is shared between freevo.ui and possible
freevo.webserver. This is why there is an extra class tv.program
inheriting from item.

> What do you think? Would it be possible to change the
> ipc.tvserver.recording class or should I try to fix it in the
> ProgamItem class?

Maybe make it possible to create a ProgamItem based on an
ipc.tvserver.recording class. I did not look at the code for some
time, I guess ProgamItem can be more powerfull.


Dischi

-- 
"Plaese porrf raed."
                -- Prof. Michael O'Longhlin, S.U.N.Y. Purchase

Attachment: pgpw3LIs5GVEL.pgp
Description: PGP signature

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Freevo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to