feat: add in-memory media info cache and YouTube search feature
- Add in-memory LRU cache (200 entries, 30 min TTL) to yt-dlp Client for GetMediaInfo and GetPlaylistInfo results, avoiding redundant yt-dlp calls for the same URL within a session - Add YouTube (/search) and YouTube Music (/music) search with paginated results (5 per page), user selects a result to start the download flow - Add SearchState type, new search.go handler, search results keyboard with < > navigation and New Search button - Add Search button to main menu keyboard - Update help text with new commands
This commit is contained in:
@@ -177,3 +177,12 @@ type PlaylistState struct {
|
||||
PerPage int
|
||||
Selected map[string]bool
|
||||
}
|
||||
|
||||
// SearchState tracks the user's current search results flow.
|
||||
type SearchState struct {
|
||||
Query string
|
||||
Entries []PlaylistEntry
|
||||
Page int
|
||||
PerPage int
|
||||
Source string // "youtube" or "ytmusic"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user