Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ xSchedule/xSMSDaemon/xSMSDaemon.cbp.mak
xSchedule/xSMSDaemon/xSMSDaemon.cbp.mak.orig
xSchedule/xSchedule.cbp.mak
xSchedule/xSchedule.cbp.mak.orig
*.json
*.wsuo
2 changes: 1 addition & 1 deletion bin/xScheduleWeb/guestbuttons.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

// Pass is replaced by a valid value when the page is served - assuming you are allowing authenticated pages
var pass = "!PASS!";
url = 'ws://' + location.hostname + (location.port ? ':' + location.port : '');
url = (window.location.protocol === 'https:' ? 'wss://' : 'ws://') + location.hostname + (location.port ? ':' + location.port : '');
const socket = new ReconnectingWebSocket(url);

socket.addEventListener('message', function(event) {
Expand Down
2 changes: 1 addition & 1 deletion bin/xScheduleWeb/js/webSocket.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Create WebSocket connection.
url = 'ws://' + location.hostname + (location.port ? ':' + location.port : '');
url = (window.location.protocol === 'https:' ? 'wss://' : 'ws://') + location.hostname + (location.port ? ':' + location.port : '');
const socket = new ReconnectingWebSocket(url);
// Connection opened
socket.addEventListener('open', function(event) {
Expand Down
22 changes: 11 additions & 11 deletions xSchedule/ScheduleManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2801,7 +2801,7 @@ bool ScheduleManager::Query(const wxString& command, const wxString& parameters,
"\",\"id\":\"" + wxString::Format(wxT("%i"), it->GetId()).ToStdString() +
"\",\"nextscheduled\":\"" + it->GetNextScheduledTime() +
"\",\"length\":\"" + FormatTime(it->GetLengthMS()) +
"\",\"lengthms\":\"" + wxString::Format("{}", (long)it->GetLengthMS()) + "\"}";
"\",\"lengthms\":\"" + wxString::Format("%ld", (long)it->GetLengthMS()) + "\"}";
}
data += "],\"reference\":\"" + reference + "\"}";
} else if (c == "getplayingeffects") {
Expand Down Expand Up @@ -2850,7 +2850,7 @@ bool ScheduleManager::Query(const wxString& command, const wxString& parameters,
"\",\"everystep\":\"" + ((*it)->GetEveryStep() ? _("true") : _("false")) +
"\",\"offset\":\"" + (*it)->GetStartTime(p) +
"\",\"length\":\"" + FormatTime((*it)->GetLengthMS()) +
"\",\"lengthms\":\"" + wxString::Format("{}", (long)(*it)->GetLengthMS()) + "\"}";
"\",\"lengthms\":\"" + wxString::Format("%ld", (long)(*it)->GetLengthMS()) + "\"}";
}
data += "],\"reference\":\"" + reference + "\"}";
} else {
Expand Down Expand Up @@ -2896,8 +2896,8 @@ bool ScheduleManager::Query(const wxString& command, const wxString& parameters,
if (!first) {
data += ",";
}
data += "{\"startchannel\":\"" + wxString::Format("{}", (long)it->GetStartChannel()) +
"\",\"channels\":\"" + wxString::Format(wxT("{}"), (long)it->GetSize()) +
data += "{\"startchannel\":\"" + wxString::Format("%ld", (long)it->GetStartChannel()) +
"\",\"channels\":\"" + wxString::Format(wxT("%ld"), (long)it->GetSize()) +
"\"}";
first = false;
}
Expand All @@ -2914,7 +2914,7 @@ bool ScheduleManager::Query(const wxString& command, const wxString& parameters,
data += "{\"name\":\"" + (*it)->GetNameNoTime() +
"\",\"id\":\"" + wxString::Format(wxT("%i"), (*it)->GetId()).ToStdString() +
"\",\"length\":\"" + FormatTime((*it)->GetLengthMS()) +
"\",\"lengthms\":\"" + wxString::Format("{}", (long)((*it)->GetLengthMS())) + "\"}";
"\",\"lengthms\":\"" + wxString::Format("%ld", (long)((*it)->GetLengthMS())) + "\"}";
}
data += "],\"reference\":\"" + reference + "\"}";
} else if (c == "listwebfolders") {
Expand Down Expand Up @@ -3063,15 +3063,15 @@ bool ScheduleManager::Query(const wxString& command, const wxString& parameters,
"\",\"steplooping\":\"" + (p->IsStepLooping() || p->GetRunningStep()->GetLoopsLeft() > 0 ? "true" : "false") +
"\",\"steploopsleft\":\"" + wxString::Format(wxT("%i"), p->GetRunningStep()->GetLoopsLeft()).ToStdString() +
"\",\"length\":\"" + FormatTime(p->GetRunningStep()->GetLengthMS()) +
"\",\"lengthms\":\"" + wxString::Format("{}", (long)(p->GetRunningStep()->GetLengthMS())) +
"\",\"lengthms\":\"" + wxString::Format("%ld", (long)(p->GetRunningStep()->GetLengthMS())) +
"\",\"position\":\"" + FormatTime(p->GetRunningStep()->GetPosition()) +
"\",\"positionms\":\"" + wxString::Format("{}", (long)(p->GetRunningStep()->GetPosition())) +
"\",\"positionms\":\"" + wxString::Format("%ld", (long)(p->GetRunningStep()->GetPosition())) +
"\",\"left\":\"" + FormatTime(p->GetRunningStep()->GetLengthMS() - p->GetRunningStep()->GetPosition()) +
"\",\"leftms\":\"" + wxString::Format("{}", (long)(p->GetRunningStep()->GetLengthMS() - p->GetRunningStep()->GetPosition())) +
"\",\"leftms\":\"" + wxString::Format("%ld", (long)(p->GetRunningStep()->GetLengthMS() - p->GetRunningStep()->GetPosition())) +
"\",\"playlistposition\":\"" + FormatTime(p->GetPosition()) +
"\",\"playlistpositionms\":\"" + wxString::Format("{}", (long)(p->GetPosition())) +
"\",\"playlistpositionms\":\"" + wxString::Format("%ld", (long)(p->GetPosition())) +
"\",\"playlistleft\":\"" + FormatTime(p->GetLengthMS() - p->GetPosition()) +
"\",\"playlistleftms\":\"" + wxString::Format("{}", (long)(p->GetLengthMS() - p->GetPosition())) +
"\",\"playlistleftms\":\"" + wxString::Format("%ld", (long)(p->GetLengthMS() - p->GetPosition())) +
"\",\"trigger\":\"" + std::string(IsCurrentPlayListScheduled() ? "scheduled" : (_immediatePlay != nullptr) ? "manual"
: "queued") +
"\",\"schedulename\":\"" + std::string((IsCurrentPlayListScheduled() && rs != nullptr) ? rs->GetSchedule()->GetName() : "N/A") +
Expand Down Expand Up @@ -3141,7 +3141,7 @@ std::string ScheduleManager::GetPingStatus() {
res += "{\"controller\":\"" + it->GetIP() + " " + it->GetName() +
"\",\"ip\":\"" + it->GetIP() +
"\",\"result\":\"" + APinger::GetPingResultName(it->GetPingResult()) +
"\",\"failcount\":\"" + wxString::Format("{}", it->GetFailCount()) + "\"}";
"\",\"failcount\":\"" + wxString::Format("%i", it->GetFailCount()) + "\"}";
}
}

Expand Down
16 changes: 8 additions & 8 deletions xSchedule/xSchedule.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -75,29 +75,29 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>..\..\wxWidgets\include;..\..\wxWidgets\include\msvc;$(IncludePath);..\xlights\xLights\ffmpeg-dev\include;..\xlights\include;..\xlights\include\zlib;..\xlights\xLights;..\xlights\xLights\utils;..\xlights\xLights\ui;..\xlights\common;..\dependencies;..\dependencies\pugixml\src;..\dependencies\spdlog\include;..\xlights\dependencies</IncludePath>
<LibraryPath>..\..\wxWidgets\lib\vc_lib;..\xlights\lib\windows;..\xlights\xLights\ffmpeg-dev\lib;GL;$(LibraryPath);$(VCToolsInstallDir)lib\x86</LibraryPath>
<IncludePath>..\..\wxWidgets\include;..\..\wxWidgets\include\msvc;$(IncludePath);..\xlights\include\ffmpeg-6\include;..\xlights\include;..\xlights\include\zlib;..\xlights\xLights;..\xlights\xLights\utils;..\xlights\xLights\ui;..\xlights\common;..\dependencies;..\dependencies\pugixml\src;..\dependencies\spdlog\include;..\xlights\dependencies</IncludePath>
<LibraryPath>..\..\wxWidgets\lib\vc_lib;..\xlights\lib\windows;GL;$(LibraryPath);$(VCToolsInstallDir)lib\x86</LibraryPath>
<DefineConstants>
</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>..\..\wxWidgets\include;..\..\wxWidgets\include\msvc;$(IncludePath);../xlights/xLights/ffmpeg-dev/include;..\xlights\include;..\xlights\include\zlib;..\xlights\xLights;..\xlights\xLights\utils;..\xlights\xLights\ui;..\xlights\common;..\dependencies;..\dependencies\pugixml\src;..\dependencies\spdlog\include;..\xlights\dependencies</IncludePath>
<LibraryPath>$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(NETFXKitsDir)Lib\um\x64;..\..\wxWidgets\lib\vc_x64_lib;..\xlights\lib\windows64;..\xlights\xLights\ffmpeg-dev\lib;GL;$(VCToolsInstallDir)lib\x64</LibraryPath>
<IncludePath>..\..\wxWidgets\include;..\..\wxWidgets\include\msvc;$(IncludePath);..\xlights\include\ffmpeg-6\include;..\xlights\include;..\xlights\include\zlib;..\xlights\xLights;..\xlights\xLights\utils;..\xlights\xLights\ui;..\xlights\common;..\dependencies;..\dependencies\pugixml\src;..\dependencies\spdlog\include;..\xlights\dependencies</IncludePath>
<LibraryPath>$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(NETFXKitsDir)Lib\um\x64;..\..\wxWidgets\lib\vc_x64_lib;..\xlights\lib\windows64;GL;$(VCToolsInstallDir)lib\x64</LibraryPath>
<DefineConstants>
</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>..\..\wxWidgets\include;..\..\wxWidgets\include\msvc;$(IncludePath);..\xlights\xLights\ffmpeg-dev\include;..\xlights\include;..\xlights\include\zlib;..\xlights\xLights;..\xlights\xLights\utils;..\xlights\xLights\ui;..\xlights\common;..\dependencies;..\dependencies\pugixml\src;..\dependencies\spdlog\include;..\xlights\dependencies</IncludePath>
<LibraryPath>..\..\wxWidgets\lib\vc_lib;..\xlights\lib\windows;..\xlights\xLights\ffmpeg-dev\lib;GL;$(LibraryPath)</LibraryPath>
<IncludePath>..\..\wxWidgets\include;..\..\wxWidgets\include\msvc;$(IncludePath);..\xlights\include\ffmpeg-6\include;..\xlights\include;..\xlights\include\zlib;..\xlights\xLights;..\xlights\xLights\utils;..\xlights\xLights\ui;..\xlights\common;..\dependencies;..\dependencies\pugixml\src;..\dependencies\spdlog\include;..\xlights\dependencies</IncludePath>
<LibraryPath>..\..\wxWidgets\lib\vc_lib;..\xlights\lib\windows;GL;$(LibraryPath)</LibraryPath>
<DefineConstants>
</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>..\..\wxWidgets\include;..\..\wxWidgets\include\msvc;$(IncludePath);..\xlights\include;../xlights/xLights/ffmpeg-dev/include;..\xlights\include\zlib;..\xlights\xLights;..\xlights\xLights\utils;..\xlights\xLights\ui;..\xlights\common;..\dependencies;..\dependencies\pugixml\src;..\dependencies\spdlog\include;..\xlights\dependencies</IncludePath>
<LibraryPath>$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(NETFXKitsDir)Lib\um\x64;..\..\wxWidgets\lib\vc_x64_lib;..\xlights\lib\windows64;..\xlights\xLights\ffmpeg-dev\lib;</LibraryPath>
<IncludePath>..\..\wxWidgets\include;..\..\wxWidgets\include\msvc;$(IncludePath);..\xlights\include\ffmpeg-6\include;..\xlights\include;..\xlights\include\zlib;..\xlights\xLights;..\xlights\xLights\utils;..\xlights\xLights\ui;..\xlights\common;..\dependencies;..\dependencies\pugixml\src;..\dependencies\spdlog\include;..\xlights\dependencies</IncludePath>
<LibraryPath>$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(NETFXKitsDir)Lib\um\x64;..\..\wxWidgets\lib\vc_x64_lib;..\xlights\lib\windows64;</LibraryPath>
<DefineConstants>
</DefineConstants>
</PropertyGroup>
Expand Down
Loading