[Feature]: Desktop app: offline downloads

未关闭
#97 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript

调研方向

Read the epic #80 first, then inspect #81 for the cache/data directory and #84, #86, and #91 for media downloads and playback; start only after web parity is reached, as the issue specifies. The music path references /api/music/tracks/{id}/file, and the video path references /api/media/{id}/file?download=1. Done means downloaded episodes and albums play without a network connection with subtitles, fonts, artwork, and lyrics, and offline progress appears on the web after reconnecting.

由索引模型根据 Issue 内容生成。

描述

enhancement

[!NOTE]
This issue was written by Claude (Claude Opus 5.5) from a planning session with @PhrolovaMoe. Part of #80, builds on #84, #86 and #91. Start after web parity is reached (all other sub-issues except #95 done). Read the epic first.

Area

Desktop app

Problem

On a laptop away from home (train, plane, bad hotel Wi-Fi), the app is useless without a connection to the server.

Proposed solution
Downloads
  • Download episodes, films, seasons, albums and playlists to local storage: video through /api/media/{id}/file?download=1 (#84), music through /api/music/tracks/{id}/file. Downloads are resumable (Range) and run in the background with a queue, progress and pause/cancel.
  • Download alongside each item what offline playback needs:
    • subtitles (the server's ASS for each text track) and fonts;
    • artwork, metadata, chapters and intro/credits markers;
    • lyrics for music.
  • Optional "download a smaller version" (a server transcode at a chosen height), if the server can produce a downloadable transcode. If it can't, file a follow-up server issue instead of adding it here.
  • Per server, in the cache/data directory from #81. Storage use is shown and managed in Settings → Desktop.
Offline mode
  • When the server can't be reached, the app shows the downloaded items (a "Downloads" view) instead of erroring, and plays them from disk with the same player (#86/#87/#91).
  • Progress, watched state, plays and scrobbles are queued and sent when the server is reachable again (oldest first; on conflict the newest position wins, as the server already decides for multiple devices).
  • Music gets the Android plan's behaviour (#47): an LRU cache of recently played tracks, pinned albums/playlists, and prefetching the next 3 queued tracks.
Done when

Downloaded episodes and albums play with the network off: subtitles, fonts, artwork and lyrics included. Progress made offline shows up on web after reconnecting.

主要语言
TypeScript
星标
4
派生
1
平均合并
4 小时 49 分钟
30 天内合并 PR
5

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

tinystream-dev/tinystream 的其他 Issue

查看 tinystream-dev/tinystream 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。