simkl

package
v0.1.119 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package simkl implements tracker.Provider for Simkl (https://api.simkl.org/).

Simkl suspends client ids that poll their library endpoints, so the library is pulled in full once and then only as deltas (date_from) when /sync/activities moved. See library.go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider is the Simkl tracker.

func NewProvider

func NewProvider() *Provider

NewProvider returns the Simkl tracker.

func (*Provider) Add

func (p *Provider) Add(loc tracker.Location, listID string, items []*tracker.Item) error

Add supports the watchlist, and the collection through it: a title added to Plan to Watch is in the library. Custom lists are edited on simkl.com.

func (*Provider) Authorize

func (p *Provider) Authorize() error

func (*Provider) Authorized

func (p *Provider) Authorized() bool

func (*Provider) Collection added in v0.1.118

func (p *Provider) Collection(t tracker.MediaType, refresh bool) ([]*tracker.Item, error)

Collection is the whole library in every status, like simkl.com "My Movies" and "My TV Shows".

func (*Provider) Deauthorize

func (p *Provider) Deauthorize() error

func (*Provider) ID

func (p *Provider) ID() string

func (*Provider) LastActivities

func (p *Provider) LastActivities() (*tracker.Activities, error)

LastActivities reads activities and keeps them as the base for library deltas of this sync.

func (*Provider) ListItems

func (p *Provider) ListItems(listID string, t tracker.MediaType, refresh bool) ([]*tracker.Item, error)

func (*Provider) Lists

func (p *Provider) Lists() ([]*tracker.List, error)

Lists returns the library status lists, then custom lists. Custom lists are a Simkl PRO and VIP feature, other accounts get only the status lists.

func (*Provider) MinSyncInterval

func (p *Provider) MinSyncInterval() time.Duration

func (*Provider) Name

func (p *Provider) Name() string

func (*Provider) Paused

func (p *Provider) Paused(t tracker.MediaType, refresh bool) ([]*tracker.PausedItem, error)

func (*Provider) Progress added in v0.1.117

func (p *Provider) Progress(refresh bool) ([]*tracker.Item, error)

Progress returns the next episode of every show in Watching, most recently watched first. Shows without a next episode are caught up and left out, as Simkl recommends.

func (*Provider) RefreshToken

func (p *Provider) RefreshToken() error

RefreshToken renews the 7-day token a day before expiry.

func (*Provider) Remove

func (p *Provider) Remove(loc tracker.Location, listID string, items []*tracker.Item) error

Remove supports only the watchlist. Simkl removes items through /sync/history/remove, which also wipes watch history, so only items that are in plantowatch (and therefore have no history) are removed.

func (*Provider) Scrobble

func (p *Provider) Scrobble(action tracker.ScrobbleAction, item *tracker.Item, progress float64) error

func (*Provider) SetWatched

func (p *Provider) SetWatched(items []*tracker.WatchedItem, watched bool) error

SetWatched adds or removes watch history. Unwatching a whole movie or show removes it from the Simkl library, as Simkl has no other way to clear a watch.

func (*Provider) Watched

func (p *Provider) Watched(t tracker.MediaType, refresh bool) ([]*tracker.WatchedItem, error)

func (*Provider) Watchlist

func (p *Provider) Watchlist(t tracker.MediaType, refresh bool) ([]*tracker.Item, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址