r32535 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r32534‎ | r32535 | r32536 >
Date:06:41, 28 March 2008
Author:dale
Status:old
Tags:
Comment:
updaed insert script (uses stream_name insted of id)
Modified paths:
  • /trunk/extensions/MetavidWiki/maintenance/ogg_thumb_insert.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MetavidWiki/maintenance/ogg_thumb_insert.php
@@ -19,24 +19,28 @@
2020 require_once('maintenance_util.inc.php');
2121
2222 if (count($args) == 0 || isset ($options['help'])) {
23 - print<<<EOT
 23+ print'
2424 USAGE
 25+ php ogg_thumb_insert.php stream_name filename interval duration
2526
26 - php ogg_thumb_insert.php stream_id filename interval duration
27 -
2827 EXAMPLE
29 - ogg_thumb_insert.php 17 /var/www/localhost/htdocs/media/stream.ogg 20
 28+ ogg_thumb_insert.php stream_name /var/www/localhost/htdocs/media/stream.ogg 20
3029
3130 Notes:
3231 if possible you want to use the source footage rather than the ogg to generate the thumbnails (ie the mpeg2 or dv)
33 -EOT;
34 - exit ();
 32+
 33+';
 34+exit();
3535 }
36 -$streamid=$args[0];
 36+$stream_name=$args[0];
3737 $filename=$args[1];
3838 $interval=$args[2];
3939 $duration=$args[3];
40 -$filedir='../stream_images/'.substr($stream_id, -1).'/'.$streamid;
 40+
 41+$MV_Stream = MV_Stream::newStreamByName($stream_name);
 42+$stream_id =$MV_Stream->getStreamId();
 43+
 44+$filedir='../stream_images/'.substr($stream_id, -1).'/'.$stream_id;
4145 $dbw =$dbr = wfGetDB(DB_MASTER);
4246 for($i=0;$i<$duration;$i+=$interval){
4347 $dbw->query("INSERT INTO `mv_stream_images` (`stream_id`, `time`) VALUES ($stream_id, $i)");

Status & tagging log