jellyfin / jellyfin-web

Web Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
2.24k stars 1.19k forks source link

Library Pagination Issues - LiveTV #4402

Open jedthe3rd opened 1 year ago

jedthe3rd commented 1 year ago

Describe The Bug When I have Library Pages enabled and try to go to the next page in the On Now Live TV view (library?) it won't go to the next page. All the other Live TV views handle paging correctly. Then if I try to disable Library Pages it won't load all the content available. This is true for all Live TV views.

Steps To Reproduce

  1. Go here: /web/index.html#!/mypreferencesdisplay.html?userId=
  2. Change Library page size to 200 (might work with smaller values if you don't have that many on now channels).
  3. Make sure you have over 200 (might work with smaller values if you don't have that many on now channels) On Now content.
  4. Visit: /web/index.html#!/list.html?type=Programs&IsAiring=true&serverId=. Hit the next page button and the page will reload without moving to the next page. (url it calls: /LiveTv/Programs/Recommended?UserId==200&Fields=ChannelInfo%2CPrimaryImageAspectRatio%2CPrimaryImageAspectRatio&Limit=200&HasAired=false&IsAiring=true&SortBy=SortName&SortOrder=Descending&ImageTypeLimit=1")
  5. Notice that the page didn't change.

Expected Behavior Page advances to the next page with the rest of the On Now shows or if paging is 0 all content is shown on the first page.

Logs n/a

Screenshots Clicking -> doesn't do anything: image

Selected all content show - Page Size: 0 image Page Size: 1000 image Page Size: 200 image

System (please complete the following information):

Additional Context I am loading some free IPTV content which is why I have so many channels.

jedthe3rd commented 1 year ago

Figured out the first issue: The On Now page is calling the /Recommended api endpoint instead of the /program parent endpoint. The /Recommended endpoint doesn't support start index so it will always start at the beginning. Now to find the code that makes that logic and fix it.

Was this intentional or just a copy paste miss from the On Now Home page view?

I also figured out why setting the page limit to 0 is causing a limited amount of list items to show up. Somewhere in the code the limit is overwritten and defaults to 300. Again not sure if this is intentional.

jedthe3rd commented 1 year ago

@thornbill Looks like you were the last person to work on this issue/area of the code. https://github.com/jellyfin/jellyfin-web/pull/3409

Is there any reason I shouldn't change the limit hardcoded here: https://github.com/jellyfin/jellyfin-web/blob/c9b72d87fe6299e79c025db60901a306325deab7/src/controllers/list.js#L18 to use the user defined setting set here: https://github.com/jellyfin/jellyfin-web/blob/c9b72d87fe6299e79c025db60901a306325deab7/src/components/common/Pagination.tsx#L15 Or should it be defined in the constructor and the query['Limit'] be set to the user setting (in the problem case it would be set to 0 instead of staying undefined) in the constructor of the ItemView class and the default removed? I am not sure if it makes sense to treat page limits different for LiveTV lists vs other content lists. I could be missing some context though.

Also is there a reason the max for LibraryPageSize is 1000? https://github.com/jellyfin/jellyfin-web/blob/c9b72d87fe6299e79c025db60901a306325deab7/src/components/displaySettings/displaySettings.template.html#L227

I will make a PR with my changes once I get a build working and test it, probably will happen in a few days.

jellyfin-bot commented 1 year ago

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.

If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.

This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

jellyfin-bot commented 9 months ago

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.

If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.

This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.