Skip to content

Commit

Permalink
v5.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Liver64 committed Jul 3, 2024
1 parent 588dd25 commit 3eda7ed
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 20 deletions.
1 change: 1 addition & 0 deletions cron/cron.hourly
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# Will be executed as user "loxberry".

/usr/bin/php REPLACELBPHTMLDIR/bin/battery.php
/usr/bin/php REPLACELBPHTMLDIR/bin/SW_Update.php

if [ -e /run/shm/s4lox_errorMP3Stream.json ]
then
Expand Down
2 changes: 1 addition & 1 deletion plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ NAME=Oliver Lewald
EMAIL=olewald64@gmail.com

[PLUGIN]
VERSION=5.6.0
VERSION=5.7.0

NAME=Sonos
FOLDER=sonos4lox
Expand Down
26 changes: 14 additions & 12 deletions templates/sonos.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ <h2 class="auto-style3" style="width: 100%">
<label id="lt2son"><TMPL_VAR T2S.LABEL_T2SON></label>
</td>
<td style="height: 60px; width: 20%;">
<table border=0 width="10%">
<table border=0 width="90%">
<td style="width: 5%">
<fieldset>
<select id="t2son" name="t2son" data-role="flipswitch" style="width: 5%">
Expand All @@ -119,6 +119,7 @@ <h2 class="auto-style3" style="width: 100%">
<script>
$('#t2son').val('<TMPL_VAR TTS.t2son>')
</script>

</td>
</table>
</td>
Expand Down Expand Up @@ -340,8 +341,6 @@ <h2 class="auto-style3" style="width: 100%">
</font>
</div>



<div class="ttsconfig azureinfo 9001">
<font size="-1" align="middle">
<a id="linkazureapi" href="/plugins/<TMPL_VAR PLUGINDIR>/voice_engines/bin/Azure_Account.pdf" target="_blank">
Expand Down Expand Up @@ -405,7 +404,7 @@ <h2 class="auto-style3" style="width: 100%">
<div data-role="collapsible">
<td style="height: 36px; width:25%; text-align: left;">
<fieldset style="width: 100%">
<select id="t2slang" name="t2slang" data-mini="true";"
<select id="t2slang" name="t2slang" data-mini="true";
data-validation-error-msg="<TMPL_VAR T2S.SELECT_LANGUAGE_DROPDOWN>"
data-validation-rule="^([A-Za-z0-9]){4,10}$">
</select>
Expand All @@ -416,7 +415,7 @@ <h2 class="auto-style3" style="width: 100%">
<div id="msg"></div>
<td style="height: 36px; width: 35%;" class="ttsconfig field-voice 4001 8001 9011" style="display:none">
<fieldset style="width: 100%">
<select class="voice_select" id="voice" name="voice" data-mini="true";"
<select class="voice_select" id="voice" name="voice" data-mini="true";
data-validation-error-msg="<TMPL_VAR T2S.SELECT_VOICE_DROPDOWN>"
data-validation-rule="^([A-Za-z0-9]){4,10}$">
</select>
Expand Down Expand Up @@ -1357,8 +1356,8 @@ <h2 class='ui-bar ui-bar-a ui-corner-all' id='head_donate'>
if (document.main_form.tts_elevenlabs.checked == true) {
var url = 'https://api.elevenlabs.io/v1/models';
$('#t2slang').empty();
//var key = document.getElementById('apikey').value;
var key = "77ba25e2758b20cb43867c8926ef30d0";
var key = document.getElementById('apikey').value;
//var key = "77ba25e2758b20cb43867c8926ef30d0";
const options = {method: 'GET', headers: {"xi-api-key": "" + key + ""}};
fetch(url, options)
.then(response => response.json())
Expand Down Expand Up @@ -1392,8 +1391,8 @@ <h2 class='ui-bar ui-bar-a ui-corner-all' id='head_donate'>
function populateElevenlabsVoices() {
console.log("populateElevenlabsVoices");
$('#voice').empty();
//var key = document.getElementById('apikey').value;
var key = "77ba25e2758b20cb43867c8926ef30d0";
var key = document.getElementById('apikey').value;
//var key = "77ba25e2758b20cb43867c8926ef30d0";
const options = {method: 'GET', headers: {"xi-api-key": "" + key + ""}};
var url = 'https://api.elevenlabs.io/v1/voices';
fetch(url, options)
Expand Down Expand Up @@ -1788,7 +1787,8 @@ <h2 class='ui-bar ui-bar-a ui-corner-all' id='head_donate'>
$('#voice').selectmenu('refresh');
//$("#t2slang").html(optionList).selectmenu('refresh', true);
//$("#voice").html(optionList).selectmenu('refresh', true);
}
}


