> > AttributeError: 'NoneType' object has no attribute 'rfind'
> >
> > Any tips on whats going on?
>
> Wild guess without checking the code: the logger wants to add the
> filename to the database. Since a cd has no file, filename is None.
>
Good answer.  Here is my fix:
(in audio/plugins/logger.py wrap the  query up with a try/except)

    def log_track(self, filename):
        try:
            query = 'UPDATE music SET play_count=play_count+1,last_play=%f
WHERE \
                     path = "%s" and filename = "%s"' % (time.time(),
                     util.escape(os.path.dirname(filename)),
                     util.escape(os.path.basename(filename)) )
            self.runquery(query)
        except:
            if DEBUG:
                print 'Logger unable to log track'

I'll leave it up to the powers that be to decide if the event should be sent
at all..  If you choose not to send the event if there is no 'filename',
another fix would be this:
change this
if self.current_item and self.current_item.type == 'audio':
to this

if self.current_item and self.current_item.type == 'audio' and
self.current_item.filename:

in playlist.py, eventhandler.

Mick



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to