DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

boninglyu-code /

boninglyu-code/dsh-piano-room

Verified

Classical piano salon for the DeepSeek Harness sidebar: search, player with covers, composer shelf, local play ranking.

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHubProject homepage
READMESource: main@ca15c315

古典钢琴厅 · dsh-piano-room

DSH plugin license

在 DeepSeek Harness 的左侧栏加一间「古典钢琴厅」:点开是搜索栏、曲目列表、常驻播放条与唱片封面,首页还摆着热门作曲家和你自己的单曲播放排行。边写代码边听琴。

An in-sidebar classical piano salon for DeepSeek Harness: search, a queue, a persistent player with covers, a composer shelf and a play-count ranking of your own listening — without leaving the editor. English


功能

  • 侧边栏入口:左侧栏多一个钢琴键图标,点击把主区切到钢琴厅(与其他侧栏面板一致的交互)。
  • 搜索:顶部输入中文或英文(肖邦 / Chopin / 夜曲 / 月光),结果带封面、演奏者、时长;会员曲目标 VIP。
  • 播放:底部常驻播放条(封面、标题、进度拖动、上一首 / 播放暂停 / 下一首、随机、单曲循环、列表循环、音量、收藏、队列)。空格键与媒体键(Media Session)也可控制,面板切走或侧栏收起都不会中断播放。
  • 封面:曲目封面由接口带回;缺失时退化为音符占位。
  • 热门作曲家:13 位(肖邦、贝多芬、巴赫、莫扎特、德彪西、李斯特、舒曼、舒伯特、拉赫玛尼诺夫、萨蒂、柴可夫斯基、勃拉姆斯、门德尔松),点头像进入该作曲家的热门曲目。
  • 单曲播放排行:按本机实际播放次数统计 Top 8;没播过时展示内置「名曲榜」(21 首,构建期逐条探测过可播)。
  • 收藏 / 队列 / 音量 / 循环模式:存本机,重开还在(队列恢复后是暂停态,不自动出声)。
  • 一键播放全部:编辑精选、你的排行、作曲家作品页标题旁都有「播放全部」。
  • 封面兜底:封面加载失败时退回音符占位,不会留下可见的破图或空 src 请求。

安装

插件是一个普通的 DSH bundle(package.json 里声明了 dsh.bundle),任何安装方式都可以:

# npm 之外直接从仓库装
dsh plugin --profile <profile> add https://github.com/boninglyu-code/dsh-piano-room

桌面版也可以让插件管理器装本地目录:

plugin_manager  install_bundle  target = <本地路径>/dsh-piano-room

装完刷新 GUI,左侧栏出现钢琴键图标。插件市场里搜 dsh-piano-room 也能一键安装。

音源与边界

  • 音源是网易云音乐公开 Web 接口,仅供个人欣赏;fee=1 的 VIP 曲目无法播放,点它会就地提示「换一首」而不会偷偷跳到别的曲子。
  • 接口偶发限流(code:406「操作频繁」),Host 侧会退避重试一次,仍失败时面板给「重新搜索」。
  • 浏览器侧没有 CORS 资格,所有请求都经 Host 代理;音频走 Range 透传,所以进度条可以真正拖动。
  • 内置精选曲目是构建期快照。接口若改版,搜索仍可用,内置 id 可能失配——重跑 tools/collect-v2.mjs 与 tools/inject-data.mjs 即可再生成。

实现要点

路由 作用
GET /piano-room/search?q=&limit= 转 cloudsearch/pc,归一化为 {id,name,artist,album,cover,duration,fee},结果缓存 10 分钟
GET /piano-room/composer?id=&limit= 该作曲家热门曲目(artist/top/song)
GET /piano-room/audio?id= 手动跟随 302 到 CDN 签名地址,透传 Range,支持拖动;VIP 曲返回 404 由客户端跳过
GET /piano-room/health 自检:缓存条目数、音源标识

客户端把 queue / index / playing / volume / mode 放在模块作用域,<audio> 惰性创建,因此组件卸载不影响出声;收藏与播放次数写 localStorage 的 dsh-piano-room/v1。

开发

node tools/collect-v2.mjs     # 采集并验证可播曲目 → tools/catalog.json
node tools/inject-data.mjs    # 把 catalog.json 写回 client.js 的 COMPOSERS / CURATED
node tools/smoke.mjs          # 无头冒烟:挂载面板 + 搜索 + 打开作曲家 + 播放 + 队列
python tools/make-icon.py     # 重新渲染市场图标 assets/icon-180.png

tools/smoke.mjs 自带一个迷你 React(hook 按组件实例分配)与 DOM/fetch/Audio 桩,能在没有浏览器的环境里跑通整棵组件树。

English

A classical piano salon in the DSH sidebar. Search the public NetEase Cloud Music web API (Chinese or English queries), play through a host-side proxy that follows the 302 and forwards Range so seeking works, browse 13 composers' popular works, and keep a local play-count ranking plus favourites. VIP-only tracks are refused with a notice instead of being skipped silently. Playback state lives outside React, so switching panels never stops the music, and the last queue is restored paused after a reload.

Install from the marketplace or straight from this repo:

dsh plugin --profile <profile> add https://github.com/boninglyu-code/dsh-piano-room

许可

MIT.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout
—/ 5

No ratings yet

Verified DSH bundle

Commit ca15c3155148

Community comments

No comments yet. Be the first to write one.