10000 Jellyfin Track Sorting needs to sort by ParentIndexNumber then IndexNumber · Issue #138824 · home-assistant/core · GitHub
[go: up one dir, main page]

Skip to content
Jellyfin Track Sorting needs to sort by ParentIndexNumber then IndexNumber #138824
@rwrozelle

Description

@rwrozelle

The problem

When viewing Album Tracks in Media Source card, the order is incorrect when there are multiple Disks (for example Hamilton musical CDs)

in jellyfin integration:
Please add to const.py
ITEM_KEY_PARENT_INDEX_NUMBER: Final = "ParentIndexNumber"

Please update sorting on tracks in media_source.py
tracks = sorted(
tracks,
# Sort by whether a track has an index first, then by index
# This allows for sorting tracks with, without and with missing indices
key=lambda k: (
ITEM_KEY_PARENT_INDEX_NUMBER not in k,
k.get(ITEM_KEY_PARENT_INDEX_NUMBER),
ITEM_KEY_INDEX_NUMBER not in k,
k.get(ITEM_KEY_INDEX_NUMBER)

        ),
    )

What version of Home Assistant Core has the issue?

core-2025.2.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

jellyfin

Link to integration documentation on our website

https://www.home-assistant.io/integrations/jellyfin

Diagnostics information

No response

Example YAML snippet

Anything in the logs that might be useful for us?

Additional information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0