Browse Source

correction bug images

fraoustin 3 years ago
parent
commit
65f5862699
2 changed files with 7 additions and 2 deletions
  1. 5
    0
      CHANGES.rst
  2. 2
    2
      piwigotools/__init__.py

+ 5
- 0
CHANGES.rst View File

@@ -1,3 +1,8 @@
1
+0.1.3
2
+=====
3
+
4
+- correction per page in images
5
+
1 6
 0.1.2
2 7
 =====
3 8
 

+ 2
- 2
piwigotools/__init__.py View File

@@ -5,7 +5,7 @@
5 5
     Module piwigotools
6 6
 """
7 7
 
8
-__version_info__ = (0, 1, 2)
8
+__version_info__ = (0, 1, 3)
9 9
 __version__ = '.'.join([str(val) for val in  __version_info__])
10 10
 
11 11
 import inspect
@@ -134,7 +134,7 @@ class Piwigo(piwigo.Piwigo):
134 134
                 req = self.pwg.categories.getImages(**kw)
135 135
                 for img in req["images"]:
136 136
                     imgs[img["file"]] = img
137
-                if int(req["paging"]["count"]) < req["paging"]["per_page"]:
137
+                if len(req["images"]) < req["paging"]["per_page"]:
138 138
                     loop = False
139 139
                 kw["page"] = kw["page"] + 1    
140 140
             self._images[path] = imgs