Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BrowseResult ¶ added in v0.3.0
type BrowseResult struct {
SelectedFile string // Full remote path of selected file
Cancelled bool // User quit without selecting
}
BrowseResult holds the result of browsing
func RunBrowseTUI ¶ added in v0.3.0
func RunBrowseTUI(client *webdav.Client, serverName, initialPath string) (*BrowseResult, error)
RunBrowseTUI runs the file browser TUI and returns the selected file path
type FileEntry ¶ added in v0.3.0
type FileEntry struct {
Name string `json:"name"`
Path string `json:"path"`
IsDir bool `json:"is_dir"`
Size int64 `json:"size"`
}
FileEntry represents a file or directory for JSON output
type SearchItem ¶
type SearchItem struct {
Title string
Subtitle string // e.g., "Duration: 45:30 | Plays: 1234"
URL string
DownloadURL string // Direct download URL if available
Selectable bool // Whether this item can be selected
Type ItemType // Podcast or Episode
// For podcasts (used to fetch episodes)
PodcastID string // iTunes collection ID or Xiaoyuzhou pid
FeedURL string // RSS feed URL (for iTunes)
}
SearchItem represents a selectable item (podcast or episode)
func RunSearchTUI ¶
func RunSearchTUI(sections []SearchSection, query, lang string) ([]SearchItem, error)
RunSearchTUI runs the search TUI and returns selected items
func RunSearchTUIWithBack ¶ added in v0.3.0
func RunSearchTUIWithBack(sections []SearchSection, query, lang string, allowBack bool) ([]SearchItem, error)
RunSearchTUIWithBack runs the search TUI with optional back navigation
type SearchSection ¶
type SearchSection struct {
Title string
Items []SearchItem
}
SearchSection represents a section (Podcasts or Episodes)
type SearchTUIResult ¶ added in v0.3.0
type SearchTUIResult struct {
Items []SearchItem
GoBack bool
}
SearchTUIResult holds the result of RunSearchTUI
type XiaoyuzhouEpisode ¶
type XiaoyuzhouEpisode struct {
Type string `json:"type"`
Eid string `json:"eid"`
Pid string `json:"pid"`
Title string `json:"title"`
Duration int `json:"duration"`
PlayCount int `json:"playCount"`
PubDate string `json:"pubDate"`
Enclosure struct {
URL string `json:"url"`
} `json:"enclosure"`
Podcast struct {
Title string `json:"title"`
} `json:"podcast"`
}
type XiaoyuzhouPodcast ¶
type XiaoyuzhouSearchResponse ¶
type XiaoyuzhouSearchResponse struct {
Data struct {
Episodes []XiaoyuzhouEpisode `json:"episodes"`
Podcasts []XiaoyuzhouPodcast `json:"podcasts"`
} `json:"data"`
}
XiaoyuzhouSearchResponse represents the API response
Source Files
¶
Click to show internal directories.
Click to hide internal directories.