JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 29.06.2022, 00:55
K14M K14M is offline
DSL Light User
 
Join Date: Jan 2022
Location: Ukraine
Posts: 31
Default plugin forgot how to change the name of the files?

I'm setting up a plugin so that it saves videos with the title
"[*DATE*] *VIDEO_NAME* (*CHANNEL*) *WIDTH*p.avi".
Original video title "Fate Zero Op 2 [NC]".
jdownloader saves it with this name - "Fate Zero Op 2 [NC] (360p 24fps) mp4"

What am I doing wrong?

Spoiler:


Last edited by Jiaz; 29.06.2022 at 12:30.
Reply With Quote
  #2  
Old 29.06.2022, 12:25
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 76,742
Default

@K14M: you have to use *ext* placeholder else the whole pattern will be invalidated/not used.
__________________
JD-Dev & Server-Admin

Last edited by Jiaz; 29.06.2022 at 12:34.
Reply With Quote
  #3  
Old 03.07.2022, 00:19
K14M K14M is offline
DSL Light User
 
Join Date: Jan 2022
Location: Ukraine
Posts: 31
Default

Quote:
Originally Posted by Jiaz View Post
@K14M: you have to use *ext* placeholder else the whole pattern will be invalidated/not used.
Very illogical. Why then do you need *ext* if it can not be removed? What if I really need to change the extension of the video file?
Reply With Quote
  #4  
Old 03.07.2022, 00:26
K14M K14M is offline
DSL Light User
 
Join Date: Jan 2022
Location: Ukraine
Posts: 31
Default

In general, I did this [*DATE*] *VIDEO_NAME* (*CHANNEL*) *WIDTH*p *ext*.avi

And how to make it so that in the date of the video, the month was indicated by a number and not by a word?
Reply With Quote
  #5  
Old 03.07.2022, 10:09
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 76,742
Default

Quote:
Originally Posted by K14M View Post
Very illogical. Why then do you need *ext* if it can not be removed?
I just checked source and explained the reason why. I guess the *ext* is mandatory else the filename would be without file extension and ppl would wonder why it doesn't work as expected. We could change it to auto guess if the filename scheme contains sort of file extension or not and auto append *ext* if missing. problem is this won't be working in all cases, eg mycoolvideo.720, is this extension or just a number.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #6  
Old 03.07.2022, 10:11
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 76,742
Default

Quote:
Originally Posted by K14M View Post
What if I really need to change the extension of the video file?
I'm sorry but I don't understand. just changing the extension won't change the content of the file. mp4 and avi are two different container formats and renaming mp4 container to .avi extension may work but also may fail, heavily depends on the used player software if it trusts extension or peeks fileformat/container. If you want to change the extension you should also convert/remux the file to match the new/different extension.
__________________
JD-Dev & Server-Admin

Last edited by Jiaz; 03.07.2022 at 10:22.
Reply With Quote
  #7  
Old 03.07.2022, 10:21
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 76,742
Default

Quote:
Originally Posted by K14M View Post
And how to make it so that in the date of the video, the month was indicated by a number and not by a word?
you can customize the format, see the help above the fields
Quote:
*date[dd.MM.yyy]*
format, see docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html
__________________
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 16:34.
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 - 2022, Jelsoft Enterprises Ltd.