margorski / exodos-launcher

Launcher for eXoDOS. Basic and forked from Flashpoint Launcher repository (https://github.com/FlashpointProject/launcher)
https://exodos.the-eye.us
MIT License
35 stars 4 forks source link

Add Game Media Carousel for Game Sidebar #16

Closed colin969 closed 3 months ago

colin969 commented 3 months ago

Adds an Media Carousel to the Game Sidebar, currently presents them in order of video, then images in alphabetical order.

Videos in the sidebar play on a muted loop with controls disabled. Clicking it opens it in the media preview whcih unmutes and enables controls. Byte chunk header support was added to the file server to allow the seek bar to work.

It only checks the top level of Videos for the 30 second demo currently.

image

All media for each platform are read at startup in a single sweep, and stored in maps. These maps are used to populate the media field on each game object with fairly good performance.

LaunchBox removes information from image filenames, so it does the same by matching a formatted game title to the filename, which fixes thumbnails which previously didn't have their images load.

Game videos aren't properly stored in the game metadata, so instread we extract the predictable filename based on the application path.

Thumbnails are now also populated in order of preference, this order and which images are valid for a thumbnail can be edited in an array. The game grid does not support other media types.