Merge branch 'main' into fix-jellyfin-setup-error-and-deprecations.2025-09-15.06-04-26

This commit is contained in:
sudoxnym 2025-09-15 00:05:51 -06:00 committed by GitHub
commit 7562d403be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 22 additions and 10 deletions

View file

@ -1,3 +1,10 @@
# fin-assistant
---
fin-assistant is the revival of jellyfin-ha to bring the ability for voice assist to jellyfin.
# jellyfin_ha # jellyfin_ha
Jellyfin integration for Home Assistant Jellyfin integration for Home Assistant

View file

@ -195,6 +195,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry):
hass.data[DOMAIN][config.get(CONF_URL)][platform] = {} hass.data[DOMAIN][config.get(CONF_URL)][platform] = {}
hass.data[DOMAIN][config.get(CONF_URL)][platform]["entities"] = [] hass.data[DOMAIN][config.get(CONF_URL)][platform]["entities"] = []
if hasattr(hass.config_entries, "async_forward_entry_setups"): if hasattr(hass.config_entries, "async_forward_entry_setups"):
await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS) await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS)
else: else:
@ -203,6 +204,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry):
hass.config_entries.async_forward_entry_setup(config_entry, platform) hass.config_entries.async_forward_entry_setup(config_entry, platform)
) )
async_dispatcher_send(hass, SIGNAL_STATE_UPDATED) async_dispatcher_send(hass, SIGNAL_STATE_UPDATED)
async def stop_jellyfin(event): async def stop_jellyfin(event):
@ -216,6 +218,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry):
async def async_unload_entry(hass: HomeAssistant, config_entry: ConfigEntry): async def async_unload_entry(hass: HomeAssistant, config_entry: ConfigEntry):
_LOGGER.info("Unloading jellyfin") _LOGGER.info("Unloading jellyfin")
if hasattr(hass.config_entries, "async_unload_platforms"): if hasattr(hass.config_entries, "async_unload_platforms"):
unload_ok = await hass.config_entries.async_unload_platforms( unload_ok = await hass.config_entries.async_unload_platforms(
config_entry, PLATFORMS config_entry, PLATFORMS
@ -227,6 +230,7 @@ async def async_unload_entry(hass: HomeAssistant, config_entry: ConfigEntry):
config_entry, platform config_entry, platform
) )
_jelly: JellyfinClientManager = hass.data[DOMAIN][config_entry.data.get(CONF_URL)]["manager"] _jelly: JellyfinClientManager = hass.data[DOMAIN][config_entry.data.get(CONF_URL)]["manager"]
await _jelly.stop() await _jelly.stop()

View file

@ -28,21 +28,22 @@ RESULT_CONN_ERROR = "cannot_connect"
RESULT_LOG_MESSAGE = {RESULT_CONN_ERROR: "Connection error"} RESULT_LOG_MESSAGE = {RESULT_CONN_ERROR: "Connection error"}
@config_entries.HANDLERS.register(DOMAIN)
class JellyfinFlowHandler(config_entries.ConfigFlow): class JellyfinFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
"""Config flow for Jellyfin component.""" """Config flow for Jellyfin component."""
VERSION = 1 VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_PUSH CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_PUSH
@staticmethod @staticmethod
@callback @callback
def async_get_options_flow(config_entry): def async_get_options_flow(config_entry):
"""Jellyfin options callback.""" """Return the options flow handler."""
return JellyfinOptionsFlowHandler(config_entry) return JellyfinOptionsFlowHandler(config_entry)
def __init__(self): def __init__(self):
"""Init JellyfinFlowHandler.""" """Initialize the config flow."""
self._errors = {} self._errors = {}
self._url = None self._url = None
self._ssl = DEFAULT_SSL self._ssl = DEFAULT_SSL

View file

@ -1,11 +1,11 @@
{ {
"domain": "jellyfin", "domain": "Jellyfin",
"name": "Jellyfin", "name": "fin-assistant",
"version": "1.1.2", "version": "0.0.1",
"config_flow": true, "config_flow": true,
"documentation": "https://github.com/koying/jellyfin_ha", "documentation": "https://github.com/sudoxnym/fin-assistant",
"issue_tracker": "https://github.com/koying/jellyfin_ha/issues", "issue_tracker": "https://github.com/sudoxnym/fin-assistant/issues",
"requirements": ["jellyfin-apiclient-python==1.7.2"], "requirements": ["jellyfin-apiclient-python==1.7.2"],
"codeowners": ["@koying"], "codeowners": ["sudoxnym"],
"iot_class": "local_push" "iot_class": "local_push"
} }