JDownloader Community - Appwork GmbH
 

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: 16,215
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: 16,215
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: 16,215
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: 16,215
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: 16,215
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: 16,215
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: 16
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: 16,215
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: 16,215
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 offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 48,756
Default

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

GreeZ psp
__________________

Ad-free installers || Werbefreie Installer
Windows Setup<--JD2 BETA-->Linux Setup x86 || Linux Setup x64 || Mac Setup
-----=>Support Chat<=-----
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
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 23:54.
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 - 2019, Jelsoft Enterprises Ltd.