Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

让下载文件的文件名更有意义 #74

Merged
merged 1 commit into from
Nov 5, 2015

Conversation

carltonf
Copy link
Contributor

@carltonf carltonf commented Nov 5, 2015

以这个为例 http://www.bilibili.com/video/av3158442/

现在下载的文件使用的是内部的编号,如 “4972882-1.flv”。
这个 Patch 使文件名自动改为:
“av3158442_p1_01. 不安定な神様_「传颂之物 虚伪的假面」OP_ED专辑.flv”

自动生成的文件名目前采用如下格式:

[_p<分段编号>][_分段名][_主标题]

- Make downloaded file name look much better.

- Import filename-sanitize to sanitize file names.
  Adapted for use within Chrome.
@zacyu
Copy link
Collaborator

zacyu commented Nov 5, 2015

感谢建议以及附带的实现, 我之前也想做这个功能, 但是一直没有实际做下去. 说起来你有想到下载时可以把多 flv 分段合成一个的方案吗?

zacyu added a commit that referenced this pull request Nov 5, 2015
@zacyu zacyu merged commit 3258d87 into bilibili-helper:master Nov 5, 2015
@carltonf carltonf deleted the nice-download-filename branch November 5, 2015 07:18
@carltonf
Copy link
Contributor Author

carltonf commented Nov 5, 2015

这倒没有. 你指的是像 http://www.bilibili.com/video/av3138531/ 中分上下2P的,想在下载时直接合并?

这里分P和分段是一个意思么?还是说每一P中可能有多个分段的(貌似只看到过一个分段的情况:分段1)。

chrome.downloads 接口中没有看到过这类方法。

@zacyu
Copy link
Collaborator

zacyu commented Nov 5, 2015

不是一个意思, 每一个 P 中可能有多个分段 (比如比较旧的新浪源视频). 不一定在 chrome.downloads 接口中, Chrome 有提供可以读取下载内容的方法吗?

@carltonf
Copy link
Contributor Author

carltonf commented Nov 6, 2015

不知道。 Chrome 有提供读写文件的接口,但视频文件的合并,不清楚是否可行。

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants