[Freevo-cvslog] freevo/src/www/htdocs search.rpy,1.16,1.17

2004-03-08 Thread rshortt
Update of /cvsroot/freevo/freevo/src/www/htdocs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29497/src/www/htdocs

Modified Files:
search.rpy 
Log Message:
Add advanced search and link to search page.  Next will probably add genre
options.


Index: search.rpy
===
RCS file: /cvsroot/freevo/freevo/src/www/htdocs/search.rpy,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** search.rpy  23 Feb 2004 08:33:21 -  1.16
--- search.rpy  9 Mar 2004 00:14:35 -   1.17
***
*** 12,15 
--- 12,19 
  # ---
  # $Log$
+ # Revision 1.17  2004/03/09 00:14:35  rshortt
+ # Add advanced search and link to search page.  Next will probably add genre
+ # options.
+ #
  # Revision 1.16  2004/02/23 08:33:21  gsbarbieri
  # i18n: help translators job.
***
*** 127,131 
  fv.printHeader(_('Search Results'), 'styles/main.css')
  fv.res += ''+_('ERROR')+': '+_('recording server is 
unavailable')+''
! fv.printSearchForm()
  fv.printLinks()
  fv.printFooter()
--- 131,135 
  fv.printHeader(_('Search Results'), 'styles/main.css')
  fv.res += ''+_('ERROR')+': '+_('recording server is 
unavailable')+''
! fv.printAdvancedSearchForm()
  fv.printLinks()
  fv.printFooter()
***
*** 134,139 
  
  find = fv.formValue(form, 'find')
  
! (got_matches, progs) = ri.findMatches(find)
  
  if got_matches: 
--- 138,149 
  
  find = fv.formValue(form, 'find')
+ if fv.formValue(form, 'movies_only'):
+ movies_only = 1
+ else:
+ movies_only = 0
  
! print 'DEBUG: movies_only=%s' % movies_only
! 
! (got_matches, progs) = ri.findMatches(find, movies_only)
  
  if got_matches: 
***
*** 143,150 
  rec_progs = recordings.getProgramList()
  
! fv.printHeader(_('Search Results'), 'styles/main.css')
  
! if not got_matches: 
! fv.res += ''+_('No matches')+''
  
  else:
--- 153,164 
  rec_progs = recordings.getProgramList()
  
! fv.printHeader(_('Search'), 'styles/main.css')
  
! fv.res += ''
! fv.printAdvancedSearchForm()
! 
! if not got_matches:
! if find or movies_only: 
! fv.res += ''+_('No matches')+''
  
  else:
***
*** 208,212 
  
  fv.res += ''
! fv.printSearchForm()
  
  fv.printLinks()
--- 222,226 
  
  fv.res += ''
! # fv.printSearchForm()
  
  fv.printLinks()



---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog


[Freevo-cvslog] freevo/src/www web_types.py,1.23,1.24

2004-03-08 Thread rshortt
Update of /cvsroot/freevo/freevo/src/www
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29497/src/www

Modified Files:
web_types.py 
Log Message:
Add advanced search and link to search page.  Next will probably add genre
options.


Index: web_types.py
===
RCS file: /cvsroot/freevo/freevo/src/www/web_types.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** web_types.py23 Feb 2004 08:31:55 -  1.23
--- web_types.py9 Mar 2004 00:14:35 -   1.24
***
*** 10,13 
--- 10,17 
  # ---
  # $Log$
+ # Revision 1.24  2004/03/09 00:14:35  rshortt
+ # Add advanced search and link to search page.  Next will probably add genre
+ # options.
+ #
  # Revision 1.23  2004/02/23 08:31:55  gsbarbieri
  # Helper functions.
***
*** 178,181 
--- 182,186 
   (_('Media Library'),_('View Media Library'),'%slibrary.rpy' % 
str(strprefix)),
   (_('Manual Recording'),_('Schedule a Manual 
Recording'),'%smanualrecord.rpy' % str(strprefix)),
+  (_('Search'),_('Advanced Search Page'),'%ssearch.rpy' % 
str(strprefix)),
   (_('Help'),_('View Online Help and Documentation'),'%shelp/' % 
str(strprefix))]
  
***
*** 275,279 
  self.res += """
  
! """+_('Search')+""":
  
  """
--- 280,294 
  self.res += """
  
! """+_('Search')+""":
! 
! """
! 
! def printAdvancedSearchForm(self):
! self.res += """
! 
! """+_('Search')+""":
! """+_('Movies only')+"""
! 
! 
  
  """



---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog


[Freevo-devel] snesitem.py - find images automagicly

2004-03-08 Thread Stefan
Hi list,

I had some problems displaying zsnes snapshoots (aka. screenshots),
because Im to lazy to rename the png's.

I linked the image location for snes to ~/.zsnes, took some screenshoots
and saw no image in the game list...

... looked into snesitem.py, and changed something (my first python
impressions without any feeling of this scripting language).

before:

>>>
# find image for this file
shot = imgpath + '/' + \
   os.path.splitext(os.path.basename(file))[0] + ".png"
if os.path.isfile(shot):
self.image = shot
elif os.path.isfile(os.path.splitext(file)[0] + ".png"):
self.image = os.path.splitext(file)[0] + ".png"
<<<

after:

>>>
# find image for this file
self.image = self.setimage(file, imgpath)
<<<
.. and the method
>>>
def setimage(self, file, imgpath):
"""
Set the self.image for the game
"""
game = os.path.splitext(os.path.basename(file))[0]
shot = imgpath + '/' + game + ".png"
if os.path.isfile(shot):
self.image = shot
elif os.path.isfile(game + ".png"):
self.image = os.path.splitext(file)[0] + ".png"
else:
# we try to get an zsnes snapshooot
index = string.find( game, ' ' )
count = 0
max = len(game)
new = '_'
old = ' '

while ( index >= 0 ) and ( ( count < max ) or ( max < 0 ) )
:
head = game[:index]
tail = game[index+len(old):]
game = head + new + tail
count = count + 1
index = string.find( game, old )

# we have the base image name - get the screenshoot
self.image = imgpath + '/' + game + '_.png'

return self.image
<<<

Converted  with '_' and appended '_'. 

Now I see my images. Is it possible to include this in the CVS version ?
The todo here is to see the latest snapshoot for the file.

Thanks Stefan.




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel


Re: [Freevo-devel] MPlayer plug-in: CD playing and cddb information out of synch

2004-03-08 Thread Aubin Paul
The simplest solution would be to watch the output from mplayer
(which we do now to get time information) and then, if we see the
'next track' indicator that mplayer outputs when it goes to the next
track, we have Freevo move the OSd to the next track. Also important
would be to subtract the time from the previous tracks from the
current one so we'd need to maintain the total playtime - current
track.

I can't do it right now, but maybe in a few weeks...

Aubin

On Mon, Mar 08, 2004 at 01:25:29PM -0700, Bearcat M. Sandor wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> I'm using version 1.0pre3 of the main MPlayer app and 1.1 of the MPlayer gui.  
> Note you only see this behavior if you let a CD play through to the next 
> track. This a problem with running Mplayer stand-alone too.  I only bring it 
> up to the list because it seems that the MPlayer gui does not display the 
> track titles at all, while the Freevo interface does.
> 
> Again, I believe this is because MPlayer plays the CD as a continuous stream 
> and so Freevo does not refresh the track/time/title display.  However, if we 
> shut down MPlayer between tracks,  as we do between movie and music files, 
> there will be gaps in the music playing. This will be noticable on live cds 
> and 'concept albums' where the tracks audibly run together.
> 
> The first question is: Is this an MPlayer problem or a Freevo problem? While 
> the cause is Mplayer (assuming that cdda and not cddb is the right option), 
> if this is something that can be worked around it should be.  As the Mplayer 
> folks like to cry "It's a movie player, not a music player, RTFM", a lot of 
> people use Mplayer for playing music due to it's quality over Xine. As 
> MPlayer is our base app (and rightfully so IMHO), I think developers should 
> try to fix this.
> 
> How? I don't know. I'm just an end-user at this point as I do not know Python 
> (yet). If i get to be a python developer b4 this is looked into, I'll take a 
> crack at it myself.
> 
> Regards,
> 
> Bearcat M. Sandor
> 
> 
> "Dischi" wrote:
> > I notice that freevo presents mplayer with 'cdda://' instead of
> > 'cddb://'. ?Why?
> 
> Because cdda should handle it. It works for me, what version of
> mplayer are you using?
> 
> 
> Dischi
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.2.4 (GNU/Linux)
> 
> iD8DBQFATNbAya+RPo9ly58RAm/CAKCbRsGZ4930LqB6W5MwtsbKG8Y0yACdHZ/M
> M22RwhKZr9kEZC6iN6Y9oEY=
> =fjUv
> -END PGP SIGNATURE-
> 
> 
> ---
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
> ___
> Freevo-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/freevo-devel


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
___
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel


[Freevo-devel] MPlayer plug-in: CD playing and cddb information out of synch

2004-03-08 Thread Bearcat M. Sandor
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I'm using version 1.0pre3 of the main MPlayer app and 1.1 of the MPlayer gui.  
Note you only see this behavior if you let a CD play through to the next 
track. This a problem with running Mplayer stand-alone too.  I only bring it 
up to the list because it seems that the MPlayer gui does not display the 
track titles at all, while the Freevo interface does.

Again, I believe this is because MPlayer plays the CD as a continuous stream 
and so Freevo does not refresh the track/time/title display.  However, if we 
shut down MPlayer between tracks,  as we do between movie and music files, 
there will be gaps in the music playing. This will be noticable on live cds 
and 'concept albums' where the tracks audibly run together.

The first question is: Is this an MPlayer problem or a Freevo problem? While 
the cause is Mplayer (assuming that cdda and not cddb is the right option), 
if this is something that can be worked around it should be.  As the Mplayer 
folks like to cry "It's a movie player, not a music player, RTFM", a lot of 
people use Mplayer for playing music due to it's quality over Xine. As 
MPlayer is our base app (and rightfully so IMHO), I think developers should 
try to fix this.

How? I don't know. I'm just an end-user at this point as I do not know Python 
(yet). If i get to be a python developer b4 this is looked into, I'll take a 
crack at it myself.

Regards,

Bearcat M. Sandor


"Dischi" wrote:
> I notice that freevo presents mplayer with 'cdda://' instead of
> 'cddb://'.  Why?

Because cdda should handle it. It works for me, what version of
mplayer are you using?


Dischi
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFATNbAya+RPo9ly58RAm/CAKCbRsGZ4930LqB6W5MwtsbKG8Y0yACdHZ/M
M22RwhKZr9kEZC6iN6Y9oEY=
=fjUv
-END PGP SIGNATURE-


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
___
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel


Re: [Freevo-cvslog] freevo/src/util marmalade.py,NONE,1.

2004-03-08 Thread Aubin Paul
Uhm... I'm not 100% sure, but based on a quick look over the most
recent version of Twisted (1.2.0) unicode is supported; shouldn't we
try to use the system one first, and/or just require 1.2.0?

On Mon, Mar 08, 2004 at 11:14:39AM -0800, [EMAIL PROTECTED] wrote:
> Update of /cvsroot/freevo/freevo/src/util
> In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26017
> 
> Added Files:
>   marmalade.py 
> Log Message:
> add our own version of marmalade from twisted
> 
> --- NEW FILE: marmalade.py ---
> # -*- test-case-name: twisted.test.test_persisted -*-
> 
> # Twisted, the Framework of Your Internet
> # Copyright (C) 2001 Matthew W. Lefkowitz
> #
> # This library is free software; you can redistribute it and/or
> # modify it under the terms of version 2.1 of the GNU Lesser General Public
> # License as published by the Free Software Foundation.
> #
> # This library is distributed in the hope that it will be useful,
> # but WITHOUT ANY WARRANTY; without even the implied warranty of
> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> # Lesser General Public License for more details.
> #
> # You should have received a copy of the GNU Lesser General Public
> # License along with this library; if not, write to the Free Software
> # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
> 
> # Note: this file is from twisted but with small modification in the
> # Unicode handling for freevo. These parts are marked with 'XXX Freevo changes:'
> 
> """Marmalade: jelly, with just a hint of bitterness.
> 
> I can serialize a Python object to an XML DOM tree (twisted.web.microdom), and
> therefore to XML data, similarly to twisted.spread.jelly.  Because both Python
> lists and DOM trees are tree data-structures, many of the idioms used here are
> identical.
> 
> """
> 
> import new
> 
> from twisted.python.reflect import namedModule, namedClass, namedObject, 
> fullFuncName, qual
> from twisted.persisted.crefutil import NotKnown, _Tuple, _InstanceMethod, 
> _DictKeyAndValue, _Dereference, _Defer
> 
> try:
> from new import instancemethod
> except:
> from org.python.core import PyMethod
> instancemethod = PyMethod
> 
> import types
> import copy_reg
> 
> #for some reason, __builtins__ == __builtin__.__dict__ in the context where this is 
> used.
> #Can someone tell me why?
> import __builtin__ 
> 
> 
> def instance(klass, d):
> if isinstance(klass, types.ClassType):
> return new.instance(klass, d)
> elif isinstance(klass, type):
> o = object.__new__(klass)
> o.__dict__ = d
> return o
> else:
> raise TypeError, "%s is not a class" % klass
> 
> 
> def getValueElement(node):
> """Get the one child element of a given element.
> 
> If there is more than one child element, raises ValueError.  Otherwise,
> returns the value element.
> """
> valueNode = None
> for subnode in node.childNodes:
> if isinstance(subnode, Element):
> if valueNode is None:
> valueNode = subnode
> else:
> raise ValueError("Only one value node allowed per instance!")
> return valueNode
> 
> 
> class DOMJellyable:
> 
> jellyDOMVersion = 1
> 
> def jellyToDOM(self, jellier, element):
> element.setAttribute("marmalade:version", str(self.jellyDOMVersion))
> method = getattr(self, "jellyToDOM_%s" % self.jellyDOMVersion, None)
> if method:
> method(jellier, element)
> else:
> element.appendChild(jellier.jellyToNode(self.__dict__))
> 
> def unjellyFromDOM(self, unjellier, element):
> pDOMVersion = element.getAttribute("marmalade:version") or "0"
> method = getattr(self, "unjellyFromDOM_%s" % pDOMVersion, None)
> if method:
> method(unjellier, element)
> else:
> # XXX: DOMJellyable.unjellyNode does not exist
> # XXX: 'node' is undefined - did you mean 'self', 'element', or 'Node'?
> state = self.unjellyNode(getValueElement(node))
> if hasattr(self.__class__, "__setstate__"):
> self.__setstate__(state)
> else:
> self.__dict__ = state
> 
> 
> 
> class DOMUnjellier:
> def __init__(self):
> self.references = {}
> self._savedLater = []
> 
> def unjellyLater(self, node):
> """Unjelly a node, later.
> """
> d = _Defer()
> self.unjellyInto(d, 0, node)
> self._savedLater.append(d)
> return d
> 
> def unjellyInto(self, obj, loc, node):
> """Utility method for unjellying one object into another.
> 
> This automates the handling of backreferences.
> """
> o = self.unjellyNode(node)
> obj[loc] = o
> if isinstance(o, NotKnown):
> o.addDependant(obj, loc)
> return o
> 
> def unjellyAttribute(self, instance, attrName, valueNode):
>

[Freevo-devel] Re: Unicode stuff

2004-03-08 Thread Viggo Fredriksen
Dirk Meyer wrote:

Viggo Fredriksen wrote:

Hi.

I haven't followed closely on what has been done with the unicode stuff
in freevo, but the recent changes in area.py has rendered my freevo
useless. I've tried setting different LOCALE's in my config, but it
doesn't seem to help. All menus with items containing the 'øæå' chars
now crashes. What am I missing?
Further, since all these changes have been made in the core of Freevo I
feel I should reflect this in the mail plugin. What do I have to do to
make this work?


Does it work now?
Yes, those issues was fixed some time ago.

Thanks :)
Dischi



---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel


[Freevo-devel] Re: unicode & other bugs/problems (please read)

2004-03-08 Thread Dirk Meyer
Florian Demmer wrote:
> ... again got fresh cvs:
> a new trace i encountered:
> Traceback (most recent call last):
>   File "/usr/lib/python2.3/site-packages/freevo/tv/record_client.py",
> line 139, in scheduleRecording
> (status, message) = server.scheduleRecording(jellyToXML(prog))
>   File "/usr/lib/python2.3/xmlrpclib.py", line 1029, in __call__
> return self.__send(self.__name, args)
>   File "/usr/lib/python2.3/xmlrpclib.py", line 1316, in __request
> verbose=self.__verbose
>   File "/usr/lib/python2.3/xmlrpclib.py", line 1070, in request
> headers
> ProtocolError:  Server Error>
>
> then i tried to remove all non ascii caracters from my TV.xml (found
> ä,ö,ü,È and á) and now the guide seems to work from both the
> webinterface and gui. so i m pretty sure its a unicode problem.

I fixed it the hard way. I hope everything still works. I copied
marmalde from twisted to util. Than I added our own Unicode and string
functions. When making a stream, we use String to convert all unicode
objects to string (ugly, but works). On the other side, every string
is converted to unicode using Unicode (very ugly). You can't send str
objects anymore, they will transformed to unicode, but since we want
everything as unicode, it shouldn't matter.

Please test.

> encounterd another problem already reported in freevo-users: after
> scheduling something the popup cannot be clicked away... it works when
> i comment the following out (which was added just recently btw):
> src/tv/tvguide.py, line 277:
> #rc.set_context('tvmenu')

Bad bug, also fixed.

> too bad i still dont know enough about who freevo works to fix such
> things myself... please someone look into the unicode stuff as soon
> aso you can, because ö, ä and ü are used _a lot_ in german and its
> unuseable for me now :/

Try it and report back please.


Dischi

-- 
~/.signature: No such file or directory


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
___
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel


[Freevo-devel] Re: Unicode stuff

2004-03-08 Thread Dirk Meyer
Viggo Fredriksen wrote:
> Hi.
>
> I haven't followed closely on what has been done with the unicode stuff
> in freevo, but the recent changes in area.py has rendered my freevo
> useless. I've tried setting different LOCALE's in my config, but it
> doesn't seem to help. All menus with items containing the 'øæå' chars
> now crashes. What am I missing?
>
> Further, since all these changes have been made in the core of Freevo I
> feel I should reflect this in the mail plugin. What do I have to do to
> make this work?

Does it work now?


Dischi

-- 
Having trouble in Windows? Reboot!
Having trouble in Linux? Be root!


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
___
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel


[Freevo-cvslog] freevo/src/helpers recordserver.py,1.33,1.34

2004-03-08 Thread dischi
Update of /cvsroot/freevo/freevo/src/helpers
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26378/helpers

Modified Files:
recordserver.py 
Log Message:
use our marmalade

Index: recordserver.py
===
RCS file: /cvsroot/freevo/freevo/src/helpers/recordserver.py,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** recordserver.py 5 Mar 2004 20:49:11 -   1.33
--- recordserver.py 8 Mar 2004 19:15:49 -   1.34
***
*** 7,10 
--- 7,13 
  # ---
  # $Log$
+ # Revision 1.34  2004/03/08 19:15:49  dischi
+ # use our marmalade
+ #
  # Revision 1.33  2004/03/05 20:49:11  rshortt
  # Add support for searching by movies only.  This uses the date field in xmltv
***
*** 175,182 
  from twisted.internet.app import Application
  from twisted.internet import reactor
- from twisted.persisted import marmalade
  from twisted.python import log
  
  import config #config must always be the first freeevo module imported
  
  import rc
--- 178,185 
  from twisted.internet.app import Application
  from twisted.internet import reactor
  from twisted.python import log
  
  import config #config must always be the first freeevo module imported
+ from util.marmalade import jellyToXML, unjellyFromXML
  
  import rc
***
*** 219,223 
  log.debug('GET: reading cached file (%s)' % 
config.TV_RECORD_SCHEDULE)
  f = open(config.TV_RECORD_SCHEDULE, 'r')
! scheduledRecordings = marmalade.unjellyFromXML(f)
  f.close()
  
--- 222,226 
  log.debug('GET: reading cached file (%s)' % 
config.TV_RECORD_SCHEDULE)
  f = open(config.TV_RECORD_SCHEDULE, 'r')
! scheduledRecordings = unjellyFromXML(f)
  f.close()
  
***
*** 240,244 
  self.saveScheduledRecordings(scheduledRecordings)
  
! if DEBUG: log.debug('ScheduledRecordings has %s items.' % 
len(scheduledRecordings.programList))
  
  return scheduledRecordings
--- 243,249 
  self.saveScheduledRecordings(scheduledRecordings)
  
! if DEBUG:
! log.debug('ScheduledRecordings has %s items.' % \
!   len(scheduledRecordings.programList))
  
  return scheduledRecordings
***
*** 260,264 
len(scheduledRecordings.programList))
  f = open(config.TV_RECORD_SCHEDULE, 'w')
! marmalade.jellyToXML(scheduledRecordings, f)
  f.close()
  return TRUE
--- 265,269 
len(scheduledRecordings.programList))
  f = open(config.TV_RECORD_SCHEDULE, 'w')
! jellyToXML(scheduledRecordings, f)
  f.close()
  return TRUE
***
*** 714,718 
  
  def xmlrpc_getScheduledRecordings(self):
! return (TRUE, marmalade.jellyToXML(self.getScheduledRecordings()))
  
  
--- 719,723 
  
  def xmlrpc_getScheduledRecordings(self):
! return (TRUE, jellyToXML(self.getScheduledRecordings()))
  
  
***
*** 730,734 
  return (FALSE, 'RecordServer::scheduleRecording:  no prog')
  
! prog = marmalade.unjellyFromXML(prog)
  
  (status, response) = self.scheduleRecording(prog)
--- 735,739 
  return (FALSE, 'RecordServer::scheduleRecording:  no prog')
  
! prog = unjellyFromXML(prog)
  
  (status, response) = self.scheduleRecording(prog)
***
*** 741,745 
  return (FALSE, 'RecordServer::removeScheduledRecording:  no prog')
  
! prog = marmalade.unjellyFromXML(prog)
  
  (status, response) = self.removeScheduledRecording(prog)
--- 746,750 
  return (FALSE, 'RecordServer::removeScheduledRecording:  no prog')
  
! prog = unjellyFromXML(prog)
  
  (status, response) = self.removeScheduledRecording(prog)
***
*** 752,759 
  return (FALSE, 'removeScheduledRecording::failure:  no prog')
  
! prog = marmalade.unjellyFromXML(prog)
  
  if schedule:
! schedule = marmalade.unjellyFromXML(schedule)
  
  (status, response) = self.isProgScheduled(prog, schedule)
--- 757,764 
  return (FALSE, 'removeScheduledRecording::failure:  no prog')
  
! prog = unjellyFromXML(prog)
  
  if schedule:
! schedule = unjellyFromXML(schedule)
  
  (status, response) = self.isProgScheduled(prog, schedule)
***
*** 766,770 
  
  if status:
! return (status, marmalade.jellyToXML(response))
  else:
  return (status, 'RecordServer::findProg: %s' % response)
--- 771,775 
  
  if status:
! return

[Freevo-cvslog] freevo/src/tv record_client.py,1.15,1.16

2004-03-08 Thread dischi
Update of /cvsroot/freevo/freevo/src/tv
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26378/tv

Modified Files:
record_client.py 
Log Message:
use our marmalade

Index: record_client.py
===
RCS file: /cvsroot/freevo/freevo/src/tv/record_client.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** record_client.py5 Mar 2004 20:49:11 -   1.15
--- record_client.py8 Mar 2004 19:15:49 -   1.16
***
*** 12,15 
--- 12,18 
  # ---
  # $Log$
+ # Revision 1.16  2004/03/08 19:15:49  dischi
+ # use our marmalade
+ #
  # Revision 1.15  2004/03/05 20:49:11  rshortt
  # Add support for searching by movies only.  This uses the date field in xmltv
***
*** 68,74 
  import time, sys, socket, traceback, string
  import xmlrpclib
- from twisted.persisted import marmalade
  import epg_types
  
  TRUE  = 1
  FALSE = 0
--- 71,78 
  import time, sys, socket, traceback, string
  import xmlrpclib
  import epg_types
  
+ from util.marmalade import jellyToXML, unjellyFromXML
+ 
  TRUE  = 1
  FALSE = 0
***
*** 79,97 
  server = xmlrpclib.Server(server_string)
  
- def jellyToXML(object):
- if isinstance(object, epg_types.TvProgram):
- return marmalade.jellyToXML(object.decode())
- elif isinstance(object, unicode):
- return marmalade.jellyToXML(String(object))
- return marmalade.jellyToXML(object)
- 
- 
- def unjellyFromXML(object):
- object = marmalade.unjellyFromXML(object)
- if isinstance(object, epg_types.TvProgram):
- return object.encode()
- return object
- 
- 
  def returnFromJelly(status, response):
  if status:
--- 83,86 



---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog


[Freevo-cvslog] freevo/src/tv tvguide.py,1.27,1.28

2004-03-08 Thread dischi
Update of /cvsroot/freevo/freevo/src/tv
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26256

Modified Files:
tvguide.py 
Log Message:
fix popup input focus

Index: tvguide.py
===
RCS file: /cvsroot/freevo/freevo/src/tv/tvguide.py,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** tvguide.py  25 Feb 2004 17:44:30 -  1.27
--- tvguide.py  8 Mar 2004 19:15:14 -   1.28
***
*** 10,13 
--- 10,16 
  # ---
  # $Log$
+ # Revision 1.28  2004/03/08 19:15:14  dischi
+ # fix popup input focus
+ #
  # Revision 1.27  2004/02/25 17:44:30  dischi
  # add special event mapping for tvmenu
***
*** 275,281 
  
  def refresh(self):
- rc.set_context('tvmenu')
  self.update_schedules(force=True)
! self.menuw.refresh()
  
  
--- 278,285 
  
  def refresh(self):
  self.update_schedules(force=True)
! if not self.menuw.children:
! rc.set_context('tvmenu')
! self.menuw.refresh()
  
  



---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog


[Freevo-cvslog] freevo/src/util marmalade.py,NONE,1.1

2004-03-08 Thread dischi
Update of /cvsroot/freevo/freevo/src/util
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26017

