Skip to content

Commit

Permalink
Merge pull request #22 from wolffshots/fix/audiobooks-only-bug
Browse files Browse the repository at this point in the history
Fix a bug where if some options don't exist on a library it fails to deserialise it causing a crash
  • Loading branch information
wolffshots authored Nov 22, 2024
2 parents 3f12688 + e3a4e35 commit 9a192ff
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion custom_components/audiobookshelf/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from homeassistant.const import Platform

VERSION = "v0.2.2"
VERSION = "v0.2.3"
ISSUE_URL = "https://github.com/wolffshots/hass-audiobookshelf/issues"
DOMAIN = "audiobookshelf"
PLATFORMS: list[Platform] = [Platform.SENSOR]
Expand Down
2 changes: 1 addition & 1 deletion custom_components/audiobookshelf/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
"requirements": [
"aiohttp"
],
"version": "0.2.2"
"version": "0.2.3"
}
8 changes: 4 additions & 4 deletions custom_components/audiobookshelf/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class LibraryFolder:
"""Class representing a folder in an Audiobookshelf library."""

id: str
full_path: str
full_path: str | None
library_id: str
added_at: int | None

Expand All @@ -174,7 +174,7 @@ class LibrarySettings:
auto_scan_cron_expression: str | None
skip_matching_media_with_asin: bool | None
skip_matching_media_with_isbn: bool | None
audiobooks_only: bool
audiobooks_only: bool | None
epubs_allow_scripted_content: bool | None
hide_single_book_series: bool | None
only_show_later_books_in_continue_series: bool | None
Expand All @@ -192,9 +192,9 @@ class Library:
folders: list[LibraryFolder] | None
display_order: int | None
icon: str | None
media_type: str
media_type: str | None
provider: str | None
settings: LibrarySettings
settings: LibrarySettings | None
last_scan: int | None
last_scan_version: str | None
created_at: int | None
Expand Down

0 comments on commit 9a192ff

Please sign in to comment.