James Trietsch wrote:

Forward to the devel-list.

> [Sorry, this one turned out a little long. What can I say, I like to write...]
> 
> One of my recent projects has been working on the recodings_manager plugin. I 
> love the concept and find it superior in a lot of ways to the default 
> flat-list of programs. I've got it to display thumbnail images and I've made 
> tweaks to the recordserver (to put in default watch/keep values in the fxd, 
> if you're using RM) and webserver file-info popup (to display an icon based 
> on watch/keep status, among many other things).
> 
> Unfortunately, the RM plugin seems to make its own rules when creating the 
> lists of TV programs. They weren't even classified as type 'video'. So I made 
> them type 'video'... and opened up a whole new can of worms when the 
> bookmarker noticed the shiny new 'video' items. Long story short, I've looked 
> over the properties that get added to a video item in video_item.py, and I've 
> added 'variants' and 'subitems' properties (both empty) to keep the 
> bookmarker happy, so at least the menu will display without throwing an error 
> popup.
> 
> Now the problem is (and actually always has been while using the RM plugin) 
> when you go to set a bookmark while watching a TV program, it wrecks. Like so:
> 
> 2007-12-18 20:07:42,730 CRITICAL main.py (484): Crash!
> Traceback (most recent call last):
>   File "/usr/lib/python2.4/site-packages/freevo/main.py", line 472, in ?
>     MainTread().run()
>   File "/usr/lib/python2.4/site-packages/freevo/main.py", line 325, in run
>     self.eventhandler(rc.get_event(True))
>   File "/usr/lib/python2.4/site-packages/freevo/main.py", line 275, in 
> eventhandler
>     if not rc.app()(event):
>   File "/usr/lib/python2.4/site-packages/freevo/video/plugins/mplayer.py", 
> line 426, in eventhandler
>     return self.item.eventhandler(event)
>   File "/usr/lib/python2.4/site-packages/freevo/video/videoitem.py", line 
> 652, in eventhandler
>     if self.plugin_eventhandler(event, menuw):
>   File "/usr/lib/python2.4/site-packages/freevo/item.py", line 438, in 
> plugin_eventhandler
>     if e(self, event, menuw):
>   File "/usr/lib/python2.4/site-packages/freevo/video/plugins/bookmarker.py", 
> line 171, in eventhandler
>     videoplayer = self.item.player.name
> AttributeError: 'NoneType' object has no attribute 'name'
> 
> (I just noticed on review of this before I sent it that it says 'NoneType' 
> object. It used to say 'RecordedProgramItem' object, which is the correct 
> object class from RM plugin. I just went in and got rid of some extra 
> properties I had added and crashed it and it's back to 
> 'RecordedProgramItem'...)
> 
> I know what the problem is: my TV items don't have a player.name property. 
> And I know what bookmarker is using it for (Xine needs a playlist file while 
> mplayer can just take command-line arguments). And I can even see in 
> video_item.py where it selects the best player from a list and assigns it to 
> item.player. But I cannot find where item.player.name is set! I've searched 
> the whole /site-packages/freevo structure for 'player.name' and only get hits 
> in bookmarker.py (obviously) and dvdimage.py.
> 
> I'm about to lose my mind! ^_^
> 
> I'm happy to add the proper code to recordings_manager myself (I'm actually 
> really enjoying picking Freevo apart and tinkering and I hope my 
> contributions will be useful) but if someone could give me a hint? Point me 
> in the right direction?
> 
> For what it's worth, RMs play function turns right around and calls the 
> video_item.play function, then does some housekeeping afterward. And I have 
> confirmed the bookmarker works flawlessly with items in the Watch A Movie 
> directory (the auto bookmark causes a crash, but I can address that later), 
> both setting while watching, and then choosing them to play back later. If I 
> only knew why item.player.name wasn't being set to the player name... 
> 
> Or maybe I'm going about this in completely the wrong way? I wanted to make 
> the TV items type 'video' so they would get the 'Transcode Video' menu item 
> from the encoding_client. I'd like to crush programs that I planned on 
> keeping, to save space. This did work, by the way: Once the items became type 
> video, they got the additional video menu items too. But maybe there's an 
> easier way to do it? Call something in video_items.py instead of reinventing 
> the wheel? I'll look into that too.
> 
> Thanks in advance for any help anyone can offer. It feels good to be using my 
> programming skills, and I think I'm slowly learning Python by osmosis. Some 
> of the really fancy stuff in Freevo is still over my head, but someday I'll 
> know how it all works. And then Freevo 2.0 will come out and I'll have to 
> learn it all over again. ^_~
> 
> James
> Burbank, California   USA

Duncan


-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to