JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #61  
Old 25.04.2016, 12:06
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 612
Default

Define maximum length for file (and package) name using event scripter.
Code:
/*
Script: Tumblr workaround
Trigger:"Packagizer Hook"
*/

var tumblr = /.*\.tumblr.com\/post\/.*/.test(link.getSourceUrls().join());

if (tumblr) {
    var fileName = link.name.replace(/(.+)\..+$/, "$1");
    var fileType = link.name.replace(/.+(\..+$)/, "$1");
    var packageName = link.packageName !== null ? link.packageName : "Unknown";
    var maxLength = 65; // set maximum allowed length for file name (maxLength - 20 will be used for package name)
    var newFileName = fileName.substring(0, maxLength).substr(0, Math.min(fileName.substring(0, maxLength).length, fileName.substring(0, maxLength).lastIndexOf(" ")));
    var newPackageName = packageName.substring(0, maxLength - 20).substr(0, Math.min(packageName.substring(0, maxLength - 20).length, packageName.substring(0, maxLength - 20).lastIndexOf(" ")));
    var user = link.getSourceUrls().join().replace(/.*http:\/\/([^.]+)[^/]+\/post\/.*/, "$1");
    var description = link.name.replace(/\d+\s+-\s+\d+\s+\-\s(.+)\..+$/, "$1");

    link.setName(user + " - " + newFileName + fileType); // filename with prefix (Easier to identify single files in "Various Files" package)
    link.setPackageName(user + " - " + newPackageName); // packageName with prefix

    //link.setName(newFileName + fileType); // filename without prefix
    //link.setPackageName(newPackageName); // packageName without prefix
    //link.setComment(description); // Set the original filename as comment
}
Reply With Quote
  #62  
Old 25.04.2016, 13:52
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 16,199
Default

at least until I change it, thx mgpai. I'm waiting for core updates to come out before I tackle this ticket.

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

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #63  
Old 28.04.2016, 01:13
tomstom
Guest
 
Posts: n/a
Default

Thanks to raztoki and Jiaz I've found this solution to shorten package & filenames:

I used your recipe and defined this Regex in a new Packagizer Rule:

Name: Limit package & filename length to 30 chars

If the following conditions match …
Active: Matches on any File or Link and ignores conditions below
File Name: Contains: (.{30}).*

… then set
Package Name: <jd:orgfilename:1>
Filename: <jd:orgfilename:1>

kind regards,
Tom
Reply With Quote
  #64  
Old 05.05.2016, 12:39
TimWill TimWill is offline
Baby Loader
 
Join Date: Apr 2016
Posts: 7
Default

This seems to be solved? Because I've done some tests a few minutes ago and jdownloader is handling the job flawlessly. I've got some pretty big titles here but there are no issues, everything downloads and runs perfectly.

Great job
Reply With Quote
  #65  
Old 05.05.2016, 13:04
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 16,199
Default

@tomstom
nicer solution than javascript for sure. ;p

@TimWill
No changes have been made as I'm aware. It's only a problem if the uploader has long content descriptions. So this maybe only effects 5% or less of tumblr posts.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #66  
Old 08.05.2016, 22:03
tomstom
Guest
 
Posts: n/a
Default

Because I sometimes had troubles with the Filename-Extensions, I extended my Packagizer Rule which should handle Filenameextension with 3 and 4 characters fine:

File Name: Contains: ^(.{30}).*(\..{3,4})$
Package Name: <jd:orgfilename:1><jd:orgfilename:2>
Filename: <jd:orgfilename:1><jd:orgfilename:2>

At least, in my tests I had no more problems.

Kind regards, Tom
Reply With Quote
  #67  
Old 09.05.2016, 12:27
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 65,456
Default

@tomstom: thanks: btw you can also export your rules so others can easily import it
__________________
JD-Dev & Server-Admin
Reply With Quote
  #68  
Old 18.05.2016, 19:09
wanko wanko is offline
Tornado
 
Join Date: Aug 2015
Posts: 230
Default

so, does anyone have a solution to fix long filename ?
Reply With Quote
  #69  
Old 18.05.2016, 20:54
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 65,456
Default

We will work on it soon
__________________
JD-Dev & Server-Admin
Reply With Quote
  #70  
Old 19.05.2016, 19:13
wanko wanko is offline
Tornado
 
Join Date: Aug 2015
Posts: 230
Default

Quote:
Originally Posted by Jiaz View Post
We will work on it soon
so why we dont have global filename limited ? and auto rename special characters like (",'', ..........)
Reply With Quote
  #71  
Old 19.05.2016, 20:55
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 65,456
Default

auto rename of special chars is already in & working
filename limiting is on todo list
__________________
JD-Dev & Server-Admin
Reply With Quote
  #72  
Old 03.07.2016, 20:39
wanko wanko is offline
Tornado
 
Join Date: Aug 2015
Posts: 230
Default Tumblr filename structure

Last version of JD have filename structure like this
[id post (146820416106)] - number - [desc]

but new update of JD have filename same as direct link (to prevent long path issue......)

**External links are only visible to Support Staff****External links are only visible to Support Staff**
**External links are only visible to Support Staff****External links are only visible to Support Staff** -> e34a6354c6ba1930c213e43b2f5caebf/tumblr_o6divmOjVx1rcufwuo1_r1_540.gif


can we change filename structure to [id post] [number if post have 2+ img,....] [name of tumblr user] [source] ?

**External links are only visible to Support Staff****External links are only visible to Support Staff** (repost)

**External links are only visible to Support Staff****External links are only visible to Support Staff** (source)

so it might be [146836716983] [1-2] [aki-chancharacters] [kozuuki]

thank
Reply With Quote
  #73  
Old 05.07.2016, 01:49
kdbrink kdbrink is offline
Modem User
 
Join Date: May 2015
Posts: 1
Default

I've found that mgpai's script works best for me.
Reply With Quote
  #74  
Old 05.07.2016, 11:58
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 65,456
Default

Thanks for the feedback and thx to mpgai
__________________
JD-Dev & Server-Admin
Reply With Quote
  #75  
Old 07.07.2016, 08:51
travestree travestree is offline
Linkgrabbing Monster
 
Join Date: Oct 2013
Posts: 88
Default Tumblr site rip creates file names too long to download

I tried to rename all the files to a random file name hoping the auto rename on "existing" feature would work, but it simply assumed the rest were mirrors.
**External links are only visible to Support Staff****External links are only visible to Support Staff**
**External links are only visible to Support Staff****External links are only visible to Support Staff**

06.07.16 22.34.57 <--> 06.07.16 23.44.44 jdlog://6288135891641/

Is there a way to truncate file names to be windows compatible?
Reply With Quote
  #76  
Old 22.07.2016, 14:11
Patr100 Patr100 is offline
JD VIP
 
Join Date: Jan 2010
Posts: 478
Default Tumblr images

JD is incorrectly reporting " invalid download directory" for some files only.
I think it is due to the filenames generated - either too log or forbidden characters

log file
19.07.16 18.17.52 <--> 22.07.16 13.03.14 jdlog://3396971887641/

Sample urls

**External links are only visible to Support Staff****External links are only visible to Support Staff**
**External links are only visible to Support Staff****External links are only visible to Support Staff**
**External links are only visible to Support Staff****External links are only visible to Support Staff**
**External links are only visible to Support Staff****External links are only visible to Support Staff**
**External links are only visible to Support Staff****External links are only visible to Support Staff**
**External links are only visible to Support Staff****External links are only visible to Support Staff**
**External links are only visible to Support Staff****External links are only visible to Support Staff**
**External links are only visible to Support Staff****External links are only visible to Support Staff**
**External links are only visible to Support Staff****External links are only visible to Support Staff**
**External links are only visible to Support Staff****External links are only visible to Support Staff**
Reply With Quote
  #77  
Old 09.11.2016, 14:35
Kira300467 Kira300467 is offline
Wind Gust
 
Join Date: Mar 2009
Posts: 41
Default Temporary solution?

Under CRAWLER directory there is a file called "tumblr.com.json" its from September 10.
There is a definition variable inside:

"useoriginalfilenameenabled" : false

Changing this setting on "true", what will happen?

Is this already a solution, or I am barking up the wrong tree?

I would be very interested on a temporary solution, I only don't know which file to edit, would be happy to try the script above.;)
Reply With Quote
  #78  
Old 09.11.2016, 21:20
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 48,696
Default

I closed the ticket as this needs a general fix/workaround - not plugin specific.

GreeZ pspzockerscene
EDIT
Ticket:
__________________

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
Reply With Quote
  #79  
Old 10.11.2016, 12:38
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 65,456
Default

@Kira300467:
Go to Settings-Plugins. there you will find tumblr.com twice (one for hoster, one for decrypter), there you can change this option to get shorter(original fileserver) name
__________________
JD-Dev & Server-Admin
Reply With Quote
Reply

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:55.
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.