JDownloader Community - Appwork GmbH
 

Notices

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 02.06.2013, 06:08
goseecal5
Guest
 
Posts: n/a
Default mega.co.nz should use temp name while decrypting

Example: downloading file named "file.zip"

During a download 1 file exists in download folder:
file.zip.part

During decrypting 2 file exists in download folder:
file.zip
file.zip.decrypted

This is bad because I've had experience of clicking on "file.zip", JD trys to finish decrypting but creates error because application has open handle on "file.zip".

Fix would be to not use final name "file.zip" until decrypting done.

During decrypting 2 temporary names should be use like:
file.zip.temp
file.zip.decrypted
  #2  
Old 03.06.2013, 19:00
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

added plugin option todo that.

See how you go with it once it comes out.

it will do
'filename.tmp' (linkgrabber) > 'filename.tmp.part' (download) > 'filename.tmp' (post download) > 'filename.tmp.decrypted' (during decrypt) > filename (finished)
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
  #3  
Old 04.06.2013, 03:11
goseecal5
Guest
 
Posts: n/a
Default

Thank you for addressing issue. I look forward to update.

If you can, would you also address this mega.co.nz issue:
show MEGA "decrypt" status in package
http://svn.jdownloader.org/issues/8306
  #4  
Old 04.06.2013, 12:24
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

sorry not at this given time
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
  #5  
Old 07.06.2013, 09:52
wasabiman123
Guest
 
Posts: n/a
Default

I tried new option and it does not work correctly.

Example:
I download a file name 'some.file.name.rar'

If i enable new option, the finished file is named 'some.file.name' which is incorrect. The extension got lost

If i disable option and download same file, the finished file is named 'some.file.name.rar'
  #6  
Old 07.06.2013, 09:57
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

I never rename the extension, I only append .tmp at the end during linkgrabbing services. and then only remove the first trailing .tmp (if tmp was used) after decrypting has finished. So I don't see how it's possible.

linkgrabber task

Code:
            // we can not 'rename' filename once the download started, could be problematic!
            if (link.getDownloadCurrent() == 0 && useTMP()) {
                link.setFinalFileName(fileName + ".tmp");
                link.setProperty("usedTMP", true);
                try {
                    link.setComment(".tmp will be removed after decryption!");
                } catch (Throwable e) {
                }
                link.getLinkStatus().setStatusText(".tmp will be removed after decryption!");
            } else if (link.getDownloadCurrent() != 0) {
                // leave the fk alone
            } else {
                link.setFinalFileName(fileName);
                link.setProperty("usedTMP", Property.NULL);
                try {
                    link.setComment(null);
                } catch (Throwable e) {
                }
                link.getLinkStatus().setStatusText(null);
            }
and decrypting task

Code:
        File dec = new File(link.getFileOutput() + ".decrypted");
        File org = new File(link.getFileOutput());
        File fin = new File(link.getFileOutput());
        if (link.getBooleanProperty("usedTMP", false)) {
            fin = new File(link.getFileOutput().replaceFirst("\\.tmp$", ""));
        }
out of curiosity what link caused it?
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]

Last edited by raztoki; 07.06.2013 at 10:13.
  #7  
Old 07.06.2013, 10:14
wasabiman123
Guest
 
Posts: n/a
Default

After some testing i found the new option has conflict when packagizer is used to set filename.

I add hoster to filename. In packagizer
...then set
filename: abc.<jd:orgfiletype>

When plugin option is enabled, linkgrabber adds 'some.file.name.tmp'
  #8  
Old 07.06.2013, 10:27
wasabiman123
Guest
 
Posts: n/a
Default

To answer your question, I don't remember filename. i just picked a few random links from here:
**External links are only visible to Support Staff****External links are only visible to Support Staff**
  #9  
Old 07.06.2013, 11:25
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

Well that answers that then, I can't do much about package customiser rules. Plugins have no control over what the user does! Clearly you wont be able to use that package customiser rule with mega.co.nz host as it conflicts.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
  #10  
Old 07.06.2013, 12:02
wasabiman123
Guest
 
Posts: n/a
Default

I don't know programming but isn't it possible to make the plugin option compatible with packagizer?

The plugin option is changing the definition of <jd:orgfiletype>. Can't the file type be defined and then the plugin option goes in and adds the .tmp extension?

Or the other possibility is to do the renaming during decryption step as goseecal5 suggested. Right now you're adding .tmp during downloading which isn't necessary since JD2 already adds .part extension. So don't do any changes during linkgrabber task, but during decrypting task start add .tmp and when finish decrypting task remove .tmp
  #11  
Old 07.06.2013, 18:34
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

can you export the package customiser rule in question upload as zip/rar attachment for me. Thanks
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
  #12  
Old 07.06.2013, 20:11
wasabiman123
Guest
 
Posts: n/a
Default

packagizer rule attached

the rule has test url for file 'NVIDIA-linux-x86_64-304.64.rar'

with plugin option enabled, the '.rar' gets lost
Attached Files
File Type: zip mega.co.nz.zip (672 Bytes, 444 views)
  #13  
Old 08.06.2013, 12:54
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

Thanks for the rule, makes my easier, and I'm now sure I have the situation for JDownloader 2 sorted. I can't make any commits until Monday as it requires Core updates also, which I don't believe I have the rights to trigger. The linkgrabber code I pasted above only gets used by older versions of JD for backward compatibility. JD2 wont rename the file within GUI, or touches any filename references within DownloadLink other than changing the fileoutput location just before it writes to storage medium.

raztoki
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]

Last edited by raztoki; 08.06.2013 at 12:56.
  #14  
Old 08.06.2013, 17:16
rocknard rocknard is offline
Vacuum Cleaner
 
