codebydante commited on
Commit
8917cb7
·
verified ·
1 Parent(s): 49bf2d4

Actualizar proyecto: Consola traducida, bugs arreglados y archivos ordenados

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +66 -66
  2. .gitignore +29 -0
  3. README.md +71 -0
  4. extension/css/popup.css +508 -0
  5. extension/icons/icon.png +3 -0
  6. extension/js/background.js +562 -0
  7. extension/js/content.js +1 -0
  8. extension/js/popup.js +1562 -0
  9. extension/js/tools.js +920 -0
  10. extension/lib/hls.light.min.js +0 -0
  11. extension/manifest.json +35 -0
  12. extension/popup.html +467 -0
  13. extension/tools.html +977 -0
  14. host/bin/Logs/2026-05-13_16-11-31-992.log +27 -0
  15. host/bin/Logs/2026-05-13_16-12-06-711.log +27 -0
  16. host/bin/Logs/2026-05-13_16-15-17-719.log +25 -0
  17. host/bin/Logs/2026-05-13_16-19-59-939.log +29 -0
  18. host/bin/Logs/2026-05-13_16-21-15-805.log +26 -0
  19. host/bin/Logs/2026-05-13_16-26-24-059.log +26 -0
  20. host/bin/Logs/2026-05-13_16-35-18-976.log +31 -0
  21. host/bin/Logs/2026-05-13_16-45-51-176.log +10 -0
  22. host/bin/Logs/2026-05-13_22-10-09-044.log +31 -0
  23. host/bin/Logs/2026-05-13_22-13-35-259.log +26 -0
  24. host/bin/Logs/2026-05-13_22-19-44-712.log +31 -0
  25. host/bin/Logs/2026-05-13_22-23-06-266.log +31 -0
  26. host/bin/Logs/2026-05-13_22-29-19-967.log +39 -0
  27. host/bin/Logs/2026-05-13_22-29-50-572.log +48 -0
  28. host/bin/Logs/2026-05-13_22-30-33-239.log +32 -0
  29. host/bin/Logs/2026-05-13_22-31-08-579.log +29 -0
  30. host/bin/Logs/2026-05-13_22-32-54-429.log +31 -0
  31. host/bin/Logs/2026-05-13_22-33-08-561.log +26 -0
  32. host/bin/Logs/2026-05-13_22-35-16-960.log +31 -0
  33. host/bin/Logs/2026-05-13_22-39-24-437.log +56 -0
  34. host/bin/Logs/2026-05-13_22-39-42-453.log +29 -0
  35. host/bin/Logs/2026-05-13_22-39-53-963.log +36 -0
  36. host/bin/Logs/2026-05-13_22-42-27-954.log +31 -0
  37. host/bin/Logs/2026-05-13_22-44-52-214.log +30 -0
  38. host/bin/Logs/2026-05-13_22-48-39-439.log +47 -0
  39. host/bin/Logs/2026-05-14_15-08-14-668.log +10 -0
  40. host/bin/Logs/2026-05-14_15-37-02-762.log +31 -0
  41. host/bin/Logs/2026-05-14_16-02-08-791.log +31 -0
  42. host/bin/Logs/2026-05-14_16-10-06-874.log +35 -0
  43. host/bin/Logs/2026-05-14_16-18-00-043.log +39 -0
  44. host/bin/Logs/2026-05-14_16-21-28-670.log +34 -0
  45. host/bin/Logs/2026-05-14_16-26-28-730.log +34 -0
  46. host/bin/Logs/2026-05-14_17-00-33-372.log +35 -0
  47. host/bin/Logs/2026-05-14_17-05-03-605.log +54 -0
  48. host/bin/Logs/2026-05-14_17-15-07-131.log +30 -0
  49. host/bin/Logs/2026-05-14_17-18-06-282.log +35 -0
  50. host/bin/Logs/2026-05-14_17-20-41-291.log +35 -0
.gitattributes CHANGED
@@ -1,66 +1,66 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.avro filter=lfs diff=lfs merge=lfs -text
4
- *.bin filter=lfs diff=lfs merge=lfs -text
5
- *.bz2 filter=lfs diff=lfs merge=lfs -text
6
- *.ckpt filter=lfs diff=lfs merge=lfs -text
7
- *.ftz filter=lfs diff=lfs merge=lfs -text
8
- *.gz filter=lfs diff=lfs merge=lfs -text
9
- *.h5 filter=lfs diff=lfs merge=lfs -text
10
- *.joblib filter=lfs diff=lfs merge=lfs -text
11
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
12
- *.lz4 filter=lfs diff=lfs merge=lfs -text
13
- *.mds filter=lfs diff=lfs merge=lfs -text
14
- *.mlmodel filter=lfs diff=lfs merge=lfs -text
15
- *.model filter=lfs diff=lfs merge=lfs -text
16
- *.msgpack filter=lfs diff=lfs merge=lfs -text
17
- *.npy filter=lfs diff=lfs merge=lfs -text
18
- *.npz filter=lfs diff=lfs merge=lfs -text
19
- *.onnx filter=lfs diff=lfs merge=lfs -text
20
- *.ot filter=lfs diff=lfs merge=lfs -text
21
- *.parquet filter=lfs diff=lfs merge=lfs -text
22
- *.pb filter=lfs diff=lfs merge=lfs -text
23
- *.pickle filter=lfs diff=lfs merge=lfs -text
24
- *.pkl filter=lfs diff=lfs merge=lfs -text
25
- *.pt filter=lfs diff=lfs merge=lfs -text
26
- *.pth filter=lfs diff=lfs merge=lfs -text
27
- *.rar filter=lfs diff=lfs merge=lfs -text
28
- *.safetensors filter=lfs diff=lfs merge=lfs -text
29
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
30
- *.tar.* filter=lfs diff=lfs merge=lfs -text
31
- *.tar filter=lfs diff=lfs merge=lfs -text
32
- *.tflite filter=lfs diff=lfs merge=lfs -text
33
- *.tgz filter=lfs diff=lfs merge=lfs -text
34
- *.wasm filter=lfs diff=lfs merge=lfs -text
35
- *.xz filter=lfs diff=lfs merge=lfs -text
36
- *.zip filter=lfs diff=lfs merge=lfs -text
37
- *.zst filter=lfs diff=lfs merge=lfs -text
38
- *tfevents* filter=lfs diff=lfs merge=lfs -text
39
- # Audio files - uncompressed
40
- *.pcm filter=lfs diff=lfs merge=lfs -text
41
- *.sam filter=lfs diff=lfs merge=lfs -text
42
- *.raw filter=lfs diff=lfs merge=lfs -text
43
- # Audio files - compressed
44
- *.aac filter=lfs diff=lfs merge=lfs -text
45
- *.flac filter=lfs diff=lfs merge=lfs -text
46
- *.mp3 filter=lfs diff=lfs merge=lfs -text
47
- *.ogg filter=lfs diff=lfs merge=lfs -text
48
- *.wav filter=lfs diff=lfs merge=lfs -text
49
- # Image files - uncompressed
50
- *.bmp filter=lfs diff=lfs merge=lfs -text
51
- *.gif filter=lfs diff=lfs merge=lfs -text
52
- *.png filter=lfs diff=lfs merge=lfs -text
53
- *.tiff filter=lfs diff=lfs merge=lfs -text
54
- # Image files - compressed
55
- *.jpg filter=lfs diff=lfs merge=lfs -text
56
- *.jpeg filter=lfs diff=lfs merge=lfs -text
57
- *.webp filter=lfs diff=lfs merge=lfs -text
58
- # Video files - compressed
59
- *.mp4 filter=lfs diff=lfs merge=lfs -text
60
- *.webm filter=lfs diff=lfs merge=lfs -text
61
- host/bin/aria2c.exe filter=lfs diff=lfs merge=lfs -text
62
- host/bin/AtomicParsley.exe filter=lfs diff=lfs merge=lfs -text
63
- host/bin/ffmpeg.exe filter=lfs diff=lfs merge=lfs -text
64
- host/bin/ffprobe.exe filter=lfs diff=lfs merge=lfs -text
65
- host/bin/N_m3u8DL-RE.exe filter=lfs diff=lfs merge=lfs -text
66
- host/bin/yt-dlp.exe filter=lfs diff=lfs merge=lfs -text
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.avro filter=lfs diff=lfs merge=lfs -text
4
+ *.bin filter=lfs diff=lfs merge=lfs -text
5
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
6
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
7
+ *.ftz filter=lfs diff=lfs merge=lfs -text
8
+ *.gz filter=lfs diff=lfs merge=lfs -text
9
+ *.h5 filter=lfs diff=lfs merge=lfs -text
10
+ *.joblib filter=lfs diff=lfs merge=lfs -text
11
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
12
+ *.lz4 filter=lfs diff=lfs merge=lfs -text
13
+ *.mds filter=lfs diff=lfs merge=lfs -text
14
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
15
+ *.model filter=lfs diff=lfs merge=lfs -text
16
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
17
+ *.npy filter=lfs diff=lfs merge=lfs -text
18
+ *.npz filter=lfs diff=lfs merge=lfs -text
19
+ *.onnx filter=lfs diff=lfs merge=lfs -text
20
+ *.ot filter=lfs diff=lfs merge=lfs -text
21
+ *.parquet filter=lfs diff=lfs merge=lfs -text
22
+ *.pb filter=lfs diff=lfs merge=lfs -text
23
+ *.pickle filter=lfs diff=lfs merge=lfs -text
24
+ *.pkl filter=lfs diff=lfs merge=lfs -text
25
+ *.pt filter=lfs diff=lfs merge=lfs -text
26
+ *.pth filter=lfs diff=lfs merge=lfs -text
27
+ *.rar filter=lfs diff=lfs merge=lfs -text
28
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
29
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
30
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
31
+ *.tar filter=lfs diff=lfs merge=lfs -text
32
+ *.tflite filter=lfs diff=lfs merge=lfs -text
33
+ *.tgz filter=lfs diff=lfs merge=lfs -text
34
+ *.wasm filter=lfs diff=lfs merge=lfs -text
35
+ *.xz filter=lfs diff=lfs merge=lfs -text
36
+ *.zip filter=lfs diff=lfs merge=lfs -text
37
+ *.zst filter=lfs diff=lfs merge=lfs -text
38
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
39
+ # Audio files - uncompressed
40
+ *.pcm filter=lfs diff=lfs merge=lfs -text
41
+ *.sam filter=lfs diff=lfs merge=lfs -text
42
+ *.raw filter=lfs diff=lfs merge=lfs -text
43
+ # Audio files - compressed
44
+ *.aac filter=lfs diff=lfs merge=lfs -text
45
+ *.flac filter=lfs diff=lfs merge=lfs -text
46
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
47
+ *.ogg filter=lfs diff=lfs merge=lfs -text
48
+ *.wav filter=lfs diff=lfs merge=lfs -text
49
+ # Image files - uncompressed
50
+ *.bmp filter=lfs diff=lfs merge=lfs -text
51
+ *.gif filter=lfs diff=lfs merge=lfs -text
52
+ *.png filter=lfs diff=lfs merge=lfs -text
53
+ *.tiff filter=lfs diff=lfs merge=lfs -text
54
+ # Image files - compressed
55
+ *.jpg filter=lfs diff=lfs merge=lfs -text
56
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
57
+ *.webp filter=lfs diff=lfs merge=lfs -text
58
+ # Video files - compressed
59
+ *.mp4 filter=lfs diff=lfs merge=lfs -text
60
+ *.webm filter=lfs diff=lfs merge=lfs -text
61
+ host/bin/aria2c.exe filter=lfs diff=lfs merge=lfs -text
62
+ host/bin/AtomicParsley.exe filter=lfs diff=lfs merge=lfs -text
63
+ host/bin/ffmpeg.exe filter=lfs diff=lfs merge=lfs -text
64
+ host/bin/ffprobe.exe filter=lfs diff=lfs merge=lfs -text
65
+ host/bin/N_m3u8DL-RE.exe filter=lfs diff=lfs merge=lfs -text
66
+ host/bin/yt-dlp.exe filter=lfs diff=lfs merge=lfs -text
.gitignore ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # Binaries (mejor descargarlos con los scripts de instalación)
7
+ host/bin/*.exe
8
+ host/bin/ffmpeg
9
+ host/bin/ffprobe
10
+ host/bin/aria2c
11
+ host/bin/AtomicParsley
12
+ host/bin/N_m3u8DL-RE
13
+ host/bin/yt-dlp
14
+
15
+ # Archivos de configuración locales y temporales
16
+ host/youtube_cookies.txt
17
+ host/last_update.txt
18
+ host/*.part
19
+ host/*.ytdl
20
+
21
+ # Videos de prueba y descargas
22
+ host/*.mp4
23
+ host/*.mkv
24
+ host/*.mp3
25
+ host/*.webm
26
+
27
+ # OS
28
+ .DS_Store
29
+ Thumbs.db
README.md ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Local Video Downloader
2
+
3
+ Sistema de descarga de contenido multimedia basado en una extensión de navegador y un host nativo en Python. Permite la extracción de video y audio en alta resolución mediante la integración de herramientas profesionales de procesamiento.
4
+
5
+ ## Descripción
6
+
7
+ Esta solución utiliza el protocolo de mensajería nativa de los navegadores basados en Chromium para superar las limitaciones de las extensiones convencionales. El procesamiento y la descarga se delegan a un host local, permitiendo el uso de motores como yt-dlp, aria2 y N_m3u8DL-RE para una eficiencia máxima y soporte para protocolos complejos (HLS, DASH).
8
+
9
+ ## Características Principales
10
+
11
+ * **Descarga de Alta Resolución:** Soporte hasta 4K/8K dependiendo de la disponibilidad del origen.
12
+ * **Conversión de Audio:** Extracción y conversión a formatos como MP3, M4A u OPUS.
13
+ * **Motores de Descarga:** Integración con yt-dlp, N_m3u8DL-RE y aceleración mediante aria2.
14
+ * **Gestión de Metadatos:** Incrustación automática de miniaturas, subtítulos y metadatos descriptivos.
15
+ * **Interfaz de Usuario:** Panel de control integrado con detector de streams y selector de calidad.
16
+
17
+ ## Estructura del Proyecto
18
+
19
+ ```text
20
+ .
21
+ ├── extension/ # Código fuente de la extensión de navegador
22
+ │ ├── manifest.json # Manifiesto de la extensión (v3)
23
+ │ ├── background.js # Service worker para gestión de tareas y sniffer
24
+ │ ├── popup.html # Interfaz de usuario principal
25
+ │ ├── popup.js # Lógica de la interfaz y comunicación
26
+ │ ├── popup.css # Estilos de la UI
27
+ │ ├── lib/ # Librerías externas (hls.js)
28
+ │ └── icons/ # Activos visuales
29
+ │
30
+ ├── host/ # Backend local (Native Messaging Host)
31
+ │ ├── download_host.py # Lógica principal de gestión de procesos
32
+ │ ├── download_host.bat # Lanzador de entrada para el navegador
33
+ │ ├── bin/ # Binarios ejecutables (Excluidos de Git)
34
+ │ ├── setup/ # Scripts de instalación de dependencias
35
+ │ │ └── install_*.py # Descargadores de dependencias
36
+ │ └── tests/ # Entorno de pruebas y muestras
37
+ │
38
+ ├── tools/ # Utilidades de desarrollo
39
+ │ └── resize.py # Script de procesamiento de iconos
40
+ │
41
+ ├── .gitignore # Reglas de exclusión para control de versiones
42
+ ├── instalar_requisitos.bat # Comprueba e instala Python (Paso 1)
43
+ ├── actualizar_motores.bat # Descarga los motores de descarga (Paso 2)
44
+ ├── install_host.bat # Registra el sistema en el navegador (Paso 3)
45
+ └── README.md # Documentación técnica del proyecto
46
+ ```
47
+
48
+ ## Instalación
49
+
50
+ ### Requisitos del Sistema
51
+ * Python 3.8 o superior.
52
+ * Navegador basado en Chromium (Chrome, Edge, Brave, etc.).
53
+
54
+ ### Configuración del Host
55
+ 1. Ejecutar `instalar_requisitos.bat`. Este script verificará si Python está instalado y, en caso contrario, intentará instalarlo automáticamente mediante `winget`.
56
+ 2. Ejecutar `actualizar_motores.bat`. Esto descargará y configurará automáticamente todos los binarios necesarios (`yt-dlp`, `ffmpeg`, etc.) en la carpeta `host/bin`.
57
+ 3. Ejecutar `install_host.bat` con privilegios de administrador. Siga las instrucciones en pantalla para registrar la extensión mediante su ID.
58
+
59
+ ### Instalación de la Extensión
60
+ 1. Acceder a la sección de extensiones del navegador (`chrome://extensions`).
61
+ 2. Habilitar el "Modo de desarrollador".
62
+ 3. Seleccionar "Cargar descomprimida" y elegir la carpeta `extension` de este repositorio.
63
+
64
+ ## Uso
65
+ 1. Acceder al sitio web del cual se desea extraer el contenido.
66
+ 2. Abrir la extensión desde la barra de herramientas.
67
+ 3. Seleccionar los parámetros de calidad y formato deseados.
68
+ 4. Iniciar el proceso de descarga. El progreso se mostrará en tiempo real en el panel de la extensión.
69
+
70
+ ## Nota Legal
71
+ Este software se proporciona exclusivamente para fines educativos y de respaldo personal. El usuario es responsable de cumplir con los términos de servicio de las plataformas de terceros y las leyes de propiedad intelectual vigentes.
extension/css/popup.css ADDED
@@ -0,0 +1,508 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ body {
2
+ width: 500px;
3
+ min-height: 550px;
4
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
5
+ margin: 0;
6
+ background-color: #1a1b1e;
7
+ color: #eeeeee;
8
+ }
9
+
10
+ .tabs-container {
11
+ display: flex;
12
+ background-color: #1a1b1e;
13
+ border-bottom: 1px solid #2f3036;
14
+ padding: 10px 10px 0 10px;
15
+ user-select: none;
16
+ }
17
+
18
+ .tab {
19
+ padding: 8px 12px;
20
+ font-size: 14px;
21
+ font-weight: 500;
22
+ color: #8c8d91;
23
+ cursor: pointer;
24
+ display: flex;
25
+ align-items: center;
26
+ gap: 6px;
27
+ border-radius: 6px 6px 0 0;
28
+ margin-bottom: -1px;
29
+ }
30
+
31
+ .tab.active {
32
+ color: #ffffff;
33
+ background-color: #25262a;
34
+ border: 1px solid #2f3036;
35
+ border-bottom: 1px solid #25262a;
36
+ }
37
+
38
+ .icon {
39
+ width: 18px;
40
+ height: 18px;
41
+ }
42
+
43
+ .main-content {
44
+ padding: 20px;
45
+ background-color: #1a1b1e;
46
+ }
47
+
48
+ .panel {
49
+ display: none;
50
+ }
51
+ .panel.active {
52
+ display: block;
53
+ }
54
+
55
+ .section-title {
56
+ font-size: 16px;
57
+ font-weight: 600;
58
+ margin: 0 0 15px 0;
59
+ color: #ffffff;
60
+ }
61
+
62
+ .flex-title {
63
+ display: flex;
64
+ justify-content: space-between;
65
+ align-items: center;
66
+ }
67
+
68
+ .detected-video-card {
69
+ background-color: #1f2023;
70
+ border: 1px solid #2f3036;
71
+ border-radius: 8px;
72
+ padding: 15px;
73
+ display: flex;
74
+ align-items: center;
75
+ justify-content: space-between;
76
+ gap: 15px;
77
+ margin-bottom: 20px;
78
+ box-shadow: 0 4px 6px rgba(0,0,0,0.1);
79
+ }
80
+
81
+ .hidden {
82
+ display: none !important;
83
+ }
84
+
85
+ .video-info {
86
+ display: flex;
87
+ flex-direction: column;
88
+ gap: 6px;
89
+ overflow: hidden;
90
+ flex: 1;
91
+ }
92
+
93
+ .preview-title {
94
+ font-size: 14px;
95
+ font-weight: 600;
96
+ color: #ffffff;
97
+ display: -webkit-box;
98
+ -webkit-line-clamp: 2;
99
+ line-clamp: 2;
100
+ -webkit-box-orient: vertical;
101
+ overflow: hidden;
102
+ line-height: 1.3;
103
+ }
104
+
105
+ .preview-url {
106
+ font-size: 12px;
107
+ color: #8c8d91;
108
+ white-space: nowrap;
109
+ overflow: hidden;
110
+ text-overflow: ellipsis;
111
+ }
112
+
113
+ .action-btn {
114
+ background-color: #26272b;
115
+ color: #b0b1b5;
116
+ border: 1px solid #2f3036;
117
+ border-radius: 6px;
118
+ padding: 8px 16px;
119
+ font-size: 13px;
120
+ font-weight: 500;
121
+ cursor: pointer;
122
+ transition: all 0.2s;
123
+ }
124
+
125
+ .action-btn.primary {
126
+ grid-column: 2;
127
+ grid-row: 1;
128
+ min-width: 95px;
129
+ }
130
+
131
+ .action-btn:hover:not(:disabled) {
132
+ background-color: #313338;
133
+ color: #ffffff;
134
+ }
135
+
136
+ .action-btn:disabled {
137
+ opacity: 0.5;
138
+ cursor: not-allowed;
139
+ }
140
+
141
+ .empty-state {
142
+ display: flex;
143
+ flex-direction: column;
144
+ align-items: center;
145
+ justify-content: center;
146
+ margin-top: 50px;
147
+ }
148
+
149
+ .empty-icon {
150
+ width: 42px;
151
+ height: 42px;
152
+ color: #e5e5e5;
153
+ margin-bottom: 20px;
154
+ }
155
+
156
+ .state-title {
157
+ font-size: 18px;
158
+ font-weight: 600;
159
+ margin: 0 0 10px 0;
160
+ color: #ffffff;
161
+ }
162
+
163
+ .state-desc {
164
+ font-size: 14px;
165
+ color: #8c8d91;
166
+ margin: 0;
167
+ text-align: center;
168
+ line-height: 1.5;
169
+ }
170
+
171
+ /* History List Styles */
172
+ .downloads-list {
173
+ display: flex;
174
+ flex-direction: column;
175
+ gap: 10px;
176
+ max-height: 420px;
177
+ overflow-y: auto;
178
+ padding-right: 5px;
179
+ }
180
+
181
+ /* Scrollbar Global Estético */
182
+ ::-webkit-scrollbar { width: 6px; height: 6px; }
183
+ ::-webkit-scrollbar-track { background: transparent; }
184
+ ::-webkit-scrollbar-thumb { background: #3f4147; border-radius: 4px; }
185
+ ::-webkit-scrollbar-thumb:hover { background: #55575e; }
186
+ ::-webkit-scrollbar-corner { background: transparent; }
187
+
188
+ .history-item {
189
+ background-color: #1f2023;
190
+ border: 1px solid #2f3036;
191
+ border-radius: 6px;
192
+ padding: 12px;
193
+ display: flex;
194
+ flex-direction: column;
195
+ gap: 6px;
196
+ }
197
+
198
+ .history-title {
199
+ font-size: 13px;
200
+ color: #e5e5e5;
201
+ font-weight: 500;
202
+ white-space: nowrap;
203
+ overflow: hidden;
204
+ text-overflow: ellipsis;
205
+ }
206
+
207
+ .history-date {
208
+ font-size: 11px;
209
+ color: #6a6b70;
210
+ margin-bottom: 4px;
211
+ }
212
+
213
+ .history-actions {
214
+ display: flex;
215
+ gap: 8px;
216
+ }
217
+
218
+ .btn-small {
219
+ padding: 6px 10px;
220
+ font-size: 11px;
221
+ flex: 1;
222
+ }
223
+
224
+ .history-url {
225
+ color: #4da6ff;
226
+ text-decoration: none;
227
+ }
228
+ .history-url:hover { text-decoration: underline; }
229
+
230
+ .settings-card, .about-card {
231
+ background-color: #1f2023;
232
+ border: 1px solid #2f3036;
233
+ border-radius: 6px;
234
+ padding: 15px;
235
+ }
236
+ .about-card h3 { margin: 0 0 5px 0; color: #fff; }
237
+ .about-card p { margin: 0 0 10px 0; color: #8c8d91; font-size: 13px; line-height: 1.5; }
238
+ .setting-item { margin-bottom: 15px; }
239
+ .setting-item label { font-size: 13px; color: #e5e5e5; font-weight: 500; }
240
+
241
+ .radio-switch input[type="radio"] { display: none; }
242
+ .radio-switch .radio-btn {
243
+ display: flex;
244
+ background-color: #1a1b1e;
245
+ border: 1px solid #2f3036;
246
+ border-radius: 6px;
247
+ padding: 10px 12px;
248
+ font-size: 13px;
249
+ color: #8c8d91;
250
+ cursor: pointer;
251
+ transition: all 0.2s;
252
+ flex: 1;
253
+ justify-content: center;
254
+ align-items: center;
255
+ }
256
+ .radio-switch input[type="radio"]:checked + .radio-btn {
257
+ background-color: #313338;
258
+ color: #ffffff;
259
+ border-color: #4da6ff;
260
+ }
261
+
262
+ .quality-item {
263
+ background-color: #26272b;
264
+ border: 1px solid #2f3036;
265
+ border-radius: 4px;
266
+ padding: 10px;
267
+ color: #eeeeee;
268
+ cursor: pointer;
269
+ font-size: 12px;
270
+ text-align: left;
271
+ }
272
+ .quality-item:hover { background-color: #313338; }
273
+ #qualityModal.hidden { display: none !important; }
274
+
275
+ /* Custom Radio Cards */
276
+ .hidden-radio { position: absolute; opacity: 0; width: 0; height: 0; }
277
+ .radio-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px; background: #16171a; border: 1px solid #2f3036; border-radius: 8px; transition: border-color 0.2s, background-color 0.2s; margin-bottom: 2px; }
278
+ .radio-card:hover { border-color: #444; background: #1c1d21; }
279
+ .hidden-radio:checked + .radio-card { border-color: #4da6ff; background: rgba(77, 166, 255, 0.05); }
280
+ .card-radio-circle { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #6a6b70; transition: all 0.2s; flex-shrink: 0; margin-top: 1px; position: relative; }
281
+ .hidden-radio:checked + .radio-card .card-radio-circle { border-color: #4da6ff; }
282
+ .hidden-radio:checked + .radio-card .card-radio-circle::after { content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 8px; height: 8px; border-radius: 50%; background: #4da6ff; }
283
+ .card-title-text { font-size: 14px; color: #eeeeee; margin-bottom: 4px; font-weight: 500; }
284
+ .card-desc-text { font-size: 11px; color: #8c8d91; line-height: 1.4; }
285
+
286
+ /* Custom Select Dropdowns */
287
+ .custom-select-wrapper { position: relative; width: 100%; display: block; }
288
+ .custom-select {
289
+ width: 100%;
290
+ padding: 10px 36px 10px 14px;
291
+ background: #16171a;
292
+ color: #eeeeee;
293
+ border: 1px solid #2f3036;
294
+ border-radius: 8px;
295
+ cursor: pointer;
296
+ appearance: none;
297
+ -moz-appearance: none;
298
+ -webkit-appearance: none;
299
+ font-size: 13px;
300
+ font-family: inherit;
301
+ transition: all 0.2s;
302
+ box-sizing: border-box;
303
+ }
304
+ .custom-select:hover { border-color: #444; background: #1c1d21; }
305
+ .custom-select:focus { border-color: #4da6ff; outline: none; background: #1c1d21; box-shadow: 0 0 0 2px rgba(77, 166, 255, 0.1); }
306
+ .select-arrow {
307
+ position: absolute;
308
+ right: 14px;
309
+ top: 50%;
310
+ transform: translateY(-50%);
311
+ width: 16px;
312
+ height: 16px;
313
+ color: #6a6b70;
314
+ pointer-events: none;
315
+ }
316
+
317
+ /* Custom Dark Slider (No Bright Colors) */
318
+ .custom-slider {
319
+ -webkit-appearance: none;
320
+ width: 65%;
321
+ height: 6px;
322
+ background: transparent; /* track handles it */
323
+ outline: none;
324
+ cursor: pointer;
325
+ margin: 0;
326
+ }
327
+
328
+ .custom-slider::-webkit-slider-runnable-track {
329
+ width: 100%;
330
+ height: 6px;
331
+ background: #2a2b30;
332
+ border-radius: 3px;
333
+ border: 1px solid #1f2023;
334
+ }
335
+
336
+ .custom-slider::-webkit-slider-thumb {
337
+ -webkit-appearance: none;
338
+ appearance: none;
339
+ width: 16px;
340
+ height: 16px;
341
+ border-radius: 50%;
342
+ background: #55575e;
343
+ cursor: pointer;
344
+ margin-top: -6px;
345
+ box-shadow: 0 1px 3px rgba(0,0,0,0.5);
346
+ border: 2px solid #2f3036;
347
+ transition: background 0.2s, transform 0.1s;
348
+ }
349
+
350
+ .custom-slider:hover::-webkit-slider-thumb {
351
+ background: #6a6b70;
352
+ }
353
+
354
+ .custom-slider:active::-webkit-slider-thumb {
355
+ transform: scale(1.1);
356
+ background: #8c8d91;
357
+ }
358
+
359
+ .custom-slider::-moz-range-track {
360
+ width: 100%;
361
+ height: 6px;
362
+ background: #2a2b30;
363
+ border-radius: 3px;
364
+ border: 1px solid #1f2023;
365
+ }
366
+
367
+ .custom-slider::-moz-range-thumb {
368
+ width: 12px;
369
+ height: 12px;
370
+ border-radius: 50%;
371
+ background: #55575e;
372
+ cursor: pointer;
373
+ box-shadow: 0 1px 3px rgba(0,0,0,0.5);
374
+ border: 2px solid #2f3036;
375
+ transition: background 0.2s, transform 0.1s;
376
+ }
377
+
378
+ .custom-slider:hover::-moz-range-thumb {
379
+ background: #6a6b70;
380
+ }
381
+
382
+ .custom-slider:active::-moz-range-thumb {
383
+ transform: scale(1.1);
384
+ background: #8c8d91;
385
+ }
386
+
387
+ /* Sniffer Footer Styles */
388
+ .sniffer-footer {
389
+ position: fixed;
390
+ bottom: 0;
391
+ left: 0;
392
+ right: 0;
393
+ background-color: rgba(17, 18, 20, 0.85);
394
+ backdrop-filter: blur(12px);
395
+ -webkit-backdrop-filter: blur(12px);
396
+ border-top: 1px solid rgba(255, 255, 255, 0.08);
397
+ padding: 8px 12px;
398
+ display: flex;
399
+ justify-content: space-between;
400
+ align-items: center;
401
+ z-index: 1000;
402
+ box-shadow: 0 -8px 24px rgba(0,0,0,0.6);
403
+ transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
404
+ }
405
+
406
+ .footer-left {
407
+ display: flex;
408
+ align-items: center;
409
+ gap: 6px;
410
+ }
411
+
412
+ .status-dot {
413
+ width: 6px;
414
+ height: 6px;
415
+ background-color: #00ff88;
416
+ border-radius: 50%;
417
+ box-shadow: 0 0 10px rgba(0, 255, 136, 0.6), 0 0 20px rgba(0, 255, 136, 0.4);
418
+ animation: pulse-dot 2s infinite;
419
+ }
420
+
421
+ @keyframes pulse-dot {
422
+ 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7); }
423
+ 70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(0, 255, 136, 0); }
424
+ 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 136, 0); }
425
+ }
426
+
427
+ .footer-text {
428
+ font-size: 11px;
429
+ font-weight: 700;
430
+ letter-spacing: 0;
431
+ text-transform: uppercase;
432
+ background: linear-gradient(90deg, #ffffff, #a1a1a5);
433
+ -webkit-background-clip: text;
434
+ -webkit-text-fill-color: transparent;
435
+ white-space: nowrap;
436
+ }
437
+
438
+ .count-badge {
439
+ background: linear-gradient(135deg, rgba(77, 166, 255, 0.15), rgba(77, 166, 255, 0.05));
440
+ color: #4da6ff;
441
+ padding: 0 8px;
442
+ border-radius: 12px;
443
+ font-size: 9px;
444
+ font-weight: 600;
445
+ border: 1px solid rgba(77, 166, 255, 0.3);
446
+ box-shadow: inset 0 0 8px rgba(77, 166, 255, 0.1);
447
+ white-space: nowrap;
448
+ display: flex;
449
+ align-items: center;
450
+ height: 20px;
451
+ box-sizing: border-box;
452
+ text-transform: uppercase;
453
+ }
454
+
455
+ .footer-btn {
456
+ padding: 0 8px;
457
+ font-size: 9px;
458
+ font-weight: 600;
459
+ border-radius: 12px;
460
+ height: 20px;
461
+ white-space: nowrap;
462
+ display: flex;
463
+ align-items: center;
464
+ justify-content: center;
465
+ margin: 0;
466
+ box-sizing: border-box;
467
+ text-transform: uppercase;
468
+ transition: all 0.2s ease;
469
+ cursor: pointer;
470
+ }
471
+
472
+ .footer-btn-primary {
473
+ background: rgba(156, 39, 176, 0.15);
474
+ color: #e1bee7;
475
+ border: 1px solid rgba(156, 39, 176, 0.4);
476
+ }
477
+ .footer-btn-primary:hover {
478
+ background: rgba(156, 39, 176, 0.25);
479
+ border-color: rgba(156, 39, 176, 0.6);
480
+ box-shadow: 0 0 10px rgba(156, 39, 176, 0.2);
481
+ }
482
+
483
+ .footer-btn-secondary {
484
+ background: rgba(255, 255, 255, 0.05);
485
+ color: #b0b1b5;
486
+ border: 1px solid rgba(255, 255, 255, 0.1);
487
+ }
488
+ .footer-btn-secondary:hover {
489
+ background: rgba(255, 255, 255, 0.1);
490
+ color: #ffffff;
491
+ border-color: rgba(255, 255, 255, 0.2);
492
+ }
493
+
494
+ .footer-btn-jav {
495
+ background: rgba(244, 63, 94, 0.15);
496
+ color: #fecdd3;
497
+ border: 1px solid rgba(244, 63, 94, 0.4);
498
+ }
499
+ .footer-btn-jav:hover:not(:disabled) {
500
+ background: rgba(244, 63, 94, 0.25);
501
+ border-color: rgba(244, 63, 94, 0.6);
502
+ box-shadow: 0 0 10px rgba(244, 63, 94, 0.2);
503
+ }
504
+
505
+ /* Adjust main content padding to not be hidden by footer when active */
506
+ body {
507
+ padding-bottom: 55px;
508
+ }
extension/icons/icon.png ADDED

Git LFS Details

  • SHA256: 2f593cd7c23e9ae9a9a45e27a908ef60e42636582a4ac18b39dda923758b7133
  • Pointer size: 130 Bytes
  • Size of remote file: 13.1 kB
extension/js/background.js ADDED
@@ -0,0 +1,562 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ let activeTasks = {};
2
+ let activePorts = {};
3
+ let snifferEnabled = true;
4
+ let maxConcurrentDownloadsLimit = 1;
5
+ let consoleLogsCache = [];
6
+
7
+ function broadcastLog(id, title, log) {
8
+ let prefix = title ? `[${title}] ` : "";
9
+ let formattedLog = `${prefix}${log}`;
10
+ consoleLogsCache.push({ title: title, log: log });
11
+ if (consoleLogsCache.length > 500) {
12
+ consoleLogsCache.shift();
13
+ }
14
+ try {
15
+ chrome.runtime.sendMessage({
16
+ action: "download_log",
17
+ id: id,
18
+ title: title,
19
+ log: log
20
+ }, () => { let _ = chrome.runtime.lastError; });
21
+ } catch(err) {}
22
+ }
23
+
24
+ chrome.runtime.onInstalled.addListener(() => {
25
+ chrome.contextMenus.create({
26
+ id: "download_video_link",
27
+ title: "Descargar con Local Downloader",
28
+ contexts: ["video", "link", "page"]
29
+ });
30
+ });
31
+
32
+ chrome.contextMenus.onClicked.addListener((info, tab) => {
33
+ if (info.menuItemId === "download_video_link") {
34
+ let targetUrl = info.srcUrl || info.linkUrl || info.pageUrl || (tab ? tab.url : "");
35
+ if (!targetUrl) return;
36
+
37
+ let title = (tab && tab.title) ? tab.title.replace(/^\(\d+\)\s*/, '').replace(/ - YouTube$/, '').trim() : "Video Descargado (Menú)";
38
+
39
+ chrome.storage.local.get(['customSavePath', 'formatSetting', 'qualitySetting', 'engineSetting', 'threadCount', 'audioFormat', 'audioQuality', 'audioConvert', 'videoFormatPref', 'ytAudioLang', 'ytSubs'], (result) => {
40
+ let request = {
41
+ action: "download",
42
+ url: targetUrl,
43
+ title: title,
44
+ savePath: result.customSavePath || "",
45
+ formatSetting: result.formatSetting || "mp4",
46
+ qualitySetting: result.qualitySetting || "max",
47
+ engineSetting: result.engineSetting || "ytdlp",
48
+ threadCount: result.threadCount || 4,
49
+ audioFormat: result.audioFormat || "best",
50
+ audioQuality: result.audioQuality || "0",
51
+ audioConvert: result.audioConvert || "mp3",
52
+ videoFormatPref: result.videoFormatPref || "legado",
53
+ ytAudioLang: result.ytAudioLang || "es",
54
+ ytSubs: result.ytSubs || "off",
55
+ isAutoTitle: false
56
+ };
57
+
58
+ let downloadId = "dl_" + Date.now() + "_" + Math.floor(Math.random() * 1000);
59
+
60
+ activeTasks[downloadId] = {
61
+ id: downloadId,
62
+ title: title,
63
+ url: targetUrl,
64
+ percent: "0",
65
+ status: "queued"
66
+ };
67
+
68
+ downloadQueue.push({
69
+ downloadId: downloadId,
70
+ request: request
71
+ });
72
+
73
+ try { chrome.runtime.sendMessage({ action: "download_update", task: activeTasks[downloadId] }, () => { let _ = chrome.runtime.lastError; }); } catch(err) {}
74
+
75
+ processDownloadQueue();
76
+ });
77
+ }
78
+ });
79
+
80
+ chrome.storage.local.get(['snifferEnabled', 'maxConcurrentDownloads'], (res) => {
81
+ if (res.snifferEnabled === false) snifferEnabled = false;
82
+ if (res.maxConcurrentDownloads) {
83
+ maxConcurrentDownloadsLimit = parseInt(res.maxConcurrentDownloads);
84
+ }
85
+ });
86
+
87
+ chrome.storage.onChanged.addListener((changes, namespace) => {
88
+ if (changes.snifferEnabled) {
89
+ snifferEnabled = changes.snifferEnabled.newValue;
90
+ }
91
+ if (changes.maxConcurrentDownloads) {
92
+ maxConcurrentDownloadsLimit = parseInt(changes.maxConcurrentDownloads.newValue || 1);
93
+ processDownloadQueue();
94
+ }
95
+ });
96
+
97
+ function prefetchQuality(videoUrl) {
98
+ let cacheKey = videoUrl;
99
+ if (videoUrl.includes('youtube.com/watch')) {
100
+ let match = videoUrl.match(/([?&]v=[^&]+)/);
101
+ if (match) cacheKey = "yt_" + match[1];
102
+ }
103
+
104
+ chrome.storage.local.get(['qualitySetting', 'prefetchedQualities'], function(result) {
105
+ if (result.qualitySetting === 'detect') {
106
+ let cache = result.prefetchedQualities || {};
107
+ if (cache[cacheKey] && (Date.now() - cache[cacheKey].timestamp < 300000)) return;
108
+
109
+ try {
110
+ let port = chrome.runtime.connectNative("com.gonzalo.videodownloader");
111
+ port.onMessage.addListener((message) => {
112
+ if (message.status === "info") {
113
+ chrome.storage.local.get(['prefetchedQualities'], (r2) => {
114
+ let freshCache = r2.prefetchedQualities || {};
115
+ freshCache[cacheKey] = { timestamp: Date.now(), formats: message.info.formats };
116
+ chrome.storage.local.set({ prefetchedQualities: freshCache });
117
+ });
118
+ }
119
+ port.disconnect();
120
+ });
121
+ port.postMessage({ command: "get_info", url: videoUrl });
122
+ } catch(e) {}
123
+ }
124
+ });
125
+ }
126
+
127
+ chrome.webRequest.onBeforeRequest.addListener(
128
+ function(details) {
129
+ if (!snifferEnabled) return;
130
+ if (details.tabId >= 0) {
131
+ const url = details.url;
132
+ const isMedia = details.type === "media";
133
+ const isDirectVideo = url.includes(".m3u8") || url.includes("/m3u8/") || url.includes(".mp4");
134
+
135
+ if (isDirectVideo || isMedia) {
136
+ if (url.includes('tiktok') || url.includes('tiktokcdn') || url.includes('facebook') || url.includes('fbcdn')) return;
137
+
138
+ chrome.storage.local.get(['sniffedUrls'], function(result) {
139
+ let urls = result.sniffedUrls || {};
140
+ if (!urls[details.tabId]) urls[details.tabId] = [];
141
+
142
+ if (!urls[details.tabId].includes(url)) {
143
+ urls[details.tabId].push(url);
144
+ chrome.storage.local.set({ sniffedUrls: urls });
145
+
146
+ // Disparar precarga automáticamente apenas un nuevo video sea detectado (M3U8, MP4, etc)
147
+ prefetchQuality(url);
148
+ }
149
+ });
150
+ }
151
+ }
152
+ },
153
+ { urls: ["<all_urls>"] }
154
+ );
155
+
156
+ chrome.tabs.onUpdated.addListener((tabId, changeInfo) => {
157
+ if (changeInfo.url) {
158
+ chrome.storage.local.get(['sniffedUrls'], function(result) {
159
+ let urls = result.sniffedUrls || {};
160
+ delete urls[tabId];
161
+ chrome.storage.local.set({ sniffedUrls: urls });
162
+
163
+ // Disparar precarga para YouTube (ya que YouTube oculta sus streams directos)
164
+ if (changeInfo.url.includes('youtube.com/watch') || changeInfo.url.includes('youtu.be/')) {
165
+ prefetchQuality(changeInfo.url);
166
+ }
167
+ });
168
+ }
169
+ });
170
+
171
+ chrome.tabs.onRemoved.addListener((tabId) => {
172
+ chrome.storage.local.get(['sniffedUrls'], function(result) {
173
+ let urls = result.sniffedUrls || {};
174
+ delete urls[tabId];
175
+ chrome.storage.local.set({ sniffedUrls: urls });
176
+ });
177
+ });
178
+
179
+ chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
180
+ // Manejador del Método 1 (eliminado)
181
+
182
+ if (request.action === "emergency_stop") {
183
+ // 1. Cancel all queued downloads in downloadQueue
184
+ downloadQueue.forEach(item => {
185
+ let taskId = item.downloadId;
186
+ if (activeTasks[taskId]) {
187
+ activeTasks[taskId].status = "cancelled";
188
+ try { chrome.runtime.sendMessage({ action: "download_update", task: activeTasks[taskId] }, () => { let _ = chrome.runtime.lastError; }); } catch(err) {}
189
+ setTimeout(() => {
190
+ delete activeTasks[taskId];
191
+ try { chrome.runtime.sendMessage({ action: "download_remove", id: taskId }, () => { let _ = chrome.runtime.lastError; }); } catch(e) {}
192
+ }, 3000);
193
+ }
194
+ });
195
+ downloadQueue = [];
196
+
197
+ // 2. Cancel all active downloads
198
+ Object.keys(activePorts).forEach(taskId => {
199
+ let task = activeTasks[taskId];
200
+ if (task) {
201
+ task.status = "cancelled";
202
+ try { chrome.runtime.sendMessage({ action: "download_update", task: task }, () => { let _ = chrome.runtime.lastError; }); } catch(err) {}
203
+ }
204
+ let port = activePorts[taskId];
205
+ if (port) {
206
+ try { port.disconnect(); } catch(e) {}
207
+ }
208
+ delete activePorts[taskId];
209
+
210
+ setTimeout(() => {
211
+ if (activeTasks[taskId]) {
212
+ delete activeTasks[taskId];
213
+ try { chrome.runtime.sendMessage({ action: "download_remove", id: taskId }, () => { let _ = chrome.runtime.lastError; }); } catch(e) {}
214
+ }
215
+ }, 3000);
216
+ });
217
+
218
+ // Reset active count
219
+ activeDownloadsCount = 0;
220
+
221
+ // Broadcast emergency log
222
+ broadcastLog(null, null, "[EMERGENCIA] Parada de emergencia activada. Se han cancelado y eliminado todas las descargas activas y en cola.");
223
+
224
+ sendResponse({ success: true });
225
+ return true;
226
+ }
227
+
228
+ if (request.action === "get_active_downloads") {
229
+ sendResponse({ success: true, tasks: activeTasks });
230
+ return true;
231
+ }
232
+
233
+ if (request.action === "get_console_logs") {
234
+ sendResponse({ success: true, logs: consoleLogsCache });
235
+ return true;
236
+ }
237
+
238
+ if (request.action === "clear_console_logs") {
239
+ consoleLogsCache = [];
240
+ sendResponse({ success: true });
241
+ return true;
242
+ }
243
+
244
+ if (request.action === "clear_task") {
245
+ if (activeTasks[request.id]) {
246
+ delete activeTasks[request.id];
247
+ delete activePorts[request.id];
248
+ }
249
+ return true;
250
+ }
251
+
252
+ if (request.action === "cancel_download") {
253
+ let task = activeTasks[request.id];
254
+ if (task) {
255
+ task.status = "cancelled";
256
+ try { chrome.runtime.sendMessage({ action: "download_update", task: task }, () => { let _ = chrome.runtime.lastError; }); } catch(err) {}
257
+
258
+ let port = activePorts[request.id];
259
+ if (port) {
260
+ port.disconnect(); // Terminate native host instantly
261
+ activeDownloadsCount--; // Free slot
262
+ setTimeout(processDownloadQueue, 500); // Process next
263
+ } else {
264
+ // It's queued, not started natively yet
265
+ // Remove it from the queue immediately so it won't be processed
266
+ downloadQueue = downloadQueue.filter(q => q.downloadId !== request.id);
267
+ }
268
+
269
+ setTimeout(() => {
270
+ if (activeTasks[request.id]) {
271
+ delete activeTasks[request.id];
272
+ if (activePorts[request.id]) delete activePorts[request.id];
273
+ try { chrome.runtime.sendMessage({ action: "download_remove", id: request.id }, () => { let _ = chrome.runtime.lastError; }); } catch(err) {}
274
+ }
275
+ }, 2000);
276
+ }
277
+ return true;
278
+ }
279
+
280
+ if (request.action === "download" || request.action === "open_folder" || request.action === "get_info" || request.action === "get_playlist_info" || request.action === "select_folder") {
281
+
282
+ if (request.action === "open_folder" || request.action === "get_info" || request.action === "get_playlist_info" || request.action === "select_folder") {
283
+ const hostName = "com.gonzalo.videodownloader";
284
+ let port;
285
+ try {
286
+ port = chrome.runtime.connectNative(hostName);
287
+ let responded = false;
288
+ port.onMessage.addListener((message) => {
289
+ if (!responded) {
290
+ sendResponse({ success: true, ...message });
291
+ responded = true;
292
+ try { port.disconnect(); } catch(e) {}
293
+ }
294
+ });
295
+ port.onDisconnect.addListener(() => {
296
+ if (!responded) {
297
+ sendResponse({ success: false, error: chrome.runtime.lastError ? chrome.runtime.lastError.message : "Desconectado" });
298
+ responded = true;
299
+ }
300
+ });
301
+ port.postMessage({ command: request.action, url: request.url });
302
+ } catch(e) {
303
+ sendResponse({ success: false, error: e.message });
304
+ }
305
+ return true;
306
+ }
307
+
308
+ // Action === "download"
309
+ chrome.storage.local.get(['autoEngine'], (res) => {
310
+ let autoEngine = res.autoEngine !== undefined ? res.autoEngine : true; // Activado por defecto
311
+ let engineSetting = request.engineSetting || "ytdlp";
312
+
313
+ if (autoEngine === "on" || autoEngine === true) {
314
+ let urlLower = (request.url || "").toLowerCase();
315
+ if (urlLower.includes(".m3u8") || urlLower.includes(".mpd")) {
316
+ engineSetting = "nm3u8";
317
+ } else if (urlLower.endsWith(".mp4") || urlLower.endsWith(".webm") || urlLower.includes("pimpbunny.com")) {
318
+ engineSetting = "native";
319
+ } else {
320
+ engineSetting = "ytdlp";
321
+ }
322
+ request.engineSetting = engineSetting;
323
+ }
324
+
325
+ let downloadId = "dl_" + Date.now() + "_" + Math.floor(Math.random() * 1000);
326
+
327
+ activeTasks[downloadId] = {
328
+ id: downloadId,
329
+ title: request.title || "Video",
330
+ url: request.url,
331
+ percent: "0",
332
+ status: "queued"
333
+ };
334
+
335
+ downloadQueue.push({
336
+ downloadId: downloadId,
337
+ request: request
338
+ });
339
+
340
+ sendResponse({ success: true, queued: true, id: downloadId });
341
+ try { chrome.runtime.sendMessage({ action: "download_update", task: activeTasks[downloadId] }, () => { let _ = chrome.runtime.lastError; }); } catch(err) {}
342
+
343
+ processDownloadQueue();
344
+ });
345
+ return true; // Asynchronous response
346
+ }
347
+ });
348
+
349
+ let downloadQueue = [];
350
+ let activeDownloadsCount = 0;
351
+
352
+ function getCookiesForDomain(targetUrl, downloadId, callback) {
353
+ function logMsg(msg) {
354
+ console.log(msg);
355
+ broadcastLog(downloadId, null, msg);
356
+ }
357
+
358
+ if (!chrome.cookies) {
359
+ logMsg("[-] ERROR CRÍTICO: chrome.cookies no está disponible. DEBES recargar la extensión desde chrome://extensions.");
360
+ return callback('');
361
+ }
362
+
363
+ let query = { url: targetUrl };
364
+ try {
365
+ let domain = new URL(targetUrl).hostname;
366
+ if (domain.startsWith("www.")) {
367
+ domain = domain.substring(4);
368
+ }
369
+ if (domain.includes("instagram.com") || domain.includes("youtube.com") || domain.includes("tiktok.com")) {
370
+ query = { domain: domain };
371
+ }
372
+ } catch(e) {}
373
+
374
+ chrome.cookies.getAll(query, (cookies) => {
375
+ if (chrome.runtime.lastError) {
376
+ logMsg("[-] Error al extraer cookies: " + chrome.runtime.lastError.message);
377
+ return callback('');
378
+ }
379
+ let cookieString = "# Netscape HTTP Cookie File\n";
380
+ if (cookies && cookies.length > 0) {
381
+ logMsg(`[*] Extraídas ${cookies.length} cookies nativas para ${targetUrl} con éxito.`);
382
+ cookies.forEach(c => {
383
+ let domain = c.domain;
384
+ let includesSub = domain.startsWith('.') ? "TRUE" : "FALSE";
385
+ let path = c.path;
386
+ let secure = c.secure ? "TRUE" : "FALSE";
387
+ let expiration = c.expirationDate ? Math.floor(c.expirationDate) : Math.floor(Date.now() / 1000) + 3600;
388
+ cookieString += `${domain}\t${includesSub}\t${path}\t${secure}\t${expiration}\t${c.name}\t${c.value}\n`;
389
+ });
390
+ callback(cookieString);
391
+ } else {
392
+ logMsg(`[-] ADVERTENCIA: 0 cookies encontradas en Chrome para ${targetUrl}.`);
393
+ callback('');
394
+ }
395
+ });
396
+ }
397
+
398
+ function processDownloadQueue() {
399
+ if (activeDownloadsCount >= maxConcurrentDownloadsLimit) return;
400
+ if (downloadQueue.length === 0) return;
401
+
402
+ let queuedItem = downloadQueue.shift();
403
+ let downloadId = queuedItem.downloadId;
404
+ let request = queuedItem.request;
405
+
406
+ if (!activeTasks[downloadId] || activeTasks[downloadId].status !== "queued") {
407
+ // Was cleared or cancelled before it started
408
+ processDownloadQueue();
409
+ return;
410
+ }
411
+
412
+ activeDownloadsCount++;
413
+ activeTasks[downloadId].status = "started";
414
+ broadcastLog(downloadId, null, `[COLA] Iniciando descarga de "${activeTasks[downloadId].title}". Numero de descargas paralelas: ${activeDownloadsCount} (Límite: ${maxConcurrentDownloadsLimit})`);
415
+
416
+ // Extraer cookies de forma centralizada en background.js antes de conectar con el host nativo
417
+ chrome.storage.local.get(['cookiesSetting'], (storageRes) => {
418
+ let cookiesSetting = storageRes.cookiesSetting || 'none';
419
+ let url = request.url || '';
420
+ let shouldGetCookies = false;
421
+ let targetDomain = url;
422
+
423
+ if (url.includes("youtube.com") || url.includes("youtu.be")) {
424
+ shouldGetCookies = true;
425
+ targetDomain = "https://www.youtube.com";
426
+ } else if (url.includes("instagram.com")) {
427
+ shouldGetCookies = true;
428
+ targetDomain = "https://www.instagram.com";
429
+ } else if (url.includes("tiktok.com")) {
430
+ shouldGetCookies = true;
431
+ targetDomain = "https://www.tiktok.com";
432
+ } else if (cookiesSetting === "chrome") {
433
+ shouldGetCookies = true;
434
+ try {
435
+ let parsed = new URL(url);
436
+ targetDomain = parsed.protocol + "//" + parsed.hostname;
437
+ } catch(e) {}
438
+ }
439
+
440
+ if (shouldGetCookies) {
441
+ getCookiesForDomain(targetDomain, downloadId, (cookiesStr) => {
442
+ request.netscapeCookies = cookiesStr;
443
+ launchNativeDownload(downloadId, request);
444
+ });
445
+ } else {
446
+ request.netscapeCookies = '';
447
+ launchNativeDownload(downloadId, request);
448
+ }
449
+ });
450
+ }
451
+
452
+ function launchNativeDownload(downloadId, request) {
453
+ if (!activeTasks[downloadId] || activeTasks[downloadId].status !== "started") {
454
+ // Cancelado o removido durante la obtención de cookies
455
+ activeDownloadsCount--;
456
+ setTimeout(processDownloadQueue, 500);
457
+ return;
458
+ }
459
+
460
+ const hostName = "com.gonzalo.videodownloader";
461
+ let port;
462
+ try {
463
+ port = chrome.runtime.connectNative(hostName);
464
+ activePorts[downloadId] = port;
465
+ } catch (e) {
466
+ activeTasks[downloadId].status = "error";
467
+ activeTasks[downloadId].error = e.message;
468
+ try { chrome.runtime.sendMessage({ action: "download_update", task: activeTasks[downloadId] }, () => { let _ = chrome.runtime.lastError; }); } catch(err) {}
469
+
470
+ activeDownloadsCount--;
471
+ broadcastLog(downloadId, null, `[COLA] Error al conectar con el host para "${activeTasks[downloadId].title}". (Simultáneas activas restantes: ${activeDownloadsCount}/${maxConcurrentDownloadsLimit})`);
472
+ setTimeout(processDownloadQueue, 500);
473
+ return;
474
+ }
475
+
476
+ port.onMessage.addListener((message) => {
477
+ if (message.status === "log") {
478
+ let title = activeTasks[downloadId] ? activeTasks[downloadId].title : "Descarga";
479
+ broadcastLog(downloadId, title, message.log);
480
+ }
481
+ else if (message.status === "progress" || message.status === "completed" || message.status === "error" || message.status === "cancelled" || message.status === "started") {
482
+
483
+ if (activeTasks[downloadId]) {
484
+ activeTasks[downloadId].status = message.status;
485
+ if (message.percent) activeTasks[downloadId].percent = message.percent;
486
+ if (message.error) activeTasks[downloadId].error = message.error;
487
+ }
488
+ try { chrome.runtime.sendMessage({ action: "download_update", task: activeTasks[downloadId] }, () => { let _ = chrome.runtime.lastError; }); } catch(err) {}
489
+
490
+ if (message.status === "completed" || message.status === "cancelled" || message.status === "error") {
491
+ if (message.status === "completed" && activeTasks[downloadId]) {
492
+ let final_file = message.final_file || "";
493
+ let title = activeTasks[downloadId].title;
494
+ let url = activeTasks[downloadId].url;
495
+ chrome.storage.local.get(['downloadHistory'], (res) => {
496
+ let history = res.downloadHistory || [];
497
+ history.push({ title: title, url: url, final_file: final_file, date: new Date().toISOString() });
498
+ chrome.storage.local.set({ downloadHistory: history });
499
+ });
500
+ }
501
+ activeDownloadsCount--;
502
+
503
+ // Disconnect the native port immediately to close the Python process
504
+ let port = activePorts[downloadId];
505
+ if (port) {
506
+ delete activePorts[downloadId];
507
+ try { port.disconnect(); } catch(e) {}
508
+ }
509
+
510
+ let taskName = activeTasks[downloadId] ? activeTasks[downloadId].title : "Descarga";
511
+ broadcastLog(downloadId, null, `[COLA] Finalizó "${taskName}" con estado: ${message.status}. (Simultáneas activas restantes: ${activeDownloadsCount}/${maxConcurrentDownloadsLimit})`);
512
+ setTimeout(processDownloadQueue, 1500); // 1.5s delay to cool down between sequential downloads
513
+
514
+ if (message.status !== "error") {
515
+ setTimeout(() => {
516
+ if (activeTasks[downloadId]) {
517
+ delete activeTasks[downloadId];
518
+ try { chrome.runtime.sendMessage({ action: "download_remove", id: downloadId }, () => { let _ = chrome.runtime.lastError; }); } catch(e) {}
519
+ }
520
+ }, 4000);
521
+ }
522
+ }
523
+ }
524
+ });
525
+
526
+ port.onDisconnect.addListener(() => {
527
+ if (activePorts[downloadId]) {
528
+ delete activePorts[downloadId];
529
+
530
+ if (activeTasks[downloadId] && (activeTasks[downloadId].status === "queued" || activeTasks[downloadId].status === "started" || activeTasks[downloadId].status === "progress")) {
531
+ let err = chrome.runtime.lastError ? chrome.runtime.lastError.message : "Desconectado inesperadamente";
532
+ activeTasks[downloadId].status = "error";
533
+ activeTasks[downloadId].error = err;
534
+ try { chrome.runtime.sendMessage({ action: "download_update", task: activeTasks[downloadId] }, () => {}); } catch(e) {}
535
+
536
+ activeDownloadsCount--;
537
+ let taskName = activeTasks[downloadId] ? activeTasks[downloadId].title : "Descarga";
538
+ broadcastLog(downloadId, null, `[COLA] Error en "${taskName}": Desconectado inesperadamente. (Simultáneas activas restantes: ${activeDownloadsCount}/${maxConcurrentDownloadsLimit})`);
539
+ setTimeout(processDownloadQueue, 1000);
540
+ }
541
+ }
542
+ });
543
+
544
+ port.postMessage({
545
+ command: "download",
546
+ title: request.title,
547
+ url: request.url,
548
+ pageUrl: request.pageUrl,
549
+ savePath: request.savePath,
550
+ formatSetting: request.formatSetting,
551
+ qualitySetting: request.qualitySetting,
552
+ engineSetting: request.engineSetting,
553
+ threadCount: request.threadCount,
554
+ audioFormat: request.audioFormat,
555
+ audioQuality: request.audioQuality,
556
+ audioConvert: request.audioConvert,
557
+ videoFormatPref: request.videoFormatPref,
558
+ customFormatId: request.customFormatId,
559
+ netscapeCookies: request.netscapeCookies,
560
+ isAutoTitle: request.isAutoTitle
561
+ });
562
+ }
extension/js/content.js ADDED
@@ -0,0 +1 @@
 
 
1
+ // Archivo limpiado temporalmente por solicitud del usuario.
extension/js/popup.js ADDED
@@ -0,0 +1,1562 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ document.addEventListener('DOMContentLoaded', () => {
2
+ // Navigation Tabs logic
3
+ const tabs = document.querySelectorAll('.tab');
4
+ const panels = document.querySelectorAll('.panel');
5
+
6
+ tabs.forEach(tab => {
7
+ tab.addEventListener('click', () => {
8
+ tabs.forEach(t => t.classList.remove('active'));
9
+ panels.forEach(p => p.classList.remove('active'));
10
+
11
+ tab.classList.add('active');
12
+ const targetId = 'panel-' + tab.getAttribute('data-tab');
13
+ document.getElementById(targetId).classList.add('active');
14
+ });
15
+ });
16
+
17
+ // Local Storage Cache
18
+ const downloadsList = document.getElementById('downloadsList');
19
+ const clearHistoryBtn = document.getElementById('clearHistoryBtn');
20
+
21
+ function loadHistory() {
22
+ chrome.storage.local.get(['downloadHistory'], (result) => {
23
+ const history = result.downloadHistory || [];
24
+ downloadsList.innerHTML = '';
25
+ if (history.length === 0) {
26
+ downloadsList.innerHTML = '<div style="text-align:center; color:#6a6b70; padding:20px 0;">No hay historial en caché</div>';
27
+ return;
28
+ }
29
+ history.slice().reverse().forEach(item => {
30
+ const div = document.createElement('div');
31
+ div.className = 'history-item';
32
+ div.innerHTML = `
33
+ <div class="history-title" title="${item.title}">${item.title}</div>
34
+ <div class="history-date">${new Date(item.date).toLocaleString()}</div>
35
+ <div class="history-actions">
36
+ <button class="action-btn secondary btn-small open-url-btn" data-url="${item.url}">Ver Origen</button>
37
+ <button class="action-btn secondary btn-small open-folder-btn" data-file="${item.final_file || ''}">Abrir Ubicación</button>
38
+ </div>
39
+ `;
40
+ div.querySelector('.open-url-btn').addEventListener('click', (e) => {
41
+ window.open(e.target.getAttribute('data-url'), '_blank');
42
+ });
43
+ div.querySelector('.open-folder-btn').addEventListener('click', (e) => {
44
+ let file = e.target.getAttribute('data-file');
45
+ if (file) {
46
+ chrome.runtime.sendMessage({ action: "open_folder", file: file }, () => { });
47
+ } else {
48
+ chrome.runtime.sendMessage({ action: "open_folder" }, () => { });
49
+ }
50
+ });
51
+ downloadsList.appendChild(div);
52
+ });
53
+ });
54
+ }
55
+
56
+ clearHistoryBtn.addEventListener('click', () => {
57
+ chrome.storage.local.set({ downloadHistory: [] }, () => {
58
+ loadHistory();
59
+ });
60
+ });
61
+
62
+ loadHistory();
63
+
64
+ // Settings Logic
65
+ const openFolderBtn = document.getElementById('openFolderBtn');
66
+ const sniffedVideosCard = document.getElementById('sniffedVideosCard');
67
+ const sniffedLinksList = document.getElementById('sniffedLinksList');
68
+ let customPathObj = null;
69
+ let sniffedUrlOverride = null;
70
+
71
+ const selectFolderBtn = document.getElementById('selectFolderBtn');
72
+ const savePathDisplay = document.getElementById('savePathDisplay');
73
+ const savePathStatus = document.getElementById('savePathStatus');
74
+
75
+ const formatRadios = document.querySelectorAll('input[name="formatSetting"]');
76
+ const qualityRadios = document.querySelectorAll('input[name="qualitySetting"]');
77
+ const engineRadios = document.querySelectorAll('input[name="engineSetting"]');
78
+ const qualitySettingContainer = document.getElementById('qualitySettingContainer');
79
+ const videoPreferenceContainer = document.getElementById('videoPreferenceContainer');
80
+ const audioSettingsContainer = document.getElementById('audioSettingsContainer');
81
+ const audioSettingsLabel = document.getElementById('audioSettingsLabel');
82
+ const audioFormatSelect = document.getElementById('audioFormatSelect');
83
+ const audioQualitySelect = document.getElementById('audioQualitySelect');
84
+ const audioConvertSelect = document.getElementById('audioConvertSelect');
85
+ const threadSlider = document.getElementById('threadSlider');
86
+ const threadCountLabel = document.getElementById('threadCountLabel');
87
+ const threadSettingContainer = document.getElementById('threadSettingContainer');
88
+ const concurrencySlider = document.getElementById('concurrencySlider');
89
+ const concurrencyCountLabel = document.getElementById('concurrencyCountLabel');
90
+ const videoFormatPrefRadios = document.querySelectorAll('input[name="videoFormatPref"]');
91
+
92
+ const customModeToggle = document.getElementById('customModeToggle');
93
+ const snifferToggle = document.getElementById('snifferToggle');
94
+ const manualCardContainer = document.getElementById('manualCardContainer');
95
+ const manualUrlInput = document.getElementById('manualUrlInput');
96
+ const manualQualityDrop = document.getElementById('manualQualityDrop');
97
+ const manualDownloadBtn = document.getElementById('manualDownloadBtn');
98
+ const pasteUrlBtn = document.getElementById('pasteUrlBtn');
99
+ const clearErrorsBtn = document.getElementById('clearErrorsBtn');
100
+ const snifferStatusFooter = document.getElementById('snifferStatusFooter');
101
+ const snifferCountBadge = document.getElementById('snifferCountBadge');
102
+ const forceDetectBtn = document.getElementById('forceDetectBtn');
103
+ const forceDetectHtmlBtn = document.getElementById('forceDetectHtmlBtn');
104
+ const forceDetectJavBtn = document.getElementById('forceDetectJavBtn');
105
+ const openToolsBtn = document.getElementById('openToolsBtn');
106
+
107
+ if (openToolsBtn) {
108
+ openToolsBtn.addEventListener('click', () => {
109
+ chrome.tabs.create({ url: chrome.runtime.getURL('tools.html') });
110
+ });
111
+ }
112
+
113
+ if (forceDetectBtn) {
114
+ forceDetectBtn.addEventListener('click', () => {
115
+ forceDetectBtn.innerText = "Recargando...";
116
+ forceDetectBtn.disabled = true;
117
+ chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => {
118
+ if (tabs.length > 0) {
119
+ chrome.tabs.reload(tabs[0].id, () => {
120
+ window.close(); // Cierra el popup para permitir que la página recargue y capture libremente
121
+ });
122
+ }
123
+ });
124
+ });
125
+ }
126
+
127
+ if (forceDetectHtmlBtn) {
128
+ forceDetectHtmlBtn.addEventListener('click', () => {
129
+ forceDetectHtmlBtn.innerText = "Buscando...";
130
+ forceDetectHtmlBtn.disabled = true;
131
+ chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => {
132
+ if (tabs.length > 0) {
133
+ chrome.scripting.executeScript({
134
+ target: { tabId: tabs[0].id, allFrames: true },
135
+ func: () => {
136
+ let urls = [];
137
+
138
+ // 1. Detección Inteligente del Video en Pantalla (Monitor de Red)
139
+ try {
140
+ let entries = performance.getEntriesByType('resource');
141
+ entries.sort((a, b) => b.startTime - a.startTime); // Ordenar de más reciente a más antiguo
142
+ let activeFound = 0;
143
+ for (let entry of entries) {
144
+ let n = entry.name;
145
+ let low_n = n.toLowerCase();
146
+ if (low_n.includes('.mp4') || low_n.includes('.webm') || low_n.includes('.mkv') || low_n.includes('.m3u8') || low_n.includes('.mpd')) {
147
+ let cleanUrl = n;
148
+ // Remover fragmentos de byte para obtener la URL original
149
+ if (cleanUrl.includes('&bytestart=')) cleanUrl = cleanUrl.split('&bytestart=')[0];
150
+ if (cleanUrl.includes('?bytestart=')) cleanUrl = cleanUrl.split('?bytestart=')[0];
151
+
152
+ if (!urls.includes(cleanUrl + "#ACTUAL")) {
153
+ urls.push(cleanUrl + "#ACTUAL");
154
+ activeFound++;
155
+ }
156
+ if (activeFound >= 3) break; // Tomar los 3 videos descargados más recientemente
157
+ }
158
+ }
159
+ } catch (e) {}
160
+
161
+ // 2. Buscar en etiquetas <video> y <source> visibles
162
+ document.querySelectorAll('video').forEach(v => {
163
+ let tag = (v.offsetParent !== null && !v.paused) ? "#ACTUAL" : "";
164
+ let src = v.currentSrc || v.src;
165
+ if (src && src.startsWith('http')) urls.push(src + tag);
166
+ v.querySelectorAll('source').forEach(s => {
167
+ if (s.src && s.src.startsWith('http')) urls.push(s.src + tag);
168
+ });
169
+ });
170
+ // 3. Buscar enlaces <a>
171
+ document.querySelectorAll('a[href]').forEach(a => {
172
+ let h = a.href.toLowerCase();
173
+ if (h.includes('.mp4') || h.includes('.webm') || h.includes('.mkv')) {
174
+ if (a.href.startsWith('http')) urls.push(a.href);
175
+ }
176
+ });
177
+ // 3. Búsqueda profunda (Regex) en todo el código fuente de la página actual
178
+ // Esto ayuda a encontrar enlaces de video ocultos en JSON o scripts de Facebook/Instagram
179
+ try {
180
+ let htmlString = document.documentElement.innerHTML;
181
+ // Des-escapar barras invertidas, ampersands, porcentajes y signos de igual de JSON de Facebook
182
+ let cleanHtml = htmlString.replace(/\\\//g, '/').replace(/\\u0026/g, '&').replace(/\\u0025/g, '%').replace(/\\u003d/ig, '=').replace(/\\"/g, '"');
183
+
184
+ // Extract all URLs and filter them
185
+ let allUrls = cleanHtml.match(/https?:\/\/[^"'\s<>\[\]\\\{\}]+/gi);
186
+ if (allUrls) {
187
+ allUrls.forEach(m => {
188
+ let u = m.replace(/\\/g, '').replace(/&amp;/g, '&');
189
+ let low_u = u.toLowerCase();
190
+ if (low_u.includes('.mp4') || low_u.includes('.webm') || low_u.includes('.mkv') || low_u.includes('.m3u8') || low_u.includes('.mpd')) {
191
+ urls.push(u);
192
+ }
193
+ });
194
+ }
195
+
196
+ // 4. Buscar en el historial de red de la página (recursos cargados dinámicamente)
197
+ // Esto es vital para Facebook porque cargan los videos por XHR/Fetch sin ponerlos en el HTML
198
+ performance.getEntriesByType('resource').forEach(entry => {
199
+ let n = entry.name;
200
+ let low_n = n.toLowerCase();
201
+ if (low_n.includes('.mp4') || low_n.includes('.webm') || low_n.includes('.mkv') || low_n.includes('.m3u8') || low_n.includes('.mpd')) {
202
+ urls.push(n);
203
+ }
204
+ });
205
+ } catch (e) {}
206
+
207
+ return [...new Set(urls)];
208
+ }
209
+ }, (results) => {
210
+ forceDetectHtmlBtn.innerText = "Forzar HTML";
211
+ forceDetectHtmlBtn.disabled = false;
212
+
213
+ if (chrome.runtime.lastError) {
214
+ forceDetectHtmlBtn.innerText = "Error: " + chrome.runtime.lastError.message.substring(0, 15);
215
+ setTimeout(() => { forceDetectHtmlBtn.innerText = "Forzar HTML"; }, 3000);
216
+ return;
217
+ }
218
+
219
+ if (results && results.length > 0) {
220
+ let urls = [];
221
+ results.forEach(frameResult => {
222
+ if (frameResult.result) {
223
+ urls = urls.concat(frameResult.result);
224
+ }
225
+ });
226
+ urls = [...new Set(urls)]; // Deduplicate after flattening
227
+
228
+ if (urls.length > 0) {
229
+ chrome.storage.local.get(['sniffedUrls'], (res) => {
230
+ let snifferDict = res.sniffedUrls || {};
231
+ let tabId = tabs[0].id;
232
+ if (!snifferDict[tabId]) snifferDict[tabId] = [];
233
+
234
+ let newAdded = false;
235
+ let newCount = 0;
236
+ urls.forEach(u => {
237
+ if (!snifferDict[tabId].includes(u)) {
238
+ snifferDict[tabId].push(u);
239
+ newAdded = true;
240
+ newCount++;
241
+ }
242
+ });
243
+
244
+ forceDetectHtmlBtn.innerText = `¡${urls.length} hallados! (${newCount} nuevos)`;
245
+ setTimeout(() => { forceDetectHtmlBtn.innerText = "Forzar HTML"; }, 3000);
246
+
247
+ if (newAdded) {
248
+ chrome.storage.local.set({ sniffedUrls: snifferDict }, () => {
249
+ if (typeof renderDetectorUI === 'function') {
250
+ renderDetectorUI();
251
+ }
252
+ });
253
+ }
254
+ });
255
+ } else {
256
+ forceDetectHtmlBtn.innerText = "No se encontraron";
257
+ setTimeout(() => { forceDetectHtmlBtn.innerText = "Forzar HTML"; }, 2000);
258
+ }
259
+ } else {
260
+ forceDetectHtmlBtn.innerText = "No se encontraron";
261
+ setTimeout(() => { forceDetectHtmlBtn.innerText = "Forzar HTML"; }, 2000);
262
+ }
263
+ });
264
+ }
265
+ });
266
+ });
267
+ }
268
+
269
+ if (forceDetectJavBtn) {
270
+ forceDetectJavBtn.addEventListener('click', () => {
271
+ forceDetectJavBtn.innerText = "Buscando...";
272
+ forceDetectJavBtn.disabled = true;
273
+
274
+ chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => {
275
+ if (tabs.length === 0) return;
276
+ const activeTab = tabs[0];
277
+ const tabId = activeTab.id;
278
+
279
+ chrome.scripting.executeScript({
280
+ target: { tabId: tabId },
281
+ func: () => {
282
+ try {
283
+ const html = document.documentElement.outerHTML;
284
+
285
+ // 1. 123AV JSON
286
+ const match123 = html.match(/player\(JSON\.parse\('([^']+)'\)/);
287
+ if (match123) {
288
+ let rawJson = match123[1];
289
+ let jsonStr = rawJson.replace(/\\"/g, '"').replace(/\\\//g, '/');
290
+ jsonStr = jsonStr.replace(/\\u([0-9a-fA-F]{4})/g, (m, grp) => String.fromCharCode(parseInt(grp, 16)));
291
+ const playerData = JSON.parse(jsonStr);
292
+ for (const item of playerData) {
293
+ if (item.url && item.url.includes('surrit.')) {
294
+ return { type: '123av', surritUrl: item.url };
295
+ }
296
+ }
297
+ }
298
+
299
+ // 2. MissAV packer
300
+ const splitMatch = html.match(/'([^']+)'\.split\('\|'\)/);
301
+ if (splitMatch) {
302
+ const words = splitMatch[1].split('|');
303
+ const pMatch = html.match(/\}\('(.*?)', *\d+, *\d+,/);
304
+ if (pMatch) {
305
+ let p = pMatch[1];
306
+ function base36(i) { return i.toString(36); }
307
+ for (let i = words.length - 1; i >= 0; i--) {
308
+ const word = words[i];
309
+ if (word) {
310
+ const idx = base36(i);
311
+ const regex = new RegExp('\\b' + idx + '\\b', 'g');
312
+ p = p.replace(regex, word);
313
+ }
314
+ }
315
+ const m3u8Links = p.match(/https?:\/\/surrit\.com[^\s'"]+\.m3u8/);
316
+ if (m3u8Links) {
317
+ return { type: 'missav', m3u8Url: m3u8Links[0] };
318
+ }
319
+ }
320
+ }
321
+
322
+ // 3. direct Regex for surrit.com
323
+ const m3u8Matches = html.match(/https?:\/\/surrit\.com\/[a-zA-Z0-9-]+\/[^\s'"]+\.m3u8/);
324
+ if (m3u8Matches) {
325
+ return { type: 'missav', m3u8Url: m3u8Matches[0] };
326
+ }
327
+
328
+ // 4. DOM
329
+ const sources = Array.from(document.querySelectorAll('video, source, iframe'));
330
+ for (const srcEl of sources) {
331
+ const src = srcEl.src || srcEl.getAttribute('src');
332
+ if (src && (src.includes('surrit.com') || src.includes('surrit.store')) && src.includes('.m3u8')) {
333
+ return { type: 'missav', m3u8Url: src };
334
+ }
335
+ }
336
+ } catch (e) {
337
+ console.error(e);
338
+ }
339
+ return null;
340
+ }
341
+ }, async (results) => {
342
+ forceDetectJavBtn.innerText = "Detección JAV";
343
+ forceDetectJavBtn.disabled = false;
344
+
345
+ if (chrome.runtime.lastError || !results || !results[0] || !results[0].result) {
346
+ forceDetectJavBtn.innerText = "No Encontrado";
347
+ setTimeout(() => { forceDetectJavBtn.innerText = "Detección JAV"; }, 2000);
348
+ return;
349
+ }
350
+
351
+ const res = results[0].result;
352
+ let finalM3u8 = null;
353
+ if (res.type === '123av' && res.surritUrl) {
354
+ try {
355
+ const urlObj = new URL(res.surritUrl);
356
+ const videoId = urlObj.pathname.split('/').pop();
357
+ const poster = urlObj.searchParams.get('poster') || '';
358
+ const streamApiUrl = `https://surrit.store/stream?id=${videoId}&poster=${encodeURIComponent(poster)}`;
359
+
360
+ const apiRes = await fetch(streamApiUrl);
361
+ const data = await apiRes.json();
362
+ if (data && data.media && data.media.stream) {
363
+ finalM3u8 = data.media.stream;
364
+ }
365
+ } catch (err) {
366
+ console.error(err);
367
+ }
368
+ } else if (res.type === 'missav' && res.m3u8Url) {
369
+ finalM3u8 = res.m3u8Url;
370
+ }
371
+
372
+ if (finalM3u8) {
373
+ chrome.storage.local.get(['sniffedUrls'], (s2) => {
374
+ let currentDict = s2.sniffedUrls || {};
375
+ if (!currentDict[tabId]) currentDict[tabId] = [];
376
+ if (!currentDict[tabId].includes(finalM3u8)) {
377
+ currentDict[tabId].push(finalM3u8);
378
+ chrome.storage.local.set({ sniffedUrls: currentDict }, () => {
379
+ forceDetectJavBtn.innerText = "¡Detectado!";
380
+ setTimeout(() => { forceDetectJavBtn.innerText = "Detección JAV"; }, 2000);
381
+ renderDetectorUI();
382
+ });
383
+ } else {
384
+ forceDetectJavBtn.innerText = "Ya Detectado";
385
+ setTimeout(() => { forceDetectJavBtn.innerText = "Detección JAV"; }, 2000);
386
+ }
387
+ });
388
+ } else {
389
+ forceDetectJavBtn.innerText = "No Encontrado";
390
+ setTimeout(() => { forceDetectJavBtn.innerText = "Detección JAV"; }, 2000);
391
+ }
392
+ });
393
+ });
394
+ });
395
+ }
396
+
397
+ chrome.storage.local.get(['customSavePath', 'formatSetting', 'qualitySetting', 'engineSetting', 'threadCount', 'audioFormat', 'audioQuality', 'audioConvert', 'videoFormatPref', 'customMode', 'snifferEnabled', 'ytAudioLang', 'ytSubs', 'cookiesSetting', 'maxConcurrentDownloads', 'batchNamingMode', 'batchCustomPrefix'], (result) => {
398
+ if (result.customSavePath) { savePathDisplay.innerText = result.customSavePath; }
399
+ else { savePathDisplay.innerText = "Ninguna seleccionada (Descargas)"; }
400
+
401
+ const popupBatchNamingSelect = document.getElementById('popupBatchNamingSelect');
402
+ const popupBatchCustomPrefixInput = document.getElementById('popupBatchCustomPrefixInput');
403
+ const popupBatchCustomPrefixWrap = document.getElementById('popupBatchCustomPrefixWrap');
404
+
405
+ if (popupBatchNamingSelect) {
406
+ const mode = result.batchNamingMode || 'original';
407
+ popupBatchNamingSelect.value = mode;
408
+ if (popupBatchCustomPrefixWrap) {
409
+ popupBatchCustomPrefixWrap.style.display = (mode === 'custom') ? 'block' : 'none';
410
+ }
411
+ popupBatchNamingSelect.addEventListener('change', (e) => {
412
+ const newMode = e.target.value;
413
+ if (popupBatchCustomPrefixWrap) {
414
+ popupBatchCustomPrefixWrap.style.display = (newMode === 'custom') ? 'block' : 'none';
415
+ }
416
+ chrome.storage.local.set({ batchNamingMode: newMode });
417
+ });
418
+ }
419
+
420
+ if (popupBatchCustomPrefixInput) {
421
+ popupBatchCustomPrefixInput.value = result.batchCustomPrefix || '';
422
+ popupBatchCustomPrefixInput.addEventListener('input', (e) => {
423
+ chrome.storage.local.set({ batchCustomPrefix: e.target.value });
424
+ });
425
+ }
426
+
427
+ const f = result.formatSetting || 'mp4';
428
+ const q = result.qualitySetting || 'max';
429
+ const e = result.engineSetting || 'ytdlp';
430
+ const t = result.threadCount || 4;
431
+ const mc = result.maxConcurrentDownloads || 1;
432
+ const vfp = result.videoFormatPref || 'legado';
433
+ const isCustomMode = result.customMode === true;
434
+ const isSnifferEnabled = result.snifferEnabled !== false; // Default true
435
+
436
+ const customModeRadios = document.querySelectorAll('input[name="customModeSetting"]');
437
+ customModeRadios.forEach(r => {
438
+ if (isCustomMode && r.value === 'on') r.checked = true;
439
+ else if (!isCustomMode && r.value === 'off') r.checked = true;
440
+
441
+ r.addEventListener('change', (e) => {
442
+ const isChecked = e.target.value === 'on';
443
+ chrome.storage.local.set({ customMode: isChecked });
444
+ if (manualCardContainer) manualCardContainer.style.display = isChecked ? 'block' : 'none';
445
+ if (isChecked && emptyState) emptyState.style.display = 'none';
446
+ });
447
+ });
448
+
449
+ const snifferRadios = document.querySelectorAll('input[name="snifferSetting"]');
450
+ snifferRadios.forEach(r => {
451
+ if (isSnifferEnabled && r.value === 'on') r.checked = true;
452
+ else if (!isSnifferEnabled && r.value === 'off') r.checked = true;
453
+
454
+ r.addEventListener('change', (e) => {
455
+ const isChecked = e.target.value === 'on';
456
+ chrome.storage.local.set({ snifferEnabled: isChecked });
457
+ const dot = document.querySelector('.status-dot');
458
+ if (!isChecked) {
459
+ if (dot) dot.style.backgroundColor = '#6a6b70';
460
+ chrome.storage.local.set({ sniffedUrls: {} }, () => {
461
+ renderDetectorUI();
462
+ });
463
+ } else {
464
+ if (dot) dot.style.backgroundColor = '#00e676';
465
+ renderDetectorUI();
466
+ }
467
+ });
468
+ });
469
+
470
+ if (manualCardContainer) manualCardContainer.style.display = isCustomMode ? 'block' : 'none';
471
+
472
+ const ytl = result.ytAudioLang || 'es';
473
+ const yts = result.ytSubs || 'off';
474
+
475
+ const ytAudioRadios = document.querySelectorAll('input[name="ytAudioLang"]');
476
+ ytAudioRadios.forEach(r => {
477
+ if (r.value === ytl) r.checked = true;
478
+ r.addEventListener('change', (e) => {
479
+ chrome.storage.local.set({ ytAudioLang: e.target.value });
480
+ });
481
+ });
482
+
483
+ const ytSubsRadios = document.querySelectorAll('input[name="ytSubs"]');
484
+ ytSubsRadios.forEach(r => {
485
+ if (r.value === yts) r.checked = true;
486
+ r.addEventListener('change', (e) => {
487
+ chrome.storage.local.set({ ytSubs: e.target.value });
488
+ });
489
+ });
490
+
491
+ const cs = result.cookiesSetting || 'none';
492
+ const cookiesRadios = document.querySelectorAll('input[name="cookiesSetting"]');
493
+ cookiesRadios.forEach(r => {
494
+ if (r.value === cs) r.checked = true;
495
+ r.addEventListener('change', (e) => {
496
+ chrome.storage.local.set({ cookiesSetting: e.target.value });
497
+ });
498
+ });
499
+
500
+ const fRadio = document.querySelector(`input[name="formatSetting"][value="${f}"]`);
501
+ if (fRadio) fRadio.checked = true;
502
+ const qRadio = document.querySelector(`input[name="qualitySetting"][value="${q}"]`);
503
+ if (qRadio) qRadio.checked = true;
504
+ const eRadio = document.querySelector(`input[name="engineSetting"][value="${e}"]`);
505
+ if (eRadio) eRadio.checked = true;
506
+ const vfpRadio = document.querySelector(`input[name="videoFormatPref"][value="${vfp}"]`);
507
+ if (vfpRadio) vfpRadio.checked = true;
508
+ if (threadSlider) {
509
+ threadSlider.value = t;
510
+ threadCountLabel.innerText = `Hilos: ${t}`;
511
+ threadCountLabel.style.color = t > 24 ? '#ff4d4d' : '#e5e5e5';
512
+ }
513
+ if (threadSettingContainer) {
514
+ threadSettingContainer.style.display = 'block';
515
+ }
516
+ if (concurrencySlider) {
517
+ concurrencySlider.value = mc;
518
+ concurrencyCountLabel.innerText = `Descargas a la vez: ${mc}`;
519
+ }
520
+
521
+ function updateThreadDescription(engine) {
522
+ const desc = document.getElementById('threadDescription');
523
+ if (!desc) return;
524
+ if (engine === 'ytdlp') {
525
+ desc.innerHTML = "<b>Motor por defecto (yt-dlp):</b> Seguro y confiable. Divide el archivo en partes. <br><b>Recomendación:</b> 4 a 8 hilos. Valores mayores (10+) pueden causar bloqueos en servidores comunes.";
526
+ } else if (engine === 'aria2') {
527
+ desc.innerHTML = "<b>Acelerador (aria2):</b> Motor agresivo. Abre múltiples conexiones simultáneas.<br><b>Recomendación:</b> 8 a 16 hilos. Ideal para exprimir tu ancho de banda en descargas directas.";
528
+ } else if (engine === 'nm3u8') {
529
+ desc.innerHTML = "<b>Motor Extremo (N_m3u8DL):</b> Especializado en streaming (.m3u8). Procesa fragmentos en paralelo.<br><b>Recomendación:</b> 8 a 24 hilos. Valores extremos (+24) bajo tu propia responsabilidad.";
530
+ } else if (engine === 'native') {
531
+ desc.innerHTML = "<b>Nativo (Directo):</b> Motor escrito en Python puro. Salta intermediarios y bloqueos HTTP 403.<br><b>Recomendación:</b> Ignora los hilos (baja a máxima velocidad de forma monolítica). Úsalo solo para enlaces directos (.mp4) rebeldes.";
532
+ }
533
+ }
534
+ updateThreadDescription(e);
535
+
536
+
537
+ if (audioFormatSelect) audioFormatSelect.value = result.audioFormat || 'best';
538
+ if (audioQualitySelect) audioQualitySelect.value = result.audioQuality || '0';
539
+ if (audioConvertSelect) audioConvertSelect.value = result.audioConvert || 'mp3';
540
+
541
+ if (f === 'mp3') {
542
+ if (qualitySettingContainer) qualitySettingContainer.style.display = 'none';
543
+ if (videoPreferenceContainer) videoPreferenceContainer.style.display = 'none';
544
+ // audio is always visible, but label changes
545
+ if (audioSettingsLabel) audioSettingsLabel.innerText = 'Ajustes de Audio';
546
+ } else {
547
+ if (qualitySettingContainer) qualitySettingContainer.style.display = 'block';
548
+ if (videoPreferenceContainer) videoPreferenceContainer.style.display = 'block';
549
+ if (audioSettingsLabel) audioSettingsLabel.innerText = 'Ajustes del Audio del Video';
550
+ }
551
+ });
552
+
553
+ formatRadios.forEach(r => r.addEventListener('change', (e) => {
554
+ chrome.storage.local.set({ formatSetting: e.target.value }, () => {
555
+ if (qualitySettingContainer) {
556
+ qualitySettingContainer.style.display = e.target.value === 'mp3' ? 'none' : 'block';
557
+ }
558
+ if (videoPreferenceContainer) {
559
+ videoPreferenceContainer.style.display = e.target.value === 'mp3' ? 'none' : 'block';
560
+ }
561
+ if (audioSettingsLabel) {
562
+ audioSettingsLabel.innerText = e.target.value === 'mp3' ? 'Ajustes de Audio' : 'Ajustes del Audio del Video';
563
+ }
564
+ updateAllDropdowns();
565
+ });
566
+ }));
567
+ qualityRadios.forEach(r => r.addEventListener('change', (e) => {
568
+ chrome.storage.local.set({ qualitySetting: e.target.value }, () => {
569
+ updateAllDropdowns();
570
+ });
571
+ }));
572
+ engineRadios.forEach(r => r.addEventListener('change', (e) => {
573
+ chrome.storage.local.set({ engineSetting: e.target.value });
574
+ if (threadSettingContainer) {
575
+ threadSettingContainer.style.display = 'block';
576
+ }
577
+
578
+ const desc = document.getElementById('threadDescription');
579
+ if (desc) {
580
+ let engine = e.target.value;
581
+ if (engine === 'ytdlp') {
582
+ desc.innerHTML = "<b>Motor por defecto (yt-dlp):</b> Seguro y confiable. Divide el archivo en partes. <br><b>Recomendación:</b> 4 a 8 hilos. Valores mayores (10+) pueden causar bloqueos en servidores comunes.";
583
+ } else if (engine === 'aria2') {
584
+ desc.innerHTML = "<b>Acelerador (aria2):</b> Motor agresivo. Abre múltiples conexiones simultáneas.<br><b>Recomendación:</b> 8 a 16 hilos. Ideal para exprimir tu ancho de banda en descargas directas.";
585
+ } else if (engine === 'nm3u8') {
586
+ desc.innerHTML = "<b>Motor Extremo (N_m3u8DL):</b> Especializado en streaming (.m3u8). Procesa fragmentos en paralelo.<br><b>Recomendación:</b> 8 a 24 hilos. Valores extremos (+24) bajo tu propia responsabilidad.";
587
+ } else if (engine === 'native') {
588
+ desc.innerHTML = "<b>Nativo (Directo):</b> Motor escrito en Python puro. Salta intermediarios y bloqueos HTTP 403.<br><b>Recomendación:</b> Ignora los hilos (baja a máxima velocidad de forma monolítica). Úsalo solo para enlaces directos (.mp4) rebeldes.";
589
+ }
590
+ }
591
+ }));
592
+
593
+ videoFormatPrefRadios.forEach(r => r.addEventListener('change', (e) => {
594
+ chrome.storage.local.set({ videoFormatPref: e.target.value });
595
+ }));
596
+
597
+ if (threadSlider) {
598
+ threadSlider.addEventListener('input', (e) => {
599
+ let val = parseInt(e.target.value);
600
+ threadCountLabel.innerText = `Hilos: ${val}`;
601
+ threadCountLabel.style.color = val > 24 ? '#ff4d4d' : '#e5e5e5';
602
+ });
603
+ threadSlider.addEventListener('change', (e) => {
604
+ chrome.storage.local.set({ threadCount: parseInt(e.target.value) });
605
+ });
606
+ }
607
+
608
+ if (concurrencySlider) {
609
+ concurrencySlider.addEventListener('input', (e) => {
610
+ let val = parseInt(e.target.value);
611
+ concurrencyCountLabel.innerText = `Descargas a la vez: ${val}`;
612
+ });
613
+ concurrencySlider.addEventListener('change', (e) => {
614
+ chrome.storage.local.set({ maxConcurrentDownloads: parseInt(e.target.value) });
615
+ });
616
+ }
617
+
618
+ ['audioFormatSelect', 'audioQualitySelect', 'audioConvertSelect'].forEach(id => {
619
+ const el = document.getElementById(id);
620
+ if (el) {
621
+ el.addEventListener('change', (e) => {
622
+ const key = id.replace('Select', '');
623
+ chrome.storage.local.set({ [key]: e.target.value });
624
+ });
625
+ }
626
+ });
627
+
628
+
629
+
630
+ if (clearErrorsBtn) {
631
+ clearErrorsBtn.addEventListener('click', () => {
632
+ const cards = document.querySelectorAll('#cardsWrapper .detected-video-card');
633
+ cards.forEach(card => {
634
+ const stMsg = card.querySelector('.status-msg');
635
+ const btn = card.querySelector('.main-btn');
636
+ if ((stMsg && (stMsg.innerText.includes('Error') || stMsg.innerText.includes('Completado') || stMsg.innerText.includes('Cancelado'))) || (btn && (btn.innerText === "Fallido" || btn.innerText === "¡Listo!"))) {
637
+ let activeTaskId = card.getAttribute('data-taskid');
638
+ if (activeTaskId) {
639
+ chrome.runtime.sendMessage({ action: "clear_task", id: activeTaskId });
640
+ }
641
+ card.style.opacity = '0';
642
+ setTimeout(() => card.remove(), 200);
643
+ }
644
+ });
645
+ setTimeout(() => {
646
+ if (document.getElementById('cardsWrapper').children.length === 0) {
647
+ document.getElementById('emptyState').style.display = "flex";
648
+ }
649
+ }, 250);
650
+ });
651
+ }
652
+
653
+ const emergencyStopBtn = document.getElementById('emergencyStopBtn');
654
+ if (emergencyStopBtn) {
655
+ emergencyStopBtn.addEventListener('click', () => {
656
+ if (confirm('¿Estás seguro de que deseas detener de forma total todas las descargas activas y vaciar la cola?')) {
657
+ chrome.runtime.sendMessage({ action: 'emergency_stop' }, (response) => {
658
+ if (response && response.success) {
659
+ const cards = document.querySelectorAll('#cardsWrapper .detected-video-card');
660
+ cards.forEach(card => {
661
+ const stMsg = card.querySelector('.status-msg');
662
+ const stPct = card.querySelector('.status-percent');
663
+ const barFill = card.querySelector('.bar-fill');
664
+ const btn = card.querySelector('.main-btn');
665
+
666
+ if (stMsg) { stMsg.innerText = "Cancelado (Emergencia)"; stMsg.style.color = "#ffb84d"; }
667
+ if (stPct) { stPct.innerText = "Cancelado"; stPct.style.color = "#ffb84d"; }
668
+ if (barFill) { barFill.style.width = "100%"; barFill.style.backgroundColor = "#8c8d91"; }
669
+ if (btn) { btn.innerText = "Descargar"; btn.disabled = false; btn.style.borderColor = ""; btn.style.color = ""; btn.style.backgroundColor = ""; }
670
+ });
671
+ }
672
+ });
673
+ }
674
+ });
675
+ }
676
+
677
+ const linkCountDisplay = document.getElementById('linkCountDisplay');
678
+
679
+ function updateLinkCount() {
680
+ if (!linkCountDisplay) return;
681
+ const text = manualUrlInput.value.trim();
682
+ if (!text) {
683
+ linkCountDisplay.innerText = "0 enlaces";
684
+ return;
685
+ }
686
+ const count = text.split(/[\s\n,]+/).filter(u => u.trim().startsWith('http')).length;
687
+ linkCountDisplay.innerText = count === 1 ? "1 enlace" : `${count} enlaces`;
688
+ }
689
+
690
+ if (pasteUrlBtn) {
691
+ pasteUrlBtn.addEventListener('click', async () => {
692
+ try {
693
+ const text = await navigator.clipboard.readText();
694
+ manualUrlInput.value = text;
695
+ pasteUrlBtn.style.color = '#4ade80'; // Success green flash
696
+ setTimeout(() => { pasteUrlBtn.style.color = '#8c8d91'; }, 800);
697
+ updateLinkCount();
698
+ } catch (err) {
699
+ console.error('Failed to read clipboard: ', err);
700
+ }
701
+ });
702
+ }
703
+
704
+ if (manualUrlInput) {
705
+ manualUrlInput.addEventListener('input', updateLinkCount);
706
+ // Also catch manual pastes specifically to update immediately
707
+ manualUrlInput.addEventListener('paste', () => { setTimeout(updateLinkCount, 50); });
708
+ }
709
+
710
+ if (manualDownloadBtn) {
711
+ manualDownloadBtn.addEventListener('click', () => {
712
+ const urlsText = manualUrlInput.value.trim();
713
+ if (!urlsText) return;
714
+ const urls = urlsText.split(/[\s\n,]+/).filter(u => u.trim().startsWith('http'));
715
+ if (urls.length === 0) return;
716
+
717
+ if (manualDownloadBtn.innerText === "Descargar" || manualDownloadBtn.innerText === "Fallido" || manualDownloadBtn.innerText === "Añadir a Cola") {
718
+ chrome.storage.local.get(['batchNamingMode', 'batchCustomPrefix'], (cfg) => {
719
+ const namingMode = cfg.batchNamingMode || 'original';
720
+ const customPrefix = (cfg.batchCustomPrefix || '').trim();
721
+
722
+ urls.forEach((url, index) => {
723
+ let title = urls.length === 1 ? "Descarga Manual" : `Lista (${index + 1}/${urls.length})`;
724
+ let isAutoTitle = true;
725
+
726
+ if (urls.length > 1) {
727
+ if (namingMode === 'lote') {
728
+ title = `Lote ${index + 1}`;
729
+ isAutoTitle = false;
730
+ } else if (namingMode === 'lista') {
731
+ title = `Lista ${index + 1}`;
732
+ isAutoTitle = false;
733
+ } else if (namingMode === 'custom') {
734
+ let pfx = customPrefix || 'Video';
735
+ title = `${pfx} ${index + 1}`;
736
+ isAutoTitle = false;
737
+ }
738
+ }
739
+
740
+ setTimeout(() => {
741
+ startDownloadTask(manualDownloadBtn, title, url, manualQualityDrop.value, "", isAutoTitle);
742
+ }, index * 100);
743
+ });
744
+ });
745
+
746
+ // Clear the input after adding to queue
747
+ manualUrlInput.value = "";
748
+
749
+ // Resetear el botón estético en 2 segundos
750
+ setTimeout(() => {
751
+ if (manualDownloadBtn.innerText === "Procesando...") {
752
+ manualDownloadBtn.innerText = "Descargar";
753
+ manualDownloadBtn.disabled = false;
754
+ }
755
+ }, 2000);
756
+ }
757
+ });
758
+ }
759
+
760
+ function updateAllDropdowns() {
761
+ chrome.storage.local.get(['formatSetting', 'qualitySetting'], (res) => {
762
+ const f = res.formatSetting || 'mp4';
763
+ const q = res.qualitySetting || 'max';
764
+ document.querySelectorAll('.detected-video-card').forEach(card => {
765
+ const drop = card.querySelector('.quality-dropdown');
766
+ const detDrop = card.querySelector('.detect-dropdown');
767
+
768
+ if (drop) {
769
+ if (f === 'mp4' && q === 'ask') drop.classList.remove('hidden');
770
+ else drop.classList.add('hidden');
771
+ }
772
+
773
+ if (detDrop) {
774
+ if (f === 'mp4' && q === 'detect') {
775
+ detDrop.classList.remove('hidden');
776
+ } else {
777
+ detDrop.classList.add('hidden');
778
+ }
779
+ }
780
+ });
781
+ });
782
+ }
783
+
784
+ selectFolderBtn.addEventListener('click', () => {
785
+ selectFolderBtn.disabled = true;
786
+ selectFolderBtn.innerText = "Abriendo ventana...";
787
+ chrome.runtime.sendMessage({ action: "select_folder" }, (response) => {
788
+ selectFolderBtn.disabled = false;
789
+ selectFolderBtn.innerText = "Seleccionar Carpeta...";
790
+ if (chrome.runtime.lastError) {
791
+ savePathStatus.innerText = "Error: " + chrome.runtime.lastError.message;
792
+ savePathStatus.style.color = "#ff4d4d";
793
+ return;
794
+ }
795
+ if (response && response.success && response.status === "folder_selected") {
796
+ const path = response.path;
797
+ chrome.storage.local.set({ customSavePath: path }, () => {
798
+ savePathDisplay.innerText = path;
799
+ savePathStatus.innerText = "¡Ruta guardada exitosamente!";
800
+ savePathStatus.style.color = "#4ade80";
801
+ setTimeout(() => {
802
+ savePathStatus.innerText = "Si no seleccionas nada, se guardará en Descargas por defecto.";
803
+ savePathStatus.style.color = "#6a6b70";
804
+ }, 3000);
805
+ });
806
+ } else if (response && response.success && response.status === "folder_selection_cancelled") {
807
+ } else {
808
+ savePathStatus.innerText = "Error al seleccionar carpeta.";
809
+ savePathStatus.style.color = "#ff4d4d";
810
+ }
811
+ });
812
+ });
813
+
814
+ // Main Detector Logic
815
+ const cardsWrapper = document.getElementById('cardsWrapper');
816
+ const emptyState = document.getElementById('emptyState');
817
+ const template = document.getElementById('videoCardTemplate');
818
+
819
+ function deduplicateSniffs(urls) {
820
+ let urlGroups = {};
821
+ urls.forEach(u => {
822
+ if (u.includes('tiktok') || u.includes('tiktokcdn')) return;
823
+ // Ignorar segmentos y fragmentos
824
+ if (u.includes('.ts') || u.includes('.m4s') || u.includes('.vtt')) return;
825
+ // Ignorar imágenes que a veces caen en media
826
+ if (u.match(/\.(jpg|jpeg|png|gif|webp|svg|css|js)$/i)) return;
827
+
828
+ try {
829
+ let p = new URL(u);
830
+ let parts = p.pathname.split('/').filter(Boolean);
831
+
832
+ // Group key based on the first directory name if it looks like an ID
833
+ let groupKey = p.hostname;
834
+
835
+ // Extraer ID real de videos (ej. xHamster usa /028/893/409/) para agrupar m3u8 maestros y sub-listas
836
+ let xhMatch = p.pathname.match(/\/(\d{3}\/\d{3}\/\d{3})\//);
837
+
838
+ if (xhMatch) {
839
+ groupKey += '_' + xhMatch[1]; // Todos los m3u8 de este video tendrán el mismo ID y se fusionarán
840
+ } else if (parts.length > 1 && (parts[0].includes('==') || parts[0].includes(','))) {
841
+ groupKey += '_' + parts.slice(1).join('/'); // Usamos el resto de la ruta como ID real
842
+ } else if (parts.length > 0) {
843
+ // Try to use the last part (filename) if it's long enough, or a combination
844
+ let lastPart = parts[parts.length - 1];
845
+ if (lastPart && lastPart.length > 10) {
846
+ groupKey += '_' + lastPart.split('.')[0].substring(0, 30);
847
+ } else if (parts[0].length > 5) {
848
+ groupKey += '_' + parts[0];
849
+ } else {
850
+ groupKey += '_' + p.pathname; // fallback to full path
851
+ }
852
+ }
853
+
854
+ // For googlevideo or urls with id parameter:
855
+ if (p.searchParams.has('id')) {
856
+ groupKey += '_' + p.searchParams.get('id');
857
+ } else if (p.searchParams.has('v')) {
858
+ groupKey += '_' + p.searchParams.get('v');
859
+ }
860
+
861
+ if (!urlGroups[groupKey]) urlGroups[groupKey] = [];
862
+ urlGroups[groupKey].push(u);
863
+ } catch(e) {
864
+ if (!urlGroups[u]) urlGroups[u] = [];
865
+ urlGroups[u].push(u);
866
+ }
867
+ });
868
+
869
+ let finalUrls = [];
870
+
871
+ // Pick the BEST url for each group
872
+ Object.keys(urlGroups).forEach(key => {
873
+ let groupUrls = urlGroups[key];
874
+ let bestUrl = null;
875
+ let score = -1;
876
+
877
+ groupUrls.forEach(u => {
878
+ let currentScore = 0;
879
+
880
+ if (u.includes('#ACTUAL')) currentScore += 500; // El video en pantalla siempre gana su grupo
881
+
882
+ let cleanU = u.replace('#ACTUAL', '');
883
+
884
+ if (cleanU.includes('playlist') || cleanU.includes('master') || cleanU.includes('index.m3u8') || cleanU.includes('multi=')) {
885
+ currentScore += 100;
886
+ } else if (cleanU.includes('.m3u8') || cleanU.includes('/m3u8/')) {
887
+ currentScore += 50;
888
+ } else if (cleanU.includes('.mp4')) {
889
+ // Avoid previews and trailers
890
+ if (cleanU.includes('preview') || cleanU.includes('trailer') || cleanU.includes('thumb')) {
891
+ currentScore += 10;
892
+ } else {
893
+ currentScore += 30; // Solid MP4
894
+ }
895
+ } else {
896
+ currentScore = 5;
897
+ }
898
+
899
+ if (currentScore > score) {
900
+ score = currentScore;
901
+ bestUrl = u;
902
+ } else if (currentScore === score && bestUrl) {
903
+ // Si son igual de buenos, preferimos el que tenga "1080" o el más corto
904
+ if (u.includes('1080') && !bestUrl.includes('1080')) {
905
+ bestUrl = u;
906
+ } else if (u.length < bestUrl.length && !bestUrl.includes('1080')) {
907
+ bestUrl = u;
908
+ }
909
+ }
910
+ });
911
+
912
+ if (bestUrl) {
913
+ finalUrls.push(bestUrl); // Only one best link per video
914
+ }
915
+ });
916
+
917
+ return finalUrls;
918
+ }
919
+
920
+ function startDownloadTask(btn, title, url, dropdownValue, pageUrl, isAutoTitle = false) {
921
+ btn.disabled = true;
922
+ btn.innerText = "Procesando...";
923
+
924
+ chrome.storage.local.get(['customSavePath', 'formatSetting', 'qualitySetting', 'engineSetting', 'threadCount', 'audioFormat', 'audioQuality', 'audioConvert', 'videoFormatPref', 'ytAudioLang', 'ytSubs', 'cookiesSetting'], (result) => {
925
+ let customFormatId = '';
926
+ if (result.qualitySetting === 'ask') {
927
+ customFormatId = dropdownValue;
928
+ if (!customFormatId) customFormatId = "1080";
929
+ }
930
+
931
+ const payload = {
932
+ action: "download",
933
+ title: title,
934
+ url: url,
935
+ pageUrl: pageUrl,
936
+ savePath: result.customSavePath || "",
937
+ formatSetting: result.formatSetting || "mp4",
938
+ qualitySetting: result.qualitySetting || "max",
939
+ engineSetting: result.engineSetting || "ytdlp",
940
+ threadCount: result.threadCount || 4,
941
+ audioFormat: result.audioFormat || "best",
942
+ audioQuality: result.audioQuality || "0",
943
+ audioConvert: result.audioConvert || "mp3",
944
+ videoFormatPref: result.videoFormatPref || "legado",
945
+ customFormatId: customFormatId,
946
+ netscapeCookies: "", // Extraído de forma centralizada en background.js
947
+ ytAudioLang: result.ytAudioLang || "es",
948
+ ytSubs: result.ytSubs || "off",
949
+ isAutoTitle: isAutoTitle
950
+ };
951
+ chrome.runtime.sendMessage(payload, (response) => {
952
+ if (chrome.runtime.lastError) {
953
+ btn.innerText = "Error Host";
954
+ btn.disabled = false;
955
+ return;
956
+ }
957
+ if (response && response.success) {
958
+ // La historia se guarda cuando la descarga se completa exitosamente en background.js
959
+ // Actualización visual instantánea para evitar lag percibido
960
+ createOrUpdateCard(url, title, true, {
961
+ id: response.id,
962
+ url: url,
963
+ title: title,
964
+ status: "queued",
965
+ percent: "0"
966
+ });
967
+ } else {
968
+ btn.innerText = "Fallido";
969
+ btn.disabled = false;
970
+ }
971
+ });
972
+ });
973
+ }
974
+
975
+ // 1 Video = 1 Card logic
976
+ function createOrUpdateCard(url, title, isTask, taskState, pageUrl) {
977
+ // Create a unique ID strictly stringified from the URL to prevent ANY duplicate cards
978
+ let id = "vid_" + btoa(unescape(encodeURIComponent(url))).replace(/[^a-zA-Z0-9]/g, '');
979
+ let el = document.getElementById(id);
980
+
981
+ if (!el) {
982
+ el = template.content.cloneNode(true).querySelector('.detected-video-card');
983
+ el.id = id;
984
+ el.setAttribute('data-url', url);
985
+
986
+ let badge = el.querySelector('.type-badge');
987
+ if (badge) {
988
+ let badgeText = 'VIDEO';
989
+ let bgColor = 'rgba(158, 158, 158, 0.15)';
990
+ let textColor = '#e0e0e0';
991
+ let borderColor = 'rgba(158, 158, 158, 0.4)';
992
+
993
+ if (url.includes('.m3u8') || url.includes('/m3u8/') || title.includes('[HLS]')) {
994
+ badgeText = 'HLS / M3U8';
995
+ bgColor = 'rgba(156, 39, 176, 0.15)';
996
+ textColor = '#e1bee7';
997
+ borderColor = 'rgba(156, 39, 176, 0.4)';
998
+ title = title.replace(' [HLS]', ''); // Limpiar el titulo
999
+ } else if (url.includes('.mp4') || title.includes('[MP4]')) {
1000
+ badgeText = 'MP4';
1001
+ bgColor = 'rgba(33, 150, 243, 0.15)';
1002
+ textColor = '#bbdefb';
1003
+ borderColor = 'rgba(33, 150, 243, 0.4)';
1004
+ title = title.replace(' [MP4]', ''); // Limpiar el titulo
1005
+ } else if (url.includes('youtube.com') || url.includes('youtu.be')) {
1006
+ badgeText = 'YOUTUBE';
1007
+ bgColor = 'rgba(244, 67, 54, 0.15)';
1008
+ textColor = '#ffcdd2';
1009
+ borderColor = 'rgba(244, 67, 54, 0.4)';
1010
+ }
1011
+
1012
+ badge.innerText = badgeText;
1013
+ badge.style.backgroundColor = bgColor;
1014
+ badge.style.color = textColor;
1015
+ badge.style.border = `1px solid ${borderColor}`;
1016
+ badge.classList.remove('hidden');
1017
+ }
1018
+
1019
+ let titleInput = el.querySelector('.preview-title');
1020
+ if (titleInput) {
1021
+ if (titleInput.tagName === 'INPUT') {
1022
+ if (!titleInput.value || document.activeElement !== titleInput) {
1023
+ titleInput.value = title;
1024
+ }
1025
+
1026
+ titleInput.addEventListener('click', (e) => {
1027
+ if (e.detail >= 3) {
1028
+ titleInput.removeAttribute('readonly');
1029
+ titleInput.style.cursor = 'text';
1030
+ titleInput.style.background = 'rgba(0,0,0,0.2)';
1031
+ titleInput.style.border = '1px solid #4da6ff';
1032
+ titleInput.style.padding = '4px 6px';
1033
+ titleInput.focus();
1034
+ }
1035
+ });
1036
+
1037
+ titleInput.addEventListener('blur', () => {
1038
+ titleInput.setAttribute('readonly', 'true');
1039
+ titleInput.style.cursor = 'default';
1040
+ titleInput.style.background = 'transparent';
1041
+ titleInput.style.border = '1px solid transparent';
1042
+ titleInput.style.padding = '0px';
1043
+ titleInput.scrollLeft = 0; // Para que el texto largo vuelva al principio
1044
+ });
1045
+ } else {
1046
+ titleInput.innerText = title;
1047
+ titleInput.title = title;
1048
+ }
1049
+ }
1050
+
1051
+ let previewUrlEl = el.querySelector('.preview-url');
1052
+ previewUrlEl.innerText = url;
1053
+ previewUrlEl.addEventListener('click', () => {
1054
+ window.open(url, '_blank');
1055
+ });
1056
+
1057
+ let copyBtn = el.querySelector('.copy-url-btn');
1058
+ if (copyBtn) {
1059
+ copyBtn.addEventListener('click', (e) => {
1060
+ e.stopPropagation();
1061
+ navigator.clipboard.writeText(url);
1062
+
1063
+ let svgPath = copyBtn.querySelector('path');
1064
+ let originalD = svgPath.getAttribute('d');
1065
+
1066
+ // Cambiar a icono de "Check"
1067
+ svgPath.setAttribute('d', 'M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z');
1068
+ copyBtn.style.color = '#4ade80';
1069
+
1070
+ setTimeout(() => {
1071
+ // Revertir a icono de "Copiar"
1072
+ if(svgPath) svgPath.setAttribute('d', originalD);
1073
+ if(copyBtn) copyBtn.style.color = '#8c8d91';
1074
+ }, 1200);
1075
+ });
1076
+ }
1077
+
1078
+ // Se eliminó la configuración de video preview a pedido del usuario
1079
+
1080
+ cardsWrapper.appendChild(el);
1081
+
1082
+ let btn = el.querySelector('.main-btn');
1083
+ let drop = el.querySelector('.quality-dropdown');
1084
+
1085
+ chrome.storage.local.get(['formatSetting', 'qualitySetting'], (res) => {
1086
+ const f = res.formatSetting || 'mp4';
1087
+ const q = res.qualitySetting || 'max';
1088
+ if (f === 'mp4' && q === 'ask') drop.classList.remove('hidden');
1089
+
1090
+ let detDrop = el.querySelector('.detect-dropdown');
1091
+
1092
+ if (f === 'mp4' && q === 'detect' && detDrop) {
1093
+ detDrop.classList.remove('hidden');
1094
+
1095
+ if (detDrop.options.length === 0) {
1096
+ detDrop.innerHTML = '<option value="">⏳ Detectando...</option>';
1097
+ detDrop.disabled = true;
1098
+
1099
+ chrome.storage.local.get(['prefetchedQualities'], (cacheRes) => {
1100
+ let cache = cacheRes.prefetchedQualities || {};
1101
+
1102
+ function populateDropdown(formats) {
1103
+ detDrop.innerHTML = '';
1104
+ detDrop.disabled = false;
1105
+ let sortedFormats = formats.reverse();
1106
+ sortedFormats.forEach(fmt => {
1107
+ let ext = (fmt.ext || "MP4").toUpperCase();
1108
+ let res = fmt.resolution || "Audio/Desconocido";
1109
+ // Video DownloadHelper muestra directamente el TBR (en kbps) como si fueran KB/s.
1110
+ let bitrate = fmt.tbr ? Math.round(fmt.tbr) : 0;
1111
+ let bitrateText = bitrate >= 1000 ? Math.round(bitrate / 1000) + "MB/s" : bitrate + "KB/s";
1112
+
1113
+ let opt = document.createElement('option');
1114
+ opt.value = fmt.format_id;
1115
+ opt.innerText = `${ext} - ${res} - ${bitrateText}`;
1116
+ opt.style.backgroundColor = "#26272b";
1117
+ opt.style.color = "#e5e5e5";
1118
+ detDrop.appendChild(opt);
1119
+ });
1120
+ }
1121
+
1122
+ let cacheKey = url;
1123
+ if (url.includes('youtube.com/watch')) {
1124
+ let match = url.match(/([?&]v=[^&]+)/);
1125
+ if (match) cacheKey = "yt_" + match[1];
1126
+ }
1127
+
1128
+ if (cache[cacheKey] && (Date.now() - cache[cacheKey].timestamp < 300000)) {
1129
+ populateDropdown(cache[cacheKey].formats);
1130
+ } else if (url.includes('.m3u8') || url.includes('/m3u8/')) {
1131
+ fetch(url).then(r => r.text()).then(text => {
1132
+ let lines = text.split('\n');
1133
+ let formats = [];
1134
+ for (let i = 0; i < lines.length; i++) {
1135
+ if (lines[i].includes('RESOLUTION=')) {
1136
+ let resMatch = lines[i].match(/RESOLUTION=(\d+)x(\d+)/);
1137
+ let bwMatch = lines[i].match(/BANDWIDTH=(\d+)/);
1138
+ if (resMatch) {
1139
+ formats.push({
1140
+ format_id: resMatch[2],
1141
+ resolution: resMatch[1] + "x" + resMatch[2],
1142
+ ext: "MP4",
1143
+ tbr: bwMatch ? parseInt(bwMatch[1]) / 1000 : 0
1144
+ });
1145
+ }
1146
+ }
1147
+ }
1148
+ if (formats.length > 0) {
1149
+ formats.sort((a, b) => parseInt(a.format_id) - parseInt(b.format_id));
1150
+ populateDropdown(formats);
1151
+ } else {
1152
+ throw new Error("No formats");
1153
+ }
1154
+ }).catch(() => {
1155
+ // Fallback a yt-dlp nativo
1156
+ chrome.runtime.sendMessage({ action: "get_info", url: url }, (response) => {
1157
+ if (response && response.success && response.info && response.info.formats) {
1158
+ populateDropdown(response.info.formats);
1159
+ } else {
1160
+ detDrop.innerHTML = '<option value="">⚠️ Error al detectar</option>';
1161
+ detDrop.disabled = false;
1162
+ }
1163
+ });
1164
+ });
1165
+ } else {
1166
+ chrome.runtime.sendMessage({ action: "get_info", url: url }, (response) => {
1167
+ if (response && response.success && response.info && response.info.formats) {
1168
+ populateDropdown(response.info.formats);
1169
+ } else {
1170
+ detDrop.innerHTML = '';
1171
+ detDrop.disabled = false;
1172
+ let opt = document.createElement('option');
1173
+ opt.value = "";
1174
+ opt.innerText = "⚠️ Error al detectar";
1175
+ detDrop.appendChild(opt);
1176
+ }
1177
+ });
1178
+ }
1179
+ });
1180
+ }
1181
+ }
1182
+ });
1183
+
1184
+ btn.addEventListener('click', () => {
1185
+ if (btn.innerText === "Descargar" || btn.innerText === "Fallido" || btn.innerText === "Cancelado") {
1186
+ let selectedQuality = drop.value;
1187
+ let detDrop = el.querySelector('.detect-dropdown');
1188
+
1189
+ let titleInput = el.querySelector('.preview-title');
1190
+ let currentTitle = titleInput && titleInput.tagName === 'INPUT' ? (titleInput.value.trim() || title) : title;
1191
+
1192
+ chrome.storage.local.get(['qualitySetting'], (res) => {
1193
+ if (res.qualitySetting === 'detect' && detDrop && !detDrop.classList.contains('hidden')) {
1194
+ selectedQuality = detDrop.value;
1195
+ }
1196
+ startDownloadTask(btn, currentTitle, url, selectedQuality, pageUrl);
1197
+ });
1198
+ } else if (btn.innerText === "Cancelar") {
1199
+ let activeTaskId = el.getAttribute('data-taskid');
1200
+ if (activeTaskId) {
1201
+ chrome.runtime.sendMessage({ action: "cancel_download", id: activeTaskId });
1202
+ btn.innerText = "Cancelando...";
1203
+ btn.disabled = true;
1204
+ }
1205
+ }
1206
+ });
1207
+ }
1208
+
1209
+ let btn = el.querySelector('.main-btn');
1210
+ let progCtx = el.querySelector('.progress-box');
1211
+ let barFill = el.querySelector('.bar-fill');
1212
+ let stPercent = el.querySelector('.status-percent');
1213
+ let stMsg = el.querySelector('.status-msg');
1214
+
1215
+ if (isTask && taskState) {
1216
+ el.setAttribute('data-taskid', taskState.id);
1217
+
1218
+ if (taskState.status === "progress" || taskState.status === "started") {
1219
+ progCtx.classList.remove('hidden');
1220
+ stMsg.style.display = "block";
1221
+ stPercent.style.display = "block";
1222
+ barFill.parentElement.style.display = "block";
1223
+
1224
+ btn.innerText = "Cancelar";
1225
+ btn.disabled = false;
1226
+ btn.style.backgroundColor = "transparent";
1227
+ btn.style.borderColor = "#ff4d4d";
1228
+ btn.style.color = "#ff4d4d";
1229
+
1230
+ let newPercent = parseFloat(taskState.percent || 0);
1231
+ let currentPercent = parseFloat(barFill.style.width || 0);
1232
+
1233
+ // Evitar saltos hacia atrás causados por el multi-hilo de yt-dlp
1234
+ if (newPercent >= currentPercent || newPercent < 5) {
1235
+ barFill.style.width = taskState.percent + "%";
1236
+ stPercent.innerText = taskState.percent + "%";
1237
+ }
1238
+
1239
+ stMsg.innerText = "Descargando...";
1240
+ stPercent.style.color = "#4da6ff";
1241
+ stMsg.style.color = "#4da6ff";
1242
+ barFill.style.backgroundColor = "#4da6ff";
1243
+ } else if (taskState.status === "completed") {
1244
+ progCtx.classList.remove('hidden');
1245
+ stMsg.style.display = "block";
1246
+ stPercent.style.display = "block";
1247
+ barFill.parentElement.style.display = "block";
1248
+
1249
+ btn.innerText = "¡Listo!";
1250
+ btn.disabled = true;
1251
+ btn.style.borderColor = "#4ade80";
1252
+ btn.style.color = "#4ade80";
1253
+
1254
+ barFill.style.width = "100%";
1255
+ stPercent.innerText = "100%";
1256
+ stPercent.style.color = "#4ade80";
1257
+ stMsg.style.color = "#4ade80";
1258
+ barFill.style.backgroundColor = "#4ade80";
1259
+ stMsg.innerText = "¡Completado!";
1260
+ } else if (taskState.status === "error") {
1261
+ progCtx.classList.remove('hidden');
1262
+ barFill.parentElement.style.display = "none";
1263
+ stPercent.style.display = "none";
1264
+ stMsg.style.display = "block";
1265
+
1266
+ stMsg.innerText = "Error: " + (taskState.error || "La descarga falló");
1267
+ stMsg.style.color = "#ff4d4d";
1268
+ btn.innerText = "Descargar";
1269
+ btn.disabled = false;
1270
+ btn.style.borderColor = ""; btn.style.color = ""; btn.style.backgroundColor = "";
1271
+
1272
+ if (el.parentElement) {
1273
+ el.parentElement.appendChild(el);
1274
+ }
1275
+ } else if (taskState.status === "cancelled") {
1276
+ progCtx.classList.remove('hidden');
1277
+ stMsg.style.display = "block";
1278
+ stPercent.style.display = "block";
1279
+ barFill.parentElement.style.display = "block";
1280
+
1281
+ btn.innerText = "Descargar";
1282
+ btn.disabled = false;
1283
+ btn.style.borderColor = ""; btn.style.color = ""; btn.style.backgroundColor = "";
1284
+
1285
+ barFill.style.width = "100%";
1286
+ stPercent.innerText = "Cancelado";
1287
+ stPercent.style.color = "#8c8d91";
1288
+ stMsg.style.color = "#8c8d91";
1289
+ barFill.style.backgroundColor = "#8c8d91";
1290
+ stMsg.innerText = "Cancelado";
1291
+ } else if (taskState.status === "queued") {
1292
+ progCtx.classList.remove('hidden');
1293
+ stMsg.style.display = "block";
1294
+ stPercent.style.display = "block";
1295
+ barFill.parentElement.style.display = "block";
1296
+
1297
+ btn.innerText = "Cancelar";
1298
+ btn.disabled = false;
1299
+ btn.style.backgroundColor = "transparent";
1300
+ btn.style.borderColor = "#ffb84d";
1301
+ btn.style.color = "#ffb84d";
1302
+
1303
+ barFill.style.width = "0%";
1304
+ stPercent.innerText = "En cola";
1305
+ stMsg.innerText = "Esperando su turno...";
1306
+ stPercent.style.color = "#ffb84d";
1307
+ stMsg.style.color = "#ffb84d";
1308
+ barFill.style.backgroundColor = "#ffb84d";
1309
+ }
1310
+ }
1311
+ }
1312
+
1313
+ function renderDetectorUI() {
1314
+ chrome.storage.local.get(['downloadHistory'], (hisResult) => {
1315
+ const history = hisResult.downloadHistory || [];
1316
+ const historyUrls = new Set(history.map(item => item.url));
1317
+
1318
+ chrome.runtime.sendMessage({ action: "get_active_downloads" }, (response) => {
1319
+ let activeTasks = (response && response.success && response.tasks) ? response.tasks : {};
1320
+
1321
+ chrome.tabs.query({ active: true, currentWindow: true }, (tabsResponse) => {
1322
+ if (!tabsResponse || tabsResponse.length === 0) return;
1323
+ const currentTab = tabsResponse[0];
1324
+ const currentUrl = currentTab.url;
1325
+ const tabId = currentTab.id;
1326
+
1327
+ // Extractor automático JAV (123AV / MissAV)
1328
+ if (currentUrl && currentUrl.startsWith('http')) {
1329
+ const lowerUrl = currentUrl.toLowerCase();
1330
+ const is123av = lowerUrl.includes('123av.com') || lowerUrl.includes('123av.org') || lowerUrl.includes('123av.me');
1331
+ const isMissav = lowerUrl.includes('missav.com') || lowerUrl.includes('missav.ws');
1332
+
1333
+ if (forceDetectJavBtn) {
1334
+ if (is123av || isMissav) forceDetectJavBtn.classList.remove('hidden');
1335
+ else forceDetectJavBtn.classList.add('hidden');
1336
+ }
1337
+
1338
+ if ((is123av && lowerUrl.includes('/v/')) || (isMissav && /\/[a-z0-9]+-\d+/i.test(lowerUrl))) {
1339
+ chrome.storage.local.get(['sniffedUrls'], (storeRes) => {
1340
+ const sniffedDict = storeRes.sniffedUrls || {};
1341
+ const currentSniffs = sniffedDict[tabId] || [];
1342
+
1343
+ const hasHls = currentSniffs.some(u => u.includes('.m3u8') || u.includes('/m3u8/'));
1344
+ if (hasHls) return;
1345
+
1346
+ chrome.scripting.executeScript({
1347
+ target: { tabId: tabId },
1348
+ func: () => {
1349
+ try {
1350
+ const html = document.documentElement.outerHTML;
1351
+
1352
+ // 1. Intentar player(JSON.parse(...)) para 123AV
1353
+ const match123 = html.match(/player\(JSON\.parse\('([^']+)'\)/);
1354
+ if (match123) {
1355
+ let rawJson = match123[1];
1356
+ let jsonStr = rawJson.replace(/\\"/g, '"').replace(/\\\//g, '/');
1357
+ jsonStr = jsonStr.replace(/\\u([0-9a-fA-F]{4})/g, (m, grp) => String.fromCharCode(parseInt(grp, 16)));
1358
+ const playerData = JSON.parse(jsonStr);
1359
+ for (const item of playerData) {
1360
+ if (item.url && item.url.includes('surrit.')) {
1361
+ return { type: '123av', surritUrl: item.url };
1362
+ }
1363
+ }
1364
+ }
1365
+
1366
+ // 2. Intentar packer de MissAV
1367
+ const splitMatch = html.match(/'([^']+)'\.split\('\|'\)/);
1368
+ if (splitMatch) {
1369
+ const words = splitMatch[1].split('|');
1370
+ const pMatch = html.match(/\}\('(.*?)', *\d+, *\d+,/);
1371
+ if (pMatch) {
1372
+ let p = pMatch[1];
1373
+ function base36(i) { return i.toString(36); }
1374
+ for (let i = words.length - 1; i >= 0; i--) {
1375
+ const word = words[i];
1376
+ if (word) {
1377
+ const idx = base36(i);
1378
+ const regex = new RegExp('\\b' + idx + '\\b', 'g');
1379
+ p = p.replace(regex, word);
1380
+ }
1381
+ }
1382
+ const m3u8Links = p.match(/https?:\/\/surrit\.com[^\s'"]+\.m3u8/);
1383
+ if (m3u8Links) {
1384
+ return { type: 'missav', m3u8Url: m3u8Links[0] };
1385
+ }
1386
+ }
1387
+ }
1388
+
1389
+ // 3. Regex simple para surrit.com
1390
+ const m3u8Matches = html.match(/https?:\/\/surrit\.com\/[a-zA-Z0-9-]+\/[^\s'"]+\.m3u8/);
1391
+ if (m3u8Matches) {
1392
+ return { type: 'missav', m3u8Url: m3u8Matches[0] };
1393
+ }
1394
+
1395
+ // 4. Buscar en DOM
1396
+ const sources = Array.from(document.querySelectorAll('video, source, iframe'));
1397
+ for (const srcEl of sources) {
1398
+ const src = srcEl.src || srcEl.getAttribute('src');
1399
+ if (src && (src.includes('surrit.com') || src.includes('surrit.store')) && src.includes('.m3u8')) {
1400
+ return { type: 'missav', m3u8Url: src };
1401
+ }
1402
+ }
1403
+ } catch (e) {
1404
+ console.error(e);
1405
+ }
1406
+ return null;
1407
+ }
1408
+ }, async (scriptResults) => {
1409
+ if (chrome.runtime.lastError || !scriptResults || !scriptResults[0] || !scriptResults[0].result) return;
1410
+ const res = scriptResults[0].result;
1411
+
1412
+ let finalM3u8 = null;
1413
+ if (res.type === '123av' && res.surritUrl) {
1414
+ try {
1415
+ const urlObj = new URL(res.surritUrl);
1416
+ const videoId = urlObj.pathname.split('/').pop();
1417
+ const poster = urlObj.searchParams.get('poster') || '';
1418
+ const streamApiUrl = `https://surrit.store/stream?id=${videoId}&poster=${encodeURIComponent(poster)}`;
1419
+
1420
+ const apiRes = await fetch(streamApiUrl, {
1421
+ headers: {
1422
+ 'Referer': res.surritUrl,
1423
+ 'Origin': 'https://surrit.store'
1424
+ }
1425
+ });
1426
+ const data = await apiRes.json();
1427
+ if (data && data.media && data.media.stream) {
1428
+ finalM3u8 = data.media.stream;
1429
+ }
1430
+ } catch (err) {
1431
+ console.error("Error fetching 123AV stream API:", err);
1432
+ }
1433
+ } else if (res.type === 'missav' && res.m3u8Url) {
1434
+ finalM3u8 = res.m3u8Url;
1435
+ }
1436
+
1437
+ if (finalM3u8) {
1438
+ chrome.storage.local.get(['sniffedUrls'], (s2) => {
1439
+ let currentDict = s2.sniffedUrls || {};
1440
+ if (!currentDict[tabId]) currentDict[tabId] = [];
1441
+ if (!currentDict[tabId].includes(finalM3u8)) {
1442
+ currentDict[tabId].push(finalM3u8);
1443
+ chrome.storage.local.set({ sniffedUrls: currentDict }, () => {
1444
+ renderDetectorUI();
1445
+ });
1446
+ }
1447
+ });
1448
+ }
1449
+ });
1450
+ });
1451
+ }
1452
+ }
1453
+
1454
+ let hasAny = false;
1455
+
1456
+
1457
+
1458
+ let isHomepage = false;
1459
+ try {
1460
+ let parsed = new URL(currentUrl);
1461
+ if ((parsed.pathname === '/' || parsed.pathname === '') && !parsed.search) {
1462
+ isHomepage = true;
1463
+ }
1464
+ } catch(e) {}
1465
+
1466
+ let cleanTabTitle = (currentTab.title || 'Video Actual').replace(/^\(\d+\)\s*/, '').replace(/ - YouTube$/, '').trim();
1467
+
1468
+ if (currentUrl.startsWith('http') && !isHomepage) {
1469
+ // Siempre mostrar la URL principal, excepto si es la página de inicio (raíz)
1470
+ createOrUpdateCard(currentUrl, cleanTabTitle, false, null, currentUrl);
1471
+ hasAny = true;
1472
+
1473
+ let currId = "vid_" + btoa(unescape(encodeURIComponent(currentUrl))).replace(/[^a-zA-Z0-9]/g, '');
1474
+ let currEl = document.getElementById(currId);
1475
+ if (currEl && currEl.parentElement) {
1476
+ currEl.parentElement.prepend(currEl);
1477
+ }
1478
+ }
1479
+
1480
+ // Sniffed (TikTok, Streams) Cards
1481
+ chrome.storage.local.get(['sniffedUrls', 'snifferEnabled'], function (result) {
1482
+ const isSnifferEnabled = result.snifferEnabled !== false;
1483
+ const dot = document.querySelector('.status-dot');
1484
+ if (dot) dot.style.backgroundColor = isSnifferEnabled ? '#00e676' : '#6a6b70';
1485
+
1486
+ let rawSniffs = (result.sniffedUrls || {})[tabId] || [];
1487
+ let sniffs = deduplicateSniffs(rawSniffs);
1488
+
1489
+ if (snifferCountBadge) {
1490
+ snifferCountBadge.innerText = `${sniffs.length} enlaces`;
1491
+ }
1492
+
1493
+ sniffs.forEach((s_url, index) => {
1494
+ let cleanTabTitle = currentTab.title ? currentTab.title.replace(/^\(\d+\)\s*/, '').replace(/ - YouTube$/, '').trim() : "Stream de Video";
1495
+ let baseTitle = cleanTabTitle;
1496
+
1497
+ let streamType = (s_url.includes('.m3u8') || s_url.includes('/m3u8/')) ? " [HLS]" : " [MP4]";
1498
+
1499
+ if (s_url.includes('#ACTUAL')) {
1500
+ streamType = " ⭐ [ACTUAL]" + streamType;
1501
+ s_url = s_url.replace('#ACTUAL', '');
1502
+ }
1503
+
1504
+ let title = baseTitle + streamType;
1505
+
1506
+ createOrUpdateCard(s_url, title, false, null, currentUrl);
1507
+ hasAny = true;
1508
+ });
1509
+
1510
+ // Render active tasks at the bottom
1511
+ Object.values(activeTasks).forEach(task => {
1512
+ createOrUpdateCard(task.url, task.title, true, task);
1513
+ let taskId = "vid_" + btoa(unescape(encodeURIComponent(task.url))).replace(/[^a-zA-Z0-9]/g, '');
1514
+ let taskEl = document.getElementById(taskId);
1515
+ if (taskEl && taskEl.parentElement) {
1516
+ taskEl.parentElement.appendChild(taskEl); // Forzar que las descargas activas vayan al final
1517
+ }
1518
+ hasAny = true;
1519
+ });
1520
+
1521
+ if (!hasAny) {
1522
+ emptyState.style.display = "flex";
1523
+ } else {
1524
+ emptyState.style.display = "none";
1525
+ }
1526
+ });
1527
+ });
1528
+ });
1529
+ });
1530
+ }
1531
+
1532
+ renderDetectorUI();
1533
+
1534
+ renderDetectorUI();
1535
+
1536
+
1537
+ chrome.runtime.onMessage.addListener((request) => {
1538
+ if (request.action === "download_update" && request.task) {
1539
+ emptyState.style.display = "none";
1540
+ createOrUpdateCard(request.task.url, request.task.title, true, request.task);
1541
+ }
1542
+ if (request.action === "download_remove" && request.id) {
1543
+ // Find the card where data-taskid matches the request.id and remove it entirely
1544
+ let cards = document.querySelectorAll('.detected-video-card');
1545
+ cards.forEach(card => {
1546
+ if (card.getAttribute('data-taskid') === request.id) {
1547
+ card.remove();
1548
+ if (cardsWrapper.children.length === 0) emptyState.style.display = "flex";
1549
+ }
1550
+ });
1551
+ }
1552
+ });
1553
+
1554
+ chrome.storage.onChanged.addListener((changes, namespace) => {
1555
+ if (namespace !== 'local') return;
1556
+ if (changes.maxConcurrentDownloads && concurrencySlider && concurrencyCountLabel) {
1557
+ let val = parseInt(changes.maxConcurrentDownloads.newValue || 1);
1558
+ concurrencySlider.value = val;
1559
+ concurrencyCountLabel.innerText = `Descargas a la vez: ${val}`;
1560
+ }
1561
+ });
1562
+ });
extension/js/tools.js ADDED
@@ -0,0 +1,920 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ document.addEventListener('DOMContentLoaded', () => {
2
+ const menuToggleBtn = document.getElementById('menuToggleBtn');
3
+ const sidebar = document.getElementById('sidebar');
4
+ const overlay = document.getElementById('sidebarOverlay');
5
+ const navItems = document.querySelectorAll('.nav-item');
6
+ const viewSections = document.querySelectorAll('.view-section');
7
+
8
+ // Toggle Sidebar on mobile/small screens
9
+ function toggleSidebar() {
10
+ sidebar.classList.toggle('active');
11
+ overlay.classList.toggle('active');
12
+ }
13
+
14
+ menuToggleBtn.addEventListener('click', toggleSidebar);
15
+ overlay.addEventListener('click', toggleSidebar);
16
+
17
+ // Global Navigation function
18
+ window.switchTab = function(targetId) {
19
+ navItems.forEach(n => {
20
+ n.classList.remove('active');
21
+ if (n.getAttribute('data-target') === targetId) {
22
+ n.classList.add('active');
23
+ }
24
+ });
25
+
26
+ viewSections.forEach(v => {
27
+ v.classList.remove('active');
28
+ if (v.id === targetId) {
29
+ v.classList.add('active');
30
+ }
31
+ });
32
+
33
+ if (window.innerWidth < 900) {
34
+ sidebar.classList.remove('active');
35
+ overlay.classList.remove('active');
36
+ }
37
+ };
38
+
39
+ // Bind click to sidebar items
40
+ navItems.forEach(item => {
41
+ item.addEventListener('click', () => {
42
+ window.switchTab(item.getAttribute('data-target'));
43
+ });
44
+ });
45
+
46
+ // Bind click to Dashboard Cards
47
+ const cardDownloader = document.getElementById('card-downloader');
48
+ if (cardDownloader) {
49
+ cardDownloader.addEventListener('click', () => window.switchTab('view-downloader'));
50
+ }
51
+
52
+ const cardConsole = document.getElementById('card-console');
53
+ if (cardConsole) {
54
+ cardConsole.addEventListener('click', () => window.switchTab('view-console'));
55
+ }
56
+
57
+ const cardPlaylist = document.getElementById('card-playlist');
58
+ if (cardPlaylist) {
59
+ cardPlaylist.addEventListener('click', () => window.switchTab('view-playlist'));
60
+ }
61
+
62
+ const cardActive = document.getElementById('card-active');
63
+ if (cardActive) {
64
+ cardActive.addEventListener('click', () => window.switchTab('view-active'));
65
+ }
66
+
67
+ const cardSettings = document.getElementById('card-settings');
68
+ if (cardSettings) {
69
+ cardSettings.addEventListener('click', () => window.switchTab('view-settings'));
70
+ }
71
+
72
+ window.addEventListener('resize', () => {
73
+ if (window.innerWidth >= 900) {
74
+ sidebar.classList.remove('active');
75
+ overlay.classList.remove('active');
76
+ }
77
+ });
78
+
79
+ // --- DOWNLOADER AND CONSOLE LOGIC ---
80
+ const startBulkDownloadBtn = document.getElementById('startBulkDownloadBtn');
81
+ const bulkUrlsInput = document.getElementById('bulkUrlsInput');
82
+ const toolConsole = document.getElementById('toolConsole');
83
+
84
+ function printToConsole(text, color = '#a1a1aa') {
85
+ if (!toolConsole) return;
86
+ const span = document.createElement('span');
87
+ span.style.color = color;
88
+ span.innerText = text + '\n';
89
+ toolConsole.appendChild(span);
90
+
91
+ while (toolConsole.children.length > 300) {
92
+ toolConsole.removeChild(toolConsole.firstChild);
93
+ }
94
+
95
+ const scrollContainer = toolConsole.parentElement;
96
+ if (scrollContainer) {
97
+ scrollContainer.scrollTop = scrollContainer.scrollHeight;
98
+ }
99
+ }
100
+
101
+ // Console Initialization
102
+ if (toolConsole) {
103
+ chrome.runtime.sendMessage({ action: "get_console_logs" }, (response) => {
104
+ if (response && response.success && response.logs && response.logs.length > 0) {
105
+ response.logs.forEach(item => {
106
+ let prefix = item.title ? `[${item.title}] ` : "";
107
+ printToConsole(`${prefix}${item.log}`, '#4da6ff');
108
+ });
109
+ }
110
+ });
111
+ }
112
+
113
+ // Background Messages listener
114
+ chrome.runtime.onMessage.addListener((request) => {
115
+ if (request.action === "download_log") {
116
+ if (toolConsole) {
117
+ let prefix = request.title ? `[${request.title}] ` : "";
118
+ printToConsole(`${prefix}${request.log}`, '#4da6ff');
119
+ }
120
+ }
121
+ });
122
+
123
+ if (startBulkDownloadBtn && bulkUrlsInput && toolConsole) {
124
+ startBulkDownloadBtn.addEventListener('click', () => {
125
+ let urls = bulkUrlsInput.value.split('\n').map(u => u.trim()).filter(u => u.length > 0);
126
+ if (urls.length === 0) {
127
+ printToConsole('>> Error: No se encontraron enlaces para procesar.', '#ff4d4d');
128
+ return;
129
+ }
130
+
131
+ printToConsole(`\n>> Iniciando lote de ${urls.length} descarga(s)...`, '#4da6ff');
132
+
133
+ // Auto-switch to Console Tab
134
+ window.switchTab('view-console');
135
+
136
+ chrome.storage.local.get(null, (config) => {
137
+ urls.forEach((url, index) => {
138
+ let namingMode = config.batchNamingMode || 'original';
139
+ let customPrefix = (config.batchCustomPrefix || '').trim();
140
+ let title = `Lote_${index+1}`;
141
+ let isAutoTitle = true;
142
+
143
+ if (namingMode === 'lote') {
144
+ title = `Lote ${index + 1}`;
145
+ isAutoTitle = false;
146
+ } else if (namingMode === 'lista') {
147
+ title = `Lista ${index + 1}`;
148
+ isAutoTitle = false;
149
+ } else if (namingMode === 'custom') {
150
+ let pfx = customPrefix || 'Video';
151
+ title = `${pfx} ${index + 1}`;
152
+ isAutoTitle = false;
153
+ }
154
+
155
+ let msg = {
156
+ action: 'download',
157
+ url: url,
158
+ title: title,
159
+ qualitySetting: config.qualitySetting || 'max',
160
+ formatSetting: config.formatSetting || 'mp4',
161
+ engineSetting: config.engineSetting || 'ytdlp',
162
+ threadCount: parseInt(config.threadCount || 8),
163
+ ytAudioLang: config.ytAudioLang || 'es',
164
+ ytSubs: config.ytSubs || 'off',
165
+ savePath: config.customSavePath || '',
166
+ audioFormat: config.audioFormat || 'best',
167
+ audioQuality: config.audioQuality || '0',
168
+ audioConvert: config.audioConvert || 'mp3',
169
+ videoFormatPref: config.videoFormatPref || 'legado',
170
+ isAutoTitle: isAutoTitle
171
+ };
172
+ printToConsole(`>> Enviando a cola ${index+1}/${urls.length}: ${url} [Nombre: ${msg.title}]`, '#4ade80');
173
+ chrome.runtime.sendMessage(msg, (response) => {
174
+ if (response && response.success) {
175
+ printToConsole(`[COLA] ${msg.title} encolado correctamente.`, '#a1a1aa');
176
+ } else {
177
+ printToConsole(`[ERROR] No se pudo encolar ${url}`, '#ff4d4d');
178
+ }
179
+ });
180
+ });
181
+ });
182
+ });
183
+
184
+ const activeDownloadsWrapper = document.getElementById('activeDownloadsWrapper');
185
+ const consoleVideoCardTemplate = document.getElementById('consoleVideoCardTemplate');
186
+
187
+ function updateConsoleCard(task) {
188
+ if (!activeDownloadsWrapper || !consoleVideoCardTemplate) return;
189
+ let cardId = 'console_card_' + task.id;
190
+ let card = document.getElementById(cardId);
191
+
192
+ if (!card) {
193
+ // Eliminar si cancelado/error/completado y no existe previamente
194
+ if (task.status === 'error' || task.status === 'cancelled' || task.status === 'completed') return;
195
+
196
+ card = consoleVideoCardTemplate.content.cloneNode(true).querySelector('.console-video-card');
197
+ card.id = cardId;
198
+ activeDownloadsWrapper.appendChild(card);
199
+ }
200
+
201
+ if (task.title) {
202
+ card.querySelector('.card-title').innerText = task.title;
203
+ }
204
+
205
+ let progressBar = card.querySelector('.card-progress-bar');
206
+ let statusText = card.querySelector('.card-status-text');
207
+ let msgText = card.querySelector('.card-msg');
208
+
209
+ if (task.status === "progress" || task.status === "started") {
210
+ let pct = task.percent || "0%";
211
+ statusText.innerText = pct;
212
+ statusText.style.color = "#4da6ff";
213
+ let val = parseFloat(pct);
214
+ if (!isNaN(val)) progressBar.style.width = val + "%";
215
+ progressBar.style.backgroundColor = "#4da6ff";
216
+ msgText.innerText = "Descargando...";
217
+ } else if (task.status === "completed") {
218
+ statusText.innerText = "100%";
219
+ statusText.style.color = "#4ade80";
220
+ progressBar.style.width = "100%";
221
+ progressBar.style.backgroundColor = "#4ade80";
222
+ msgText.innerText = "¡Completado!";
223
+ setTimeout(() => card.remove(), 5000); // Remove after 5 seconds
224
+ } else if (task.status === "error") {
225
+ statusText.innerText = "Error";
226
+ statusText.style.color = "#ff4d4d";
227
+ progressBar.style.width = "100%";
228
+ progressBar.style.backgroundColor = "#ff4d4d";
229
+ msgText.innerText = task.error || "Fallido";
230
+ setTimeout(() => card.remove(), 5000);
231
+ } else if (task.status === "cancelled") {
232
+ statusText.innerText = "Cancelado";
233
+ statusText.style.color = "#ffb84d";
234
+ progressBar.style.width = "100%";
235
+ progressBar.style.backgroundColor = "#ffb84d";
236
+ msgText.innerText = "Cancelado";
237
+ setTimeout(() => card.remove(), 5000);
238
+ } else if (task.status === "queued") {
239
+ statusText.innerText = "En cola";
240
+ statusText.style.color = "#ffb84d";
241
+ progressBar.style.width = "0%";
242
+ progressBar.style.backgroundColor = "#ffb84d";
243
+ msgText.innerText = "Esperando turno...";
244
+ }
245
+ }
246
+
247
+ // Load active downloads on init
248
+ chrome.runtime.sendMessage({ action: "get_active_downloads" }, (response) => {
249
+ if (response && response.success && response.tasks) {
250
+ Object.values(response.tasks).forEach(task => updateConsoleCard(task));
251
+ }
252
+ });
253
+
254
+ const failedDownloadsContainer = document.getElementById('failedDownloadsContainer');
255
+ const failedDownloadsList = document.getElementById('failedDownloadsList');
256
+ const clearFailedBtn = document.getElementById('clearFailedBtn');
257
+
258
+ function addFailedDownload(task) {
259
+ if (!failedDownloadsContainer || !failedDownloadsList) return;
260
+
261
+ // Evitar duplicados
262
+ let existing = document.getElementById('failed_item_' + task.id);
263
+ if (existing) return;
264
+
265
+ const div = document.createElement('div');
266
+ div.id = 'failed_item_' + task.id;
267
+ div.setAttribute('data-failed-url', task.url);
268
+ div.style.display = 'flex';
269
+ div.style.flexDirection = 'column';
270
+ div.style.gap = '4px';
271
+ div.style.background = 'rgba(255, 77, 77, 0.03)';
272
+ div.style.border = '1px solid rgba(255, 77, 77, 0.15)';
273
+ div.style.padding = '10px 12px';
274
+ div.style.borderRadius = '6px';
275
+ div.style.fontSize = '12px';
276
+
277
+ const titleRow = document.createElement('div');
278
+ titleRow.style.display = 'flex';
279
+ titleRow.style.justifyContent = 'space-between';
280
+ titleRow.style.fontWeight = '600';
281
+ titleRow.style.color = '#ff8a8a';
282
+ titleRow.innerHTML = `
283
+ <span>${task.title || 'Descarga'}</span>
284
+ <span style="font-size: 10px; font-weight: normal; color: rgba(255,77,77,0.7); cursor: pointer;" class="copy-failed-url" title="Copiar URL">Copiar URL</span>
285
+ `;
286
+
287
+ const urlRow = document.createElement('div');
288
+ urlRow.style.color = '#8c8d91';
289
+ urlRow.style.whiteSpace = 'nowrap';
290
+ urlRow.style.overflow = 'hidden';
291
+ urlRow.style.textOverflow = 'ellipsis';
292
+ urlRow.style.cursor = 'pointer';
293
+ urlRow.innerText = task.url;
294
+ urlRow.title = "Abrir enlace: " + task.url;
295
+ urlRow.addEventListener('click', () => { window.open(task.url, '_blank'); });
296
+
297
+ titleRow.querySelector('.copy-failed-url').addEventListener('click', (e) => {
298
+ e.stopPropagation();
299
+ navigator.clipboard.writeText(task.url).then(() => {
300
+ const span = e.target;
301
+ span.innerText = "¡Copiado!";
302
+ setTimeout(() => { span.innerText = "Copiar URL"; }, 1500);
303
+ });
304
+ });
305
+
306
+ const errorRow = document.createElement('div');
307
+ errorRow.style.color = '#ff6b6b';
308
+ errorRow.style.fontSize = '11px';
309
+ errorRow.style.marginTop = '4px';
310
+ errorRow.style.fontFamily = 'monospace';
311
+ errorRow.innerText = `Error: ${task.error || 'La descarga falló o fue interrumpida.'}`;
312
+
313
+ div.appendChild(titleRow);
314
+ div.appendChild(urlRow);
315
+ div.appendChild(errorRow);
316
+
317
+ failedDownloadsList.appendChild(div);
318
+ failedDownloadsContainer.style.display = 'flex';
319
+ }
320
+
321
+ const copyAllFailedBtn = document.getElementById('copyAllFailedBtn');
322
+ if (copyAllFailedBtn) {
323
+ copyAllFailedBtn.addEventListener('click', () => {
324
+ const items = failedDownloadsList.querySelectorAll('[data-failed-url]');
325
+ const urls = Array.from(items).map(item => item.getAttribute('data-failed-url'));
326
+ if (urls.length === 0) return;
327
+
328
+ navigator.clipboard.writeText(urls.join('\n')).then(() => {
329
+ const originalText = copyAllFailedBtn.innerText;
330
+ copyAllFailedBtn.innerText = "¡Copiados!";
331
+ copyAllFailedBtn.style.color = "#4ade80";
332
+ setTimeout(() => {
333
+ copyAllFailedBtn.innerText = originalText;
334
+ copyAllFailedBtn.style.color = "#4da6ff";
335
+ }, 2000);
336
+ });
337
+ });
338
+ }
339
+
340
+ if (clearFailedBtn && failedDownloadsList && failedDownloadsContainer) {
341
+ clearFailedBtn.addEventListener('click', () => {
342
+ failedDownloadsList.innerHTML = '';
343
+ failedDownloadsContainer.style.display = 'none';
344
+ });
345
+ }
346
+
347
+ // Listen to background.js broadcasts so both consoles are synced
348
+ chrome.runtime.onMessage.addListener((request) => {
349
+ if (request.action === "download_log") {
350
+ let prefix = request.title ? `[${request.title}] ` : "";
351
+ printToConsole(`[HOST] ${prefix}${request.log}`, '#8c8d91');
352
+ }
353
+ if (request.action === "download_update" && request.task) {
354
+ updateConsoleCard(request.task);
355
+
356
+ if (request.task.status === "error") {
357
+ printToConsole(`[ERROR] ${request.task.title}: ${request.task.error}`, '#ff4d4d');
358
+ addFailedDownload(request.task);
359
+ } else if (request.task.status === "completed") {
360
+ printToConsole(`[OK] ${request.task.title} descargado.`, '#4ade80');
361
+ } else if (request.task.status === "cancelled") {
362
+ printToConsole(`[INFO] ${request.task.title} cancelado.`, '#ffb84d');
363
+ }
364
+ }
365
+ if (request.action === "download_remove" && request.id) {
366
+ let card = document.getElementById('console_card_' + request.id);
367
+ if (card) card.remove();
368
+ }
369
+ });
370
+ }
371
+
372
+ // --- PLAYLIST DOWNLOADER LOGIC ---
373
+ const fetchPlaylistBtn = document.getElementById('fetchPlaylistBtn');
374
+ const playlistUrlInput = document.getElementById('playlistUrlInput');
375
+ const playlistStatus = document.getElementById('playlistStatus');
376
+ const playlistResultsContainer = document.getElementById('playlistResultsContainer');
377
+ const playlistCountTitle = document.getElementById('playlistCountTitle');
378
+ const playlistVideosList = document.getElementById('playlistVideosList');
379
+ const selectAllPlaylistBtn = document.getElementById('selectAllPlaylistBtn');
380
+ const downloadSelectedPlaylistBtn = document.getElementById('downloadSelectedPlaylistBtn');
381
+
382
+ let currentPlaylistVideos = [];
383
+
384
+ if (fetchPlaylistBtn) {
385
+ fetchPlaylistBtn.addEventListener('click', () => {
386
+ let url = playlistUrlInput.value.trim();
387
+ if (!url) return;
388
+
389
+ fetchPlaylistBtn.disabled = true;
390
+ playlistStatus.innerText = 'Analizando playlist... Esto puede tardar unos segundos.';
391
+ playlistStatus.style.color = 'var(--primary-color)';
392
+ playlistResultsContainer.style.display = 'none';
393
+
394
+ chrome.runtime.sendMessage({ action: 'get_playlist_info', url: url }, (res) => {
395
+ fetchPlaylistBtn.disabled = false;
396
+
397
+ if (chrome.runtime.lastError) {
398
+ playlistStatus.innerText = 'Error de conexión con el núcleo de la extensión.';
399
+ playlistStatus.style.color = '#ff4d4d';
400
+ return;
401
+ }
402
+
403
+ if (!res || !res.success || !res.info) {
404
+ playlistStatus.innerText = 'Error: No se pudo obtener información de la Playlist.';
405
+ playlistStatus.style.color = '#ff4d4d';
406
+ return;
407
+ }
408
+
409
+ let entries = res.info.entries || [];
410
+ // A veces yt-dlp devuelve solo un objeto si es un video normal
411
+ if (entries.length === 0) {
412
+ if (res.info.id) {
413
+ entries = [res.info]; // Es un solo video
414
+ } else {
415
+ playlistStatus.innerText = 'No se encontraron videos en este enlace.';
416
+ playlistStatus.style.color = '#ffb84d';
417
+ return;
418
+ }
419
+ }
420
+
421
+ currentPlaylistVideos = entries.filter(e => e && e.title).map(e => ({
422
+ title: e.title,
423
+ url: e.url || e.webpage_url || (e.id ? `https://www.youtube.com/watch?v=${e.id}` : null),
424
+ duration: e.duration || 0
425
+ })).filter(e => e.url);
426
+
427
+ if (currentPlaylistVideos.length === 0) {
428
+ playlistStatus.innerText = 'No se encontraron enlaces de video válidos en la Playlist.';
429
+ playlistStatus.style.color = '#ffb84d';
430
+ return;
431
+ }
432
+
433
+ playlistStatus.innerText = '';
434
+ playlistResultsContainer.style.display = 'flex';
435
+ playlistCountTitle.innerText = `${currentPlaylistVideos.length} videos encontrados`;
436
+
437
+ renderPlaylistVideos();
438
+ });
439
+ });
440
+
441
+ let allSelected = true;
442
+ selectAllPlaylistBtn.addEventListener('click', () => {
443
+ allSelected = !allSelected;
444
+ const checkboxes = document.querySelectorAll('.playlist-video-checkbox');
445
+ checkboxes.forEach(cb => cb.checked = allSelected);
446
+ selectAllPlaylistBtn.innerText = allSelected ? "Deseleccionar Todos" : "Seleccionar Todos";
447
+ });
448
+
449
+ downloadSelectedPlaylistBtn.addEventListener('click', () => {
450
+ const checkboxes = document.querySelectorAll('.playlist-video-checkbox');
451
+ let itemsToDownload = [];
452
+ checkboxes.forEach((cb, index) => {
453
+ if (cb.checked) {
454
+ itemsToDownload.push(currentPlaylistVideos[index]);
455
+ }
456
+ });
457
+
458
+ if (itemsToDownload.length === 0) {
459
+ alert("No hay videos seleccionados.");
460
+ return;
461
+ }
462
+
463
+ // Enviar a descarga (bulk)
464
+ chrome.storage.local.get(null, (config) => {
465
+ itemsToDownload.forEach((item, idx) => {
466
+ let namingMode = config.batchNamingMode || 'original';
467
+ let customPrefix = (config.batchCustomPrefix || '').trim();
468
+ let title = item.title || `Playlist_Item_${idx+1}`;
469
+ let isAutoTitle = !item.title;
470
+
471
+ if (namingMode === 'lote') {
472
+ title = `Lote ${idx + 1}`;
473
+ isAutoTitle = false;
474
+ } else if (namingMode === 'lista') {
475
+ title = `Lista ${idx + 1}`;
476
+ isAutoTitle = false;
477
+ } else if (namingMode === 'custom') {
478
+ let pfx = customPrefix || 'Video';
479
+ title = `${pfx} ${idx + 1}`;
480
+ isAutoTitle = false;
481
+ }
482
+
483
+ let msg = {
484
+ action: 'download',
485
+ url: item.url,
486
+ title: title,
487
+ qualitySetting: config.qualitySetting || 'max',
488
+ formatSetting: config.formatSetting || 'mp4',
489
+ engineSetting: config.engineSetting || 'ytdlp',
490
+ threadCount: parseInt(config.threadCount || 8),
491
+ ytAudioLang: config.ytAudioLang || 'es',
492
+ ytSubs: config.ytSubs || 'off',
493
+ savePath: config.customSavePath || '',
494
+ audioFormat: config.audioFormat || 'best',
495
+ audioQuality: config.audioQuality || '0',
496
+ audioConvert: config.audioConvert || 'mp3',
497
+ videoFormatPref: config.videoFormatPref || 'legado',
498
+ isAutoTitle: isAutoTitle
499
+ };
500
+ chrome.runtime.sendMessage(msg);
501
+ });
502
+
503
+ // Switch to console
504
+ window.switchTab('view-console');
505
+ });
506
+ });
507
+
508
+ function renderPlaylistVideos() {
509
+ playlistVideosList.innerHTML = '';
510
+ currentPlaylistVideos.forEach((video, index) => {
511
+ const div = document.createElement('div');
512
+ div.style.display = 'flex';
513
+ div.style.alignItems = 'center';
514
+ div.style.gap = '10px';
515
+ div.style.background = 'rgba(255,255,255,0.03)';
516
+ div.style.padding = '8px 12px';
517
+ div.style.borderRadius = '6px';
518
+ div.style.border = '1px solid var(--border-color)';
519
+
520
+ const cb = document.createElement('input');
521
+ cb.type = 'checkbox';
522
+ cb.className = 'playlist-video-checkbox';
523
+ cb.checked = true;
524
+ cb.style.cursor = 'pointer';
525
+
526
+ const titleSpan = document.createElement('span');
527
+ titleSpan.innerText = `${index + 1}. ${video.title}`;
528
+ titleSpan.style.fontSize = '13px';
529
+ titleSpan.style.color = '#e0e0e0';
530
+ titleSpan.style.whiteSpace = 'nowrap';
531
+ titleSpan.style.overflow = 'hidden';
532
+ titleSpan.style.textOverflow = 'ellipsis';
533
+ titleSpan.style.flex = '1';
534
+
535
+ div.appendChild(cb);
536
+ div.appendChild(titleSpan);
537
+
538
+ // Toggle checkbox on row click
539
+ titleSpan.style.cursor = 'pointer';
540
+ titleSpan.addEventListener('click', () => { cb.checked = !cb.checked; });
541
+
542
+ playlistVideosList.appendChild(div);
543
+ });
544
+ }
545
+ }
546
+
547
+ // --- SETTINGS LOGIC ---
548
+ const settingsKeys = [
549
+ 'customSavePath', 'formatSetting', 'qualitySetting', 'engineSetting',
550
+ 'threadCount', 'audioFormat', 'audioQuality', 'audioConvert',
551
+ 'videoFormatPref', 'customMode', 'snifferEnabled', 'ytAudioLang', 'ytSubs', 'cookiesSetting',
552
+ 'maxConcurrentDownloads', 'batchNamingMode', 'batchCustomPrefix'
553
+ ];
554
+
555
+ const selectFolderBtn = document.getElementById('selectFolderBtn');
556
+ const savePathDisplay = document.getElementById('savePathDisplay');
557
+
558
+ if (selectFolderBtn && savePathDisplay) {
559
+ chrome.storage.local.get(settingsKeys, (result) => {
560
+ if (result.customSavePath) { savePathDisplay.innerText = result.customSavePath; }
561
+ else { savePathDisplay.innerText = "Ninguna seleccionada (Descargas)"; }
562
+
563
+ syncBatchNamingSettings(result.batchNamingMode || 'original', result.batchCustomPrefix || '');
564
+
565
+ const setRadio = (name, val) => {
566
+ const el = document.querySelector(`input[name="${name}"][value="${val}"]`);
567
+ if (el) el.checked = true;
568
+ };
569
+
570
+ setRadio('formatSetting', result.formatSetting || 'mp4');
571
+ setRadio('qualitySetting', result.qualitySetting || 'max');
572
+ setRadio('engineSetting', result.engineSetting || 'ytdlp');
573
+ setRadio('videoFormatPref', result.videoFormatPref || 'legado');
574
+ setRadio('customModeSetting', result.customMode === true ? 'on' : 'off');
575
+ setRadio('snifferSetting', result.snifferEnabled !== false ? 'on' : 'off');
576
+ setRadio('ytAudioLang', result.ytAudioLang || 'es');
577
+ setRadio('ytSubs', result.ytSubs || 'off');
578
+ setRadio('cookiesSetting', result.cookiesSetting || 'none');
579
+
580
+ const threadSlider = document.getElementById('threadSlider');
581
+ const threadCountLabel = document.getElementById('threadCountLabel');
582
+ if (threadSlider && threadCountLabel) {
583
+ threadSlider.value = result.threadCount || 8;
584
+ threadCountLabel.innerText = `Hilos: ${threadSlider.value}`;
585
+ threadCountLabel.style.color = parseInt(threadSlider.value) > 24 ? '#ff4d4d' : '#e5e5e5';
586
+ }
587
+
588
+ const e = result.engineSetting || 'ytdlp';
589
+ const threadSettingContainer = document.getElementById('threadSettingContainer');
590
+ if (threadSettingContainer) {
591
+ threadSettingContainer.style.display = 'block';
592
+ }
593
+
594
+ const concurrencySlider = document.getElementById('concurrencySlider');
595
+ const concurrencyCountLabel = document.getElementById('concurrencyCountLabel');
596
+ if (concurrencySlider && concurrencyCountLabel) {
597
+ concurrencySlider.value = result.maxConcurrentDownloads || 1;
598
+ concurrencyCountLabel.innerText = `Descargas a la vez: ${concurrencySlider.value}`;
599
+ }
600
+
601
+ function updateThreadDescription(engine) {
602
+ const desc = document.getElementById('threadDescription');
603
+ if (!desc) return;
604
+ if (engine === 'ytdlp') {
605
+ desc.innerHTML = "<b>Motor por defecto (yt-dlp):</b> Seguro y confiable. Divide el archivo en partes. <br><b>Recomendación:</b> 4 a 8 hilos. Valores mayores (10+) pueden causar bloqueos en servidores comunes.";
606
+ } else if (engine === 'aria2') {
607
+ desc.innerHTML = "<b>Acelerador (aria2):</b> Motor agresivo. Abre múltiples conexiones simultáneas.<br><b>Recomendación:</b> 8 a 16 hilos. Ideal para exprimir tu ancho de banda en descargas directas.";
608
+ } else if (engine === 'nm3u8') {
609
+ desc.innerHTML = "<b>Motor Extremo (N_m3u8DL):</b> Especializado en streaming (.m3u8). Procesa fragmentos en paralelo.<br><b>Recomendación:</b> 8 a 24 hilos. Valores extremos (+24) bajo tu propia responsabilidad.";
610
+ }
611
+ }
612
+ updateThreadDescription(e);
613
+
614
+
615
+ const audioFormatSelect = document.getElementById('audioFormatSelect');
616
+ const audioQualitySelect = document.getElementById('audioQualitySelect');
617
+ const audioConvertSelect = document.getElementById('audioConvertSelect');
618
+
619
+ if (audioFormatSelect) audioFormatSelect.value = result.audioFormat || 'best';
620
+ if (audioQualitySelect) audioQualitySelect.value = result.audioQuality || '0';
621
+ if (audioConvertSelect) audioConvertSelect.value = result.audioConvert || 'mp3';
622
+
623
+ updateUIBasedOnFormat(result.formatSetting || 'mp4');
624
+ });
625
+
626
+ // Bind changes
627
+ const bindRadio = (name, storageKey, callback) => {
628
+ document.querySelectorAll(`input[name="${name}"]`).forEach(r => {
629
+ r.addEventListener('change', (e) => {
630
+ let val = e.target.value;
631
+ if (val === 'on') val = true;
632
+ if (val === 'off') val = false;
633
+ chrome.storage.local.set({ [storageKey]: val }, () => {
634
+ if (callback) callback(val);
635
+ });
636
+ });
637
+ });
638
+ };
639
+
640
+ bindRadio('formatSetting', 'formatSetting', (val) => updateUIBasedOnFormat(val));
641
+ bindRadio('qualitySetting', 'qualitySetting');
642
+ bindRadio('engineSetting', 'engineSetting', (val) => {
643
+ const t = document.getElementById('threadSettingContainer');
644
+ if (t) t.style.display = 'block';
645
+
646
+ const desc = document.getElementById('threadDescription');
647
+ if (desc) {
648
+ if (val === 'ytdlp') {
649
+ desc.innerHTML = "<b>Motor por defecto (yt-dlp):</b> Seguro y confiable. Divide el archivo en partes. <br><b>Recomendación:</b> 4 a 8 hilos. Valores mayores (10+) pueden causar bloqueos en servidores comunes.";
650
+ } else if (val === 'aria2') {
651
+ desc.innerHTML = "<b>Acelerador (aria2):</b> Motor agresivo. Abre múltiples conexiones simultáneas.<br><b>Recomendación:</b> 8 a 16 hilos. Ideal para exprimir tu ancho de banda en descargas directas.";
652
+ } else if (val === 'nm3u8') {
653
+ desc.innerHTML = "<b>Motor Extremo (N_m3u8DL):</b> Especializado en streaming (.m3u8). Procesa fragmentos en paralelo.<br><b>Recomendación:</b> 8 a 24 hilos. Valores extremos (+24) bajo tu propia responsabilidad.";
654
+ }
655
+ }
656
+ });
657
+ bindRadio('videoFormatPref', 'videoFormatPref');
658
+ bindRadio('customModeSetting', 'customMode');
659
+ bindRadio('snifferSetting', 'snifferEnabled');
660
+ bindRadio('ytAudioLang', 'ytAudioLang');
661
+ bindRadio('ytSubs', 'ytSubs');
662
+ bindRadio('cookiesSetting', 'cookiesSetting');
663
+
664
+ const threadSlider = document.getElementById('threadSlider');
665
+ if (threadSlider) {
666
+ threadSlider.addEventListener('input', (e) => {
667
+ let val = parseInt(e.target.value);
668
+ let tl = document.getElementById('threadCountLabel');
669
+ tl.innerText = `Hilos: ${val}`;
670
+ tl.style.color = val > 24 ? '#ff4d4d' : '#e5e5e5';
671
+ });
672
+ threadSlider.addEventListener('change', (e) => {
673
+ chrome.storage.local.set({ threadCount: parseInt(e.target.value) });
674
+ });
675
+ }
676
+
677
+ const concurrencySlider = document.getElementById('concurrencySlider');
678
+ if (concurrencySlider) {
679
+ concurrencySlider.addEventListener('input', (e) => {
680
+ let val = parseInt(e.target.value);
681
+ let cl = document.getElementById('concurrencyCountLabel');
682
+ if (cl) cl.innerText = `Descargas a la vez: ${val}`;
683
+ });
684
+ concurrencySlider.addEventListener('change', (e) => {
685
+ chrome.storage.local.set({ maxConcurrentDownloads: parseInt(e.target.value) });
686
+ });
687
+ }
688
+
689
+ ['audioFormatSelect', 'audioQualitySelect', 'audioConvertSelect'].forEach(id => {
690
+ const el = document.getElementById(id);
691
+ if (el) {
692
+ el.addEventListener('change', (e) => {
693
+ let key = id.replace('Select', '');
694
+ chrome.storage.local.set({ [key]: e.target.value });
695
+ });
696
+ }
697
+ });
698
+
699
+ function syncBatchNamingSettings(mode, customPrefix) {
700
+ const bSel = document.getElementById('batchNamingSelect');
701
+ const cSel = document.getElementById('configBatchNamingSelect');
702
+ const cSel2 = document.getElementById('configBatchNamingSelect2');
703
+ const bInput = document.getElementById('batchCustomPrefixInput');
704
+ const cInput = document.getElementById('configBatchCustomPrefixInput');
705
+ const cInput2 = document.getElementById('configBatchCustomPrefixInput2');
706
+ const cWrap = document.getElementById('configBatchCustomPrefixWrap');
707
+ const cWrap2 = document.getElementById('configBatchCustomPrefixWrap2');
708
+
709
+ if (bSel) bSel.value = mode || 'original';
710
+ if (cSel) cSel.value = mode || 'original';
711
+ if (cSel2) cSel2.value = mode || 'original';
712
+
713
+ if (bInput) bInput.value = customPrefix || '';
714
+ if (cInput) cInput.value = customPrefix || '';
715
+ if (cInput2) cInput2.value = customPrefix || '';
716
+
717
+ const isCustom = (mode === 'custom');
718
+ if (bInput) bInput.style.display = isCustom ? 'inline-block' : 'none';
719
+ if (cWrap) cWrap.style.display = isCustom ? 'block' : 'none';
720
+ if (cWrap2) cWrap2.style.display = isCustom ? 'block' : 'none';
721
+ }
722
+
723
+ const onBatchNamingChange = (e) => {
724
+ const mode = e.target.value;
725
+ chrome.storage.local.get(['batchCustomPrefix'], (res) => {
726
+ const prefix = res.batchCustomPrefix || '';
727
+ chrome.storage.local.set({ batchNamingMode: mode }, () => {
728
+ syncBatchNamingSettings(mode, prefix);
729
+ });
730
+ });
731
+ };
732
+
733
+ const bSel = document.getElementById('batchNamingSelect');
734
+ const cSel = document.getElementById('configBatchNamingSelect');
735
+ const cSel2 = document.getElementById('configBatchNamingSelect2');
736
+ if (bSel) bSel.addEventListener('change', onBatchNamingChange);
737
+ if (cSel) cSel.addEventListener('change', onBatchNamingChange);
738
+ if (cSel2) cSel2.addEventListener('change', onBatchNamingChange);
739
+
740
+ const onBatchPrefixChange = (e) => {
741
+ const prefix = e.target.value;
742
+ chrome.storage.local.get(['batchNamingMode'], (res) => {
743
+ const mode = res.batchNamingMode || 'original';
744
+ chrome.storage.local.set({ batchCustomPrefix: prefix }, () => {
745
+ syncBatchNamingSettings(mode, prefix);
746
+ });
747
+ });
748
+ };
749
+
750
+ const bInput = document.getElementById('batchCustomPrefixInput');
751
+ const cInput = document.getElementById('configBatchCustomPrefixInput');
752
+ const cInput2 = document.getElementById('configBatchCustomPrefixInput2');
753
+ if (bInput) {
754
+ bInput.addEventListener('input', onBatchPrefixChange);
755
+ bInput.addEventListener('change', onBatchPrefixChange);
756
+ }
757
+ if (cInput) {
758
+ cInput.addEventListener('input', onBatchPrefixChange);
759
+ cInput.addEventListener('change', onBatchPrefixChange);
760
+ }
761
+ if (cInput2) {
762
+ cInput2.addEventListener('input', onBatchPrefixChange);
763
+ cInput2.addEventListener('change', onBatchPrefixChange);
764
+ }
765
+
766
+ selectFolderBtn.addEventListener('click', () => {
767
+ chrome.runtime.sendMessage({ action: "select_folder" }, (response) => {
768
+ if (response && response.success) {
769
+ if (response.status === "folder_selected" && response.path) {
770
+ chrome.storage.local.set({ customSavePath: response.path }, () => {
771
+ savePathDisplay.innerText = response.path;
772
+ });
773
+ }
774
+ }
775
+ });
776
+ });
777
+
778
+ function updateUIBasedOnFormat(format) {
779
+ const qContainer = document.getElementById('qualitySettingContainer');
780
+ const vContainer = document.getElementById('videoPreferenceContainer');
781
+ const aLabel = document.getElementById('audioSettingsLabel');
782
+
783
+ if (format === 'mp3') {
784
+ if (qContainer) qContainer.style.display = 'none';
785
+ if (vContainer) vContainer.style.display = 'none';
786
+ if (aLabel) aLabel.innerText = 'Ajustes de Audio';
787
+ } else {
788
+ if (qContainer) qContainer.style.display = 'block';
789
+ if (vContainer) vContainer.style.display = 'block';
790
+ if (aLabel) aLabel.innerText = 'Ajustes del Audio del Video';
791
+ }
792
+ }
793
+
794
+ // Sync changes made from the extension popup in real-time
795
+ chrome.storage.onChanged.addListener((changes, namespace) => {
796
+ if (namespace !== 'local') return;
797
+
798
+ const setRadioIfChanged = (name, key) => {
799
+ if (changes[key]) {
800
+ let val = changes[key].newValue;
801
+ if (val === true) val = 'on';
802
+ if (val === false) val = 'off';
803
+ const el = document.querySelector(`input[name="${name}"][value="${val}"]`);
804
+ if (el) el.checked = true;
805
+ }
806
+ };
807
+
808
+ if (changes.customSavePath) {
809
+ savePathDisplay.innerText = changes.customSavePath.newValue || "Ninguna seleccionada (Descargas)";
810
+ }
811
+
812
+ setRadioIfChanged('formatSetting', 'formatSetting');
813
+ if (changes.formatSetting) updateUIBasedOnFormat(changes.formatSetting.newValue);
814
+
815
+ setRadioIfChanged('qualitySetting', 'qualitySetting');
816
+ setRadioIfChanged('engineSetting', 'engineSetting');
817
+ if (changes.engineSetting) {
818
+ const t = document.getElementById('threadSettingContainer');
819
+ if (t) t.style.display = 'block';
820
+
821
+ const desc = document.getElementById('threadDescription');
822
+ if (desc) {
823
+ let val = changes.engineSetting.newValue;
824
+ if (val === 'ytdlp') {
825
+ desc.innerHTML = "<b>Motor por defecto (yt-dlp):</b> Seguro y confiable. Divide el archivo en partes. <br><b>Recomendación:</b> 4 a 8 hilos. Valores mayores (10+) pueden causar bloqueos en servidores comunes.";
826
+ } else if (val === 'aria2') {
827
+ desc.innerHTML = "<b>Acelerador (aria2):</b> Motor agresivo. Abre múltiples conexiones simultáneas.<br><b>Recomendación:</b> 8 a 16 hilos. Ideal para exprimir tu ancho de banda en descargas directas.";
828
+ } else if (val === 'nm3u8') {
829
+ desc.innerHTML = "<b>Motor Extremo (N_m3u8DL):</b> Especializado en streaming (.m3u8). Procesa fragmentos en paralelo.<br><b>Recomendación:</b> 8 a 24 hilos. Valores extremos (+24) bajo tu propia responsabilidad.";
830
+ }
831
+ }
832
+ }
833
+
834
+ setRadioIfChanged('videoFormatPref', 'videoFormatPref');
835
+ setRadioIfChanged('customModeSetting', 'customMode');
836
+ setRadioIfChanged('snifferSetting', 'snifferEnabled');
837
+ setRadioIfChanged('ytAudioLang', 'ytAudioLang');
838
+ setRadioIfChanged('ytSubs', 'ytSubs');
839
+ setRadioIfChanged('cookiesSetting', 'cookiesSetting');
840
+
841
+ if (changes.threadCount) {
842
+ const ts = document.getElementById('threadSlider');
843
+ const tl = document.getElementById('threadCountLabel');
844
+ if (ts && tl) {
845
+ let val = parseInt(changes.threadCount.newValue);
846
+ ts.value = val;
847
+ tl.innerText = `Hilos: ${val}`;
848
+ tl.style.color = val > 24 ? '#ff4d4d' : '#e5e5e5';
849
+ }
850
+ }
851
+
852
+ if (changes.maxConcurrentDownloads) {
853
+ const cs = document.getElementById('concurrencySlider');
854
+ const cl = document.getElementById('concurrencyCountLabel');
855
+ if (cs && cl) {
856
+ let val = parseInt(changes.maxConcurrentDownloads.newValue || 1);
857
+ cs.value = val;
858
+ cl.innerText = `Descargas a la vez: ${val}`;
859
+ }
860
+ }
861
+
862
+ if (changes.audioFormat) {
863
+ const el = document.getElementById('audioFormatSelect');
864
+ if (el) el.value = changes.audioFormat.newValue;
865
+ }
866
+ if (changes.audioQuality) {
867
+ const el = document.getElementById('audioQualitySelect');
868
+ if (el) el.value = changes.audioQuality.newValue;
869
+ }
870
+ if (changes.audioConvert) {
871
+ const el = document.getElementById('audioConvertSelect');
872
+ if (el) el.value = changes.audioConvert.newValue;
873
+ }
874
+ });
875
+ }
876
+
877
+ // Console Action Buttons
878
+ const clearConsoleBtn = document.getElementById('clearConsoleBtn');
879
+ const copyConsoleBtn = document.getElementById('copyConsoleBtn');
880
+ const scrollBottomBtn = document.getElementById('scrollBottomBtn');
881
+
882
+ if (clearConsoleBtn && toolConsole) {
883
+ clearConsoleBtn.addEventListener('click', () => {
884
+ toolConsole.innerHTML = '';
885
+ chrome.runtime.sendMessage({ action: "clear_console_logs" });
886
+ });
887
+ }
888
+
889
+ if (copyConsoleBtn && toolConsole) {
890
+ copyConsoleBtn.addEventListener('click', () => {
891
+ navigator.clipboard.writeText(toolConsole.innerText).then(() => {
892
+ const originalText = copyConsoleBtn.innerText;
893
+ copyConsoleBtn.innerText = "Copiado ✓";
894
+ setTimeout(() => { copyConsoleBtn.innerText = originalText; }, 2000);
895
+ }).catch(err => {
896
+ console.error("Error al copiar: ", err);
897
+ });
898
+ });
899
+ }
900
+
901
+ if (scrollBottomBtn && toolConsole) {
902
+ scrollBottomBtn.addEventListener('click', () => {
903
+ toolConsole.scrollTop = toolConsole.scrollHeight;
904
+ });
905
+ }
906
+
907
+ // Emergency Stop Button
908
+ const emergencyStopBtn = document.getElementById('emergencyStopBtn');
909
+ if (emergencyStopBtn) {
910
+ emergencyStopBtn.addEventListener('click', () => {
911
+ if (confirm('¿Estás seguro de que deseas detener de forma total todas las descargas activas y vaciar la cola?')) {
912
+ chrome.runtime.sendMessage({ action: 'emergency_stop' }, (response) => {
913
+ if (response && response.success) {
914
+ printToConsole('\n>> [EMERGENCIA] Parada de emergencia ejecutada por el usuario.', '#ff4d4d');
915
+ }
916
+ });
917
+ }
918
+ });
919
+ }
920
+ });
extension/lib/hls.light.min.js ADDED
The diff for this file is too large to render. See raw diff
 
extension/manifest.json ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "manifest_version": 3,
3
+ "name": "Local Video Downloader",
4
+ "version": "1.0",
5
+ "description": "Descarga videos directamente a tu PC usando Native Messaging.",
6
+ "permissions": [
7
+ "nativeMessaging",
8
+ "activeTab",
9
+ "storage",
10
+ "cookies",
11
+ "webRequest",
12
+ "scripting",
13
+ "clipboardRead",
14
+ "contextMenus"
15
+ ],
16
+ "host_permissions": [
17
+ "*://*/*"
18
+ ],
19
+ "icons": {
20
+ "16": "icons/icon.png",
21
+ "48": "icons/icon.png",
22
+ "128": "icons/icon.png"
23
+ },
24
+ "action": {
25
+ "default_popup": "popup.html",
26
+ "default_icon": {
27
+ "16": "icons/icon.png",
28
+ "48": "icons/icon.png",
29
+ "128": "icons/icon.png"
30
+ }
31
+ },
32
+ "background": {
33
+ "service_worker": "js/background.js"
34
+ }
35
+ }
extension/popup.html ADDED
@@ -0,0 +1,467 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <link rel="stylesheet" href="css/popup.css">
6
+ </head>
7
+ <body>
8
+ <div class="tabs-container">
9
+ <div class="tab active" data-tab="detector">
10
+ <svg viewBox="0 0 24 24" class="icon"><path fill="currentColor" d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>
11
+ Detector
12
+ </div>
13
+ <div class="tab" data-tab="descargas">
14
+ <svg viewBox="0 0 24 24" class="icon"><path fill="currentColor" d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/></svg>
15
+ Descargas
16
+ </div>
17
+ <div class="tab" data-tab="config">
18
+ <svg viewBox="0 0 24 24" class="icon"><path fill="currentColor" d="M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.73 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.49-.12-.61l-2.01-1.58zm-7.14 2.66c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"/></svg>
19
+ Configuración
20
+ </div>
21
+ <div class="tab" data-tab="acerca">
22
+ <svg viewBox="0 0 24 24" class="icon"><path fill="currentColor" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/></svg>
23
+ Acerca de
24
+ </div>
25
+ </div>
26
+
27
+ <div class="main-content">
28
+
29
+ <!-- Tab: Detector -->
30
+ <div id="panel-detector" class="panel active">
31
+ <h2 class="section-title flex-title" style="flex-wrap: wrap; gap: 8px;">
32
+ Detector
33
+ <div style="display: flex; gap: 8px; align-items: center;">
34
+ <button class="action-btn secondary" style="padding: 4px 8px; font-size: 11px; display: flex; align-items: center; gap: 4px;" id="clearErrorsBtn" title="Limpiar finalizados y errores">
35
+ <svg viewBox="0 0 24 24" width="13" height="13"><path fill="currentColor" d="M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"/></svg>
36
+ Limpiar Finalizados
37
+ </button>
38
+ <button class="action-btn" style="padding: 4px 8px; font-size: 11px; display: flex; align-items: center; gap: 4px; background-color: #ff4d4d; color: #fff; font-weight: 600; border: none; border-radius: 4px; cursor: pointer;" id="emergencyStopBtn" title="Parar y limpiar todas las descargas">
39
+ <svg viewBox="0 0 24 24" width="13" height="13" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z"/></svg>
40
+ Parada Emergencia
41
+ </button>
42
+ </div>
43
+ </h2>
44
+
45
+ <div id="manualCardContainer" style="display: none; margin-bottom: 15px;">
46
+ <div class="detected-video-card" style="flex-direction: column; align-items: stretch; text-align: center; gap: 15px; display: flex;">
47
+ <div class="video-info" style="width: 100%; text-align: left;">
48
+ <div class="preview-title" style="display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 6px; font-weight: 500;">
49
+ <span>Enlace Especial</span>
50
+ <span id="linkCountDisplay" style="font-size: 12px; color: #4da6ff; font-weight: normal; margin-top: 2px;">0 enlaces</span>
51
+ </div>
52
+ <div style="display: flex; gap: 8px; width: 100%; align-items: stretch;">
53
+ <textarea id="manualUrlInput" placeholder="Pega los enlaces web aquí (separados por espacio o renglón)..." style="flex: 1; height: 42px; min-height: 42px; max-height: 120px; overflow-y: auto; resize: vertical; padding: 10px; background: #1f2024; color: #fff; border: 1px solid #333; border-radius: 6px; outline: none; font-size: 11px; word-break: break-all; box-sizing: border-box; transition: border-color 0.2s;" onfocus="this.style.borderColor='#4da6ff'" onblur="this.style.borderColor='#333'"></textarea>
54
+ <button id="pasteUrlBtn" title="Pegar del portapapeles" style="background: #26272b; border: 1px solid #333; color: #8c8d91; cursor: pointer; padding: 0 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 6px; transition: all 0.2s; min-width: 65px;" onmouseover="this.style.background='#333'; this.style.color='#fff'" onmouseout="this.style.background='#26272b'; this.style.color='#8c8d91'">
55
+ <svg viewBox="0 0 24 24" width="18" height="18" style="margin-bottom: 4px;"><path fill="currentColor" d="M19 2h-4.18C14.4.84 13.3 0 12 0S9.6.84 9.18 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm7 18H5V4h2v3h10V4h2v16z"/></svg>
56
+ <span style="font-size: 10px; font-weight: 500;">Pegar</span>
57
+ </button>
58
+ </div>
59
+ </div>
60
+ <div style="display: flex; gap: 10px; width: 100%; justify-content: center;">
61
+ <select class="action-btn quality-dropdown hidden" id="manualQualityDrop" style="flex: 1; cursor: pointer; color: #e5e5e5; outline: none; appearance: menulist; background-color: #26272b;" title="Seleccionar Calidad">
62
+ <option value="4320">4320p</option>
63
+ <option value="2160">2160p</option>
64
+ <option value="1440">1440p</option>
65
+ <option value="1080" selected>1080p</option>
66
+ <option value="720">720p</option>
67
+ <option value="480">480p</option>
68
+ <option value="360">360p</option>
69
+ </select>
70
+ <button class="action-btn primary" id="manualDownloadBtn" style="flex: 1;">Descargar</button>
71
+ </div>
72
+ </div>
73
+ </div>
74
+
75
+ <div id="cardsWrapper" style="width: 100%; display: flex; flex-direction: column; gap: 15px; max-height: 400px; overflow-y: auto; padding-bottom: 20px;">
76
+ </div>
77
+
78
+ <template id="videoCardTemplate">
79
+ <div class="detected-video-card" style="flex-direction: column; align-items: stretch; text-align: center; gap: 15px; display: flex; position: relative; transition: opacity 0.2s;">
80
+
81
+ <div style="display: flex; gap: 12px; align-items: center; width: 100%;">
82
+ <div class="video-info" style="flex: 1; text-align: left; box-sizing: border-box; overflow: hidden;">
83
+ <div style="display: flex; align-items: center; gap: 6px; margin-bottom: 4px; overflow: hidden;">
84
+ <span class="type-badge hidden" style="font-size: 9px; padding: 2px 6px; border-radius: 4px; font-weight: bold; letter-spacing: 0.5px; flex-shrink: 0;"></span>
85
+ <input type="text" class="preview-title" readonly style="font-size: 14px; font-weight: 500; margin-bottom: 0; background: transparent; border: 1px solid transparent; color: #fff; width: 100%; outline: none; border-radius: 4px; padding: 0px; transition: all 0.2s; cursor: default; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;" title="Triple clic para editar el nombre del archivo final" spellcheck="false">
86
+ </div>
87
+ <div style="display: flex; align-items: center; justify-content: space-between; gap: 8px;">
88
+ <div class="preview-url" style="font-size: 11px; color: #8c8d91; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;" title="Abrir enlace en nueva pestaña"></div>
89
+ <div class="copy-url-btn" title="Copiar enlace" style="color: #8c8d91; cursor: pointer; display: flex; align-items: center; padding: 2px; flex-shrink: 0; transition: color 0.2s;" onmouseover="this.style.color='#fff'" onmouseout="this.style.color='#8c8d91'">
90
+ <svg viewBox="0 0 24 24" width="14" height="14"><path fill="currentColor" d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg>
91
+ </div>
92
+ </div>
93
+ </div>
94
+ </div>
95
+
96
+ <div style="display: flex; gap: 10px; width: 100%; justify-content: center; align-items: center;">
97
+ <select class="action-btn quality-dropdown hidden" style="flex: 1; cursor: pointer; color: #e5e5e5; outline: none; appearance: menulist; background-color: #26272b;" title="Seleccionar Calidad">
98
+ <option value="4320">4320p (8K UHD)</option>
99
+ <option value="2160">2160p (4K UHD)</option>
100
+ <option value="1440">1440p (2K / QHD)</option>
101
+ <option value="1080" selected>1080p (Full HD)</option>
102
+ <option value="720">720p (HD)</option>
103
+ <option value="480">480p (SD)</option>
104
+ <option value="360">360p</option>
105
+ <option value="240">240p</option>
106
+ <option value="144">144p</option>
107
+ </select>
108
+ <select class="action-btn detect-dropdown hidden" style="flex: 1; cursor: pointer; color: #e5e5e5; outline: none; appearance: menulist; background-color: #26272b; border: 1px solid rgba(255, 184, 77, 0.5);" title="Calidad Detectada"></select>
109
+ <button class="action-btn primary main-btn" style="flex: 1;">Descargar</button>
110
+ </div>
111
+
112
+ <div class="progress-box hidden" style="display: flex; flex-direction: column; gap: 5px; text-align: left; margin-top: 5px;">
113
+ <div style="display: flex; justify-content: space-between; font-size: 11px; align-items: center;">
114
+ <span class="status-msg" style="color: #4da6ff;">Iniciando...</span>
115
+ <span class="status-percent" style="color: #4da6ff;">0%</span>
116
+ </div>
117
+ <div style="width: 100%; height: 6px; background-color: #2f3036; border-radius: 3px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);">
118
+ <div class="bar-fill" style="width: 0%; height: 100%; background-color: #4da6ff; transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1); border-radius: 3px;"></div>
119
+ </div>
120
+ </div>
121
+ </div>
122
+ </template>
123
+
124
+ <div class="empty-state" id="emptyState">
125
+ <svg viewBox="0 0 24 24" class="empty-icon"><path fill="currentColor" d="M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.41 2.26-4.39C12.92 3.04 12.46 3 12 3z"/></svg>
126
+ <h3 class="state-title" id="statusTitle">Analizando la web...</h3>
127
+ <p class="state-desc" id="status">Por favor, espera un segundo.</p>
128
+ </div>
129
+ </div>
130
+
131
+ <!-- Tab: Descargas -->
132
+ <div id="panel-descargas" class="panel">
133
+ <h2 class="section-title flex-title">
134
+ Historial de Descargas
135
+ <button class="action-btn secondary" style="padding: 4px 8px; font-size: 11px;" id="clearHistoryBtn">Borrar Todo</button>
136
+ </h2>
137
+ <div class="downloads-list" id="downloadsList">
138
+ <!-- populated by js -->
139
+ </div>
140
+ </div>
141
+
142
+ <!-- Tab: Config -->
143
+ <div id="panel-config" class="panel">
144
+ <h2 class="section-title">Configuración</h2>
145
+
146
+ <div class="settings-card" style="margin-bottom: 15px;">
147
+ <div class="setting-item">
148
+ <label>Formato de Descarga</label>
149
+ <div style="display: flex; gap: 10px; margin-top: 8px;">
150
+ <label class="radio-switch">
151
+ <input type="radio" name="formatSetting" value="mp4" checked>
152
+ <span class="radio-btn">Video</span>
153
+ </label>
154
+ <label class="radio-switch">
155
+ <input type="radio" name="formatSetting" value="mp3">
156
+ <span class="radio-btn">Audio</span>
157
+ </label>
158
+ </div>
159
+ </div>
160
+
161
+ <div class="setting-item" id="qualitySettingContainer">
162
+ <label>Calidad de Video</label>
163
+ <div style="display: flex; gap: 10px; margin-top: 8px;">
164
+ <label class="radio-switch">
165
+ <input type="radio" name="qualitySetting" value="max" checked>
166
+ <span class="radio-btn">Máxima</span>
167
+ </label>
168
+ <label class="radio-switch">
169
+ <input type="radio" name="qualitySetting" value="min">
170
+ <span class="radio-btn">Mínima</span>
171
+ </label>
172
+ <label class="radio-switch">
173
+ <input type="radio" name="qualitySetting" value="ask">
174
+ <span class="radio-btn">Preguntar</span>
175
+ </label>
176
+ <label class="radio-switch" title="Extrae resoluciones reales del servidor">
177
+ <input type="radio" name="qualitySetting" value="detect">
178
+ <span class="radio-btn" style="color: #ffb84d;">Detector</span>
179
+ </label>
180
+ </div>
181
+ <p style="font-size: 11px; color:#6a6b70; margin: 6px 0 0 0;" id="qualitySettingStatus">Al dar en "Preguntar" podrás elegir la calidad manual. Con "Detector", la app interrogará al servidor para extraer la lista real (Requiere configuración del Host).</p>
182
+ </div>
183
+
184
+ <div class="setting-item" id="videoPreferenceContainer" style="border-top: 1px solid #333; padding-top: 17px; margin-top: 5px;">
185
+ <label style="color: #4da6ff; margin-bottom: 12px; display: block; font-weight: 600;">Preferencia de formato de vídeo</label>
186
+ <div style="display: flex; flex-direction: column; gap: 10px; margin-top: 10px;">
187
+ <label style="display: block; position: relative; cursor: pointer;">
188
+ <input type="radio" name="videoFormatPref" value="legado" checked class="hidden-radio">
189
+ <div class="radio-card">
190
+ <div class="card-radio-circle"></div>
191
+ <div>
192
+ <div class="card-title-text">Legado</div>
193
+ <div class="card-desc-text">Prefieres los formatos MP4(H.264) para compartir con otras aplicaciones</div>
194
+ </div>
195
+ </div>
196
+ </label>
197
+ <label style="display: block; position: relative; cursor: pointer;">
198
+ <input type="radio" name="videoFormatPref" value="calidad" class="hidden-radio">
199
+ <div class="radio-card">
200
+ <div class="card-radio-circle"></div>
201
+ <div>
202
+ <div class="card-title-text">Calidad</div>
203
+ <div class="card-desc-text">Prefieres los formatos AV1, VP9 o H.265 para verlos en las aplicaciones compatibles</div>
204
+ </div>
205
+ </div>
206
+ </label>
207
+ </div>
208
+ </div>
209
+
210
+ <div class="setting-item" id="audioSettingsContainer" style="border-top: 1px solid #333; padding-top: 17px; margin-top: 5px;">
211
+ <label id="audioSettingsLabel" style="color: #4da6ff; margin-bottom: 12px; display: block; font-weight: 600;">Ajustes de Audio</label>
212
+
213
+ <div style="display: flex; flex-direction: column; gap: 15px; margin-top: 10px;">
214
+ <div>
215
+ <label style="font-size: 12px; color: #a1a1a5; margin-bottom: 6px; display: block; font-weight: 500;">Formato de audio preferido</label>
216
+ <div class="custom-select-wrapper">
217
+ <select id="audioFormatSelect" class="custom-select">
218
+ <option value="best">Sin especificar (por defecto)</option>
219
+ <option value="opus">OPUS</option>
220
+ <option value="m4a">M4A</option>
221
+ </select>
222
+ <svg class="select-arrow" viewBox="0 0 24 24"><path fill="currentColor" d="M7 10l5 5 5-5z"/></svg>
223
+ </div>
224
+ </div>
225
+
226
+ <div>
227
+ <label style="font-size: 12px; color: #a1a1a5; margin-bottom: 6px; display: block; font-weight: 500;">Calidad del audio</label>
228
+ <div class="custom-select-wrapper">
229
+ <select id="audioQualitySelect" class="custom-select">
230
+ <option value="0">Ilimitado</option>
231
+ <option value="192">192 Kbps</option>
232
+ <option value="128">128 Kbps</option>
233
+ <option value="64">64 Kbps</option>
234
+ <option value="32">32 Kbps</option>
235
+ </select>
236
+ <svg class="select-arrow" viewBox="0 0 24 24"><path fill="currentColor" d="M7 10l5 5 5-5z"/></svg>
237
+ </div>
238
+ </div>
239
+
240
+ <div>
241
+ <label style="font-size: 12px; color: #a1a1a5; margin-bottom: 6px; display: block; font-weight: 500;">Convertir formato de audio</label>
242
+ <div class="custom-select-wrapper">
243
+ <select id="audioConvertSelect" class="custom-select">
244
+ <option value="mp3" selected>Convertir a mp3</option>
245
+ <option value="none">No convertir</option>
246
+ <option value="m4a">Convertir a m4a</option>
247
+ </select>
248
+ <svg class="select-arrow" viewBox="0 0 24 24"><path fill="currentColor" d="M7 10l5 5 5-5z"/></svg>
249
+ </div>
250
+ </div>
251
+ </div>
252
+ </div>
253
+ </div>
254
+
255
+ <div class="settings-card" style="margin-bottom: 15px;">
256
+ <div class="setting-item">
257
+ <label>Automatización de Motor</label>
258
+ <div class="radio-switch">
259
+ <label>
260
+ <input type="radio" name="autoEngine" value="off" checked>
261
+ <span class="radio-btn">Desactivado</span>
262
+ </label>
263
+ <label>
264
+ <input type="radio" name="autoEngine" value="on">
265
+ <span class="radio-btn" style="color: #64ffda;">Activado</span>
266
+ </label>
267
+ </div>
268
+ </div>
269
+ <div class="setting-item" style="margin-top: 10px;">
270
+ <label>Motor de Descarga</label>
271
+ <div style="display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px;">
272
+ <label class="radio-switch">
273
+ <input type="radio" name="engineSetting" value="ytdlp" checked>
274
+ <span class="radio-btn">Por defecto (yt-dlp)</span>
275
+ </label>
276
+ <label class="radio-switch">
277
+ <input type="radio" name="engineSetting" value="aria2">
278
+ <span class="radio-btn">Acelerador (aria2)</span>
279
+ </label>
280
+ <label class="radio-switch" title="Recomendado contra errores 403 en streams HLS">
281
+ <input type="radio" name="engineSetting" value="nm3u8">
282
+ <span class="radio-btn" style="color: #ffb84d;">Extremo (N_m3u8DL)</span>
283
+ </label>
284
+ <label class="radio-switch" title="Descarga directa pura. Inmune a bloqueos 403 en enlaces .mp4 directos">
285
+ <input type="radio" name="engineSetting" value="native">
286
+ <span class="radio-btn" style="color: #64ffda;">Nativo (Directo)</span>
287
+ </label>
288
+ </div>
289
+
290
+ </div>
291
+ <div class="setting-item" id="threadSettingContainer" style="display: block;">
292
+ <label style="color: #a1a1a5; display: block; font-weight: 600; margin-bottom: 8px;">Descarga con múltiples hilos</label>
293
+ <div style="display: flex; flex-direction: column; gap: 8px; margin-top: 8px; background: #16171a; border: 1px solid #2f3036; padding: 16px 14px; border-radius: 8px;">
294
+ <div style="display: flex; align-items: center; justify-content: space-between;">
295
+ <span style="font-size: 13px; color: #e5e5e5; font-weight: 500;" id="threadCountLabel">Hilos: 4</span>
296
+ <input type="range" class="custom-slider" id="threadSlider" name="threadCount" min="1" max="36" value="4">
297
+ </div>
298
+ </div>
299
+ <p id="threadDescription" style="font-size: 11px; color:#8c8d91; margin: 10px 0 0 0; line-height: 1.4;"></p>
300
+ </div>
301
+ <div class="setting-item" id="concurrencySettingContainer" style="border-top: 1px solid #333; padding-top: 17px; margin-top: 5px;">
302
+ <label style="color: #a1a1a5; display: block; font-weight: 600; margin-bottom: 8px;">Descargas simultáneas máximas</label>
303
+ <div style="display: flex; flex-direction: column; gap: 8px; margin-top: 8px; background: #16171a; border: 1px solid #2f3036; padding: 16px 14px; border-radius: 8px;">
304
+ <div style="display: flex; align-items: center; justify-content: space-between;">
305
+ <span style="font-size: 13px; color: #e5e5e5; font-weight: 500;" id="concurrencyCountLabel">Descargas a la vez: 1</span>
306
+ <input type="range" class="custom-slider" id="concurrencySlider" name="maxConcurrentDownloads" min="1" max="50" value="1">
307
+ </div>
308
+ </div>
309
+ <p style="font-size: 11px; color:#8c8d91; margin: 10px 0 0 0; line-height: 1.4;">Controla cuántos videos se pueden descargar al mismo tiempo (de 1 a 50). Los videos adicionales se quedarán en la cola de espera.</p>
310
+ </div>
311
+ </div>
312
+
313
+ <div class="settings-card" style="margin-bottom: 15px;">
314
+ <div class="setting-item">
315
+ <label>Ruta de guardado (Host local)</label>
316
+ <div style="display: flex; flex-direction: column; gap: 8px; margin-top: 6px;">
317
+ <button class="action-btn secondary" id="selectFolderBtn" style="width: fit-content;">Seleccionar Carpeta...</button>
318
+ <div style="font-size: 12px; color: #4da6ff; word-break: break-all;" id="savePathDisplay">Ninguna seleccionada (Descargas)</div>
319
+ </div>
320
+ <p style="font-size: 11px; color:#6a6b70; margin: 6px 0 0 0;" id="savePathStatus">Si no seleccionas nada, se guardará en Descargas por defecto.</p>
321
+ </div>
322
+ </div>
323
+
324
+ <div class="settings-card" style="margin-bottom: 15px;">
325
+ <div class="setting-item">
326
+ <label>Usar cookies</label>
327
+ <div style="display: flex; gap: 10px; margin-top: 8px;">
328
+ <label class="radio-switch">
329
+ <input type="radio" name="cookiesSetting" value="none" checked>
330
+ <span class="radio-btn">Desactivado</span>
331
+ </label>
332
+ <label class="radio-switch">
333
+ <input type="radio" name="cookiesSetting" value="chrome">
334
+ <span class="radio-btn">Activado</span>
335
+ </label>
336
+ </div>
337
+ <p style="font-size: 11px; color:#6a6b70; margin: 6px 0 0 0;">Utiliza tu sesión del navegador de forma segura para permitirte bajar videos privados, de pago o con limitación de edad. <b>Aviso:</b> En el caso de YouTube, las cookies ya se extraen de forma silenciosa e invisible en segundo plano porque es necesario. Sin embargo, marcar deliberadamente esta opción para otros sitios a veces puede generar errores si detectan comportamiento automático. Úsalo si un video falla.</p>
338
+ </div>
339
+ </div>
340
+
341
+ <div class="settings-card" style="margin-bottom: 15px; border-left: 3px solid #ff0000; padding-left: 12px; background: rgba(255, 0, 0, 0.03);">
342
+ <h3 style="margin: 0 0 12px 0; color: #ff4d4d; font-size: 13px; font-weight: 500;">Exclusivo de YouTube</h3>
343
+
344
+ <div class="setting-item" style="margin-bottom: 12px;">
345
+ <label>Idioma de Audio Preferido (Doblajes)</label>
346
+ <div style="display: flex; gap: 10px; margin-top: 8px;">
347
+ <label class="radio-switch">
348
+ <input type="radio" name="ytAudioLang" value="es" checked>
349
+ <span class="radio-btn">Español</span>
350
+ </label>
351
+ <label class="radio-switch">
352
+ <input type="radio" name="ytAudioLang" value="orig">
353
+ <span class="radio-btn">Original</span>
354
+ </label>
355
+ </div>
356
+ <p style="font-size: 11px; color:#6a6b70; margin: 6px 0 0 0;">Si eliges Español y el video no lo tiene, bajará el idioma original automáticamente.</p>
357
+ </div>
358
+
359
+ <div class="setting-item">
360
+ <label>Subtítulos</label>
361
+ <div style="display: flex; gap: 10px; margin-top: 8px;">
362
+ <label class="radio-switch">
363
+ <input type="radio" name="ytSubs" value="on">
364
+ <span class="radio-btn">Incrustar (ES/EN)</span>
365
+ </label>
366
+ <label class="radio-switch">
367
+ <input type="radio" name="ytSubs" value="off" checked>
368
+ <span class="radio-btn">Desactivados</span>
369
+ </label>
370
+ </div>
371
+ <p style="font-size: 11px; color:#6a6b70; margin: 6px 0 0 0;">Incrusta los subtítulos dentro del video para encenderlos o apagarlos en tu reproductor.</p>
372
+ </div>
373
+ </div>
374
+
375
+ <div class="settings-card" style="margin-bottom: 15px;">
376
+ <div class="setting-item">
377
+ <label>Nombres en Descargas Masivas / Lotes</label>
378
+ <select id="popupBatchNamingSelect" style="width: 100%; margin-top: 8px; background: #26272b; color: #fff; border: 1px solid #3d3e42; border-radius: 6px; padding: 6px 10px; font-size: 12px; outline: none; cursor: pointer;">
379
+ <option value="original">Título Web Original</option>
380
+ <option value="lote">Lote 1, Lote 2, Lote 3...</option>
381
+ <option value="lista">Lista 1, Lista 2, Lista 3...</option>
382
+ <option value="custom">Personalizado...</option>
383
+ </select>
384
+ <div id="popupBatchCustomPrefixWrap" style="display: none; margin-top: 8px;">
385
+ <input type="text" id="popupBatchCustomPrefixInput" placeholder="Prefijo (ej. Capitulo)" style="width: 100%; background: #111216; color: #fff; border: 1px solid #3d3e42; border-radius: 6px; padding: 6px 10px; font-size: 12px; outline: none; box-sizing: border-box;">
386
+ </div>
387
+ <p style="font-size: 11px; color:#6a6b70; margin: 6px 0 0 0;">Define cómo se renombrarán automáticamente los archivos al descargar múltiples enlaces en lote o listas.</p>
388
+ </div>
389
+ </div>
390
+
391
+ <div class="settings-card" style="margin-bottom: 15px;">
392
+ <div class="setting-item">
393
+ <label>Modo Personalizado (Enlace Manual)</label>
394
+ <div style="display: flex; gap: 10px; margin-top: 8px;">
395
+ <label class="radio-switch">
396
+ <input type="radio" name="customModeSetting" value="on">
397
+ <span class="radio-btn">Activado</span>
398
+ </label>
399
+ <label class="radio-switch">
400
+ <input type="radio" name="customModeSetting" value="off" checked>
401
+ <span class="radio-btn">Desactivado</span>
402
+ </label>
403
+ </div>
404
+ <p style="font-size: 11px; color:#6a6b70; margin: 6px 0 0 0;">Muestra una tarjeta fija en el Detector para pegar cualquier enlace manualmente.</p>
405
+ </div>
406
+ </div>
407
+
408
+ <div class="settings-card" style="margin-bottom: 15px;">
409
+ <div class="setting-item">
410
+ <label>Rastreador de Streams (M3U8 / MP4)</label>
411
+ <div style="display: flex; gap: 10px; margin-top: 8px;">
412
+ <label class="radio-switch">
413
+ <input type="radio" name="snifferSetting" value="on" checked>
414
+ <span class="radio-btn">Activado</span>
415
+ </label>
416
+ <label class="radio-switch">
417
+ <input type="radio" name="snifferSetting" value="off">
418
+ <span class="radio-btn">Desactivado</span>
419
+ </label>
420
+ </div>
421
+ <p style="font-size: 11px; color:#6a6b70; margin: 6px 0 0 0;">Detecta automáticamente segmentos de video directos ocultos en el tráfico de red de las páginas que visitas.</p>
422
+ </div>
423
+ </div>
424
+
425
+ <div class="settings-card">
426
+ <div class="setting-item">
427
+ <label>Protocolo Backend</label>
428
+ <div class="input-fake" style="grid-column: 1/-1; margin-top: 5px; color: #4ade80;">Native Messaging API [Conectado]</div>
429
+ </div>
430
+ </div>
431
+ </div>
432
+
433
+ <!-- Tab: Acerca -->
434
+ <div id="panel-acerca" class="panel">
435
+ <h2 class="section-title">Acerca de</h2>
436
+ <div class="about-card">
437
+ <h3>Descargador de Videos</h3>
438
+ <p>Versión 1.0.0</p>
439
+ <p>Permite la extracción híbrida de videos mediante <strong>múltiples motores (yt-dlp, N_m3u8DL-RE, Aria2)</strong> con Native Messaging directamente al ordenador del usuario.</p>
440
+ </div>
441
+
442
+ <h3 style="margin-top: 20px; color: #fff; font-size: 13px; text-align: left; margin-bottom: 10px;">Consola de Procesos (Multi-Motor)</h3>
443
+ <div id="debugConsole" style="background: #111; color: #4da6ff; font-family: monospace; font-size: 9px; height: 180px; overflow-y: auto; padding: 8px; border-radius: 4px; border: 1px solid #2f3036; text-align: left; white-space: pre-wrap; word-break: break-all;">Esperando logs de descarga...</div>
444
+ </div>
445
+
446
+ </div>
447
+ <!-- Sniffer Status Footer -->
448
+ <div id="snifferStatusFooter" class="sniffer-footer">
449
+ <div class="footer-left">
450
+ <div class="status-dot"></div>
451
+ <span class="footer-text">Rastreador</span>
452
+ <button id="openToolsBtn" title="Abrir Caja de Herramientas" style="background: none; border: none; padding: 4px; cursor: pointer; color: #8c8d91; display: flex; align-items: center; justify-content: center; border-radius: 50%; margin-left: 6px; transition: all 0.2s;" onmouseover="this.style.color='#fff'; this.style.background='rgba(255,255,255,0.1)'" onmouseout="this.style.color='#8c8d91'; this.style.background='none'">
453
+ <svg viewBox="0 0 24 24" width="16" height="16"><path fill="currentColor" d="M22.7 19l-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4z"/></svg>
454
+ </button>
455
+ </div>
456
+ <div class="footer-right" style="display: flex; align-items: center; gap: 6px;">
457
+ <button id="forceDetectJavBtn" class="footer-btn footer-btn-jav hidden" title="Fuerza la detección y resolución de streams de reproductores Surrit en 123AV y MissAV">Detección JAV</button>
458
+ <button id="forceDetectBtn" class="footer-btn footer-btn-primary" title="Fuerza al motor a buscar listas M3U8 ocultas en la página actual">Detección M3U8</button>
459
+ <button id="forceDetectHtmlBtn" class="footer-btn footer-btn-secondary" title="Fuerza al motor a buscar videos MP4 estáticos en el código de la página">Búsqueda HTML</button>
460
+ <span id="snifferCountBadge" class="count-badge">0 enlaces detectados</span>
461
+ </div>
462
+ </div>
463
+
464
+ <script src="lib/hls.light.min.js"></script>
465
+ <script src="js/popup.js"></script>
466
+ </body>
467
+ </html>
extension/tools.html ADDED
@@ -0,0 +1,977 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="es">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>System Console - Herramientas Avanzadas</title>
6
+ <style>
7
+ :root {
8
+ --bg-color: #0b0c10;
9
+ --surface-color: #1a1b22;
10
+ --border-color: #2a2b36;
11
+ --primary-color: #4da6ff;
12
+ --primary-glow: rgba(77, 166, 255, 0.2);
13
+ --text-main: #e0e0e0;
14
+ --text-muted: #8c8d91;
15
+ --sidebar-width: 260px;
16
+ --header-height: 64px;
17
+ }
18
+
19
+ body {
20
+ font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
21
+ margin: 0;
22
+ padding: 0;
23
+ background-color: var(--bg-color);
24
+ color: var(--text-main);
25
+ min-height: 100vh;
26
+ display: flex;
27
+ flex-direction: column;
28
+ overflow-x: hidden;
29
+ }
30
+
31
+ /* --- Top Header --- */
32
+ .header {
33
+ height: var(--header-height);
34
+ background-color: rgba(26, 27, 34, 0.85);
35
+ backdrop-filter: blur(12px);
36
+ -webkit-backdrop-filter: blur(12px);
37
+ border-bottom: 1px solid var(--border-color);
38
+ display: flex;
39
+ align-items: center;
40
+ padding: 0 20px;
41
+ position: sticky;
42
+ top: 0;
43
+ z-index: 100;
44
+ box-shadow: 0 4px 20px rgba(0,0,0,0.4);
45
+ }
46
+
47
+ .menu-toggle {
48
+ background: none;
49
+ border: none;
50
+ color: var(--text-main);
51
+ cursor: pointer;
52
+ padding: 8px;
53
+ margin-right: 15px;
54
+ border-radius: 8px;
55
+ display: flex;
56
+ align-items: center;
57
+ justify-content: center;
58
+ transition: background 0.2s, color 0.2s;
59
+ }
60
+
61
+ .menu-toggle:hover {
62
+ background: rgba(255, 255, 255, 0.05);
63
+ color: var(--primary-color);
64
+ }
65
+
66
+ .header-brand {
67
+ display: flex;
68
+ align-items: center;
69
+ gap: 12px;
70
+ }
71
+
72
+ .header-brand svg {
73
+ color: var(--primary-color);
74
+ filter: drop-shadow(0 0 8px var(--primary-glow));
75
+ }
76
+
77
+ .header h1 {
78
+ margin: 0;
79
+ font-size: 18px;
80
+ font-weight: 600;
81
+ letter-spacing: 0.5px;
82
+ background: linear-gradient(90deg, #fff, #aab1c0);
83
+ -webkit-background-clip: text;
84
+ -webkit-text-fill-color: transparent;
85
+ }
86
+
87
+ /* --- Sidebar Menu --- */
88
+ .sidebar {
89
+ position: fixed;
90
+ top: var(--header-height);
91
+ left: 0;
92
+ bottom: 0;
93
+ width: var(--sidebar-width);
94
+ background-color: var(--surface-color);
95
+ border-right: 1px solid var(--border-color);
96
+ transform: translateX(-100%);
97
+ transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
98
+ z-index: 90;
99
+ display: flex;
100
+ flex-direction: column;
101
+ box-shadow: 4px 0 24px rgba(0,0,0,0.5);
102
+ }
103
+
104
+ .sidebar.active {
105
+ transform: translateX(0);
106
+ }
107
+
108
+ .nav-list {
109
+ list-style: none;
110
+ padding: 15px 10px;
111
+ margin: 0;
112
+ display: flex;
113
+ flex-direction: column;
114
+ gap: 6px;
115
+ }
116
+
117
+ .nav-item {
118
+ display: flex;
119
+ align-items: center;
120
+ gap: 12px;
121
+ padding: 12px 16px;
122
+ border-radius: 8px;
123
+ cursor: pointer;
124
+ color: var(--text-muted);
125
+ font-weight: 500;
126
+ font-size: 14px;
127
+ transition: all 0.2s ease;
128
+ }
129
+
130
+ .nav-item:hover {
131
+ background-color: rgba(255, 255, 255, 0.03);
132
+ color: #fff;
133
+ }
134
+
135
+ .nav-item.active {
136
+ background-color: rgba(77, 166, 255, 0.1);
137
+ color: var(--primary-color);
138
+ box-shadow: inset 3px 0 0 var(--primary-color);
139
+ }
140
+
141
+ .sidebar-overlay {
142
+ position: fixed;
143
+ top: var(--header-height);
144
+ left: 0;
145
+ right: 0;
146
+ bottom: 0;
147
+ background: rgba(0, 0, 0, 0.5);
148
+ backdrop-filter: blur(2px);
149
+ z-index: 80;
150
+ opacity: 0;
151
+ pointer-events: none;
152
+ transition: opacity 0.3s ease;
153
+ }
154
+
155
+ .sidebar-overlay.active {
156
+ opacity: 1;
157
+ pointer-events: auto;
158
+ }
159
+
160
+ /* --- Main Content Layout --- */
161
+ .main-wrapper {
162
+ flex: 1;
163
+ padding: 30px;
164
+ transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
165
+ }
166
+
167
+ @media (min-width: 900px) {
168
+ .sidebar {
169
+ transform: translateX(0);
170
+ box-shadow: none;
171
+ }
172
+ .sidebar-overlay {
173
+ display: none;
174
+ }
175
+ .main-wrapper {
176
+ margin-left: var(--sidebar-width);
177
+ }
178
+ .menu-toggle {
179
+ display: none;
180
+ }
181
+ }
182
+
183
+ .view-section {
184
+ display: none;
185
+ animation: fadeIn 0.4s ease;
186
+ max-width: 1000px;
187
+ margin: 0 auto;
188
+ }
189
+ .view-section.active {
190
+ display: block;
191
+ }
192
+
193
+ @keyframes fadeIn {
194
+ from { opacity: 0; transform: translateY(10px); }
195
+ to { opacity: 1; transform: translateY(0); }
196
+ }
197
+
198
+ .section-header {
199
+ margin-bottom: 30px;
200
+ }
201
+
202
+ .section-title {
203
+ font-size: 24px;
204
+ font-weight: 600;
205
+ color: #fff;
206
+ margin: 0 0 8px 0;
207
+ }
208
+
209
+ .section-desc {
210
+ color: var(--text-muted);
211
+ margin: 0;
212
+ font-size: 14px;
213
+ max-width: 600px;
214
+ line-height: 1.5;
215
+ }
216
+
217
+ /* --- Dashboard Grid & Cards --- */
218
+ .tools-grid {
219
+ display: grid;
220
+ grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
221
+ gap: 24px;
222
+ }
223
+
224
+ .tool-card {
225
+ background-color: var(--surface-color);
226
+ border: 1px solid var(--border-color);
227
+ border-radius: 12px;
228
+ padding: 24px;
229
+ transition: all 0.3s ease;
230
+ cursor: pointer;
231
+ display: flex;
232
+ flex-direction: column;
233
+ gap: 16px;
234
+ position: relative;
235
+ overflow: hidden;
236
+ }
237
+
238
+ .tool-card::before {
239
+ content: '';
240
+ position: absolute;
241
+ top: 0; left: 0; right: 0; height: 1px;
242
+ background: linear-gradient(90deg, transparent, rgba(77, 166, 255, 0.3), transparent);
243
+ opacity: 0;
244
+ transition: opacity 0.3s;
245
+ }
246
+
247
+ .tool-card:hover {
248
+ border-color: rgba(77, 166, 255, 0.4);
249
+ background-color: #1e1f26;
250
+ transform: translateY(-4px);
251
+ box-shadow: 0 12px 24px rgba(0,0,0,0.4);
252
+ }
253
+
254
+ .tool-card:hover::before {
255
+ opacity: 1;
256
+ }
257
+
258
+ .tool-icon {
259
+ width: 48px;
260
+ height: 48px;
261
+ background: rgba(77, 166, 255, 0.08);
262
+ color: var(--primary-color);
263
+ border-radius: 12px;
264
+ display: flex;
265
+ align-items: center;
266
+ justify-content: center;
267
+ border: 1px solid rgba(77, 166, 255, 0.15);
268
+ }
269
+
270
+ .tool-info h3 {
271
+ font-size: 16px;
272
+ font-weight: 600;
273
+ color: #fff;
274
+ margin: 0 0 6px 0;
275
+ }
276
+
277
+ .tool-info p {
278
+ font-size: 13px;
279
+ color: var(--text-muted);
280
+ margin: 0;
281
+ line-height: 1.5;
282
+ }
283
+
284
+ .empty-state {
285
+ display: flex;
286
+ flex-direction: column;
287
+ align-items: center;
288
+ justify-content: center;
289
+ padding: 80px 20px;
290
+ text-align: center;
291
+ background: rgba(26, 27, 34, 0.4);
292
+ border: 1px dashed var(--border-color);
293
+ border-radius: 16px;
294
+ margin-top: 20px;
295
+ }
296
+
297
+ .empty-state svg {
298
+ color: #3f4147;
299
+ margin-bottom: 20px;
300
+ }
301
+
302
+ .empty-state h3 {
303
+ color: var(--text-main);
304
+ margin: 0 0 8px 0;
305
+ }
306
+
307
+ .empty-state p {
308
+ color: var(--text-muted);
309
+ margin: 0;
310
+ max-width: 400px;
311
+ line-height: 1.5;
312
+ }
313
+
314
+ .btn-primary {
315
+ background: var(--primary-color);
316
+ color: #000;
317
+ border: none;
318
+ padding: 10px 20px;
319
+ border-radius: 6px;
320
+ font-weight: 600;
321
+ cursor: pointer;
322
+ transition: background 0.2s;
323
+ }
324
+ .btn-primary:hover {
325
+ background: #3395ff;
326
+ }
327
+
328
+ /* --- Settings Panel Styles --- */
329
+ .settings-grid {
330
+ display: grid;
331
+ grid-template-columns: 1fr;
332
+ gap: 20px;
333
+ }
334
+
335
+ @media (min-width: 1000px) {
336
+ .settings-grid {
337
+ grid-template-columns: 1fr 1fr;
338
+ }
339
+ }
340
+
341
+ .settings-card {
342
+ background-color: var(--surface-color);
343
+ border: 1px solid var(--border-color);
344
+ border-radius: 12px;
345
+ padding: 24px;
346
+ display: flex;
347
+ flex-direction: column;
348
+ gap: 20px;
349
+ }
350
+
351
+ .setting-item {
352
+ display: flex;
353
+ flex-direction: column;
354
+ gap: 10px;
355
+ }
356
+
357
+ .setting-item label.main-label {
358
+ font-size: 15px;
359
+ color: #fff;
360
+ font-weight: 600;
361
+ margin: 0;
362
+ }
363
+
364
+ .setting-item p.desc {
365
+ font-size: 13px;
366
+ color: var(--text-muted);
367
+ margin: 0;
368
+ line-height: 1.5;
369
+ }
370
+
371
+ .radio-switch {
372
+ display: flex;
373
+ background-color: #111216;
374
+ border: 1px solid var(--border-color);
375
+ border-radius: 8px;
376
+ overflow: hidden;
377
+ }
378
+
379
+ .radio-switch label {
380
+ flex: 1;
381
+ position: relative;
382
+ cursor: pointer;
383
+ }
384
+
385
+ .radio-switch input[type="radio"] {
386
+ position: absolute;
387
+ opacity: 0;
388
+ }
389
+
390
+ .radio-switch span {
391
+ display: block;
392
+ padding: 10px 12px;
393
+ text-align: center;
394
+ font-size: 13px;
395
+ color: var(--text-muted);
396
+ transition: all 0.2s;
397
+ border-right: 1px solid var(--border-color);
398
+ }
399
+ .radio-switch label:last-child span {
400
+ border-right: none;
401
+ }
402
+
403
+ .radio-switch input[type="radio"]:checked + span {
404
+ background-color: rgba(77, 166, 255, 0.1);
405
+ color: var(--primary-color);
406
+ font-weight: 600;
407
+ }
408
+
409
+ /* Custom Radio Cards (Format Pref) */
410
+ .radio-card-wrap {
411
+ display: flex;
412
+ flex-direction: column;
413
+ gap: 10px;
414
+ }
415
+ .hidden-radio { position: absolute; opacity: 0; width: 0; height: 0; }
416
+ .radio-card { display: flex; align-items: flex-start; gap: 12px; padding: 16px; background: #111216; border: 1px solid var(--border-color); border-radius: 8px; transition: all 0.2s; cursor: pointer; }
417
+ .radio-card:hover { border-color: #444; }
418
+ .hidden-radio:checked + .radio-card { border-color: var(--primary-color); background: rgba(77, 166, 255, 0.05); }
419
+ .card-radio-circle { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--text-muted); transition: all 0.2s; flex-shrink: 0; margin-top: 2px; position: relative; }
420
+ .hidden-radio:checked + .radio-card .card-radio-circle { border-color: var(--primary-color); }
421
+ .hidden-radio:checked + .radio-card .card-radio-circle::after { content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 8px; height: 8px; border-radius: 50%; background: var(--primary-color); }
422
+ .card-title-text { font-size: 14px; color: #fff; margin-bottom: 4px; font-weight: 600; }
423
+ .card-desc-text { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
424
+
425
+ /* Select Dropdowns */
426
+ .custom-select-wrapper { position: relative; width: 100%; display: block; }
427
+ .custom-select {
428
+ width: 100%; padding: 12px 36px 12px 14px; background: #111216; color: #eeeeee;
429
+ border: 1px solid var(--border-color); border-radius: 8px; cursor: pointer;
430
+ appearance: none; -moz-appearance: none; -webkit-appearance: none;
431
+ font-size: 13px; font-family: inherit; transition: all 0.2s; box-sizing: border-box;
432
+ }
433
+ .custom-select:hover { border-color: #444; }
434
+ .custom-select:focus { border-color: var(--primary-color); outline: none; }
435
+ .select-arrow { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-muted); pointer-events: none; }
436
+
437
+ /* Custom Slider */
438
+ .custom-slider {
439
+ -webkit-appearance: none; width: 100%; height: 6px; background: transparent; outline: none; cursor: pointer; margin: 10px 0;
440
+ }
441
+ .custom-slider::-webkit-slider-runnable-track { width: 100%; height: 6px; background: #2a2b30; border-radius: 3px; }
442
+ .custom-slider::-webkit-slider-thumb {
443
+ -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--text-muted);
444
+ cursor: pointer; margin-top: -5px; border: 2px solid var(--border-color); transition: background 0.2s, transform 0.1s;
445
+ }
446
+ .custom-slider:hover::-webkit-slider-thumb { background: #fff; }
447
+ .custom-slider:active::-webkit-slider-thumb { transform: scale(1.1); background: var(--primary-color); border-color: var(--primary-color); }
448
+
449
+ /* YouTube Exclusive Highlight */
450
+ .yt-card {
451
+ border-color: rgba(255, 77, 77, 0.3);
452
+ background: linear-gradient(180deg, rgba(255, 77, 77, 0.03) 0%, transparent 100%);
453
+ }
454
+ .yt-card h3 { color: #ff4d4d; font-size: 15px; margin: 0 0 10px 0; display: flex; align-items: center; gap: 8px; }
455
+
456
+ </style>
457
+ </head>
458
+ <body>
459
+
460
+ <!-- Top Header -->
461
+ <header class="header">
462
+ <button class="menu-toggle" id="menuToggleBtn">
463
+ <svg viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>
464
+ </button>
465
+
466
+ <div class="header-brand">
467
+ <svg viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M22.7 19l-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4z"/></svg>
468
+ <h1>System Console</h1>
469
+ </div>
470
+ </header>
471
+
472
+ <!-- Sidebar Overlay -->
473
+ <div class="sidebar-overlay" id="sidebarOverlay"></div>
474
+
475
+ <!-- Sidebar Navigation -->
476
+ <aside class="sidebar" id="sidebar">
477
+ <ul class="nav-list">
478
+ <li class="nav-item active" data-target="view-dashboard">
479
+ <svg viewBox="0 0 24 24" width="20" height="20"><path fill="currentColor" d="M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"/></svg>
480
+ Dashboard
481
+ </li>
482
+ <li class="nav-item" data-target="view-downloader">
483
+ <svg viewBox="0 0 24 24" width="20" height="20"><path fill="currentColor" d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/></svg>
484
+ Descargador
485
+ </li>
486
+ <li class="nav-item" data-target="view-playlist">
487
+ <svg viewBox="0 0 24 24" width="20" height="20"><path fill="currentColor" d="M4 10h12v2H4zm0-4h12v2H4zm0 8h8v2H4zm10 0v6l5-3z"/></svg>
488
+ Playlist YT
489
+ </li>
490
+ <li class="nav-item" data-target="view-console">
491
+ <svg viewBox="0 0 24 24" width="20" height="20"><path fill="currentColor" d="M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8.5 13H4v-2h7.5v2zm2-4.5L9 9l4.5-3.5L15 7l-3 2.5 3 2.5-1.5 1.5z"/></svg>
492
+ Consola
493
+ </li>
494
+ <li class="nav-item" data-target="view-active">
495
+ <svg viewBox="0 0 24 24" width="20" height="20"><path fill="currentColor" d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"/></svg>
496
+ Progreso
497
+ </li>
498
+ <li class="nav-item" data-target="view-settings">
499
+ <svg viewBox="0 0 24 24" width="20" height="20"><path fill="currentColor" d="M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.73 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.49-.12-.61l-2.01-1.58zm-7.14 2.66c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"/></svg>
500
+ Configuración
501
+ </li>
502
+ </ul>
503
+ </aside>
504
+
505
+ <!-- Main Content Area -->
506
+ <main class="main-wrapper">
507
+
508
+ <!-- View: Dashboard -->
509
+ <section id="view-dashboard" class="view-section active">
510
+ <div class="section-header">
511
+ <h2 class="section-title">Panel de Herramientas</h2>
512
+ <p class="section-desc">Selecciona una herramienta avanzada para interactuar con la red, extraer medios complejos o gestionar descargas en bloque.</p>
513
+ </div>
514
+
515
+ <div class="tools-grid">
516
+ <div class="tool-card" id="card-downloader">
517
+ <div class="tool-icon">
518
+ <svg viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/></svg>
519
+ </div>
520
+ <div class="tool-info">
521
+ <h3>Descargador de Enlaces</h3>
522
+ <p>Pega múltiples enlaces web para procesarlos masivamente con el motor de descarga.</p>
523
+ </div>
524
+ </div>
525
+
526
+ <div class="tool-card" id="card-playlist">
527
+ <div class="tool-icon">
528
+ <svg viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M4 10h12v2H4zm0-4h12v2H4zm0 8h8v2H4zm10 0v6l5-3z"/></svg>
529
+ </div>
530
+ <div class="tool-info">
531
+ <h3>Descargador de Playlists</h3>
532
+ <p>Extrae y descarga todos los videos de una lista de reproducción de YouTube.</p>
533
+ </div>
534
+ </div>
535
+
536
+ <div class="tool-card" id="card-console">
537
+ <div class="tool-icon">
538
+ <svg viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8.5 13H4v-2h7.5v2zm2-4.5L9 9l4.5-3.5L15 7l-3 2.5 3 2.5-1.5 1.5z"/></svg>
539
+ </div>
540
+ <div class="tool-info">
541
+ <h3>Consola de Sistema</h3>
542
+ <p>Visualiza en tiempo real los registros de descarga, progreso y errores del host.</p>
543
+ </div>
544
+ </div>
545
+
546
+ <div class="tool-card" id="card-active">
547
+ <div class="tool-icon">
548
+ <svg viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"/></svg>
549
+ </div>
550
+ <div class="tool-info">
551
+ <h3>Progreso</h3>
552
+ <p>Monitorea gráficamente el progreso de las tareas en curso.</p>
553
+ </div>
554
+ </div>
555
+
556
+ <div class="tool-card" id="card-settings">
557
+ <div class="tool-icon">
558
+ <svg viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.73 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.49-.12-.61l-2.01-1.58zm-7.14 2.66c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"/></svg>
559
+ </div>
560
+ <div class="tool-info">
561
+ <h3>Configuración Global</h3>
562
+ <p>Sincronizada con la extensión: Formatos, directorios, hilos y motor.</p>
563
+ </div>
564
+ </div>
565
+ </div>
566
+ </section>
567
+
568
+ <!-- View: Descargador -->
569
+ <section id="view-downloader" class="view-section">
570
+ <div class="section-header">
571
+ <h2 class="section-title">Descargador</h2>
572
+ <p class="section-desc">Pega aquí los enlaces que deseas descargar. Soporta múltiples URLs separadas por salto de línea.</p>
573
+ </div>
574
+
575
+ <div class="settings-card" style="gap: 15px;">
576
+ <div style="display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 5px;">
577
+ <label class="main-label" style="font-size: 16px; margin: 0;">Enlaces a procesar</label>
578
+ <div style="display: flex; align-items: center; gap: 8px;">
579
+ <span style="font-size: 12px; color: var(--text-muted);">Nombre en descargas masivas:</span>
580
+ <select id="batchNamingSelect" style="background: #111216; color: #fff; border: 1px solid var(--border-color); border-radius: 6px; padding: 6px 10px; font-size: 12px; outline: none; cursor: pointer;">
581
+ <option value="original">Título Web (Original)</option>
582
+ <option value="lote">Numeración Lote (Lote 1, Lote 2...)</option>
583
+ <option value="lista">Numeración Lista (Lista 1, Lista 2...)</option>
584
+ <option value="custom">Personalizado...</option>
585
+ </select>
586
+ <input type="text" id="batchCustomPrefixInput" placeholder="Prefijo (ej. Capitulo)" style="display: none; width: 140px; background: #111216; color: #fff; border: 1px solid var(--border-color); border-radius: 6px; padding: 5px 8px; font-size: 12px; outline: none;">
587
+ </div>
588
+ </div>
589
+ <textarea id="bulkUrlsInput" placeholder="https://ejemplo.com/video1&#10;https://ejemplo.com/video2&#10;..." style="width: 100%; height: 250px; background: #111216; color: #fff; border: 1px solid var(--border-color); border-radius: 8px; padding: 16px; font-family: monospace; font-size: 13px; resize: vertical; outline: none; box-sizing: border-box; transition: border-color 0.2s;" onfocus="this.style.borderColor='var(--primary-color)'" onblur="this.style.borderColor='var(--border-color)'"></textarea>
590
+
591
+ <div style="display: flex; gap: 12px; justify-content: flex-end; margin-top: 10px;">
592
+ <button class="btn-primary" style="background: #2a2b36; color: #fff; display: flex; align-items: center; gap: 8px;" onclick="document.getElementById('bulkUrlsInput').value = ''">
593
+ Limpiar
594
+ </button>
595
+ <button class="btn-primary" id="startBulkDownloadBtn" style="display: flex; align-items: center; gap: 8px;">
596
+ <svg viewBox="0 0 24 24" width="18" height="18"><path fill="currentColor" d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/></svg>
597
+ Iniciar Descarga
598
+ </button>
599
+ </div>
600
+ </div>
601
+ </section>
602
+
603
+ <!-- View: Playlist Downloader -->
604
+ <section id="view-playlist" class="view-section">
605
+ <div class="section-header">
606
+ <h2 class="section-title">Playlist de YouTube</h2>
607
+ <p class="section-desc">Pega el enlace de una Playlist de YouTube para obtener y descargar todos sus videos.</p>
608
+ </div>
609
+
610
+ <div class="settings-card" style="gap: 15px;">
611
+ <div style="display: flex; gap: 10px;">
612
+ <input type="text" id="playlistUrlInput" placeholder="https://www.youtube.com/playlist?list=..." style="flex: 1; background: #111216; color: #fff; border: 1px solid var(--border-color); border-radius: 8px; padding: 12px 16px; font-size: 14px; outline: none; transition: border-color 0.2s;" onfocus="this.style.borderColor='var(--primary-color)'" onblur="this.style.borderColor='var(--border-color)'">
613
+ <button class="btn-primary" id="fetchPlaylistBtn" style="white-space: nowrap; display: flex; align-items: center; gap: 8px;">
614
+ <svg viewBox="0 0 24 24" width="18" height="18"><path fill="currentColor" d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>
615
+ Analizar
616
+ </button>
617
+ </div>
618
+ <p id="playlistStatus" style="font-size: 13px; color: var(--text-muted); margin: 0;"></p>
619
+
620
+ <div id="playlistResultsContainer" style="display: none; flex-direction: column; gap: 15px; margin-top: 10px; border-top: 1px solid var(--border-color); padding-top: 15px;">
621
+ <div style="display: flex; justify-content: space-between; align-items: center;">
622
+ <span style="font-size: 14px; font-weight: 600; color: #fff;" id="playlistCountTitle">0 videos encontrados</span>
623
+ <div style="display: flex; gap: 10px;">
624
+ <button class="btn-primary" style="background: #2a2b36; color: #fff; padding: 6px 12px; font-size: 12px;" id="selectAllPlaylistBtn">Seleccionar Todos</button>
625
+ <button class="btn-primary" style="padding: 6px 12px; font-size: 12px;" id="downloadSelectedPlaylistBtn">Descargar Seleccionados</button>
626
+ </div>
627
+ </div>
628
+
629
+ <div id="playlistVideosList" style="display: flex; flex-direction: column; gap: 8px; max-height: 400px; overflow-y: auto; padding-right: 5px;">
630
+ <!-- Videos inject here -->
631
+ </div>
632
+ </div>
633
+ </div>
634
+ </section>
635
+
636
+ <!-- View: Activas -->
637
+ <section id="view-active" class="view-section">
638
+ <div class="section-header" style="display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px;">
639
+ <div>
640
+ <h2 class="section-title">Progreso de Descargas</h2>
641
+ <p class="section-desc">Aquí puedes monitorear el progreso gráfico de tus descargas en curso.</p>
642
+ </div>
643
+ <button class="btn-primary" id="emergencyStopBtn" style="background: #ff4d4d; color: #fff; display: flex; align-items: center; gap: 8px; font-weight: bold; border-radius: 8px; padding: 10px 16px; border: none; cursor: pointer; transition: all 0.2s; box-shadow: 0 4px 12px rgba(255, 77, 77, 0.3);" onmouseover="this.style.backgroundColor='#ff3333'; this.style.transform='scale(1.02)'" onmouseout="this.style.backgroundColor='#ff4d4d'; this.style.transform='scale(1)'">
644
+ <svg viewBox="0 0 24 24" width="18" height="18" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z"/></svg>
645
+ Parada de Emergencia
646
+ </button>
647
+ </div>
648
+
649
+ <!-- Activas / Progress Cards Wrapper -->
650
+ <div id="activeDownloadsWrapper" style="display: flex; flex-direction: column; gap: 10px; max-height: 70vh; overflow-y: auto; padding-right: 5px;">
651
+ <!-- Cards will be injected here -->
652
+ </div>
653
+
654
+ <template id="consoleVideoCardTemplate">
655
+ <div class="console-video-card" style="background: #1a1b22; border: 1px solid var(--border-color); border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 8px; transition: all 0.2s;">
656
+ <div style="display: flex; justify-content: space-between; align-items: center; gap: 10px;">
657
+ <div class="card-title" style="font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1;"></div>
658
+ <div class="card-status-text" style="font-size: 12px; color: var(--primary-color); white-space: nowrap; font-weight: 600;">0%</div>
659
+ </div>
660
+ <div style="width: 100%; height: 6px; background-color: #2a2b36; border-radius: 3px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);">
661
+ <div class="card-progress-bar" style="width: 0%; height: 100%; background-color: var(--primary-color); transition: width 0.3s ease;"></div>
662
+ </div>
663
+ <div class="card-msg" style="font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">Iniciando...</div>
664
+ </div>
665
+ </template>
666
+ </section>
667
+
668
+ <!-- View: Consola -->
669
+ <section id="view-console" class="view-section">
670
+ <div class="section-header">
671
+ <h2 class="section-title">Consola del Sistema</h2>
672
+ <p class="section-desc">Aquí verás en tiempo real todo el proceso de descarga de forma independiente.</p>
673
+ </div>
674
+
675
+ <div style="background: #0d0d12; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; height: 500px; max-height: 70vh;">
676
+ <div style="background: #15161c; padding: 10px 15px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center;">
677
+ <span style="font-size: 13px; font-family: monospace; color: #4da6ff;">host-bridge-terminal</span>
678
+ <div style="display: flex; gap: 8px;">
679
+ <button class="btn-primary" id="copyConsoleBtn" style="padding: 4px 10px; font-size: 11px; background: transparent; border: 1px solid var(--border-color); color: var(--text-muted);" title="Copiar Consola">Copiar</button>
680
+ <button class="btn-primary" id="clearConsoleBtn" style="padding: 4px 10px; font-size: 11px; background: transparent; border: 1px solid var(--border-color); color: var(--text-muted);" title="Limpiar Consola">Limpiar</button>
681
+ <button class="btn-primary" id="scrollBottomBtn" style="padding: 4px 10px; font-size: 11px; background: transparent; border: 1px solid var(--border-color); color: var(--text-muted);" title="Ir al final">↓</button>
682
+ </div>
683
+ </div>
684
+ <div id="toolConsole" style="flex: 1; padding: 15px; font-family: 'Consolas', monospace; font-size: 12px; color: #a1a1aa; overflow-y: auto; white-space: pre-wrap; word-break: break-all; line-height: 1.4;">
685
+ </div>
686
+ </div>
687
+
688
+ <!-- Apartado de Errores (Failed Downloads) -->
689
+ <div id="failedDownloadsContainer" style="margin-top: 20px; display: none; background: rgba(255, 77, 77, 0.04); border: 1px solid rgba(255, 77, 77, 0.2); border-radius: 8px; overflow: hidden; flex-direction: column;">
690
+ <div style="background: rgba(255, 77, 77, 0.08); padding: 12px 15px; border-bottom: 1px solid rgba(255, 77, 77, 0.15); display: flex; justify-content: space-between; align-items: center;">
691
+ <span style="font-size: 13px; font-weight: 600; color: #ff6b6b; display: flex; align-items: center; gap: 8px;">
692
+ <svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/></svg>
693
+ Enlaces que fallaron
694
+ </span>
695
+ <div style="display: flex; gap: 8px;">
696
+ <button class="btn-primary" id="copyAllFailedBtn" style="padding: 4px 10px; font-size: 11px; background: transparent; border: 1px solid rgba(77, 166, 255, 0.3); color: #4da6ff; cursor: pointer;" title="Copiar todas las URLs que fallaron">Copiar todas las URLs</button>
697
+ <button class="btn-primary" id="clearFailedBtn" style="padding: 4px 10px; font-size: 11px; background: transparent; border: 1px solid rgba(255, 77, 77, 0.3); color: #ff8a8a; cursor: pointer;" title="Limpiar Errores">Limpiar Errores</button>
698
+ </div>
699
+ </div>
700
+ <div id="failedDownloadsList" style="padding: 12px; display: flex; flex-direction: column; gap: 8px; max-height: 250px; overflow-y: auto;">
701
+ <!-- Errores dinámicos se insertan aquí -->
702
+ </div>
703
+ </div>
704
+ </section>
705
+
706
+ <!-- View: Settings (Full implementation) -->
707
+ <section id="view-settings" class="view-section">
708
+ <div class="section-header">
709
+ <h2 class="section-title">Configuración</h2>
710
+ <p class="section-desc">Gestiona el formato, motor de descarga y configuración del host en un solo lugar.</p>
711
+ </div>
712
+
713
+ <div class="settings-grid">
714
+ <!-- Col 1 -->
715
+ <div style="display:flex; flex-direction: column; gap: 20px;">
716
+
717
+ <div class="settings-card">
718
+ <div class="setting-item">
719
+ <label class="main-label">Formato de Descarga</label>
720
+ <div class="radio-switch">
721
+ <label><input type="radio" name="formatSetting" value="mp4" checked><span>Video</span></label>
722
+ <label><input type="radio" name="formatSetting" value="mp3"><span>Audio</span></label>
723
+ </div>
724
+ </div>
725
+
726
+ <div class="setting-item" id="qualitySettingContainer">
727
+ <label class="main-label">Calidad de Video</label>
728
+ <div class="radio-switch">
729
+ <label><input type="radio" name="qualitySetting" value="max" checked><span>Máxima</span></label>
730
+ <label><input type="radio" name="qualitySetting" value="min"><span>Mínima</span></label>
731
+ <label><input type="radio" name="qualitySetting" value="ask"><span>Preguntar</span></label>
732
+ <label title="Extrae resoluciones reales del servidor"><input type="radio" name="qualitySetting" value="detect"><span style="color: #ffb84d;">Detector</span></label>
733
+ </div>
734
+ <p class="desc">Al dar en "Preguntar" podrás elegir la calidad manual. Con "Detector", la app interrogará al servidor para extraer la lista real (Requiere configuración del Host).</p>
735
+ </div>
736
+
737
+ <div class="setting-item" id="videoPreferenceContainer" style="border-top: 1px solid var(--border-color); padding-top: 20px;">
738
+ <label class="main-label" style="color: var(--primary-color);">Preferencia de formato de vídeo</label>
739
+ <div class="radio-card-wrap">
740
+ <label>
741
+ <input type="radio" name="videoFormatPref" value="legado" checked class="hidden-radio">
742
+ <div class="radio-card">
743
+ <div class="card-radio-circle"></div>
744
+ <div>
745
+ <div class="card-title-text">Legado</div>
746
+ <div class="card-desc-text">Prefieres los formatos MP4(H.264) para compartir con otras aplicaciones</div>
747
+ </div>
748
+ </div>
749
+ </label>
750
+ <label>
751
+ <input type="radio" name="videoFormatPref" value="calidad" class="hidden-radio">
752
+ <div class="radio-card">
753
+ <div class="card-radio-circle"></div>
754
+ <div>
755
+ <div class="card-title-text">Calidad</div>
756
+ <div class="card-desc-text">Prefieres los formatos AV1, VP9 o H.265 para verlos en las aplicaciones compatibles</div>
757
+ </div>
758
+ </div>
759
+ </label>
760
+ </div>
761
+ </div>
762
+
763
+ <div class="setting-item" id="audioSettingsContainer" style="border-top: 1px solid var(--border-color); padding-top: 20px;">
764
+ <label class="main-label" style="color: var(--primary-color);" id="audioSettingsLabel">Ajustes del Audio del Video</label>
765
+
766
+ <div style="margin-top: 10px;">
767
+ <label style="font-size: 13px; color: var(--text-muted); margin-bottom: 6px; display: block;">Formato de audio preferido</label>
768
+ <div class="custom-select-wrapper">
769
+ <select id="audioFormatSelect" class="custom-select">
770
+ <option value="best">Sin especificar (por defecto)</option>
771
+ <option value="opus">OPUS</option>
772
+ <option value="m4a">M4A</option>
773
+ </select>
774
+ <svg class="select-arrow" viewBox="0 0 24 24"><path fill="currentColor" d="M7 10l5 5 5-5z"/></svg>
775
+ </div>
776
+ </div>
777
+
778
+ <div style="margin-top: 10px;">
779
+ <label style="font-size: 13px; color: var(--text-muted); margin-bottom: 6px; display: block;">Calidad del audio</label>
780
+ <div class="custom-select-wrapper">
781
+ <select id="audioQualitySelect" class="custom-select">
782
+ <option value="0">Ilimitado</option>
783
+ <option value="192">192 Kbps</option>
784
+ <option value="128">128 Kbps</option>
785
+ <option value="64">64 Kbps</option>
786
+ <option value="32">32 Kbps</option>
787
+ </select>
788
+ <svg class="select-arrow" viewBox="0 0 24 24"><path fill="currentColor" d="M7 10l5 5 5-5z"/></svg>
789
+ </div>
790
+ </div>
791
+
792
+ <div style="margin-top: 10px;">
793
+ <label style="font-size: 13px; color: var(--text-muted); margin-bottom: 6px; display: block;">Convertir formato de audio</label>
794
+ <div class="custom-select-wrapper">
795
+ <select id="audioConvertSelect" class="custom-select">
796
+ <option value="mp3" selected>Convertir a mp3</option>
797
+ <option value="none">No convertir</option>
798
+ <option value="m4a">Convertir a m4a</option>
799
+ </select>
800
+ <svg class="select-arrow" viewBox="0 0 24 24"><path fill="currentColor" d="M7 10l5 5 5-5z"/></svg>
801
+ </div>
802
+ </div>
803
+ </div>
804
+ </div>
805
+
806
+ <div class="settings-card">
807
+ <div class="setting-item">
808
+ <label class="main-label">Usar cookies</label>
809
+ <div class="radio-switch">
810
+ <label><input type="radio" name="cookiesSetting" value="none" checked><span>Desactivado</span></label>
811
+ <label><input type="radio" name="cookiesSetting" value="chrome"><span>Activado</span></label>
812
+ </div>
813
+ <p class="desc">Utiliza tu sesión del navegador de forma segura para permitirte bajar videos privados, de pago o con limitación de edad. <b>Aviso:</b> En el caso de YouTube, las cookies ya se extraen de forma silenciosa e invisible en segundo plano porque es necesario. Sin embargo, marcar deliberadamente esta opción para otros sitios a veces puede generar errores si detectan comportamiento automático. Úsalo si un video falla.</p>
814
+ </div>
815
+ </div>
816
+
817
+ </div>
818
+
819
+ <!-- Col 2 -->
820
+ <div style="display:flex; flex-direction: column; gap: 20px;">
821
+
822
+ <div class="settings-card">
823
+ <div class="setting-item">
824
+ <label class="main-label">Automatización de Motor</label>
825
+ <div class="radio-switch">
826
+ <label><input type="radio" name="autoEngine" value="off" checked><span>Desactivado</span></label>
827
+ <label><input type="radio" name="autoEngine" value="on"><span style="color: #64ffda;">Activado</span></label>
828
+ </div>
829
+ <p class="desc">Detecta y selecciona automáticamente cuál es el mejor motor de descarga para cada enlace (p.ej. Motor Extremo para streaming, Nativo para descargas MP4, yt-dlp para redes sociales). <br><i style="color: #ffb84d;">Al activarlo, se ignora la selección manual de abajo.</i></p>
830
+ </div>
831
+ </div>
832
+ <div class="settings-card">
833
+ <div class="setting-item">
834
+ <label class="main-label">Motor de Descarga</label>
835
+ <div class="radio-switch" style="flex-wrap: wrap;">
836
+ <label><input type="radio" name="engineSetting" value="ytdlp" checked><span>Por defecto (yt-dlp)</span></label>
837
+ <label><input type="radio" name="engineSetting" value="aria2"><span>Acelerador (aria2)</span></label>
838
+ <label title="Recomendado contra errores 403"><input type="radio" name="engineSetting" value="nm3u8"><span style="color: #ffb84d;">Extremo (N_m3u8DL)</span></label>
839
+ <label title="Descarga directa más rápida para MP4"><input type="radio" name="engineSetting" value="native"><span style="color: #64ffda;">Nativo (Directo)</span></label>
840
+ </div>
841
+
842
+ </div>
843
+
844
+ <div class="setting-item" id="threadSettingContainer">
845
+ <label class="main-label">Descarga con múltiples hilos</label>
846
+ <div style="background: #111216; padding: 16px; border-radius: 8px; border: 1px solid var(--border-color); margin-top: 5px;">
847
+ <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;">
848
+ <span id="threadCountLabel" style="font-size: 14px; font-weight: 600;">Hilos: 8</span>
849
+ </div>
850
+ <input type="range" class="custom-slider" id="threadSlider" min="1" max="36" value="8">
851
+ </div>
852
+ <p id="threadDescription" class="desc"></p>
853
+ </div>
854
+
855
+ <div class="setting-item" id="concurrencySettingContainer" style="border-top: 1px solid var(--border-color); padding-top: 15px; margin-top: 10px;">
856
+ <label class="main-label">Descargas simultáneas máximas</label>
857
+ <div style="background: #111216; padding: 16px; border-radius: 8px; border: 1px solid var(--border-color); margin-top: 5px;">
858
+ <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;">
859
+ <span id="concurrencyCountLabel" style="font-size: 14px; font-weight: 600;">Descargas a la vez: 1</span>
860
+ </div>
861
+ <input type="range" class="custom-slider" id="concurrencySlider" min="1" max="50" value="1">
862
+ </div>
863
+ <p class="desc">Controla cuántos videos se pueden descargar al mismo tiempo (de 1 a 50). Los videos adicionales se quedarán en la cola de espera.</p>
864
+ </div>
865
+ </div>
866
+
867
+ <div class="settings-card">
868
+ <div class="setting-item">
869
+ <label class="main-label">Nombres de Archivo para Descargas Masivas</label>
870
+ <p class="desc" style="margin-bottom: 10px;">Define cómo se nombrarán los archivos al procesar múltiples enlaces en lote o listas.</p>
871
+ <div class="custom-select-wrapper">
872
+ <select id="configBatchNamingSelect" class="custom-select">
873
+ <option value="original">Título Web Original (ej: Nombre_Video.mp4)</option>
874
+ <option value="lote">Numeración Lote (Lote 1, Lote 2, Lote 3...)</option>
875
+ <option value="lista">Numeración Lista (Lista 1, Lista 2, Lista 3...)</option>
876
+ <option value="custom">Personalizado (ej: MiVideo 1, MiVideo 2...)</option>
877
+ </select>
878
+ </div>
879
+ <div id="configBatchCustomPrefixWrap" style="display: none; margin-top: 10px;">
880
+ <label style="font-size: 12px; color: var(--text-muted); display: block; margin-bottom: 4px;">Prefijo Personalizado</label>
881
+ <input type="text" id="configBatchCustomPrefixInput" placeholder="ej. Capitulo o Video" style="width: 100%; background: #111216; color: #fff; border: 1px solid var(--border-color); border-radius: 6px; padding: 8px 12px; font-size: 13px; outline: none; box-sizing: border-box;">
882
+ </div>
883
+ </div>
884
+ </div>
885
+
886
+ <div class="settings-card">
887
+ <div class="setting-item">
888
+ <label class="main-label">Ruta de guardado (Host local)</label>
889
+ <div style="display: flex; align-items: center; gap: 10px; margin-top: 5px;">
890
+ <button class="btn-primary" id="selectFolderBtn">Seleccionar Carpeta...</button>
891
+ </div>
892
+ <p id="savePathDisplay" style="color: var(--primary-color); font-size: 13px; font-family: monospace; word-break: break-all; margin: 5px 0 0 0;">Ninguna seleccionada (Descargas)</p>
893
+ <p class="desc">Si no seleccionas nada, se guardará en Descargas por defecto.</p>
894
+ </div>
895
+ </div>
896
+
897
+ <div class="settings-card yt-card">
898
+ <h3 class="main-label"><svg viewBox="0 0 24 24" width="18" height="18"><path fill="currentColor" d="M19.615 3.184c-3.604-.246-11.631-.245-15.23 0-3.897.266-4.356 2.62-4.385 8.816.029 6.185.484 8.549 4.385 8.816 3.6.245 11.626.246 15.23 0 3.897-.266 4.356-2.62 4.385-8.816-.029-6.185-.484-8.549-4.385-8.816zm-10.615 12.816v-8l8 3.993-8 4.007z"/></svg>Exclusivo de YouTube</h3>
899
+
900
+ <div class="setting-item">
901
+ <label class="main-label" style="font-size: 14px;">Idioma de Audio Preferido (Doblajes)</label>
902
+ <div class="radio-switch">
903
+ <label><input type="radio" name="ytAudioLang" value="es" checked><span>Español</span></label>
904
+ <label><input type="radio" name="ytAudioLang" value="orig"><span>Original</span></label>
905
+ </div>
906
+ <p class="desc">Si eliges Español y el video no lo tiene, bajará el idioma original automáticamente.</p>
907
+ </div>
908
+
909
+ <div class="setting-item" style="margin-top: 10px;">
910
+ <label class="main-label" style="font-size: 14px;">Subtítulos</label>
911
+ <div class="radio-switch">
912
+ <label><input type="radio" name="ytSubs" value="on"><span>Incrustar (ES/EN)</span></label>
913
+ <label><input type="radio" name="ytSubs" value="off" checked><span>Desactivados</span></label>
914
+ </div>
915
+ <p class="desc">Incrusta los subtítulos dentro del video para encenderlos o apagarlos en tu reproductor.</p>
916
+ </div>
917
+ </div>
918
+
919
+ <div class="settings-card">
920
+ <div class="setting-item">
921
+ <label class="main-label">Nombres en Descargas Masivas / Lotes</label>
922
+ <p class="desc" style="margin-bottom: 10px;">Define cómo se nombrarán los archivos al procesar múltiples enlaces en lote o listas.</p>
923
+ <div class="custom-select-wrapper">
924
+ <select id="configBatchNamingSelect2" class="custom-select">
925
+ <option value="original">Título Web Original (ej: Nombre_Video.mp4)</option>
926
+ <option value="lote">Numeración Lote (Lote 1, Lote 2, Lote 3...)</option>
927
+ <option value="lista">Numeración Lista (Lista 1, Lista 2, Lista 3...)</option>
928
+ <option value="custom">Personalizado (ej: MiVideo 1, MiVideo 2...)</option>
929
+ </select>
930
+ </div>
931
+ <div id="configBatchCustomPrefixWrap2" style="display: none; margin-top: 10px;">
932
+ <label style="font-size: 12px; color: var(--text-muted); display: block; margin-bottom: 4px;">Prefijo Personalizado</label>
933
+ <input type="text" id="configBatchCustomPrefixInput2" placeholder="ej. Capitulo o Video" style="width: 100%; background: #111216; color: #fff; border: 1px solid var(--border-color); border-radius: 6px; padding: 8px 12px; font-size: 13px; outline: none; box-sizing: border-box;">
934
+ </div>
935
+ </div>
936
+ </div>
937
+
938
+ <div class="settings-card">
939
+ <div class="setting-item">
940
+ <div style="display: flex; justify-content: space-between; align-items: center;">
941
+ <label class="main-label">Modo Personalizado (Enlace Manual)</label>
942
+ <div class="radio-switch" style="width: auto;">
943
+ <label><input type="radio" name="customModeSetting" value="on"><span>Activado</span></label>
944
+ <label><input type="radio" name="customModeSetting" value="off" checked><span>Desactivado</span></label>
945
+ </div>
946
+ </div>
947
+ <p class="desc">Muestra una tarjeta fija en el Detector para pegar cualquier enlace manualmente.</p>
948
+ </div>
949
+
950
+ <div class="setting-item" style="margin-top: 10px;">
951
+ <div style="display: flex; justify-content: space-between; align-items: center;">
952
+ <label class="main-label">Rastreador de Streams (M3U8 / MP4)</label>
953
+ <div class="radio-switch" style="width: auto;">
954
+ <label><input type="radio" name="snifferSetting" value="on" checked><span>Activado</span></label>
955
+ <label><input type="radio" name="snifferSetting" value="off"><span>Desactivado</span></label>
956
+ </div>
957
+ </div>
958
+ <p class="desc">Detecta automáticamente segmentos de video directos ocultos en el tráfico de red de las páginas que visitas.</p>
959
+ </div>
960
+
961
+ <div class="setting-item" style="margin-top: 15px; border-top: 1px solid var(--border-color); padding-top: 15px;">
962
+ <label class="main-label">Protocolo Backend</label>
963
+ <div style="font-family: monospace; color: #4ade80; background: rgba(74, 222, 128, 0.1); padding: 8px 12px; border-radius: 6px; display: inline-block;">
964
+ Native Messaging API [Conectado]
965
+ </div>
966
+ </div>
967
+ </div>
968
+
969
+ </div>
970
+ </div>
971
+ </section>
972
+
973
+ </main>
974
+
975
+ <script src="js/tools.js"></script>
976
+ </body>
977
+ </html>
host/bin/Logs/2026-05-13_16-11-31-992.log ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/13
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/13 16:11:31
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/3d44455b-cad8-4c93-a700-e80a2e23d4cc/playlist.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name Video --auto-select --thread-count 24
5
+
6
+ 16:11:31.995 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 16:11:32.011 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 16:11:32.014 INFO : Loading URL: https://surrit.com/3d44455b-cad8-4c93-a700-e80a2e23d4cc/playlist.m3u8
9
+ 16:11:32.661 WARN : Response status code does not indicate success: 403 (Forbidden). (1/10)
10
+ 16:11:34.176 INFO : Loading URL: https://surrit.com/3d44455b-cad8-4c93-a700-e80a2e23d4cc/playlist.m3u8
11
+ 16:11:34.734 WARN : Response status code does not indicate success: 403 (Forbidden). (2/10)
12
+ 16:11:36.247 INFO : Loading URL: https://surrit.com/3d44455b-cad8-4c93-a700-e80a2e23d4cc/playlist.m3u8
13
+ 16:11:36.885 WARN : Response status code does not indicate success: 403 (Forbidden). (3/10)
14
+ 16:11:38.397 INFO : Loading URL: https://surrit.com/3d44455b-cad8-4c93-a700-e80a2e23d4cc/playlist.m3u8
15
+ 16:11:39.035 WARN : Response status code does not indicate success: 403 (Forbidden). (4/10)
16
+ 16:11:40.543 INFO : Loading URL: https://surrit.com/3d44455b-cad8-4c93-a700-e80a2e23d4cc/playlist.m3u8
17
+ 16:11:41.085 WARN : Response status code does not indicate success: 403 (Forbidden). (5/10)
18
+ 16:11:42.596 INFO : Loading URL: https://surrit.com/3d44455b-cad8-4c93-a700-e80a2e23d4cc/playlist.m3u8
19
+ 16:11:43.131 WARN : Response status code does not indicate success: 403 (Forbidden). (6/10)
20
+ 16:11:44.643 INFO : Loading URL: https://surrit.com/3d44455b-cad8-4c93-a700-e80a2e23d4cc/playlist.m3u8
21
+ 16:11:45.181 WARN : Response status code does not indicate success: 403 (Forbidden). (7/10)
22
+ 16:11:46.697 INFO : Loading URL: https://surrit.com/3d44455b-cad8-4c93-a700-e80a2e23d4cc/playlist.m3u8
23
+ 16:11:47.227 WARN : Response status code does not indicate success: 403 (Forbidden). (8/10)
24
+ 16:11:48.741 INFO : Loading URL: https://surrit.com/3d44455b-cad8-4c93-a700-e80a2e23d4cc/playlist.m3u8
25
+ 16:11:49.379 WARN : Response status code does not indicate success: 403 (Forbidden). (9/10)
26
+ 16:11:50.886 INFO : Loading URL: https://surrit.com/3d44455b-cad8-4c93-a700-e80a2e23d4cc/playlist.m3u8
27
+ 16:11:51.426 WARN : Response status code does not indicate success: 403 (Forbidden). (10/10)
host/bin/Logs/2026-05-13_16-12-06-711.log ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/13
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/13 16:12:06
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/3d44455b-cad8-4c93-a700-e80a2e23d4cc/playlist.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name Video --auto-select --thread-count 24
5
+
6
+ 16:12:06.712 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 16:12:06.714 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 16:12:06.716 INFO : Loading URL: https://surrit.com/3d44455b-cad8-4c93-a700-e80a2e23d4cc/playlist.m3u8
9
+ 16:12:07.324 WARN : Response status code does not indicate success: 403 (Forbidden). (1/10)
10
+ 16:12:08.826 INFO : Loading URL: https://surrit.com/3d44455b-cad8-4c93-a700-e80a2e23d4cc/playlist.m3u8
11
+ 16:12:09.449 WARN : Response status code does not indicate success: 403 (Forbidden). (2/10)
12
+ 16:12:10.953 INFO : Loading URL: https://surrit.com/3d44455b-cad8-4c93-a700-e80a2e23d4cc/playlist.m3u8
13
+ 16:12:11.439 WARN : Response status code does not indicate success: 403 (Forbidden). (3/10)
14
+ 16:12:12.943 INFO : Loading URL: https://surrit.com/3d44455b-cad8-4c93-a700-e80a2e23d4cc/playlist.m3u8
15
+ 16:12:13.545 WARN : Response status code does not indicate success: 403 (Forbidden). (4/10)
16
+ 16:12:15.054 INFO : Loading URL: https://surrit.com/3d44455b-cad8-4c93-a700-e80a2e23d4cc/playlist.m3u8
17
+ 16:12:15.593 WARN : Response status code does not indicate success: 403 (Forbidden). (5/10)
18
+ 16:12:17.095 INFO : Loading URL: https://surrit.com/3d44455b-cad8-4c93-a700-e80a2e23d4cc/playlist.m3u8
19
+ 16:12:17.689 WARN : Response status code does not indicate success: 403 (Forbidden). (6/10)
20
+ 16:12:19.205 INFO : Loading URL: https://surrit.com/3d44455b-cad8-4c93-a700-e80a2e23d4cc/playlist.m3u8
21
+ 16:12:19.792 WARN : Response status code does not indicate success: 403 (Forbidden). (7/10)
22
+ 16:12:21.303 INFO : Loading URL: https://surrit.com/3d44455b-cad8-4c93-a700-e80a2e23d4cc/playlist.m3u8
23
+ 16:12:21.942 WARN : Response status code does not indicate success: 403 (Forbidden). (8/10)
24
+ 16:12:23.454 INFO : Loading URL: https://surrit.com/3d44455b-cad8-4c93-a700-e80a2e23d4cc/playlist.m3u8
25
+ 16:12:24.092 WARN : Response status code does not indicate success: 403 (Forbidden). (9/10)
26
+ 16:12:25.598 INFO : Loading URL: https://surrit.com/3d44455b-cad8-4c93-a700-e80a2e23d4cc/playlist.m3u8
27
+ 16:12:26.140 WARN : Response status code does not indicate success: 403 (Forbidden). (10/10)
host/bin/Logs/2026-05-13_16-15-17-719.log ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/13
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/13 16:15:17
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/d0ada7d2-5da3-4cf9-a221-6a1ae2d2adb3/1080p/video.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name "Video (1)" --auto-select --thread-count 24 -H "Referer: https://missav.ws/dm26/en/nsfs-288-uncensored-leak" -H "Origin: https://missav.ws"
5
+
6
+ 16:15:17.720 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 16:15:17.722 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 16:15:17.723 EXTRA: User-Defined Header => referer: https://missav.ws/dm26/en/nsfs-288-uncensored-leak
9
+ 16:15:17.723 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 16:15:17.724 INFO : Loading URL: https://surrit.com/d0ada7d2-5da3-4cf9-a221-6a1ae2d2adb3/1080p/video.m3u8
11
+ 16:15:18.331 INFO : Content Matched: HTTP Live Streaming
12
+ 16:15:18.333 INFO : Parsing streams...
13
+ 16:15:18.375 WARN : Writing meta json
14
+ 16:15:18.399 INFO : Extracted, there are 1 streams, with 1 basic streams, 0 audio streams, 0 subtitle streams
15
+ 16:15:18.402 INFO : Vid Kbps | 1716 Segments | ~01h54m20s
16
+ 16:15:18.431 INFO : Selected streams:
17
+ 16:15:18.438 INFO : Vid Kbps | 1716 Segments | ~01h54m20s
18
+ 16:15:18.449 WARN : Writing meta json
19
+ 16:15:18.465 INFO : Save Name: Video (1)
20
+ 16:15:18.474 INFO : Start downloading...Vid Kbps
21
+ 16:15:19.120 WARN : Reading media info...
22
+ 16:15:19.234 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1920x1080, 30 fps
23
+ 16:15:19.235 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 241 kb/s
24
+ 16:16:20.865 INFO : ffmpeg merging...
25
+ 16:16:54.571 INFO : Done
host/bin/Logs/2026-05-13_16-19-59-939.log ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/13
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/13 16:19:59
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/3d44455b-cad8-4c93-a700-e80a2e23d4cc/playlist.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name Video --auto-select --thread-count 24 -H "Referer: https://missav.ws/dm65/en/nsfs-288" -H "Origin: https://missav.ws"
5
+
6
+ 16:19:59.941 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 16:19:59.944 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 16:19:59.947 EXTRA: User-Defined Header => referer: https://missav.ws/dm65/en/nsfs-288
9
+ 16:19:59.949 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 16:19:59.950 INFO : Loading URL: https://surrit.com/3d44455b-cad8-4c93-a700-e80a2e23d4cc/playlist.m3u8
11
+ 16:20:00.589 INFO : Content Matched: HTTP Live Streaming
12
+ 16:20:00.591 INFO : Parsing streams...
13
+ 16:20:00.593 WARN : Master List detected, try parse all streams
14
+ 16:20:00.604 WARN : Writing meta json
15
+ 16:20:00.610 INFO : Extracted, there are 3 streams, with 3 basic streams, 0 audio streams, 0 subtitle streams
16
+ 16:20:00.612 INFO : Vid 1280x720 | 4706 Kbps | avc1.64001f,mp4a.40.2
17
+ 16:20:00.615 INFO : Vid 854x480 | 2448 Kbps | avc1.64001e,mp4a.40.2
18
+ 16:20:00.618 INFO : Vid 640x360 | 1416 Kbps | avc1.64001e,mp4a.40.2
19
+ 16:20:00.621 INFO : Parsing streams...
20
+ 16:20:00.861 INFO : Selected streams:
21
+ 16:20:00.863 INFO : Vid 1280x720 | 4706 Kbps | avc1.64001f,mp4a.40.2 | 1716 Segments | ~01h54m21s
22
+ 16:20:00.866 WARN : Writing meta json
23
+ 16:20:00.876 INFO : Save Name: Video
24
+ 16:20:00.885 INFO : Start downloading...Vid 1280x720 | 4706 Kbps | avc1.64001f,mp4a.40.2
25
+ 16:20:01.501 WARN : Reading media info...
26
+ 16:20:01.585 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1280x720, 24 fps
27
+ 16:20:01.588 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 260 kb/s
28
+ 16:20:32.073 INFO : ffmpeg merging...
29
+ 16:20:49.744 INFO : Done
host/bin/Logs/2026-05-13_16-21-15-805.log ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/13
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/13 16:21:15
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/11daba12-db1e-4747-bb4a-ccc87bf1c5cb/1080p/video.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name Video --auto-select --thread-count 24 -H "Referer: https://missav.ws/en/nact-120-uncensored-leak" -H "Origin: https://missav.ws"
5
+
6
+ 16:21:15.806 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 16:21:15.809 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 16:21:15.809 EXTRA: User-Defined Header => referer: https://missav.ws/en/nact-120-uncensored-leak
9
+ 16:21:15.810 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 16:21:15.810 INFO : Loading URL: https://surrit.com/11daba12-db1e-4747-bb4a-ccc87bf1c5cb/1080p/video.m3u8
11
+ 16:21:16.429 INFO : Content Matched: HTTP Live Streaming
12
+ 16:21:16.433 INFO : Parsing streams...
13
+ 16:21:16.507 WARN : Writing meta json
14
+ 16:21:16.541 INFO : Extracted, there are 1 streams, with 1 basic streams, 0 audio streams, 0 subtitle streams
15
+ 16:21:16.543 INFO : Vid Kbps | 1838 Segments | ~02h02m31s
16
+ 16:21:16.551 INFO : Selected streams:
17
+ 16:21:16.552 INFO : Vid Kbps | 1838 Segments | ~02h02m31s
18
+ 16:21:16.553 WARN : Writing meta json
19
+ 16:21:16.562 INFO : Save Name: Video
20
+ 16:21:16.568 INFO : Start downloading...Vid Kbps
21
+ 16:21:17.625 WARN : Reading media info...
22
+ 16:21:17.781 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1920x1080, 30 fps
23
+ 16:21:17.783 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 235 kb/s
24
+ 16:22:51.768 INFO : ffmpeg merging...
25
+ 16:22:51.772 WARN : Segments more than 1800, start partial merge...
26
+ 16:24:04.170 INFO : Done
host/bin/Logs/2026-05-13_16-26-24-059.log ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/13
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/13 16:26:24
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/11daba12-db1e-4747-bb4a-ccc87bf1c5cb/1080p/video.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name Video --auto-select --thread-count 24 -H "Referer: https://missav.ws/en/nact-120-uncensored-leak" -H "Origin: https://missav.ws"
5
+
6
+ 16:26:24.060 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 16:26:24.065 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 16:26:24.066 EXTRA: User-Defined Header => referer: https://missav.ws/en/nact-120-uncensored-leak
9
+ 16:26:24.066 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 16:26:24.067 INFO : Loading URL: https://surrit.com/11daba12-db1e-4747-bb4a-ccc87bf1c5cb/1080p/video.m3u8
11
+ 16:26:24.682 INFO : Content Matched: HTTP Live Streaming
12
+ 16:26:24.685 INFO : Parsing streams...
13
+ 16:26:24.727 WARN : Writing meta json
14
+ 16:26:24.737 INFO : Extracted, there are 1 streams, with 1 basic streams, 0 audio streams, 0 subtitle streams
15
+ 16:26:24.751 INFO : Vid Kbps | 1838 Segments | ~02h02m31s
16
+ 16:26:24.757 INFO : Selected streams:
17
+ 16:26:24.758 INFO : Vid Kbps | 1838 Segments | ~02h02m31s
18
+ 16:26:24.758 WARN : Writing meta json
19
+ 16:26:24.766 INFO : Save Name: Video
20
+ 16:26:24.769 INFO : Start downloading...Vid Kbps
21
+ 16:26:25.725 WARN : Reading media info...
22
+ 16:26:25.872 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1920x1080, 30 fps
23
+ 16:26:25.875 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 235 kb/s
24
+ 16:27:59.350 INFO : ffmpeg merging...
25
+ 16:27:59.353 WARN : Segments more than 1800, start partial merge...
26
+ 16:29:07.555 INFO : Done
host/bin/Logs/2026-05-13_16-35-18-976.log ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/13
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/13 16:35:18
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/98be7114-8546-4afb-aa53-110555c82b50/playlist.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name "NACT-120 Wife Sold Sold at a black market auction to p (1)" --auto-select --thread-count 24 -H "Referer: https://missav.ws/en/nact-120" -H "Origin: https://missav.ws"
5
+
6
+ 16:35:18.977 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 16:35:18.983 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 16:35:18.984 EXTRA: User-Defined Header => referer: https://missav.ws/en/nact-120
9
+ 16:35:18.986 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 16:35:18.987 INFO : Loading URL: https://surrit.com/98be7114-8546-4afb-aa53-110555c82b50/playlist.m3u8
11
+ 16:35:19.610 INFO : Content Matched: HTTP Live Streaming
12
+ 16:35:19.612 INFO : Parsing streams...
13
+ 16:35:19.615 WARN : Master List detected, try parse all streams
14
+ 16:35:19.629 WARN : Writing meta json
15
+ 16:35:19.642 INFO : Extracted, there are 4 streams, with 4 basic streams, 0 audio streams, 0 subtitle streams
16
+ 16:35:19.650 INFO : Vid 1920x1080 | 8246 Kbps | avc1.640028,mp4a.40.2
17
+ 16:35:19.655 INFO : Vid 1280x720 | 4737 Kbps | avc1.64001f,mp4a.40.2
18
+ 16:35:19.659 INFO : Vid 854x480 | 2446 Kbps | avc1.64001f,mp4a.40.2
19
+ 16:35:19.662 INFO : Vid 640x360 | 1418 Kbps | avc1.64001e,mp4a.40.2
20
+ 16:35:19.669 INFO : Parsing streams...
21
+ 16:35:19.902 INFO : Selected streams:
22
+ 16:35:19.904 INFO : Vid 1920x1080 | 8246 Kbps | avc1.640028,mp4a.40.2 | 1838 Segments | ~02h02m31s
23
+ 16:35:19.906 WARN : Writing meta json
24
+ 16:35:19.924 INFO : Save Name: NACT-120 Wife Sold Sold at a black market auction to p (1)
25
+ 16:35:19.929 INFO : Start downloading...Vid 1920x1080 | 8246 Kbps | avc1.640028,mp4a.40.2
26
+ 16:35:20.872 WARN : Reading media info...
27
+ 16:35:22.978 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1920x1080, 29.97 fps
28
+ 16:35:22.980 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 235 kb/s
29
+ 16:36:52.877 INFO : ffmpeg merging...
30
+ 16:36:52.878 WARN : Segments more than 1800, start partial merge...
31
+ 16:38:09.143 INFO : Done
host/bin/Logs/2026-05-13_16-45-51-176.log ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/13
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/13 16:45:51
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://www.youtube.com/watch?v=Sr7sQvfXwl0&list=RDSr7sQvfXwl0&start_radio=1 --save-dir C:\Users\Gonzalo\Downloads --save-name "INVENCIBLE RAP - Omni Man vs Invencible El Deber de un Padre MegaR - YouTube" --auto-select --thread-count 24 -H "Referer: https://www.youtube.com/watch?v=Sr7sQvfXwl0&list=RDSr7sQvfXwl0&start_radio=1" -H "Origin: https://www.youtube.com"
5
+
6
+ 16:45:51.177 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 16:45:51.180 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 16:45:51.180 EXTRA: User-Defined Header => referer: https://www.youtube.com/watch?v=Sr7sQvfXwl0&list=RDSr7sQvfXwl0&start_radio=1
9
+ 16:45:51.181 EXTRA: User-Defined Header => origin: https://www.youtube.com
10
+ 16:45:51.181 INFO : Loading URL: https://www.youtube.com/watch?v=Sr7sQvfXwl0&list=RDSr7sQvfXwl0&start_radio=1
host/bin/Logs/2026-05-13_22-10-09-044.log ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/13
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/13 22:10:09
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/11daba12-db1e-4747-bb4a-ccc87bf1c5cb/playlist.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name "NACT-120 Wife Sold Sold at a black market auction to sin censura (2)" --auto-select --thread-count 8 -H "Referer: https://missav.ws/en/nact-120-uncensored-leak" -H "Origin: https://missav.ws"
5
+
6
+ 22:10:09.046 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 22:10:09.048 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 22:10:09.049 EXTRA: User-Defined Header => referer: https://missav.ws/en/nact-120-uncensored-leak
9
+ 22:10:09.049 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 22:10:09.050 INFO : Loading URL: https://surrit.com/11daba12-db1e-4747-bb4a-ccc87bf1c5cb/playlist.m3u8
11
+ 22:10:09.662 INFO : Content Matched: HTTP Live Streaming
12
+ 22:10:09.663 INFO : Parsing streams...
13
+ 22:10:09.663 WARN : Master List detected, try parse all streams
14
+ 22:10:09.668 WARN : Writing meta json
15
+ 22:10:09.678 INFO : Extracted, there are 4 streams, with 4 basic streams, 0 audio streams, 0 subtitle streams
16
+ 22:10:09.680 INFO : Vid 1920x1080 | 8243 Kbps | avc1.640028,mp4a.40.2
17
+ 22:10:09.681 INFO : Vid 1280x720 | 4734 Kbps | avc1.64001f,mp4a.40.2
18
+ 22:10:09.682 INFO : Vid 854x480 | 2445 Kbps | avc1.64001f,mp4a.40.2
19
+ 22:10:09.683 INFO : Vid 640x360 | 1418 Kbps | avc1.64001e,mp4a.40.2
20
+ 22:10:09.684 INFO : Parsing streams...
21
+ 22:10:09.868 INFO : Selected streams:
22
+ 22:10:09.869 INFO : Vid 1920x1080 | 8243 Kbps | avc1.640028,mp4a.40.2 | 1838 Segments | ~02h02m31s
23
+ 22:10:09.873 WARN : Writing meta json
24
+ 22:10:09.880 INFO : Save Name: NACT-120 Wife Sold Sold at a black market auction to sin censura (2)
25
+ 22:10:09.882 INFO : Start downloading...Vid 1920x1080 | 8243 Kbps | avc1.640028,mp4a.40.2
26
+ 22:10:10.865 WARN : Reading media info...
27
+ 22:10:11.130 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1920x1080, 30 fps
28
+ 22:10:11.131 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 235 kb/s
29
+ 22:12:02.331 INFO : ffmpeg merging...
30
+ 22:12:02.338 WARN : Segments more than 1800, start partial merge...
31
+ 22:13:32.612 INFO : Done
host/bin/Logs/2026-05-13_22-13-35-259.log ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/13
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/13 22:13:35
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/ce0d8ae5-c65b-474f-96a6-55d99383bd7e/1080p/video.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name "HOWS-018 How to Academy A Textbook AV That Will [Defin" --auto-select --thread-count 8 -H "Referer: https://missav.ws/en/hows-018" -H "Origin: https://missav.ws"
5
+
6
+ 22:13:35.260 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 22:13:35.359 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 22:13:35.360 EXTRA: User-Defined Header => referer: https://missav.ws/en/hows-018
9
+ 22:13:35.362 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 22:13:35.363 INFO : Loading URL: https://surrit.com/ce0d8ae5-c65b-474f-96a6-55d99383bd7e/1080p/video.m3u8
11
+ 22:13:35.977 INFO : Content Matched: HTTP Live Streaming
12
+ 22:13:35.978 INFO : Parsing streams...
13
+ 22:13:36.204 WARN : Writing meta json
14
+ 22:13:36.298 INFO : Extracted, there are 1 streams, with 1 basic streams, 0 audio streams, 0 subtitle streams
15
+ 22:13:36.304 INFO : Vid Kbps | 3608 Segments | ~04h00m28s
16
+ 22:13:36.320 INFO : Selected streams:
17
+ 22:13:36.322 INFO : Vid Kbps | 3608 Segments | ~04h00m28s
18
+ 22:13:36.323 WARN : Writing meta json
19
+ 22:13:36.406 INFO : Save Name: HOWS-018 How to Academy A Textbook AV That Will [Defin
20
+ 22:13:36.408 INFO : Start downloading...Vid Kbps
21
+ 22:13:37.311 WARN : Reading media info...
22
+ 22:13:37.417 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1920x1080, 29.97 fps
23
+ 22:13:37.420 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 99 kb/s
24
+ 22:18:49.064 INFO : ffmpeg merging...
25
+ 22:18:49.076 WARN : Segments more than 1800, start partial merge...
26
+ 22:21:11.663 INFO : Done
host/bin/Logs/2026-05-13_22-19-44-712.log ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/13
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/13 22:19:44
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/11daba12-db1e-4747-bb4a-ccc87bf1c5cb/playlist.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name "NACT-120 Wife Sold Sold at a black market auction to p" --auto-select --thread-count 8 --tmp-dir "C:\Users\Gonzalo\Downloads\NACT-120 Wife Sold Sold at a black market auction to p_tmp" -H "Referer: https://missav.ws/en/nact-120-uncensored-leak" -H "Origin: https://missav.ws"
5
+
6
+ 22:19:44.712 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 22:19:44.714 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 22:19:44.714 EXTRA: User-Defined Header => referer: https://missav.ws/en/nact-120-uncensored-leak
9
+ 22:19:44.715 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 22:19:44.715 INFO : Loading URL: https://surrit.com/11daba12-db1e-4747-bb4a-ccc87bf1c5cb/playlist.m3u8
11
+ 22:19:45.330 INFO : Content Matched: HTTP Live Streaming
12
+ 22:19:45.331 INFO : Parsing streams...
13
+ 22:19:45.331 WARN : Master List detected, try parse all streams
14
+ 22:19:45.336 WARN : Writing meta json
15
+ 22:19:45.338 INFO : Extracted, there are 4 streams, with 4 basic streams, 0 audio streams, 0 subtitle streams
16
+ 22:19:45.339 INFO : Vid 1920x1080 | 8243 Kbps | avc1.640028,mp4a.40.2
17
+ 22:19:45.341 INFO : Vid 1280x720 | 4734 Kbps | avc1.64001f,mp4a.40.2
18
+ 22:19:45.342 INFO : Vid 854x480 | 2445 Kbps | avc1.64001f,mp4a.40.2
19
+ 22:19:45.343 INFO : Vid 640x360 | 1418 Kbps | avc1.64001e,mp4a.40.2
20
+ 22:19:45.343 INFO : Parsing streams...
21
+ 22:19:45.510 INFO : Selected streams:
22
+ 22:19:45.511 INFO : Vid 1920x1080 | 8243 Kbps | avc1.640028,mp4a.40.2 | 1838 Segments | ~02h02m31s
23
+ 22:19:45.511 WARN : Writing meta json
24
+ 22:19:45.515 INFO : Save Name: NACT-120 Wife Sold Sold at a black market auction to p
25
+ 22:19:45.526 INFO : Start downloading...Vid 1920x1080 | 8243 Kbps | avc1.640028,mp4a.40.2
26
+ 22:19:46.502 WARN : Reading media info...
27
+ 22:19:46.913 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1920x1080, 30 fps
28
+ 22:19:46.914 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 235 kb/s
29
+ 22:21:15.609 INFO : ffmpeg merging...
30
+ 22:21:15.621 WARN : Segments more than 1800, start partial merge...
31
+ 22:22:35.192 INFO : Done
host/bin/Logs/2026-05-13_22-23-06-266.log ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/13
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/13 22:23:06
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/ce0d8ae5-c65b-474f-96a6-55d99383bd7e/playlist.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name "HOWS-018 How to Academy A Textbook AV That Will [Defin" --auto-select --thread-count 8 --tmp-dir "C:\Users\Gonzalo\Downloads\HOWS-018 How to Academy A Textbook AV That Will [Defin_tmp" -H "Referer: https://missav.ws/en/hows-018" -H "Origin: https://missav.ws"
5
+
6
+ 22:23:06.267 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 22:23:06.268 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 22:23:06.269 EXTRA: User-Defined Header => referer: https://missav.ws/en/hows-018
9
+ 22:23:06.270 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 22:23:06.270 INFO : Loading URL: https://surrit.com/ce0d8ae5-c65b-474f-96a6-55d99383bd7e/playlist.m3u8
11
+ 22:23:06.910 INFO : Content Matched: HTTP Live Streaming
12
+ 22:23:06.913 INFO : Parsing streams...
13
+ 22:23:06.915 WARN : Master List detected, try parse all streams
14
+ 22:23:06.928 WARN : Writing meta json
15
+ 22:23:06.933 INFO : Extracted, there are 4 streams, with 4 basic streams, 0 audio streams, 0 subtitle streams
16
+ 22:23:06.935 INFO : Vid 1920x1080 | 8115 Kbps | avc1.640028,mp4a.40.2
17
+ 22:23:06.937 INFO : Vid 1280x720 | 4606 Kbps | avc1.64001f,mp4a.40.2
18
+ 22:23:06.939 INFO : Vid 854x480 | 2514 Kbps | avc1.64001f,mp4a.40.2
19
+ 22:23:06.942 INFO : Vid 640x360 | 1416 Kbps | avc1.64001e,mp4a.40.2
20
+ 22:23:06.944 INFO : Parsing streams...
21
+ 22:23:07.157 INFO : Selected streams:
22
+ 22:23:07.160 INFO : Vid 1920x1080 | 8115 Kbps | avc1.640028,mp4a.40.2 | 3608 Segments | ~04h00m28s
23
+ 22:23:07.162 WARN : Writing meta json
24
+ 22:23:07.177 INFO : Save Name: HOWS-018 How to Academy A Textbook AV That Will [Defin
25
+ 22:23:07.186 INFO : Start downloading...Vid 1920x1080 | 8115 Kbps | avc1.640028,mp4a.40.2
26
+ 22:23:08.084 WARN : Reading media info...
27
+ 22:23:08.162 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1920x1080, 29.97 fps
28
+ 22:23:08.163 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 99 kb/s
29
+ 22:25:26.206 INFO : ffmpeg merging...
30
+ 22:25:26.210 WARN : Segments more than 1800, start partial merge...
31
+ 22:27:42.469 INFO : Done
host/bin/Logs/2026-05-13_22-29-19-967.log ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/13
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/13 22:29:19
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/playlist.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name HOWS-018 --auto-select --thread-count 8 --tmp-dir C:\Users\Gonzalo\Downloads\HOWS-018_tmp -H "Referer: https://missav.ws/en/hows-018-uncensored-leak" -H "Origin: https://missav.ws"
5
+
6
+ 22:29:19.968 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 22:29:19.971 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 22:29:19.971 EXTRA: User-Defined Header => referer: https://missav.ws/en/hows-018-uncensored-leak
9
+ 22:29:19.972 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 22:29:19.972 INFO : Loading URL: https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/playlist.m3u8
11
+ 22:29:20.590 INFO : Content Matched: HTTP Live Streaming
12
+ 22:29:20.593 INFO : Parsing streams...
13
+ 22:29:20.595 WARN : Master List detected, try parse all streams
14
+ 22:29:20.605 WARN : Writing meta json
15
+ 22:29:20.610 INFO : Extracted, there are 4 streams, with 4 basic streams, 0 audio streams, 0 subtitle streams
16
+ 22:29:20.612 INFO : Vid 1920x1080 | 8239 Kbps | avc1.640028,mp4a.40.2
17
+ 22:29:20.615 INFO : Vid 1280x720 | 4730 Kbps | avc1.64001f,mp4a.40.2
18
+ 22:29:20.617 INFO : Vid 854x480 | 2440 Kbps | avc1.64001f,mp4a.40.2
19
+ 22:29:20.620 INFO : Vid 640x360 | 1414 Kbps | avc1.64001e,mp4a.40.2
20
+ 22:29:20.623 INFO : Parsing streams...
21
+ 22:29:20.961 INFO : Selected streams:
22
+ 22:29:20.963 INFO : Vid 1920x1080 | 8239 Kbps | avc1.640028,mp4a.40.2 | 3608 Segments | ~04h00m28s
23
+ 22:29:20.966 WARN : Writing meta json
24
+ 22:29:20.990 INFO : Save Name: HOWS-018
25
+ 22:29:20.996 INFO : Start downloading...Vid 1920x1080 | 8239 Kbps | avc1.640028,mp4a.40.2
26
+ 22:29:21.820 WARN : Reading media info...
27
+ 22:29:22.051 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1920x1080, 30 fps
28
+ 22:29:22.052 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 176 kb/s
29
+ 22:30:35.117 EXTRA: Ah oh!
30
+ RetryCount => 3
31
+ Exception => The process cannot access the file 'C:\Users\Gonzalo\Downloads\HOWS-018_tmp\HOWS-018\0__avc1.640028,mp4a.40.2_8239904_\1773.ts.tmp' because it is being used by another process.
32
+ Url => https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/1080p/video1773.jpeg
33
+ 22:30:35.120 EXTRA: Ah oh!
34
+ RetryCount => 3
35
+ Exception => The process cannot access the file 'C:\Users\Gonzalo\Downloads\HOWS-018_tmp\HOWS-018\0__avc1.640028,mp4a.40.2_8239904_\1769.ts.tmp' because it is being used by another process.
36
+ Url => https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/1080p/video1769.jpeg
37
+ 22:32:13.477 INFO : ffmpeg merging...
38
+ 22:32:13.481 WARN : Segments more than 1800, start partial merge...
39
+ 22:34:24.713 INFO : Done
host/bin/Logs/2026-05-13_22-29-50-572.log ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/13
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/13 22:29:50
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/playlist.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name HOWS-018 --auto-select --thread-count 16 --tmp-dir C:\Users\Gonzalo\Downloads\HOWS-018_tmp -H "Referer: https://missav.ws/en/hows-018-uncensored-leak" -H "Origin: https://missav.ws"
5
+
6
+ 22:29:50.573 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 22:29:50.575 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 22:29:50.575 EXTRA: User-Defined Header => referer: https://missav.ws/en/hows-018-uncensored-leak
9
+ 22:29:50.576 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 22:29:50.577 INFO : Loading URL: https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/playlist.m3u8
11
+ 22:29:51.195 INFO : Content Matched: HTTP Live Streaming
12
+ 22:29:51.197 INFO : Parsing streams...
13
+ 22:29:51.199 WARN : Master List detected, try parse all streams
14
+ 22:29:51.207 WARN : Writing meta json
15
+ 22:29:51.209 INFO : Extracted, there are 4 streams, with 4 basic streams, 0 audio streams, 0 subtitle streams
16
+ 22:29:51.210 INFO : Vid 1920x1080 | 8239 Kbps | avc1.640028,mp4a.40.2
17
+ 22:29:51.212 INFO : Vid 1280x720 | 4730 Kbps | avc1.64001f,mp4a.40.2
18
+ 22:29:51.213 INFO : Vid 854x480 | 2440 Kbps | avc1.64001f,mp4a.40.2
19
+ 22:29:51.216 INFO : Vid 640x360 | 1414 Kbps | avc1.64001e,mp4a.40.2
20
+ 22:29:51.217 INFO : Parsing streams...
21
+ 22:29:51.445 INFO : Selected streams:
22
+ 22:29:51.448 INFO : Vid 1920x1080 | 8239 Kbps | avc1.640028,mp4a.40.2 | 3608 Segments | ~04h00m28s
23
+ 22:29:51.451 WARN : Writing meta json
24
+ 22:29:51.453 INFO : Save Name: HOWS-018
25
+ 22:29:51.456 INFO : Start downloading...Vid 1920x1080 | 8239 Kbps | avc1.640028,mp4a.40.2
26
+ 22:29:51.462 WARN : Reading media info...
27
+ 22:29:51.600 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1920x1080, 30 fps
28
+ 22:29:51.601 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 176 kb/s
29
+ 22:29:51.804 EXTRA: Ah oh!
30
+ RetryCount => 3
31
+ Exception => The process cannot access the file 'C:\Users\Gonzalo\Downloads\HOWS-018_tmp\HOWS-018\0__avc1.640028,mp4a.40.2_8239904_\0721.ts.tmp' because it is being used by another process.
32
+ Url => https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/1080p/video721.jpeg
33
+ 22:29:52.095 EXTRA: Ah oh!
34
+ RetryCount => 3
35
+ Exception => The process cannot access the file 'C:\Users\Gonzalo\Downloads\HOWS-018_tmp\HOWS-018\0__avc1.640028,mp4a.40.2_8239904_\0741.ts.tmp' because it is being used by another process.
36
+ Url => https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/1080p/video741.jpeg
37
+ 22:29:52.099 EXTRA: Ah oh!
38
+ RetryCount => 3
39
+ Exception => The process cannot access the file 'C:\Users\Gonzalo\Downloads\HOWS-018_tmp\HOWS-018\0__avc1.640028,mp4a.40.2_8239904_\0748.ts.tmp' because it is being used by another process.
40
+ Url => https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/1080p/video748.jpeg
41
+ 22:29:52.194 EXTRA: Ah oh!
42
+ RetryCount => 3
43
+ Exception => The process cannot access the file 'C:\Users\Gonzalo\Downloads\HOWS-018_tmp\HOWS-018\0__avc1.640028,mp4a.40.2_8239904_\0747.ts.tmp' because it is being used by another process.
44
+ Url => https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/1080p/video747.jpeg
45
+ 22:29:52.218 EXTRA: Ah oh!
46
+ RetryCount => 3
47
+ Exception => The process cannot access the file 'C:\Users\Gonzalo\Downloads\HOWS-018_tmp\HOWS-018\0__avc1.640028,mp4a.40.2_8239904_\0727.ts.tmp' because it is being used by another process.
48
+ Url => https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/1080p/video727.jpeg
host/bin/Logs/2026-05-13_22-30-33-239.log ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/13
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/13 22:30:33
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/playlist.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name HOWS-018 --auto-select --thread-count 8 --tmp-dir C:\Users\Gonzalo\Downloads\HOWS-018_tmp -H "Referer: https://missav.ws/en/hows-018-uncensored-leak" -H "Origin: https://missav.ws"
5
+
6
+ 22:30:33.240 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 22:30:33.243 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 22:30:33.244 EXTRA: User-Defined Header => referer: https://missav.ws/en/hows-018-uncensored-leak
9
+ 22:30:33.245 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 22:30:33.245 INFO : Loading URL: https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/playlist.m3u8
11
+ 22:30:34.055 INFO : Content Matched: HTTP Live Streaming
12
+ 22:30:34.057 INFO : Parsing streams...
13
+ 22:30:34.060 WARN : Master List detected, try parse all streams
14
+ 22:30:34.069 WARN : Writing meta json
15
+ 22:30:34.071 INFO : Extracted, there are 4 streams, with 4 basic streams, 0 audio streams, 0 subtitle streams
16
+ 22:30:34.074 INFO : Vid 1920x1080 | 8239 Kbps | avc1.640028,mp4a.40.2
17
+ 22:30:34.076 INFO : Vid 1280x720 | 4730 Kbps | avc1.64001f,mp4a.40.2
18
+ 22:30:34.079 INFO : Vid 854x480 | 2440 Kbps | avc1.64001f,mp4a.40.2
19
+ 22:30:34.082 INFO : Vid 640x360 | 1414 Kbps | avc1.64001e,mp4a.40.2
20
+ 22:30:34.084 INFO : Parsing streams...
21
+ 22:30:34.308 INFO : Selected streams:
22
+ 22:30:34.310 INFO : Vid 1920x1080 | 8239 Kbps | avc1.640028,mp4a.40.2 | 3608 Segments | ~04h00m28s
23
+ 22:30:34.311 WARN : Writing meta json
24
+ 22:30:34.312 INFO : Save Name: HOWS-018
25
+ 22:30:34.314 INFO : Start downloading...Vid 1920x1080 | 8239 Kbps | avc1.640028,mp4a.40.2
26
+ 22:30:34.318 WARN : Reading media info...
27
+ 22:30:34.398 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1920x1080, 30 fps
28
+ 22:30:34.399 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 176 kb/s
29
+ 22:30:34.677 EXTRA: Ah oh!
30
+ RetryCount => 3
31
+ Exception => The process cannot access the file 'C:\Users\Gonzalo\Downloads\HOWS-018_tmp\HOWS-018\0__avc1.640028,mp4a.40.2_8239904_\1757.ts.tmp' because it is being used by another process.
32
+ Url => https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/1080p/video1757.jpeg
host/bin/Logs/2026-05-13_22-31-08-579.log ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/13
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/13 22:31:08
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/playlist.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name HOWS-018 --auto-select --thread-count 1 --tmp-dir C:\Users\Gonzalo\Downloads\HOWS-018_tmp -H "Referer: https://surrit.com/" -H "Origin: https://surrit.com"
5
+
6
+ 22:31:08.580 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 22:31:08.582 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 22:31:08.584 EXTRA: User-Defined Header => referer: https://surrit.com/
9
+ 22:31:08.585 EXTRA: User-Defined Header => origin: https://surrit.com
10
+ 22:31:08.585 INFO : Loading URL: https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/playlist.m3u8
11
+ 22:31:09.229 WARN : Response status code does not indicate success: 403 (Forbidden). (1/10)
12
+ 22:31:10.744 INFO : Loading URL: https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/playlist.m3u8
13
+ 22:31:11.236 WARN : Response status code does not indicate success: 403 (Forbidden). (2/10)
14
+ 22:31:12.738 INFO : Loading URL: https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/playlist.m3u8
15
+ 22:31:13.225 WARN : Response status code does not indicate success: 403 (Forbidden). (3/10)
16
+ 22:31:14.729 INFO : Loading URL: https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/playlist.m3u8
17
+ 22:31:15.204 WARN : Response status code does not indicate success: 403 (Forbidden). (4/10)
18
+ 22:31:16.713 INFO : Loading URL: https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/playlist.m3u8
19
+ 22:31:17.218 WARN : Response status code does not indicate success: 403 (Forbidden). (5/10)
20
+ 22:31:18.723 INFO : Loading URL: https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/playlist.m3u8
21
+ 22:31:19.185 WARN : Response status code does not indicate success: 403 (Forbidden). (6/10)
22
+ 22:31:20.696 INFO : Loading URL: https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/playlist.m3u8
23
+ 22:31:21.142 WARN : Response status code does not indicate success: 403 (Forbidden). (7/10)
24
+ 22:31:22.675 INFO : Loading URL: https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/playlist.m3u8
25
+ 22:31:23.141 WARN : Response status code does not indicate success: 403 (Forbidden). (8/10)
26
+ 22:31:24.646 INFO : Loading URL: https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/playlist.m3u8
27
+ 22:31:25.076 WARN : Response status code does not indicate success: 403 (Forbidden). (9/10)
28
+ 22:31:26.583 INFO : Loading URL: https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/playlist.m3u8
29
+ 22:31:27.014 WARN : Response status code does not indicate success: 403 (Forbidden). (10/10)
host/bin/Logs/2026-05-13_22-32-54-429.log ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/13
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/13 22:32:54
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/playlist.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name "HOWS-018 How to Academy A Textbook AV That Will [Defin (2)" --auto-select --thread-count 8 --tmp-dir "C:\Users\Gonzalo\Downloads\HOWS-018 How to Academy A Textbook AV That Will [Defin (2)_tmp" -H "Referer: https://missav.ws/en/hows-018-uncensored-leak" -H "Origin: https://missav.ws"
5
+
6
+ 22:32:54.430 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 22:32:54.432 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 22:32:54.433 EXTRA: User-Defined Header => referer: https://missav.ws/en/hows-018-uncensored-leak
9
+ 22:32:54.434 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 22:32:54.435 INFO : Loading URL: https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/playlist.m3u8
11
+ 22:32:55.021 INFO : Content Matched: HTTP Live Streaming
12
+ 22:32:55.025 INFO : Parsing streams...
13
+ 22:32:55.026 WARN : Master List detected, try parse all streams
14
+ 22:32:55.037 WARN : Writing meta json
15
+ 22:32:55.044 INFO : Extracted, there are 4 streams, with 4 basic streams, 0 audio streams, 0 subtitle streams
16
+ 22:32:55.047 INFO : Vid 1920x1080 | 8239 Kbps | avc1.640028,mp4a.40.2
17
+ 22:32:55.049 INFO : Vid 1280x720 | 4730 Kbps | avc1.64001f,mp4a.40.2
18
+ 22:32:55.051 INFO : Vid 854x480 | 2440 Kbps | avc1.64001f,mp4a.40.2
19
+ 22:32:55.052 INFO : Vid 640x360 | 1414 Kbps | avc1.64001e,mp4a.40.2
20
+ 22:32:55.054 INFO : Parsing streams...
21
+ 22:32:55.328 INFO : Selected streams:
22
+ 22:32:55.331 INFO : Vid 1920x1080 | 8239 Kbps | avc1.640028,mp4a.40.2 | 3608 Segments | ~04h00m28s
23
+ 22:32:55.333 WARN : Writing meta json
24
+ 22:32:55.364 INFO : Save Name: HOWS-018 How to Academy A Textbook AV That Will [Defin (2)
25
+ 22:32:55.370 INFO : Start downloading...Vid 1920x1080 | 8239 Kbps | avc1.640028,mp4a.40.2
26
+ 22:32:56.720 WARN : Reading media info...
27
+ 22:32:57.189 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1920x1080, 30 fps
28
+ 22:32:57.190 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 176 kb/s
29
+ 22:39:57.944 INFO : ffmpeg merging...
30
+ 22:39:57.952 WARN : Segments more than 1800, start partial merge...
31
+ 22:44:10.473 INFO : Done
host/bin/Logs/2026-05-13_22-33-08-561.log ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/13
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/13 22:33:08
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/1080p/video.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name "HOWS-018 How to Academy A Textbook AV That Will [Defin (2)" --auto-select --thread-count 16 --tmp-dir "C:\Users\Gonzalo\Downloads\HOWS-018 How to Academy A Textbook AV That Will [Defin (2)_tmp" -H "Referer: https://missav.ws/en/hows-018-uncensored-leak" -H "Origin: https://missav.ws"
5
+
6
+ 22:33:08.563 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 22:33:08.565 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 22:33:08.565 EXTRA: User-Defined Header => referer: https://missav.ws/en/hows-018-uncensored-leak
9
+ 22:33:08.566 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 22:33:08.567 INFO : Loading URL: https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/1080p/video.m3u8
11
+ 22:33:09.239 INFO : Content Matched: HTTP Live Streaming
12
+ 22:33:09.240 INFO : Parsing streams...
13
+ 22:33:09.322 WARN : Writing meta json
14
+ 22:33:09.324 INFO : Extracted, there are 1 streams, with 1 basic streams, 0 audio streams, 0 subtitle streams
15
+ 22:33:09.326 INFO : Vid Kbps | 3608 Segments | ~04h00m28s
16
+ 22:33:09.340 INFO : Selected streams:
17
+ 22:33:09.341 INFO : Vid Kbps | 3608 Segments | ~04h00m28s
18
+ 22:33:09.347 WARN : Writing meta json
19
+ 22:33:09.350 INFO : Save Name: HOWS-018 How to Academy A Textbook AV That Will [Defin (2)
20
+ 22:33:09.376 INFO : Start downloading...Vid Kbps
21
+ 22:33:10.413 WARN : Reading media info...
22
+ 22:33:10.529 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1920x1080, 30 fps
23
+ 22:33:10.530 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 176 kb/s
24
+ 22:36:51.052 INFO : ffmpeg merging...
25
+ 22:36:51.055 WARN : Segments more than 1800, start partial merge...
26
+ 22:39:39.374 INFO : Done
host/bin/Logs/2026-05-13_22-35-16-960.log ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/13
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/13 22:35:16
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/playlist.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name "HOWS-018 How to Academy" --auto-select --thread-count 16 --tmp-dir "C:\Users\Gonzalo\Downloads\HOWS-018 How to Academy_tmp" -H "Referer: https://missav.ws/en/hows-018-uncensored-leak" -H "Origin: https://missav.ws"
5
+
6
+ 22:35:16.961 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 22:35:16.964 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 22:35:16.965 EXTRA: User-Defined Header => referer: https://missav.ws/en/hows-018-uncensored-leak
9
+ 22:35:16.967 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 22:35:16.967 INFO : Loading URL: https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/playlist.m3u8
11
+ 22:35:19.400 INFO : Content Matched: HTTP Live Streaming
12
+ 22:35:19.402 INFO : Parsing streams...
13
+ 22:35:19.403 WARN : Master List detected, try parse all streams
14
+ 22:35:19.409 WARN : Writing meta json
15
+ 22:35:19.413 INFO : Extracted, there are 4 streams, with 4 basic streams, 0 audio streams, 0 subtitle streams
16
+ 22:35:19.416 INFO : Vid 1920x1080 | 8239 Kbps | avc1.640028,mp4a.40.2
17
+ 22:35:19.417 INFO : Vid 1280x720 | 4730 Kbps | avc1.64001f,mp4a.40.2
18
+ 22:35:19.419 INFO : Vid 854x480 | 2440 Kbps | avc1.64001f,mp4a.40.2
19
+ 22:35:19.422 INFO : Vid 640x360 | 1414 Kbps | avc1.64001e,mp4a.40.2
20
+ 22:35:19.423 INFO : Parsing streams...
21
+ 22:35:20.667 INFO : Selected streams:
22
+ 22:35:20.669 INFO : Vid 1920x1080 | 8239 Kbps | avc1.640028,mp4a.40.2 | 3608 Segments | ~04h00m28s
23
+ 22:35:20.671 WARN : Writing meta json
24
+ 22:35:20.688 INFO : Save Name: HOWS-018 How to Academy
25
+ 22:35:20.692 INFO : Start downloading...Vid 1920x1080 | 8239 Kbps | avc1.640028,mp4a.40.2
26
+ 22:35:23.905 WARN : Reading media info...
27
+ 22:35:24.634 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1920x1080, 30 fps
28
+ 22:35:24.636 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 176 kb/s
29
+ 22:39:57.914 INFO : ffmpeg merging...
30
+ 22:39:57.926 WARN : Segments more than 1800, start partial merge...
31
+ 22:44:08.156 INFO : Done
host/bin/Logs/2026-05-13_22-39-24-437.log ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/13
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/13 22:39:24
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/f5ae2943-4e5e-4092-a790-183f07098eeb/playlist.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name "MIMK-249 A live-action version of a female boss who is" --auto-select --thread-count 4 --tmp-dir "C:\Users\Gonzalo\Downloads\MIMK-249 A live-action version of a female boss who is_tmp" -H "Referer: https://missav.ws/en/mimk-249-uncensored-leak" -H "Origin: https://missav.ws"
5
+
6
+ 22:39:24.438 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 22:39:24.441 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 22:39:24.442 EXTRA: User-Defined Header => referer: https://missav.ws/en/mimk-249-uncensored-leak
9
+ 22:39:24.443 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 22:39:24.443 INFO : Loading URL: https://surrit.com/f5ae2943-4e5e-4092-a790-183f07098eeb/playlist.m3u8
11
+ 22:39:25.221 INFO : Content Matched: HTTP Live Streaming
12
+ 22:39:25.223 INFO : Parsing streams...
13
+ 22:39:25.224 WARN : Master List detected, try parse all streams
14
+ 22:39:25.229 WARN : Writing meta json
15
+ 22:39:25.238 INFO : Extracted, there are 4 streams, with 4 basic streams, 0 audio streams, 0 subtitle streams
16
+ 22:39:25.239 INFO : Vid 1920x1080 | 8115 Kbps | avc1.640028,mp4a.40.2
17
+ 22:39:25.240 INFO : Vid 1280x720 | 4606 Kbps | avc1.64001f,mp4a.40.2
18
+ 22:39:25.241 INFO : Vid 854x480 | 2514 Kbps | avc1.64001f,mp4a.40.2
19
+ 22:39:25.243 INFO : Vid 640x360 | 1416 Kbps | avc1.64001e,mp4a.40.2
20
+ 22:39:25.245 INFO : Parsing streams...
21
+ 22:39:25.596 INFO : Selected streams:
22
+ 22:39:25.597 INFO : Vid 1920x1080 | 8115 Kbps | avc1.640028,mp4a.40.2 | 1801 Segments | ~02h00m02s
23
+ 22:39:25.598 WARN : Writing meta json
24
+ 22:39:25.608 INFO : Save Name: MIMK-249 A live-action version of a female boss who is
25
+ 22:39:25.612 INFO : Start downloading...Vid 1920x1080 | 8115 Kbps | avc1.640028,mp4a.40.2
26
+ 22:39:27.673 WARN : Reading media info...
27
+ 22:39:27.791 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1920x1080, 30 fps
28
+ 22:39:27.795 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 116 kb/s
29
+ 22:39:55.757 EXTRA: Ah oh!
30
+ RetryCount => 3
31
+ Exception => The process cannot access the file 'C:\Users\Gonzalo\Downloads\MIMK-249 A live-action version of a female boss who is_tmp\MIMK-249 A live-action version of a female boss who is\0__avc1.640028,mp4a.40.2_8115800_\0075.ts.tmp' because it is being used by another process.
32
+ Url => https://surrit.com/f5ae2943-4e5e-4092-a790-183f07098eeb/1080p/video75.jpeg
33
+ 22:39:56.033 EXTRA: Ah oh!
34
+ RetryCount => 3
35
+ Exception => The process cannot access the file 'C:\Users\Gonzalo\Downloads\MIMK-249 A live-action version of a female boss who is_tmp\MIMK-249 A live-action version of a female boss who is\0__avc1.640028,mp4a.40.2_8115800_\0073.ts.tmp' because it is being used by another process.
36
+ Url => https://surrit.com/f5ae2943-4e5e-4092-a790-183f07098eeb/1080p/video73.jpeg
37
+ 22:39:56.234 EXTRA: Ah oh!
38
+ RetryCount => 3
39
+ Exception => The process cannot access the file 'C:\Users\Gonzalo\Downloads\MIMK-249 A live-action version of a female boss who is_tmp\MIMK-249 A live-action version of a female boss who is\0__avc1.640028,mp4a.40.2_8115800_\0074.ts.tmp' because it is being used by another process.
40
+ Url => https://surrit.com/f5ae2943-4e5e-4092-a790-183f07098eeb/1080p/video74.jpeg
41
+ 22:39:56.412 EXTRA: Ah oh!
42
+ RetryCount => 3
43
+ Exception => The process cannot access the file 'C:\Users\Gonzalo\Downloads\MIMK-249 A live-action version of a female boss who is_tmp\MIMK-249 A live-action version of a female boss who is\0__avc1.640028,mp4a.40.2_8115800_\0077.ts.tmp' because it is being used by another process.
44
+ Url => https://surrit.com/f5ae2943-4e5e-4092-a790-183f07098eeb/1080p/video77.jpeg
45
+ 22:39:56.916 EXTRA: Ah oh!
46
+ RetryCount => 3
47
+ Exception => The process cannot access the file 'C:\Users\Gonzalo\Downloads\MIMK-249 A live-action version of a female boss who is_tmp\MIMK-249 A live-action version of a female boss who is\0__avc1.640028,mp4a.40.2_8115800_\0078.ts.tmp' because it is being used by another process.
48
+ Url => https://surrit.com/f5ae2943-4e5e-4092-a790-183f07098eeb/1080p/video78.jpeg
49
+ 22:39:57.365 EXTRA: Ah oh!
50
+ RetryCount => 3
51
+ Exception => The process cannot access the file 'C:\Users\Gonzalo\Downloads\MIMK-249 A live-action version of a female boss who is_tmp\MIMK-249 A live-action version of a female boss who is\0__avc1.640028,mp4a.40.2_8115800_\0080.ts.tmp' because it is being used by another process.
52
+ Url => https://surrit.com/f5ae2943-4e5e-4092-a790-183f07098eeb/1080p/video80.jpeg
53
+ 22:45:28.069 INFO : ffmpeg merging...
54
+ 22:45:28.082 WARN : MIMK-249 A live-action version of a female boss who is.mp4 => MIMK-249 A live-action version of a female boss who is.copy.mp4
55
+ 22:45:28.087 WARN : Segments more than 1800, start partial merge...
56
+ 22:47:05.507 INFO : Done
host/bin/Logs/2026-05-13_22-39-42-453.log ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/13
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/13 22:39:42
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://missav.ws/en/mimk-249-uncensored-leak --save-dir C:\Users\Gonzalo\Downloads --save-name "MIMK-249 A live-action version of a female boss who is" --auto-select --thread-count 16 --tmp-dir "C:\Users\Gonzalo\Downloads\MIMK-249 A live-action version of a female boss who is_tmp" -H "Referer: https://missav.ws/en/mimk-249-uncensored-leak" -H "Origin: https://missav.ws"
5
+
6
+ 22:39:42.454 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 22:39:42.456 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 22:39:42.456 EXTRA: User-Defined Header => referer: https://missav.ws/en/mimk-249-uncensored-leak
9
+ 22:39:42.457 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 22:39:42.457 INFO : Loading URL: https://missav.ws/en/mimk-249-uncensored-leak
11
+ 22:39:43.200 WARN : Response status code does not indicate success: 403 (Forbidden). (1/10)
12
+ 22:39:44.706 INFO : Loading URL: https://missav.ws/en/mimk-249-uncensored-leak
13
+ 22:39:45.052 WARN : Response status code does not indicate success: 403 (Forbidden). (2/10)
14
+ 22:39:46.556 INFO : Loading URL: https://missav.ws/en/mimk-249-uncensored-leak
15
+ 22:39:46.820 WARN : Response status code does not indicate success: 403 (Forbidden). (3/10)
16
+ 22:39:48.325 INFO : Loading URL: https://missav.ws/en/mimk-249-uncensored-leak
17
+ 22:39:48.660 WARN : Response status code does not indicate success: 403 (Forbidden). (4/10)
18
+ 22:39:50.174 INFO : Loading URL: https://missav.ws/en/mimk-249-uncensored-leak
19
+ 22:39:50.401 WARN : Response status code does not indicate success: 403 (Forbidden). (5/10)
20
+ 22:39:51.905 INFO : Loading URL: https://missav.ws/en/mimk-249-uncensored-leak
21
+ 22:39:52.141 WARN : Response status code does not indicate success: 403 (Forbidden). (6/10)
22
+ 22:39:53.644 INFO : Loading URL: https://missav.ws/en/mimk-249-uncensored-leak
23
+ 22:39:53.871 WARN : Response status code does not indicate success: 403 (Forbidden). (7/10)
24
+ 22:39:55.376 INFO : Loading URL: https://missav.ws/en/mimk-249-uncensored-leak
25
+ 22:39:55.606 WARN : Response status code does not indicate success: 403 (Forbidden). (8/10)
26
+ 22:39:57.115 INFO : Loading URL: https://missav.ws/en/mimk-249-uncensored-leak
27
+ 22:39:57.368 WARN : Response status code does not indicate success: 403 (Forbidden). (9/10)
28
+ 22:39:58.875 INFO : Loading URL: https://missav.ws/en/mimk-249-uncensored-leak
29
+ 22:39:59.097 WARN : Response status code does not indicate success: 403 (Forbidden). (10/10)
host/bin/Logs/2026-05-13_22-39-53-963.log ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/13
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/13 22:39:53
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/f5ae2943-4e5e-4092-a790-183f07098eeb/playlist.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name "MIMK-249 A live-action version of a female boss who is" --auto-select --thread-count 16 --tmp-dir "C:\Users\Gonzalo\Downloads\MIMK-249 A live-action version of a female boss who is_tmp" -H "Referer: https://missav.ws/en/mimk-249-uncensored-leak" -H "Origin: https://missav.ws"
5
+
6
+ 22:39:53.980 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 22:39:53.983 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 22:39:53.985 EXTRA: User-Defined Header => referer: https://missav.ws/en/mimk-249-uncensored-leak
9
+ 22:39:53.987 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 22:39:53.988 INFO : Loading URL: https://surrit.com/f5ae2943-4e5e-4092-a790-183f07098eeb/playlist.m3u8
11
+ 22:39:54.563 INFO : Content Matched: HTTP Live Streaming
12
+ 22:39:54.565 INFO : Parsing streams...
13
+ 22:39:54.567 WARN : Master List detected, try parse all streams
14
+ 22:39:54.575 WARN : Writing meta json
15
+ 22:39:54.578 INFO : Extracted, there are 4 streams, with 4 basic streams, 0 audio streams, 0 subtitle streams
16
+ 22:39:54.579 INFO : Vid 1920x1080 | 8115 Kbps | avc1.640028,mp4a.40.2
17
+ 22:39:54.581 INFO : Vid 1280x720 | 4606 Kbps | avc1.64001f,mp4a.40.2
18
+ 22:39:54.582 INFO : Vid 854x480 | 2514 Kbps | avc1.64001f,mp4a.40.2
19
+ 22:39:54.584 INFO : Vid 640x360 | 1416 Kbps | avc1.64001e,mp4a.40.2
20
+ 22:39:54.586 INFO : Parsing streams...
21
+ 22:39:54.786 INFO : Selected streams:
22
+ 22:39:54.788 INFO : Vid 1920x1080 | 8115 Kbps | avc1.640028,mp4a.40.2 | 1801 Segments | ~02h00m02s
23
+ 22:39:54.791 WARN : Writing meta json
24
+ 22:39:54.795 INFO : Save Name: MIMK-249 A live-action version of a female boss who is
25
+ 22:39:54.799 INFO : Start downloading...Vid 1920x1080 | 8115 Kbps | avc1.640028,mp4a.40.2
26
+ 22:39:54.820 WARN : Reading media info...
27
+ 22:39:55.005 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1920x1080, 30 fps
28
+ 22:39:55.007 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 116 kb/s
29
+ 22:39:55.186 EXTRA: Ah oh!
30
+ RetryCount => 3
31
+ Exception => The process cannot access the file 'C:\Users\Gonzalo\Downloads\MIMK-249 A live-action version of a female boss who is_tmp\MIMK-249 A live-action version of a female boss who is\0__avc1.640028,mp4a.40.2_8115800_\0069.ts.tmp' because it is being used by another process.
32
+ Url => https://surrit.com/f5ae2943-4e5e-4092-a790-183f07098eeb/1080p/video69.jpeg
33
+ 22:39:55.742 EXTRA: Ah oh!
34
+ RetryCount => 3
35
+ Exception => The process cannot access the file 'C:\Users\Gonzalo\Downloads\MIMK-249 A live-action version of a female boss who is_tmp\MIMK-249 A live-action version of a female boss who is\0__avc1.640028,mp4a.40.2_8115800_\0072.ts.tmp' because it is being used by another process.
36
+ Url => https://surrit.com/f5ae2943-4e5e-4092-a790-183f07098eeb/1080p/video72.jpeg
host/bin/Logs/2026-05-13_22-42-27-954.log ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/13
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/13 22:42:27
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/f5ae2943-4e5e-4092-a790-183f07098eeb/playlist.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name "MIMK-249 A live-action version of a female boss who is" --auto-select --thread-count 16 --tmp-dir "C:\Users\Gonzalo\AppData\Local\Temp\MIMK-249 A live-action version of a female boss who is_tmp" -H "Referer: https://missav.ws/en/mimk-249-uncensored-leak" -H "Origin: https://missav.ws"
5
+
6
+ 22:42:27.958 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 22:42:27.960 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 22:42:27.961 EXTRA: User-Defined Header => referer: https://missav.ws/en/mimk-249-uncensored-leak
9
+ 22:42:27.961 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 22:42:27.962 INFO : Loading URL: https://surrit.com/f5ae2943-4e5e-4092-a790-183f07098eeb/playlist.m3u8
11
+ 22:42:28.595 INFO : Content Matched: HTTP Live Streaming
12
+ 22:42:28.597 INFO : Parsing streams...
13
+ 22:42:28.599 WARN : Master List detected, try parse all streams
14
+ 22:42:28.608 WARN : Writing meta json
15
+ 22:42:28.616 INFO : Extracted, there are 4 streams, with 4 basic streams, 0 audio streams, 0 subtitle streams
16
+ 22:42:28.617 INFO : Vid 1920x1080 | 8115 Kbps | avc1.640028,mp4a.40.2
17
+ 22:42:28.619 INFO : Vid 1280x720 | 4606 Kbps | avc1.64001f,mp4a.40.2
18
+ 22:42:28.621 INFO : Vid 854x480 | 2514 Kbps | avc1.64001f,mp4a.40.2
19
+ 22:42:28.623 INFO : Vid 640x360 | 1416 Kbps | avc1.64001e,mp4a.40.2
20
+ 22:42:28.625 INFO : Parsing streams...
21
+ 22:42:28.860 INFO : Selected streams:
22
+ 22:42:28.862 INFO : Vid 1920x1080 | 8115 Kbps | avc1.640028,mp4a.40.2 | 1801 Segments | ~02h00m02s
23
+ 22:42:28.867 WARN : Writing meta json
24
+ 22:42:28.882 INFO : Save Name: MIMK-249 A live-action version of a female boss who is
25
+ 22:42:28.890 INFO : Start downloading...Vid 1920x1080 | 8115 Kbps | avc1.640028,mp4a.40.2
26
+ 22:42:29.702 WARN : Reading media info...
27
+ 22:42:29.963 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1920x1080, 30 fps
28
+ 22:42:29.965 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 116 kb/s
29
+ 22:44:50.197 INFO : ffmpeg merging...
30
+ 22:44:50.199 WARN : Segments more than 1800, start partial merge...
31
+ 22:46:29.726 INFO : Done
host/bin/Logs/2026-05-13_22-44-52-214.log ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/13
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/13 22:44:52
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/3fd69625-c6f8-49d4-9063-69d83722a1b2/playlist.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name "MIMK-250 A huge hit on a certain social media platform!" --auto-select --thread-count 24 --tmp-dir "C:\Users\Gonzalo\AppData\Local\Temp\MIMK-250 A huge hit on a certain social media platform!_tmp" -H "Referer: https://missav.ws/en/mimk-250" -H "Origin: https://missav.ws"
5
+
6
+ 22:44:52.215 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 22:44:52.218 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 22:44:52.219 EXTRA: User-Defined Header => referer: https://missav.ws/en/mimk-250
9
+ 22:44:52.220 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 22:44:52.221 INFO : Loading URL: https://surrit.com/3fd69625-c6f8-49d4-9063-69d83722a1b2/playlist.m3u8
11
+ 22:44:52.858 INFO : Content Matched: HTTP Live Streaming
12
+ 22:44:52.861 INFO : Parsing streams...
13
+ 22:44:52.864 WARN : Master List detected, try parse all streams
14
+ 22:44:52.878 WARN : Writing meta json
15
+ 22:44:52.887 INFO : Extracted, there are 4 streams, with 4 basic streams, 0 audio streams, 0 subtitle streams
16
+ 22:44:52.892 INFO : Vid 1920x1080 | 8242 Kbps | avc1.640028,mp4a.40.2
17
+ 22:44:52.896 INFO : Vid 1280x720 | 4733 Kbps | avc1.64001f,mp4a.40.2
18
+ 22:44:52.899 INFO : Vid 854x480 | 2443 Kbps | avc1.64001e,mp4a.40.2
19
+ 22:44:52.903 INFO : Vid 640x360 | 1416 Kbps | avc1.64001e,mp4a.40.2
20
+ 22:44:52.908 INFO : Parsing streams...
21
+ 22:44:53.104 INFO : Selected streams:
22
+ 22:44:53.105 INFO : Vid 1920x1080 | 8242 Kbps | avc1.640028,mp4a.40.2 | 1792 Segments | ~01h59m24s
23
+ 22:44:53.107 WARN : Writing meta json
24
+ 22:44:53.126 INFO : Save Name: MIMK-250 A huge hit on a certain social media platform!
25
+ 22:44:53.132 INFO : Start downloading...Vid 1920x1080 | 8242 Kbps | avc1.640028,mp4a.40.2
26
+ 22:44:53.631 WARN : Reading media info...
27
+ 22:44:53.924 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1920x1080, 24 fps
28
+ 22:44:53.927 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 4 kb/s
29
+ 22:46:24.465 INFO : ffmpeg merging...
30
+ 22:47:13.861 INFO : Done
host/bin/Logs/2026-05-13_22-48-39-439.log ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/13
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/13 22:48:39
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/a27d3650-f5f5-44d4-a027-913c51ed266e/playlist.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name "MIMK-251 The Story of the Ejaculator and the Prostitute" --auto-select --thread-count 24 --tmp-dir "C:\Users\Gonzalo\AppData\Local\Temp\MIMK-251 The Story of the Ejaculator and the Prostitute_tmp" -H "Referer: https://missav.ws/en/mimk-251-uncensored-leak" -H "Origin: https://missav.ws"
5
+
6
+ 22:48:39.440 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 22:48:39.443 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 22:48:39.444 EXTRA: User-Defined Header => referer: https://missav.ws/en/mimk-251-uncensored-leak
9
+ 22:48:39.447 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 22:48:39.448 INFO : Loading URL: https://surrit.com/a27d3650-f5f5-44d4-a027-913c51ed266e/playlist.m3u8
11
+ 22:48:40.038 INFO : Content Matched: HTTP Live Streaming
12
+ 22:48:40.039 INFO : Parsing streams...
13
+ 22:48:40.040 WARN : Master List detected, try parse all streams
14
+ 22:48:40.046 WARN : Writing meta json
15
+ 22:48:40.050 INFO : Extracted, there are 4 streams, with 4 basic streams, 0 audio streams, 0 subtitle streams
16
+ 22:48:40.051 INFO : Vid 1920x1080 | 8245 Kbps | avc1.640028,mp4a.40.2
17
+ 22:48:40.052 INFO : Vid 1280x720 | 4736 Kbps | avc1.64001f,mp4a.40.2
18
+ 22:48:40.054 INFO : Vid 854x480 | 2444 Kbps | avc1.64001f,mp4a.40.2
19
+ 22:48:40.055 INFO : Vid 640x360 | 1416 Kbps | avc1.64001e,mp4a.40.2
20
+ 22:48:40.057 INFO : Parsing streams...
21
+ 22:48:40.256 INFO : Selected streams:
22
+ 22:48:40.257 INFO : Vid 1920x1080 | 8245 Kbps | avc1.640028,mp4a.40.2 | 1804 Segments | ~02h00m16s
23
+ 22:48:40.258 WARN : Writing meta json
24
+ 22:48:40.265 INFO : Save Name: MIMK-251 The Story of the Ejaculator and the Prostitute
25
+ 22:48:40.268 INFO : Start downloading...Vid 1920x1080 | 8245 Kbps | avc1.640028,mp4a.40.2
26
+ 22:48:41.136 WARN : Reading media info...
27
+ 22:48:41.279 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1920x1080, 30 fps
28
+ 22:48:41.281 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 4 kb/s
29
+ 22:49:58.908 INFO : ffmpeg merging...
30
+ 22:49:58.913 WARN : Segments more than 1800, start partial merge...
31
+ 22:50:27.441 WARN : [in#0/mpegts @ 00000230268469c0] Packet corrupt (stream = 0, dts = 113163000).
32
+ 22:50:27.443 WARN : [in#0/mpegts @ 0000023026835340] corrupt input packet in stream 0
33
+ 22:50:39.963 WARN : [in#0/mpegts @ 00000230268469c0] Packet corrupt (stream = 0, dts = 308283000).
34
+ 22:50:39.965 WARN : [in#0/mpegts @ 0000023026835340] corrupt input packet in stream 0
35
+ 22:50:39.967 WARN : [vist#0:0/h264 @ 0000023028ba1040] timestamp discontinuity (stream id=256): 1348768001, new offset= -1348768001
36
+ 22:50:39.970 WARN : [in#0/mpegts @ 00000230268469c0] Packet corrupt (stream = 0, dts = 430032477).
37
+ 22:50:39.972 WARN : [in#0/mpegts @ 0000023026835340] corrupt input packet in stream 0
38
+ 22:50:39.974 WARN : [vist#0:0/h264 @ 0000023028ba1040] timestamp discontinuity (stream id=256): -1348772000, new offset= 3999
39
+ 22:50:45.373 WARN : [in#0/mpegts @ 00000230268469c0] Packet corrupt (stream = 0, dts = 426363000).
40
+ 22:50:45.375 WARN : [in#0/mpegts @ 0000023026835340] corrupt input packet in stream 0
41
+ 22:50:46.932 WARN : [in#0/mpegts @ 00000230268469c0] Packet corrupt (stream = 0, dts = 459843000).
42
+ 22:50:46.934 WARN : [in#0/mpegts @ 0000023026835340] corrupt input packet in stream 0
43
+ 22:50:51.593 WARN : [in#0/mpegts @ 00000230268469c0] Packet corrupt (stream = 0, dts = 548403000).
44
+ 22:50:51.595 WARN : [in#0/mpegts @ 0000023026835340] corrupt input packet in stream 0
45
+ 22:50:55.583 WARN : [in#0/mpegts @ 00000230268469c0] Packet corrupt (stream = 0, dts = 625443000).
46
+ 22:50:55.585 WARN : [in#0/mpegts @ 0000023026835340] corrupt input packet in stream 0
47
+ 22:50:57.238 INFO : Done
host/bin/Logs/2026-05-14_15-08-14-668.log ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/14
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/14 15:08:14
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://www.youtube.com/watch?v=WRxpwpi6-4c --save-dir C:\Users\Gonzalo\Downloads --save-name "efecto de sonid ode humo" --auto-select --thread-count 24 --tmp-dir "C:\Users\Gonzalo\AppData\Local\Temp\efecto de sonid ode humo_tmp" -H "Referer: https://www.youtube.com/watch?v=WRxpwpi6-4c" -H "Origin: https://www.youtube.com"
5
+
6
+ 15:08:14.671 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 15:08:14.685 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 15:08:14.685 EXTRA: User-Defined Header => referer: https://www.youtube.com/watch?v=WRxpwpi6-4c
9
+ 15:08:14.686 EXTRA: User-Defined Header => origin: https://www.youtube.com
10
+ 15:08:14.687 INFO : Loading URL: https://www.youtube.com/watch?v=WRxpwpi6-4c
host/bin/Logs/2026-05-14_15-37-02-762.log ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/14
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/14 15:37:02
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/playlist.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name "HOWS-018 How to Academy A Textbook AV That Will [Defin (2)" --auto-select --thread-count 24 --tmp-dir "C:\Users\Gonzalo\AppData\Local\Temp\HOWS-018 How to Academy A Textbook AV That Will [Defin (2)_tmp" -H "Referer: https://missav.ws/en/hows-018-uncensored-leak" -H "Origin: https://missav.ws"
5
+
6
+ 15:37:02.764 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 15:37:02.776 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 15:37:02.776 EXTRA: User-Defined Header => referer: https://missav.ws/en/hows-018-uncensored-leak
9
+ 15:37:02.777 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 15:37:02.780 INFO : Loading URL: https://surrit.com/aa34fde3-0dd8-43f8-85ed-4a54badaede0/playlist.m3u8
11
+ 15:37:03.966 INFO : Content Matched: HTTP Live Streaming
12
+ 15:37:03.968 INFO : Parsing streams...
13
+ 15:37:03.969 WARN : Master List detected, try parse all streams
14
+ 15:37:03.996 WARN : Writing meta json
15
+ 15:37:04.000 INFO : Extracted, there are 4 streams, with 4 basic streams, 0 audio streams, 0 subtitle streams
16
+ 15:37:04.001 INFO : Vid 1920x1080 | 8239 Kbps | avc1.640028,mp4a.40.2
17
+ 15:37:04.001 INFO : Vid 1280x720 | 4730 Kbps | avc1.64001f,mp4a.40.2
18
+ 15:37:04.003 INFO : Vid 854x480 | 2440 Kbps | avc1.64001f,mp4a.40.2
19
+ 15:37:04.003 INFO : Vid 640x360 | 1414 Kbps | avc1.64001e,mp4a.40.2
20
+ 15:37:04.004 INFO : Parsing streams...
21
+ 15:37:04.538 INFO : Selected streams:
22
+ 15:37:04.539 INFO : Vid 1920x1080 | 8239 Kbps | avc1.640028,mp4a.40.2 | 3608 Segments | ~04h00m28s
23
+ 15:37:04.541 WARN : Writing meta json
24
+ 15:37:04.557 INFO : Save Name: HOWS-018 How to Academy A Textbook AV That Will [Defin (2)
25
+ 15:37:04.573 INFO : Start downloading...Vid 1920x1080 | 8239 Kbps | avc1.640028,mp4a.40.2
26
+ 15:37:07.013 WARN : Reading media info...
27
+ 15:37:07.335 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1920x1080, 30 fps
28
+ 15:37:07.338 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 176 kb/s
29
+ 15:39:38.916 INFO : ffmpeg merging...
30
+ 15:39:38.919 WARN : Segments more than 1800, start partial merge...
31
+ 15:42:00.770 INFO : Done
host/bin/Logs/2026-05-14_16-02-08-791.log ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/14
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/14 16:02:08
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/ce0d8ae5-c65b-474f-96a6-55d99383bd7e/playlist.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name "HOWS-018 How to Academy A Textbook AV That Will [Defin" --auto-select --thread-count 36 --tmp-dir "C:\Users\Gonzalo\AppData\Local\Temp\HOWS-018 How to Academy A Textbook AV That Will [Defin_tmp" -H "Referer: https://missav.ws/en/hows-018" -H "Origin: https://missav.ws"
5
+
6
+ 16:02:08.793 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 16:02:08.807 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 16:02:08.807 EXTRA: User-Defined Header => referer: https://missav.ws/en/hows-018
9
+ 16:02:08.808 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 16:02:08.810 INFO : Loading URL: https://surrit.com/ce0d8ae5-c65b-474f-96a6-55d99383bd7e/playlist.m3u8
11
+ 16:02:09.730 INFO : Content Matched: HTTP Live Streaming
12
+ 16:02:09.732 INFO : Parsing streams...
13
+ 16:02:09.736 WARN : Master List detected, try parse all streams
14
+ 16:02:09.766 WARN : Writing meta json
15
+ 16:02:09.775 INFO : Extracted, there are 4 streams, with 4 basic streams, 0 audio streams, 0 subtitle streams
16
+ 16:02:09.778 INFO : Vid 1920x1080 | 8115 Kbps | avc1.640028,mp4a.40.2
17
+ 16:02:09.781 INFO : Vid 1280x720 | 4606 Kbps | avc1.64001f,mp4a.40.2
18
+ 16:02:09.796 INFO : Vid 854x480 | 2514 Kbps | avc1.64001f,mp4a.40.2
19
+ 16:02:09.799 INFO : Vid 640x360 | 1416 Kbps | avc1.64001e,mp4a.40.2
20
+ 16:02:09.831 INFO : Parsing streams...
21
+ 16:02:10.059 INFO : Selected streams:
22
+ 16:02:10.060 INFO : Vid 1920x1080 | 8115 Kbps | avc1.640028,mp4a.40.2 | 3608 Segments | ~04h00m28s
23
+ 16:02:10.061 WARN : Writing meta json
24
+ 16:02:10.075 INFO : Save Name: HOWS-018 How to Academy A Textbook AV That Will [Defin
25
+ 16:02:10.083 INFO : Start downloading...Vid 1920x1080 | 8115 Kbps | avc1.640028,mp4a.40.2
26
+ 16:02:10.891 WARN : Reading media info...
27
+ 16:02:10.996 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1920x1080, 29.97 fps
28
+ 16:02:10.998 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 99 kb/s
29
+ 16:04:31.763 INFO : ffmpeg merging...
30
+ 16:04:31.767 WARN : Segments more than 1800, start partial merge...
31
+ 16:06:41.740 INFO : Done
host/bin/Logs/2026-05-14_16-10-06-874.log ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/14
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/14 16:10:06
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/f27bdca9-420c-415c-8398-13f66088f54c/playlist.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name "MIMK-251 The Story of the Ejaculator and the Prostitute" --auto-select --thread-count 36 --tmp-dir "C:\Users\Gonzalo\AppData\Local\Temp\MIMK-251 The Story of the Ejaculator and the Prostitute_c5c8aaaf_tmp" -H "Referer: https://missav.ws/en/mimk-251" -H "Origin: https://missav.ws"
5
+
6
+ 16:10:06.875 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 16:10:06.877 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 16:10:06.878 EXTRA: User-Defined Header => referer: https://missav.ws/en/mimk-251
9
+ 16:10:06.879 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 16:10:06.879 INFO : Loading URL: https://surrit.com/f27bdca9-420c-415c-8398-13f66088f54c/playlist.m3u8
11
+ 16:10:07.480 INFO : Content Matched: HTTP Live Streaming
12
+ 16:10:07.481 INFO : Parsing streams...
13
+ 16:10:07.484 WARN : Master List detected, try parse all streams
14
+ 16:10:07.490 WARN : Writing meta json
15
+ 16:10:07.493 INFO : Extracted, there are 4 streams, with 4 basic streams, 0 audio streams, 0 subtitle streams
16
+ 16:10:07.494 INFO : Vid 1920x1080 | 8244 Kbps | avc1.640028,mp4a.40.2
17
+ 16:10:07.495 INFO : Vid 1280x720 | 4735 Kbps | avc1.64001f,mp4a.40.2
18
+ 16:10:07.496 INFO : Vid 854x480 | 2443 Kbps | avc1.64001e,mp4a.40.2
19
+ 16:10:07.496 INFO : Vid 640x360 | 1416 Kbps | avc1.64001e,mp4a.40.2
20
+ 16:10:07.499 INFO : Parsing streams...
21
+ 16:10:07.699 INFO : Selected streams:
22
+ 16:10:07.702 INFO : Vid 1920x1080 | 8244 Kbps | avc1.640028,mp4a.40.2 | 1807 Segments | ~02h00m26s
23
+ 16:10:07.707 WARN : Writing meta json
24
+ 16:10:07.722 INFO : Save Name: MIMK-251 The Story of the Ejaculator and the Prostitute
25
+ 16:10:07.727 INFO : Start downloading...Vid 1920x1080 | 8244 Kbps | avc1.640028,mp4a.40.2
26
+ 16:10:08.347 WARN : Reading media info...
27
+ 16:10:08.439 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1920x1080, 24 fps
28
+ 16:10:08.441 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 4 kb/s
29
+ 16:10:59.789 EXTRA: Ah oh!
30
+ RetryCount => 3
31
+ Exception => The response ended prematurely, with at least 1655492 additional bytes expected. (ResponseEnded)
32
+ Url => https://surrit.com/f27bdca9-420c-415c-8398-13f66088f54c/1080p/video272.jpeg
33
+ 16:12:11.902 INFO : ffmpeg merging...
34
+ 16:12:11.906 WARN : Segments more than 1800, start partial merge...
35
+ 16:13:03.723 INFO : Done
host/bin/Logs/2026-05-14_16-18-00-043.log ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/14
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/14 16:18:00
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/1c39372b-c396-4c70-b665-92a13d3fc6f4/playlist.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name "NACT-101 The beauty salon I went to to get revenge on m" --auto-select --thread-count 36 --tmp-dir "C:\Users\Gonzalo\AppData\Local\Temp\NACT-101 The beauty salon I went to to get revenge on m_0270fd97_tmp" --mux-after-done mp4 -H "Referer: https://missav.ws/en/nact-101-uncensored-leak" -H "Origin: https://missav.ws"
5
+
6
+ 16:18:00.043 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 16:18:00.046 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 16:18:00.048 EXTRA: User-Defined Header => referer: https://missav.ws/en/nact-101-uncensored-leak
9
+ 16:18:00.048 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 16:18:00.049 INFO : Loading URL: https://surrit.com/1c39372b-c396-4c70-b665-92a13d3fc6f4/playlist.m3u8
11
+ 16:18:00.809 INFO : Content Matched: HTTP Live Streaming
12
+ 16:18:00.810 INFO : Parsing streams...
13
+ 16:18:00.812 WARN : Master List detected, try parse all streams
14
+ 16:18:00.818 WARN : Writing meta json
15
+ 16:18:00.823 INFO : Extracted, there are 4 streams, with 4 basic streams, 0 audio streams, 0 subtitle streams
16
+ 16:18:00.826 INFO : Vid 1920x1080 | 8246 Kbps | avc1.640028,mp4a.40.2
17
+ 16:18:00.827 INFO : Vid 1280x720 | 4737 Kbps | avc1.64001f,mp4a.40.2
18
+ 16:18:00.829 INFO : Vid 854x480 | 2446 Kbps | avc1.64001f,mp4a.40.2
19
+ 16:18:00.831 INFO : Vid 640x360 | 1418 Kbps | avc1.64001e,mp4a.40.2
20
+ 16:18:00.834 INFO : Parsing streams...
21
+ 16:18:01.027 INFO : Selected streams:
22
+ 16:18:01.029 INFO : Vid 1920x1080 | 8246 Kbps | avc1.640028,mp4a.40.2 | 1839 Segments | ~02h02m32s
23
+ 16:18:01.030 WARN : Writing meta json
24
+ 16:18:01.042 INFO : Save Name: NACT-101 The beauty salon I went to to get revenge on m
25
+ 16:18:01.043 WARN : MuxAfterDone is detected, binary merging is automatically enabled
26
+ 16:18:01.049 INFO : Start downloading...Vid 1920x1080 | 8246 Kbps | avc1.640028,mp4a.40.2
27
+ 16:18:01.949 WARN : Reading media info...
28
+ 16:18:02.077 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1920x1080, 30 fps
29
+ 16:18:02.079 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 229 kb/s
30
+ 16:19:45.172 EXTRA: Ah oh!
31
+ RetryCount => 3
32
+ Exception => Download speed too slow!
33
+ Url => https://surrit.com/1c39372b-c396-4c70-b665-92a13d3fc6f4/1080p/video1211.jpeg
34
+ 16:19:49.699 INFO : Binary merging...
35
+ 16:20:11.897 WARN : NACT-101 The beauty salon I went to to get revenge on m.ts
36
+ 16:20:11.911 WARN : Muxing to NACT-101 The beauty salon I went to to get revenge on m.MUX.mp4
37
+ 16:21:26.124 WARN : Cleaning files...
38
+ 16:21:26.336 WARN : Rename to NACT-101 The beauty salon I went to to get revenge on m.mp4
39
+ 16:21:26.339 INFO : Done
host/bin/Logs/2026-05-14_16-21-28-670.log ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/14
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/14 16:21:28
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/70dd1a0b-a898-47e3-8c50-a65544a17f99/playlist.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name "NACT-101 The beauty salon I went to to get revenge on m (2)" --auto-select --thread-count 36 --tmp-dir "C:\Users\Gonzalo\AppData\Local\Temp\NACT-101 The beauty salon I went to to get revenge on m (2)_b658e72c_tmp" --mux-after-done mp4 -H "Referer: https://missav.ws/en/nact-101" -H "Origin: https://missav.ws"
5
+
6
+ 16:21:28.672 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 16:21:28.676 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 16:21:28.677 EXTRA: User-Defined Header => referer: https://missav.ws/en/nact-101
9
+ 16:21:28.679 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 16:21:28.680 INFO : Loading URL: https://surrit.com/70dd1a0b-a898-47e3-8c50-a65544a17f99/playlist.m3u8
11
+ 16:21:29.286 INFO : Content Matched: HTTP Live Streaming
12
+ 16:21:29.296 INFO : Parsing streams...
13
+ 16:21:29.306 WARN : Master List detected, try parse all streams
14
+ 16:21:29.338 WARN : Writing meta json
15
+ 16:21:29.521 INFO : Extracted, there are 3 streams, with 3 basic streams, 0 audio streams, 0 subtitle streams
16
+ 16:21:29.572 INFO : Vid 1280x720 | 4740 Kbps | avc1.64001f,mp4a.40.2
17
+ 16:21:29.587 INFO : Vid 854x480 | 2446 Kbps | avc1.64001e,mp4a.40.2
18
+ 16:21:29.590 INFO : Vid 640x360 | 1418 Kbps | avc1.64001e,mp4a.40.2
19
+ 16:21:29.592 INFO : Parsing streams...
20
+ 16:21:29.825 INFO : Selected streams:
21
+ 16:21:29.827 INFO : Vid 1280x720 | 4740 Kbps | avc1.64001f,mp4a.40.2 | 1839 Segments | ~02h02m32s
22
+ 16:21:29.829 WARN : Writing meta json
23
+ 16:21:29.846 INFO : Save Name: NACT-101 The beauty salon I went to to get revenge on m (2)
24
+ 16:21:29.851 WARN : MuxAfterDone is detected, binary merging is automatically enabled
25
+ 16:21:29.856 INFO : Start downloading...Vid 1280x720 | 4740 Kbps | avc1.64001f,mp4a.40.2
26
+ 16:21:30.673 WARN : Reading media info...
27
+ 16:21:30.823 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1280x720, 24 fps
28
+ 16:21:30.824 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 223 kb/s
29
+ 16:22:23.455 INFO : Binary merging...
30
+ 16:22:35.994 WARN : NACT-101 The beauty salon I went to to get revenge on m (2).ts
31
+ 16:22:35.995 WARN : Muxing to NACT-101 The beauty salon I went to to get revenge on m (2).MUX.mp4
32
+ 16:23:27.653 WARN : Cleaning files...
33
+ 16:23:27.835 WARN : Rename to NACT-101 The beauty salon I went to to get revenge on m (2).mp4
34
+ 16:23:27.837 INFO : Done
host/bin/Logs/2026-05-14_16-26-28-730.log ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/14
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/14 16:26:28
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/a9081d0f-a0c7-441d-9833-39e38d82ec81/playlist.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name "55T3800027 A group of sugar daddies will teach this arr" --auto-select --thread-count 36 --tmp-dir "C:\Users\Gonzalo\AppData\Local\Temp\55T3800027 A group of sugar daddies will teach this arr_45c2dd07_tmp" --mux-after-done mp4 -H "Referer: https://missav.ws/en/55t3800027" -H "Origin: https://missav.ws"
5
+
6
+ 16:26:28.731 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 16:26:28.733 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 16:26:28.734 EXTRA: User-Defined Header => referer: https://missav.ws/en/55t3800027
9
+ 16:26:28.735 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 16:26:28.735 INFO : Loading URL: https://surrit.com/a9081d0f-a0c7-441d-9833-39e38d82ec81/playlist.m3u8
11
+ 16:26:29.391 INFO : Content Matched: HTTP Live Streaming
12
+ 16:26:29.393 INFO : Parsing streams...
13
+ 16:26:29.395 WARN : Master List detected, try parse all streams
14
+ 16:26:29.404 WARN : Writing meta json
15
+ 16:26:29.409 INFO : Extracted, there are 3 streams, with 3 basic streams, 0 audio streams, 0 subtitle streams
16
+ 16:26:29.412 INFO : Vid 1280x720 | 4737 Kbps | avc1.64001f,mp4a.40.2
17
+ 16:26:29.414 INFO : Vid 854x480 | 2445 Kbps | avc1.64001e,mp4a.40.2
18
+ 16:26:29.417 INFO : Vid 640x360 | 1418 Kbps | avc1.64001e,mp4a.40.2
19
+ 16:26:29.419 INFO : Parsing streams...
20
+ 16:26:29.635 INFO : Selected streams:
21
+ 16:26:29.637 INFO : Vid 1280x720 | 4737 Kbps | avc1.64001f,mp4a.40.2 | 2471 Segments | ~02h44m43s
22
+ 16:26:29.640 WARN : Writing meta json
23
+ 16:26:29.660 INFO : Save Name: 55T3800027 A group of sugar daddies will teach this arr
24
+ 16:26:29.662 WARN : MuxAfterDone is detected, binary merging is automatically enabled
25
+ 16:26:29.667 INFO : Start downloading...Vid 1280x720 | 4737 Kbps | avc1.64001f,mp4a.40.2
26
+ 16:26:30.455 WARN : Reading media info...
27
+ 16:26:30.601 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1280x720, 24 fps
28
+ 16:26:30.603 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 235 kb/s
29
+ 16:27:32.252 INFO : Binary merging...
30
+ 16:27:49.294 WARN : 55T3800027 A group of sugar daddies will teach this arr.ts
31
+ 16:27:49.295 WARN : Muxing to 55T3800027 A group of sugar daddies will teach this arr.MUX.mp4
32
+ 16:28:47.230 WARN : Cleaning files...
33
+ 16:28:47.379 WARN : Rename to 55T3800027 A group of sugar daddies will teach this arr.mp4
34
+ 16:28:47.382 INFO : Done
host/bin/Logs/2026-05-14_17-00-33-372.log ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/14
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/14 17:00:33
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/6d2ec09c-cd38-498e-bb06-189b559b83b0/playlist.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name "NIMA-076 Live-action version! I still love Yuno Yuria Y" --auto-select --thread-count 36 --tmp-dir "C:\Users\Gonzalo\AppData\Local\Temp\NIMA-076 Live-action version! I still love Yuno Yuria Y_c461a752_tmp" --mux-after-done mp4 -H "Referer: https://missav.ws/en/nima-076-uncensored-leak" -H "Origin: https://missav.ws"
5
+
6
+ 17:00:33.372 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 17:00:33.374 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 17:00:33.374 EXTRA: User-Defined Header => referer: https://missav.ws/en/nima-076-uncensored-leak
9
+ 17:00:33.375 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 17:00:33.375 INFO : Loading URL: https://surrit.com/6d2ec09c-cd38-498e-bb06-189b559b83b0/playlist.m3u8
11
+ 17:00:33.992 INFO : Content Matched: HTTP Live Streaming
12
+ 17:00:33.993 INFO : Parsing streams...
13
+ 17:00:33.995 WARN : Master List detected, try parse all streams
14
+ 17:00:34.032 WARN : Writing meta json
15
+ 17:00:34.037 INFO : Extracted, there are 4 streams, with 4 basic streams, 0 audio streams, 0 subtitle streams
16
+ 17:00:34.038 INFO : Vid 1920x1080 | 8115 Kbps | avc1.640028,mp4a.40.2
17
+ 17:00:34.039 INFO : Vid 1280x720 | 4606 Kbps | avc1.64001f,mp4a.40.2
18
+ 17:00:34.039 INFO : Vid 854x480 | 2514 Kbps | avc1.64001f,mp4a.40.2
19
+ 17:00:34.040 INFO : Vid 640x360 | 1416 Kbps | avc1.64001e,mp4a.40.2
20
+ 17:00:34.041 INFO : Parsing streams...
21
+ 17:00:34.229 INFO : Selected streams:
22
+ 17:00:34.231 INFO : Vid 1920x1080 | 8115 Kbps | avc1.640028,mp4a.40.2 | 1772 Segments | ~01h58m06s
23
+ 17:00:34.232 WARN : Writing meta json
24
+ 17:00:34.241 INFO : Save Name: NIMA-076 Live-action version! I still love Yuno Yuria Y
25
+ 17:00:34.243 WARN : MuxAfterDone is detected, binary merging is automatically enabled
26
+ 17:00:34.252 INFO : Start downloading...Vid 1920x1080 | 8115 Kbps | avc1.640028,mp4a.40.2
27
+ 17:00:34.876 WARN : Reading media info...
28
+ 17:00:34.948 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1920x1080, 30 fps
29
+ 17:00:34.948 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 4 kb/s
30
+ 17:01:58.952 INFO : Binary merging...
31
+ 17:02:15.637 WARN : NIMA-076 Live-action version! I still love Yuno Yuria Y.ts
32
+ 17:02:15.638 WARN : Muxing to NIMA-076 Live-action version! I still love Yuno Yuria Y.MUX.mp4
33
+ 17:02:52.072 WARN : Cleaning files...
34
+ 17:02:52.163 WARN : Rename to NIMA-076 Live-action version! I still love Yuno Yuria Y.mp4
35
+ 17:02:52.164 INFO : Done
host/bin/Logs/2026-05-14_17-05-03-605.log ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/14
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/14 17:05:03
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/44f63836-f0c7-4ca4-b327-ca5753d4b35b/playlist.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name "NIMA-076 Live-action version! I still love Yuno Yuria Y (2)" --auto-select --thread-count 36 --tmp-dir "C:\Users\Gonzalo\AppData\Local\Temp\NIMA-076 Live-action version! I still love Yuno Yuria Y (2)_d916c987_tmp" --mux-after-done mp4 -H "Referer: https://missav.ws/en/nima-076" -H "Origin: https://missav.ws"
5
+
6
+ 17:05:03.606 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 17:05:03.608 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 17:05:03.608 EXTRA: User-Defined Header => referer: https://missav.ws/en/nima-076
9
+ 17:05:03.609 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 17:05:03.609 INFO : Loading URL: https://surrit.com/44f63836-f0c7-4ca4-b327-ca5753d4b35b/playlist.m3u8
11
+ 17:05:04.206 INFO : Content Matched: HTTP Live Streaming
12
+ 17:05:04.207 INFO : Parsing streams...
13
+ 17:05:04.209 WARN : Master List detected, try parse all streams
14
+ 17:05:04.213 WARN : Writing meta json
15
+ 17:05:04.219 INFO : Extracted, there are 3 streams, with 3 basic streams, 0 audio streams, 0 subtitle streams
16
+ 17:05:04.223 INFO : Vid 1280x720 | 4728 Kbps | avc1.64001f,mp4a.40.2
17
+ 17:05:04.224 INFO : Vid 854x480 | 2443 Kbps | avc1.64001e,mp4a.40.2
18
+ 17:05:04.225 INFO : Vid 640x360 | 1416 Kbps | avc1.64001e,mp4a.40.2
19
+ 17:05:04.226 INFO : Parsing streams...
20
+ 17:05:04.388 INFO : Selected streams:
21
+ 17:05:04.389 INFO : Vid 1280x720 | 4728 Kbps | avc1.64001f,mp4a.40.2 | 1772 Segments | ~01h58m06s
22
+ 17:05:04.390 WARN : Writing meta json
23
+ 17:05:04.394 INFO : Save Name: NIMA-076 Live-action version! I still love Yuno Yuria Y (2)
24
+ 17:05:04.395 WARN : MuxAfterDone is detected, binary merging is automatically enabled
25
+ 17:05:04.397 INFO : Start downloading...Vid 1280x720 | 4728 Kbps | avc1.64001f,mp4a.40.2
26
+ 17:05:04.863 WARN : Reading media info...
27
+ 17:05:04.917 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1280x720, 24 fps
28
+ 17:05:04.918 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 4 kb/s
29
+ 17:05:38.193 EXTRA: Ah oh!
30
+ RetryCount => 3
31
+ Exception => The response ended prematurely, with at least 1073856 additional bytes expected. (ResponseEnded)
32
+ Url => https://surrit.com/44f63836-f0c7-4ca4-b327-ca5753d4b35b/720p/video891.jpeg
33
+ 17:05:40.602 EXTRA: Ah oh!
34
+ RetryCount => 3
35
+ Exception => The response ended prematurely, with at least 68216 additional bytes expected. (ResponseEnded)
36
+ Url => https://surrit.com/44f63836-f0c7-4ca4-b327-ca5753d4b35b/720p/video822.jpeg
37
+ 17:05:42.039 EXTRA: Ah oh!
38
+ RetryCount => 3
39
+ Exception => The response ended prematurely, with at least 654128 additional bytes expected. (ResponseEnded)
40
+ Url => https://surrit.com/44f63836-f0c7-4ca4-b327-ca5753d4b35b/720p/video849.jpeg
41
+ 17:05:43.555 EXTRA: Ah oh!
42
+ RetryCount => 3
43
+ Exception => The response ended prematurely, with at least 881496 additional bytes expected. (ResponseEnded)
44
+ Url => https://surrit.com/44f63836-f0c7-4ca4-b327-ca5753d4b35b/720p/video980.jpeg
45
+ 17:05:48.648 EXTRA: Ah oh!
46
+ RetryCount => 3
47
+ Exception => The response ended prematurely, with at least 405336 additional bytes expected. (ResponseEnded)
48
+ Url => https://surrit.com/44f63836-f0c7-4ca4-b327-ca5753d4b35b/720p/video1005.jpeg
49
+ 17:06:12.574 INFO : Binary merging...
50
+ 17:06:21.489 WARN : NIMA-076 Live-action version! I still love Yuno Yuria Y (2).ts
51
+ 17:06:21.504 WARN : Muxing to NIMA-076 Live-action version! I still love Yuno Yuria Y (2).MUX.mp4
52
+ 17:06:43.009 WARN : Cleaning files...
53
+ 17:06:43.099 WARN : Rename to NIMA-076 Live-action version! I still love Yuno Yuria Y (2).mp4
54
+ 17:06:43.100 INFO : Done
host/bin/Logs/2026-05-14_17-15-07-131.log ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/14
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/14 17:15:07
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/50c30ce2-e0b5-4cf8-a5c4-607ba9685c4a/1080p/video.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name "NIMA-074 Live-action version I've been changed. Until" --auto-select --thread-count 36 --tmp-dir "C:\Users\Gonzalo\AppData\Local\Temp\NIMA-074 Live-action version I've been changed. Until_225e7065_tmp" --mux-after-done mp4 -H "Referer: https://missav.ws/en/nima-074-uncensored-leak" -H "Origin: https://missav.ws"
5
+
6
+ 17:15:07.131 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 17:15:07.132 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 17:15:07.133 EXTRA: User-Defined Header => referer: https://missav.ws/en/nima-074-uncensored-leak
9
+ 17:15:07.133 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 17:15:07.133 INFO : Loading URL: https://surrit.com/50c30ce2-e0b5-4cf8-a5c4-607ba9685c4a/1080p/video.m3u8
11
+ 17:15:07.722 INFO : Content Matched: HTTP Live Streaming
12
+ 17:15:07.723 INFO : Parsing streams...
13
+ 17:15:07.745 WARN : Writing meta json
14
+ 17:15:07.751 INFO : Extracted, there are 1 streams, with 1 basic streams, 0 audio streams, 0 subtitle streams
15
+ 17:15:07.752 INFO : Vid Kbps | 1853 Segments | ~02h03m30s
16
+ 17:15:07.762 INFO : Selected streams:
17
+ 17:15:07.763 INFO : Vid Kbps | 1853 Segments | ~02h03m30s
18
+ 17:15:07.764 WARN : Writing meta json
19
+ 17:15:07.771 INFO : Save Name: NIMA-074 Live-action version I've been changed. Until
20
+ 17:15:07.772 WARN : MuxAfterDone is detected, binary merging is automatically enabled
21
+ 17:15:07.775 INFO : Start downloading...Vid Kbps
22
+ 17:15:08.257 WARN : Reading media info...
23
+ 17:15:08.462 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1920x1080, 30 fps
24
+ 17:15:08.464 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 4 kb/s
25
+ 17:16:46.717 INFO : Binary merging...
26
+ 17:17:05.811 WARN : NIMA-074 Live-action version I've been changed. Until.ts
27
+ 17:17:05.812 WARN : Muxing to NIMA-074 Live-action version I've been changed. Until.MUX.mp4
28
+ 17:18:04.421 WARN : Cleaning files...
29
+ 17:18:04.453 WARN : Rename to NIMA-074 Live-action version I've been changed. Until.mp4
30
+ 17:18:04.454 INFO : Done
host/bin/Logs/2026-05-14_17-18-06-282.log ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/14
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/14 17:18:06
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/8ceecf40-e010-4da5-ab5c-594ad92b26de/playlist.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name "NIMA-074 Live-action version I've been changed. Until (2)" --auto-select --thread-count 36 --tmp-dir "C:\Users\Gonzalo\AppData\Local\Temp\NIMA-074 Live-action version I've been changed. Until (2)_a10b3877_tmp" --mux-after-done mp4 -H "Referer: https://missav.ws/en/nima-074" -H "Origin: https://missav.ws"
5
+
6
+ 17:18:06.282 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 17:18:06.284 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 17:18:06.284 EXTRA: User-Defined Header => referer: https://missav.ws/en/nima-074
9
+ 17:18:06.284 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 17:18:06.285 INFO : Loading URL: https://surrit.com/8ceecf40-e010-4da5-ab5c-594ad92b26de/playlist.m3u8
11
+ 17:18:06.859 INFO : Content Matched: HTTP Live Streaming
12
+ 17:18:06.860 INFO : Parsing streams...
13
+ 17:18:06.860 WARN : Master List detected, try parse all streams
14
+ 17:18:06.864 WARN : Writing meta json
15
+ 17:18:06.867 INFO : Extracted, there are 4 streams, with 4 basic streams, 0 audio streams, 0 subtitle streams
16
+ 17:18:06.868 INFO : Vid 1920x1080 | 8238 Kbps | avc1.640028,mp4a.40.2
17
+ 17:18:06.868 INFO : Vid 1280x720 | 4729 Kbps | avc1.64001f,mp4a.40.2
18
+ 17:18:06.869 INFO : Vid 854x480 | 2444 Kbps | avc1.64001e,mp4a.40.2
19
+ 17:18:06.870 INFO : Vid 640x360 | 1416 Kbps | avc1.64001e,mp4a.40.2
20
+ 17:18:06.871 INFO : Parsing streams...
21
+ 17:18:07.034 INFO : Selected streams:
22
+ 17:18:07.035 INFO : Vid 1920x1080 | 8238 Kbps | avc1.640028,mp4a.40.2 | 1856 Segments | ~02h03m41s
23
+ 17:18:07.036 WARN : Writing meta json
24
+ 17:18:07.042 INFO : Save Name: NIMA-074 Live-action version I've been changed. Until (2)
25
+ 17:18:07.044 WARN : MuxAfterDone is detected, binary merging is automatically enabled
26
+ 17:18:07.047 INFO : Start downloading...Vid 1920x1080 | 8238 Kbps | avc1.640028,mp4a.40.2
27
+ 17:18:07.513 WARN : Reading media info...
28
+ 17:18:07.581 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1920x1080, 24 fps
29
+ 17:18:07.582 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 4 kb/s
30
+ 17:19:20.413 INFO : Binary merging...
31
+ 17:19:37.555 WARN : NIMA-074 Live-action version I've been changed. Until (2).ts
32
+ 17:19:37.555 WARN : Muxing to NIMA-074 Live-action version I've been changed. Until (2).MUX.mp4
33
+ 17:20:03.903 WARN : Cleaning files...
34
+ 17:20:03.999 WARN : Rename to NIMA-074 Live-action version I've been changed. Until (2).mp4
35
+ 17:20:04.000 INFO : Done
host/bin/Logs/2026-05-14_17-20-41-291.log ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LOG 2026/05/14
2
+ Save Path: C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\Logs
3
+ Task Start: 2026/05/14 17:20:41
4
+ Task CommandLine: "C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\N_m3u8DL-RE.exe" https://surrit.com/3e06810e-4afd-4053-a7f8-74776f85b806/playlist.m3u8 --save-dir C:\Users\Gonzalo\Downloads --save-name "NIMA-066 Live-action version!! Gutsy Mom 1 & 2 Yuria Yo" --auto-select --thread-count 36 --tmp-dir "C:\Users\Gonzalo\AppData\Local\Temp\NIMA-066 Live-action version!! Gutsy Mom 1 & 2 Yuria Yo_1b8abf55_tmp" --mux-after-done mp4 -H "Referer: https://missav.ws/en/nima-066" -H "Origin: https://missav.ws"
5
+
6
+ 17:20:41.291 INFO : N_m3u8DL-RE (Beta version) 20251029
7
+ 17:20:41.292 EXTRA: ffmpeg => C:\Users\Gonzalo\Desktop\extesione sherrameitnas\local-video-downloader\host\bin\ffmpeg.exe
8
+ 17:20:41.293 EXTRA: User-Defined Header => referer: https://missav.ws/en/nima-066
9
+ 17:20:41.293 EXTRA: User-Defined Header => origin: https://missav.ws
10
+ 17:20:41.294 INFO : Loading URL: https://surrit.com/3e06810e-4afd-4053-a7f8-74776f85b806/playlist.m3u8
11
+ 17:20:41.903 INFO : Content Matched: HTTP Live Streaming
12
+ 17:20:41.904 INFO : Parsing streams...
13
+ 17:20:41.906 WARN : Master List detected, try parse all streams
14
+ 17:20:41.909 WARN : Writing meta json
15
+ 17:20:41.912 INFO : Extracted, there are 4 streams, with 4 basic streams, 0 audio streams, 0 subtitle streams
16
+ 17:20:41.912 INFO : Vid 1920x1080 | 8115 Kbps | avc1.640028,mp4a.40.2
17
+ 17:20:41.913 INFO : Vid 1280x720 | 4606 Kbps | avc1.64001f,mp4a.40.2
18
+ 17:20:41.914 INFO : Vid 854x480 | 2514 Kbps | avc1.64001e,mp4a.40.2
19
+ 17:20:41.914 INFO : Vid 640x360 | 1416 Kbps | avc1.64001e,mp4a.40.2
20
+ 17:20:41.915 INFO : Parsing streams...
21
+ 17:20:42.076 INFO : Selected streams:
22
+ 17:20:42.077 INFO : Vid 1920x1080 | 8115 Kbps | avc1.640028,mp4a.40.2 | 1746 Segments | ~01h56m22s
23
+ 17:20:42.077 WARN : Writing meta json
24
+ 17:20:42.081 INFO : Save Name: NIMA-066 Live-action version!! Gutsy Mom 1 & 2 Yuria Yo
25
+ 17:20:42.082 WARN : MuxAfterDone is detected, binary merging is automatically enabled
26
+ 17:20:42.083 INFO : Start downloading...Vid 1920x1080 | 8115 Kbps | avc1.640028,mp4a.40.2
27
+ 17:20:42.525 WARN : Reading media info...
28
+ 17:20:42.567 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 1920x1080, 23.98 fps
29
+ 17:20:42.567 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 4 kb/s
30
+ 17:21:41.739 INFO : Binary merging...
31
+ 17:21:54.678 WARN : NIMA-066 Live-action version!! Gutsy Mom 1 & 2 Yuria Yo.ts
32
+ 17:21:54.679 WARN : Muxing to NIMA-066 Live-action version!! Gutsy Mom 1 & 2 Yuria Yo.MUX.mp4
33
+ 17:22:24.338 WARN : Cleaning files...
34
+ 17:22:24.401 WARN : Rename to NIMA-066 Live-action version!! Gutsy Mom 1 & 2 Yuria Yo.mp4
35
+ 17:22:24.402 INFO : Done