8000 feat(doubao_share): support doubao_share link by anobodys · Pull Request #8376 · AlistGo/alist · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(doubao_share): support doubao_share link #8376

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 19, 2025

Conversation

anobodys
Copy link
Contributor

增加了 豆包分享链接的驱动

配置项说明
Root folder path 请保持默认的/

Cookie 字段,请自行打开豆包云盘,获取其Cookie中的关于ttwid部分,
例如:ttwid=xxxx;

Share ids字段,填写需要挂载的分享链接或ID,可自定义路径,格式要求如下:分享链接或ID + | + 自定义路径(可选)

例如:有一个分享链接:https://www.doubao.com/drive/s/aabbccddeeffgghh需要挂载,其ID/s/后面的aabbccddeeffgghh

有下面几种填写方式

  • https://www.doubao.com/drive/s/aabbccddeeffgghh:分享内容直接展示在根目录
    aabbccddeeffgghh:分享内容直接展示在根目录——使用分享链接或者分享的ID都可以
  • https://www.doubao.com/drive/s/aabbccddeeffgghh|测试目录:根目录 -> 测试目录 -> 分享内容
  • https://www.doubao.com/drive/s/aabbccddeeffgghh|测试目录/1/2:根目录 -> 测试目录 -> 1 -> 2 -> 分享内容

多分享链接或ID 的情况:

  • https://www.doubao.com/drive/s/aabbccddeeffgghh|测试目录1
    https://www.doubao.com/drive/s/bbaaccddeeffgghh|测试目录2
    效果:
        -- 测试目录1 -> 分享内容
根目录|
	-- 测试目录2 -> 分享内容
  • https://www.doubao.com/drive/s/aabbccddeeffgghh|测试目录/1
    https://www.doubao.com/drive/s/bbaaccddeeffgghh|测试目录/2
    效果:
  		  -- 1 -> 分享内容
根目录 -- 测试目录|
	  	  -- 2 -> 分享内容

注意⚠️自定义目录 不可以重复,并且 测试目录测试目录/1 这样定义的也冲突

Copy link
  • Walkthrough: 本次PR为Alist项目增加了对豆包分享链接的支持。通过配置豆包云盘的Cookie和分享链接或ID,用户可以将豆包分享内容挂载到指定路径下。此功能支持自定义路径,并检测路径冲突。
  • Changes:
    文件 描述
    drivers/all.go 添加了对doubao_share驱动的引用。
    drivers/doubao_share/driver.go 新增DoubaoShare结构体及其方法,实现了豆包分享链接的初始化、列出目录、生成下载链接等功能。
    drivers/doubao_share/meta.go 定义了Addition结构体和config变量,注册了DoubaoShare驱动。
    drivers/doubao_share/types.go 定义了多个数据结构用于处理豆包分享的响应和文件信息。
    drivers/doubao_share/util.go 实现了豆包分享的请求处理、文件获取、路径解析等实用功能。

@xhofe xhofe requested a review from Copilot April 14, 2025 15:38
Copy link
Contributor
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

drivers/doubao_share/types.go:34

  • [nitpick] The field name 'Child' is ambiguous; consider renaming it to 'Children' for improved consistency and clarity with similar data structures.
Child       *[]RootFileList

@xhofe xhofe merged commit 477c439 into AlistGo:main Apr 19, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0