[Cvs-annodex] commit (annodex): cmmlwiki/trunk/cmmlwiki/cortado.py
cmmlwiki/trunk/cmmlwiki/handler.py cmmlwiki/trunk/cmmlwiki/toc.py
conrad
nobody at lists.annodex.net
Tue Sep 12 13:51:58 UTC 2006
Update of /var/local/lib/svn/annodex (new revision 2478)
Modified files:
cmmlwiki/trunk/cmmlwiki/cortado.py
cmmlwiki/trunk/cmmlwiki/handler.py
cmmlwiki/trunk/cmmlwiki/toc.py
Log Message:
handle time offsets when displaying items; pass offset through to cortado
Modified: cmmlwiki/trunk/cmmlwiki/cortado.py
===================================================================
--- cmmlwiki/trunk/cmmlwiki/cortado.py 2006-09-12 13:44:00 UTC (rev 2477)
+++ cmmlwiki/trunk/cmmlwiki/cortado.py 2006-09-12 13:51:58 UTC (rev 2478)
@@ -14,11 +14,12 @@
from cmmlwiki.environment import Environment
from cmmlwiki.location import WikiURL
+from cmmlwiki.time import time2npt
class Cortado (object):
- def __init__(self, iname, timestamp="00:00:00"):
- self.timestamp = timestamp
+ def __init__(self, iname, offset=None):
+ self.offset = offset
env = Environment()
media_dir = env.media_upload_dir()
@@ -32,6 +33,8 @@
plugin_url = WikiURL("plugins/cortado.jar", htdocs=True, include_host=True).template(vars)
play_url = WikiURL(self.iname, type='media', include_host=True).template(vars)
+ if (self.offset):
+ play_url += "?t=%s" % time2npt(self.offset)
s = """
<div id="monitor-big">
Modified: cmmlwiki/trunk/cmmlwiki/handler.py
===================================================================
--- cmmlwiki/trunk/cmmlwiki/handler.py 2006-09-12 13:44:00 UTC (rev 2477)
+++ cmmlwiki/trunk/cmmlwiki/handler.py 2006-09-12 13:51:58 UTC (rev 2478)
@@ -326,7 +326,7 @@
except KeyError:
start = 0
- s = TOC(self.inspector, self.ixi, self.iname, start)
+ s = TOC(self.inspector, self.ixi, self.iname, self.offset, start)
return HTMLPage (s, title=self.iname)
Modified: cmmlwiki/trunk/cmmlwiki/toc.py
===================================================================
--- cmmlwiki/trunk/cmmlwiki/toc.py 2006-09-12 13:44:00 UTC (rev 2477)
+++ cmmlwiki/trunk/cmmlwiki/toc.py 2006-09-12 13:51:58 UTC (rev 2478)
@@ -22,11 +22,12 @@
class TOC:
- def __init__(self, inspector, ixi, iname, start=0):
+ def __init__(self, inspector, ixi, iname, offset, start=0):
self.inspector = inspector
self.ixi = ixi
self.iname = iname
- self.start = start
+ self.offset = offset # Time offset to play from
+ self.start = start # Clip to display list from
def sidebar(self, vars):
actions = ''
@@ -38,7 +39,7 @@
def template(self, vars):
- s = Cortado(self.iname).template(vars)
+ s = Cortado(self.iname, self.offset).template(vars)
#s += '<p/><h3>Clips</h3>\n'
s += '<h3> </h3>\n'
--
conrad
More information about the cvs-annodex
mailing list