#1
|
|||
|
|||
[API] - downloadsV2/setDownloadDirectory not working for extracted packages
Hi,
I am using the API "downloadsV2/setDownloadDirectory" for downloaded packages to move them into a "finished" directory. This works fine for packages in status "Fertiggestellt". But for packages that got extracted and have status "Entpacken OK" it does not work because the actually data will not be moved to the new location. But the "Speichern unter..." column shows the new location. This behavior is 100% reproducible for me. As the API is quite simple I suspect this might be a JD bug? I am using the latest versionon Windows 10. |
#2
|
|||
|
|||
Appears to be working fine. It will move only the downloaded files (archives) and not the extracted files.
|
#3
|
|||
|
|||
Hm okay, in a way that makes sense. But when I use the local JD UI and choose "Einstellungen -> Downloadpfad setzen" then it will also move the extracted files (unlike the API).
|
#4
|
|||
|
|||
I tried with context menu command "Properties > Set Download Directory". Only the downloaded files were moved. The extracted files remained in the original location. Perhaps @Jiaz can provide more info.
To move extracted files you can use packagizer rules (folder structure will not be preserved OR use the eventscripter API. It will give you more control over how/where the files are moved. |
#5
|
||||
|
||||
@vbs: That action also does only move the (downloaded)files in list. It does not move any extracted file.
Of course the files will be extracted into new directory after they have been moved.
__________________
JD-Dev & Server-Admin |
#6
|
||||
|
||||
What exactly are you trying to achieve? Then we can help better
__________________
JD-Dev & Server-Admin |
#7
|
|||
|
|||
Oh, I have to apologize: I tested it again using the local UI and contradictory to what I claimed before it does *not* move the extracted files. So it is the same behavior as the API. It probably it is intended that way then.
Sorry, I must have done something wrong or overlooked something last time I checked. Thanks for the info. EDIT: @Jiaz Behaves for me as you just described it. Sorry, my bad. I can code it another way, thanks |
#8
|
||||
|
||||
@vbs: all fine nohing to be sorry for.
Yes, It's intended behaviour because JDownloader only knows about the downloaded file but doesn't *remember* everything extracted... What exactly do you want to achieve? then we can try to help, for example via eventscripter api
__________________
JD-Dev & Server-Admin |
#9
|
|||
|
|||
In the end I just to want to move finished (and extracted downloads) to another folder and then delete the package from the download view automatically.
I guess there is also at least one way in JD itself to achieve this but since I am using the JD API anyway I tried to go that way. |
#10
|
||||
|
||||
@vbs: why wait for the extraction to finish and then move the files? why not specify final extraction directory before extraction?
__________________
JD-Dev & Server-Admin |
#11
|
|||
|
|||
To avoid different situations that might lead to an "unclean" state in the finished directory like extractions in progress. Or extractions that got interrupted by a full HDD or a CRC error. Maybe other situations.
The aim is to have a target directory that only contains fully and correctly extracted packages. |
#12
|
||||
|
||||
@vbs: but you always have the *final* state within JDownloader. Just let it extract into destination XY and JDownloader will mark the file as finished/extracted if extraction was successful. So you just query status and then check if it is finished = fine, move the file
if the file is part of archive, then wait for extraction to be fininished and you can even enable auto deletion of archive parts, so nothing to move at all.
__________________
JD-Dev & Server-Admin |
#13
|
|||
|
|||
Ok thank you, I will consider that.
|
#14
|
||||
|
||||
In case you need help, just ask
__________________
JD-Dev & Server-Admin |
Thread Tools | |
Display Modes | |
|
|