Phalcode / gamevault-backend

Backend for the self-hosted gaming platform for drm-free games
https://gamevau.lt
Other
161 stars 13 forks source link

Support for extra files. #149

Open ChaosTherum opened 1 year ago

ChaosTherum commented 1 year ago

Is your feature request related to a problem? Please describe. It would be nice if we could store extra files alongside game archives.

Describe the solution you'd like I'm not sure if I'm organizing things as expected but currently I have my games organized like so. <GameTitle>/<GameTitle>(<GameVersion>)(<Portable/Installer>)(<GameYear>).ext

I would like to see the ability to store the extras, or however you want it titled alongside the archive and then serve those in a subpage of the game library page. Something along these lines.

<GameTitle>/Extras/Soundtrack.zip
<GameTitle>/Extras/Manual.pdf
<GameTitle>/Extras/Server.zip

Describe alternatives you've considered Right now I'm just putting non-archived files in an Extra folder so the application doesn't pick them up.

Alfagun74 commented 1 year ago

Just a heads up, the Portable/Installer Flag has not been released yet, and I recommend trying autodetection first before manually using those flags to override. You can refer to: https://github.com/Phalcode/gamevault-app/issues/18 for more details.

The usual /files organization for the most people around is simply a flat file list of all game archives without subfolders. Support for subfolders was just recently added. But i have a great idea to combine this request with #148:

If there is a package.json like in #148 or an Extras folder as proposed here in the same folder where the archive is located, it will be detected and utilized. This way, the file structure would look like this:

/files/Game 1 (2022).zip
/files/Game 2 (2022).zip
/files/Game 3 (2022).zip
/files/Game 4 (2022).zip
/files/Game 5/ # folder name is completely irrelevant
      /Game 5/Game 5 (2022).zip
      /Game 5/package.json #or whatever its called
      /Game 5/Extras/
      /Game 5/Extras/amazing-soundtrack.zip
      /Game 5/Extras/8k-wallpaper.png

What do you think?

ChaosTherum commented 1 year ago

That looks about right to me, the coolest possibility is creating some sort of redistribution format that people could use for distributing OSS games for instance.

ponchohoncho commented 1 year ago

When designing this, it could be good to follow Plex's model of "media in their own folders" as being preferred and the primary way that GameVault recognizes its media.

https://support.plex.tv/articles/naming-and-organizing-your-movie-media-files/ https://support.plex.tv/articles/200220677-local-media-assets-movies/ https://support.plex.tv/articles/local-files-for-trailers-and-extras/

When you have a bunch of extras, mods, updates, etc, it could be good if the primary index of a game is the folder, and then there's certain files inside, found by inference (the only .zip file in a folder is probably the game) or by filename (*-install.zip is the installer, and pg828271-Manual.pdf is the game manual, etc), that GameVault then adds to the entry for the game.

Sometimes a game will come with a lot of extra things like trailers, artwork, manuals, guides, cheats, soundtracks, etc, and we don't expect GameVault to handle them all, but even if not all media in the folder is recognized or used by GameVault, it's very handy to keep them together in our own file systems, rather than having to split them out to somewhere else.

I'm saying this here because /files/Game 5/ # folder name is completely irrelevant seems to indicate that folder names would not be important in the new scheme.

I'm not in favor of a package.json format, but prefer Plex's filename tags to identify media. That seems easier to manage, but that might just be me.

Alfagun74 commented 11 months ago

@ponchohoncho

You can call the file whatever you want because we only determine it by the Game Archive inside of it, additional files are in seperate subfolders inside of the game folder

/files/Game 4 (2022).zip
/files/DoesntMatterHowYouNameIt
      /DoesntMatterHowYouNameIt/Game 5 (2022).zip <- determines what game this is
      /DoesntMatterHowYouNameIt/package.json #optonal configs and so on
      /DoesntMatterHowYouNameIt/Soundtrack/ #only contains soundtrack
      /DoesntMatterHowYouNameIt/Trailers/ #only contains trailers
      /DoesntMatterHowYouNameIt/Manual/ #only contains manual
      /DoesntMatterHowYouNameIt/Extras/8k-wallpaper.png #misc

GameVault client should then offer you a small file browser / player later that you can retrieve those data from. We're not sure about the details yet though.

Lordingard commented 9 months ago

+1 about this functionnality, the most important for me. Maybe be with a function for ignoring some files or subfolders in games folder ?