#61
|
|||
|
|||
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 } |
#62
|
||||
|
||||
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. :] |
#63
|
|||
|
|||
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 |
#64
|
|||
|
|||
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 |
#65
|
||||
|
||||
@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. :] |
#66
|
|||
|
|||
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 |
#67
|
||||
|
||||
@tomstom: thanks: btw you can also export your rules so others can easily import it
__________________
JD-Dev & Server-Admin |
#68
|
|||
|
|||
so, does anyone have a solution to fix long filename ?
|
#69
|
||||
|
||||
We will work on it soon
__________________
JD-Dev & Server-Admin |
#70
|
|||
|
|||
so why we dont have global filename limited ? and auto rename special characters like (",'', ..........)
|
#71
|
||||
|
||||
auto rename of special chars is already in & working
filename limiting is on todo list
__________________
JD-Dev & Server-Admin |
#72
|
|||
|
|||
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 |
#73
|
|||
|
|||
I've found that mgpai's script works best for me.
|
#74
|
||||
|
||||
Thanks for the feedback and thx to mpgai
__________________
JD-Dev & Server-Admin |
#75
|
|||
|
|||
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? |
#76
|
|||
|
|||
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** |
#77
|
|||
|
|||
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.;) |
#78
|
||||
|
||||
I closed the ticket as this needs a general fix/workaround - not plugin specific.
GreeZ pspzockerscene EDIT Ticket:
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#79
|
||||
|
||||
@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 |
#80
|
||||
|
||||
The tumblr.com crawler has been fixed.
Regarding too long filenames: Settings -> Plugins -> tumblr.com -> Use original filenames -> Enable this (is only applied to all items added after changing it) -psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
Thread Tools | |
Display Modes | |
|
|