v0.4.297
This commit is contained in:
@@ -188,6 +188,11 @@ _\*this step can be skipped if you add WiFiSSID WiFiPassword pairs to the [yoRad
|
|||||||
|
|
||||||
---
|
---
|
||||||
## Version history
|
## Version history
|
||||||
|
#### v0.4.297
|
||||||
|
- fix _"Could not decode a text frame as UTF-8"_ websocket error
|
||||||
|
- fix display of non-latin characters in the web interface
|
||||||
|
- fix css in Chrome
|
||||||
|
|
||||||
#### v0.4.293
|
#### v0.4.293
|
||||||
- IR repeat fix
|
- IR repeat fix
|
||||||
|
|
||||||
|
|||||||
@@ -14,26 +14,38 @@ void audio_bitrate(const char *info)
|
|||||||
netserver.requestOnChange(BITRATE, 0);
|
netserver.requestOnChange(BITRATE, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool printable(const char *info) {
|
||||||
|
bool p = true;
|
||||||
|
for (int c = 0; c < strlen(info); c++)
|
||||||
|
{
|
||||||
|
if ((uint8_t)info[c] > 0x7e || (uint8_t)info[c] < 0x20) p = false;
|
||||||
|
}
|
||||||
|
if (!p) p = (uint8_t)info[0] >= 0xC2 && (uint8_t)info[1] >= 0x80 && (uint8_t)info[1] <= 0xBF;
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
|
||||||
void audio_showstation(const char *info) {
|
void audio_showstation(const char *info) {
|
||||||
if (strlen(info) > 0) {
|
if (strlen(info) > 0) {
|
||||||
display.title(info);
|
bool p = printable(info);
|
||||||
|
display.title(p?info:"*****");
|
||||||
if (player.requesToStart) {
|
if (player.requesToStart) {
|
||||||
telnet.info();
|
telnet.info();
|
||||||
player.requesToStart = false;
|
player.requesToStart = false;
|
||||||
} else {
|
} else {
|
||||||
telnet.printf("##CLI.ICY0#: %s\n", info);
|
telnet.printf("##CLI.ICY0#: %s\n", p?info:"*****");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void audio_showstreamtitle(const char *info) {
|
void audio_showstreamtitle(const char *info) {
|
||||||
if (strlen(info) > 0) {
|
if (strlen(info) > 0) {
|
||||||
display.title(info);
|
bool p = printable(info);
|
||||||
|
display.title(p?info:"*****");
|
||||||
if (player.requesToStart) {
|
if (player.requesToStart) {
|
||||||
telnet.info();
|
telnet.info();
|
||||||
player.requesToStart = false;
|
player.requesToStart = false;
|
||||||
} else {
|
} else {
|
||||||
telnet.printf("##CLI.META#: %s\n> ", info);
|
telnet.printf("##CLI.META#: %s\n> ", p?info:"*****");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,19 +18,11 @@ function onClose(event) {
|
|||||||
document.getElementById('playbutton').setAttribute("class", "stopped");
|
document.getElementById('playbutton').setAttribute("class", "stopped");
|
||||||
setTimeout(initWebSocket, 2000);
|
setTimeout(initWebSocket, 2000);
|
||||||
}
|
}
|
||||||
function cleanString(input) {
|
|
||||||
var output = "";
|
|
||||||
for (var i=0; i<input.length; i++) {
|
|
||||||
if (input.charCodeAt(i) <= 127 || input.charCodeAt(i) >= 160 && input.charCodeAt(i) <= 255) {
|
|
||||||
output += input.charAt(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return output;
|
|
||||||
}
|
|
||||||
function onMessage(event) {
|
function onMessage(event) {
|
||||||
var data = JSON.parse(event.data);
|
var data = JSON.parse(event.data);
|
||||||
if(data.nameset) document.getElementById('nameset').innerHTML = data.nameset;
|
if(data.nameset) document.getElementById('nameset').innerHTML = data.nameset;
|
||||||
if(data.meta) document.getElementById('meta').innerHTML = cleanString(data.meta);
|
if(data.meta) document.getElementById('meta').innerHTML = data.meta;
|
||||||
if(data.vol) {
|
if(data.vol) {
|
||||||
setVolRangeValue(document.getElementById('volrange'),data.vol);
|
setVolRangeValue(document.getElementById('volrange'),data.vol);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -408,9 +408,16 @@ a:hover { text-decoration: underline }
|
|||||||
-moz-appearance: none;
|
-moz-appearance: none;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
#volrange::-webkit-slider-thumb, .slider::-webkit-slider-thumb, #volrange::-moz-range-thumb, .slider::-moz-range-thumb {
|
#volrange::-webkit-slider-thumb, .slider::-webkit-slider-thumb {
|
||||||
width: 10px;
|
width: 10px;
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
|
height: 10px;
|
||||||
|
cursor: ew-resize;
|
||||||
|
background-color: transparent;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
#volrange::-moz-range-thumb, .slider::-moz-range-thumb {
|
||||||
|
width: 10px;
|
||||||
-moz-appearance: none;
|
-moz-appearance: none;
|
||||||
height: 10px;
|
height: 10px;
|
||||||
cursor: ew-resize;
|
cursor: ew-resize;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#ifndef options_h
|
#ifndef options_h
|
||||||
#define options_h
|
#define options_h
|
||||||
|
|
||||||
#define VERSION "0.4.293"
|
#define VERSION "0.4.297"
|
||||||
|
|
||||||
#if __has_include("myoptions.h")
|
#if __has_include("myoptions.h")
|
||||||
#include "myoptions.h" // <- write your variable values here
|
#include "myoptions.h" // <- write your variable values here
|
||||||
|
|||||||
Reference in New Issue
Block a user