PDA

View Full Version : Bug processing mvids, avi and mpg files?


helenoksen
12-16-2005, 01:21 AM
Hi snype and thank you for a lovely script, amazing job!

Here's the problem;

1st guy:
uploads a .avi file
2nd guy:
uploads the .sfv at the same time the 1st guy is uploading the .avi file
then when psio is done processing the .sfv file the client shows me this, and psio renames the .avi file to .bad, and also creates a complete tag, [SITE] - ( 0% COMPLETE ) - [SITE]
[2] (06:31:38) 226-.----=== ZipScript-PHP ===--,d1'--=== ported ===---.
[2] (06:31:38) 226-| + SFV-file: oK! |
[2] (06:31:38) 226-| + Bad : file.avi |
[2] (06:31:38) 226-`-[--------------------]------------------[ 0/1 ]--'
at this moment the 1st guy is still uploading the .avi file, and when he is done, the file is still named .avi.bad and the complete tag still shows the same, [SITE] - ( 0% COMPLETE ) - [SITE]

my settings:
/* These file types are allowed without any checks (types need to be also ignored)
*/
$allowed_types = "jpg,cue,m3u";
(tried with this also, "jpg,avi,cue,m3u", but got the same results) I'm not really sure about these settings since if you have other sections except mvids, say xxx, which allows avi's and mpg's in their sample dirs, then removing these file types would force psio to crc-check them? hmm did i get that right?

/* Force sfv to be uploaded first, before accepting any files
*/
$force_sfv_first = FALSE;

/* Video EXTENSIONS
*/
$video_ext = "mpg,mpeg,m2v,avi";

I tried the same procedure with .mpg files and instead of giving me a .bad file + complete tag, php.exe goes into a for-loop or something instead and the cpu is up at 100%, and i have to manually terminate php.exe

Planning on upgrading to 0.1.5 ASAP.

Let me know if you need any help testing,

h

ioFTPD 5.8.5r
psio 0.1.4

SnypeTEST
12-16-2005, 10:29 AM
ah. yep sounds about right. Never though about the situation. I'll take a look at it.

SnypeTEST
12-16-2005, 10:32 AM
In the meantime, $force_sfv_first = true;

SnypeTEST
12-16-2005, 10:43 AM
this 'fix' is very tricky. You can do 2 things. I recommend A.

A: $force_sfv_first = true;

OR...

B: open funcs.php
Look for & Remove the following peice of code:


/* File Exists but never recorded */
if ((file_exists($file) == TRUE) and ($fileinf["filename"] == "")) {
$fileinf["filename"] = $file;
$fileinf["crc"] = strtolower(checksum($fileinf["filename"]));
$fileinf["speed"] = 0;
$filesize = filesize($file);
$filesize = $file / 1024 / 1024;
$fileinf["size"] = $filesize;
$fileinf["good"] = "nc";
addfile($fileinf);
}

helenoksen
12-17-2005, 03:24 AM
I did try force sfv first but i forgot to mention it in my first post. It does indeed 'fix' the problem but this will conflict with other sections where you dont want to have this enabled.

If I remove those lines in funcs.php, will this affect any other parts of the code, or can they be removed safely?

Hope to see the real fix in v2 :)

SnypeTEST
12-17-2005, 11:41 AM
its a ultra-semi-real fix. That piece of code is a safe guard for like lets say... you manually go in through windows explorer and copy files to the release folder. ( which probably won't happend ).