#1
|
|||
|
|||
![]()
Yes, I know. This has been discussed before... kind of. But, there isn't a general solution to the problem.
This is the issue: There are a large number of websites that *do not* have JD2 plugins (that could be setup to prefer JPG over WEBP). So, JD2 downloads WEBP. This is a problem because a large number of image viewers do not support WEBP. But, it gets worse. There are many sites (again, without plugins) that will be indexed by LinkGrabber correctly. The files it lists in JD2 are JPG. However, once the links are passed to Downloads and the download process begins, the JPG links are converted into WEPB in real-time and downloaded as WEPB. I am at a loss here. And yes, I can convert WEPB into JPG using third party software and/or creating Batch files for JD2 to post-execute and change format. BUT, why bother going through all that if JD2 could just download the correct format in the fist place? Example: **External links are only visible to Support Staff****External links are only visible to Support Staff** Tx for a great app! |
#2
|
||||
|
||||
![]()
Where?
Please provide a link for context. Quote:
If there is no plugin available for a website, JD prefers no specific format but downloads everything. If you get webp-only for such websites, either our parser is broken or this is the only format the website(s) provide. I can't help with this without example URLs. Quote:
JD only converts files in very very very rare cases (e.g. YT downloads). What you describe is most likely the following scenario (again I can't be 100% sure since you did not provide any examples): 1. JD checks links of a particular website and the website says "this file has '<filename>.jpg'". Now once the download is started, that website returns a header of a different content-type (the "real" file type) so JD corrects the extension just before the download is started. The changing extension you see is only the text inside the file name - a conversion is not happening! Your browser will do the same thing. Example: imagecache.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/92cfe628-70b8-42ec-a8ad-e451f23ff100/width=1280/00193-3556647833.png -> According to the file name in the link, this is a png file but according to the header, it is a jpeg file. JDownloader will download this file as .jpg/.jpeg file and so does your browser. Quote:
Here is what technically happens: 1. You add an nhentai gallery link like nhentai.net/g/123456/ 2. The crawler wants to provide a nice usability and you expect the links to appear in your linkgrabber very fast so links are not checked one by one at this stage but the crawler just returns "hey I found 40 image links that are online and should have file names XY". It sets ".jpg" as [temporary] file extension which is sometimes correct, sometimes not (see explanation down below). 3. Now when the download is started later on or when a single linkcheck is initiated, the file extension will be corrected to the real one. A conversion does not happen! From your example: Code:
nhentai.net/g/556944/1/ Code:
i2.nhentai.net/galleries/3242990/1.webp Example where nhentai provides .jpg images: Example: Code:
nhentai.net/g/123456/1/ Code:
i4.nhentai.net/galleries/770283/1.jpg Quote:
You can even do this inside JDownloader using an EventScripter script. EventScripter subforum: https://board.jdownloader.org/forumdisplay.php?f=52 EventScripter help article: https://support.jdownloader.org/know...event-scripter Alternatively, feel free to contact the nhentai.net support and ask them to provide the images in both .jpg and .webp formats. Thanks!
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download Last edited by pspzockerscene; 18.02.2025 at 17:51. Reason: Improved readability; added thanks |
#3
|
||||
|
||||
![]()
Addendum, specifically about the nhentai.net crawler:
I just found out that there is indeed a way to find the final file extension right away since the thumbnails of the images are in the same format as the full size images. Now this will not "fix" your problem but this will change the behavior in a way that the names you see in the linkgrabber will be the final names already e.g. the .webp images will have the correct .webp file extension right away. The update has just been released and only affects items added after installing the update.
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#4
|
||||||||||
|
||||||||||
![]()
As requested:
https://board.jdownloader.org/showthread.php?t=96085 https://board.jdownloader.org/showthread.php?t=83015 Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
![]() Anyhow, thanks for taking the time to explain. Max |
#5
|
||||
|
||||
![]()
Thanks though I see two unrelated threads there.
One is for a seemingly unsupported website where the user did not even provide example links. The 2nd thread is about "hitomi.la" which we support via plugin. That website provides multiple possible image formats so back then we've added a setting. Your case is different: nhentai.net only has one format and it can be either .jpg or .webp. Got it. You can do this using EventScripter scripts and/or filters. The thing for "unsupported" websites is: JD cannot know that two links to a file with the same name but different extension really lead to the same file thus just eliminating one file-type is prone to error. I recommend using filters and/or customized linkgrabber views. See Settings -> Linkgrabber filter If you know the website well enough, you could also combine this with an EventScripter script that removes unwanted formats for specific websites. The link you provided was going to a website supported via plugin while you were [also] talking about unsupported websites. Quote:
All I wanted to say was: JD is not doing a conversion. Quote:
Just open those links in your browser -> Rightclick on an image -> Save to -> And you will get .webp files just like in JDownloader. Wrong since I was solely talking about the "single-file-download-part" which works very similar in JD and browser: The browser prefers the content-type from the header [or even from the file itself] over the file-extension given inside that URL(!) You can even see your browser correcting the file name froim the URL, exactly like JD does: Takes this part from the URL: 00193-3556647833.png -> Corrects it to: 00193-3556647833.jpeg If the URL had no usable file name, you brower (and also JDownloader) would fall back to another part of the URL and use that as file name and append the correct file extension. You can't know this for sure unless you contact the nhentai.net support and ask them if this is intended. If you do so, please let me know what they replied. Yap and there won't ever be one. Though if you look for a documentation on how browsers decide why names of downloaded files look like they look, you most likely won't find a documentation either. Anyways, maybe my reply is enough documentation for you for this specific topic^^ Quote:
If not, you can still ask other users here to help you. Just as an unrelated example, even without ChatGPT: People built websites that can be used to create FFmpeg commands in an easy way to convert media files: Example 1: alfg.dev/ffmpeg-commander/ Example 2: ffmpeg.lav.io/ Doing a very quick research, FFmpeg should even be able to convert images, see: superuser.com/questions/606800/converting-image-format-to-jpeg-using-ffmpeg Feel free to provide further examples for other websites with "the same problem". Though tbh your problem is very very easy to solve with a simple "convert webp to jpg" EventScripter script. In our EventScripter subforum there are already scripts that use FFmpeg for conversion. Changing them to do the image conversion shouldn't be a big deal. Also your problem is "unsolvable" since, as you already recognized correctly, asking different website admins to provide their images in your desired format is pointless and time-intensive. Example: https://board.jdownloader.org/showthread.php?t=96728 No worries. Feel free to ask if you got more questions.
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#6
|
||||
|
||||
![]()
To prove my point, I just took the mentioned "convert to mp3" script and used ChatGPT zu modify it to convert webp images to jpg images.
I've literally only changed a single line of code by hand in the end. Link to the script: https://board.jdownloader.org/showthread.php?t=97079 I've tested it with your nhentai example link and all 48 images were successfully converted to .jpg. Here is the prompt I sent to ChatGPT: Code:
Modify the following script as follows: It should convert .webp image files to .jpg without quality loss. Remove all irrelevant code related to videos or bitrates. If I had written this script for myself, I'd polish it a bit more but those are really only minor cosmetic things. Here is what could be better: - Files in the JDownloader downloadlist are not renamed, they will be listed as ".webp" even after the conversion - If FFmpeg is not available, this script may error out with a cryptic error message - Finding the file extension looks a bit sketchy to me so I'd try to improve that.
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download Last edited by pspzockerscene; 18.02.2025 at 19:12. Reason: Fixed typo |
![]() |
Thread Tools | |
Display Modes | |
|
|