Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/drive.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@
}

initSearch() {
const inputs = {

Check warning on line 262 in src/drive.js

View workflow job for this annotation

GitHub Actions / validate_and_build

'inputs' is assigned a value but never used

Check warning on line 262 in src/drive.js

View workflow job for this annotation

GitHub Actions / validate_and_build

'inputs' is assigned a value but never used
text: document.getElementById('driveSearchInput'),
clearText: document.getElementById('clearDriveSearchText'),
start: document.getElementById('driveDateStart'),
Expand Down Expand Up @@ -518,18 +518,16 @@
}

getFileMetadata(fileName) {
// Robust regex handles both legacy .json and the new .json.gz / .json.json.gz
const match = fileName.match(/-(\d+)-(\d+)(?:\.json|\.gz)+$/);
const match = fileName.match(/-(\d+)-(\d+)(?:\.jsonl|\.json|\.gz)+$/);
if (!match) return { date: 'Unknown', length: '?' };

const date = new Date(parseInt(match[1]));

// Restored backward compatibility: return standard ISO string
return { date: date.toISOString(), length: match[2] };
}

extractTimestamp(fileName) {
const match = fileName.match(/-(\d+)-(\d+)(?:\.json|\.gz)+$/);
const match = fileName.match(/-(\d+)-(\d+)(?:\.jsonl|\.json|\.gz)+$/);
return match ? parseInt(match[1]) : 0;
}

Expand Down
Loading