dunxd / HomeAssistantAddons

Home Assistant Addons developed by dunxd
4 stars 1 forks source link

Allow configuring directory of library #48

Closed franc6 closed 5 months ago

franc6 commented 8 months ago

My library is in a directory that's already mounted from NFS. It'd be nice to just point to there, rather than add another mount at /media/books.

dunxd commented 8 months ago

Add-ons are restricted to accessing locations that can be configured by the map option, so unless your mount is into one of these directories then it's not possible:

List of Home Assistant directories to bind mount into your container.

Possible values: homeassistant_config, addon_config, ssl, addons, backup, share, media, and all_addon_configs.

See https://developers.home-assistant.io/docs/add-ons/configuration#optional-configuration-options

Media seemed the most appropriate choice for books (and when I originally developed this HA didn't support mounts at all through the UI and the only option was to rsync the Calibre directory to the HA host).

met67 commented 5 months ago

I would also benefit from the ability to define a custom path for the library. In my case it is already mounted in /media/Books/Calibre Library/ (I already have Calibre-web addon running) so there should be no issue in accessing it from the add-on, I would just need an option to specify a different path…

dunxd commented 5 months ago

@franc6 @met67 the latest version, 1.24 now includes this functionality! Please have a go and let me any issues that arise.

dunxd commented 5 months ago

@met67 you can put Books/Calibre Library/ into the library folder field and it should pick up your library ok.

dunxd commented 5 months ago

@franc6 as long as your mount is within media then it should work for you too.

met67 commented 5 months ago

@met67 you can put Books/Calibre Library/ into the library folder field and it should pick up your library ok.

Thank you very much, now it works flawlessly!

dunxd commented 5 months ago

I'm going to close this, as I believe it is now working well. Thanks for the feedback!