fraganator / archive-cache-manager

A LaunchBox plugin which extracts and caches large ROM archives, letting you play games faster.
GNU Lesser General Public License v2.1
11 stars 5 forks source link

Wrong region with multidisc and mixed region of the discs #44

Open Just4Link opened 9 months ago

Just4Link commented 9 months ago

Background: When a game have multiple regions like usa, japan, europe, germany i put them all together as additional applications.

Example for Final Fantasy VII: Final Fantasy VII (Germany) (Disc 1) is the main application what will started when i play. Additional Apps: Final Fantasy VII (Germany) (Disc 2) Final Fantasy VII (Germany) (Disc 3) Final Fantasy VII (USA) (Disc 1) Final Fantasy VII (USA) (Disc 2) Final Fantasy VII (USA) (Disc 3)

Now the problem: When i hit start the game with the germany disc 1, it will pick instead the usa disc 1 and usa disc 2 and as last germany disc 3.

Same issue with metal gear solid. It will pick usa disc 1 and then germany disc 2

Why is this happening?

Here from the log:

2023-11-27 13:50:26 - -------- FINAL FANTASY VII -------- 2023-11-27 13:50:26 - Preparing cache for Final Fantasy VII (Sony Playstation) running with RetroArch. 2023-11-27 13:50:26 - Multi-disc game detected. 2023-11-27 13:50:27 - ======== 2023-11-27 13:50:27 - Archive Cache Manager started with arguments: x \192.168.10.10\71_Roms\Sony Playstation\PSX - 1 - Germany\Final Fantasy VII (Germany) (Disc 1).7z -oZ:\LaunchBox\ThirdParty\7-Zip\Temp -y -aoa -bsp1 -spe 2023-11-27 13:50:27 - Running in extraction mode. 2023-11-27 13:50:27 - Disc 1 archive path set to "\192.168.10.10\71_Roms\Sony Playstation\PSX - 1 - USA\Final Fantasy VII (USA) (Disc 1).7z". 2023-11-27 13:50:27 - Disc 1 archive cache path set to "Z:\LaunchBox\ArchiveCache\Final Fantasy VII (USA) (Disc 1).7z - 4C1196". 2023-11-27 13:50:27 - Disc 2 archive path set to "\192.168.10.10\71_Roms\Sony Playstation\PSX - 1 - USA\Final Fantasy VII (USA) (Disc 2).7z". 2023-11-27 13:50:27 - Disc 2 archive cache path set to "Z:\LaunchBox\ArchiveCache\Final Fantasy VII (USA) (Disc 2).7z - 965219". 2023-11-27 13:50:27 - Disc 3 archive path set to "\192.168.10.10\71_Roms\Sony Playstation\PSX - 1 - Germany\Final Fantasy VII (Germany) (Disc 3).7z". 2023-11-27 13:50:27 - Disc 3 archive cache path set to "Z:\LaunchBox\ArchiveCache\Final Fantasy VII (Germany) (Disc 3).7z - 05EB09". 2023-11-27 13:50:27 - Extractor set to "File Copy". 2023-11-27 13:50:27 - Disc 1 decompressed archive size is 485968319 bytes. 2023-11-27 13:50:27 - Disc 2 decompressed archive size is 478575066 bytes. 2023-11-27 13:50:27 - Disc 3 decompressed archive size is 422367115 bytes. 2023-11-27 13:50:27 - Smart Extraction enabled for file "Final Fantasy VII (Germany) (Disc 1).7z". 2023-11-27 13:50:27 - Extracting archive to "Z:\LaunchBox\ArchiveCache\Final Fantasy VII (USA) (Disc 1).7z - 4C1196". 2023-11-27 13:50:32 - Disc 1 on disk size is 485968319 bytes. 2023-11-27 13:50:32 - Extracting archive to "Z:\LaunchBox\ArchiveCache\Final Fantasy VII (USA) (Disc 2).7z - 965219". 2023-11-27 13:50:36 - Disc 2 on disk size is 478575066 bytes. 2023-11-27 13:50:36 - Extracting archive to "Z:\LaunchBox\ArchiveCache\Final Fantasy VII (Germany) (Disc 3).7z - 05EB09". 2023-11-27 13:50:40 - Disc 3 on disk size is 422367115 bytes. 2023-11-27 13:50:40 - Error saving last played time in cache. 2023-11-27 13:50:40 - System.IO.DirectoryNotFoundException: Ein Teil des Pfades "Z:\LaunchBox\ArchiveCache\Final Fantasy VII (Germany) (Disc 1).7z - 02389E\lastplayed" konnte nicht gefunden werden. bei System.IO.Error.WinIOError(Int32 errorCode, String maybeFullPath) bei System.IO.File.InternalDelete(String path, Boolean checkHost) bei System.IO.File.Delete(String path) bei ArchiveCacheManager.CacheManager.UpdateArchiveCachePlaytime() 2023-11-27 13:50:40 - Completed in 12604ms. 2023-11-27 13:50:40 - ======== 2023-11-27 13:50:40 - Archive Cache Manager started with arguments: l \192.168.10.10\71_Roms\Sony Playstation\PSX - 1 - Germany\Final Fantasy VII (Germany) (Disc 1).7z -slt 2023-11-27 13:50:40 - Running in list mode. 2023-11-27 13:50:40 - Disc 1 archive path set to "\192.168.10.10\71_Roms\Sony Playstation\PSX - 1 - USA\Final Fantasy VII (USA) (Disc 1).7z". 2023-11-27 13:50:40 - Disc 1 archive cache path set to "Z:\LaunchBox\ArchiveCache\Final Fantasy VII (USA) (Disc 1).7z - 4C1196". 2023-11-27 13:50:40 - Disc 2 archive path set to "\192.168.10.10\71_Roms\Sony Playstation\PSX - 1 - USA\Final Fantasy VII (USA) (Disc 2).7z". 2023-11-27 13:50:40 - Disc 2 archive cache path set to "Z:\LaunchBox\ArchiveCache\Final Fantasy VII (USA) (Disc 2).7z - 965219". 2023-11-27 13:50:40 - Disc 3 archive path set to "\192.168.10.10\71_Roms\Sony Playstation\PSX - 1 - Germany\Final Fantasy VII (Germany) (Disc 3).7z". 2023-11-27 13:50:40 - Disc 3 archive cache path set to "Z:\LaunchBox\ArchiveCache\Final Fantasy VII (Germany) (Disc 3).7z - 05EB09". 2023-11-27 13:50:40 - Extractor set to "File Copy". 2023-11-27 13:50:40 - Failed to list cache path Z:\LaunchBox\ArchiveCache\Final Fantasy VII (Germany) (Disc 1).7z - 02389E System.IO.DirectoryNotFoundException: Ein Teil des Pfades "Z:\LaunchBox\ArchiveCache\Final Fantasy VII (Germany) (Disc 1).7z - 02389E" konnte nicht gefunden werden. bei System.IO.Error.WinIOError(Int32 errorCode, String maybeFullPath) bei System.IO.FileSystemEnumerableIterator1.CommonInit() bei System.IO.FileSystemEnumerableIterator1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler1 resultHandler, Boolean checkHost) bei System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption) bei ArchiveCacheManager.CacheManager.ListCacheArchive(String archiveCachePath, Nullable1 disc) 2023-11-27 13:50:40 - File listing found 0 files. 2023-11-27 13:50:40 - Completed in 43ms.

