mmatyas / pegasus-frontend

A cross platform, customizable graphical frontend for launching emulators and managing your game collection.
http://pegasus-frontend.org
Other
1.23k stars 113 forks source link

Another Metadata Question #534

Closed Sixdd6 closed 4 years ago

Sixdd6 commented 4 years ago

I promise I'm looking at the docs before I post :)

This is my metadata for a ps1 collection, for some reason it does not populate the single game even though I have it in the config folder with my other working metadata files.

collection: Playstation
shortname: psx
extensions: m3u, chd
launch: retroarch -L "/home/samm/snap/retroarch/current/.config/retroarch/cores/mednafen_psx_libretro.so" {file.path}

game: Final Fantasy VII
file: /home/samm/Storage/Emulation/Games/Sony - Playstation 1/Final Fantasy VII (USA)/Final Fantasy VII (USA).m3u
players: 1

I'm probably overlooking something again but a fresh set of eyes never hurts.

mmatyas commented 4 years ago

I assume the metadata file is at ~/.config/pegasus-frontend/metafiles/, right? So, collections search for files matching the extensions in the directory the metafile is in, and in the directory entries, if there is any. (You can also add files manually using files.) If the collection doesn't find/has no games, it will not appear (and a message about this should appear in the log). As for games, they can belong to more than one collection, the ones that contain their files. If they don't belong to any collections, they will not appear (and a message about this should appear in the log).

In short, I think you're missing a directory: /home/samm/Storage/Emulation/Games/Sony - Playstation 1 line :)

Sixdd6 commented 4 years ago

The thing is, I don't want it to populate every game I have in that folder, so I was hoping I could just list individual games. Unless I'm misinterpreting how the directory: tag works..

Sixdd6 commented 4 years ago

Ok, so I moved the games that I want in the list to a different directory and just pointed the directory to that, so that works. But now I've got a new problem. The games that I've added details for in the collection still don't show up in the list. My thinking on this is that if I add a game entry and give it a file entry then that game should show up in Pegasus and launch that specific file, but it doesn't seem to work that way at all. When I add a game and assign a file entry to it it just doesn't show up in the launcher at all. In this example the games that are simply in the folder show up fine, however the games that I've manually assigned don't show up at all.

Note: The first bit of setting some files to ignore is so they don't show up in the games list. The games there have an associated m3u playlist that is open in retroarch to allow changing discs in that emulator and I don't want multiple entries for every disc in the game.

ps1.metadata.txt

mmatyas commented 4 years ago

Instead of ignoring files, why don't just add the ones you want:

collection: Playstation
shortname: psx
launch: retroarch -L "/home/samm/snap/retroarch/current/.config/retroarch/cores/mednafen_psx_libretro.so" {file.path}
files:
  /home/samm/Storage/Emulation/Games/Sony - Playstation 1/_collection/Final Fantasy VII (USA)/Final Fantasy VII (USA).m3u
  /home/samm/Storage/Emulation/Games/Sony - Playstation 1/_collection/Final Fantasy VIII (USA)/Final Fantasy VIII (USA).m3u
  /home/samm/Storage/Emulation/Games/Sony - Playstation 1/_collection/Final Fantasy IX (USA)/Final Fantasy IX (USA).m3u
  /home/samm/Storage/Emulation/Games/Sony - Playstation 1/_collection/Gex - Enter the Gecko (USA).chd
  /home/samm/Storage/Emulation/Games/Sony - Playstation 1/_collection/Gex 3 - Deep Cover Gecko (USA).chd
  /home/samm/Storage/Emulation/Games/Sony - Playstation 1/_collection/Legend of Dragoon, The (USA)/Legend of Dragoon, The (USA).m3u

If I understand correctly that's what you'd like to see (but correct me if I'm wrong).

If you mean that some games have multiple entries (CDs, playlists, etc.), a game can also have more than one file entry:

game: Final Fantasy VII
files:
  ffvii_disc1.iso
  ffvii_disc2.iso

and so the files will not appear individually. When launching a game like that, you'll get a popup asking you which one you wish to launch.

Games appear only if they belong to a collection. If they wouldn't belong to any collection, there would be no place for them to show up or be accessible.

Sixdd6 commented 4 years ago

Ok, so you specify the game files in the collection and then the game entries just add detail then? That makes a lot of sense now if so. Testing...

Awesome, I didn't realize the files had to be declared in the collection so I was doing it in the games themselves. Once again thank you, this really is becoming my favorite launcher. I have a request also but I'll ask before opening another ticket. Is there a way to force a sorting order? I ask because I'm seeing Final Fantasy IX come before Final Fantasy VII, which makes sense as I comes before V but as roman numerals it doesn't make sense.

EDIT: I also just realized that the games are taking the file name in the launcher rather than the title specified in the metadata, is there a way to fix that other than renaming the files? What I mean is that instead of seeing "Final Fantasy VII" it is coming up as "Final Fantasy VII (USA)", so the filename rather than the game name.

mmatyas commented 4 years ago

Ok, so you specify the game files in the collection and then the game entries just add detail then?

Yup, you can view it like that, yes.

Is there a way to force a sorting order? I ask because I'm seeing Final Fantasy IX come before Final Fantasy VII, which makes sense as I comes before V but as roman numerals it doesn't make sense.

Unfortunately it isn't algorithmically possible (ie. with 100% accuracy) to decide whether a text is a series number in some language or part of the title. There would be cases where it would work, but just as easily would be cases where it doesn't (think games like "MegaMan X" or "Alien³" for example).

I also just realized that the games are taking the file name in the launcher rather than the title specified in the metadata

If a file belongs to a game entry, then the details there should be show up, including the title. If it doesn't, first check the log file if you see any related issues. If that doesn't help, feel free to send me the metadata file, the location of the metadata file, and the list of files in the directory entries (if there's any) and in the directory of the metadata file (if it's not in the global directory).

Sixdd6 commented 4 years ago

As for sort order I was thinking more of a manual way, for people like me who are control freaks, something like a "sortTitle: Final Fantasy 7" . And then if that key exists it would sort by that name rather than the printed title. This would allow for greater control in general for things like sorting a collection like the metal gear franchise where games take place out of order chronologically but you want to sort them by chronological order.

As for the names showing oddly I'll get that together, brb...

mmatyas commented 4 years ago

Actually that's a good idea, I'll see if I can add support for that.

Sixdd6 commented 4 years ago

Ah, I should pay more attention to the log, it was erroring on the file for the titles that it was happening with. It seems when you tell it what file belongs to a game you have to use absolute paths if the metadata is in the config folder.

EDIT: Out of curiosity, is it looking for a match in the collection then?

mmatyas commented 4 years ago

Yes, the file paths are expected to be relative to either the directory of the metadata file or one of the directory entries (if any). If it's somewhere else the path should be corrected accordingly.

Yes, games belong to collections that contain their files -- not necessary written as absolute paths in the metadata, but any extension filters or relative paths that point to the same file.

Sixdd6 commented 4 years ago

Got it, I'm feeling pretty good about this now. Time to start working on a custom theme :)