Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implements multi selector for library type for Emby/Jellyfin. Allows… #786

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cmatute7712
Copy link

@cmatute7712 cmatute7712 commented Jun 1, 2024

homer-jellyfin-multi-library

Description

Implements multi selector for library type for Emby/Jellyfin. Allows for multiselect using array style notation in yaml. Also updated docs to reflect change
Fixes #681

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • I've read & comply with the contributing guidelines
  • I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.
  • I have made corresponding changes to the documentation (README.md).
  • I've checked my modifications for any breaking changes, especially in the config.yml file

… for multiselect using array style notation in yaml. Also updated docs to reflect change Fixes bastienwirtz#681
Copy link

netlify bot commented Jun 1, 2024

Deploy Preview for homer-demo-content failed.

Name Link
🔨 Latest commit fbc7890
🔍 Latest deploy log https://app.netlify.com/sites/homer-demo-content/deploys/665b7ccd17583400086ab47a

@cmatute7712 cmatute7712 changed the title Imeplements multi selector for library type for Emby/Jellyfin. Allows… Implements multi selector for library type for Emby/Jellyfin. Allows… Jun 2, 2024
@Im-0xC7
Copy link

Im-0xC7 commented Feb 5, 2025

Really hope this is able to be merged in soon, been wanting this feature for a while now

Copy link
Owner

@bastienwirtz bastienwirtz left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution @cmatute7712 !

else if (this.item.libraryType === "series")
return `${this.episodeCount} eps, ${this.seriesCount} series`;
else return `wrong library type 💀`;
const libraryType = this.item.libraryType;
Copy link
Owner

Choose a reason for hiding this comment

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

We can avoid a breaking change with somethong like this

Suggested change
const libraryType = this.item.libraryType;
// ensure retro-compatibility with previous implementation
const libraryType = Array.isArray(this.item.libraryType) ? this.item.libraryType : [this.item.libraryType];

const libraryType = this.item.libraryType;
const counts = [];

libraryType.forEach((type, index) => {
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
libraryType.forEach((type, index) => {
libraryType.forEach((type) => {

const counts = [];

libraryType.forEach((type, index) => {
if (type === "music") {
Copy link
Owner

Choose a reason for hiding this comment

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

nit: a switch could be nicer ?

}
});

const allowedParams = this.item.embyCountParams || "";
Copy link
Owner

Choose a reason for hiding this comment

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

What is this.item.embyCountParams ? the embyCountParams is not documented (or I'm missing something?)

Copy link
Owner

Choose a reason for hiding this comment

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

I'm not sure to get what the code below around the filter logic is about 🤔

@bastienwirtz bastienwirtz force-pushed the main branch 2 times, most recently from 12cad12 to 474dc3a Compare February 23, 2025 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jellyfin: show both movies and series counter?
3 participants