mtkennerly / ludusavi-playnite

Playnite plugin for save backups via Ludusavi
MIT License
141 stars 9 forks source link

Support to open games save and configuration directories #77

Open darklinkpower opened 3 weeks ago

darklinkpower commented 3 weeks ago

Similar to supporting opening the backup directories, I think it would be great to be able to open the save directories. Along time ago I made a separate extension for this but I'm not maintaining it anymore and the code is a mess to be honest. I think it would make more sense for this to be available as a feature in Ludusavi Playnite itself, by obtaining this directly from Ludusavi.

I remember the implementation needed to do this:

mtkennerly commented 3 weeks ago

I think this is complicated enough that I'd rather keep it in Ludusavi 😅 How would you feel about a context menu option that opens Ludusavi and automatically does a preview of the game in question?

darklinkpower commented 3 weeks ago

I think having a preview would be useful but in my opinion I think missing support to open the directory would be unfortunate as the main reason is to have an easy way to quickly open save and configuration directories for various operations, such as deleting, modifying, checking files, etc.

How are you thinking the preview would work? Just as an idea, it could be done by having the tree structure as menu items:

Somewhere in Ludusavi's menu
--Saves preview
----Directory1
------Open directory (Opens Directory1 in Explorer, should have directory icon)
------ <Insert separator as described in Playnite documentation>
------File1InDirectory1.abc
------File2InDirectory1.abc
----File1.sav
----File2.sav

I think this way would be really cool, would resolve issues of having to resolve common root directories and would make it really easy and convenient to open directories and files. When clicking files, it would open them automatically and additionally, they could also have an icon with their file extension if available in IcoFont font.

Although still, it needs to be evaluated if there are performance concerns. I don't know if Ludusavi already caches or has a quick way to find available files.

mtkennerly commented 3 weeks ago

I don't know if Ludusavi already caches or has a quick way to find available files.

ludusavi backup --preview --api provides enough information for this, although there would be a few second delay if we had to run it before showing the context menu.

How are you thinking the preview would work?

Here's a mock-up. Ludusavi already has buttons to open folders, so it's just missing a way to automatically scan specific games after launching:

https://github.com/mtkennerly/ludusavi-playnite/assets/4934192/f10bc8eb-3539-4aa0-b518-8e3e817f51ba

darklinkpower commented 2 weeks ago

If I understand correctly the idea would be for Playnite Ludusavi to open Ludusavi with the game being displayed or selected, with the buttons to open directories there? If that's the case in my opinion that wouldn't be ideal, ideally this should be available in Playnite since having to go through more steps would deteriorate UX but I understand if that's not feasible to achieve.

Regarding this:

ludusavi backup --preview --api provides enough information for this, although there would be a few second delay if we had to run it before showing the context menu.

If it takes a few seconds delay maybe it could only be executed when a game is stopped and then cache'ed to display when opening the game menu and there could be an "Update" menu item for cases where the user has modified the game save/configuration files and wants to see this reflected.