// document ready
$(document).ready(function(e) {
Expand All @@ -1805,7 +1805,6 @@ <h2 class='ui-bar ui-bar-a ui-corner-all' id='head_donate'>
validateSB();
validateTVMon();
getsbconfig();


// validate Volume entries per player
var iteration = document.getElementById('countplayers').value;
Expand All @@ -1817,6 +1816,8 @@ <h2 class='ui-bar ui-bar-a ui-corner-all' id='head_donate'>
validate_enable('#maxvol' + i + '');
validate_chk_object(['#t2svol' + i + '', '#sonosvol' + i + '', '#maxvol' + i + '']);
}


// Function to control saving, main_form is submitted
$("form#main_form").submit(function(e) {
console.log("submit");
Expand Down Expand Up @@ -1912,7 +1913,7 @@ <h2 class='ui-bar ui-bar-a ui-corner-all' id='head_donate'>
}
} else if (document.getElementById('tts_elevenlabs').checked == true) {
console.log("Elevenlabs checked");
if (apidata.length != 32) {
if (apidata.length != 32 && apidata.length != 51) {
dialog('<TMPL_VAR ERRORS.ERR_APIKEY32>', 'OK', 'error', 'ElevenLabs');
return false;
e.preventDefault();
Expand Down Expand Up @@ -2049,6 +2050,7 @@ <h2 class='ui-bar ui-bar-a ui-corner-all' id='head_donate'>
e.preventDefault();
}


// validate UDP Port entered if UDP selected
console.log("validate UDP");
var cat = document.getElementById('sendlox').value;
Expand Down
2 changes: 1 addition & 1 deletion webfrontend/html/Play_T2S.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ function play_tts($filename) {
exit;
}
}
print_r($config['SYSTEM']['cifsinterface']."/".$filename.".mp3");
#print_r($config['SYSTEM']['cifsinterface']."/".$filename.".mp3");
$sonos->AddToQueue($config['SYSTEM']['cifsinterface']."/".$filename.".mp3");
LOGGING("play_t2s.php: T2S '".trim($filename).".mp3' has been added to Queue", 7);
} else {
Expand Down
1 change: 1 addition & 0 deletions webfrontend/html/Restore_T2S.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ function restoreSingleZone() {
} else {
#$prevStatus = "master";
$oldGroup = $actual[$master]['Grouping'];
array_shift($oldGroup);
foreach ($oldGroup as $newMaster) {
// loop threw former Members in order to get the New Coordinator
$sonos = new SonosAccess($sonoszone[$newMaster][0]);
Expand Down
1 change: 1 addition & 0 deletions webfrontend/html/bin/tv_monitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ function restoreSingleZone($sonoszone, $master) {
} else {
#$prevStatus = "master";
$oldGroup = $actual[$master]['Grouping'];
array_shift($oldGroup);
foreach ($oldGroup as $newMaster) {
// loop threw former Members in order to get the New Coordinator
try {
Expand Down
6 changes: 6 additions & 0 deletions webfrontend/html/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -435,3 +435,9 @@
[IMPORVEMENT] Design Anpassungen
5.6.0 [BUGFIX] Clip&Doorbell Funktion gefixt
[BUGFIX] Port Error nach Installation behoben
5.7.0 [BUGFIX] Doorbell Funktion gefixt
[BUGFIX] Für T2S (cifs) wird nun die IP Adresse genutzt
[BUGFIX] Cronjob für Firmware Update hinzugefügt
[BUGFIX] Fixed T2S wenn Player war master einer Gruppe
[BUGFIX] API-key für ElevenLabs gefixt

6 changes: 3 additions & 3 deletions webfrontend/html/release/release.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
# the donwload link here

# Version of the new release
VERSION=5.6.0
VERSION=5.7.0

# Download URL of the ZIP Archive
ARCHIVEURL=https://github.com/Liver64/LoxBerry-Sonos/archive/v5.6.0.zip
ARCHIVEURL=https://github.com/Liver64/LoxBerry-Sonos/archive/v5.7.0.zip

# URL for further information about this release
INFOURL=https://github.com/Liver64/LoxBerry-Sonos/releases/tag/v5.6.0
INFOURL=https://github.com/Liver64/LoxBerry-Sonos/releases/tag/v5.7.0
10 changes: 7 additions & 3 deletions webfrontend/htmlauth/index.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,14 @@ if (!defined $cfg->{TTS}->{secretkeys}) {
if (!defined $cfg->{VARIOUS}->{follow_host}) {
$cfg->{VARIOUS}->{follow_host} = "false";
}
# Leave follow host
# Leave/follow host
if (!defined $cfg->{VARIOUS}->{follow_wait}) {
$cfg->{VARIOUS}->{follow_wait} = "false";
}
# host or ip for cifs
if (!defined $cfg->{TTS}->{hostip}) {
$cfg->{TTS}->{hostip} = "host";
}
#$jsonobj->write();


Expand Down Expand Up @@ -863,9 +867,9 @@ sub save
$cfg->{SYSTEM}->{mp3path} = "$R::STORAGEPATH/$ttsfolder/$mp3folder";
$cfg->{SYSTEM}->{ttspath} = "$R::STORAGEPATH/$ttsfolder";
$cfg->{SYSTEM}->{path} = "$R::STORAGEPATH";
$cfg->{SYSTEM}->{httpinterface} = "http://$lbip:$lbport/plugins/$lbpplugindir/interfacedownload";
$cfg->{SYSTEM}->{httpinterface} = "http://$host:$lbport/plugins/$lbpplugindir/interfacedownload";
$cfg->{SYSTEM}->{smbinterface} = "smb://$lbip:$lbport/plugindata/$lbpplugindir/interfacedownload";
$cfg->{SYSTEM}->{cifsinterface} = "x-file-cifs://$host/plugindata/$lbpplugindir/interfacedownload";
$cfg->{SYSTEM}->{cifsinterface} = "x-file-cifs://$lbip/plugindata/$lbpplugindir/interfacedownload";

LOGINF "Start writing settings to configuration file";

Expand Down

0 comments on commit 3eda7ed

Please # to comment.