Versions in this module Expand all Collapse all v0 v0.0.2 Feb 26, 2026 v0.0.1 Feb 2, 2026 Changes in this version + var DB *gorm.DB + func ClearAudioPreference(db *gorm.DB, anilistID int) error + func ClearCompletedPreferences(db *gorm.DB, anilistIDs []int) error + func Close() error + func GetAudioPreference(db *gorm.DB, anilistID int) (string, error) + func GetDB() *gorm.DB + func Init(cfg *config.DatabaseConfig) error + func Migrate(db *gorm.DB) error + func RunMigrations(db *gorm.DB) error + func SaveAudioPreference(db *gorm.DB, anilistID int, preference string, trackIndex *int) error + type AniListMapping struct + AniListID int + CreatedAt time.Time + ID uint + ProviderMediaID string + ProviderName string + Title string + UpdatedAt time.Time + func (AniListMapping) TableName() string + type AudioPreference struct + AniListID int + CreatedAt time.Time + ID uint + Preference string + TrackIndex *int + UpdatedAt time.Time + func (AudioPreference) TableName() string + type Download struct + BytesDownloaded int64 + CompletedAt *time.Time + CreatedAt time.Time + Episode int + Error string + FilePath string + ID string + MediaID string + MediaTitle string + MediaType string + Progress float64 + Provider string + Quality string + Season int + Speed int64 + StartedAt *time.Time + Status string + TotalBytes int64 + func (Download) TableName() string + type History struct + AniListID *int + Completed bool + Episode int + ID uint + MediaID string + MediaTitle string + MediaType string + Page int + ProgressPercent float64 + ProgressSeconds int + ProviderName string + Season int + TotalPages int + TotalSeconds int + WatchedAt time.Time + func (History) TableName() string + type Setting struct + Key string + UpdatedAt time.Time + Value string + func (Setting) TableName() string + type Statistic struct + FirstWatched time.Time + Genre string + ID uint + LastWatched time.Time + MediaID string + MediaType string + TotalWatchTime int + WatchCount int + func (Statistic) TableName() string + type SyncQueue struct + AniListID *int + CreatedAt time.Time + Episode int + ID uint + MediaID string + Progress float64 + Score *float64 + Status string + Synced bool + SyncedAt *time.Time + func (SyncQueue) TableName() string