From d956df315859db9c33485d1e74b731894468dd2f Mon Sep 17 00:00:00 2001
From: Laurent Laffont <llaffont@afi-sa.fr>
Date: Wed, 28 Jun 2017 14:34:08 +0200
Subject: [PATCH] hotline#61844 fix test (call specific xml parser for nanook)

---
 .../Class/WebService/BibNumerique/ArteVOD/Film.php  | 13 +++++++++++++
 .../WebService/SIGB/Nanook/PatronInfoReader.php     |  2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/library/Class/WebService/BibNumerique/ArteVOD/Film.php b/library/Class/WebService/BibNumerique/ArteVOD/Film.php
index 5094d91f734..260dc123a83 100644
--- a/library/Class/WebService/BibNumerique/ArteVOD/Film.php
+++ b/library/Class/WebService/BibNumerique/ArteVOD/Film.php
@@ -50,6 +50,19 @@ class Class_WebService_BibNumerique_ArteVOD_Film  extends Class_WebService_BibNu
          ->addDuration($json['duration']);
   }
 
+  public function findAlbumInDB() {
+    if ($album = parent::findAlbumInDB())
+      return $album;
+    $albums =  Class_Album::findAllBy(['url_origine' => $this->getBaseUrl(),
+                                       'titre' => $this->getTitle()]);
+    if (empty($albums))
+      return [];
+
+    if (count($albums)==1)
+      return current($albums);
+
+  }
+
 
   protected function setDirectors($directors) {
     $this->_directors = $directors;
diff --git a/library/Class/WebService/SIGB/Nanook/PatronInfoReader.php b/library/Class/WebService/SIGB/Nanook/PatronInfoReader.php
index e87c9e17869..d0472f49dff 100644
--- a/library/Class/WebService/SIGB/Nanook/PatronInfoReader.php
+++ b/library/Class/WebService/SIGB/Nanook/PatronInfoReader.php
@@ -39,7 +39,7 @@ class Class_WebService_SIGB_Nanook_PatronInfoReader extends Class_WebService_SIG
 
 
   protected function _newXMLParser() {
-    return Class_WebService_XMLParser::newInstance();
+    return Class_WebService_SIGB_Nanook_XMLParser::newInstance();
   }
 
 
-- 
GitLab