Added Files:
marmalade.py 
Log Message:
add our own version of marmalade from twisted

--- NEW FILE: marmalade.py ---
# -*- test-case-name: twisted.test.test_persisted -*-

# Twisted, the Framework of Your Internet
# Copyright (C) 2001 Matthew W. Lefkowitz
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

# Note: this file is from twisted but with small modification in the
# Unicode handling for freevo. These parts are marked with 'XXX Freevo changes:'

"""Marmalade: jelly, with just a hint of bitterness.

I can serialize a Python object to an XML DOM tree (twisted.web.microdom), and
therefore to XML data, similarly to twisted.spread.jelly.  Because both Python
lists and DOM trees are tree data-structures, many of the idioms used here are
identical.

"""

import new

from twisted.python.reflect import namedModule, namedClass, namedObject, fullFuncName, 
qual
from twisted.persisted.crefutil import NotKnown, _Tuple, _InstanceMethod, 
_DictKeyAndValue, _Dereference, _Defer

try:
from new import instancemethod
except:
from org.python.core import PyMethod
instancemethod = PyMethod

import types
import copy_reg

#for some reason, __builtins__ == __builtin__.__dict__ in the context where this is 
used.
#Can someone tell me why?
import __builtin__ 


def instance(klass, d):
if isinstance(klass, types.ClassType):
return new.instance(klass, d)
elif isinstance(klass, type):
o = object.__new__(klass)
o.__dict__ = d
return o
else:
raise TypeError, "%s is not a class" % klass


