Skip to content
Snippets Groups Projects
Commit 0c78b9f0 authored by Laurent's avatar Laurent
Browse files

hotline #51096 remove Jamendo full harvest

parent 960f1ff4
Branches
Tags
4 merge requests!2080Sandbox detach zf from storm,!1943Hotline master,!1942Stable,!1935hotline #51096 remove Jamendo full harvest
- ticket #51096 : désactivation du moissonnage total de Jamendo (trop de notices). L'import manuel d'album reste activé.
\ No newline at end of file
......@@ -26,5 +26,10 @@ class Class_Batch_Jamendo extends Class_Batch_RessourceNumerique{
protected function _getService() {
return new Class_WebService_BibNumerique_Jamendo();
}
public function isEnabled() {
return false;
}
}
?>
......@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
......@@ -29,7 +29,10 @@ abstract class Class_Batch_RessourceNumerique extends Class_Batch_Abstract {
}
public function run() {
return $this->_getService()->harvest();
if ($this->isEnabled())
$this->_getService()->harvest();
return $this;
}
public function isEnabled() {
......
......@@ -62,6 +62,24 @@ abstract class JamendoTestCase extends ModelTestCase {
class JamendoBatchTest extends JamendoTestCase {
/**
* @see http://forge.afi-sa.fr/issues/51096
* @test
*/
public function jamendoBatchShouldBeDisabled() {
$this->assertFalse((new Class_Batch_Jamendo())->isEnabled());
}
/** @test */
public function runBatchShouldNotHarvestJamendo() {
(new Class_Batch_Jamendo())->run();
$this->assertCount(0, Class_Album::findAll());
}
}
class JamendoImportTracksFromUrlTest extends JamendoTestCase {
public function setUp() {
......
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