[auto-schedule-restore] Not restoring all recordings

Code:
if {![regexp -nocase {^[0-9a-f]+$} $f} {  
  binary scan $f H* f
  }
I don't understand what the code is doing and why.

It's trying to determine if the string is binary or hex. The next line converts to hex if required. Due to the way the class currently works, the aulEventToRecordInfo field can be held in either a binary or hex representation (this really needs fixing).
The bug here is that regexp considers a null byte to be the string terminator so for Revenge it's checking 0x45 which happens to be a valid hex character.

@G4DDS - can you run the diagnostic again to update the file and try again?

Here's the new version:

Code:
    if {$field in $::binaryfields && [string bytelength $f] > 1} {
-       if {![regexp -nocase {^[0-9a-f]+$} $f} {
+       if {[string length $f] != [string bytelength $f] ||
+        ![regexp -nocase {^[0-9a-f]+$} $f} {
         binary scan $f H* f
       }
 
Just updated via the diagnostics and run it again. I'm afraid its the same - the same 4 failed again with the "Error inserting event, unrecognized token..."

Apologies for the shortness... but I need to go to bed!
 
Due to the way the class currently works, the aulEventToRecordInfo field can be held in either a binary or hex representation (this really needs fixing).
I think the time has come. Trying to bodge it downstream is not the answer.
 
It's by design that it supports both hex and binary formats, just not a great one. I will change it.
 
Back
Top