diff --git a/apps/android/ChangeLog b/apps/android/ChangeLog index 63645faf4..7df2e162d 100644 --- a/apps/android/ChangeLog +++ b/apps/android/ChangeLog @@ -43,6 +43,6 @@ 0.40: Ensure we send health 'activity' message to gadgetbridge (added 2v26) 0.41: When using `actfetch`, fetch historical activity type too 0.42: Add handling for android STREAM_MUSIC volume level info, emitting on - arrival. (Needs Gadgetbridge nightly (either flavor) for now, or stable + arrival. (Needs Gadgetbridge nightly (either flavour) for now, or stable version 85 when it's out) - +0.43: Ensure listRecs doesn't list old-style recorded tracks (Otherwise Gadgetbridge fails parsing the filename) diff --git a/apps/android/lib.js b/apps/android/lib.js index 39dba448b..7ab7d4c25 100644 --- a/apps/android/lib.js +++ b/apps/android/lib.js @@ -232,8 +232,8 @@ exports.gbHandler = (event) => { }, //{t:"listRecs", id:"20230616a"} "listRecs": function() { - let recs = require("Storage").list(/^recorder\.log.*\.csv$/,{sf:true}).map(s => s.slice(12, 21)); - if (event.id.length > 2) { // Handle if there was no id supplied. Then we send a list all available recorder logs back. + let recs = require("Storage").list(/^recorder\.log.*\.csv$/,{sf:true}).map(s => s.slice(12, 21)).filter(s => s.length>7 /*ignore 'old' tracks without date*/); + if (event.id && event.id.length > 2) { // Handle if there was no id supplied. Then we send a list all available recorder logs back. let firstNonsyncedIdx = recs.findIndex((logId) => logId > event.id); if (-1 == firstNonsyncedIdx) { recs = [] diff --git a/apps/android/metadata.json b/apps/android/metadata.json index 32a46d531..7907e129d 100644 --- a/apps/android/metadata.json +++ b/apps/android/metadata.json @@ -2,7 +2,7 @@ "id": "android", "name": "Android Integration", "shortName": "Android", - "version": "0.42", + "version": "0.43", "description": "Display notifications/music/etc sent from the Gadgetbridge app on Android. This replaces the old 'Gadgetbridge' Bangle.js widget.", "icon": "app.png", "tags": "tool,system,messages,notifications,gadgetbridge",