Update of /cvsroot/freevo/freevo/src/video In directory sc8-pr-cvs1:/tmp/cvs-serv26710
Modified Files: mplayer.py Log Message: Fixed the regular expression. It wasn't making bookmarks when less than 1000 seconds has elapsed. I don't know who made this one, but just in case, here is the old one: self.RE_TIME = re.compile("^A:?([0-9]+)").match The '?' means, match ':' zero or one times, which doesn't make sense in this context. The new one: self.RE_TIME = re.compile("^A: *([0-9]+)").match In this case '*' means match ' ' zero or more times. I also removed the comment about multiple bookmarks since you can have as many bookmarks as you want. The limitation with bookmarks is that mplayer isn't great at seeking in files other than avi; DVD, and mpg files will have varying results. Index: mplayer.py =================================================================== RCS file: /cvsroot/freevo/freevo/src/video/mplayer.py,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** mplayer.py 10 Jun 2003 18:02:57 -0000 1.42 --- mplayer.py 23 Jun 2003 00:16:04 -0000 1.43 *************** *** 21,24 **** --- 21,44 ---- # ----------------------------------------------------------------------- # $Log$ + # Revision 1.43 2003/06/23 00:16:04 outlyer + # Fixed the regular expression. It wasn't making bookmarks when less than + # 1000 seconds has elapsed. I don't know who made this one, but just in case, + # + # here is the old one: + # + # self.RE_TIME = re.compile("^A:?([0-9]+)").match + # + # The '?' means, match ':' zero or one times, which doesn't make sense in this context. + # + # The new one: + # + # self.RE_TIME = re.compile("^A: *([0-9]+)").match + # + # In this case '*' means match ' ' zero or more times. + # + # I also removed the comment about multiple bookmarks since you can have as many bookmarks + # as you want. The limitation with bookmarks is that mplayer isn't great at seeking in files + # other than avi; DVD, and mpg files will have varying results. + # # Revision 1.42 2003/06/10 18:02:57 dischi # Bad alang hack for mplayer and badly mastered DVDs. Restart mplayer if we *************** *** 403,409 **** bookmarkfile = util.get_bookmarkfile(self.filename) ! handle = open(bookmarkfile,'a+') # Should be appending so we could ! # have multiple bookmarks later, with ! # a menu or something. handle.write(str(self.item.elapsed)) handle.write('\n') --- 423,427 ---- bookmarkfile = util.get_bookmarkfile(self.filename) ! handle = open(bookmarkfile,'a+') handle.write(str(self.item.elapsed)) handle.write('\n') *************** *** 575,579 **** print 'MPlayer logging to "%s" and "%s"' % (fname_out, fname_err) ! self.RE_TIME = re.compile("^A:?([0-9]+)").match self.item = item self.parser = MPlayerParser(item) --- 593,597 ---- print 'MPlayer logging to "%s" and "%s"' % (fname_out, fname_err) ! self.RE_TIME = re.compile("^A: *([0-9]+)").match self.item = item self.parser = MPlayerParser(item) ------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php _______________________________________________ Freevo-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-cvslog