mirror of
https://github.com/aaru-dps/RedBookPlayer.git
synced 2025-12-16 19:24:41 +00:00
Fix off-by-one display total tracks if hidden track exists
This commit is contained in:
@@ -270,7 +270,7 @@ namespace RedBookPlayer.Common.Discs
|
||||
TotalIndexes = 0;
|
||||
|
||||
// Set the internal disc state
|
||||
TotalTracks = _image.Tracks.Count;
|
||||
TotalTracks = (int)_image.Tracks.Max(t => t.TrackSequence);
|
||||
TrackDataDescriptor firstTrack = _toc.TrackDescriptors.First(d => d.ADR == 1 && d.POINT == 1);
|
||||
TimeOffset = (ulong)((firstTrack.PMIN * 60 * 75) + (firstTrack.PSEC * 75) + firstTrack.PFRAME);
|
||||
TotalTime = TimeOffset + _image.Tracks.Last().TrackEndSector;
|
||||
|
||||
Reference in New Issue
Block a user