ITADN
Owez/yark/Issues

Add --query parameter to filter channel downloads by search term

#146Pull RequestCopilot 创建于 2025-12-17
C
Copilotcommented
Enables filtering channel downloads by search query, matching YouTube's channel search UX (e.g., `/@channel/search?query=transformers`). ## Changes - **CLI**: Added `--query=[str]` parameter to `refresh` command with help text and parsing - **Config**: Extended `DownloadConfig` with optional `query` field - **Filtering**: Implemented case-insensitive substring matching in `_curate()` against video titles and descriptions - **UX**: Added feedback messages when filtering is active or no matches found ## Usage ```bash # Filter downloads to matching videos only yark refresh archive_name --query=transformers # Combine with existing filters yark refresh archive_name --query=transformers --videos=10 ``` Query matching checks both title and description fields across all video types (videos, shorts, livestreams). Archive JSON structure unchanged. <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> > > ---- > > *This section details on the original issue you should resolve* > > <issue_title>add option to filter the channel dowloads</issue_title> > <issue_description>basic filering as in the UX > > ![Image](https://github.com/user-attachments/assets/82e2f912-bf6d-437a-b6af-808121641bd3)] > > https://www.youtube.com/@HasTVClassic/search?query=transformers > > it should be not super complicated to do it but very handy - thanks! > > yark refresh tranf_cartoon/ > downlaod NOT all but those above </issue_description> > > <agent_instructions>On the UI side, don't change the json data structure</agent_instructions> > > ## Comments on the Issue (you are @copilot in this section) > > <comments> > </comments> > </details> <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes Owez/yark#145 <!-- START COPILOT CODING AGENT TIPS --> --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey).
合并状态:未合并 1 条评论