Log in

View Full Version : SFV integration


Csimbi
07-25-2003, 07:47 AM
I have a feature that would be nice to have in future versions.
It is about integration of SFV checks into FlashFXP.
Here are the options that are needed:
[Checkbox1] Check SFV files if exist.
[Checkbox2] Re-download failed files [SpinEdit1] times.

Dynamic behaviour:
[Checkbox1]::OnChange(...) {
if ([CheckBox1]->Enabled)
{
[Checkbox2]->Enabled=true;
[SpinEdit1]->Enabled=true;
//... other code if needed
}
else
{
[Checkbox2]->Enabled=false;
[SpinEdit1]->Enabled=false;
//... other code if needed
}
}


How it would work when it is turned on:
1. SFV files downloaded first from the server is they exist (each if there are more) in the dir where the files are.
2. When a file is downloaded, its CRC is checked.
3. Let's see what we have to do.
switch (CRC){
case good: break; //nothing to do - just remove from queue as usually

case bad:{
if ([CheckBox1]->Enabled && ![CheckBox1]->Enabled)
{
AddToLog(Source, "SFV CRC check failed.); // Add an entry to log that CRC failed
MarkFailedInQueue(Source): // Mark the file failed in the queue
break;
}
if ([CheckBox1]->Enabled && [CheckBox1]->Enabled)
{
if(Source->CRCRetry<=SpinEdit1->Value)
{
DeleteLocalFile("Target"); //Delete bad local file
MoveFileInQueueToFront(Source); // Move the file to the front of the queue
Source->CRCRetry++; // Increase re-download counter
}
else
{
AddToLog(Source, "SFV CRC check failed.); // Add an entry to log that CRC failed
MarkFailedInQueue(Source): // Mark the file failed in the queue
}
}
break;
}
For otimization You could for example cache the CRCs from the SFV files into the queue, and calculate CRC while downloading (in this case remember to check CRC on resumed files also).

So what do You think?
Would be a nice addition I believe, and would save users with bad connection a lot of time and work.

DYN_DaTa
07-25-2003, 08:40 AM
Already suggested, next time use 'search' function.

Csimbi
07-25-2003, 10:49 AM
Oh, really?
Sorry about the dupe then.

MxxCon
07-25-2003, 06:51 PM
untill there is "native" SFV support, you can use this
http://forum.flashfxp.com/showthread.php?s=&threadid=3101&highlight=sfv