jellyfin / jellyfin-roku

The Official Roku Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
449 stars 137 forks source link

Movie genre list empty #1025

Closed bmunger closed 1 year ago

bmunger commented 1 year ago

Software Versions Jellyfin Server Version: 10.8.9 Roku Client Version: 1.6.3

Describe the bug In the Movies section, hit the * button, and change View to Genres, it gives a nice list of genres and a small selection of movies in each one. However, when I choose the left most option to view all, it says "This Folder contains no items". However, when I do this on the Shows section, it does work as expected.

How To Reproduce

  1. Go to Movies
  2. Press *
  3. Select View
  4. Select Genres
  5. Select left-most item to view all
  6. Folder list is empty with the following message "This Folder contains no items"

Expected behavior As with the Shows section, it should contain a list of all movies in the associated genre.

Logs No relevant logs on Jellyfin server side. If there are any for the Roku client, let me know.

Screenshots

Connection Information Is server local or remote? - Both local Roku client and a remote client were tested.

Is server connection http or https? - https

Additional context

1hitsong commented 1 year ago

There is no easy way to get logs from Roku. I'll see if in the future we can create a sort of "debug mode" for the client so people can give us info.

I know of only 2 ways to get the data we need to debug this.

  1. Install a dev branch and we add console log statements to find where it's breaking down.
  2. Using Postman, you submit API requests against your server to see if the expected data is returned. If it is, it may still require doing item 1.
bmunger commented 1 year ago

Seems like the best option is the first one. I have already enabled development mode on my Roku, and it looks easy enough to upload a package to the web interface. I did check the telnet port for any logs there while running the Jellyfin client, but nothing was sent. I assume with the log statements added, they would be redirected there.

bmunger commented 1 year ago

@1hitsong - Would you be able to create a custom build, or provide the API request steps to simulate the Roku client requests?

1hitsong commented 1 year ago

@bmunger Let's start by determining the path you're following. We'll need to add some print statements to the code to find out what's happening.

To begin, lets get your ENV setup. Clone the repo to your machine, then navigate to the root folder of the repo in terminal/command prompt and run npm install to install all needed components.

It'll make things MUCH easier for you if you use VSCode and install the BrightScript Language extension. It'll make pushing code to your Roku much quicker. You'll also be able to see the console logs directly in VSCode instead of needing to telnet in.

bmunger commented 1 year ago

@1hitsong - I have npm installed and ran npm install within the project directory and it has pulled in all necessary components.

I have also added the BrightScript Language extension to VS Code and have the folder opened.

I'm ready to proceed. Thanks.

1hitsong commented 1 year ago

I'm looking at the Unstable branch.

Edit source/Main.brs. Add the following line at line 166, inside the selectedItem.type = "Folder" and selectedItem.json.type="Genre" condition.

print "MovieCount", selectedItem.json.MovieCount

Press F5 to bring up the Deploy menu and deploy to your Roku device.

On you Roku, go the the genre list and click on one of the "View All" posters and look in the console in VSCode. What's the MovieCount value?

image

bmunger commented 1 year ago

Interesting! I was able to make that change and now it seems to work properly. Last time I checked was yesterday as well. Here is the output of a few different genres:

image

bmunger commented 1 year ago

As a test, I went back to the original channel and it doesn't work there. But it works in the dev channel installed through VSCode. Is it possible there is a commit since this release that has fixed it? I wouldn't think a simple print statement would change this.

1hitsong commented 1 year ago

It's certainly possible. We've already merged 30 PRs into the unstable branch that haven't been released yet.

bmunger commented 1 year ago

Are you planning another minor release soon, or are you waiting for more changes yet? That many changes between release and now would take a fair amount of time to bisect, and I'm not sure it's worth it, except for out of curiosity.

1hitsong commented 1 year ago

I suppose it's up to you on whether or not you want to step through the changes to see exactly which one fixed your issue or if you're comfortable simply knowing it's resolved in the next release.

If I were a betting man, I'd guess #983 fixed it.

Are you planning another minor release soon, or are you waiting for more changes yet?

Honestly, we haven't begun to discuss the next release yet. The back to back December/January releases burned the wick at both ends.

bmunger commented 1 year ago

Looks like your bet was correct. I changed that statement and it now behaves as it did in the release version.

I definitely understand. For now this will work, though I don't want to enable development mode on the other Roku, so I will be fine there for now.

Thanks a lot for the help. Roku development is a lot more interesting than I expected as well.

I don't know if you want to close this now, as the issue has been identified and fixed in unstable, or wait until it land in next release.

1hitsong commented 1 year ago

We typically close issues as code is merged into unstable. Since we know this issue is resolved with merged code, I'll close it.

I'll leave you with this. Now that you have a dev environment setup, we're always looking and asking for more people to help test changes and QA branches before we release. If you'd like to help on this front, just pull down a PR branch, give a test, and leave a comment with your findings or an approval if it worked.

bmunger commented 1 year ago

Thanks. I will test where I can.