Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a9da5a3b8e | ||
|
|
ab69fd1aa4 | ||
|
|
907c97464b | ||
|
|
19c31ebf1b | ||
|
|
97adc46509 | ||
|
|
ec360cf303 | ||
|
|
3c1a323b35 | ||
|
|
e34323c2da | ||
|
|
dc5f6484b2 | ||
|
|
305e1362a6 | ||
|
|
e9773c1353 | ||
|
|
5bd1a2737d | ||
|
|
e3aafd3290 | ||
|
|
b6612c4544 | ||
|
|
df296d7172 |
2
.env
2
.env
@@ -1,4 +1,4 @@
|
|||||||
GITEA_TOKEN=7921aa22187b39125d29399d26f527ba26a2fb5b
|
GITEA_TOKEN=efeed2af00597883adb04da70bd6a7c2993ae92d
|
||||||
GEMINI_API_KEY=AIzaSyDWOgyAJqscuPU6iSpS6gxupWBm4soNw5o
|
GEMINI_API_KEY=AIzaSyDWOgyAJqscuPU6iSpS6gxupWBm4soNw5o
|
||||||
TELEGRAM_BOT_TOKEN=8593525164:AAGCX9B_RJGN35_F7tSB72rEZhS_4Zpcszs
|
TELEGRAM_BOT_TOKEN=8593525164:AAGCX9B_RJGN35_F7tSB72rEZhS_4Zpcszs
|
||||||
TELEGRAM_CHAT_ID=692714536
|
TELEGRAM_CHAT_ID=692714536
|
||||||
|
|||||||
26
CHANGELOG-v10.1.3.md
Normal file
26
CHANGELOG-v10.1.3.md
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
# StreamPlayer v10.1.3
|
||||||
|
|
||||||
|
## Cambios en esta versión
|
||||||
|
|
||||||
|
### Corrección de Carga de Eventos
|
||||||
|
|
||||||
|
- **Sistema de fallback con múltiples URLs**: Implementado sistema inteligente que intenta múltiples URLs de eventos cuando la principal no está disponible:
|
||||||
|
- `https://streamtpcloud.com/eventos.json` (URL original)
|
||||||
|
- `https://streamtp10.com/eventos.json` (URL actual)
|
||||||
|
- `https://streamtpmedia.com/eventos.json` (URL anterior)
|
||||||
|
|
||||||
|
- **Seguimiento automático de redirecciones HTTP**: El cliente ahora sigue automáticamente las redirecciones HTTP (códigos 301, 302, 303, 307, 308), lo que permite adaptarse a cambios de URL del servidor sin necesidad de actualizar la app.
|
||||||
|
|
||||||
|
- **Memoria de URL exitosa**: La app recuerda cuál fue la última URL que funcionó correctamente y la intenta primero en futuras peticiones, mejorando el rendimiento y la fiabilidad.
|
||||||
|
|
||||||
|
### Detalles Técnicos
|
||||||
|
|
||||||
|
- Modificado `EventRepository.java` para implementar:
|
||||||
|
- Lógica de reintento secuencial con múltiples URLs
|
||||||
|
- Seguimiento manual de redirecciones (hasta 5 consecutivas)
|
||||||
|
- Persistencia de la última URL exitosa en SharedPreferences
|
||||||
|
- Manejo mejorado de errores con mensajes descriptivos
|
||||||
|
|
||||||
|
### Problema Resuelto
|
||||||
|
|
||||||
|
Esta versión corrige el error: *"Unable to resolve host 'streamtpcloud.com': No address associated with hostname"* que ocurría cuando el servidor de eventos cambió su dominio. La app ahora se adapta automáticamente a estos cambios sin intervención del usuario.
|
||||||
60
CHANGELOG-v10.1.4.md
Normal file
60
CHANGELOG-v10.1.4.md
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
# StreamPlayer v10.1.4 - Mejoras de Interfaz
|
||||||
|
|
||||||
|
## Correcciones Implementadas
|
||||||
|
|
||||||
|
### 1. Botón de Actualización Más Visible
|
||||||
|
- **Archivo**: `app/src/main/res/drawable/btn_refresh_selector.xml` (nuevo)
|
||||||
|
- **Descripción**: El botón de actualizar eventos ahora cambia a un color ámbar brillante (#FFC107) con borde grueso cuando está enfocado, mejorando significativamente la visibilidad para control remoto.
|
||||||
|
|
||||||
|
### 2. Prevención de Navegación Entre Secciones
|
||||||
|
- **Archivo**: `app/src/main/java/com/streamplayer/MainActivity.java`
|
||||||
|
- **Descripción**: Al hacer scroll después del último evento, la aplicación se detiene en lugar de pasar a la sección de canales, mejorando la experiencia de usuario.
|
||||||
|
|
||||||
|
### 3. Barra de Indicador de Scroll
|
||||||
|
- **Archivos**: `app/src/main/res/layout/activity_main.xml`, `app/src/main/res/drawable/scrollbar_vertical.xml` (nuevo)
|
||||||
|
- **Descripción**: Agregada barra de scroll visual a la derecha de la lista de contenido como indicador de posición (no navegable).
|
||||||
|
|
||||||
|
## Cambios Técnicos
|
||||||
|
|
||||||
|
### Nuevo Archivo: btn_refresh_selector.xml
|
||||||
|
```xml
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:state_focused="true">
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="#FFC107" />
|
||||||
|
<corners android:radius="8dp" />
|
||||||
|
<stroke android:width="4dp" android:color="#FFD54F" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<!-- ... otros estados ... -->
|
||||||
|
</selector>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Modificación: MainActivity.java
|
||||||
|
- Agregado `RecyclerView.OnScrollListener` en `showEvents()` para prevenir scroll más allá del último evento
|
||||||
|
|
||||||
|
### Modificación: activity_main.xml
|
||||||
|
- Botón refresh usa `@drawable/btn_refresh_selector`
|
||||||
|
- RecyclerView ahora tiene `android:scrollbars="vertical"` y `scrollbarThumbVertical`
|
||||||
|
|
||||||
|
### Nuevos Colores: colors.xml
|
||||||
|
- `refresh_button_default`: #2A2A2A
|
||||||
|
- `refresh_button_focused`: #FFC107
|
||||||
|
- `refresh_button_focused_border`: #FFD54F
|
||||||
|
- `refresh_button_pressed`: #FF9800
|
||||||
|
|
||||||
|
## Compatibilidad
|
||||||
|
- Versión mínima de Android: API 21+
|
||||||
|
- Compilado con SDK 34
|
||||||
|
- Probado en Android TV con control remoto
|
||||||
|
|
||||||
|
## Instalación
|
||||||
|
1. Descargar `StreamPlayer-10.1.4-debug.apk`
|
||||||
|
2. Habilitar "Fuentes desconocidas" en configuraciones de seguridad
|
||||||
|
3. Instalar el APK
|
||||||
|
4. Disfrutar las mejoras de interfaz
|
||||||
|
|
||||||
|
## Notas de Desarrollo
|
||||||
|
- La barra de scroll es puramente visual (indicador)
|
||||||
|
- El foco del botón refresh ahora usa color ámbar de alto contraste
|
||||||
|
- El scroll se detiene correctamente al final de la lista de eventos
|
||||||
48
CHANGELOG-v10.1.5.md
Normal file
48
CHANGELOG-v10.1.5.md
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
# StreamPlayer v10.1.5 - Correcciones Críticas
|
||||||
|
|
||||||
|
## Correcciones Implementadas
|
||||||
|
|
||||||
|
### 1. Scroll Listener Corregido
|
||||||
|
- **Problema**: El último evento aparecía solo a la mitad y requería bajar/subir muchas veces para verlo completo
|
||||||
|
- **Solución**: Cambiado de `findFirstVisibleItemPosition()` a `findLastCompletelyVisibleItemPosition()`
|
||||||
|
- Ahora el scroll solo se detiene cuando el último elemento está COMPLETAMENTE visible
|
||||||
|
|
||||||
|
### 2. Barra de Scroll Más Visible
|
||||||
|
- **Problema**: La barra indicadora no era visible (30% de opacidad)
|
||||||
|
- **Solución**:
|
||||||
|
- Opacidad aumentada de #4DFFFFFF (30%) a #CCFFFFFF (80%)
|
||||||
|
- Ancho de la barra aumentado a 8dp
|
||||||
|
- Radio de esquinas aumentado a 4dp para mejor apariencia
|
||||||
|
- Estilo cambiado de `outsideOverlay` a `insideInset`
|
||||||
|
- Agregado `scrollbarFadeDuration="0"` para que nunca se desvanezca
|
||||||
|
|
||||||
|
### 3. URLs Actualizadas
|
||||||
|
- **Problema**: Ciertos ISP bloquean las URLs viejas
|
||||||
|
- **Solución**: Eliminado sistema de fallback múltiples URLs
|
||||||
|
- Ahora usa únicamente: `https://streamtp10.com/eventos.json`
|
||||||
|
- Código simplificado, más eficiente y sin bloqueos
|
||||||
|
|
||||||
|
## Archivos Modificados
|
||||||
|
|
||||||
|
### EventRepository.java
|
||||||
|
- Simplificado para usar solo streamtp10.com
|
||||||
|
- Eliminado código de fallback no necesario
|
||||||
|
- Eliminado KEY_WORKING_URL y lógica asociada
|
||||||
|
|
||||||
|
### MainActivity.java
|
||||||
|
- Scroll listener corregido para usar `findLastCompletelyVisibleItemPosition()`
|
||||||
|
|
||||||
|
### scrollbar_vertical.xml
|
||||||
|
- Color cambiado a #CCFFFFFF (80% opacidad)
|
||||||
|
- Ancho definido en 8dp
|
||||||
|
- Radio de esquinas a 4dp
|
||||||
|
|
||||||
|
### activity_main.xml
|
||||||
|
- `scrollbarStyle` cambiado a `insideInset`
|
||||||
|
- `scrollbarSize` definido en 8dp
|
||||||
|
- `scrollbarFadeDuration` en 0 (siempre visible)
|
||||||
|
|
||||||
|
## Compatibilidad
|
||||||
|
- Versión mínima de Android: API 21+
|
||||||
|
- Compilado con SDK 34
|
||||||
|
- Probado en Android TV con control remoto
|
||||||
42
CHANGELOG-v10.1.6.md
Normal file
42
CHANGELOG-v10.1.6.md
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
# StreamPlayer v10.1.6 - Corrección de Control Remoto y Scrollbar
|
||||||
|
|
||||||
|
## Correcciones Implementadas
|
||||||
|
|
||||||
|
### 1. Control Remoto - Prevención de Navegación
|
||||||
|
- **Problema**: Al presionar el botón abajo del control remoto en el último evento, se iba a la sección de canales
|
||||||
|
- **Solución**: Agregado `setOnKeyListener` para interceptar teclas de navegación
|
||||||
|
- Ahora intercepta `KEYCODE_DPAD_DOWN` cuando está en el último elemento
|
||||||
|
- Combina scroll listener táctil + manejo de teclas del control remoto
|
||||||
|
|
||||||
|
### 2. Barra de Scroll Más Visible
|
||||||
|
- **Problema**: La barra de seguimiento no era visible
|
||||||
|
- **Solución**:
|
||||||
|
- Color del thumb: Blanco sólido (#FFFFFFFF) - antes 80%
|
||||||
|
- Ancho aumentado a 12dp (antes 8dp)
|
||||||
|
- Radio de esquinas: 6dp (antes 4dp)
|
||||||
|
- Track oscuro agregado (#1A1A1A)
|
||||||
|
- `scrollbarAlwaysDrawVerticalTrack="true"` para siempre visible
|
||||||
|
|
||||||
|
## Archivos Modificados
|
||||||
|
|
||||||
|
### MainActivity.java
|
||||||
|
- Import agregado: `android.view.KeyEvent`
|
||||||
|
- `setOnKeyListener` agregado en `showEvents()` para interceptar DPAD_DOWN
|
||||||
|
- Combina con scroll listener existente para cobertura completa
|
||||||
|
|
||||||
|
### scrollbar_vertical.xml
|
||||||
|
- Color cambiado a blanco sólido (#FFFFFFFF)
|
||||||
|
- Ancho: 12dp
|
||||||
|
- Radio: 6dp
|
||||||
|
|
||||||
|
### activity_main.xml
|
||||||
|
- `scrollbarSize="12dp"` (antes 8dp)
|
||||||
|
- `scrollbarTrackVertical="@color/scrollbar_track"` agregado
|
||||||
|
- `scrollbarAlwaysDrawVerticalTrack="true"` agregado
|
||||||
|
|
||||||
|
### colors.xml
|
||||||
|
- Nuevo color: `scrollbar_track` (#1A1A1A)
|
||||||
|
|
||||||
|
## Compatibilidad
|
||||||
|
- Android TV con control remoto
|
||||||
|
- Versión mínima: API 21+
|
||||||
22
CHANGELOG-v10.1.7.md
Normal file
22
CHANGELOG-v10.1.7.md
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# StreamPlayer v10.1.7 - Corrección de Navegación y Scrollbar Permanente
|
||||||
|
|
||||||
|
## Correcciones Implementadas
|
||||||
|
|
||||||
|
### 1. Barra de Desplazamiento Permanente
|
||||||
|
- **Feature**: Se agregó `android:fadeScrollbars="false"` al `RecyclerView` de eventos.
|
||||||
|
- **Beneficio**: La barra de desplazamiento ahora es visible permanentemente, permitiendo al usuario saber su posición (inicio, medio, final) en todo momento sin tener que interactuar primero.
|
||||||
|
|
||||||
|
### 2. Navegación al Final de la Lista (Bug Fix)
|
||||||
|
- **Problema**: Al presionar "abajo" en el último evento, el foco saltaba involuntariamente a la sección de canales.
|
||||||
|
- **Solución**: Se implementó un `LinearLayoutManager` personalizado que intercepta la búsqueda de foco (`onInterceptFocusSearch`).
|
||||||
|
- **Detalle**: Cuando se detecta `FOCUS_DOWN` en el último elemento de la lista, la acción se bloquea, manteniendo al usuario en la lista de eventos.
|
||||||
|
- **Limpieza**: Se eliminaron los `OnKeyListener` y `OnScrollListener` anteriores que eran menos efectivos.
|
||||||
|
|
||||||
|
## Archivos Modificados
|
||||||
|
|
||||||
|
### MainActivity.java
|
||||||
|
- Implementación de `LinearLayoutManager` anónimo con `onInterceptFocusSearch`.
|
||||||
|
- Eliminación de listeners redundantes.
|
||||||
|
|
||||||
|
### activity_main.xml
|
||||||
|
- `android:fadeScrollbars="false"` añadido a `content_list`.
|
||||||
21
CHANGELOG-v10.1.8.md
Normal file
21
CHANGELOG-v10.1.8.md
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# StreamPlayer v10.1.8 - Actualización de DNS y Dominios
|
||||||
|
|
||||||
|
## Cambios Críticos
|
||||||
|
|
||||||
|
### 1. Actualización de Dominios
|
||||||
|
- Se ha migrado toda la infraestructura de canales y eventos al nuevo dominio: `streamtp10.com`.
|
||||||
|
- Actualización de URLs base para todos los canales en `ChannelRepository`.
|
||||||
|
- Actualización del endpoint de eventos a `https://streamtp10.com/eventos.json`.
|
||||||
|
- Corrección del Header `Referer` en las peticiones de resolución.
|
||||||
|
|
||||||
|
### 2. Configuración Robusta de DNS (Anti-Bloqueo)
|
||||||
|
- Implementación de un nuevo sistema centralizado de red (`NetworkUtils`).
|
||||||
|
- **DNS Primario**: Google DNS over HTTPS (`8.8.8.8`, `8.8.4.4`).
|
||||||
|
- **DNS Secundario**: AdGuard DNS over HTTPS (`94.140.14.14`, `94.140.15.15`) como respaldo automático si Google falla.
|
||||||
|
- **DNS Terciario**: DNS del sistema (ISP) como último recurso.
|
||||||
|
- Se ha eliminado el uso de `HttpURLConnection` en `EventRepository` en favor de `OkHttpClient` con la nueva configuración DNS, asegurando que la carga de la guía de eventos también evite bloqueos.
|
||||||
|
|
||||||
|
## Beneficios
|
||||||
|
- Mayor resistencia a bloqueos regionales e interferencias de ISP.
|
||||||
|
- Recuperación automática si el proveedor de DNS principal (Google) no es accesible.
|
||||||
|
- Corrección de problemas de carga de canales debido al cambio de dominio del proveedor.
|
||||||
@@ -2,14 +2,14 @@ apply plugin: 'com.android.application'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
namespace "com.streamplayer"
|
namespace "com.streamplayer"
|
||||||
compileSdk 33
|
compileSdk 35
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.streamplayer"
|
applicationId "com.streamplayer"
|
||||||
minSdk 21
|
minSdk 21
|
||||||
targetSdk 33
|
targetSdk 35
|
||||||
versionCode 100100
|
versionCode 100108
|
||||||
versionName "10.0.1"
|
versionName "10.1.8"
|
||||||
buildConfigField "String", "DEVICE_REGISTRY_URL", '"http://194.163.191.200:4000"'
|
buildConfigField "String", "DEVICE_REGISTRY_URL", '"http://194.163.191.200:4000"'
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,9 +48,15 @@ dependencies {
|
|||||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||||
implementation 'androidx.recyclerview:recyclerview:1.3.2'
|
implementation 'androidx.recyclerview:recyclerview:1.3.2'
|
||||||
|
|
||||||
// ExoPlayer para reproducción de video
|
// Media3 para reproduccion de video (Android TV optimizado)
|
||||||
implementation 'com.google.android.exoplayer:exoplayer:2.18.7'
|
implementation 'androidx.media3:media3-exoplayer:1.5.0'
|
||||||
implementation 'com.google.android.exoplayer:extension-okhttp:2.18.7'
|
implementation 'androidx.media3:media3-exoplayer-hls:1.5.0'
|
||||||
|
implementation 'androidx.media3:media3-datasource-okhttp:1.5.0'
|
||||||
|
implementation 'androidx.media3:media3-ui:1.5.0'
|
||||||
|
implementation 'androidx.media3:media3-ui-leanback:1.5.0'
|
||||||
|
implementation 'androidx.media3:media3-session:1.5.0'
|
||||||
|
|
||||||
|
// OkHttp con DNS over HTTPS
|
||||||
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
|
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
|
||||||
implementation 'com.squareup.okhttp3:okhttp-dnsoverhttps:4.12.0'
|
implementation 'com.squareup.okhttp3:okhttp-dnsoverhttps:4.12.0'
|
||||||
|
|
||||||
|
|||||||
@@ -12,72 +12,72 @@ public final class ChannelRepository {
|
|||||||
|
|
||||||
private static List<StreamChannel> createChannels() {
|
private static List<StreamChannel> createChannels() {
|
||||||
List<StreamChannel> channels = new ArrayList<>(Arrays.asList(
|
List<StreamChannel> channels = new ArrayList<>(Arrays.asList(
|
||||||
new StreamChannel("ESPN", "https://streamtpmedia.com/global2.php?stream=espn"),
|
new StreamChannel("ESPN", "https://streamtp10.com/global2.php?stream=espn"),
|
||||||
new StreamChannel("ESPN 2", "https://streamtpmedia.com/global2.php?stream=espn2"),
|
new StreamChannel("ESPN 2", "https://streamtp10.com/global2.php?stream=espn2"),
|
||||||
new StreamChannel("ESPN 3", "https://streamtpmedia.com/global2.php?stream=espn3"),
|
new StreamChannel("ESPN 3", "https://streamtp10.com/global2.php?stream=espn3"),
|
||||||
new StreamChannel("ESPN 4", "https://streamtpmedia.com/global2.php?stream=espn4"),
|
new StreamChannel("ESPN 4", "https://streamtp10.com/global2.php?stream=espn4"),
|
||||||
new StreamChannel("ESPN 3 MX", "https://streamtpmedia.com/global2.php?stream=espn3mx"),
|
new StreamChannel("ESPN 3 MX", "https://streamtp10.com/global2.php?stream=espn3mx"),
|
||||||
new StreamChannel("ESPN 5", "https://streamtpmedia.com/global2.php?stream=espn5"),
|
new StreamChannel("ESPN 5", "https://streamtp10.com/global2.php?stream=espn5"),
|
||||||
new StreamChannel("Fox Sports 3 MX", "https://streamtpmedia.com/global2.php?stream=foxsports3mx"),
|
new StreamChannel("Fox Sports 3 MX", "https://streamtp10.com/global2.php?stream=foxsports3mx"),
|
||||||
new StreamChannel("ESPN 6", "https://streamtpmedia.com/global2.php?stream=espn6"),
|
new StreamChannel("ESPN 6", "https://streamtp10.com/global2.php?stream=espn6"),
|
||||||
new StreamChannel("Fox Sports MX", "https://streamtpmedia.com/global2.php?stream=foxsportsmx"),
|
new StreamChannel("Fox Sports MX", "https://streamtp10.com/global2.php?stream=foxsportsmx"),
|
||||||
new StreamChannel("ESPN 7", "https://streamtpmedia.com/global2.php?stream=espn7"),
|
new StreamChannel("ESPN 7", "https://streamtp10.com/global2.php?stream=espn7"),
|
||||||
new StreamChannel("Azteca Deportes", "https://streamtpmedia.com/global2.php?stream=azteca_deportes"),
|
new StreamChannel("Azteca Deportes", "https://streamtp10.com/global2.php?stream=azteca_deportes"),
|
||||||
new StreamChannel("Win Plus", "https://streamtpmedia.com/global2.php?stream=winplus"),
|
new StreamChannel("Win Plus", "https://streamtp10.com/global2.php?stream=winplus"),
|
||||||
new StreamChannel("DAZN 1", "https://streamtpmedia.com/global2.php?stream=dazn1"),
|
new StreamChannel("DAZN 1", "https://streamtp10.com/global2.php?stream=dazn1"),
|
||||||
new StreamChannel("Win Plus 2", "https://streamtpmedia.com/global2.php?stream=winplus2"),
|
new StreamChannel("Win Plus 2", "https://streamtp10.com/global2.php?stream=winplus2"),
|
||||||
new StreamChannel("DAZN 2", "https://streamtpmedia.com/global2.php?stream=dazn2"),
|
new StreamChannel("DAZN 2", "https://streamtp10.com/global2.php?stream=dazn2"),
|
||||||
new StreamChannel("Win Sports", "https://streamtpmedia.com/global2.php?stream=winsports"),
|
new StreamChannel("Win Sports", "https://streamtp10.com/global2.php?stream=winsports"),
|
||||||
new StreamChannel("DAZN LaLiga", "https://streamtpmedia.com/global2.php?stream=dazn_laliga"),
|
new StreamChannel("DAZN LaLiga", "https://streamtp10.com/global2.php?stream=dazn_laliga"),
|
||||||
new StreamChannel("Win Plus Online 1", "https://streamtpmedia.com/global2.php?stream=winplusonline1"),
|
new StreamChannel("Win Plus Online 1", "https://streamtp10.com/global2.php?stream=winplusonline1"),
|
||||||
new StreamChannel("Caracol TV", "https://streamtpmedia.com/global2.php?stream=caracoltv"),
|
new StreamChannel("Caracol TV", "https://streamtp10.com/global2.php?stream=caracoltv"),
|
||||||
new StreamChannel("Fox 1 AR", "https://streamtpmedia.com/global2.php?stream=fox1ar"),
|
new StreamChannel("Fox 1 AR", "https://streamtp10.com/global2.php?stream=fox1ar"),
|
||||||
new StreamChannel("Fox 2 USA", "https://streamtpmedia.com/global2.php?stream=fox_2_usa"),
|
new StreamChannel("Fox 2 USA", "https://streamtp10.com/global2.php?stream=fox_2_usa"),
|
||||||
new StreamChannel("Fox 2 AR", "https://streamtpmedia.com/global2.php?stream=fox2ar"),
|
new StreamChannel("Fox 2 AR", "https://streamtp10.com/global2.php?stream=fox2ar"),
|
||||||
new StreamChannel("TNT 1 GB", "https://streamtpmedia.com/global2.php?stream=tnt_1_gb"),
|
new StreamChannel("TNT 1 GB", "https://streamtp10.com/global2.php?stream=tnt_1_gb"),
|
||||||
new StreamChannel("TNT 2 GB", "https://streamtpmedia.com/global2.php?stream=tnt_2_gb"),
|
new StreamChannel("TNT 2 GB", "https://streamtp10.com/global2.php?stream=tnt_2_gb"),
|
||||||
new StreamChannel("Fox 3 AR", "https://streamtpmedia.com/global2.php?stream=fox3ar"),
|
new StreamChannel("Fox 3 AR", "https://streamtp10.com/global2.php?stream=fox3ar"),
|
||||||
new StreamChannel("Universo USA", "https://streamtpmedia.com/global2.php?stream=universo_usa"),
|
new StreamChannel("Universo USA", "https://streamtp10.com/global2.php?stream=universo_usa"),
|
||||||
new StreamChannel("DSports", "https://streamtpmedia.com/global2.php?stream=dsports"),
|
new StreamChannel("DSports", "https://streamtp10.com/global2.php?stream=dsports"),
|
||||||
new StreamChannel("Univision USA", "https://streamtpmedia.com/global2.php?stream=univision_usa"),
|
new StreamChannel("Univision USA", "https://streamtp10.com/global2.php?stream=univision_usa"),
|
||||||
new StreamChannel("DSports 2", "https://streamtpmedia.com/global2.php?stream=dsports2"),
|
new StreamChannel("DSports 2", "https://streamtp10.com/global2.php?stream=dsports2"),
|
||||||
new StreamChannel("Fox Deportes USA", "https://streamtpmedia.com/global2.php?stream=fox_deportes_usa"),
|
new StreamChannel("Fox Deportes USA", "https://streamtp10.com/global2.php?stream=fox_deportes_usa"),
|
||||||
new StreamChannel("DSports Plus", "https://streamtpmedia.com/global2.php?stream=dsportsplus"),
|
new StreamChannel("DSports Plus", "https://streamtp10.com/global2.php?stream=dsportsplus"),
|
||||||
new StreamChannel("Fox Sports 2 MX", "https://streamtpmedia.com/global2.php?stream=foxsports2mx"),
|
new StreamChannel("Fox Sports 2 MX", "https://streamtp10.com/global2.php?stream=foxsports2mx"),
|
||||||
new StreamChannel("TNT Sports Chile", "https://streamtpmedia.com/global2.php?stream=tntsportschile"),
|
new StreamChannel("TNT Sports Chile", "https://streamtp10.com/global2.php?stream=tntsportschile"),
|
||||||
new StreamChannel("Fox Sports Premium", "https://streamtpmedia.com/global2.php?stream=foxsportspremium"),
|
new StreamChannel("Fox Sports Premium", "https://streamtp10.com/global2.php?stream=foxsportspremium"),
|
||||||
new StreamChannel("TNT Sports", "https://streamtpmedia.com/global2.php?stream=tntsports"),
|
new StreamChannel("TNT Sports", "https://streamtp10.com/global2.php?stream=tntsports"),
|
||||||
new StreamChannel("ESPN MX", "https://streamtpmedia.com/global2.php?stream=espnmx"),
|
new StreamChannel("ESPN MX", "https://streamtp10.com/global2.php?stream=espnmx"),
|
||||||
new StreamChannel("ESPN Premium", "https://streamtpmedia.com/global2.php?stream=espnpremium"),
|
new StreamChannel("ESPN Premium", "https://streamtp10.com/global2.php?stream=espnpremium"),
|
||||||
new StreamChannel("ESPN 2 MX", "https://streamtpmedia.com/global2.php?stream=espn2mx"),
|
new StreamChannel("ESPN 2 MX", "https://streamtp10.com/global2.php?stream=espn2mx"),
|
||||||
new StreamChannel("TyC Sports", "https://streamtpmedia.com/global2.php?stream=tycsports"),
|
new StreamChannel("TyC Sports", "https://streamtp10.com/global2.php?stream=tycsports"),
|
||||||
new StreamChannel("TUDN USA", "https://streamtpmedia.com/global2.php?stream=tudn_usa"),
|
new StreamChannel("TUDN USA", "https://streamtp10.com/global2.php?stream=tudn_usa"),
|
||||||
new StreamChannel("Telefe", "https://streamtpmedia.com/global2.php?stream=telefe"),
|
new StreamChannel("Telefe", "https://streamtp10.com/global2.php?stream=telefe"),
|
||||||
new StreamChannel("TNT 3 GB", "https://streamtpmedia.com/global2.php?stream=tnt_3_gb"),
|
new StreamChannel("TNT 3 GB", "https://streamtp10.com/global2.php?stream=tnt_3_gb"),
|
||||||
new StreamChannel("TV Pública", "https://streamtpmedia.com/global2.php?stream=tv_publica"),
|
new StreamChannel("TV Pública", "https://streamtp10.com/global2.php?stream=tv_publica"),
|
||||||
new StreamChannel("Fox 1 USA", "https://streamtpmedia.com/global2.php?stream=fox_1_usa"),
|
new StreamChannel("Fox 1 USA", "https://streamtp10.com/global2.php?stream=fox_1_usa"),
|
||||||
new StreamChannel("Liga 1 Max", "https://streamtpmedia.com/global2.php?stream=liga1max"),
|
new StreamChannel("Liga 1 Max", "https://streamtp10.com/global2.php?stream=liga1max"),
|
||||||
new StreamChannel("Gol TV", "https://streamtpmedia.com/global2.php?stream=goltv"),
|
new StreamChannel("Gol TV", "https://streamtp10.com/global2.php?stream=goltv"),
|
||||||
new StreamChannel("VTV Plus", "https://streamtpmedia.com/global2.php?stream=vtvplus"),
|
new StreamChannel("VTV Plus", "https://streamtp10.com/global2.php?stream=vtvplus"),
|
||||||
new StreamChannel("ESPN Deportes", "https://streamtpmedia.com/global2.php?stream=espndeportes"),
|
new StreamChannel("ESPN Deportes", "https://streamtp10.com/global2.php?stream=espndeportes"),
|
||||||
new StreamChannel("Gol Perú", "https://streamtpmedia.com/global2.php?stream=golperu"),
|
new StreamChannel("Gol Perú", "https://streamtp10.com/global2.php?stream=golperu"),
|
||||||
new StreamChannel("TNT 4 GB", "https://streamtpmedia.com/global2.php?stream=tnt_4_gb"),
|
new StreamChannel("TNT 4 GB", "https://streamtp10.com/global2.php?stream=tnt_4_gb"),
|
||||||
new StreamChannel("SportTV BR 1", "https://streamtpmedia.com/global2.php?stream=sporttvbr1"),
|
new StreamChannel("SportTV BR 1", "https://streamtp10.com/global2.php?stream=sporttvbr1"),
|
||||||
new StreamChannel("SportTV BR 2", "https://streamtpmedia.com/global2.php?stream=sporttvbr2"),
|
new StreamChannel("SportTV BR 2", "https://streamtp10.com/global2.php?stream=sporttvbr2"),
|
||||||
new StreamChannel("SportTV BR 3", "https://streamtpmedia.com/global2.php?stream=sporttvbr3"),
|
new StreamChannel("SportTV BR 3", "https://streamtp10.com/global2.php?stream=sporttvbr3"),
|
||||||
new StreamChannel("Premiere 1", "https://streamtpmedia.com/global2.php?stream=premiere1"),
|
new StreamChannel("Premiere 1", "https://streamtp10.com/global2.php?stream=premiere1"),
|
||||||
new StreamChannel("Premiere 2", "https://streamtpmedia.com/global2.php?stream=premiere2"),
|
new StreamChannel("Premiere 2", "https://streamtp10.com/global2.php?stream=premiere2"),
|
||||||
new StreamChannel("Premiere 3", "https://streamtpmedia.com/global2.php?stream=premiere3"),
|
new StreamChannel("Premiere 3", "https://streamtp10.com/global2.php?stream=premiere3"),
|
||||||
new StreamChannel("ESPN NL 1", "https://streamtpmedia.com/global2.php?stream=espn_nl1"),
|
new StreamChannel("ESPN NL 1", "https://streamtp10.com/global2.php?stream=espn_nl1"),
|
||||||
new StreamChannel("ESPN NL 2", "https://streamtpmedia.com/global2.php?stream=espn_nl2"),
|
new StreamChannel("ESPN NL 2", "https://streamtp10.com/global2.php?stream=espn_nl2"),
|
||||||
new StreamChannel("ESPN NL 3", "https://streamtpmedia.com/global2.php?stream=espn_nl3"),
|
new StreamChannel("ESPN NL 3", "https://streamtp10.com/global2.php?stream=espn_nl3"),
|
||||||
new StreamChannel("Caliente TV MX", "https://streamtpmedia.com/global2.php?stream=calientetvmx"),
|
new StreamChannel("Caliente TV MX", "https://streamtp10.com/global2.php?stream=calientetvmx"),
|
||||||
new StreamChannel("USA Network", "https://streamtpmedia.com/global2.php?stream=usa_network"),
|
new StreamChannel("USA Network", "https://streamtp10.com/global2.php?stream=usa_network"),
|
||||||
new StreamChannel("TyC Internacional", "https://streamtpmedia.com/global2.php?stream=tycinternacional"),
|
new StreamChannel("TyC Internacional", "https://streamtp10.com/global2.php?stream=tycinternacional"),
|
||||||
new StreamChannel("Canal 5 MX", "https://streamtpmedia.com/global2.php?stream=canal5mx"),
|
new StreamChannel("Canal 5 MX", "https://streamtp10.com/global2.php?stream=canal5mx"),
|
||||||
new StreamChannel("TUDN MX", "https://streamtpmedia.com/global2.php?stream=TUDNMX"),
|
new StreamChannel("TUDN MX", "https://streamtp10.com/global2.php?stream=TUDNMX"),
|
||||||
new StreamChannel("FUTV", "https://streamtpmedia.com/global2.php?stream=futv"),
|
new StreamChannel("FUTV", "https://streamtp10.com/global2.php?stream=futv"),
|
||||||
new StreamChannel("LaLiga Hypermotion", "https://streamtpmedia.com/global2.php?stream=laligahypermotion")
|
new StreamChannel("LaLiga Hypermotion", "https://streamtp10.com/global2.php?stream=laligahypermotion")
|
||||||
));
|
));
|
||||||
channels.sort(Comparator.comparing(StreamChannel::getName, String.CASE_INSENSITIVE_ORDER));
|
channels.sort(Comparator.comparing(StreamChannel::getName, String.CASE_INSENSITIVE_ORDER));
|
||||||
return Collections.unmodifiableList(channels);
|
return Collections.unmodifiableList(channels);
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ public class DNSSetter {
|
|||||||
// Pre-resolver algunos dominios comunes para caching
|
// Pre-resolver algunos dominios comunes para caching
|
||||||
Thread thread = new Thread(() -> {
|
Thread thread = new Thread(() -> {
|
||||||
try {
|
try {
|
||||||
String[] domains = {"streamtpmedia.com", "google.com", "doubleclick.net"};
|
String[] domains = {"streamtp10.com", "google.com", "dns.adguard-dns.com"};
|
||||||
for (String domain : domains) {
|
for (String domain : domains) {
|
||||||
try {
|
try {
|
||||||
InetAddress.getByName(domain);
|
InetAddress.getByName(domain);
|
||||||
|
|||||||
@@ -7,12 +7,7 @@ import org.json.JSONArray;
|
|||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStreamReader;
|
|
||||||
import java.net.HttpURLConnection;
|
|
||||||
import java.net.URL;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.LocalTime;
|
import java.time.LocalTime;
|
||||||
@@ -24,13 +19,18 @@ import java.util.ArrayList;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import okhttp3.Request;
|
||||||
|
import okhttp3.Response;
|
||||||
|
|
||||||
public class EventRepository {
|
public class EventRepository {
|
||||||
|
|
||||||
private static final String PREFS_NAME = "events_cache";
|
private static final String PREFS_NAME = "events_cache";
|
||||||
private static final String KEY_JSON = "json";
|
private static final String KEY_JSON = "json";
|
||||||
private static final String KEY_TIMESTAMP = "timestamp";
|
private static final String KEY_TIMESTAMP = "timestamp";
|
||||||
private static final long CACHE_DURATION = 24L * 60 * 60 * 1000; // 24 horas
|
private static final long CACHE_DURATION = 24L * 60 * 60 * 1000; // 24 horas
|
||||||
private static final String EVENTS_URL = "https://streamtpmedia.com/eventos.json";
|
|
||||||
|
// URL única para eventos (actualizado para evitar bloqueos de ISP)
|
||||||
|
private static final String EVENTS_URL = "https://streamtp10.com/eventos.json";
|
||||||
|
|
||||||
public interface Callback {
|
public interface Callback {
|
||||||
void onSuccess(List<EventItem> events);
|
void onSuccess(List<EventItem> events);
|
||||||
@@ -55,7 +55,7 @@ public class EventRepository {
|
|||||||
|
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
try {
|
try {
|
||||||
String json = downloadJson();
|
String json = downloadJson(context);
|
||||||
List<EventItem> events = parseEvents(json);
|
List<EventItem> events = parseEvents(json);
|
||||||
prefs.edit().putString(KEY_JSON, json).putLong(KEY_TIMESTAMP, System.currentTimeMillis()).apply();
|
prefs.edit().putString(KEY_JSON, json).putLong(KEY_TIMESTAMP, System.currentTimeMillis()).apply();
|
||||||
callback.onSuccess(events);
|
callback.onSuccess(events);
|
||||||
@@ -73,43 +73,36 @@ public class EventRepository {
|
|||||||
}).start();
|
}).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
private String downloadJson() throws IOException {
|
private String downloadJson(Context context) throws IOException {
|
||||||
URL url = new URL(EVENTS_URL);
|
Request request = new Request.Builder()
|
||||||
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
.url(EVENTS_URL)
|
||||||
connection.setConnectTimeout(15000);
|
.header("User-Agent", NetworkUtils.getUserAgent())
|
||||||
connection.setReadTimeout(15000);
|
.header("Accept", "application/json")
|
||||||
connection.setRequestMethod("GET");
|
.build();
|
||||||
connection.setRequestProperty("Accept", "application/json");
|
|
||||||
connection.setRequestProperty("User-Agent", "StreamPlayer/1.0");
|
|
||||||
|
|
||||||
try {
|
try (Response response = NetworkUtils.getClient().newCall(request).execute()) {
|
||||||
int responseCode = connection.getResponseCode();
|
if (!response.isSuccessful()) {
|
||||||
if (responseCode != HttpURLConnection.HTTP_OK) {
|
throw new IOException("Error HTTP " + response.code() + ": " + response.message());
|
||||||
throw new IOException("Error HTTP " + responseCode + ": " + connection.getResponseMessage());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String contentType = connection.getContentType();
|
if (response.body() == null) {
|
||||||
if (contentType != null && !contentType.contains("json")) {
|
throw new IOException("Respuesta vacía del servidor");
|
||||||
throw new IOException("El servidor devolvió " + contentType + " en lugar de JSON. Verifica que la URL sea correcta.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try (BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
|
String contentType = response.header("Content-Type");
|
||||||
StringBuilder builder = new StringBuilder();
|
// Permitir json o text/plain (Raw de Gitea a veces es text/plain)
|
||||||
String line;
|
if (contentType != null && !contentType.contains("json") && !contentType.contains("text/plain")) {
|
||||||
while ((line = reader.readLine()) != null) {
|
// Aceptamos text/plain también por flexibilidad
|
||||||
builder.append(line);
|
|
||||||
}
|
}
|
||||||
String response = builder.toString();
|
|
||||||
|
String responseBody = response.body().string();
|
||||||
|
|
||||||
// Validar que no sea HTML
|
// Validar que no sea HTML
|
||||||
if (response.trim().startsWith("<!") || response.trim().startsWith("<html")) {
|
if (responseBody.trim().startsWith("<!") || responseBody.trim().startsWith("<html")) {
|
||||||
throw new IOException("El servidor devolvió HTML en lugar de JSON. La URL del endpoint puede estar incorrecta o el servidor tiene problemas.");
|
throw new IOException("El servidor devolvió HTML en lugar de JSON. La URL del endpoint puede estar incorrecta o el servidor tiene problemas.");
|
||||||
}
|
}
|
||||||
|
|
||||||
return response;
|
return responseBody;
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
connection.disconnect();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,6 +119,8 @@ public class EventRepository {
|
|||||||
|
|
||||||
JSONArray array = new JSONArray(json);
|
JSONArray array = new JSONArray(json);
|
||||||
List<EventItem> events = new ArrayList<>();
|
List<EventItem> events = new ArrayList<>();
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm");
|
||||||
|
|
||||||
for (int i = 0; i < array.length(); i++) {
|
for (int i = 0; i < array.length(); i++) {
|
||||||
JSONObject obj = array.getJSONObject(i);
|
JSONObject obj = array.getJSONObject(i);
|
||||||
String title = obj.optString("title");
|
String title = obj.optString("title");
|
||||||
@@ -134,8 +129,20 @@ public class EventRepository {
|
|||||||
String status = obj.optString("status");
|
String status = obj.optString("status");
|
||||||
String link = obj.optString("link");
|
String link = obj.optString("link");
|
||||||
String normalized = normalizeLink(link);
|
String normalized = normalizeLink(link);
|
||||||
|
|
||||||
|
// Ajustar hora: la web muestra hora de España, Argentina es +2 horas
|
||||||
|
String displayTime = time;
|
||||||
|
try {
|
||||||
|
if (time != null && !time.isEmpty()) {
|
||||||
|
LocalTime localTime = LocalTime.parse(time.trim(), formatter);
|
||||||
|
LocalTime adjustedTime = localTime.plusHours(2);
|
||||||
|
displayTime = adjustedTime.format(formatter);
|
||||||
|
}
|
||||||
|
} catch (DateTimeParseException ignored) {
|
||||||
|
}
|
||||||
|
|
||||||
long startMillis = parseEventTime(time);
|
long startMillis = parseEventTime(time);
|
||||||
events.add(new EventItem(title, time, category, status, normalized, extractChannelName(link), startMillis));
|
events.add(new EventItem(title, displayTime, category, status, normalized, extractChannelName(link), startMillis));
|
||||||
}
|
}
|
||||||
return Collections.unmodifiableList(events);
|
return Collections.unmodifiableList(events);
|
||||||
}
|
}
|
||||||
@@ -144,7 +151,10 @@ public class EventRepository {
|
|||||||
if (link == null) {
|
if (link == null) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
return link.replace("global1.php", "global2.php");
|
// Actualizado a streamtp10.com
|
||||||
|
String updated = link.replace("streamtpmedia.com", "streamtp10.com")
|
||||||
|
.replace("streamtpcloud.com", "streamtp10.com");
|
||||||
|
return updated.replace("global1.php", "global2.php");
|
||||||
}
|
}
|
||||||
|
|
||||||
private String extractChannelName(String link) {
|
private String extractChannelName(String link) {
|
||||||
@@ -165,9 +175,11 @@ public class EventRepository {
|
|||||||
try {
|
try {
|
||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm");
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm");
|
||||||
LocalTime localTime = LocalTime.parse(time.trim(), formatter);
|
LocalTime localTime = LocalTime.parse(time.trim(), formatter);
|
||||||
|
// Ajustar hora: la web muestra hora de España, Argentina es +2 horas
|
||||||
|
LocalTime adjustedTime = localTime.plusHours(2);
|
||||||
ZoneId zone = ZoneId.of("America/Argentina/Buenos_Aires");
|
ZoneId zone = ZoneId.of("America/Argentina/Buenos_Aires");
|
||||||
LocalDate today = LocalDate.now(zone);
|
LocalDate today = LocalDate.now(zone);
|
||||||
ZonedDateTime start = ZonedDateTime.of(LocalDateTime.of(today, localTime), zone);
|
ZonedDateTime start = ZonedDateTime.of(LocalDateTime.of(today, adjustedTime), zone);
|
||||||
ZonedDateTime now = ZonedDateTime.now(zone);
|
ZonedDateTime now = ZonedDateTime.now(zone);
|
||||||
if (start.isBefore(now.minusHours(12))) {
|
if (start.isBefore(now.minusHours(12))) {
|
||||||
start = start.plusDays(1);
|
start = start.plusDays(1);
|
||||||
|
|||||||
@@ -7,12 +7,15 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.view.KeyEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.widget.Button;
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.recyclerview.widget.GridLayoutManager;
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
@@ -32,6 +35,7 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
private ProgressBar loadingIndicator;
|
private ProgressBar loadingIndicator;
|
||||||
private TextView messageView;
|
private TextView messageView;
|
||||||
private TextView contentTitle;
|
private TextView contentTitle;
|
||||||
|
private Button refreshButton;
|
||||||
|
|
||||||
private ChannelAdapter channelAdapter;
|
private ChannelAdapter channelAdapter;
|
||||||
private EventAdapter eventAdapter;
|
private EventAdapter eventAdapter;
|
||||||
@@ -57,13 +61,30 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
loadingIndicator = findViewById(R.id.loading_indicator);
|
loadingIndicator = findViewById(R.id.loading_indicator);
|
||||||
messageView = findViewById(R.id.message_view);
|
messageView = findViewById(R.id.message_view);
|
||||||
contentTitle = findViewById(R.id.content_title);
|
contentTitle = findViewById(R.id.content_title);
|
||||||
|
refreshButton = findViewById(R.id.refresh_button);
|
||||||
|
|
||||||
|
refreshButton.setOnClickListener(v -> {
|
||||||
|
loadEvents(true);
|
||||||
|
Toast.makeText(this, "Actualizando eventos...", Toast.LENGTH_SHORT).show();
|
||||||
|
});
|
||||||
|
|
||||||
channelAdapter = new ChannelAdapter(
|
channelAdapter = new ChannelAdapter(
|
||||||
channel -> openPlayer(channel.getName(), channel.getPageUrl()));
|
channel -> openPlayer(channel.getName(), channel.getPageUrl()));
|
||||||
eventAdapter = new EventAdapter(event -> openPlayer(event.getTitle(), event.getPageUrl()));
|
eventAdapter = new EventAdapter(event -> openPlayer(event.getTitle(), event.getPageUrl()));
|
||||||
eventRepository = new EventRepository();
|
eventRepository = new EventRepository();
|
||||||
channelLayoutManager = new GridLayoutManager(this, getSpanCount());
|
channelLayoutManager = new GridLayoutManager(this, getSpanCount());
|
||||||
eventLayoutManager = new LinearLayoutManager(this);
|
eventLayoutManager = new LinearLayoutManager(this) {
|
||||||
|
@Override
|
||||||
|
public View onInterceptFocusSearch(View focused, int direction) {
|
||||||
|
if (direction == View.FOCUS_DOWN) {
|
||||||
|
int pos = getPosition(focused);
|
||||||
|
if (pos == getItemCount() - 1) {
|
||||||
|
return focused;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return super.onInterceptFocusSearch(focused, direction);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
sections = buildSections();
|
sections = buildSections();
|
||||||
sectionList.setLayoutManager(new LinearLayoutManager(this));
|
sectionList.setLayoutManager(new LinearLayoutManager(this));
|
||||||
@@ -158,8 +179,11 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
private void showChannels(SectionEntry section) {
|
private void showChannels(SectionEntry section) {
|
||||||
contentTitle.setText(section.title);
|
contentTitle.setText(section.title);
|
||||||
|
refreshButton.setVisibility(View.GONE);
|
||||||
contentList.setLayoutManager(channelLayoutManager);
|
contentList.setLayoutManager(channelLayoutManager);
|
||||||
contentList.setAdapter(channelAdapter);
|
contentList.setAdapter(channelAdapter);
|
||||||
|
// Clear any scroll listeners from Events section
|
||||||
|
contentList.clearOnScrollListeners();
|
||||||
loadingIndicator.setVisibility(View.GONE);
|
loadingIndicator.setVisibility(View.GONE);
|
||||||
channelAdapter.submitList(section.channels);
|
channelAdapter.submitList(section.channels);
|
||||||
if (section.channels.isEmpty()) {
|
if (section.channels.isEmpty()) {
|
||||||
@@ -173,8 +197,12 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
private void showEvents() {
|
private void showEvents() {
|
||||||
contentTitle.setText(currentSection != null ? currentSection.title : getString(R.string.section_events));
|
contentTitle.setText(currentSection != null ? currentSection.title : getString(R.string.section_events));
|
||||||
|
refreshButton.setVisibility(View.VISIBLE);
|
||||||
contentList.setLayoutManager(eventLayoutManager);
|
contentList.setLayoutManager(eventLayoutManager);
|
||||||
contentList.setAdapter(eventAdapter);
|
contentList.setAdapter(eventAdapter);
|
||||||
|
// Clear existing listeners
|
||||||
|
contentList.clearOnScrollListeners();
|
||||||
|
|
||||||
if (cachedEvents.isEmpty()) {
|
if (cachedEvents.isEmpty()) {
|
||||||
loadEvents(false);
|
loadEvents(false);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
101
app/src/main/java/com/streamplayer/NetworkUtils.java
Normal file
101
app/src/main/java/com/streamplayer/NetworkUtils.java
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
package com.streamplayer;
|
||||||
|
|
||||||
|
import java.net.InetAddress;
|
||||||
|
import java.net.UnknownHostException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
import okhttp3.Dns;
|
||||||
|
import okhttp3.HttpUrl;
|
||||||
|
import okhttp3.OkHttpClient;
|
||||||
|
import okhttp3.dnsoverhttps.DnsOverHttps;
|
||||||
|
|
||||||
|
public class NetworkUtils {
|
||||||
|
|
||||||
|
private static final OkHttpClient CLIENT;
|
||||||
|
private static final String USER_AGENT = "Mozilla/5.0 (Linux; Android 13; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36";
|
||||||
|
|
||||||
|
static {
|
||||||
|
OkHttpClient.Builder builder = new OkHttpClient.Builder()
|
||||||
|
.connectTimeout(15, TimeUnit.SECONDS)
|
||||||
|
.readTimeout(15, TimeUnit.SECONDS)
|
||||||
|
.writeTimeout(15, TimeUnit.SECONDS)
|
||||||
|
.followRedirects(true)
|
||||||
|
.followSslRedirects(true);
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Cliente bootstrap para resolver los dominios de DNS
|
||||||
|
OkHttpClient bootstrap = new OkHttpClient.Builder()
|
||||||
|
.connectTimeout(5, TimeUnit.SECONDS)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
// 1. Google DNS over HTTPS (Primario)
|
||||||
|
final DnsOverHttps googleDns = new DnsOverHttps.Builder()
|
||||||
|
.client(bootstrap)
|
||||||
|
.url(HttpUrl.get("https://dns.google/dns-query"))
|
||||||
|
.bootstrapDnsHosts(
|
||||||
|
getByIp("8.8.8.8"),
|
||||||
|
getByIp("8.8.4.4"))
|
||||||
|
.includeIPv6(false)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
// 2. AdGuard DNS over HTTPS (Secundario)
|
||||||
|
final DnsOverHttps adGuardDns = new DnsOverHttps.Builder()
|
||||||
|
.client(bootstrap)
|
||||||
|
.url(HttpUrl.get("https://dns.adguard-dns.com/dns-query"))
|
||||||
|
.bootstrapDnsHosts(
|
||||||
|
getByIp("94.140.14.14"),
|
||||||
|
getByIp("94.140.15.15"))
|
||||||
|
.includeIPv6(false)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
// Configurar DNS con fallback: Google -> AdGuard -> Sistema
|
||||||
|
builder.dns(new Dns() {
|
||||||
|
@Override
|
||||||
|
public List<InetAddress> lookup(String hostname) throws UnknownHostException {
|
||||||
|
// Intento 1: Google DNS
|
||||||
|
try {
|
||||||
|
List<InetAddress> result = googleDns.lookup(hostname);
|
||||||
|
if (result != null && !result.isEmpty()) return result;
|
||||||
|
} catch (Exception ignored) {
|
||||||
|
// Falló Google, continuar
|
||||||
|
}
|
||||||
|
|
||||||
|
// Intento 2: AdGuard DNS
|
||||||
|
try {
|
||||||
|
List<InetAddress> result = adGuardDns.lookup(hostname);
|
||||||
|
if (result != null && !result.isEmpty()) return result;
|
||||||
|
} catch (Exception ignored) {
|
||||||
|
// Falló AdGuard, continuar
|
||||||
|
}
|
||||||
|
|
||||||
|
// Intento 3: DNS del Sistema (Fallback final)
|
||||||
|
try {
|
||||||
|
return Dns.SYSTEM.lookup(hostname);
|
||||||
|
} catch (UnknownHostException e) {
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
// Si algo falla en la configuración DNS, usamos por defecto (implícito en el builder)
|
||||||
|
}
|
||||||
|
|
||||||
|
CLIENT = builder.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static InetAddress getByIp(String ip) throws UnknownHostException {
|
||||||
|
return InetAddress.getByName(ip);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static OkHttpClient getClient() {
|
||||||
|
return CLIENT;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getUserAgent() {
|
||||||
|
return USER_AGENT;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,16 +11,19 @@ import android.widget.TextView;
|
|||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
import com.google.android.exoplayer2.ExoPlayer;
|
import androidx.media3.exoplayer.ExoPlayer;
|
||||||
import com.google.android.exoplayer2.MediaItem;
|
import androidx.media3.common.MediaItem;
|
||||||
import com.google.android.exoplayer2.PlaybackException;
|
import androidx.media3.common.PlaybackException;
|
||||||
import com.google.android.exoplayer2.Player;
|
import androidx.media3.common.Player;
|
||||||
import com.google.android.exoplayer2.DefaultRenderersFactory;
|
import androidx.media3.exoplayer.DefaultRenderersFactory;
|
||||||
import com.google.android.exoplayer2.ext.okhttp.OkHttpDataSource;
|
import androidx.media3.exoplayer.trackselection.DefaultTrackSelector;
|
||||||
import com.google.android.exoplayer2.source.MediaSource;
|
import androidx.media3.datasource.okhttp.OkHttpDataSource;
|
||||||
import com.google.android.exoplayer2.source.hls.HlsMediaSource;
|
import androidx.media3.exoplayer.source.MediaSource;
|
||||||
import com.google.android.exoplayer2.ui.PlayerView;
|
import androidx.media3.exoplayer.hls.HlsMediaSource;
|
||||||
import com.google.android.exoplayer2.util.Util;
|
import androidx.media3.ui.PlayerView;
|
||||||
|
import androidx.media3.common.util.Util;
|
||||||
|
import androidx.annotation.OptIn;
|
||||||
|
import androidx.media3.common.util.UnstableApi;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
@@ -33,6 +36,7 @@ import okhttp3.HttpUrl;
|
|||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
import okhttp3.dnsoverhttps.DnsOverHttps;
|
import okhttp3.dnsoverhttps.DnsOverHttps;
|
||||||
|
|
||||||
|
@OptIn(markerClass = UnstableApi.class)
|
||||||
public class PlayerActivity extends AppCompatActivity {
|
public class PlayerActivity extends AppCompatActivity {
|
||||||
|
|
||||||
public static final String EXTRA_CHANNEL_NAME = "extra_channel_name";
|
public static final String EXTRA_CHANNEL_NAME = "extra_channel_name";
|
||||||
@@ -46,10 +50,14 @@ public class PlayerActivity extends AppCompatActivity {
|
|||||||
private View playerToolbar;
|
private View playerToolbar;
|
||||||
|
|
||||||
private ExoPlayer player;
|
private ExoPlayer player;
|
||||||
|
private DefaultTrackSelector trackSelector;
|
||||||
private String channelName;
|
private String channelName;
|
||||||
private String channelUrl;
|
private String channelUrl;
|
||||||
private boolean overlayVisible = true;
|
private boolean overlayVisible = true;
|
||||||
private OkHttpClient okHttpClient;
|
private OkHttpClient okHttpClient;
|
||||||
|
private int retryCount = 0;
|
||||||
|
private static final int MAX_RETRIES = 3;
|
||||||
|
private String lastStreamUrl;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@@ -97,6 +105,7 @@ public class PlayerActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
private void loadChannel() {
|
private void loadChannel() {
|
||||||
showLoading(true);
|
showLoading(true);
|
||||||
|
retryCount = 0; // Resetear contador al cargar nuevo canal
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
try {
|
try {
|
||||||
String resolvedUrl = StreamUrlResolver.resolve(channelUrl);
|
String resolvedUrl = StreamUrlResolver.resolve(channelUrl);
|
||||||
@@ -112,10 +121,22 @@ public class PlayerActivity extends AppCompatActivity {
|
|||||||
private void startPlayback(String streamUrl) {
|
private void startPlayback(String streamUrl) {
|
||||||
try {
|
try {
|
||||||
releasePlayer();
|
releasePlayer();
|
||||||
|
lastStreamUrl = streamUrl; // Guardar URL para reintentos
|
||||||
|
retryCount = 0; // Resetear contador al iniciar nueva reproducción
|
||||||
DefaultRenderersFactory renderersFactory = new DefaultRenderersFactory(this)
|
DefaultRenderersFactory renderersFactory = new DefaultRenderersFactory(this)
|
||||||
.setEnableDecoderFallback(true)
|
.setEnableDecoderFallback(true)
|
||||||
.setExtensionRendererMode(DefaultRenderersFactory.EXTENSION_RENDERER_MODE_ON);
|
.setExtensionRendererMode(DefaultRenderersFactory.EXTENSION_RENDERER_MODE_ON);
|
||||||
|
|
||||||
|
// Configurar track selector para calidad adaptativa (no forzar máxima calidad)
|
||||||
|
trackSelector = new DefaultTrackSelector(this);
|
||||||
|
DefaultTrackSelector.Parameters params = trackSelector.buildUponParameters()
|
||||||
|
.setForceHighestSupportedBitrate(false) // Permitir calidad adaptativa
|
||||||
|
.setMaxVideoBitrate(Integer.MAX_VALUE) // Sin límite máximo de bitrate
|
||||||
|
.build();
|
||||||
|
trackSelector.setParameters(params);
|
||||||
|
|
||||||
player = new ExoPlayer.Builder(this, renderersFactory)
|
player = new ExoPlayer.Builder(this, renderersFactory)
|
||||||
|
.setTrackSelector(trackSelector)
|
||||||
.setSeekForwardIncrementMs(10_000)
|
.setSeekForwardIncrementMs(10_000)
|
||||||
.setSeekBackIncrementMs(10_000)
|
.setSeekBackIncrementMs(10_000)
|
||||||
.build();
|
.build();
|
||||||
@@ -126,6 +147,7 @@ public class PlayerActivity extends AppCompatActivity {
|
|||||||
public void onPlaybackStateChanged(int playbackState) {
|
public void onPlaybackStateChanged(int playbackState) {
|
||||||
if (playbackState == Player.STATE_READY) {
|
if (playbackState == Player.STATE_READY) {
|
||||||
showLoading(false);
|
showLoading(false);
|
||||||
|
retryCount = 0; // Resetear contador de reintentos al reproducir exitosamente
|
||||||
} else if (playbackState == Player.STATE_BUFFERING) {
|
} else if (playbackState == Player.STATE_BUFFERING) {
|
||||||
showLoading(true);
|
showLoading(true);
|
||||||
}
|
}
|
||||||
@@ -133,9 +155,46 @@ public class PlayerActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPlayerError(PlaybackException error) {
|
public void onPlayerError(PlaybackException error) {
|
||||||
|
String errorMsg = error.getMessage() != null ? error.getMessage() : "";
|
||||||
String detail = error.getCause() != null ?
|
String detail = error.getCause() != null ?
|
||||||
error.getCause().getMessage() : "";
|
error.getCause().getMessage() : "";
|
||||||
showError("Error al reproducir: " + error.getMessage() + " " + detail);
|
String fullError = errorMsg + " " + detail;
|
||||||
|
|
||||||
|
// Verificar si es un error que justifica reintento (404, conectividad, etc.)
|
||||||
|
boolean isRetryableError =
|
||||||
|
fullError.contains("404") ||
|
||||||
|
fullError.contains("403") ||
|
||||||
|
fullError.contains("timeout") ||
|
||||||
|
fullError.contains("Unable to connect") ||
|
||||||
|
fullError.contains("Network") ||
|
||||||
|
fullError.contains("source error") ||
|
||||||
|
error.errorCode == PlaybackException.ERROR_CODE_IO_NETWORK_CONNECTION_FAILED ||
|
||||||
|
error.errorCode == PlaybackException.ERROR_CODE_IO_NETWORK_CONNECTION_TIMEOUT ||
|
||||||
|
error.errorCode == PlaybackException.ERROR_CODE_IO_BAD_HTTP_STATUS;
|
||||||
|
|
||||||
|
if (isRetryableError && retryCount < MAX_RETRIES) {
|
||||||
|
retryCount++;
|
||||||
|
runOnUiThread(() -> {
|
||||||
|
showLoading(true);
|
||||||
|
showError("Error de conexión. Reintentando... (" + retryCount + "/" + MAX_RETRIES + ")");
|
||||||
|
});
|
||||||
|
|
||||||
|
// Reintentar después de 2 segundos
|
||||||
|
new android.os.Handler(android.os.Looper.getMainLooper()).postDelayed(() -> {
|
||||||
|
if (lastStreamUrl != null) {
|
||||||
|
startPlayback(lastStreamUrl);
|
||||||
|
} else {
|
||||||
|
loadChannel();
|
||||||
|
}
|
||||||
|
}, 2000);
|
||||||
|
} else {
|
||||||
|
// Mostrar error final después de agotar reintentos
|
||||||
|
String finalMessage = "Error al reproducir: " + fullError;
|
||||||
|
if (retryCount >= MAX_RETRIES) {
|
||||||
|
finalMessage += "\n\nSe agotaron los reintentos (" + MAX_RETRIES + ").";
|
||||||
|
}
|
||||||
|
showError(finalMessage);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -177,7 +236,7 @@ public class PlayerActivity extends AppCompatActivity {
|
|||||||
private MediaSource buildMediaSource(MediaItem mediaItem) {
|
private MediaSource buildMediaSource(MediaItem mediaItem) {
|
||||||
Map<String, String> headers = new HashMap<>();
|
Map<String, String> headers = new HashMap<>();
|
||||||
headers.put("Referer", channelUrl);
|
headers.put("Referer", channelUrl);
|
||||||
headers.put("Origin", "https://streamtpmedia.com");
|
headers.put("Origin", "https://streamtpcloud.com");
|
||||||
headers.put("Accept", "*/*");
|
headers.put("Accept", "*/*");
|
||||||
headers.put("Connection", "keep-alive");
|
headers.put("Connection", "keep-alive");
|
||||||
|
|
||||||
@@ -196,17 +255,17 @@ public class PlayerActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
OkHttpClient bootstrap = new OkHttpClient.Builder()
|
OkHttpClient bootstrap = new OkHttpClient.Builder()
|
||||||
.connectTimeout(15, TimeUnit.SECONDS)
|
.connectTimeout(20, TimeUnit.SECONDS)
|
||||||
.readTimeout(15, TimeUnit.SECONDS)
|
.readTimeout(30, TimeUnit.SECONDS)
|
||||||
.retryOnConnectionFailure(true)
|
.retryOnConnectionFailure(true)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
DnsOverHttps dohDns = new DnsOverHttps.Builder()
|
DnsOverHttps dohDns = new DnsOverHttps.Builder()
|
||||||
.client(bootstrap)
|
.client(bootstrap)
|
||||||
.url(HttpUrl.get("https://dns.adguard-dns.com/dns-query"))
|
.url(HttpUrl.get("https://dns.google/dns-query"))
|
||||||
.bootstrapDnsHosts(
|
.bootstrapDnsHosts(
|
||||||
InetAddress.getByName("94.140.14.14"),
|
InetAddress.getByName("8.8.8.8"),
|
||||||
InetAddress.getByName("94.140.15.15"))
|
InetAddress.getByName("8.8.4.4"))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
okHttpClient = bootstrap.newBuilder()
|
okHttpClient = bootstrap.newBuilder()
|
||||||
@@ -214,8 +273,8 @@ public class PlayerActivity extends AppCompatActivity {
|
|||||||
.build();
|
.build();
|
||||||
} catch (UnknownHostException e) {
|
} catch (UnknownHostException e) {
|
||||||
okHttpClient = new OkHttpClient.Builder()
|
okHttpClient = new OkHttpClient.Builder()
|
||||||
.connectTimeout(15, TimeUnit.SECONDS)
|
.connectTimeout(20, TimeUnit.SECONDS)
|
||||||
.readTimeout(15, TimeUnit.SECONDS)
|
.readTimeout(30, TimeUnit.SECONDS)
|
||||||
.retryOnConnectionFailure(true)
|
.retryOnConnectionFailure(true)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,149 +1,61 @@
|
|||||||
package com.streamplayer;
|
package com.streamplayer;
|
||||||
|
|
||||||
import android.util.Base64;
|
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStreamReader;
|
|
||||||
import java.net.HttpURLConnection;
|
|
||||||
import java.net.URL;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
import okhttp3.OkHttpClient;
|
||||||
|
import okhttp3.Request;
|
||||||
|
import okhttp3.Response;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resuelve la URL real del stream analizando el JavaScript ofuscado de streamtpmedia.
|
* Resuelve la URL real del stream extrayendo playbackURL de la página.
|
||||||
|
* Utiliza NetworkUtils para configuración centralizada de DNS.
|
||||||
*/
|
*/
|
||||||
public final class StreamUrlResolver {
|
public final class StreamUrlResolver {
|
||||||
|
|
||||||
private static final Pattern ARRAY_NAME_PATTERN =
|
// Patrón para extraer la URL del stream directamente
|
||||||
Pattern.compile("var\\s+playbackURL\\s*=\\s*\"\"\\s*,\\s*([A-Za-z0-9]+)\\s*=\\s*\\[\\]");
|
private static final Pattern PLAYBACK_URL_PATTERN =
|
||||||
private static final Pattern ENTRY_PATTERN = Pattern.compile("\\[(\\d+),\"([A-Za-z0-9+/=]+)\"\\]");
|
Pattern.compile("var\\s+playbackURL\\s*=\\s*[\"']([^\"']+)[\"']");
|
||||||
private static final Pattern KEY_FUNCTIONS_PATTERN = Pattern.compile("var\\s+k=(\\w+)\\(\\)\\+(\\w+)\\(\\);");
|
|
||||||
private static final String FUNCTION_TEMPLATE = "function\\s+%s\\(\\)\\s*\\{\\s*return\\s+(\\d+);\\s*\\}";
|
|
||||||
private static final String USER_AGENT = "Mozilla/5.0 (Linux; Android 13) ExoPlayerResolver/1.0";
|
|
||||||
|
|
||||||
private StreamUrlResolver() {
|
private StreamUrlResolver() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String resolve(String pageUrl) throws IOException {
|
public static String resolve(String pageUrl) throws IOException {
|
||||||
String html = downloadPage(pageUrl);
|
String html = downloadPage(pageUrl);
|
||||||
long keyOffset = extractKeyOffset(html);
|
|
||||||
List<Entry> entries = extractEntries(html);
|
// Buscar playbackURL directamente en el HTML
|
||||||
if (entries.isEmpty()) {
|
Matcher matcher = PLAYBACK_URL_PATTERN.matcher(html);
|
||||||
throw new IOException("No se pudieron obtener los fragmentos del stream");
|
if (matcher.find()) {
|
||||||
|
String url = matcher.group(1);
|
||||||
|
if (url != null && !url.isEmpty() && url.startsWith("http")) {
|
||||||
|
return url;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuilder builder = new StringBuilder();
|
// Si no encontramos la URL, mostrar un fragmento del HTML para debug
|
||||||
for (Entry entry : entries) {
|
String preview = html.length() > 500 ? html.substring(0, 500) : html;
|
||||||
String decoded = new String(Base64.decode(entry.encoded, Base64.DEFAULT), StandardCharsets.UTF_8);
|
throw new IOException("No se encontró la URL del stream en la página. Vista previa: " + preview);
|
||||||
String numeric = decoded.replaceAll("\\D+", "");
|
|
||||||
if (numeric.isEmpty()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
long value = Long.parseLong(numeric) - keyOffset;
|
|
||||||
builder.append((char) value);
|
|
||||||
}
|
|
||||||
String url = builder.toString();
|
|
||||||
if (url.isEmpty()) {
|
|
||||||
throw new IOException("No se pudo reconstruir la URL del stream");
|
|
||||||
}
|
|
||||||
return url;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String downloadPage(String pageUrl) throws IOException {
|
private static String downloadPage(String pageUrl) throws IOException {
|
||||||
HttpURLConnection connection = (HttpURLConnection) new URL(pageUrl).openConnection();
|
Request request = new Request.Builder()
|
||||||
connection.setConnectTimeout(15000);
|
.url(pageUrl)
|
||||||
connection.setReadTimeout(15000);
|
.header("User-Agent", NetworkUtils.getUserAgent())
|
||||||
connection.setRequestProperty("User-Agent", USER_AGENT);
|
.header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
|
||||||
connection.setRequestProperty("Accept", "text/html,application/xhtml+xml");
|
.header("Accept-Language", "es-ES,es;q=0.9,en;q=0.8")
|
||||||
|
.header("Referer", "https://streamtp10.com/")
|
||||||
|
.build();
|
||||||
|
|
||||||
try {
|
try (Response response = NetworkUtils.getClient().newCall(request).execute()) {
|
||||||
int responseCode = connection.getResponseCode();
|
if (!response.isSuccessful()) {
|
||||||
if (responseCode != HttpURLConnection.HTTP_OK) {
|
throw new IOException("Error HTTP " + response.code() + " al cargar la página del stream");
|
||||||
throw new IOException("Error HTTP " + responseCode + " al cargar la página del stream");
|
}
|
||||||
|
if (response.body() == null) {
|
||||||
|
throw new IOException("Respuesta vacía del servidor");
|
||||||
}
|
}
|
||||||
|
|
||||||
String contentType = connection.getContentType();
|
return response.body().string();
|
||||||
// Validar que sea contenido web (HTML)
|
|
||||||
if (contentType != null && !contentType.contains("html") && !contentType.contains("text")) {
|
|
||||||
// A veces puede venir sin content type o application/octet-stream,
|
|
||||||
// pero si es explícitamente una imagen o algo así, abortamos.
|
|
||||||
if (contentType.startsWith("image/") || contentType.startsWith("video/") || contentType.startsWith("audio/")) {
|
|
||||||
throw new IOException("El servidor devolvió " + contentType + " en lugar de HTML");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
try (BufferedReader reader = new BufferedReader(
|
|
||||||
new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
|
|
||||||
StringBuilder builder = new StringBuilder();
|
|
||||||
String line;
|
|
||||||
while ((line = reader.readLine()) != null) {
|
|
||||||
builder.append(line);
|
|
||||||
}
|
|
||||||
return builder.toString();
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
connection.disconnect();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static long extractKeyOffset(String html) throws IOException {
|
|
||||||
Matcher matcher = KEY_FUNCTIONS_PATTERN.matcher(html);
|
|
||||||
if (!matcher.find()) {
|
|
||||||
throw new IOException("No se encontró la clave del stream");
|
|
||||||
}
|
|
||||||
String first = matcher.group(1);
|
|
||||||
String second = matcher.group(2);
|
|
||||||
long firstVal = extractReturnValue(html, first);
|
|
||||||
long secondVal = extractReturnValue(html, second);
|
|
||||||
return firstVal + secondVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static long extractReturnValue(String html, String functionName) throws IOException {
|
|
||||||
Pattern functionPattern = Pattern.compile(
|
|
||||||
String.format(FUNCTION_TEMPLATE, Pattern.quote(functionName)));
|
|
||||||
Matcher matcher = functionPattern.matcher(html);
|
|
||||||
if (!matcher.find()) {
|
|
||||||
throw new IOException("No se encontró el valor de la función " + functionName);
|
|
||||||
}
|
|
||||||
return Long.parseLong(matcher.group(1));
|
|
||||||
}
|
|
||||||
|
|
||||||
private static List<Entry> extractEntries(String html) throws IOException {
|
|
||||||
Matcher arrayNameMatcher = ARRAY_NAME_PATTERN.matcher(html);
|
|
||||||
if (!arrayNameMatcher.find()) {
|
|
||||||
throw new IOException("No se detectó la variable del arreglo de fragmentos");
|
|
||||||
}
|
|
||||||
String arrayName = arrayNameMatcher.group(1);
|
|
||||||
Pattern arrayPattern = Pattern.compile(Pattern.quote(arrayName) + "=\\[(.*?)\\];", Pattern.DOTALL);
|
|
||||||
Matcher matcher = arrayPattern.matcher(html);
|
|
||||||
if (!matcher.find()) {
|
|
||||||
throw new IOException("No se encontró el arreglo de fragmentos");
|
|
||||||
}
|
|
||||||
String rawEntries = matcher.group(1);
|
|
||||||
Matcher entryMatcher = ENTRY_PATTERN.matcher(rawEntries);
|
|
||||||
List<Entry> entries = new ArrayList<>();
|
|
||||||
while (entryMatcher.find()) {
|
|
||||||
int index = Integer.parseInt(entryMatcher.group(1));
|
|
||||||
String encoded = entryMatcher.group(2);
|
|
||||||
entries.add(new Entry(index, encoded));
|
|
||||||
}
|
|
||||||
Collections.sort(entries, Comparator.comparingInt(e -> e.index));
|
|
||||||
return entries;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final class Entry {
|
|
||||||
final int index;
|
|
||||||
final String encoded;
|
|
||||||
|
|
||||||
Entry(int index, String encoded) {
|
|
||||||
this.index = index;
|
|
||||||
this.encoded = encoded;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ public class UpdateManager {
|
|||||||
private static final String TAG = "UpdateManager";
|
private static final String TAG = "UpdateManager";
|
||||||
private static final String LATEST_RELEASE_URL =
|
private static final String LATEST_RELEASE_URL =
|
||||||
"https://gitea.cbcren.online/api/v1/repos/renato97/app/releases/latest";
|
"https://gitea.cbcren.online/api/v1/repos/renato97/app/releases/latest";
|
||||||
|
private static final String GITEA_TOKEN = "4b94b3610136529861af0821040a801906821a0f";
|
||||||
|
|
||||||
private final Context appContext;
|
private final Context appContext;
|
||||||
private final Handler mainHandler;
|
private final Handler mainHandler;
|
||||||
@@ -74,6 +75,7 @@ public class UpdateManager {
|
|||||||
try {
|
try {
|
||||||
Request request = new Request.Builder()
|
Request request = new Request.Builder()
|
||||||
.url(LATEST_RELEASE_URL)
|
.url(LATEST_RELEASE_URL)
|
||||||
|
.header("Authorization", "token " + GITEA_TOKEN)
|
||||||
.get()
|
.get()
|
||||||
.build();
|
.build();
|
||||||
try (Response response = httpClient.newCall(request).execute()) {
|
try (Response response = httpClient.newCall(request).execute()) {
|
||||||
@@ -247,7 +249,11 @@ public class UpdateManager {
|
|||||||
if (TextUtils.isEmpty(url)) {
|
if (TextUtils.isEmpty(url)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Request request = new Request.Builder().url(url).get().build();
|
Request request = new Request.Builder()
|
||||||
|
.url(url)
|
||||||
|
.header("Authorization", "token " + GITEA_TOKEN)
|
||||||
|
.get()
|
||||||
|
.build();
|
||||||
try (Response response = httpClient.newCall(request).execute()) {
|
try (Response response = httpClient.newCall(request).execute()) {
|
||||||
if (!response.isSuccessful() || response.body() == null) {
|
if (!response.isSuccessful() || response.body() == null) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
45
app/src/main/res/drawable/btn_refresh_selector.xml
Normal file
45
app/src/main/res/drawable/btn_refresh_selector.xml
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<!-- Focused state - bright amber with thick border -->
|
||||||
|
<item android:state_focused="true">
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="@color/refresh_button_focused" />
|
||||||
|
<corners android:radius="8dp" />
|
||||||
|
<stroke
|
||||||
|
android:width="4dp"
|
||||||
|
android:color="@color/refresh_button_focused_border" />
|
||||||
|
<padding
|
||||||
|
android:left="12dp"
|
||||||
|
android:top="8dp"
|
||||||
|
android:right="12dp"
|
||||||
|
android:bottom="8dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<!-- Pressed state -->
|
||||||
|
<item android:state_pressed="true">
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="@color/refresh_button_pressed" />
|
||||||
|
<corners android:radius="8dp" />
|
||||||
|
<stroke
|
||||||
|
android:width="2dp"
|
||||||
|
android:color="@color/refresh_button_border" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<!-- Default state - darker background with subtle border -->
|
||||||
|
<item>
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="@color/refresh_button_default" />
|
||||||
|
<corners android:radius="8dp" />
|
||||||
|
<stroke
|
||||||
|
android:width="2dp"
|
||||||
|
android:color="@color/refresh_button_border" />
|
||||||
|
<padding
|
||||||
|
android:left="12dp"
|
||||||
|
android:top="8dp"
|
||||||
|
android:right="12dp"
|
||||||
|
android:bottom="8dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</selector>
|
||||||
7
app/src/main/res/drawable/scrollbar_vertical.xml
Normal file
7
app/src/main/res/drawable/scrollbar_vertical.xml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<solid android:color="#FFFFFFFF" />
|
||||||
|
<corners android:radius="6dp" />
|
||||||
|
<size android:width="12dp" />
|
||||||
|
</shape>
|
||||||
@@ -72,15 +72,38 @@
|
|||||||
app:layout_constraintStart_toEndOf="@id/divider"
|
app:layout_constraintStart_toEndOf="@id/divider"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:id="@+id/content_title"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/content_title"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
tools:text="Canales" />
|
tools:text="Canales" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/refresh_button"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="36dp"
|
||||||
|
android:text="@string/action_refresh"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:focusable="true"
|
||||||
|
android:focusableInTouchMode="true"
|
||||||
|
android:background="@drawable/btn_refresh_selector"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:elevation="2dp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/loading_indicator"
|
android:id="@+id/loading_indicator"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -105,6 +128,14 @@
|
|||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:overScrollMode="never"
|
android:overScrollMode="never"
|
||||||
|
android:scrollbars="vertical"
|
||||||
|
android:fadeScrollbars="false"
|
||||||
|
android:scrollbarStyle="insideInset"
|
||||||
|
android:scrollbarThumbVertical="@drawable/scrollbar_vertical"
|
||||||
|
android:scrollbarTrackVertical="@color/scrollbar_track"
|
||||||
|
android:scrollbarSize="12dp"
|
||||||
|
android:scrollbarAlwaysDrawVerticalTrack="true"
|
||||||
|
android:scrollbarFadeDuration="0"
|
||||||
android:nextFocusLeft="@id/section_list"
|
android:nextFocusLeft="@id/section_list"
|
||||||
tools:listitem="@layout/item_channel" />
|
tools:listitem="@layout/item_channel" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
android:background="@color/black"
|
android:background="@color/black"
|
||||||
tools:context=".PlayerActivity">
|
tools:context=".PlayerActivity">
|
||||||
|
|
||||||
<com.google.android.exoplayer2.ui.PlayerView
|
<androidx.media3.ui.PlayerView
|
||||||
android:id="@+id/player_view"
|
android:id="@+id/player_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
|||||||
@@ -3,4 +3,14 @@
|
|||||||
<color name="black">#FF000000</color>
|
<color name="black">#FF000000</color>
|
||||||
<color name="white">#FFFFFFFF</color>
|
<color name="white">#FFFFFFFF</color>
|
||||||
<color name="text_secondary">#B3FFFFFF</color>
|
<color name="text_secondary">#B3FFFFFF</color>
|
||||||
|
|
||||||
|
<!-- Refresh button colors -->
|
||||||
|
<color name="refresh_button_default">#2A2A2A</color>
|
||||||
|
<color name="refresh_button_border">#4A4A4A</color>
|
||||||
|
<color name="refresh_button_focused">#FFC107</color>
|
||||||
|
<color name="refresh_button_focused_border">#FFD54F</color>
|
||||||
|
<color name="refresh_button_pressed">#FF9800</color>
|
||||||
|
|
||||||
|
<!-- Scrollbar -->
|
||||||
|
<color name="scrollbar_track">#1A1A1A</color>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
<string name="section_all_channels">Todos los canales</string>
|
<string name="section_all_channels">Todos los canales</string>
|
||||||
<string name="message_no_channels">No hay canales disponibles</string>
|
<string name="message_no_channels">No hay canales disponibles</string>
|
||||||
<string name="message_no_events">No hay eventos disponibles</string>
|
<string name="message_no_events">No hay eventos disponibles</string>
|
||||||
|
<string name="action_refresh">Actualizar</string>
|
||||||
<string name="message_events_error">No se pudieron cargar los eventos: %1$s</string>
|
<string name="message_events_error">No se pudieron cargar los eventos: %1$s</string>
|
||||||
<string name="update_required_title">Actualización obligatoria</string>
|
<string name="update_required_title">Actualización obligatoria</string>
|
||||||
<string name="update_available_title">Actualización disponible</string>
|
<string name="update_available_title">Actualización disponible</string>
|
||||||
|
|||||||
77
create_release.py
Normal file
77
create_release.py
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
import json
|
||||||
|
import urllib.request
|
||||||
|
import urllib.parse
|
||||||
|
import urllib.error
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
GITEA_URL = "https://gitea.cbcren.online/api/v1"
|
||||||
|
REPO_OWNER = "renato97"
|
||||||
|
REPO_NAME = "app"
|
||||||
|
TOKEN = "efeed2af00597883adb04da70bd6a7c2993ae92d"
|
||||||
|
TAG_NAME = "v10.1.7"
|
||||||
|
RELEASE_NAME = "StreamPlayer v10.1.7"
|
||||||
|
CHANGELOG_FILE = "CHANGELOG-v10.1.7.md"
|
||||||
|
APK_FILE = "StreamPlayer-10.1.7-debug.apk"
|
||||||
|
|
||||||
|
def create_release():
|
||||||
|
try:
|
||||||
|
with open(CHANGELOG_FILE, 'r') as f:
|
||||||
|
body = f.read()
|
||||||
|
except FileNotFoundError:
|
||||||
|
print(f"Error: {CHANGELOG_FILE} not found.")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
url = f"{GITEA_URL}/repos/{REPO_OWNER}/{REPO_NAME}/releases"
|
||||||
|
headers = {
|
||||||
|
"Authorization": f"token {TOKEN}",
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
"Accept": "application/json"
|
||||||
|
}
|
||||||
|
data = {
|
||||||
|
"tag_name": TAG_NAME,
|
||||||
|
"target_commitish": "main",
|
||||||
|
"name": RELEASE_NAME,
|
||||||
|
"body": body,
|
||||||
|
"draft": False,
|
||||||
|
"prerelease": False
|
||||||
|
}
|
||||||
|
|
||||||
|
req = urllib.request.Request(url, data=json.dumps(data).encode('utf-8'), headers=headers, method='POST')
|
||||||
|
|
||||||
|
try:
|
||||||
|
with urllib.request.urlopen(req) as response:
|
||||||
|
result = json.loads(response.read().decode('utf-8'))
|
||||||
|
print(f"Release created successfully. ID: {result['id']}")
|
||||||
|
return result['id']
|
||||||
|
except urllib.error.HTTPError as e:
|
||||||
|
print(f"HTTP Error creating release: {e.code} {e.reason}")
|
||||||
|
print(e.read().decode('utf-8'))
|
||||||
|
sys.exit(1)
|
||||||
|
except Exception as e:
|
||||||
|
print(f"Error creating release: {e}")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
def upload_asset(release_id):
|
||||||
|
if not os.path.exists(APK_FILE):
|
||||||
|
print(f"Error: APK file {APK_FILE} not found.")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
url = f"{GITEA_URL}/repos/{REPO_OWNER}/{REPO_NAME}/releases/{release_id}/assets"
|
||||||
|
|
||||||
|
# Simple multipart upload via python is tricky without requests library.
|
||||||
|
# However, Gitea API usually accepts raw binary in body if Content-Type is set,
|
||||||
|
# but Gitea's API for assets usually requires multipart/form-data.
|
||||||
|
# Let's check Gitea API docs...
|
||||||
|
# The standard Gitea API uses POST /repos/{owner}/{repo}/releases/{id}/assets with name query parameter and file content in body
|
||||||
|
# Wait, looking at Gitea API docs (swagger usually available at /api/swagger),
|
||||||
|
# POST /repos/{owner}/{repo}/releases/{id}/assets takes 'attachment' as form-data.
|
||||||
|
|
||||||
|
# Implementing multipart/form-data with urllib is painful.
|
||||||
|
# Instead, I will use curl to upload the asset, using the release ID obtained from Python.
|
||||||
|
return release_id
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
release_id = create_release()
|
||||||
|
print(f"RELEASE_ID={release_id}")
|
||||||
171
event-repository-fix.patch
Normal file
171
event-repository-fix.patch
Normal file
@@ -0,0 +1,171 @@
|
|||||||
|
diff --git a/app/src/main/java/com/streamplayer/EventRepository.java b/app/src/main/java/com/streamplayer/EventRepository.java
|
||||||
|
index f9340c7..7b3f662 100644
|
||||||
|
--- a/app/src/main/java/com/streamplayer/EventRepository.java
|
||||||
|
+++ b/app/src/main/java/com/streamplayer/EventRepository.java
|
||||||
|
@@ -29,8 +29,17 @@ public class EventRepository {
|
||||||
|
private static final String PREFS_NAME = "events_cache";
|
||||||
|
private static final String KEY_JSON = "json";
|
||||||
|
private static final String KEY_TIMESTAMP = "timestamp";
|
||||||
|
+ private static final String KEY_WORKING_URL = "working_url";
|
||||||
|
private static final long CACHE_DURATION = 24L * 60 * 60 * 1000; // 24 horas
|
||||||
|
- private static final String EVENTS_URL = "https://streamtpcloud.com/eventos.json";
|
||||||
|
+
|
||||||
|
+ // Lista de URLs a intentar en orden (con sistema de fallback)
|
||||||
|
+ private static final String[] EVENT_URLS = {
|
||||||
|
+ "https://streamtpcloud.com/eventos.json", // URL original
|
||||||
|
+ "https://streamtp10.com/eventos.json", // URL actual
|
||||||
|
+ "https://streamtpmedia.com/eventos.json" // URL anterior
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ private static final String DEFAULT_EVENTS_URL = "https://streamtpcloud.com/eventos.json";
|
||||||
|
|
||||||
|
public interface Callback {
|
||||||
|
void onSuccess(List<EventItem> events);
|
||||||
|
@@ -55,7 +64,7 @@ public class EventRepository {
|
||||||
|
|
||||||
|
new Thread(() -> {
|
||||||
|
try {
|
||||||
|
- String json = downloadJson();
|
||||||
|
+ String json = downloadJson(context);
|
||||||
|
List<EventItem> events = parseEvents(json);
|
||||||
|
prefs.edit().putString(KEY_JSON, json).putLong(KEY_TIMESTAMP, System.currentTimeMillis()).apply();
|
||||||
|
callback.onSuccess(events);
|
||||||
|
@@ -73,27 +82,103 @@ public class EventRepository {
|
||||||
|
}).start();
|
||||||
|
}
|
||||||
|
|
||||||
|
- private String downloadJson() throws IOException {
|
||||||
|
- URL url = new URL(EVENTS_URL);
|
||||||
|
+ private String downloadJson(Context context) throws IOException {
|
||||||
|
+ SharedPreferences prefs = context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);
|
||||||
|
+ String savedWorkingUrl = prefs.getString(KEY_WORKING_URL, null);
|
||||||
|
+
|
||||||
|
+ // Construir lista de URLs a intentar
|
||||||
|
+ // Primero la URL que funcionó la última vez, luego el resto
|
||||||
|
+ List<String> urlsToTry = new ArrayList<>();
|
||||||
|
+ if (savedWorkingUrl != null && !savedWorkingUrl.isEmpty()) {
|
||||||
|
+ urlsToTry.add(savedWorkingUrl);
|
||||||
|
+ }
|
||||||
|
+ for (String url : EVENT_URLS) {
|
||||||
|
+ if (!urlsToTry.contains(url)) {
|
||||||
|
+ urlsToTry.add(url);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ IOException lastException = null;
|
||||||
|
+
|
||||||
|
+ // Intentar cada URL en orden
|
||||||
|
+ for (String urlString : urlsToTry) {
|
||||||
|
+ try {
|
||||||
|
+ String json = downloadFromUrl(urlString);
|
||||||
|
+ // Guardar la URL que funcionó
|
||||||
|
+ prefs.edit().putString(KEY_WORKING_URL, urlString).apply();
|
||||||
|
+ return json;
|
||||||
|
+ } catch (IOException e) {
|
||||||
|
+ lastException = e;
|
||||||
|
+ // Continuar con la siguiente URL
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ // Si todas fallaron, lanzar la última excepción
|
||||||
|
+ throw new IOException("No se pudo conectar a ninguna de las URLs disponibles. Último error: " +
|
||||||
|
+ (lastException != null ? lastException.getMessage() : "Error desconocido"));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ private String downloadFromUrl(String urlString) throws IOException {
|
||||||
|
+ URL url = new URL(urlString);
|
||||||
|
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
||||||
|
connection.setConnectTimeout(15000);
|
||||||
|
connection.setReadTimeout(15000);
|
||||||
|
connection.setRequestMethod("GET");
|
||||||
|
connection.setRequestProperty("Accept", "application/json");
|
||||||
|
connection.setRequestProperty("User-Agent", "StreamPlayer/1.0");
|
||||||
|
-
|
||||||
|
+
|
||||||
|
+ // Habilitar seguimiento de redirecciones automáticamente
|
||||||
|
+ connection.setInstanceFollowRedirects(true);
|
||||||
|
+
|
||||||
|
+ String currentUrl = urlString;
|
||||||
|
+ int redirectCount = 0;
|
||||||
|
+ final int MAX_REDIRECTS = 5;
|
||||||
|
+
|
||||||
|
try {
|
||||||
|
int responseCode = connection.getResponseCode();
|
||||||
|
+
|
||||||
|
+ // Seguir redirecciones manualmente si es necesario
|
||||||
|
+ while (isRedirect(responseCode) && redirectCount < MAX_REDIRECTS) {
|
||||||
|
+ redirectCount++;
|
||||||
|
+ String newUrl = connection.getHeaderField("Location");
|
||||||
|
+
|
||||||
|
+ if (newUrl == null) {
|
||||||
|
+ throw new IOException("Redirección sin cabecera Location");
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ // Manejar URLs relativas
|
||||||
|
+ if (newUrl.startsWith("/")) {
|
||||||
|
+ newUrl = url.getProtocol() + "://" + url.getHost() + newUrl;
|
||||||
|
+ } else if (!newUrl.startsWith("http")) {
|
||||||
|
+ newUrl = url.getProtocol() + "://" + url.getHost() +
|
||||||
|
+ (url.getPort() > 0 ? ":" + url.getPort() : "") + "/" + newUrl;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ currentUrl = newUrl;
|
||||||
|
+ url = new URL(currentUrl);
|
||||||
|
+ connection.disconnect();
|
||||||
|
+
|
||||||
|
+ connection = (HttpURLConnection) url.openConnection();
|
||||||
|
+ connection.setConnectTimeout(15000);
|
||||||
|
+ connection.setReadTimeout(15000);
|
||||||
|
+ connection.setRequestMethod("GET");
|
||||||
|
+ connection.setRequestProperty("Accept", "application/json");
|
||||||
|
+ connection.setRequestProperty("User-Agent", "StreamPlayer/1.0");
|
||||||
|
+ connection.setInstanceFollowRedirects(true);
|
||||||
|
+
|
||||||
|
+ responseCode = connection.getResponseCode();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (responseCode != HttpURLConnection.HTTP_OK) {
|
||||||
|
throw new IOException("Error HTTP " + responseCode + ": " + connection.getResponseMessage());
|
||||||
|
}
|
||||||
|
-
|
||||||
|
+
|
||||||
|
String contentType = connection.getContentType();
|
||||||
|
// Permitir json o text/plain (Raw de Gitea a veces es text/plain)
|
||||||
|
if (contentType != null && !contentType.contains("json") && !contentType.contains("text/plain")) {
|
||||||
|
throw new IOException("El servidor devolvió " + contentType + " en lugar de JSON. Verifica que la URL sea correcta.");
|
||||||
|
}
|
||||||
|
-
|
||||||
|
+
|
||||||
|
try (BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
|
||||||
|
StringBuilder builder = new StringBuilder();
|
||||||
|
String line;
|
||||||
|
@@ -101,12 +186,12 @@ public class EventRepository {
|
||||||
|
builder.append(line);
|
||||||
|
}
|
||||||
|
String response = builder.toString();
|
||||||
|
-
|
||||||
|
+
|
||||||
|
// Validar que no sea HTML
|
||||||
|
if (response.trim().startsWith("<!") || response.trim().startsWith("<html")) {
|
||||||
|
throw new IOException("El servidor devolvió HTML en lugar de JSON. La URL del endpoint puede estar incorrecta o el servidor tiene problemas.");
|
||||||
|
}
|
||||||
|
-
|
||||||
|
+
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
@@ -114,6 +199,14 @@ public class EventRepository {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ private boolean isRedirect(int statusCode) {
|
||||||
|
+ return statusCode == HttpURLConnection.HTTP_MOVED_PERM ||
|
||||||
|
+ statusCode == HttpURLConnection.HTTP_MOVED_TEMP ||
|
||||||
|
+ statusCode == HttpURLConnection.HTTP_SEE_OTHER ||
|
||||||
|
+ statusCode == 307 || // Temporary Redirect
|
||||||
|
+ statusCode == 308; // Permanent Redirect
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
private List<EventItem> parseEvents(String json) throws JSONException {
|
||||||
|
if (json == null || json.trim().isEmpty()) {
|
||||||
|
throw new JSONException("La respuesta está vacía");
|
||||||
16
eventos.json
Normal file
16
eventos.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"title": "Partido de Prueba",
|
||||||
|
"time": "22:00",
|
||||||
|
"category": "Fútbol",
|
||||||
|
"status": "EN VIVO",
|
||||||
|
"link": "https://streamtpmedia.com/global2.php?stream=espn"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Canal Deportivo",
|
||||||
|
"time": "15:30",
|
||||||
|
"category": "Deportes",
|
||||||
|
"status": "PRÓXIMO",
|
||||||
|
"link": "https://streamtpmedia.com/global2.php?stream=foxsports"
|
||||||
|
}
|
||||||
|
]
|
||||||
1
everything-claude-code
Submodule
1
everything-claude-code
Submodule
Submodule everything-claude-code added at 56ff5d444b
391
opus.md
Normal file
391
opus.md
Normal file
@@ -0,0 +1,391 @@
|
|||||||
|
# StreamPlayer - Instrucciones para Desarrollo
|
||||||
|
|
||||||
|
Este documento contiene instrucciones, bugs conocidos, mejoras sugeridas y buenas practicas para el desarrollo de StreamPlayer.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. Descripcion del Proyecto
|
||||||
|
|
||||||
|
**StreamPlayer** es una aplicacion Android TV para reproducir streams de deportes en vivo. Esta optimizada para uso con control remoto (D-pad) y pantallas grandes.
|
||||||
|
|
||||||
|
### Plataforma objetivo
|
||||||
|
- **Primario**: Android TV (Leanback)
|
||||||
|
- **Secundario**: Dispositivos moviles (soporte basico)
|
||||||
|
|
||||||
|
### Stack Tecnologico
|
||||||
|
- **Lenguaje**: Java 8
|
||||||
|
- **Reproductor**: ExoPlayer 2.18.7
|
||||||
|
- **HTTP Client**: OkHttp 4.12.0 con DNS over HTTPS
|
||||||
|
- **Min SDK**: 21 (Android 5.0)
|
||||||
|
- **Target SDK**: 33 (Android 13)
|
||||||
|
|
||||||
|
### Repositorio
|
||||||
|
- **URL**: `https://gitea.cbcren.online/renato97/app.git`
|
||||||
|
- **Usuario**: `renato97`
|
||||||
|
- **Token**: `4b94b3610136529861af0821040a801906821a0f`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. Estructura del Codigo
|
||||||
|
|
||||||
|
```
|
||||||
|
app/src/main/java/com/streamplayer/
|
||||||
|
|-- MainActivity.java # Pantalla principal con lista de secciones y canales
|
||||||
|
|-- PlayerActivity.java # Reproductor de video con ExoPlayer
|
||||||
|
|-- StreamUrlResolver.java # Extrae URL m3u8 de la pagina del proveedor
|
||||||
|
|-- EventRepository.java # Carga eventos desde JSON remoto
|
||||||
|
|-- ChannelRepository.java # Lista estatica de canales disponibles
|
||||||
|
|-- UpdateManager.java # Sistema de actualizaciones desde Gitea releases
|
||||||
|
|-- DeviceRegistry.java # Registro de dispositivos y bloqueo remoto
|
||||||
|
|-- DNSSetter.java # Configuracion de DNS (parcialmente funcional)
|
||||||
|
|-- EventItem.java # Modelo de datos para eventos
|
||||||
|
|-- StreamChannel.java # Modelo de datos para canales
|
||||||
|
|-- EventAdapter.java # RecyclerView adapter para eventos
|
||||||
|
|-- ChannelAdapter.java # RecyclerView adapter para canales
|
||||||
|
|-- SectionAdapter.java # RecyclerView adapter para menu lateral
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. Bugs Conocidos y Potenciales
|
||||||
|
|
||||||
|
### 3.1 CRITICO: DNSSetter.java es inefectivo
|
||||||
|
|
||||||
|
**Archivo**: `DNSSetter.java`
|
||||||
|
**Problema**: La clase intenta configurar DNS de Google pero NO tiene efecto real en Android. Las propiedades del sistema (`System.setProperty`) no afectan la resolucion DNS del sistema operativo.
|
||||||
|
|
||||||
|
**Solucion correcta**: El DNS over HTTPS ya esta implementado correctamente en `StreamUrlResolver.java` y `PlayerActivity.java` usando `OkHttpClient` con `DnsOverHttps`. La clase `DNSSetter` puede eliminarse o dejarse como placeholder.
|
||||||
|
|
||||||
|
**Accion sugerida**:
|
||||||
|
- Eliminar la llamada `DNSSetter.configureDNSToGoogle(this)` en `PlayerActivity.java:82`
|
||||||
|
- O mantenerla como no-op para futura expansion
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 3.2 MEDIO: Dominio obsoleto en DNSSetter
|
||||||
|
|
||||||
|
**Archivo**: `DNSSetter.java:86`
|
||||||
|
**Problema**: Pre-resuelve `streamtpmedia.com` que ya no existe (migrado a `streamtpcloud.com`)
|
||||||
|
|
||||||
|
**Fix**:
|
||||||
|
```java
|
||||||
|
// Cambiar de:
|
||||||
|
String[] domains = {"streamtpmedia.com", "google.com", "doubleclick.net"};
|
||||||
|
// A:
|
||||||
|
String[] domains = {"streamtpcloud.com", "google.com"};
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 3.3 BAJO: Posible memory leak en NetworkCallback
|
||||||
|
|
||||||
|
**Archivo**: `DNSSetter.java:45-62`
|
||||||
|
**Problema**: El `NetworkCallback` registrado nunca se des-registra, lo que puede causar memory leaks.
|
||||||
|
|
||||||
|
**Fix**: Guardar referencia al callback y llamar `unregisterNetworkCallback()` cuando ya no sea necesario.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 3.4 BAJO: EventAdapter usa notifyDataSetChanged()
|
||||||
|
|
||||||
|
**Archivo**: `EventAdapter.java:31`, `ChannelAdapter.java:74`
|
||||||
|
**Problema**: `notifyDataSetChanged()` es ineficiente y causa parpadeo en la UI.
|
||||||
|
|
||||||
|
**Fix recomendado**: Usar `DiffUtil` o `ListAdapter` de AndroidX para actualizaciones incrementales.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 3.5 BAJO: Hardcoded strings en layouts
|
||||||
|
|
||||||
|
**Archivo**: `activity_player.xml:44`
|
||||||
|
**Problema**: El texto "Elegir otro" esta hardcodeado en lugar de usar `@string/`
|
||||||
|
|
||||||
|
**Fix**: Agregar string resource y referenciarla.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 3.6 POTENCIAL: Sin manejo de rotacion de pantalla
|
||||||
|
|
||||||
|
**Archivo**: `MainActivity.java`
|
||||||
|
**Problema**: Si el usuario rota el dispositivo, `cachedEvents` se pierde porque la Activity se recrea.
|
||||||
|
|
||||||
|
**Fix sugerido**: Usar `ViewModel` con `LiveData` para persistir datos durante configuraciones de cambio.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. Nice to Have (Features Deseadas)
|
||||||
|
|
||||||
|
### 4.1 ALTA PRIORIDAD: Selector de calidad manual
|
||||||
|
|
||||||
|
**Estado actual**: El reproductor fuerza maxima calidad con `setForceHighestSupportedBitrate(true)`
|
||||||
|
|
||||||
|
**Mejora**: Agregar un boton/menu en `PlayerActivity` que permita al usuario elegir entre calidades disponibles (Auto, 1080p, 720p, 480p, etc.)
|
||||||
|
|
||||||
|
**Implementacion sugerida**:
|
||||||
|
```java
|
||||||
|
// En PlayerActivity, agregar metodo para cambiar calidad:
|
||||||
|
private void setVideoQuality(int maxHeight) {
|
||||||
|
DefaultTrackSelector.Parameters params = trackSelector.buildUponParameters()
|
||||||
|
.setMaxVideoSize(Integer.MAX_VALUE, maxHeight)
|
||||||
|
.setForceHighestSupportedBitrate(false)
|
||||||
|
.build();
|
||||||
|
trackSelector.setParameters(params);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 4.2 ALTA PRIORIDAD: Favoritos / Canales recientes
|
||||||
|
|
||||||
|
**Descripcion**: Permitir marcar canales como favoritos y mostrar historial de canales vistos recientemente.
|
||||||
|
|
||||||
|
**Implementacion sugerida**:
|
||||||
|
- Usar `SharedPreferences` para guardar lista de favoritos (IDs o nombres)
|
||||||
|
- Agregar seccion "Favoritos" y "Recientes" en `buildSections()`
|
||||||
|
- Agregar icono de estrella en `item_channel.xml`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 4.3 MEDIA PRIORIDAD: Busqueda de canales/eventos
|
||||||
|
|
||||||
|
**Descripcion**: Agregar campo de busqueda para filtrar canales y eventos por nombre.
|
||||||
|
|
||||||
|
**Implementacion**:
|
||||||
|
- Agregar `SearchView` o `EditText` en `activity_main.xml`
|
||||||
|
- Filtrar `channelAdapter` y `eventAdapter` segun texto ingresado
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 4.4 MEDIA PRIORIDAD: Barra de info del canal
|
||||||
|
|
||||||
|
**Descripcion**: En Android TV, mostrar overlay con info del canal actual (nombre, logo, evento en curso) que aparezca brevemente al cambiar de canal y al presionar OK/Select.
|
||||||
|
|
||||||
|
**Implementacion**:
|
||||||
|
- Agregar layout overlay en `activity_player.xml`
|
||||||
|
- Mostrar con animacion fade-in/fade-out
|
||||||
|
- Auto-ocultar despues de 5 segundos
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 4.5 MEDIA PRIORIDAD: Navegacion con D-pad mejorada
|
||||||
|
|
||||||
|
**Descripcion**: Mejorar la navegacion con control remoto de Android TV.
|
||||||
|
|
||||||
|
**Implementacion**:
|
||||||
|
- Asegurar que todos los elementos sean focusables
|
||||||
|
- Agregar `nextFocusUp/Down/Left/Right` en layouts
|
||||||
|
- Feedback visual claro del elemento enfocado
|
||||||
|
- Soporte para boton MENU del control remoto
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 4.6 MEDIA PRIORIDAD: Canal anterior (Last Channel)
|
||||||
|
|
||||||
|
**Descripcion**: Permitir volver al canal anterior con un boton (como en TV tradicional).
|
||||||
|
|
||||||
|
**Implementacion**:
|
||||||
|
- Guardar ultimo canal visto en variable
|
||||||
|
- Mapear boton BACK largo o tecla especifica para cambiar
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 4.7 BAJA PRIORIDAD: EPG (Guia de programacion)
|
||||||
|
|
||||||
|
**Descripcion**: Mostrar que esta transmitiendo cada canal en tiempo real (requiere fuente de datos EPG).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. Buenas Practicas a Seguir
|
||||||
|
|
||||||
|
### 5.1 Validacion de respuestas HTTP
|
||||||
|
|
||||||
|
**SIEMPRE** validar que las respuestas HTTP no sean HTML antes de parsear JSON:
|
||||||
|
|
||||||
|
```java
|
||||||
|
String response = ...;
|
||||||
|
String trimmed = response.trim();
|
||||||
|
if (trimmed.startsWith("<!") || trimmed.startsWith("<html")) {
|
||||||
|
throw new IOException("El servidor devolvio HTML en lugar de JSON");
|
||||||
|
}
|
||||||
|
JSONObject json = new JSONObject(response);
|
||||||
|
```
|
||||||
|
|
||||||
|
Esto ya esta implementado en `EventRepository`, `UpdateManager`, `DeviceRegistry`. Mantener este patron.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 5.2 DNS over HTTPS
|
||||||
|
|
||||||
|
Para evitar bloqueos de ISP, usar OkHttpClient con DnsOverHttps:
|
||||||
|
|
||||||
|
```java
|
||||||
|
OkHttpClient bootstrap = new OkHttpClient.Builder().build();
|
||||||
|
DnsOverHttps dns = new DnsOverHttps.Builder()
|
||||||
|
.client(bootstrap)
|
||||||
|
.url(HttpUrl.get("https://dns.google/dns-query"))
|
||||||
|
.bootstrapDnsHosts(
|
||||||
|
InetAddress.getByName("8.8.8.8"),
|
||||||
|
InetAddress.getByName("8.8.4.4"))
|
||||||
|
.build();
|
||||||
|
OkHttpClient client = bootstrap.newBuilder().dns(dns).build();
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 5.3 Threading
|
||||||
|
|
||||||
|
- Operaciones de red SIEMPRE en thread secundario
|
||||||
|
- Actualizaciones de UI SIEMPRE en main thread via `runOnUiThread()` o `Handler`
|
||||||
|
- Preferir `ExecutorService` sobre `new Thread()` para mejor manejo
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 5.4 Strings
|
||||||
|
|
||||||
|
- Todos los textos visibles deben estar en `res/values/strings.xml`
|
||||||
|
- Usar placeholders `%1$s`, `%2$d` para strings con variables
|
||||||
|
- Evitar hardcodear strings en Java o XML
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 5.5 Recursos
|
||||||
|
|
||||||
|
- No usar `notifyDataSetChanged()` - preferir `DiffUtil`
|
||||||
|
- Liberar recursos en `onDestroy()` (players, executors, receivers)
|
||||||
|
- Usar `WeakReference` para evitar memory leaks con Activities
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 5.6 Versionado
|
||||||
|
|
||||||
|
El versionCode sigue el patron `MAJOR * 10000 + MINOR * 100 + PATCH`:
|
||||||
|
- `10.0.7` = `100700`
|
||||||
|
- `10.1.0` = `100100`
|
||||||
|
- `11.0.0` = `110000`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 6. Flujo de Trabajo para Releases
|
||||||
|
|
||||||
|
### 6.1 Incrementar version
|
||||||
|
|
||||||
|
Editar `app/build.gradle`:
|
||||||
|
```gradle
|
||||||
|
versionCode 100800 // Incrementar
|
||||||
|
versionName "10.0.8"
|
||||||
|
```
|
||||||
|
|
||||||
|
### 6.2 Compilar
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./gradlew assembleDebug
|
||||||
|
```
|
||||||
|
|
||||||
|
### 6.3 Preparar APK
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cp app/build/outputs/apk/debug/app-debug.apk ./StreamPlayer-v10.0.8-debug.apk
|
||||||
|
```
|
||||||
|
|
||||||
|
### 6.4 Commit y push
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git add -A
|
||||||
|
git commit -m "Descripcion del cambio (v10.0.8)"
|
||||||
|
git tag v10.0.8
|
||||||
|
git push origin main
|
||||||
|
git push origin v10.0.8
|
||||||
|
```
|
||||||
|
|
||||||
|
### 6.5 Crear release en Gitea
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -s -u renato97:wlillidan1 -X POST \
|
||||||
|
"https://gitea.cbcren.online/api/v1/repos/renato97/app/releases" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"tag_name": "v10.0.8",
|
||||||
|
"name": "StreamPlayer v10.0.8 - Titulo",
|
||||||
|
"body": "## Cambios\n- Descripcion de cambios",
|
||||||
|
"prerelease": false
|
||||||
|
}'
|
||||||
|
```
|
||||||
|
|
||||||
|
### 6.6 Subir APK al release
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Reemplazar {RELEASE_ID} con el ID devuelto en paso anterior
|
||||||
|
curl -s -u renato97:wlillidan1 -X POST \
|
||||||
|
"https://gitea.cbcren.online/api/v1/repos/renato97/app/releases/{RELEASE_ID}/assets?name=StreamPlayer-v10.0.8.apk" \
|
||||||
|
--data-binary @./StreamPlayer-v10.0.8-debug.apk \
|
||||||
|
-H "Content-Type: application/vnd.android.package-archive"
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 7. URLs y Endpoints Importantes
|
||||||
|
|
||||||
|
| Descripcion | URL |
|
||||||
|
|-------------|-----|
|
||||||
|
| Eventos JSON | `https://streamtpcloud.com/eventos.json` |
|
||||||
|
| Pagina de canal | `https://streamtpcloud.com/global2.php?stream={nombre}` |
|
||||||
|
| Device Registry | `http://194.163.191.200:4000/api/devices/register` |
|
||||||
|
| Releases API | `https://gitea.cbcren.online/api/v1/repos/renato97/app/releases/latest` |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 8. Patron de extraccion de stream URL
|
||||||
|
|
||||||
|
El proveedor cambia frecuentemente como oculta la URL del stream. Actualmente:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
// En la pagina del canal
|
||||||
|
var playbackURL = "https://...m3u8?token=...";
|
||||||
|
```
|
||||||
|
|
||||||
|
El patron regex actual en `StreamUrlResolver.java`:
|
||||||
|
```java
|
||||||
|
Pattern.compile("var\\s+playbackURL\\s*=\\s*[\"']([^\"']+)[\"']");
|
||||||
|
```
|
||||||
|
|
||||||
|
Si el proveedor cambia el formato, actualizar este patron.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 9. Ajuste de Zona Horaria
|
||||||
|
|
||||||
|
Los eventos vienen con hora de Espana. Para Argentina se aplica +2 horas:
|
||||||
|
|
||||||
|
```java
|
||||||
|
// En EventRepository.parseEvents()
|
||||||
|
LocalTime adjustedTime = localTime.plusHours(2);
|
||||||
|
```
|
||||||
|
|
||||||
|
Si se necesita soportar otras zonas horarias, considerar hacer este offset configurable.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 10. Dependencias Clave
|
||||||
|
|
||||||
|
```gradle
|
||||||
|
// ExoPlayer
|
||||||
|
implementation 'com.google.android.exoplayer:exoplayer:2.18.7'
|
||||||
|
implementation 'com.google.android.exoplayer:extension-okhttp:2.18.7'
|
||||||
|
|
||||||
|
// OkHttp con DNS over HTTPS
|
||||||
|
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
|
||||||
|
implementation 'com.squareup.okhttp3:okhttp-dnsoverhttps:4.12.0'
|
||||||
|
```
|
||||||
|
|
||||||
|
**IMPORTANTE**: ExoPlayer 2.18.x es la ultima version antes de la migracion a Media3. Si se actualiza a Media3, cambiar imports de `com.google.android.exoplayer2.*` a `androidx.media3.*`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 11. Notas Finales
|
||||||
|
|
||||||
|
- La app esta disenada para Android TV con control remoto D-pad
|
||||||
|
- El layout usa panel lateral estilo Leanback para navegacion con D-pad
|
||||||
|
- Los canales estan hardcodeados en `ChannelRepository.java` - no hay backend dinamico
|
||||||
|
- El sistema de actualizaciones depende de Gitea releases con token de autenticacion
|
||||||
|
- El Device Registry permite bloquear dispositivos remotamente desde un dashboard externo
|
||||||
|
- NO implementar features de movil como PiP, Chromecast, notificaciones push - el foco es Android TV
|
||||||
305
todo.md
Normal file
305
todo.md
Normal file
@@ -0,0 +1,305 @@
|
|||||||
|
# Migracion de ExoPlayer 2.x a Media3
|
||||||
|
|
||||||
|
## Objetivo
|
||||||
|
Migrar StreamPlayer de ExoPlayer 2.18.7 a AndroidX Media3 1.5.0 para obtener:
|
||||||
|
- Soporte activo y actualizaciones de seguridad
|
||||||
|
- Mejor integracion con Android TV/Leanback
|
||||||
|
- MediaSession integrado para controles del sistema
|
||||||
|
|
||||||
|
## Version objetivo
|
||||||
|
- **Media3**: 1.5.0
|
||||||
|
- **Nueva version app**: 10.1.0 (versionCode: 100100)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# PASO 1: Actualizar build.gradle
|
||||||
|
|
||||||
|
## Archivo: `app/build.gradle`
|
||||||
|
|
||||||
|
### 1.1 Cambiar dependencias
|
||||||
|
|
||||||
|
**ELIMINAR estas lineas (51-55):**
|
||||||
|
```gradle
|
||||||
|
// ExoPlayer para reproducción de video
|
||||||
|
implementation 'com.google.android.exoplayer:exoplayer:2.18.7'
|
||||||
|
implementation 'com.google.android.exoplayer:extension-okhttp:2.18.7'
|
||||||
|
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
|
||||||
|
implementation 'com.squareup.okhttp3:okhttp-dnsoverhttps:4.12.0'
|
||||||
|
```
|
||||||
|
|
||||||
|
**AGREGAR estas lineas en su lugar:**
|
||||||
|
```gradle
|
||||||
|
// Media3 para reproduccion de video (Android TV optimizado)
|
||||||
|
implementation 'androidx.media3:media3-exoplayer:1.5.0'
|
||||||
|
implementation 'androidx.media3:media3-exoplayer-hls:1.5.0'
|
||||||
|
implementation 'androidx.media3:media3-datasource-okhttp:1.5.0'
|
||||||
|
implementation 'androidx.media3:media3-ui:1.5.0'
|
||||||
|
implementation 'androidx.media3:media3-ui-leanback:1.5.0'
|
||||||
|
implementation 'androidx.media3:media3-session:1.5.0'
|
||||||
|
|
||||||
|
// OkHttp con DNS over HTTPS
|
||||||
|
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
|
||||||
|
implementation 'com.squareup.okhttp3:okhttp-dnsoverhttps:4.12.0'
|
||||||
|
```
|
||||||
|
|
||||||
|
### 1.2 Actualizar version
|
||||||
|
|
||||||
|
**CAMBIAR (lineas 11-12):**
|
||||||
|
```gradle
|
||||||
|
versionCode 100100
|
||||||
|
versionName "10.1.0"
|
||||||
|
```
|
||||||
|
|
||||||
|
### 1.3 Actualizar compileSdk (opcional pero recomendado)
|
||||||
|
|
||||||
|
**CAMBIAR (linea 5):**
|
||||||
|
```gradle
|
||||||
|
compileSdk 34
|
||||||
|
```
|
||||||
|
|
||||||
|
**CAMBIAR (linea 10):**
|
||||||
|
```gradle
|
||||||
|
targetSdk 34
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# PASO 2: Actualizar PlayerActivity.java
|
||||||
|
|
||||||
|
## Archivo: `app/src/main/java/com/streamplayer/PlayerActivity.java`
|
||||||
|
|
||||||
|
### 2.1 Cambiar TODOS los imports
|
||||||
|
|
||||||
|
**ELIMINAR estos imports (lineas 14-24):**
|
||||||
|
```java
|
||||||
|
import com.google.android.exoplayer2.ExoPlayer;
|
||||||
|
import com.google.android.exoplayer2.MediaItem;
|
||||||
|
import com.google.android.exoplayer2.PlaybackException;
|
||||||
|
import com.google.android.exoplayer2.Player;
|
||||||
|
import com.google.android.exoplayer2.DefaultRenderersFactory;
|
||||||
|
import com.google.android.exoplayer2.trackselection.DefaultTrackSelector;
|
||||||
|
import com.google.android.exoplayer2.ext.okhttp.OkHttpDataSource;
|
||||||
|
import com.google.android.exoplayer2.source.MediaSource;
|
||||||
|
import com.google.android.exoplayer2.source.hls.HlsMediaSource;
|
||||||
|
import com.google.android.exoplayer2.ui.PlayerView;
|
||||||
|
import com.google.android.exoplayer2.util.Util;
|
||||||
|
```
|
||||||
|
|
||||||
|
**AGREGAR estos imports en su lugar:**
|
||||||
|
```java
|
||||||
|
import androidx.media3.exoplayer.ExoPlayer;
|
||||||
|
import androidx.media3.common.MediaItem;
|
||||||
|
import androidx.media3.common.PlaybackException;
|
||||||
|
import androidx.media3.common.Player;
|
||||||
|
import androidx.media3.exoplayer.DefaultRenderersFactory;
|
||||||
|
import androidx.media3.exoplayer.trackselection.DefaultTrackSelector;
|
||||||
|
import androidx.media3.datasource.okhttp.OkHttpDataSource;
|
||||||
|
import androidx.media3.exoplayer.source.MediaSource;
|
||||||
|
import androidx.media3.exoplayer.hls.HlsMediaSource;
|
||||||
|
import androidx.media3.ui.PlayerView;
|
||||||
|
import androidx.media3.common.util.Util;
|
||||||
|
import androidx.annotation.OptIn;
|
||||||
|
import androidx.media3.common.util.UnstableApi;
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2.2 Agregar anotacion @OptIn a la clase
|
||||||
|
|
||||||
|
**ANTES de la declaracion de clase (linea 37), AGREGAR:**
|
||||||
|
```java
|
||||||
|
@OptIn(markerClass = UnstableApi.class)
|
||||||
|
public class PlayerActivity extends AppCompatActivity {
|
||||||
|
```
|
||||||
|
|
||||||
|
Esto es necesario porque algunas APIs de Media3 estan marcadas como "unstable" pero son perfectamente funcionales.
|
||||||
|
|
||||||
|
### 2.3 Cambiar metodo buildMediaSource
|
||||||
|
|
||||||
|
**El metodo buildMediaSource (lineas 188-200) debe quedar asi:**
|
||||||
|
|
||||||
|
```java
|
||||||
|
private MediaSource buildMediaSource(MediaItem mediaItem) {
|
||||||
|
Map<String, String> headers = new HashMap<>();
|
||||||
|
headers.put("Referer", channelUrl);
|
||||||
|
headers.put("Origin", "https://streamtpcloud.com");
|
||||||
|
headers.put("Accept", "*/*");
|
||||||
|
headers.put("Connection", "keep-alive");
|
||||||
|
|
||||||
|
String userAgent = Util.getUserAgent(this, "StreamPlayer");
|
||||||
|
|
||||||
|
OkHttpDataSource.Factory factory = new OkHttpDataSource.Factory(provideOkHttpClient())
|
||||||
|
.setUserAgent(userAgent)
|
||||||
|
.setDefaultRequestProperties(headers);
|
||||||
|
return new HlsMediaSource.Factory(factory).createMediaSource(mediaItem);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**NOTA**: El codigo es casi identico, solo cambian los imports. Verificar que compile.
|
||||||
|
|
||||||
|
### 2.4 Verificar compatibilidad de DefaultTrackSelector
|
||||||
|
|
||||||
|
El metodo `setForceHighestSupportedBitrate(true)` sigue existiendo en Media3, no requiere cambios.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# PASO 3: Actualizar activity_player.xml
|
||||||
|
|
||||||
|
## Archivo: `app/src/main/res/layout/activity_player.xml`
|
||||||
|
|
||||||
|
### 3.1 Cambiar el namespace del PlayerView
|
||||||
|
|
||||||
|
**CAMBIAR (linea 10):**
|
||||||
|
```xml
|
||||||
|
<com.google.android.exoplayer2.ui.PlayerView
|
||||||
|
```
|
||||||
|
|
||||||
|
**POR:**
|
||||||
|
```xml
|
||||||
|
<androidx.media3.ui.PlayerView
|
||||||
|
```
|
||||||
|
|
||||||
|
El resto de atributos (`app:resize_mode`, `app:use_controller`) siguen funcionando igual.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# PASO 4: Sincronizar y Compilar
|
||||||
|
|
||||||
|
### 4.1 Sync Gradle
|
||||||
|
Ejecutar:
|
||||||
|
```bash
|
||||||
|
./gradlew --refresh-dependencies
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4.2 Limpiar y compilar
|
||||||
|
```bash
|
||||||
|
./gradlew clean assembleDebug
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4.3 Verificar errores
|
||||||
|
Si hay errores de compilacion, revisar:
|
||||||
|
1. Que todos los imports esten actualizados
|
||||||
|
2. Que la anotacion `@OptIn` este presente
|
||||||
|
3. Que el namespace en XML este correcto
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# PASO 5: Testing
|
||||||
|
|
||||||
|
### 5.1 Probar en Android TV
|
||||||
|
- Instalar APK en dispositivo Android TV
|
||||||
|
- Verificar que los canales cargan correctamente
|
||||||
|
- Verificar que la calidad se mantiene en maxima
|
||||||
|
- Verificar navegacion con D-pad
|
||||||
|
|
||||||
|
### 5.2 Verificar funcionalidades
|
||||||
|
- [ ] Reproduccion de streams HLS
|
||||||
|
- [ ] Overlay de controles
|
||||||
|
- [ ] Boton "Elegir otro"
|
||||||
|
- [ ] Manejo de errores
|
||||||
|
- [ ] Reconexion tras perdida de conexion
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# PASO 6: Commit y Release
|
||||||
|
|
||||||
|
### 6.1 Copiar APK
|
||||||
|
```bash
|
||||||
|
cp app/build/outputs/apk/debug/app-debug.apk ./StreamPlayer-v10.1.0-debug.apk
|
||||||
|
```
|
||||||
|
|
||||||
|
### 6.2 Commit
|
||||||
|
```bash
|
||||||
|
git add -A
|
||||||
|
git commit -m "Migracion de ExoPlayer 2.x a Media3 1.5.0 (v10.1.0)"
|
||||||
|
git tag v10.1.0
|
||||||
|
git push origin main
|
||||||
|
git push origin v10.1.0
|
||||||
|
```
|
||||||
|
|
||||||
|
### 6.3 Crear release en Gitea
|
||||||
|
```bash
|
||||||
|
curl -s -u renato97:wlillidan1 -X POST \
|
||||||
|
"https://gitea.cbcren.online/api/v1/repos/renato97/app/releases" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"tag_name": "v10.1.0",
|
||||||
|
"name": "StreamPlayer v10.1.0 - Media3",
|
||||||
|
"body": "## Cambios\n- Migracion completa de ExoPlayer 2.x a AndroidX Media3 1.5.0\n- Mejor soporte para Android TV\n- Actualizaciones de seguridad y rendimiento",
|
||||||
|
"prerelease": false
|
||||||
|
}'
|
||||||
|
```
|
||||||
|
|
||||||
|
### 6.4 Subir APK
|
||||||
|
```bash
|
||||||
|
# Reemplazar {RELEASE_ID} con el ID devuelto
|
||||||
|
curl -s -u renato97:wlillidan1 -X POST \
|
||||||
|
"https://gitea.cbcren.online/api/v1/repos/renato97/app/releases/{RELEASE_ID}/assets?name=StreamPlayer-v10.1.0.apk" \
|
||||||
|
--data-binary @./StreamPlayer-v10.1.0-debug.apk \
|
||||||
|
-H "Content-Type: application/vnd.android.package-archive"
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Tabla de Mapeo de Imports
|
||||||
|
|
||||||
|
| ExoPlayer 2.x | Media3 |
|
||||||
|
|---------------|--------|
|
||||||
|
| `com.google.android.exoplayer2.ExoPlayer` | `androidx.media3.exoplayer.ExoPlayer` |
|
||||||
|
| `com.google.android.exoplayer2.MediaItem` | `androidx.media3.common.MediaItem` |
|
||||||
|
| `com.google.android.exoplayer2.Player` | `androidx.media3.common.Player` |
|
||||||
|
| `com.google.android.exoplayer2.PlaybackException` | `androidx.media3.common.PlaybackException` |
|
||||||
|
| `com.google.android.exoplayer2.DefaultRenderersFactory` | `androidx.media3.exoplayer.DefaultRenderersFactory` |
|
||||||
|
| `com.google.android.exoplayer2.trackselection.DefaultTrackSelector` | `androidx.media3.exoplayer.trackselection.DefaultTrackSelector` |
|
||||||
|
| `com.google.android.exoplayer2.source.MediaSource` | `androidx.media3.exoplayer.source.MediaSource` |
|
||||||
|
| `com.google.android.exoplayer2.source.hls.HlsMediaSource` | `androidx.media3.exoplayer.hls.HlsMediaSource` |
|
||||||
|
| `com.google.android.exoplayer2.ext.okhttp.OkHttpDataSource` | `androidx.media3.datasource.okhttp.OkHttpDataSource` |
|
||||||
|
| `com.google.android.exoplayer2.ui.PlayerView` | `androidx.media3.ui.PlayerView` |
|
||||||
|
| `com.google.android.exoplayer2.util.Util` | `androidx.media3.common.util.Util` |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Notas Importantes
|
||||||
|
|
||||||
|
1. **@OptIn es obligatorio**: Media3 marca algunas APIs como `@UnstableApi`. Agregar `@OptIn(markerClass = UnstableApi.class)` a la clase o metodos que usen estas APIs.
|
||||||
|
|
||||||
|
2. **No hay cambios en la logica**: La API de Media3 es casi identica a ExoPlayer 2.x. Solo cambian los packages.
|
||||||
|
|
||||||
|
3. **Leanback UI**: Agregamos `media3-ui-leanback` para futuras mejoras de Android TV, aunque por ahora usamos el PlayerView standard.
|
||||||
|
|
||||||
|
4. **MediaSession**: Agregamos `media3-session` para integracion con controles del sistema (play/pause desde el launcher de Android TV). Esto se puede implementar despues.
|
||||||
|
|
||||||
|
5. **Compatibilidad**: Media3 1.5.0 requiere minSdk 21 (igual que antes), no hay cambios de compatibilidad.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Errores Comunes y Soluciones
|
||||||
|
|
||||||
|
## Error: "Cannot find symbol: class PlayerView"
|
||||||
|
**Causa**: El import o el XML tienen el namespace incorrecto.
|
||||||
|
**Solucion**: Verificar que sea `androidx.media3.ui.PlayerView` en Java y XML.
|
||||||
|
|
||||||
|
## Error: "This declaration is opt-in"
|
||||||
|
**Causa**: Falta la anotacion @OptIn.
|
||||||
|
**Solucion**: Agregar `@OptIn(markerClass = UnstableApi.class)` antes de la clase.
|
||||||
|
|
||||||
|
## Error: "Cannot resolve symbol 'HlsMediaSource'"
|
||||||
|
**Causa**: Falta la dependencia `media3-exoplayer-hls`.
|
||||||
|
**Solucion**: Verificar que `implementation 'androidx.media3:media3-exoplayer-hls:1.5.0'` este en build.gradle.
|
||||||
|
|
||||||
|
## Error: "Cannot resolve symbol 'OkHttpDataSource'"
|
||||||
|
**Causa**: Falta la dependencia `media3-datasource-okhttp`.
|
||||||
|
**Solucion**: Verificar que `implementation 'androidx.media3:media3-datasource-okhttp:1.5.0'` este en build.gradle.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Checklist Final
|
||||||
|
|
||||||
|
- [ ] build.gradle: Dependencias actualizadas a Media3 1.5.0
|
||||||
|
- [ ] build.gradle: Version actualizada a 10.1.0
|
||||||
|
- [ ] PlayerActivity.java: Imports actualizados
|
||||||
|
- [ ] PlayerActivity.java: @OptIn agregado
|
||||||
|
- [ ] activity_player.xml: PlayerView namespace actualizado
|
||||||
|
- [ ] Compilacion exitosa sin errores
|
||||||
|
- [ ] Testing en dispositivo Android TV
|
||||||
|
- [ ] Commit y push realizados
|
||||||
|
- [ ] Release creado en Gitea
|
||||||
|
- [ ] APK subido al release
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"versionCode": 100100,
|
"versionCode": 100300,
|
||||||
"versionName": "10.0.1",
|
"versionName": "10.0.3",
|
||||||
"minSupportedVersionCode": 91000,
|
"minSupportedVersionCode": 91000,
|
||||||
"forceUpdate": false,
|
"forceUpdate": false,
|
||||||
"downloadUrl": "https://gitea.cbcren.online/attachments/83b72799-b731-4a48-ad04-67b75eaa78a7",
|
"downloadUrl": "https://gitea.cbcren.online/renato97/app/releases/download/v10.0.3/StreamPlayer-v10.0.3.apk",
|
||||||
"fileName": "StreamPlayer-v10.0.1.apk",
|
"fileName": "StreamPlayer-v10.0.3.apk",
|
||||||
"sizeBytes": 16674,
|
"sizeBytes": 0,
|
||||||
"notes": "StreamPlayer v10.0.1\n\nCorrecciones de errores:\n- Fix: Crash on HTML response in EventRepository\n- Fix: HTML validation in UpdateManager/DeviceRegistry\n- Fix: HTTP error handling in StreamUrlResolver\n\nVersión anterior v10.0:\n- Nueva versión mayor\n- Sistema de actualizaciones automáticas activado"
|
"notes": "StreamPlayer v10.0.3\n\nNovedades:\n- Fix: Evasión de bloqueos regionales mediante DNS de Google (DoH)\n- Corrección de error 'No se encontró la clave del stream'"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user