def getValueElement(node):
"""Get the one child element of a given element.

If there is more than one child element, raises ValueError.  Otherwise,
returns the value element.
"""
valueNode = None
for subnode in node.childNodes:
if isinstance(subnode, Element):
if valueNode is None:
valueNode = subnode
else:
raise ValueError("Only one value node allowed per instance!")
return valueNode


class DOMJellyable:

jellyDOMVersion = 1

def jellyToDOM(self, jellier, element):
element.setAttribute("marmalade:version", str(self.jellyDOMVersion))
method = getattr(self, "jellyToDOM_%s" % self.jellyDOMVersion, None)
if method:
method(jellier, element)
else:
element.appendChild(jellier.jellyToNode(self.__dict__))

def unjellyFromDOM(self, unjellier, element):
pDOMVersion = element.getAttribute("marmalade:version") or "0"
method = getattr(self, "unjellyFromDOM_%s" % pDOMVersion, None)
if method:
method(unjellier, element)
else:
# XXX: DOMJellyable.unjellyNode does not exist
# XXX: 'node' is undefined - did you mean 'self', 'element', or 'Node'?
state = self.unjellyNode(getValueElement(node))
if hasattr(self.__class__, "__setstate__"):
self.__setstate__(state)
else:
self.__dict__ = state



class DOMUnjellier:
def __init__(self):
self.references = {}
self._savedLater = []

def unjellyLater(self, node):
"""Unjelly a node, later.
"""
d = _Defer()
self.unjellyInto(d, 0, node)
self._savedLater.append(d)
return d

