diff options
| -rwxr-xr-x | build_android.sh | 4 | ||||
| -rw-r--r-- | config.xml | 2 | ||||
| -rw-r--r-- | package.json | 6 | ||||
| -rw-r--r-- | www/js/DataModel.js | 6 | ||||
| -rw-r--r-- | www/js/MontageHistoryCtrl.js | 11 | ||||
| -rw-r--r-- | www/js/TimelineCtrl.js | 2 |
6 files changed, 16 insertions, 15 deletions
diff --git a/build_android.sh b/build_android.sh index 33686916..70d6b4df 100755 --- a/build_android.sh +++ b/build_android.sh @@ -76,6 +76,7 @@ build_release() { # parse arguments # credit: https://stackoverflow.com/a/14203146/1361529 +MODE="release" while [[ $# -gt 0 ]] do key="$1" @@ -101,6 +102,7 @@ APPVER=`cat config.xml | grep "widget " | sed 's/.* version=\"\([^\"]*\)\" xmlns ver_pre5=${APPVER//.} ver=${APPVER//.}9 + echo "About to build version: $APPVER ($MODE)" read -p "Press any key..." @@ -108,6 +110,7 @@ echo "Removing wkwebview, adding certificate fork..." cordova plugin remove cordova-plugin-ionic-webview > /dev/null 2>&1 cordova plugin add cordova-plugin-certificates-pp-fork > /dev/null 2>&1 + if [ "${MODE}" = "debug" ]; then build_debug else @@ -115,6 +118,7 @@ else fi + echo "Adding back wkwebview and removing certificate fork..." cordova plugin remove cordova-plugin-certificates-pp-fork > /dev/null 2>&1 cordova plugin add https://github.com/pliablepixels/cordova-plugin-ionic-webview.git > /dev/null 2>&1 @@ -163,10 +163,10 @@ <plugin name="cordova-plugin-advanced-websocket" spec="^1.1.3" /> <plugin name="cordova-plugin-network-information" spec="^2.0.1" /> <plugin name="cordova-plugin-x-socialsharing" spec="^5.4.1" /> - <plugin name="cordova-plugin-media-pp-fork" spec="^1.0.2-dev" /> <plugin name="cordova-plugin-ionic-webview" spec="https://github.com/pliablepixels/cordova-plugin-ionic-webview.git"> <variable name="ANDROID_SUPPORT_ANNOTATIONS_VERSION" value="27.+" /> </plugin> + <plugin name="cordova-plugin-media-pp-fork" spec="^1.0.2-dev" /> <engine name="android" spec="^6.4.0" /> <engine name="ios" spec="~4.5.5" /> </widget> diff --git a/package.json b/package.json index a893ea48..7d392d54 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "zmninjapro", "description": "Home security mobile app for ZoneMinder", - "version": "1.3.032", + "version": "1.3.033", "displayName": "zmNinja", "author": "Pliable Pixels", "license": "custom see LICENSE.md", @@ -50,10 +50,10 @@ }, "cordova-plugin-advanced-websocket": {}, "cordova-plugin-x-socialsharing": {}, - "cordova-plugin-media-pp-fork": {}, "cordova-plugin-ionic-webview": { "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+" - } + }, + "cordova-plugin-media-pp-fork": {} } }, "dependencies": { diff --git a/www/js/DataModel.js b/www/js/DataModel.js index d7bffdb1..704a4f05 100644 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -20,7 +20,7 @@ angular.module('zmApp.controllers') DO NOT TOUCH zmAppVersion It is changed by sync_version.sh */ - var zmAppVersion = "1.3.032"; + var zmAppVersion = "1.3.033"; var isBackground = false; var justResumed = false; var timeSinceResumed = -1; @@ -2708,7 +2708,7 @@ angular.module('zmApp.controllers') // new reminder // //https:///zm/api/events.json?&sort=StartTime&direction=desc&page=1 - getEvents: function (monitorId, pageId, loadingStr, startTime, endTime) { + getEvents: function (monitorId, pageId, loadingStr, startTime, endTime, noObjectFilter) { @@ -2746,7 +2746,7 @@ angular.module('zmApp.controllers') myurl = myurl + "/AlarmFrames >=:" + (loginData.enableAlarmCount ? loginData.minAlarmCount : 0); //https:///zm/api/events/index/Notes%20REGEXP: detected%3A.json - if (loginData.objectDetectionFilter) { + if (loginData.objectDetectionFilter && !noObjectFilter) { myurl = myurl + '/Notes REGEXP:detected:'; } diff --git a/www/js/MontageHistoryCtrl.js b/www/js/MontageHistoryCtrl.js index b9d031c0..c52022f6 100644 --- a/www/js/MontageHistoryCtrl.js +++ b/www/js/MontageHistoryCtrl.js @@ -39,12 +39,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc return moment(str).format('MMM Do, YYYY ' + NVRDataModel.getTimeFormat()); }; - function prettifyDate(str) { - if (NVRDataModel.getLogin().useLocalTimeZone) - return moment.tz(str, NVRDataModel.getTimeZoneNow()).tz(moment.tz.guess()).format('MMM Do'); - else - return moment(str).format('MMM Do'); - } + $scope.prettifyTime = function (str) { if (NVRDataModel.getLogin().useLocalTimeZone) return moment.tz(str, NVRDataModel.getTimeZoneNow()).tz(moment.tz.guess()).format('h:mm a'); @@ -273,11 +268,12 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc function getNextSetHistory() { // grab events that start on or after the time - apiurl = ld.apiurl + "/events/index/StartTime >=:" + TimeObjectFrom + "/AlarmFrames >=:" + (ld.enableAlarmCount ? ld.minAlarmCount : 0) + ".json"; + apiurl = ld.apiurl + "/events/index/StartTime >=:" + TimeObjectFrom + "/AlarmFrames >=:" + (ld.enableAlarmCount ? ld.minAlarmCount : 0) + ".json?sort=StartTime&direction=desc"; NVRDataModel.log("Grabbing history using: " + apiurl); // make sure there are no more than 5 active streams (noevent is ok) $scope.currentLimit = $scope.monLimit; //qHttp.get(apiurl) + console.log ("GETTING "+apiurl); $http({ method: 'get', url: apiurl @@ -285,6 +281,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc var data = succ.data; var ld = NVRDataModel.getLogin(); NVRDataModel.debug("Got " + data.events.length + "new history events..."); + console.log (JSON.stringify(data)); var eid, mid, stime; for (i = 0; i < data.events.length; i++) { mid = data.events[i].Event.MonitorId; diff --git a/www/js/TimelineCtrl.js b/www/js/TimelineCtrl.js index bfcb34da..1e1b557e 100644 --- a/www/js/TimelineCtrl.js +++ b/www/js/TimelineCtrl.js @@ -1123,7 +1123,7 @@ angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPla // I am waiting for the full data to load before I draw var promises = []; while ((pages <= epData.pageCount) && (iterCount > 0)) { - var promise = NVRDataModel.getEvents(0, pages, "none", fromDateNoLang, toDateNoLang); + var promise = NVRDataModel.getEvents(0, pages, "none", fromDateNoLang, toDateNoLang, true); promises.push(promise); pages++; |
