Hello,
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.
There is probably another way to prevent the code duplication, but that would
mean more complicated
code in tv/progam.py.
Maybe I did not see the whole picture, but a scheduled recording seems to be
not much more than a
ordinary program to me, thus it seems logical to use the ProgramItem class for
them and not create
an own class, too. I guess a similar problem will raise in the case of
favorites, where one would
maybe like to inherit from ProgramItem, but I did not look into that business
yet...
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?
Regards
Tanja
-------------------------------------------------------------------------
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