aldostools / webMAN-MOD

Extended services for PS3 console (web server, ftp server, netiso, ntfs, ps3mapi, etc.)
https://aldostools.github.io/webMAN-MOD/
GNU General Public License v3.0
1.29k stars 176 forks source link

Subfolders on NTFS and FAT32 drives #540

Open lmipsum opened 3 years ago

lmipsum commented 3 years ago

I've noticed some inconsistency in how the custom subfolders are handled. When we are using subfolders on an FAT32 USB drive or on the system drive in the following file structure: PS3ISO/Custom Subfolder/Game Title [XXXXYYYYY].iso PS2ISO/Custom Subfolder/Game Title [XXXXYYYYY].iso

The games will appear in the XMB menu as: Custom Subfolder/Game Title

When we are using subfolders on an NTFS drive with the same file structure, the games will appear in the XMB menu as: [Custom Subfolder] Game Title

Also, if we are using XXXXYYYYY-[Game Title].iso naming on a backup, when they are in subfolders, then it appear in the XMB as: Custom Subfolder/XXXXYYYYY-[Game Title]

On FAT32 and System Drive the XMB lists the games by not just the titles but also the folders, on NTFS the order completely ignores the name of the subfolders, and seems random.

If we check on the PARAM.SFO on the webMAN MOD setup, which isn't always favorable, if someone want to use custom name for backups without modifying the PARAM.SFO files to avoid some discs appear as simply "Install Disc", then the XMB completely ignores the custom subfolders on NTFS drives, and just lists all the games in the XMB.

What I've been trying to do is organizing all of my backups stored on both NTFS, FAT32 and System Drives based on how many players can play the games with the following subfolders: [1 Player] [1-2 Players] [1-3 Players] [1-4 Players] [1-7 Players]

It would be also nice, if we could use subfolders inside the GAMES folder, example if during the scan it detects a folder name starting with a special character like <, then it will do an extra scan for games inside that, as its a subfolder, the scanning already works on subfolders inside the GAMES folder, it just not showing the subfolder itself when listing the game in the XMB.

aldostools commented 3 years ago

webMAN was originally designed without sub-folder support.

The current support for sub-folders in webMAN MOD is very limited and only limited to games in ISO format.

lmipsum commented 3 years ago

the last paragraph is more like a feature request, if it's possible to make it.

aldostools commented 3 years ago

The sub-folders in GAMES/GAMEZ are not recommended because they may cause problems with games with long paths. Also it would break all current standards and would not be supported by other backup managers.

If you want to use sub-folders, convert the games to ISO. It has several benefits (performance, compatibility, ntfs support, integrity, etc.)

In regards to NTFS, the scanned files are cached in /dev_hdd0/tmp/wmtmp To support sub-folders, prepISO adds the folder name as a prefix enclosed in brackets because / cannot be used and caching them as actual subfolders would require a lot of changes in several modules.

I will check if the name of the sub-folders can be displayed more consistently between FAT32/NTFS.

Thanks for your feedback.

lmipsum commented 3 years ago

screenshot_2021_09_17_16_46_46 screenshot_2021_09_17_16_47_11 screenshot_2021_09_17_16_47_32 screenshot_2021_09_17_16_47_55 screenshot_2021_09_17_16_48_44 I took some screenshots to provide more insight on the issue. on the first 4 images i've highlighted some sorting issues. and on the last one how it appears if it's on FAT32 or internal drive.

aldostools commented 3 years ago

@lmipsum Thank you for your feedback. webMAN MOD has very limited memory available. To use the memory more efficiently, the games are sorted only by the first 6 characters in the name. When a folder is used, 3 characters are used to sort the folder and 3 for the name. Sometimes 3 bytes is not enough for sort the games properly.

In the case of prepISO, the tool caches all the files in a single folder /dev_hdd0/tmp/wmtmp To add support for folders, it adds the folder name as prefix of the file name between square brackets. I could try to make the plugin handle these "folders" between brackets like they are handled in USB, but this is not a priority right now.

lmipsum commented 3 years ago

the desired way would be if they would be handled on the USB as they are handled on the NTFS at the moment, the brackets are fine if thats the simplier way.. about the sorting, you mention 3 characters for the folder and 3 for the name, but then what a ratchet game is doing between the resident evils or a lost planet between the littlebigplanets, something just feels off, meanwhile everything looks fine within the /index.ps3?ps3, its just the XMB part that is acting up. maybe this sorting issue could be fixed if an integer could be stored in the file and folder names, which could be extracted for the sorting method. just an idea.

aldostools commented 3 years ago

I've updated the plugin to process the subfolders in NTFS and FAT32 the same way (show folders enclosed in brackets)

You can test the pre-release build here:

The limitation of 6 characters or 3+3 when the ISO is in subfolders still exists.

lmipsum commented 3 years ago

now the subfolders appears in brackets from FAT32 external and internal too, can mount the games fine, showing the title id in the info bar, but the title's doesn't work the same (without file extension and substracted title id) in the XMB listing as it is from NTFS if the PARAM.SFO is unchecked screenshot_2021_09_19_11_03_53

aldostools commented 3 years ago

@lmipsum Thank you for your feedback. I compiled a new build that should fix the reported issue about file extension and the removal of the title id. webMAN_MOD_latest.zip

lmipsum commented 3 years ago

thanks, that worked with the game titles, and now it handles the subfolders the same way everywhere!

although the 3+3 sort rule is kinda funky still, because its inserting the fat32 foldered titles seemingly random into the 3+3 sorted ntfs titles, but i understand it isn't top priority (ive just moved non 2 player games into folders for the shake of testing), screenshot_2021_09_19_13_52_44 . for my use case the optimal would be, if it would completely ignore the folder names for the sorting (the folders are just tags), and would sort the games only by title.

lmipsum commented 3 years ago

the issue is might not even the memory limit with the 3+3, but that the // sort by 2nd word and // sort by game number (if possible) doesn't seems to apply for the XMB listing, while it works for the html perfectly.

aldostools commented 3 years ago

I see. Please, try again the new build in the online updater or in the release page.