mirror of
https://github.com/SabreTools/MPF.git
synced 2026-07-02 17:24:48 +00:00
PSX date fixes (#157)
* Sony PlayStation date extraction fixed, 3 separate issues: 1. 190x year instead of 200x 2. Failure to get date for some titles where SYSTEM.CNF BOOT record doesn't have backslash after "cdrom:" 3. Date shift by one day due to Utc offset applied Relaxed directory path requirements to allow dot and ampersand. DiscImageCreator had to be changed in order to support this, will be submitted separately. * Reverted extra path characters modification. * Reverted to UTC time
This commit is contained in:
committed by
Matt Nadareski
parent
9c9ca16366
commit
1fe12be0b5
@@ -1683,7 +1683,7 @@ namespace DICUI.Utilities
|
||||
line = sr.ReadLine();
|
||||
|
||||
// Once it finds the "BOOT" line, extract the name
|
||||
exeName = Regex.Match(line, @"BOOT.*?=\s*cdrom.?:\\(.*?);.*").Groups[1].Value;
|
||||
exeName = Regex.Match(line, @"BOOT.*?=\s*cdrom.?:\\?(.*?);.*").Groups[1].Value;
|
||||
}
|
||||
}
|
||||
catch
|
||||
@@ -1698,7 +1698,11 @@ namespace DICUI.Utilities
|
||||
return null;
|
||||
|
||||
FileInfo fi = new FileInfo(exePath);
|
||||
return fi.LastWriteTimeUtc.ToString("yyyy-MM-dd");
|
||||
|
||||
// fix year 200x reported as 190x, not elegant but this is Windows ISO9660 issue so this is the best we can do unless we parse output data track manually
|
||||
DateTime dt = new DateTime(fi.LastWriteTimeUtc.Year >= 1900 && fi.LastWriteTimeUtc.Year < 1920 ? 2000 + fi.LastWriteTimeUtc.Year % 100 : fi.LastWriteTimeUtc.Year,
|
||||
fi.LastWriteTimeUtc.Month, fi.LastWriteTimeUtc.Day);
|
||||
return dt.ToString("yyyy-MM-dd");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user