diff --git a/logic/tracks.js b/logic/tracks.js index 1219e53..43a4b88 100644 --- a/logic/tracks.js +++ b/logic/tracks.js @@ -73,6 +73,13 @@ function detectFormat(body) { return 1; } + // If we immediately start with data (a date, formatted as DD.MM.YYYY), then + // we have an old OBS not sending the header. It must therefore be old + // format, too. + if (/^[0-9]{2}\.[0-9]{2}\.[0-9]{4};/.test(firstLine)) { + return 1; + } + return 'invalid'; }