Not checking final destination if downloaded/extracted
smvueno opened this issue · 2 comments
The downloader is not checking if the game already exists in the final PS3 pkg folder or Extracted folder.
Which means it downloads the game again and extracts it again.
If I'm not mistaken, when the file already exists in the extracted folder it means the download was successful right?
Probably need to input a check if the folder/file exists in the final destination.
Then have the downloader skip the unnecessary download and extra extraction.
If I'm not mistaken, when the file already exists in the extracted folder it means the download was successful right?
Only if the user downloaded this game before. Download happens inside PKG folder
Probably need to input a check if the folder/file exists in the final destination.
This is not a good solution simply because I can't be sure if the pkg inside the PS3 folder is actually a pkg or game that's not broken or that got corrupted for some reason, it's not as simple as checking if there's a file with the same name there, that's not a good practice, specially for downloaders. See for example your browser, when you download two files with the same name, it'll just add a (1) in the name (I think that's what I might do, but I need to check how well it deals with other systems, PSP/PSX eboot games for example are very sensitive to renaming, so if I can't solve it for them, I won't be solving for the others).
The only good way I can see of implementing this is with checksums, but nopaystation has them missing for a lot of files so that's also not possible to implement.
So no skipping downloads unfortunately.
Ok, I've decided I will let this in the users' hands. I really can't know if the file in the destiny is real because:
- it can get corrupted;
- the software wouldn't know the difference between a real pkg file and a empty file, for example, with the pkg extension;
- the number of games with checksums in the nopaystation database is too small, so I can't match the newly downloaded file with the one already extracted unless I manually hash bot files, but what would happen if I actually get a corrupted download? It would replace a possible good file with a broken one.
I won't be renaming games because:
- PSX/PSP eboots don't like to have their names messed with, and they're extracted inside folders;
- PSVita packages are also extracted inside folders, and they're even more sensitive to name changes;
- I can't do it to PS3 only because I need to have as much feature parity as possible, why do it with "pkgs" and not "isos"? Why to "isos" and not "csos" or "zips"?
So I'll be closing the issue because it seems inviable.