mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-08-10 12:12:15 +02:00
Merge pull request #30 from dos-ise/main
Fix: Redirect OTA update URLs to this fork (original repo archived)
This commit is contained in:
commit
674ee97ece
2 changed files with 5 additions and 5 deletions
|
|
@ -4623,7 +4623,7 @@ class Firmware {
|
|||
let overlay = ui.waitMessage(document.getElementById('divContainer'));
|
||||
try {
|
||||
let ret = {};
|
||||
ret.resp = await fetch(`https://api.github.com/repos/rstrouse/espsomfy-rts/releases/tags/${tag}`);
|
||||
ret.resp = await fetch(`https://api.github.com/repos/cjkas/espsomfy-rts/releases/tags/${tag}`);
|
||||
if (ret.resp.ok)
|
||||
ret.info = await ret.resp.json();
|
||||
return ret;
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ int16_t GitRepo::getReleases(uint8_t num) {
|
|||
uint8_t count = min((uint8_t)GIT_MAX_RELEASES, num);
|
||||
char url[128];
|
||||
memset(this->releases, 0x00, sizeof(GitRelease) * GIT_MAX_RELEASES);
|
||||
sprintf(url, "https://api.github.com/repos/rstrouse/espsomfy-rts/releases?per_page=%d&page=1", count);
|
||||
sprintf(url, "https://api.github.com/repos/cjkas/espsomfy-rts/releases?per_page=%d&page=1", count);
|
||||
GitRelease *main = &this->releases[GIT_MAX_RELEASES];
|
||||
main->releaseDate = Timestamp::now();
|
||||
main->id = 1;
|
||||
|
|
@ -310,7 +310,7 @@ int GitUpdater::checkInternet() {
|
|||
esp_task_wdt_reset();
|
||||
HTTPClient https;
|
||||
https.setReuse(false);
|
||||
if(https.begin(sclient, "https://github.com/rstrouse/ESPSomfy-RTS")) {
|
||||
if(https.begin(sclient, "https://github.com/cjkas/ESPSomfy-RTS")) {
|
||||
https.setFollowRedirects(HTTPC_FORCE_FOLLOW_REDIRECTS);
|
||||
https.setTimeout(3000);
|
||||
esp_task_wdt_reset();
|
||||
|
|
@ -374,8 +374,8 @@ void GitUpdater::setFirmwareFile() {
|
|||
|
||||
bool GitUpdater::beginUpdate(const char *version) {
|
||||
ESP_LOGI(TAG, "Begin update called...");
|
||||
if(strcmp(version, "Main") == 0) strcpy(this->baseUrl, "https://raw.githubusercontent.com/rstrouse/ESPSomfy-RTS/master/");
|
||||
else sprintf(this->baseUrl, "https://github.com/rstrouse/ESPSomfy-RTS/releases/download/%s/", version);
|
||||
if(strcmp(version, "Main") == 0) strcpy(this->baseUrl, "https://raw.githubusercontent.com/cjkas/ESPSomfy-RTS/master/");
|
||||
else sprintf(this->baseUrl, "https://github.com/cjkas/ESPSomfy-RTS/releases/download/%s/", version);
|
||||
|
||||
strcpy(this->targetRelease, version);
|
||||
this->emitUpdateCheck();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue