1
0
mirror of https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks.git synced 2025-09-03 05:02:40 +02:00

Full master fixes also into beta (#1639)

* Fixed the timezone: Europe/Amsterdam

* Fix 'rtsp-h264' still set as an autostart entry when 'rtsp' is now the (#1636)

service to use

In 1e2f96612f the services 'rtsp-h264' and
'rtsp-mjpeg' were combined into a single 'rtsp' service, however an
entry for 'rtsp-h264' still remained in the autostart folder. This is a
problem for the user because this entry does not appear in the Web UI
which means it cannot be easily removed, and also appears as if an RTSP
server is not running when it is.

* Added button to the live page that downloads a JPEG screenshot (#1638)

* Fixed a missing line break and spelling mistake

* Added button to the live page that downloads a JPEG screenshot

Co-authored-by: OhMyGuus <info@guus.ninja>
Co-authored-by: Ben Russell <ben@benru.co.uk>
This commit is contained in:
jmtatsch
2020-12-08 15:05:52 +01:00
committed by GitHub
parent f299b6cefd
commit 1c92630953
7 changed files with 18 additions and 4 deletions

View File

@@ -0,0 +1,8 @@
#!/bin/sh
FILE_NAME="$(date +%Y-%m-%d-%H-%M-%S)"
echo "Content-type: image/jpeg"
echo "Content-Disposition: attachment; filename=\"$FILE_NAME.jpeg\""
echo ""
exec /system/sdcard/bin/getimage

View File

@@ -109,7 +109,7 @@ if [ -n "$F_cmd" ]; then
if [ -n "${F_videoPort+x}" ]; then
videoport=$(echo "${F_videoPort}"| tr '\n')
rewrite_config /system/sdcard/config/rtspserver.conf PORT "$videoport"
echo "Set video port tp ${videoport}"
echo "Set video port tp ${videoport}<br />"
fi
if [ -n "${F_autoNightMode+x}" ]; then
rewrite_config /system/sdcard/config/autonight.conf autonight_mode $F_autoNightMode

View File

@@ -57,7 +57,7 @@ function showupdatepage(result) {
var update_status = parseInt(update[1],10);
if (update_status == 0) {
$('#updatemsg').html("You have already the lastest version from the " + update[0] + " branch")
$('#updatemsg').html("You have already the latest version from the " + update[0] + " branch")
if (update[0] == "master") {
$('#updatemsg').append('<button class="accordion" type="button" onclick="accordionUpdate(this);">Other Update Options</button> \
<div class="panel"> <p></p>\

View File

@@ -13,6 +13,11 @@ function refreshLiveImage() {
$("#liveview").attr("src", "/cgi-bin/currentpic.cgi?" + ts);
}
//Function to download a screenshot
function downloadScreenshot() {
var ts = new Date().getTime();
window.location.href = "/cgi-bin/downloadpic.cgi?" + ts;
}
//Function to refresh side bar buttons
function refreshSideBar() {

View File

@@ -293,7 +293,7 @@
"Australia/Melbourne":"EST-10EST,M10.1.0,M4.1.0/3",
"Australia/Perth":"WST-8",
"Australia/Sydney":"EST-10EST,M10.1.0,M4.1.0/3",
"Europe/Amsterdam":"CET-1CEST,M3.5.0,M10.5.0/3",
"Europe/Amsterdam":"CET-1CEST-2,M3.5.0,M10.5.0/3",
"Europe/Andorra":"CET-1CEST,M3.5.0,M10.5.0/3",
"Europe/Athens":"EET-2EEST,M3.5.0/3,M10.5.0/4",
"Europe/Belgrade":"CET-1CEST,M3.5.0,M10.5.0/3",

View File

@@ -295,7 +295,7 @@ Australia/Lord_Howe LHST-10:30LHST-11,M10.1.0,M4.1.0
Australia/Melbourne EST-10EST,M10.1.0,M4.1.0/3
Australia/Perth WST-8
Australia/Sydney EST-10EST,M10.1.0,M4.1.0/3
Europe/Amsterdam CET-1CEST,M3.5.0,M10.5.0/3
Europe/Amsterdam CET-1CEST-2,M3.5.0,M10.5.0/3
Europe/Andorra CET-1CEST,M3.5.0,M10.5.0/3
Europe/Athens EET-2EEST,M3.5.0/3,M10.5.0/4
Europe/Belgrade CET-1CEST,M3.5.0,M10.5.0/3
1 Africa/Abidjan GMT0
295 Australia/Melbourne EST-10EST,M10.1.0,M4.1.0/3
296 Australia/Perth WST-8
297 Australia/Sydney EST-10EST,M10.1.0,M4.1.0/3
298 Europe/Amsterdam CET-1CEST,M3.5.0,M10.5.0/3 CET-1CEST-2,M3.5.0,M10.5.0/3
299 Europe/Andorra CET-1CEST,M3.5.0,M10.5.0/3
300 Europe/Athens EET-2EEST,M3.5.0/3,M10.5.0/4
301 Europe/Belgrade CET-1CEST,M3.5.0,M10.5.0/3

View File

@@ -24,6 +24,7 @@
</div>
<div id="cam-control" class="w3-display-bottomright w3-container w3-hide">
<button id="btn-record" class="w3-button w3-circle w3-black" onclick="record('on')" title="Record On/Off"><span><i class="fas fa-video"></i></span></button>
<button id="btn-screenshot" class="w3-button w3-circle w3-black" onclick="downloadScreenshot()" title="Download Screenshot"><span><i class="fas fa-image"></i></span></button>
<button id="btn-ptz" class="w3-button w3-circle w3-black" onclick="PTZControl('show')" title="PTZ Control"> <i class="fa fa-arrows-alt"></i></button>
<button id="btn-settings" class="w3-button w3-circle w3-black" onclick="w3_open()" title="Camera settings"> <i class="fa fa-cog"></i></button>
<p></p>