Index: trunk/extensions/MetavidWiki/includes/specials/MV_SpecialExport.php |
— | — | @@ -272,9 +272,7 @@ |
273 | 273 | <switch distinction="quality"> |
274 | 274 | <? foreach ( $this->file_list as $file ) { |
275 | 275 | $dAttr = ( $file->getNameKey() == $mvDefaultVideoQualityKey ) ? ' default="true"':''; |
276 | | - if ( $file->getNameKey() == $mvDefaultVideoQualityKey || |
277 | | - $file->getNameKey() == $mvDefaultFlashQualityKey || |
278 | | - $file->getNameKey() == $mvDefaultVideoHighQualityKey ) |
| 276 | + if ( $file->supportsURLTimeEncoding() ) |
279 | 277 | { |
280 | 278 | $dSrc = $this->mvTitle->getWebStreamURL( $file->getNameKey() ); |
281 | 279 | $startendattr = ''; |
Index: trunk/extensions/MetavidWiki/includes/MV_Title.php |
— | — | @@ -276,24 +276,13 @@ |
277 | 277 | */ |
278 | 278 | function getWebStreamURL( $quality = null ) { |
279 | 279 | global $mvVideoArchivePaths; |
280 | | - global $mvDefaultVideoQualityKey, $mvDefaultVideoHighQualityKey, $mvDefaultFlashQualityKey; |
281 | 280 | // @@todo mediawiki path for media (insted of hard link to $mvVideoArchive) |
282 | 281 | // @@todo make sure file exisits |
283 | 282 | if ( !$quality )$quality = $mvDefaultVideoQualityKey; |
284 | | - $time_req = ''; |
285 | | - if ( $this->getStartTime() != '' && $this->getEndTime() != '' ) { |
286 | | - if ( $quality == $mvDefaultVideoQualityKey || |
287 | | - $quality == $mvDefaultVideoHighQualityKey ) { |
288 | | - //removed .anx |
289 | | - $time_req = '?t=' . $this->getStartTime() . '/' . $this->getEndTime(); |
290 | | - } else if ( $quality == $mvDefaultFlashQualityKey ) { |
291 | | - $time_req = '?t=' . $this->getStartTime() . '/' . $this->getEndTime(); |
292 | | - } |
293 | | - } |
294 | 283 | if ( $this->doesStreamExist() ) { |
295 | 284 | // @@todo cache this / have a more organized store for StreamFiles in streamTitle |
296 | 285 | $dbr = & wfGetDB( DB_READ ); |
297 | | - $result = $dbr->select( 'mv_stream_files', array( 'path' ), array ( |
| 286 | + $result = $dbr->select( 'mv_stream_files', '*', array ( |
298 | 287 | 'stream_id' => $this->mvStream->id, |
299 | 288 | 'file_desc_msg' => $quality |
300 | 289 | ) ); |
— | — | @@ -305,6 +294,14 @@ |
306 | 295 | $mvStreamFile = new MV_StreamFile( $this->mvStream, $streamFile ); |
307 | 296 | // if link empty return false: |
308 | 297 | if ( $mvStreamFile->getFullURL() == '' )return false; |
| 298 | + $time_req = ''; |
| 299 | + if ( $this->getStartTime() != '' && $this->getEndTime() != '' ) { |
| 300 | + if ( $mvStreamFile->supportsURLTimeEncoding() ) { |
| 301 | + //removed .anx |
| 302 | + $time_req = '?t=' . $this->getStartTime() . '/' . $this->getEndTime(); |
| 303 | + } |
| 304 | + } |
| 305 | + |
309 | 306 | return $mvStreamFile->getFullURL() . $time_req; |
310 | 307 | } else { |
311 | 308 | // @@todo throw ERROR |
Index: trunk/extensions/MetavidWiki/includes/MV_StreamFile.php |
— | — | @@ -126,6 +126,9 @@ |
127 | 127 | function getPathType() { |
128 | 128 | return $this->path_type; |
129 | 129 | } |
| 130 | + function supportsURLTimeEncoding() { |
| 131 | + return $this->path_type == 'url_anx'; |
| 132 | + } |
130 | 133 | function getFullURL() { |
131 | 134 | // @@todo check on path if local |
132 | 135 | return $this->getPath(); |