Skip to content

Return alphabet indexes for movies / series

Once olaris-react!109 (merged) is finished and merged in, users will be able to scroll to any part of their library list very easily. By returning the index when a certain letter / value starts this will allow a user to jump to a specific letter to find what they are looking for (without having to search).

Since the frontend has no knowledge of titles not fetched yet (just the total number) we would need to return this information from the server. On the frontend, this would only be shown when filtering by title. On the backend it could be returned as part of the metadata proposed in #231, or just as a separate additional query with the same variables as the main series / movies query (sortOrder etc).

Hopefully this calculation shouldn't be too heavy, but I'm unsure.

For example I was envisioning something along these lines, so frontend can loop through and output with click handlers etc.

[
    {
        "label": "#",
        "offset": 0
    },
    {
        "label": "A",
        "offset": 13
    },
    {
        "label": "B",
        "offset": 51
    },
    ...
    {
        "label": "Z",
        "offset": 245
    }
]
Edited by Jacob K
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information