瀏覽代碼

[changed] Do not list books that cannot be downloaded (#4)

TnS-hun 6 年之前
父節點
當前提交
4a91774dec
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      kobo-book-downloader/Commands.py

+ 7 - 0
kobo-book-downloader/Commands.py

@@ -181,6 +181,13 @@ Examples:
 			if newEntitlement is None:
 				continue
 
+			# Do not list books that cannot be downloaded.
+			bookEntitlement = newEntitlement.get( "BookEntitlement" )
+			if bookEntitlement is not None:
+				accessibility = bookEntitlement.get( "Accessibility" )
+				if ( accessibility is not None ) and accessibility != "Full":
+					continue
+
 			if ( not listAll ) and Commands.__IsBookRead( newEntitlement ):
 				continue