From fbd3fc81384184b0cb6ab002b09ae7b66ff8fb1d Mon Sep 17 00:00:00 2001 From: itismadness Date: Mon, 28 Sep 2020 17:52:59 +0000 Subject: [PATCH] make offset check not sign agnostic --- src/Logchecker.php | 2 +- tests/logs/eac/details/en_8_negative_offset.json | 9 + tests/logs/eac/html/en_8_negative_offset.log | 237 ++++++++++++++++++++++ tests/logs/eac/originals/en_8.log | 194 ------------------ tests/logs/eac/originals/en_8_negative_offset.log | 237 ++++++++++++++++++++++ 5 files changed, 484 insertions(+), 195 deletions(-) create mode 100644 tests/logs/eac/details/en_8_negative_offset.json create mode 100644 tests/logs/eac/html/en_8_negative_offset.log delete mode 100644 tests/logs/eac/originals/en_8.log create mode 100755 tests/logs/eac/originals/en_8_negative_offset.log diff --git a/src/Logchecker.php b/src/Logchecker.php index a176062..860de1b 100644 --- a/src/Logchecker.php +++ b/src/Logchecker.php @@ -1501,7 +1501,7 @@ class Logchecker $Distance = levenshtein($Drive, $DriveName); if ($Distance < LOGCHECKER_LEVENSTEIN_DISTANCE + 1) { $MatchedDrives[$Distance]['drives'][] = $Drive; - $MatchedDrives[$Distance]['offsets'][] = preg_replace('/[^0-9]/s', '', (string) $Offset); + $MatchedDrives[$Distance]['offsets'][] = (string) $Offset; } } diff --git a/tests/logs/eac/details/en_8_negative_offset.json b/tests/logs/eac/details/en_8_negative_offset.json new file mode 100644 index 0000000..0226505 --- /dev/null +++ b/tests/logs/eac/details/en_8_negative_offset.json @@ -0,0 +1,9 @@ +{ + "ripper": "EAC", + "version": "0.99 prebeta 4", + "language": "en", + "combined": false, + "score": 100, + "checksum": "checksum_missing", + "details": [] +} diff --git a/tests/logs/eac/html/en_8_negative_offset.log b/tests/logs/eac/html/en_8_negative_offset.log new file mode 100644 index 0000000..a98dc2f --- /dev/null +++ b/tests/logs/eac/html/en_8_negative_offset.log @@ -0,0 +1,237 @@ +Exact Audio Copy V0.99 prebeta 4 from 23. January 2008 + +EAC extraction logfile from 19. June 2009, 17:55 + +Various Artists / Feedback Loop + +Used Drive : TOSHIBA DVD-ROM SD-M1612 Adapter: 1 ID: 1 + +Read mode : Secure +Utilize accurate stream : Yes +Defeat audio cache : Yes +Make use of C2 pointers : No + +Read offset correction : -472 +Overread into Lead-In and Lead-Out : No +Fill up missing offset samples with silence : Yes +Delete leading and trailing silent blocks : No +Null samples used in CRC calculations : Yes +Used interface : Installed external ASPI interface +Gap handling : Appended to previous track + +Used output format : User Defined Encoder +Selected bitrate : 320 kBit/s +Quality : High +Add ID3 tag : No +Command line compressor : C:\Program Files\FLAC\flac.exe +Additional command line options : -V -8 -T "artist=%a" -T "title=%t" -T "album=%g" -T "date=%y" -T "tracknumber=%n" -T "genre=%m" +%s + + +TOC of the extracted CD + + Track | Start | Length | Start sector | End sector + --------------------------------------------------------- + 1 | 0:00.00 | 6:23.65 | 0 | 28789 + 2 | 6:23.65 | 6:52.01 | 28790 | 59690 + 3 | 13:15.66 | 4:46.68 | 59691 | 81208 + 4 | 18:02.59 | 4:15.24 | 81209 | 100357 + 5 | 22:18.08 | 4:37.20 | 100358 | 121152 + 6 | 26:55.28 | 5:22.11 | 121153 | 145313 + 7 | 32:17.39 | 3:23.66 | 145314 | 160604 + 8 | 35:41.30 | 5:06.30 | 160605 | 183584 + 9 | 40:47.60 | 5:06.27 | 183585 | 206561 + 10 | 45:54.12 | 5:22.21 | 206562 | 230732 + 11 | 51:16.33 | 3:01.46 | 230733 | 244353 + 12 | 54:18.04 | 6:26.11 | 244354 | 273314 + 13 | 60:44.15 | 4:01.73 | 273315 | 291462 + 14 | 64:46.13 | 7:33.62 | 291463 | 325499 + + +Track 1 + + Filename C:\EAC Rips\VA - Feedback Loop [flac]\01 - D.B.S. - Spread Your Wings.wav + + Pre-gap length 0:00:02.00 + + Peak level 96.5 % + Track quality 99.9 % + Test CRC 71C8DE3F + Copy CRC 71C8DE3F + Track not present in AccurateRip database + Copy OK + +Track 2 + + Filename C:\EAC Rips\VA - Feedback Loop [flac]\02 - Consume - You Took The Candy, Now Get In The God-Damned Car!.wav + + Pre-gap length 0:00:02.00 + + Peak level 87.5 % + Track quality 100.0 % + Test CRC 7E72AF59 + Copy CRC 7E72AF59 + Track not present in AccurateRip database + Copy OK + +Track 3 + + Filename C:\EAC Rips\VA - Feedback Loop [flac]\03 - Burn - It's Gone.wav + + Pre-gap length 0:00:02.01 + + Peak level 71.9 % + Track quality 99.9 % + Test CRC 04A2B590 + Copy CRC 04A2B590 + Track not present in AccurateRip database + Copy OK + +Track 4 + + Filename C:\EAC Rips\VA - Feedback Loop [flac]\04 - Tyrophex14 - Dominator.wav + + Pre-gap length 0:00:02.01 + + Peak level 96.5 % + Track quality 100.0 % + Test CRC F1F47C94 + Copy CRC F1F47C94 + Track not present in AccurateRip database + Copy OK + +Track 5 + + Filename C:\EAC Rips\VA - Feedback Loop [flac]\05 - Centyl - Chinook.wav + + Pre-gap length 0:00:02.00 + + Peak level 81.1 % + Track quality 99.9 % + Test CRC 17FB1736 + Copy CRC 17FB1736 + Track not present in AccurateRip database + Copy OK + +Track 6 + + Filename C:\EAC Rips\VA - Feedback Loop [flac]\06 - Form,Alkaline - Spade.wav + + Pre-gap length 0:00:02.00 + + Peak level 96.5 % + Track quality 100.0 % + Test CRC F579DF3A + Copy CRC F579DF3A + Track not present in AccurateRip database + Copy OK + +Track 7 + + Filename C:\EAC Rips\VA - Feedback Loop [flac]\07 - Monotone Corrosive - Concrete.wav + + Pre-gap length 0:00:02.01 + + Peak level 91.1 % + Track quality 99.9 % + Test CRC 6562D398 + Copy CRC 6562D398 + Track not present in AccurateRip database + Copy OK + +Track 8 + + Filename C:\EAC Rips\VA - Feedback Loop [flac]\08 - lxl - Bloodbox (Slit).wav + + Pre-gap length 0:00:02.01 + + Peak level 78.3 % + Track quality 100.0 % + Test CRC 54AF40AF + Copy CRC 54AF40AF + Track not present in AccurateRip database + Copy OK + +Track 9 + + Filename C:\EAC Rips\VA - Feedback Loop [flac]\09 - Om Fx Skole - TIPFN.wav + + Pre-gap length 0:00:02.01 + + Peak level 66.7 % + Track quality 100.0 % + Test CRC 12F61E3B + Copy CRC 12F61E3B + Track not present in AccurateRip database + Copy OK + +Track 10 + + Filename C:\EAC Rips\VA - Feedback Loop [flac]\10 - C,A,T - Dying Morality.wav + + Pre-gap length 0:00:02.02 + + Peak level 85.5 % + Track quality 100.0 % + Test CRC 482EB263 + Copy CRC 482EB263 + Track not present in AccurateRip database + Copy OK + +Track 11 + + Filename C:\EAC Rips\VA - Feedback Loop [flac]\11 - Rec!Use - Demolir.wav + + Pre-gap length 0:00:02.01 + + Peak level 85.1 % + Track quality 100.0 % + Test CRC 52116E9E + Copy CRC 52116E9E + Track not present in AccurateRip database + Copy OK + +Track 12 + + Filename C:\EAC Rips\VA - Feedback Loop [flac]\12 - ML - Captain Woofykins.wav + + Pre-gap length 0:00:02.01 + + Peak level 81.1 % + Track quality 100.0 % + Test CRC 07370E09 + Copy CRC 07370E09 + Track not present in AccurateRip database + Copy OK + +Track 13 + + Filename C:\EAC Rips\VA - Feedback Loop [flac]\13 - XSZI - ConfinedToBlinders.wav + + Pre-gap length 0:00:02.02 + + Peak level 96.5 % + Track quality 99.8 % + Test CRC 0C1F2AD6 + Copy CRC 0C1F2AD6 + Track not present in AccurateRip database + Copy OK + +Track 14 + + Filename C:\EAC Rips\VA - Feedback Loop [flac]\14 - Monitor - Closedloop.wav + + Pre-gap length 0:00:02.00 + + Peak level 96.5 % + Track quality 99.9 % + Test CRC F1610343 + Copy CRC F1610343 + Track not present in AccurateRip database + Copy OK + + +None of the tracks are present in the AccurateRip database + +No errors occurred +End of status report \ No newline at end of file diff --git a/tests/logs/eac/originals/en_8.log b/tests/logs/eac/originals/en_8.log deleted file mode 100644 index cf9d843..0000000 --- a/tests/logs/eac/originals/en_8.log +++ /dev/null @@ -1,194 +0,0 @@ -EAC extraction logfile from 20. November 2006, 20:20 for CD -Banco del Mutuo Soccorso / Seguendo le Tracce - -Used drive : _NEC DVD+-RW ND-6450A Adapter: 1 ID: 0 -Read mode : Secure with NO C2, accurate stream, disable cache -Read offset correction : 594 -Overread into Lead-In and Lead-Out : No - -Used output format : Internal WAV Routines - 44.100 Hz; 16 Bit; Stereo - -Other options : - Fill up missing offset samples with silence : Yes - Delete leading and trailing silent blocks : No - Installed external ASPI interface - - -Track 1 - Filename C:\Documents and Settings\user\Documenti\file flac\01R.I.P. (english version).wav - - Pre-gap length 0:00:02.00 - - Peak level 97.7 % - Track quality 100.0 % - Test CRC EC43BAD3 - Copy CRC EC43BAD3 - Copy OK - -Track 2 - Filename C:\Documents and Settings\user\Documenti\file flac\02L'albero del pane.wav - - Peak level 97.7 % - Track quality 100.0 % - Test CRC 70584B1D - Copy CRC 70584B1D - Copy OK - -Track 3 - Filename C:\Documents and Settings\user\Documenti\file flac\03La danza dei grandi rettili.wav - - Peak level 97.7 % - Track quality 100.0 % - Test CRC 4E17BAEF - Copy CRC 4E17BAEF - Copy OK - -Track 4 - Filename C:\Documents and Settings\user\Documenti\file flac\04Passaggio.wav - - Peak level 44.4 % - Track quality 100.0 % - Test CRC D76BE99A - Copy CRC D76BE99A - Copy OK - -Track 5 - Filename C:\Documents and Settings\user\Documenti\file flac\05Non mi rompete.wav - - Peak level 97.7 % - Track quality 100.0 % - Test CRC 826A9F81 - Copy CRC 826A9F81 - Copy OK - -Track 6 - Filename C:\Documents and Settings\user\Documenti\file flac\06Dopo... niente pių č lo stesso.wav - - Peak level 97.7 % - Track quality 100.0 % - Test CRC CFB6C6BA - Copy CRC CFB6C6BA - Copy OK - -Track 7 - Filename C:\Documents and Settings\user\Documenti\file flac\07Traccia II.wav - - Peak level 97.7 % - Track quality 100.0 % - Test CRC D7BAF9A2 - Copy CRC D7BAF9A2 - Copy OK - -Track 8 - Filename C:\Documents and Settings\user\Documenti\file flac\08Metamorfosi.wav - - Peak level 97.7 % - Track quality 100.0 % - Test CRC BBB2254A - Copy CRC BBB2254A - Copy OK - -No errors occured - - -End of status report - ------------------------------------------------------------- - -EAC extraction logfile from 20. November 2006, 21:08 for CD -Banco del Mutuo Soccorso / Seguendo le Tracce - -Used drive : _NEC DVD+-RW ND-6450A Adapter: 1 ID: 0 -Read mode : Secure with NO C2, accurate stream, disable cache -Read offset correction : 594 -Overread into Lead-In and Lead-Out : No - -Used output format : C:\Programmi\FLAC\flac.exe (User Defined Encoder) - 320 kBit/s - Additional command line options : -V --replay-gain -8 -T "artist=%a" -T "title=%t" -T "album=%g" -T "date=%y" -T "tracknumber=%n" -T "genre=%m" %s - -Other options : - Fill up missing offset samples with silence : Yes - Delete leading and trailing silent blocks : No - Installed external ASPI interface - - -Track 1 - Filename C:\Documents and Settings\user\Documenti\file flac\01R.I.P. (english version).wav - - Pre-gap length 0:00:02.00 - - Peak level 97.7 % - Track quality 100.0 % - Test CRC EC43BAD3 - Copy CRC EC43BAD3 - Copy OK - -Track 2 - Filename C:\Documents and Settings\user\Documenti\file flac\02L'albero del pane.wav - - Peak level 97.7 % - Track quality 100.0 % - Test CRC 70584B1D - Copy CRC 70584B1D - Copy OK - -Track 3 - Filename C:\Documents and Settings\user\Documenti\file flac\03La danza dei grandi rettili.wav - - Peak level 97.7 % - Track quality 100.0 % - Test CRC 4E17BAEF - Copy CRC 4E17BAEF - Copy OK - -Track 4 - Filename C:\Documents and Settings\user\Documenti\file flac\04Passaggio.wav - - Peak level 44.4 % - Track quality 100.0 % - Test CRC D76BE99A - Copy CRC D76BE99A - Copy OK - -Track 5 - Filename C:\Documents and Settings\user\Documenti\file flac\05Non mi rompete.wav - - Peak level 97.7 % - Track quality 100.0 % - Test CRC 826A9F81 - Copy CRC 826A9F81 - Copy OK - -Track 6 - Filename C:\Documents and Settings\user\Documenti\file flac\06Dopo... niente pių č lo stesso.wav - - Peak level 97.7 % - Track quality 100.0 % - Test CRC CFB6C6BA - Copy CRC CFB6C6BA - Copy OK - -Track 7 - Filename C:\Documents and Settings\user\Documenti\file flac\07Traccia II.wav - - Peak level 97.7 % - Track quality 100.0 % - Test CRC D7BAF9A2 - Copy CRC D7BAF9A2 - Copy OK - -Track 8 - Filename C:\Documents and Settings\user\Documenti\file flac\08Metamorfosi.wav - - Peak level 97.7 % - Track quality 100.0 % - Test CRC BBB2254A - Copy CRC BBB2254A - Copy OK - -No errors occured - - -End of status report diff --git a/tests/logs/eac/originals/en_8_negative_offset.log b/tests/logs/eac/originals/en_8_negative_offset.log new file mode 100755 index 0000000..ff36335 --- /dev/null +++ b/tests/logs/eac/originals/en_8_negative_offset.log @@ -0,0 +1,237 @@ +Exact Audio Copy V0.99 prebeta 4 from 23. January 2008 + +EAC extraction logfile from 19. June 2009, 17:55 + +Various Artists / Feedback Loop + +Used drive : TOSHIBA DVD-ROM SD-M1612 Adapter: 1 ID: 1 + +Read mode : Secure +Utilize accurate stream : Yes +Defeat audio cache : Yes +Make use of C2 pointers : No + +Read offset correction : -472 +Overread into Lead-In and Lead-Out : No +Fill up missing offset samples with silence : Yes +Delete leading and trailing silent blocks : No +Null samples used in CRC calculations : Yes +Used interface : Installed external ASPI interface +Gap handling : Appended to previous track + +Used output format : User Defined Encoder +Selected bitrate : 320 kBit/s +Quality : High +Add ID3 tag : No +Command line compressor : C:\Program Files\FLAC\flac.exe +Additional command line options : -V -8 -T "artist=%a" -T "title=%t" -T "album=%g" -T "date=%y" -T "tracknumber=%n" -T "genre=%m" %s + + +TOC of the extracted CD + + Track | Start | Length | Start sector | End sector + --------------------------------------------------------- + 1 | 0:00.00 | 6:23.65 | 0 | 28789 + 2 | 6:23.65 | 6:52.01 | 28790 | 59690 + 3 | 13:15.66 | 4:46.68 | 59691 | 81208 + 4 | 18:02.59 | 4:15.24 | 81209 | 100357 + 5 | 22:18.08 | 4:37.20 | 100358 | 121152 + 6 | 26:55.28 | 5:22.11 | 121153 | 145313 + 7 | 32:17.39 | 3:23.66 | 145314 | 160604 + 8 | 35:41.30 | 5:06.30 | 160605 | 183584 + 9 | 40:47.60 | 5:06.27 | 183585 | 206561 + 10 | 45:54.12 | 5:22.21 | 206562 | 230732 + 11 | 51:16.33 | 3:01.46 | 230733 | 244353 + 12 | 54:18.04 | 6:26.11 | 244354 | 273314 + 13 | 60:44.15 | 4:01.73 | 273315 | 291462 + 14 | 64:46.13 | 7:33.62 | 291463 | 325499 + + +Track 1 + + Filename C:\EAC Rips\VA - Feedback Loop [flac]\01 - D.B.S. - Spread Your Wings.wav + + Pre-gap length 0:00:02.00 + + Peak level 96.5 % + Track quality 99.9 % + Test CRC 71C8DE3F + Copy CRC 71C8DE3F + Track not present in AccurateRip database + Copy OK + +Track 2 + + Filename C:\EAC Rips\VA - Feedback Loop [flac]\02 - Consume - You Took The Candy, Now Get In The God-Damned Car!.wav + + Pre-gap length 0:00:02.00 + + Peak level 87.5 % + Track quality 100.0 % + Test CRC 7E72AF59 + Copy CRC 7E72AF59 + Track not present in AccurateRip database + Copy OK + +Track 3 + + Filename C:\EAC Rips\VA - Feedback Loop [flac]\03 - Burn - It's Gone.wav + + Pre-gap length 0:00:02.01 + + Peak level 71.9 % + Track quality 99.9 % + Test CRC 04A2B590 + Copy CRC 04A2B590 + Track not present in AccurateRip database + Copy OK + +Track 4 + + Filename C:\EAC Rips\VA - Feedback Loop [flac]\04 - Tyrophex14 - Dominator.wav + + Pre-gap length 0:00:02.01 + + Peak level 96.5 % + Track quality 100.0 % + Test CRC F1F47C94 + Copy CRC F1F47C94 + Track not present in AccurateRip database + Copy OK + +Track 5 + + Filename C:\EAC Rips\VA - Feedback Loop [flac]\05 - Centyl - Chinook.wav + + Pre-gap length 0:00:02.00 + + Peak level 81.1 % + Track quality 99.9 % + Test CRC 17FB1736 + Copy CRC 17FB1736 + Track not present in AccurateRip database + Copy OK + +Track 6 + + Filename C:\EAC Rips\VA - Feedback Loop [flac]\06 - Form,Alkaline - Spade.wav + + Pre-gap length 0:00:02.00 + + Peak level 96.5 % + Track quality 100.0 % + Test CRC F579DF3A + Copy CRC F579DF3A + Track not present in AccurateRip database + Copy OK + +Track 7 + + Filename C:\EAC Rips\VA - Feedback Loop [flac]\07 - Monotone Corrosive - Concrete.wav + + Pre-gap length 0:00:02.01 + + Peak level 91.1 % + Track quality 99.9 % + Test CRC 6562D398 + Copy CRC 6562D398 + Track not present in AccurateRip database + Copy OK + +Track 8 + + Filename C:\EAC Rips\VA - Feedback Loop [flac]\08 - lxl - Bloodbox (Slit).wav + + Pre-gap length 0:00:02.01 + + Peak level 78.3 % + Track quality 100.0 % + Test CRC 54AF40AF + Copy CRC 54AF40AF + Track not present in AccurateRip database + Copy OK + +Track 9 + + Filename C:\EAC Rips\VA - Feedback Loop [flac]\09 - Om Fx Skole - TIPFN.wav + + Pre-gap length 0:00:02.01 + + Peak level 66.7 % + Track quality 100.0 % + Test CRC 12F61E3B + Copy CRC 12F61E3B + Track not present in AccurateRip database + Copy OK + +Track 10 + + Filename C:\EAC Rips\VA - Feedback Loop [flac]\10 - C,A,T - Dying Morality.wav + + Pre-gap length 0:00:02.02 + + Peak level 85.5 % + Track quality 100.0 % + Test CRC 482EB263 + Copy CRC 482EB263 + Track not present in AccurateRip database + Copy OK + +Track 11 + + Filename C:\EAC Rips\VA - Feedback Loop [flac]\11 - Rec!Use - Demolir.wav + + Pre-gap length 0:00:02.01 + + Peak level 85.1 % + Track quality 100.0 % + Test CRC 52116E9E + Copy CRC 52116E9E + Track not present in AccurateRip database + Copy OK + +Track 12 + + Filename C:\EAC Rips\VA - Feedback Loop [flac]\12 - ML - Captain Woofykins.wav + + Pre-gap length 0:00:02.01 + + Peak level 81.1 % + Track quality 100.0 % + Test CRC 07370E09 + Copy CRC 07370E09 + Track not present in AccurateRip database + Copy OK + +Track 13 + + Filename C:\EAC Rips\VA - Feedback Loop [flac]\13 - XSZI - ConfinedToBlinders.wav + + Pre-gap length 0:00:02.02 + + Peak level 96.5 % + Track quality 99.8 % + Test CRC 0C1F2AD6 + Copy CRC 0C1F2AD6 + Track not present in AccurateRip database + Copy OK + +Track 14 + + Filename C:\EAC Rips\VA - Feedback Loop [flac]\14 - Monitor - Closedloop.wav + + Pre-gap length 0:00:02.00 + + Peak level 96.5 % + Track quality 99.9 % + Test CRC F1610343 + Copy CRC F1610343 + Track not present in AccurateRip database + Copy OK + + +None of the tracks are present in the AccurateRip database + +No errors occurred + +End of status report