> For the complete documentation index, see [llms.txt](https://seanime.gitbook.io/seanime-extensions/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://seanime.gitbook.io/seanime-extensions/plugins/ui/anime-library/continuity.md).

# Continuity

## Core Methods

### getWatchHistoryItem

Gets the last recorded progress for an anime.

```typescript
const item = ctx.continuity.getWatchHistoryItem(21)
```

### updateWatchHistoryItem

Add or update the last recorded progress for an anime.

**Parameters:**

* `opts`: Object containing:
  * `currentTime`: Number - Last recorded progress in seconds
  * `duration` : Number - Total duration in seconds
  * `mediaId` : Number
  * `episodeNumber` : Number
  * `filepath?` : String
  * `kind` : "onlinestream" | "mediastream" | "external\_player"

### getWatchHistory

Gets all last recorded progress items.

```typescript
const items = ctx.continuity.getWatchHistory()
```

### deleteWatchHistoryItem

**Parameters**:

* `mediaId` : Number

```typescript
ctx.continuity.deleteWatchHistoryItem(21)
```
