Skip to content

Conversation

@sevxn007
Copy link
Member

@sevxn007 sevxn007 commented Nov 24, 2025

Description / 描述

strm驱动路径前缀不再限制死为/d,支持自定义

Closes #1683 #1638

How Has This Been Tested? / 测试

Checklist / 检查清单

  • I have read the CONTRIBUTING document.
    我已阅读 CONTRIBUTING 文档。
  • I have formatted my code with go fmt or prettier.
    我已使用 go fmtprettier 格式化提交的代码。
  • I have added appropriate labels to this PR (or mentioned needed labels in the description if lacking permissions).
    我已为此 PR 添加了适当的标签(如无权限或需要的标签不存在,请在描述中说明,管理员将后续处理)。
  • I have requested review from relevant code authors using the "Request review" feature when applicable.
    我已在适当情况下使用"Request review"功能请求相关代码作者进行审查。
  • I have updated the repository accordingly (If it’s needed).
    我已相应更新了相关仓库(若适用)。

@sevxn007 sevxn007 changed the title fix(strm): custom path prefixes feat(strm): custom path prefixes Nov 24, 2025
@sevxn007 sevxn007 linked an issue Nov 24, 2025 that may be closed by this pull request
8 tasks
Signed-off-by: ShenLin <773933146@qq.com>
Copy link
Contributor

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.

Pull request overview

This PR adds support for custom path prefixes in the strm driver, removing the hard-coded /d prefix and allowing users to configure it.

Key Changes:

  • Added a new PathPrefix field to the strm driver configuration with a default value of /d
  • Updated the path generation logic in getLink() to use the configurable PathPrefix instead of the hard-coded /d
  • Bumped the driver version from 4 to 5 to handle migration of existing configurations to set the default /d prefix

Reviewed changes

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

File Description
drivers/strm/meta.go Added new PathPrefix configuration field with default value /d to support custom path prefixes
drivers/strm/util.go Updated getLink() method to use configurable PathPrefix instead of hard-coded /d prefix
drivers/strm/driver.go Incremented version to 5 and added migration logic to set PathPrefix to /d for existing configurations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jyxjjj jyxjjj merged commit 42fc841 into OpenListTeam:main Nov 24, 2025
14 checks passed
@sevxn007 sevxn007 deleted the strm/prefix branch November 24, 2025 08:47
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.

[Feature] strm前缀能修改吗 [Feature] 建议加入自定义strm前缀路径

2 participants