Browse Source

Use editor instead of author if there is no author

Stan Janssen 5 years ago
parent
commit
b13f7c8973
3 changed files with 7 additions and 6 deletions
  1. 1 1
      isbnlib_bol/__init__.py
  2. 5 4
      isbnlib_bol/_bol.py
  3. 1 1
      setup.py

+ 1 - 1
isbnlib_bol/__init__.py

@@ -1,6 +1,6 @@
 from ._bol import query
 
-__version__ = '1.0.2'
+__version__ = '1.0.3'
 
 __plugin_main_language__ = 'en'
 __plugin_service_name__ = 'bol'

+ 5 - 4
isbnlib_bol/_bol.py

@@ -18,10 +18,11 @@ class Book:
 
     @property
     def authors(self):
-        authors = self.specs.get("Auteur", None)
-        if authors:
-            return self.specs["Auteur"].split("\n")
-        return None
+        for key in ["Auteur", "Redacteur"]:
+            authors = self.specs.get(key, None)
+            if authors:
+                return authors.split("\n")
+        return []
 
     @property
     def publisher(self):

+ 1 - 1
setup.py

@@ -1,7 +1,7 @@
 from setuptools import setup
 
 setup(name="isbnlib-bol",
-      version="1.0.2",
+      version="1.0.3",
       description="ISBN lookup for Bol.com",
       packages=['isbnlib_bol'],
       author="Stan Janssen",