首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >强制jdownloader为任何url命名文件,而无需在UI中手动设置名称。

强制jdownloader为任何url命名文件,而无需在UI中手动设置名称。
EN

Stack Overflow用户
提问于 2018-10-23 00:20:24
回答 1查看 1.6K关注 0票数 1

我有一个url &我想让jdownloader用一个预定义的名称保存文件,而忽略服务器给出的名称。

例如

我有一个像http://server.com/server-file.mp4的网址&我希望这个文件被保存为custom-filename.mp4而不使用UI

是否可以将一个特殊的URL参数传递给下载URL,以便jDownloader能够识别并使用此特定名称保存该文件?

例如,在上面的例子中,我可以在jdownloader中paste下面的url吗?

http://server.com/server-file.mp4?jdSaveAs=custom-filename.mp4,以便jdownloader自动将该文件保存为custom-filename.mp4

EN

回答 1

Stack Overflow用户

发布于 2020-07-13 09:30:28

您可以将自定义文件名附加到URL,并使用打包程序规则对其进行解析。

按以下格式重写URL:

代码语言:javascript
运行
复制
https://board.jdownloader.org/server-file.mp4#filename=custom-filename.mp4

文件名下载: custom-filename.mp4

在打包程序中导入此规则(右击“原始”按钮将文件保存到磁盘)

代码语言:javascript
运行
复制
https://gist.github.com/rodrigolmacedo/231a7692ace1b0cbf6aa7dc82d0e665a

original post outdated

代码语言:javascript
运行
复制
<jd:append>
-> this placeholder will be replaced by previous value where the placeholder is being used in

<jd:prop:KEY>
-> this placeholder reads out an internal property of the downloadlink itself. properties are plugin specific and there are plans that plugins can return a list of supported properties that can be used here

<jd:indexof>
-> this placeholder will be replaced by number of index of the downloadlink within its package. first link will be 1, second link will be 2 and so on. It's just the index within the package!
-> will be replaced in real time

<jd:subfolderbyplugin>
-> some plugins support recursive folder support. if supported by plugin, then the downloads will have same directory structure like shown in browser

<jd:env:KEY>
-> this placeholder will be replaced by KEY environment variable of your system
-> will be replaced in real time

<jd:orgfilename> <jd:orgfilename:number>
-> this placeholder will be replaced by original filename or matching group(number) of filename pattern

<jd:packagename>
-> this placeholder will be replaced by the current package name
-> will be replaced in real time

<jd:orgfiletype> <jd:orgfiletype:Pattern>
-> this placeholder will be replaced by the file extension of the file or the match of the given pattern

<jd:orgfilenamewithoutext>
-> this placeholder will be replaced by original filename without file extension

<jd:hoster:number>
-> this placeholder will be replaced by the matching group(number) of downloadurl pattern or the host itself if number is -1

<jd:source:(number)pattern>
-> this placeholder will be replaced by the match of sourceurl pattern. with number you can specify which sourceurl to process

<jd:simpledate:simpleDateFormatString>
-> this placeholder will be replaced by time formatted with simpleDateFormatString, see docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html
-> will be replaced in real time

<jd:orgpackagename>
-> this placeholder will be replaced by the original package name  ```



  https://board.jdownloader.org/showthread.php?p=421993
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52933711

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档