Hello everyone, I hope to find you in good health.
I'm running into a small difficulty, which I don't know if it's an issue or just a limitation.
With Instagram or YouTube plugins, when I set a custom filename, if there are placeholders that wouldn’t be relevant based on the downloaded file, the corresponding field won’t appear, which is right, but the punctuation marks related to the placeholder will, for their part, remain.
E.g. the Instagram plugin’s default filename scheme is (order-ID and shortcode included) :
uploader - main_content_id - orderID_shortcode.ext
For a given URL with 1 media, and another with multiple media, we get :
account.name - ABcDefGhIJk.jpg
account.name - LmnOPqrstUv - 1.jpg
account.name - hiJKlmNOpQr - 2.jpg
( or, specifically for a Profile URL crawl with the Website method, you could get :
account.name - LmnOPqrstUv - 1_WxYZabcDEFg.jpg
account.name - hiJKlmNOpQr - 2_sTuvwxYZabC.jpg )
In all these cases, we see that the filename adapts to the circumstances, and takes only the part of the scheme that is relevant to it.
Now,
if you set a custom filename, say :
*uploader* - *main_content_id* - *orderid*_of_*orderid_max* - *shortcode**ext*
You get, for the same URLs :
account.name - ABcDefGhIJk - 1_of_1 - -.jpg
account.name - LmnOPqrstUv - 1_of_2 - -.jpg
account.name - hiJKlmNOpQr - 1_of_2 - -.jpg
( or, specifically for a Profile URL crawl with the Website method, you could get :
account.name - ABcDefGhIJk - 1_of_1 - ABcDefGhIJk.jpg
account.name - LmnOPqrstUv - 1_of_2 - WxYZabcDEFg.jpg
account.name - hiJKlmNOpQr - 1_of_2 - sTuvwxYZabC.jpg )
In all that cases, we see that, unlike before, the filename doesn't adapt itself to the circumstances, and generically integrate all the scheme.
We can see that for URLs with one or more media, *shortcode* will be replaced by a dash " - ", and the surrounding punctuation (dashes and spaces) remains.
Except for the URL/Website Profile method. For an URL with only 1 media, it will put 1_of_1 although it isn’t necessary, and will repeat *main_content_id* twice, using it as placeholder *shortcut*. For an URL with multiple media, you’ll get the right scheme.
[ Examples of usable 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** ]
The same happens with the YouTube plugin, but a missing part is replaced by a space.
E.g. there will be no problem with the default scheme :
*3D* *360* *VIDEO_NAME* (*H*p_*FPS*fps_*VIDEO_CODEC*-*AUDIO_BITRATE*kbit_*AUDIO_CODEC*).*EXT*
You’ll get :
The video title (720p_30fps_H264-192kbit_AAC).mp4
But if you want to add the placeholder *PLAYLIST_NAME* between dashes "-" surrounded by spaces :
*3D* *360* *VIDEO_NAME* - *PLAYLIST_NAME* - *H*p_*FPS*fps_*VIDEO_CODEC*-*AUDIO_BITRATE*kbit_*AUDIO_CODEC*).*EXT*
For each video that isn’t part of a playlist or crawled with its playlist, you’ll get :
The video title - - (720p_30fps_H264-192kbit_AAC).mp4
*PLAYLIST_NAME* doesn’t appear at all, rightly so, but the surrounding punctuation (dashes and spaces) remains.
If the video is part of a playlist and crawled with it, this will be correct:
The video title - The playlist name - (720p_30fps_H264-192kbit_AAC).mp4
[ Examples of usable 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** ]
Etc. etc.
I already know that this can be handled with the packagizer, and I've already made the rules for it. But there are limitations, e.g. the packagizer rules don't apply to the variant of a YouTube video added via the LinkGrabber context menu.
As for Instagram, if you want to include mention of something like “ story “ or “ highlights “ or “ name of highlights “ or whatever, good luck (too many variables). It gets a little complex in my opinion compared to the original goal.
I've searched a lot on the forum, but I couldn't find anything on the subject, except this post that proposes a script, but that doesn't seem to work, for me at least (
https://board.jdownloader.org/showpost.php?p=395430 ; showpost.php?p=395430). But couldn't we avoid going through a script? As with the default filename schemes the adaptation is correct, I thought it should work with custom schemes too ?
Thank you for your answers!