Skip to content

Commit

Permalink
fix: prevent videos from being removed after reset
Browse files Browse the repository at this point in the history
  • Loading branch information
dnicolson committed Jul 21, 2024
1 parent efab4db commit c581202
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/remove-video-enhancer-app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ export default class RemoveVideoEnhancerApp extends Component<Properties, State>
try {
await removeWatchHistoryForVideo(this.props.config, videoId)
removeWatchedFromPlaylistUI(videoId)
const { playlist } = this.state
playlist?.continuations[0].videos.forEach((v) => {
if (v.videoId === videoId) {
v.percentDurationWatched = 0
}
})
} catch (error) {
this.setState({ ...this.state, errorMessages: [error.message] })
}
Expand Down

0 comments on commit c581202

Please sign in to comment.