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

[FEATURE REQUEST] Playlist Icon Selection/Upload #708

Open
gonzonia opened this issue Jan 11, 2025 · 11 comments
Open

[FEATURE REQUEST] Playlist Icon Selection/Upload #708

gonzonia opened this issue Jan 11, 2025 · 11 comments

Comments

@gonzonia
Copy link
Collaborator

Right now we're limited to the icons for playlists that are build into VPin Studio.
Screenshot 2025-01-11 at 9 46 02 AM

What if we want more or different ones?

Or could you resize the wheel that's used for the playlist in popper?

@syd711
Copy link
Owner

syd711 commented Jan 15, 2025

These icons are only used for the Studio, not the frontend.

Or could you resize the wheel that's used for the playlist in popper?

You can wheel icons for playlists in the asset manager. Don't they match in size?

@gonzonia
Copy link
Collaborator Author

I'm referring to the icons in Studio. When looking at a large number of playlists, I have to change all of them to unique colors and then remember which color goes to which playlist. If these could be customized or use the wheel image if available it would be a nice feature.

Screenshot 2025-01-15 at 1 54 20 PMScreenshot 2025-01-15 at 1 55 54 PM

@gonzonia
Copy link
Collaborator Author

gonzonia commented Feb 5, 2025

I hacked together something in the code to show you what I meant. This works, but I'm not sure it's worth it, they get a bit fuzzy that small but you can see what I was thinking.

Image Image

@gonzonia
Copy link
Collaborator Author

gonzonia commented Feb 5, 2025

It wasn't difficult to implement (once I traced everything down), but the way I hacked it together slowed things a bit. I'm sure there's a better way if anyone thinks it's worth pursuing. I used the JavaFX Image class to resize it and then applied that to an ImageView to pass back to the label.

@gonzonia
Copy link
Collaborator Author

gonzonia commented Feb 5, 2025

For now, I thought it would be helpful to add Tooltips. Created PR -#740

@gonzonia
Copy link
Collaborator Author

gonzonia commented Feb 5, 2025

I have an idea of how to implement this but I'm not sure how to make it happen with what's been built (I just don't know where to find all the needed parts and where they should be housed).

On loading of the tables also load a list of the playlists in the background and then load their wheel icons into an array with the playlist ID as an index.

Size them two ways, 1) small for the labels and 2) larger for the tooltips.

Keep that stored away for the main table (and refresh when appropriate (new media added, new playlist added, etc).
Then as he table is built, just pull from the cached wheel icons. My hacked together version actually hits the server for each icon and it's bogging everything down so is not a good implementation.

Also, it may make sense to make it two preferences. 1) Show Wheel Icon in Table and 2) Show Wheel Icon in Tooltip.

@syd711
Copy link
Owner

syd711 commented Feb 5, 2025

The client has an image cache (client.getCachedImage ... something) that can be used here. Labels have an extra setGraphics method that is cheaper than using an ImageView.
Both these things together should do the trick without performance issues.

You can also start the PR and I can finish the rest. I like the idea.

@gonzonia
Copy link
Collaborator Author

gonzonia commented Feb 5, 2025

It should be straightfoward, but I can't find the right places to put things that doesn't slow stuff down.

Some Questions -

  1. Where do you think it should populate the ImageCache? I currently have it in the launcher with the avatar image. (probably not ideal)

  2. Because each playlist icon is technically a button, I have to apply the tooltip image when the button is created, I think this is where I'm getting too much overhead and it's slowing things down even if the images should be in the cache.

  3. The AssetServiceClient has a getGameMediaItem method. I tried to mimic this in the PlaylistMediaServiceClient with a getPlaylistMediaItem method but while "http://<IP ADDRESS /api/v1/media/33/Wheel/ " works for a game, "http://<IP ADDRESS /api/v1/playlistmedia/33/Wheel/" does not work for a playlist so I had to code in ".png" I'm not sure that's always the case. Can we add the ability to get the Wheel image like the game image to the API?

.

@gonzonia
Copy link
Collaborator Author

gonzonia commented Feb 5, 2025

Oh, and since label.setGraphics() requires a node, I still have to use an ImageView to apply it. I can't use a straight image.

@gonzonia
Copy link
Collaborator Author

gonzonia commented Feb 5, 2025

Okay, I think I figured out #1. I put it in the loadStudio method so it fills the imagecache at a better spot. This seemed to help.
It's still slowing things down a little but not as bad. I'm going to play with it a little more. The problem is that it's having to go through and pull the images for each playlist as the games the table is scrolled on the main screen. So the scrolling isn't smooth because it slows things down to get the image from the cache and then add it to the tooltip.

@gonzonia
Copy link
Collaborator Author

gonzonia commented Feb 7, 2025

Related to this. It might be too much, but would it make sense to display somewhere on the table data management what playlists the table is a part of?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants