Skip to content

Commit

Permalink
[changed] Do not list books that cannot be downloaded (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
TnS-hun committed May 2, 2019
1 parent 4a91774 commit efe481e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions kobo-book-downloader/Commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,14 @@ def __GetBookList( listAll: bool ) -> list:
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":
# Skip saved previews.
if bookEntitlement.get( "Accessibility" ) == "Preview":
continue

# Skip refunded books.
if bookEntitlement.get( "IsLocked" ):
continue

if ( not listAll ) and Commands.__IsBookRead( newEntitlement ):
Expand Down

0 comments on commit efe481e

Please sign in to comment.