diff --git a/src/components/VideoElement.css b/src/components/VideoElement.css
index cff2fd1d..f252de55 100644
--- a/src/components/VideoElement.css
+++ b/src/components/VideoElement.css
@@ -1,6 +1,6 @@
.videoElement {
width: 100%;
- background-color: var(--content);
+ background-color: black;
border-radius: 5px;
}
diff --git a/src/components/VideoElement.js b/src/components/VideoElement.js
index f1aa506a..35ec011a 100644
--- a/src/components/VideoElement.js
+++ b/src/components/VideoElement.js
@@ -5,7 +5,7 @@ import { VideoPlaceholder } from './VideoPlaceholder'
// streamUrl: string
// loading: boolean
-export function VideoElement({ streamUrl, loading }) {
+export function VideoElement({ streamUrl, loading, setProgress }) {
const videoRef = React.useRef(null);
const [error, setError] = React.useState(false);
@@ -37,6 +37,6 @@ export function VideoElement({ streamUrl, loading }) {
return No video selected
return (
-
+
)
}
diff --git a/src/views/Movie.js b/src/views/Movie.js
index 18a00056..2b576b4b 100644
--- a/src/views/Movie.js
+++ b/src/views/Movie.js
@@ -57,6 +57,35 @@ export function MovieView(props) {
}
}, [episode, streamData, setStreamUrl])
+ const setProgress = (evt) => {
+ console.log(streamData.slug, evt)
+ console.log(streamData)
+ let ls = JSON.parse(localStorage.getItem("video-progress") || "{}")
+
+ // We're just checking lookmovie for now since there is only one scraper
+ if(!ls.lookmovie) ls.lookmovie = {}
+ if(!ls.lookmovie[streamData.type]) ls.lookmovie[streamData.type] = {}
+ if(!ls.lookmovie[streamData.type][streamData.slug]) {
+ ls.lookmovie[streamData.type][streamData.slug] = {}
+ }
+
+ // Store real data
+ let key = streamData.type === "show" ? `${season}-${episode.episode}` : "full"
+ ls.lookmovie[streamData.type][streamData.slug][key] = {
+ currentlyAt: Math.floor(evt.currentTarget.currentTime),
+ totalDuration: Math.floor(evt.currentTarget.duration)
+ }
+
+ if(streamData.type === "show") {
+ ls.lookmovie[streamData.type][streamData.slug][key].show = {
+ season,
+ episode: episode.episode
+ }
+ }
+
+ localStorage.setItem("video-progress", JSON.stringify(ls))
+ }
+
return (
@@ -66,7 +95,7 @@ export function MovieView(props) {
{streamData.type === "show" ?
Season {episode.season}: Episode {episode.episode}
: undefined}
-
+
{streamData.type === "show" ?