syd711 / vpin-studio

Competition, table, and player management for VPins.
MIT License
32 stars 2 forks source link

[Bug] Wheels image thumb images are not deleted when deleting a wheel image #541

Open dmccombs opened 3 weeks ago

dmccombs commented 3 weeks ago

Describe the bug When deleting a wheel image via the Asset Manager, the main image is removed in the appropriate POPMedia sub directory on the cabinet, but the corresponding pthumbs\ sub directory images are not. This causes a strange issue with wheel images for playlists, where trying to replace a image causes the original image to be restored.

To Reproduce Steps to reproduce the behavior:

  1. Open Asset Manager in VPin-Studio
  2. Select a table or playlist with an existing wheel image
  3. Note the filename of the image existing on the cabinet in the corresponding PinUPSystem\POPMedia\ directory as well as <filename>_thumb.png and <filename>_thumb_sm.png in the pthumbs\ sub directory.
  4. Delete the wheel image via Asset Manager
  5. Note that while the main image file is removed, the pthumbs\ files are not
  6. If this is a playlist, try uploading a new wheel image in its place, then open PinUp Popper and see that is it showing the old image on the wheel bar.

Expected behavior All files for a given wheel image, including pthumbs\<filename>_thumb.png and pthumbs\<filename>_thumb_sm.png should be removed when deleting the wheel image in Asset Manager.

Desktop (please complete the following information):

syd711 commented 2 weeks ago

Fixed with 3.8

dmccombs commented 2 weeks ago

@syd711 I'm still seeing this problem on 3.8.1.

For example, if I have a playlist named "Classic", I delete the wheel image via the asset manager in vpin studio with the cabinet in maintenance mode. The file named pl_Classic.png gets deleted from PinUPSystem\POPMedia\Default\Wheel\, but PinUPSystem\POPMedia\Default\Wheel\pthumbs\pl_Classic_thumb.png and PinUPSystem\POPMedia\Default\Wheel\pthumbs\pl_Classic_thumb_sm.png still exist on the cabinet and are shown as the wheel image in Popper.

Also, uploading a new image doesn't replace those thumb images, so the old wheel image continues to be shown until they're manually deleted.

syd711 commented 2 weeks ago

I have missed to check the playlists too. I've reopened the ticket

syd711 commented 4 days ago

I've fixed the deletion there. Altough I've found the pthumbs folder also in my Default folder, I haven't figured out yet when these icons are converted.

dmccombs commented 4 days ago

Interesting. At least on my cabinet, I don't have any phumbs folder in Default itself. Deleting the images in Default\Wheel\pthumbs\ is what I've had to do manually to get new images to show up in the frontend.