Просмотр исходного кода

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

TnS-hun 6 лет назад
Родитель
Сommit
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:
 			if newEntitlement is None:
 				continue
 				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 ):
 			if ( not listAll ) and Commands.__IsBookRead( newEntitlement ):
 				continue
 				continue