mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-20 10:42:12 +00:00
Merge pull request #445 from Stremio/update-last-watched
Update last watched
This commit is contained in:
commit
12ec92810f
5 changed files with 15 additions and 13 deletions
14
package-lock.json
generated
14
package-lock.json
generated
|
|
@ -12,7 +12,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",
|
||||
|
|
@ -2703,9 +2703,9 @@
|
|||
"integrity": "sha512-Dt3PYmy1DZ473QNs99KYXVWQPHtpIl37VUY0+gCEvvuCqE1fRrZIJtZ9KbysUKonvO7WwdQDztgcW0iGoc1dEA=="
|
||||
},
|
||||
"node_modules/@stremio/stremio-core-web": {
|
||||
"version": "0.44.21",
|
||||
"resolved": "https://registry.npmjs.org/@stremio/stremio-core-web/-/stremio-core-web-0.44.21.tgz",
|
||||
"integrity": "sha512-xVCE9A/ZWLJ8un1x6VYSDY4fYclxq4rV98UIgUcc9SZlleHOoB92kqy5TIXhQ6v+Ym9EX9OU2uLBv+d2fi6KHA==",
|
||||
"version": "0.44.22",
|
||||
"resolved": "https://registry.npmjs.org/@stremio/stremio-core-web/-/stremio-core-web-0.44.22.tgz",
|
||||
"integrity": "sha512-YwnCdd7vg0iyk3wZ1NkPzMTe+WA8coe497Dn/Lt/ngdkhEF7gP5TewqNzlE4BDVgly6aZfub0h1G4gyx/kb3Eg==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "7.16.0"
|
||||
}
|
||||
|
|
@ -16804,9 +16804,9 @@
|
|||
"integrity": "sha512-Dt3PYmy1DZ473QNs99KYXVWQPHtpIl37VUY0+gCEvvuCqE1fRrZIJtZ9KbysUKonvO7WwdQDztgcW0iGoc1dEA=="
|
||||
},
|
||||
"@stremio/stremio-core-web": {
|
||||
"version": "0.44.21",
|
||||
"resolved": "https://registry.npmjs.org/@stremio/stremio-core-web/-/stremio-core-web-0.44.21.tgz",
|
||||
"integrity": "sha512-xVCE9A/ZWLJ8un1x6VYSDY4fYclxq4rV98UIgUcc9SZlleHOoB92kqy5TIXhQ6v+Ym9EX9OU2uLBv+d2fi6KHA==",
|
||||
"version": "0.44.22",
|
||||
"resolved": "https://registry.npmjs.org/@stremio/stremio-core-web/-/stremio-core-web-0.44.22.tgz",
|
||||
"integrity": "sha512-YwnCdd7vg0iyk3wZ1NkPzMTe+WA8coe497Dn/Lt/ngdkhEF7gP5TewqNzlE4BDVgly6aZfub0h1G4gyx/kb3Eg==",
|
||||
"requires": {
|
||||
"@babel/runtime": "7.16.0"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
@ -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
|
||||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -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' ?
|
||||
|
|
|
|||
Loading…
Reference in a new issue