Documentation
¶
Index ¶
- func DeleteHistoryEntry(mediaID int) error
- func DeleteIncognitoHistory() error
- func GetHistoryPath() (string, error)
- func GetHistoryPathWithConfig(cfg *config.Config) (string, error)
- func GetHistoryPathWithIncognito(incognito bool) (string, error)
- func SaveHistoryEntry(entry HistoryEntry) error
- func SaveHistoryEntryWithConfig(entry HistoryEntry, cfg *config.Config) error
- func SaveHistoryEntryWithIncognito(entry HistoryEntry, incognito bool) error
- type HistoryEntry
- func GetHistoryEntry(mediaID int, episode int) (*HistoryEntry, error)
- func GetHistoryEntryWithIncognito(mediaID int, episode int, incognito bool) (*HistoryEntry, error)
- func LoadHistory() ([]HistoryEntry, error)
- func LoadHistoryWithConfig(cfg *config.Config) ([]HistoryEntry, error)
- func LoadHistoryWithIncognito(incognito bool) ([]HistoryEntry, error)
- type IINAPlayer
- type MPVPlayer
- type PlaybackInfo
- type Player
- type VLCPlayer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteHistoryEntry ¶
DeleteHistoryEntry deletes a history entry
func DeleteIncognitoHistory ¶
func DeleteIncognitoHistory() error
DeleteIncognitoHistory deletes the incognito history file
func GetHistoryPath ¶
GetHistoryPath returns the path to the history file
func GetHistoryPathWithConfig ¶
GetHistoryPathWithConfig returns the path to the history file (incognito or normal) Note: This is kept for compatibility but incognito mode is now runtime-only
func GetHistoryPathWithIncognito ¶
GetHistoryPathWithIncognito returns the path to the history file (incognito or normal)
func SaveHistoryEntry ¶
func SaveHistoryEntry(entry HistoryEntry) error
SaveHistoryEntry saves or updates a history entry
func SaveHistoryEntryWithConfig ¶
func SaveHistoryEntryWithConfig(entry HistoryEntry, cfg *config.Config) error
SaveHistoryEntryWithConfig saves or updates a history entry (incognito or normal)
func SaveHistoryEntryWithIncognito ¶
func SaveHistoryEntryWithIncognito(entry HistoryEntry, incognito bool) error
SaveHistoryEntryWithIncognito saves or updates a history entry (incognito or normal)
Types ¶
type HistoryEntry ¶
type HistoryEntry struct {
MediaID int
Progress int
EpisodesTotal int
Timestamp string // Resume timestamp (where you stopped watching)
Duration string // Total duration of the episode (HH:MM:SS format)
LastWatched string // Last watched timestamp (when you last completed an episode)
Title string
}
HistoryEntry represents a watch history entry
func GetHistoryEntry ¶
func GetHistoryEntry(mediaID int, episode int) (*HistoryEntry, error)
GetHistoryEntry gets a specific history entry (defaults to normal history)
func GetHistoryEntryWithIncognito ¶
func GetHistoryEntryWithIncognito(mediaID int, episode int, incognito bool) (*HistoryEntry, error)
GetHistoryEntryWithIncognito gets a specific history entry (incognito or normal)
func LoadHistoryWithConfig ¶
func LoadHistoryWithConfig(cfg *config.Config) ([]HistoryEntry, error)
LoadHistoryWithConfig loads the watch history (incognito or normal)
func LoadHistoryWithIncognito ¶
func LoadHistoryWithIncognito(incognito bool) ([]HistoryEntry, error)
LoadHistoryWithIncognito loads the watch history (incognito or normal)
type IINAPlayer ¶
type IINAPlayer struct {
// contains filtered or unexported fields
}
IINAPlayer implements IINA player (macOS)
func NewIINAPlayer ¶
func NewIINAPlayer(cfg *config.Config) *IINAPlayer
NewIINAPlayer creates a new IINA player
type MPVPlayer ¶
type MPVPlayer struct {
// contains filtered or unexported fields
}
MPVPlayer implements MPV player
func NewMPVPlayer ¶
NewMPVPlayer creates a new MPV player
type PlaybackInfo ¶
type PlaybackInfo struct {
StoppedAt string
TotalDuration string // Total duration of the episode (HH:MM:SS format)
PercentageProgress int
CompletedSuccessful bool
}
PlaybackInfo contains information about a playback session
type Player ¶
type Player interface {
// Play plays a video with the given data
Play(ctx context.Context, videoData *providers.VideoData, title string, resumeFrom string) (*PlaybackInfo, error)
// Name returns the player name
Name() string
}
Player defines the interface for video players
type VLCPlayer ¶
type VLCPlayer struct {
// contains filtered or unexported fields
}
VLCPlayer implements VLC player
func NewVLCPlayer ¶
NewVLCPlayer creates a new VLC player