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

update LatestInLibraryView to use getLatestMedia #895

Merged
merged 2 commits into from
Nov 10, 2023

Conversation

elliots
Copy link
Contributor

@elliots elliots commented Oct 25, 2023

This now matches what the web player does.

image

Before this change, it displayed the latest shows added.

image

@elliots
Copy link
Contributor Author

elliots commented Oct 25, 2023

The getLatestMedia endpoint doesn't appear to support paging, so I'm grabbing 3x the number so the trailing "Show All" button has a bit more in it. Not very nice. Is there a better way?

@LePips
Copy link
Member

LePips commented Oct 25, 2023

This breaks the "random" selection when navigating to the library page from one of these views. I admit I didn't take a good look at how the parameter creation was refactored when that work was done but it should be redone. Or for now, you can override the _getDefaultParams/getRandomItemFromLibrary for the new view model.

doesn't appear to support paging, so I'm grabbing 3x the number

That's fine for now. I will be redoing that number of items thing.

@elliots
Copy link
Contributor Author

elliots commented Oct 25, 2023

I've fixed the linting issues, and implemented getRandomItemFromLibrary. The implementation grabs a random item from the items and wraps it in BaseItemDtoQueryResult. Also not brilliant but i think better than getting a random one from the whole library.

I couldn't see where the toolbar with the RandomItemButton is displayed, so I haven't actually tested it yet.

@elliots elliots force-pushed the fix-latest branch 2 times, most recently from 161247b to 9e0e84b Compare October 26, 2023 06:51
@LePips LePips merged commit eb17300 into jellyfin:main Nov 10, 2023
3 checks passed
@elliots elliots deleted the fix-latest branch November 11, 2023 07:04
@LePips LePips added the enhancement New feature or request label Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants