[Cvs-annodex] commit (annodex): cmmlwiki/trunk/cmmlwiki/itemsummary.py

conrad nobody at lists.annodex.net
Tue Jun 13 08:25:51 UTC 2006


Update of /var/local/lib/svn/annodex (new revision 2331)

Modified files:
   cmmlwiki/trunk/cmmlwiki/itemsummary.py

Log Message:
use has_video() in itemsummary: don't attempt to show frames for audio-only
files (this fails silently for mplayer anyway, but spins for the gst version)


Modified: cmmlwiki/trunk/cmmlwiki/itemsummary.py
===================================================================
--- cmmlwiki/trunk/cmmlwiki/itemsummary.py	2006-06-13 08:21:33 UTC (rev 2330)
+++ cmmlwiki/trunk/cmmlwiki/itemsummary.py	2006-06-13 08:25:50 UTC (rev 2331)
@@ -32,18 +32,26 @@
     play_url = WikiURL (iname, type='media').template(vars)
     framepath = WikiURL (iname, type='image').template(vars)
 
+    i = InfoCache (self.inspector, self.ixi)
+
     s += """<div class="item">
 <h3>%s</h3>
 <table cellspacing="10">
 <tr>
 <td>
+""" % (iname)
+
+    if (i.has_video()):
+      s += """
 <a href="%s"><img src="%s?t=00:00:10"/><img src="%s?t=00:00:20"/><img src="%s?t=00:00:30"/></a>
+""" % (play_url, framepath, framepath, framepath)
+
+    s += """
 </td>
 <td>
 <p>
-""" % (iname, play_url, framepath, framepath, framepath)
+"""
 
-    i = InfoCache (self.inspector, self.ixi)
     s += "<b>Duration:</b> %s<br/>" % (i.duration())
     s += "<b>Bitrate:</b> %s<br/>" % (i.bitrate())
     if (i.has_video()):


-- 
conrad



More information about the cvs-annodex mailing list