[Feature] YouTube 影片頁面直接顯示下載按鈕(像 IDM:播放器旁一鍵下載 + 畫質選單)

Aperta
#118 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
frontend

Direzione di ricerca

Start by locating the extension's content-script and background-message entry points, then read how they currently handle download requests. The issue proposes YouTube watch/shorts buttons, quality selection, SPA navigation handling, and an optional setting, while delegating parsing to gopeed-extension-youtube. Done means those flows can create Gopeed tasks without requiring users to copy and paste a video URL.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

需求:YouTube 影片頁面直接顯示「下載」按鈕(像 IDM 那樣)

現況
  • Gopeed 已有 YouTube 解析擴充(monkeyWie/gopeed-extension-youtube),但使用流程是「複製影片連結 → 切到 Gopeed 視窗 → 貼上建立任務」。對一般使用者不直觀,很多人裝完之後不知道要貼網址,會以為功能沒生效。
  • 瀏覽器擴充目前只負責接管一般檔案下載,在 YouTube 頁面上完全沒有任何提示或按鈕,所以使用者在影片頁停留時看不到任何可下載的跡象。
建議做法
  1. content script 偵測 youtube.com/watch 與 youtube.com/shorts/*,在播放器右上角(或標題列下方)注入一個「下載」按鈕。
  2. 點擊後彈出畫質選單(最高 / 1080p / 720p / 僅音訊),選擇後透過既有 message 通道交給背景腳本,再呼叫 Gopeed 建立任務;解析仍由 gopeed-extension-youtube 負責,不需重寫解析邏輯。
  3. 播放清單頁面可支援批量勾選下載。
  4. 按鈕顯示與否做成擴充設定開關,避免干擾不想用的人。
與 #112 的關係

#112 是「右鍵選單 → Download with Gopeed」,本需求是「頁面內常駐按鈕」,兩者更直觀程度不同,但可以共用同一套 background → Gopeed 的呼叫邏輯,實作上不衝突。

實作提示
  • content script 注入按鈕 → chrome.runtime.sendMessage → background 呼叫 Gopeed REST API 建立任務(對應 repo README 提到的 API / CLI 整合能力)。
  • 若桌面版建立任務需要 token 或本機埠,可由桌面端自動帶入,或讓使用者在擴充選項頁貼一次。
  • 需注意 SPA 路由:YouTube 換片不重載頁面,要監聽 yt-navigate-finish 事件重新掛載按鈕。

English summary

Feature request: inject a "Download" button on YouTube watch/shorts pages from the browser extension, with a quality picker, delegating parsing to the existing gopeed-extension-youtube and creating the task through Gopeed's API. Today users must copy the URL and paste it into Gopeed manually, which makes the YouTube support effectively invisible on the video page. Differs from #112 (context-menu action) in that the button is always visible in-page; both can share the same background call path. SPA navigation (yt-navigate-finish) must be handled so the button survives in-app navigation.

Lingua principale
TypeScript
Stelle
382
Fork
27
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di GopeedLab/browser-extension

Tutte le issue di GopeedLab/browser-extension

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.