Join Date: Oct 2009
Posts: 18
Default

When i download various files from MEGA, there are some files i get "error decrypting" and i don't know how to "re-scan" for properly decrypt...

Last edited by rocknard; 08.06.2013 at 17:19.
  #15  
Old 08.06.2013, 17:19
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

@rocknard
not possible at this stage. It's done within the hoster free download method once the download finishes. We do have a SVN ticket to add support

__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
  #16  
Old 08.06.2013, 20:51
wasabiman123
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by raztoki View Post
Thanks for the rule, makes my easier, and I'm now sure I have the situation for JDownloader 2 sorted. I can't make any commits until Monday as it requires Core updates also, which I don't believe I have the rights to trigger. The linkgrabber code I pasted above only gets used by older versions of JD for backward compatibility. JD2 wont rename the file within GUI, or touches any filename references within DownloadLink other than changing the fileoutput location just before it writes to storage medium.

raztoki

Thank you for putting time into this.
  #17  
Old 16.06.2013, 09:33
kbdjrzdu
Guest
 
Posts: n/a
Default

Is this fix still waiting to be pushed out? I've been watching for it but still see final name during decrypting in current JDownloader 2
  #18  
Old 17.06.2013, 17:42
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

works as intended, Jiaz changed my implementation and it no longer works in jdownloader 0.9/nightly branches
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
  #19  
Old 18.06.2013, 01:26
goseecal5
Guest
 
Posts: n/a
Default

It's not working for me.

Here is what currently happens:

During download 1 file exists in download folder:
file.zip.encrypted.part

During decrypting 2 file exists in download folder (This problem step because final name exists before done):
file.zip.encrypted
file.zip

After decrypting finish 1 file exists in download folder:
file.zip



What should happen:

During decrypting 2 file exists in download folder:
file.zip.encrypted
file.zip.decrypted
  #20  
Old 18.06.2013, 15:13
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,921
Default

Please post example links and a log.
You're the only one complaining.

GreeZ psp
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
  #21  
Old 19.06.2013, 02:21
kbdjrzdu
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by pspzockerscene View Post
Please post example links and a log.
You're the only one complaining.

GreeZ psp

This issue has been going on for a while and it seems like you're copying and pasting a response without actually investigating the issue.

Here is a link:
**External links are only visible to Support Staff****External links are only visible to Support Staff**

If you actually tried downloading and watching filenames you'll see that the real final name is used during decryption instead of some temporary name.

Please try this for yourself.
  #22  
Old 19.06.2013, 09:47
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

It was designed in this manner by jiaz to prevent lock related issues associated with virus scanners. The final step the decryption task will save the output as the final filename.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
  #23  
Old 20.06.2013, 05:23
kbdjrzdu
Guest
 
Posts: n/a
Default

The issue everyone is discussing is that the final name shows before everything is finished and we're back to square one with current JD2. During decrypting step, the final name is showing even though it's not ready to be read/edited/renamed/moved

A few updates back you made it like this

Quote:
Originally Posted by raztoki View Post
it will do
'filename.tmp' (linkgrabber) > 'filename.tmp.part' (download) > 'filename.tmp' (post download) > 'filename.tmp.decrypted' (during decrypt) > filename (finished)
Which was great because final name only shows after everything is finished.


Quote:
to prevent lock related issues associated with virus scanners
I don't understand this issue. I tried searching board.jdownloader.org and svn.jdownloader.org but couldn't find anyone talking about this issue. Would you explain the problem?

It's odd issue because:
1. Vast majority of download files are either media files or rar files which usually don't trigger virus scanner
2. For typical hoster like rapidshare, JD2 downloads to a temporary name 'Filename.ext.part' then renames it to final name 'Filename.ext'. So there is potential there for virus scanner to lock file in the time after download finishes but before rename finishes.
Asking to decrypt into temp name and rename into final name would have same lock risk.


Would you please consider making this change?

I'm spending time requesting this issue because it would take small coding effort but would remove an ongoing issue. Just 2 renames:
Decrypt into temp name
After delete encrypted file, rename decrypted file into final name
  #24  
Old 20.06.2013, 06:19
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

Jiaz must have thought his way was better, my code worked but required lot more renames which I believe Jiaz wanted to move away from. We talked about it over IRC mainly in private message between him and myself, so no public record of that at all. At first Jiaz didn't want to support this feature at all until my first hacked up versions heh. Then wanted it improved hence second revision.. I guess his final review of my changes, he also wanted to move away from supporting two versions (I left my first revision in the code for 0.9/old nightly) so now older jd versions do not have this feature available at all.

Locks are not a problem for the main download core, filename.exe.part > filename.exe as with JD2 on failure it will copy to do the task and leaves .part present also. So I guess his point is, if every one of these following tasks ''filename.tmp.part' (download) > 'filename.tmp' (post download) > 'filename.tmp.decrypted' (during decrypt)' > filename (finished) was present you would have (without taking into account the crypted size variation) 4 x filesize.

He will most likely read this when he gets to work. See what he has to say.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
  #25  
Old 20.06.2013, 11:48
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

Jiaz said he would implement a plugin setting to follow my original designed behaviour, for those that want to use it in that manner.

happy happy joy joy ?
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
  #26  
Old 20.06.2013, 13:30
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,921
Default

Setting is now implemented by Jiaz!

GreeZ pspzockerscene
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
  #27  
Old 20.06.2013, 20:52
goseecal5
Guest
 
Posts: n/a
Default

Everything works perfectly. Thank you everyone for putting time into this. Thank you.
  #28  
Old 20.06.2013, 21:21
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,921
Default

Thanks for the feedback.

GreeZ pspzockerscene *closed*
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 19:25.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.