1
1
// created: 10.Feb.2022
2
- // updated: 10 .Jun 2024
2
+ // updated: 11 .Jun 2024
3
3
4
4
#pragma once
5
5
#pragma GCC optimize("Os") // optimize for code size
21
21
#define SDMMC_FREQUENCY 80000000 // 80000000 or 40000000 MHz
22
22
#define FTP_USERNAME " esp32" // user and pw in FTP Client
23
23
#define FTP_PASSWORD " esp32"
24
- #define CONN_TIMEOUT 1000 // unencrypted connection timeout in ms (http://...)
24
+ #define CONN_TIMEOUT 1000 // unencrypted connection timeout in ms (http://...)
25
25
#define CONN_TIMEOUT_SSL 2500 // encrypted connection timeout in ms (https://...)
26
26
27
27
// ————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
28
28
29
29
#include < Arduino.h>
30
- #include < ArduinoOTA.h>
30
+ // #include <ArduinoOTA.h>
31
31
#include < Preferences.h>
32
32
#include < Ticker.h>
33
33
#include < SPI.h>
@@ -1772,7 +1772,10 @@ class dlnaList{
1772
1772
bool maybe_a_folder = false ;
1773
1773
m_clicked = false ; // ignore tp released event, wait of next clicked
1774
1774
m_itemListPos = (y / (m_h / 10 ));
1775
- if (m_itemListPos < 2 || m_itemListPos > 11 ) goto exit; // oor, is header, footer or return item
1775
+ if (m_itemListPos == 0 ) goto exit; // is header
1776
+ if (m_itemListPos == 1 ) {log_i (" long pressed at return item %s" , m_dlnaHistory[*m_dlnaLevel].name ); goto exit;}
1777
+ if (m_itemListPos >= 11 ) goto exit; // is footer
1778
+
1776
1779
m_itemListPos -= 2 ;
1777
1780
1778
1781
if (*m_dlnaLevel == 0 ){
@@ -1789,7 +1792,7 @@ class dlnaList{
1789
1792
}
1790
1793
1791
1794
if (maybe_a_file){
1792
- if (startsWith (m_srvContent.itemURL [m_itemListPos - 1 ], " http" )){
1795
+ if (startsWith (m_srvContent.itemURL [m_itemListPos], " http" )){
1793
1796
log_i (" long pressed at file %s" , m_srvContent.itemURL [m_itemListPos]);
1794
1797
goto exit;
1795
1798
}
0 commit comments