getBookSize() would crash when accessing index -1 if the spine was empty. calculateProgress() would then divide by zero. Added guards to return 0 in these edge cases.
getBookSize() would crash when accessing index -1 if the spine was empty. calculateProgress() would then divide by zero. Added guards to return 0 in these edge cases.