def unjellyInto(self, obj, loc, node):
"""Utility method for unjellying one object into another.

This automates the handling of backreferences.
"""
o = self.unjellyNode(node)
obj[loc] = o
if isinstance(o, NotKnown):
o.addDependant(obj, loc)
return o

def unjellyAttribute(self, instance, attrName, valueNode):
"""Utility method for unjellying into instances of attributes.

Use this rather than unjellyNode unless you like surprising bugs!
Alternatively, you can use unjellyInto on your instance's __dict__.
"""
self.unjellyInto(instance.__dict__, attrName, valueNode)

def unjellyNode(self, node):
if node.tagName.lower() == "none":
retval = None
elif node.tagName == "string":
# XXX FIXME this is obviously insecure
# if you doubt:
# >>> unjellyFro

Re: [Freevo-devel] Re: unicode & other bugs/problems

2004-03-08 Thread Rob Shortt
Florian Demmer wrote:
"/usr/lib/python2.3/site-packages/freevo/www/web_types.py", line 255, in 
tableCell
   self.res += "   "+data+"\n"
   exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 
0xdf in position 114: ordinal not in range(128)
I just fixed this on my side.  I'll commit something this evening, I'm 
just looking for a better solution than what I've done:

Index: src/www/web_types.py
===
RCS file: /cvsroot/freevo/freevo/src/www/web_types.py,v
retrieving revision 1.23
diff -r1.23 web_types.py
254a255,256
> if not isinstance(data, unicode):
> data = Unicode(data, config.LOCALE)
-Rob



---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel


[Freevo-wikilog] [Freevo Wiki] Update of "DocumentationPage/InstallDeps"

2004-03-08 Thread freevo-wikilog
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Freevo Wiki" for change 
notification.

The following page has been changed by 63.228.198.164:
http://freevo.sourceforge.net/cgi-bin/moin.cgi/DocumentationPage_2fInstallDeps

--
@@ -162,6 +162,7 @@
 wget http://www.libsdl.org/release/SDL-1.2.5.tar.gz
 tar xvzf SDL-1.2.5.tar.gz
 cd SDL-1.2.5
+## note: patch is no longer available.  I used SDL 1.2.7 and hoped for the best
 wget http://freevo.sf.net/SDL-1.2.5-nokeyboardpatch
 patch -p1 < SDL-1.2.5-nokeyboardpatch
 ./configure


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
Freevo-wikilog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-wikilog


[Freevo-devel] Re: [PATCH] Allowing real text-input with keyboard

2004-03-08 Thread Viggo Fredriksen
Dirk Meyer wrote:
Viggo Fredriksen wrote:

Hi.

Attached is a patch allowing real keyboard text-input.
It allows plugins to set event-context='text' and recieve unicode
text from keyboard if config.TEXT_USE_KEYBOARD=1 is set.
Attached is also a new version of the text-input I have for the mail
plugin which can use both multitap and the new keyboard text-input.


I changed some inside stuff and it would be nice if you could rebuild
your patch. Can you merge the textinput into LetterBoxGroup.py? It
would be cool to have one widget doing all the stuff.
I'll take a look at it. What's using this input method now? I think I've
seen it used in 'Search Guide' earlier, but this has for some reason
disappeared from my tv menu after my last cvs update.
As for the
input, osd now knows if we are in INPUT mode, so you won't need the
TEXTINPUT mode. If we are in input mode, should return the key. Maybe
you need some modifications, but it should arrive at the eventhandler
in LetterBoxGroup as event BUTTON with the key as arg. 
I took a quick look at the changes and it looks good. I have one
objection however; when returning chr(event.key) it won't
take modifiers like shift and alt in consideration. Returning
event.unicode instead should fix this.
osd.py:OSD._cb():

| if not map and event.key > 30:
|try:
|   if event.unicode != u'':
|   return event.unicode
|except:
|   pass
and

| else:
|# don't know what this is, return it as it is
|try:
|if event.unicode != u'':
|return event.unicode
|except:
|return None
Something like this seems to work ok on my setup.

Sorry if this is not making sence. I have the worst headache ever and
can't consentrate on the simplest of tasks! (Probably not a good idea
to send patches in this state :)


And does this makes sence to you?
Sure (or better: I'd like to hope so).

Dischi



Viggo

---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel