From 7ae1d45948f11bc651f2b3ef7f73176a3ef1d031 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Leone?= Date: Sun, 24 Aug 2014 17:29:41 +0200 Subject: [PATCH] Mensaje de completado. Ya no habre carpetas al terminar. --- Project files/RTMP-Downloader/Descargador.cs | 9 +++++---- Project files/RTMP-Downloader/HTML.cs | 4 ++-- Project files/RTMP-Downloader/MainClass.cs | 13 ++----------- 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/Project files/RTMP-Downloader/Descargador.cs b/Project files/RTMP-Downloader/Descargador.cs index 5401b87..2cfa967 100644 --- a/Project files/RTMP-Downloader/Descargador.cs +++ b/Project files/RTMP-Downloader/Descargador.cs @@ -19,7 +19,7 @@ public class Descargador public string horaRestanteString = ""; Boolean cancelado = false; - public String fallado = ""; + public String estado = ""; ProcessStartInfo procesoRTMPDUMP; Process exeProcessProcesoRTMPDUMP; @@ -106,7 +106,7 @@ public bool download () Console.WriteLine ("RTMPDump ha fallado."); Debug.WriteLine(Utilidades.WL("RTMPDump ha fallado")); Debug.WriteLine(Utilidades.WL(e.ToString())); - fallado = "RTMPDump ha fallado"; + estado = "RTMPDump ha fallado"; return false; } @@ -116,14 +116,15 @@ public bool download () // return true; if (porcentajeInt == 0) - fallado = "Fallo"; + estado = "Fallo"; else { porcentaje = 100; porcentajeInt = 100; + estado = "Terminado"; } - return !cancelado; + return !cancelado && estado == "Terminado"; } public void p_OutputDataReceived(object sender, DataReceivedEventArgs e) diff --git a/Project files/RTMP-Downloader/HTML.cs b/Project files/RTMP-Downloader/HTML.cs index 863f9cd..3298374 100644 --- a/Project files/RTMP-Downloader/HTML.cs +++ b/Project files/RTMP-Downloader/HTML.cs @@ -106,11 +106,11 @@ public static class HTML "
Quitar
" + ""; for (int i=0; i" + "
" + MainClass.descargasEnProceso [i].nombre + "
" + "
" + MainClass.descargasEnProceso [i].url + "
" + - "
"+MainClass.descargasEnProceso [i].fallado+"
" + + "
"+MainClass.descargasEnProceso [i].estado+"
" + "
" + "" + ""; diff --git a/Project files/RTMP-Downloader/MainClass.cs b/Project files/RTMP-Downloader/MainClass.cs index fde5d8f..454d22d 100644 --- a/Project files/RTMP-Downloader/MainClass.cs +++ b/Project files/RTMP-Downloader/MainClass.cs @@ -16,7 +16,7 @@ public static class MainClass public static string rtmpdumpFile = ""; public static string relativePath = ""; - public static string version = "0.3.3"; + public static string version = "0.3.4"; public static int puerto = 25432; @@ -322,16 +322,7 @@ public static void Main (string[] cmdLine) nombre = "video" + j + ".mp4"; } - if (miDescargador.Comienza (url, nombre)) { - //Abrir carpeta que tiene el video - //string myDocspath = Environment.GetFolderPath (Environment.SpecialFolder.MyDocuments); - string windir = Environment.GetEnvironmentVariable ("WINDIR"); - System.Diagnostics.Process prc = new System.Diagnostics.Process (); - prc.StartInfo.FileName = windir + @"\explorer.exe"; - prc.StartInfo.Arguments = configs.rutaDescargas; - prc.Start (); - } - + miDescargador.Comienza (url, nombre); } } } \ No newline at end of file