MOD Petites modifs peux significatives
[pompage.git] / src / modules / allocine.rb
index b4b65f0..c26c214 100644 (file)
@@ -20,7 +20,7 @@ module Net
    end\r
 end\r
 \r
-# un module d'importation pour le site "www.allocine.fr"\r
+# Un module d'importation pour le site "www.allocine.fr".\r
 class Allocine  < Basemodule\r
    \r
    def createConnexion\r
@@ -37,7 +37,7 @@ class Allocine  < Basemodule
       @connexion = nil\r
    end\r
    \r
-   # voir le parent.\r
+   # Voir le parent.\r
    def rechercherFilm(titre)\r
       createConnexion\r
       \r
@@ -82,11 +82,11 @@ class Allocine  < Basemodule
       loadPath("/film/fichefilm_gen_cfilm=#{id}.html", film)\r
    end\r
    \r
+   # Voir le parent.\r
    def loadURL(url, film)\r
       loadPath(URI.parse(url).path, film)\r
    end\r
    \r
-   # Voir le parent.\r
    def loadPath(path, film)\r
       createConnexion\r
 \r
@@ -103,9 +103,10 @@ class Allocine  < Basemodule
       \r
       puts "Pompage de #{film.titre} (#{film.fichiers[0]}) ..."\r
       \r
-      #convertit le code latin-1 en UTF8      \r
+      # convertit le code latin-1 en UTF8      \r
       html = Iconv.iconv("UTF-8", "ISO-8859-1", html)[0]\r
             \r
+      # pompage de l'image dans un thread séparé\r
       if take?("image") && ($force || !film.possedeImage?)\r
          /<img src="(.*?)" border="0" alt="" class="affichette" \/>/ =~ html\r
          unless $1.nil?\r
@@ -212,9 +213,10 @@ class Allocine  < Basemodule
       end\r
       \r
       fermerConnexion\r
-   end   \r
+   end\r
    \r
    def finish\r
+      # on attend que tous les threads de pompage d'image aient terminé\r
       @threadImage.join if defined? @threadImage\r
    end\r
 end
\ No newline at end of file