-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Updated theme media playback to play in Random order #5714
Updated theme media playback to play in Random order #5714
Conversation
050d57c
to
cfa4480
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ESLint doesn't pass. Please fix all ESLint issues.
src/apps/experimental/routes/user/display/hooks/useDisplaySettings.ts
Outdated
Show resolved
Hide resolved
src/apps/experimental/routes/user/display/hooks/useDisplaySettings.ts
Outdated
Show resolved
Hide resolved
cfa4480
to
a2aa5d6
Compare
To me it doesn't make sense to add an option for this, just making it random by default should be sufficient. |
The reason I added an option is that I noticed that when multiple audio files existing within a So the "SortName" option still allows users to control the order in which theme music and videos play via how they name their files within a "theme-music" or "backdrops" folder. I didn't set the option to default to "Random" in order to maintain the current behavior, however I wouldn't be averse to changing the default to be "Random" instead of "SortName" if it is OK to not maintain backwards compatibility? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My review in case you keep the order selection.
|
I kept the order selection options, but changed the default to be "Random". |
This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged. |
The `GetThemeMedia, `GetThemeVideos` and `GetThemeSongs` functions can optionally sort the results based based on passing an ItemSortBy type and a SortOrder. This is intended to be used by jellyfin-web in order to allow users to control the order of theme playback. See PR: jellyfin/jellyfin-web#5714
This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged. |
* Changed `GetThemeMedia` to support SortBy/Order options The `GetThemeMedia, `GetThemeVideos` and `GetThemeSongs` functions can optionally sort the results based based on passing an ItemSortBy type and a SortOrder. This is intended to be used by jellyfin-web in order to allow users to control the order of theme playback. See PR: jellyfin/jellyfin-web#5714 * Update MediaBrowser.Controller/Entities/BaseItem.cs Fix the `GetThemeVideos` two argument overload having both parameters defaulted. For the two argument overload, both parameters are required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ESLint doesn't pass. Please fix all ESLint issues.
I have updated the PR to use the new GetThemeMedia Library api to perform the sorting and verified by locally generated the jellyfin SDK and testing the changes. When this repo is eventually updated to use the jellyfin SDK which contains the change from commit jellyfin/jellyfin@24f355a, then the sort options will work transparently. Until then the current behavior of not performing any sorting still occurs without error. |
I've merged the latest unstable version of the SDK via #5747. You should be able to update your branch now and use the API changes. |
Thanks for updating the API version. I'll wait until the next the API updates to test changes again. |
I just tested using the latest jellyffin SDK unstable version update from the yesterday and the changes are all working as intended. |
This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged. |
a9f06de
to
5a38089
Compare
Just for clarification and documentation purposes: |
You are correct, this will take the list of themes and shuffle them before adding them to the play queue. |
5a38089
to
5a9af6d
Compare
I agree with this. This is such a niche feature (really a niche of a niche of a niche as it requires people to have theme media, have multiple theme media, and care about the order they are played) that I find it hard to justify adding and maintaining 600 lines of code for it. |
I can update this PR to change the default sort order to random and revert all of the UI and settings changes. |
c3daa66
to
c18eb93
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ESLint doesn't pass. Please fix all ESLint issues.
I have updated the PR to set the theme media player to default to random playback. |
c18eb93
to
578c643
Compare
|
Could you update the PR title and description to reflect the update? Thanks! |
Done. |
Changes
The ThemeMusicPlayer code has been updated to playback theme media using the Random sort order which causes theme media to be added to the play queue in a Random order.
Issues
This is the implementation for the feature request located https://features.jellyfin.org/posts/2740/select-audio-from-the-theme-music-folder-at-random.
#5958