Skip to content

Add Jellyfin integration#44401

Merged
MartinHjelmare merged 45 commits intohome-assistant:devfrom
RunC0deRun:jellyfin
Nov 12, 2021
Merged

Add Jellyfin integration#44401
MartinHjelmare merged 45 commits intohome-assistant:devfrom
RunC0deRun:jellyfin

Conversation

@RunC0deRun
Copy link
Copy Markdown
Contributor

@RunC0deRun RunC0deRun commented Dec 20, 2020

Proposed change

Add an integration for Jellyfin media system. The integration provides the content of a user's libraries as a media source with Home Assistant. This initial pull request is intentionally limited in scope, supporting only a single Jellyfin server at a time and supporting only music libraries. This is done to keep this initial submission small.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@homeassistant
Copy link
Copy Markdown
Contributor

Hi @j-stienstra,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@Kane610
Copy link
Copy Markdown
Member

Kane610 commented Dec 20, 2020

Isn't the emby integration sufficient?

@RunC0deRun
Copy link
Copy Markdown
Contributor Author

Jellyfin has forked from Emby around two years ago now and although the Emby integration can at this moment still be used with Jellyfin servers, there is no guarantee it will remain working. Therefore using the jellyfin provided Python API provides a more stable platform to build on.
Next to this, the two integrations provide different features. The Emby integration provides clients to the Emby server as Media Players. This proposed integration provides a Jellyfin server as a Media Source.

@Kane610
Copy link
Copy Markdown
Member

Kane610 commented Dec 21, 2020

Thanks for clarifying

@anthonylavado
Copy link
Copy Markdown

@j-stienstra Thanks for this. Feel free to ping me (or the greater Jellyfin team) if you need any assistance (that goes for any HA maintainers too).

Copy link
Copy Markdown
Contributor

@milanmeu milanmeu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments

Comment thread homeassistant/components/jellyfin/__init__.py Outdated
Comment thread homeassistant/components/jellyfin/config_flow.py Outdated
Comment thread homeassistant/components/jellyfin/media_source.py Outdated
Comment thread homeassistant/components/jellyfin/media_source.py Outdated
Comment thread homeassistant/components/jellyfin/media_source.py Outdated
Comment thread homeassistant/components/jellyfin/manifest.json Outdated
Comment thread homeassistant/components/jellyfin/const.py Outdated
@RunC0deRun
Copy link
Copy Markdown
Contributor Author

@milanmeu, thanks for the review! I rebased my fork and applied the suggested changes to the import and string formats.

@milanmeu
Copy link
Copy Markdown
Contributor

Have another look at the comment #44401 (comment).

Comment thread homeassistant/components/jellyfin/__init__.py Outdated
Comment thread homeassistant/components/jellyfin/__init__.py Outdated
Comment thread homeassistant/components/jellyfin/config_flow.py Outdated
Comment thread homeassistant/components/jellyfin/__init__.py Outdated
Comment thread homeassistant/components/jellyfin/__init__.py Outdated
Comment thread homeassistant/components/jellyfin/media_source.py Outdated
@KapJI
Copy link
Copy Markdown
Member

KapJI commented Apr 27, 2021

With #49762 strict type checks are now opt-in.

Seems you already annotated everything, please add it to .strict-typing to enable these checks.

@KapJI
Copy link
Copy Markdown
Member

KapJI commented Apr 27, 2021

Thanks!

@KapJI
Copy link
Copy Markdown
Member

KapJI commented Apr 29, 2021

#49847 renamed FlowResultDict, please rebase one more time 🙂

@RunC0deRun
Copy link
Copy Markdown
Contributor Author

@KapJI Done! I'm getting quite handy at this rebasing by now :)

Comment thread .coveragerc
@MartinHjelmare
Copy link
Copy Markdown
Member

There are some build errors. You may need to rebase again and then address the things that are related to this integration.

Comment thread homeassistant/components/jellyfin/config_flow.py Outdated
Comment thread homeassistant/components/jellyfin/config_flow.py Outdated
Comment thread homeassistant/components/jellyfin/__init__.py Outdated
Comment thread homeassistant/components/jellyfin/__init__.py Outdated
Comment thread tests/components/jellyfin/test_config_flow.py Outdated
Comment thread tests/components/jellyfin/test_config_flow.py Outdated
@RunC0deRun RunC0deRun closed this Nov 10, 2021
@RunC0deRun RunC0deRun reopened this Nov 10, 2021
@RunC0deRun
Copy link
Copy Markdown
Contributor Author

Sorry about the closing and re-opening. Hit the wrong button in the Github app....

Copy link
Copy Markdown
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@MartinHjelmare MartinHjelmare merged commit 0ae5b9e into home-assistant:dev Nov 12, 2021
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 13, 2021
@RunC0deRun RunC0deRun deleted the jellyfin branch November 15, 2021 18:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.