Skip to content

Commit

Permalink
Mensaje de completado.
Browse files Browse the repository at this point in the history
Ya no habre carpetas al terminar.
  • Loading branch information
forestrf committed Aug 24, 2014
1 parent e48eaa3 commit 7ae1d45
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
9 changes: 5 additions & 4 deletions Project files/RTMP-Downloader/Descargador.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class Descargador
public string horaRestanteString = "";

Boolean cancelado = false;
public String fallado = "";
public String estado = "";

ProcessStartInfo procesoRTMPDUMP;
Process exeProcessProcesoRTMPDUMP;
Expand Down Expand Up @@ -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;
}

Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions Project files/RTMP-Downloader/HTML.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ public static class HTML
"<div class=\"q\">Quitar</div>" +
"</div>";
for (int i=0; i<MainClass.descargasEnProceso.Count; i++) {
if (MainClass.descargasEnProceso [i].fallado != "") {
if (MainClass.descargasEnProceso [i].estado != "") {
resp += "<div class=\"elemento\">" +
"<div class=\"n\">" + MainClass.descargasEnProceso [i].nombre + "</div>" +
"<div class=\"u\">" + MainClass.descargasEnProceso [i].url + "</div>" +
"<div class=\"p\">"+MainClass.descargasEnProceso [i].fallado+"</div>" +
"<div class=\"p\">"+MainClass.descargasEnProceso [i].estado+"</div>" +
"<div class=\"t\"></div>" +
"<div class=\"q\"><a href=\"/?accion=cancelarDescarga&elem=" + i + "\">Quitar</a></div>" +
"</div>";
Expand Down
13 changes: 2 additions & 11 deletions Project files/RTMP-Downloader/MainClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
}
}
}

0 comments on commit 7ae1d45

Please sign in to comment.