mirror of
https://github.com/esphome/esphome.git
synced 2025-01-14 00:23:18 +01:00
switch to main ESP32-audioI2S repo
This commit is contained in:
parent
52d4872cae
commit
f1f439eb8a
2 changed files with 10 additions and 2 deletions
|
@ -131,6 +131,6 @@ async def to_code(config):
|
|||
cg.add_library(
|
||||
name="ESP32-audioI2S",
|
||||
version=None,
|
||||
# Note: use a custom fork that removes the length limit on the host parameter in connecttohost()
|
||||
repository="https://github.com/shadow578/ESP32-audioI2S.git#remove_host_length_limit",
|
||||
# use close-to latest commit, since tagged versions are fairly irregular...
|
||||
repository="https://github.com/schreibfaul1/ESP32-audioI2S.git#1bc79e547ebb6f917bf82b47bec9b7e6a9b7e314",
|
||||
)
|
||||
|
|
|
@ -271,6 +271,14 @@ bool I2SAudioMediaPlayer::connecttouri_(const std::string uri) {
|
|||
// web stream?
|
||||
if (uri.find("http://", 0) == 0 || uri.find("https://", 0) == 0) {
|
||||
ESP_LOGD(TAG, "ConnectTo WebStream '%s'", uri.c_str());
|
||||
|
||||
if (uri.size() > 2048) {
|
||||
// ESP32-audioI2S limits the URI to 2048 characters
|
||||
// (since https://github.com/schreibfaul1/ESP32-audioI2S/commit/b1b89a9f64b73b0b171493bf55e6158f37a0bccd)
|
||||
ESP_LOGE(TAG, "WebStream URI too long");
|
||||
return false;
|
||||
}
|
||||
|
||||
return this->audio_->connecttohost(uri.c_str());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue