Skip to content

Commit

Permalink
Merge pull request #445 from Stremio/update-last-watched
Browse files Browse the repository at this point in the history
Update last watched
  • Loading branch information
jaruba committed Aug 21, 2023
2 parents 25c247b + 9bc8506 commit 12ec928
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@babel/runtime": "7.16.0",
"@sentry/browser": "6.13.3",
"@stremio/stremio-colors": "5.0.1",
"@stremio/stremio-core-web": "0.44.21",
"@stremio/stremio-core-web": "0.44.22",
"@stremio/stremio-icons": "4.0.0",
"@stremio/stremio-video": "0.0.24",
"a-color-picker": "1.2.1",
Expand Down
7 changes: 4 additions & 3 deletions src/routes/MetaDetails/StreamsList/Stream/Stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const { useServices } = require('stremio/services');
const StreamPlaceholder = require('./StreamPlaceholder');
const styles = require('./styles');

const Stream = ({ className, videoId, addonName, name, description, thumbnail, progress, deepLinks, ...props }) => {
const Stream = ({ className, videoId, videoReleased, addonName, name, description, thumbnail, progress, deepLinks, ...props }) => {
const profile = useProfile();
const streamingServer = useStreamingServer();
const { core } = useServices();
Expand All @@ -35,11 +35,11 @@ const Stream = ({ className, videoId, addonName, name, description, thumbnail, p
action: 'MetaDetails',
args: {
action: 'MarkVideoAsWatched',
args: [videoId, true]
args: [{ id: videoId, released: videoReleased }, true]
}
});
}
}, [videoId]);
}, [videoId, videoReleased]);
const onClick = React.useCallback((event) => {
if (href === null) {
// link does not lead to the player, it is expected to
Expand Down Expand Up @@ -111,6 +111,7 @@ Stream.Placeholder = StreamPlaceholder;
Stream.propTypes = {
className: PropTypes.string,
videoId: PropTypes.string,
videoReleased: PropTypes.instanceOf(Date),
addonName: PropTypes.string,
name: PropTypes.string,
description: PropTypes.string,
Expand Down
1 change: 1 addition & 0 deletions src/routes/MetaDetails/StreamsList/StreamsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ const StreamsList = ({ className, video, ...props }) => {
<Stream
key={index}
videoId={video?.id}
videoReleased={video?.released}
addonName={stream.addonName}
name={stream.name}
description={stream.description}
Expand Down
4 changes: 2 additions & 2 deletions src/routes/MetaDetails/VideosList/Video/Video.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ const Video = ({ className, id, title, thumbnail, episode, released, upcoming, w
action: 'MetaDetails',
args: {
action: 'MarkVideoAsWatched',
args: [id, !watched]
args: [{ id, released }, !watched]
}
});
}, [id, watched]);
}, [id, released, watched]);
const href = React.useMemo(() => {
return deepLinks ?
typeof deepLinks.player === 'string' ?
Expand Down

0 comments on commit 12ec928

Please sign in to comment.