Manages saving and retrieving watched content data in localStorage.
Provides functions to mark content as watched and retrieve watch history.
- Source:
Methods
(inner) getEpisodeWatchData(seriesTitle, season, epIndex) → {Object}
Retrieves the watch data for a specific episode.
Parameters:
Name | Type | Description |
---|---|---|
seriesTitle |
string | The title of the series. |
season |
string | number | The season number or name. |
epIndex |
number | The episode index. |
- Source:
Returns:
The watch data ({watched: boolean, time: number}).
- Type
- Object
(inner) getFilmWatchData(title) → {Object}
Retrieves the watch data for a specific film.
Parameters:
Name | Type | Description |
---|---|---|
title |
string | The title of the film. |
- Source:
Returns:
The watch data ({watched: boolean, time: number}).
- Type
- Object
(inner) getWatchedContent() → {Object}
Retrieves the watched content data from localStorage.
- Source:
Returns:
The watched content data with films and series.
- Type
- Object
(inner) isSeriesFullyWatched(series) → {boolean}
Checks if all episodes in a series have been watched.
Parameters:
Name | Type | Description |
---|---|---|
series |
Object | The series object with seasons and episodes. |
- Source:
Returns:
True if all episodes are watched, false otherwise.
- Type
- boolean
(inner) markEpisodeWatched(seriesTitle, season, epIndex, watchedopt, timeopt) → {void}
Marks an episode as watched or unwatched and updates the last watched time.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
seriesTitle |
string | The title of the series. | ||
season |
string | number | The season number or name. | ||
epIndex |
number | The episode index. | ||
watched |
boolean |
<optional> |
true | Whether the episode is watched. |
time |
number |
<optional> |
0 | The last watched timestamp in seconds. |
- Source:
Returns:
- Type
- void
(inner) markFilmWatched(title, watchedopt, timeopt) → {void}
Marks a film as watched or unwatched and updates the last watched time.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
title |
string | The title of the film. | ||
watched |
boolean |
<optional> |
true | Whether the film is watched. |
time |
number |
<optional> |
0 | The last watched timestamp in seconds. |
- Source:
Returns:
- Type
- void
(inner) setWatchedContent(data) → {void}
Saves the watched content data to localStorage.
Parameters:
Name | Type | Description |
---|---|---|
data |
Object | The watched content data to store. |
- Source:
Returns:
- Type
- void