2023-11-27 14:19:25 - -------- METAL GEAR SOLID -------- 2023-11-27 14:19:25 - Preparing cache for Metal Gear Solid (Sony Playstation) running with RetroArch. 2023-11-27 14:19:25 - Multi-disc game detected. 2023-11-27 14:19:26 - ======== 2023-11-27 14:19:26 - Archive Cache Manager started with arguments: x \192.168.10.10\71_Roms\Sony Playstation\PSX - 1 - Germany\Metal Gear Solid (Germany) (Disc 1).7z -oZ:\LaunchBox\ThirdParty\7-Zip\Temp -y -aoa -bsp1 -spe 2023-11-27 14:19:26 - Running in extraction mode. 2023-11-27 14:19:26 - Disc 1 archive path set to "\192.168.10.10\71_Roms\Sony Playstation\PSX - 1 - USA\Metal Gear Solid (USA) (Disc 1) (Rev 1).7z". 2023-11-27 14:19:26 - Disc 1 archive cache path set to "Z:\LaunchBox\ArchiveCache\Metal Gear Solid (USA) (Disc 1) (Rev 1).7z - 2B5C03". 2023-11-27 14:19:26 - Disc 2 archive path set to "\192.168.10.10\71_Roms\Sony Playstation\PSX - 1 - Germany\Metal Gear Solid (Germany) (Disc 2).7z". 2023-11-27 14:19:26 - Disc 2 archive cache path set to "Z:\LaunchBox\ArchiveCache\Metal Gear Solid (Germany) (Disc 2).7z - A05906". 2023-11-27 14:19:26 - Extractor set to "7-Zip". 2023-11-27 14:19:26 - Disc 1 decompressed archive size is 705614217 bytes. 2023-11-27 14:19:27 - Disc 2 decompressed archive size is 704729861 bytes. 2023-11-27 14:19:27 - Using filename priority "cue". 2023-11-27 14:19:27 - Extracting archive to "Z:\LaunchBox\ArchiveCache\Metal Gear Solid (USA) (Disc 1) (Rev 1).7z - 2B5C03". 2023-11-27 14:19:34 - Disc 1 on disk size is 705614217 bytes. 2023-11-27 14:19:34 - Extracting archive to "Z:\LaunchBox\ArchiveCache\Metal Gear Solid (Germany) (Disc 2).7z - A05906". 2023-11-27 14:19:41 - Disc 2 on disk size is 704729861 bytes. 2023-11-27 14:19:41 - Using filename priority "cue". 2023-11-27 14:19:41 - Using filename priority "cue". 2023-11-27 14:19:41 - Error saving last played time in cache. 2023-11-27 14:19:41 - System.IO.DirectoryNotFoundException: Ein Teil des Pfades "Z:\LaunchBox\ArchiveCache\Metal Gear Solid (Germany) (Disc 1).7z - 580127\lastplayed" konnte nicht gefunden werden. bei System.IO.Error.WinIOError(Int32 errorCode, String maybeFullPath) bei System.IO.File.InternalDelete(String path, Boolean checkHost) bei System.IO.File.Delete(String path) bei ArchiveCacheManager.CacheManager.UpdateArchiveCachePlaytime() 2023-11-27 14:19:41 - Linking Z:\LaunchBox\ArchiveCache\Sony Playstation to cached archive. 2023-11-27 14:19:41 - System.IO.DirectoryNotFoundException: Ein Teil des Pfades "Z:\LaunchBox\ArchiveCache\Metal Gear Solid (Germany) (Disc 1).7z - 580127" konnte nicht gefunden werden. bei System.IO.Error.WinIOError(Int32 errorCode, String maybeFullPath) bei System.IO.FileSystemEnumerableIterator1.CommonInit() bei System.IO.FileSystemEnumerableIterator1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost) bei System.IO.Directory.GetDirectories(String path, String searchPattern, SearchOption searchOption) bei ArchiveCacheManager.CacheManager.LinkCacheToLaunchFolder() 2023-11-27 14:19:41 - Completed in 14963ms. 2023-11-27 14:19:41 - ======== 2023-11-27 14:19:41 - Archive Cache Manager started with arguments: l \192.168.10.10\71_Roms\Sony Playstation\PSX - 1 - Germany\Metal Gear Solid (Germany) (Disc 1).7z -slt 2023-11-27 14:19:41 - Running in list mode. 2023-11-27 14:19:41 - Disc 1 archive path set to "\192.168.10.10\71_Roms\Sony Playstation\PSX - 1 - USA\Metal Gear Solid (USA) (Disc 1) (Rev 1).7z". 2023-11-27 14:19:41 - Disc 1 archive cache path set to "Z:\LaunchBox\ArchiveCache\Metal Gear Solid (USA) (Disc 1) (Rev 1).7z - 2B5C03". 2023-11-27 14:19:41 - Disc 2 archive path set to "\192.168.10.10\71_Roms\Sony Playstation\PSX - 1 - Germany\Metal Gear Solid (Germany) (Disc 2).7z". 2023-11-27 14:19:41 - Disc 2 archive cache path set to "Z:\LaunchBox\ArchiveCache\Metal Gear Solid (Germany) (Disc 2).7z - A05906". 2023-11-27 14:19:41 - Extractor set to "7-Zip". 2023-11-27 14:19:41 - File listing found 0 files. 2023-11-27 14:19:41 - Completed in 34ms.