Skip to content
Snippets Groups Projects
Commit c610e60f authored by llaffont's avatar llaffont
Browse files

Playlist Xspf: intégration des médias externes

parent aba1e4de
No related merge requests found
......@@ -74,7 +74,9 @@ class Class_AlbumRessource extends Storm_Model_Abstract {
'description' => '',
'ordre' => 0,
'link_to' => '',
'matiere' => ''
'matiere' => '',
'vignette' => '',
'url' => ''
);
/**
......@@ -509,6 +511,9 @@ class Class_AlbumRessource extends Storm_Model_Abstract {
* @return string
*/
public function getOriginalUrl() {
if ($this->hasUrl())
return $this->getUrl();
return $this->getLocatedFile($this->getOriginalsUrl());
}
......
......@@ -517,7 +517,13 @@ class BibNumeriqueControllerAlbumMultiMediasTest extends AbstractControllerTestC
Class_AlbumRessource::newInstanceWithId(4)
->setFichier('dark_night.mp4')
->setTitre('Batman Dark Knight')
->setVignette('batman.jpg')]);
->setVignette('batman.jpg'),
Class_AlbumRessource::newInstanceWithId(4)
->setUrl('http://progressive.totaleclips.com.edgesuite.net/107/e107950_227.mp4')
->setTitre('Hunger Games')
->setVignette('hunger.jpg')]);
$this->dispatch('/opac/bib-numerique/album-xspf-playlist/id/999.xml', true);
}
......@@ -565,6 +571,15 @@ class BibNumeriqueControllerAlbumMultiMediasTest extends AbstractControllerTestC
'//xspf:playlist/xspf:trackList/xspf:track/xspf:title',
'Batman Dark Knight');
}
/** @test */
public function thirsTrackLocationShouldBeTotaleClipsDotCom() {
$this->_xpath->assertXPathContentContains($this->_response->getBody(),
'//xspf:playlist/xspf:trackList/xspf:track/xspf:location',
'http://progressive.totaleclips.com.edgesuite.net/107/e107950_227.mp4');
}
}
?>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment