Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListeningSession ¶
ListeningSession is the item or the podcast episode that played last. At startup, pine loads it again at the position on the server.
type Store ¶
Store wraps the SQLite database connection.
func (*Store) ClearSession ¶
ClearSession removes all saved listening sessions.
func (*Store) GetDefaultAccount ¶
GetDefaultAccount returns the account marked as default. Returns an error if no default account is set. A database of an earlier pine can have more accounts, which are not the default.
func (*Store) GetLastSession ¶
func (s *Store) GetLastSession() (ListeningSession, error)
GetLastSession retrieves the last saved playback session. Returns an error if no session has been saved.
func (*Store) SaveAccount ¶
SaveAccount inserts or updates an account and makes it the default. It deletes each other account in the same transaction, so that the database keeps no token of an earlier login.
func (*Store) SaveListeningSession ¶
func (s *Store) SaveListeningSession(session ListeningSession) error
SaveListeningSession stores the item or the episode that plays. Only one session is kept at a time (the most recent), enabling crash recovery. It stores no session ID and no position: pine does not read them, and the ID of a play session is a secret.