setType(v.value)}>
{v.label}
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..ac8db275 100644
--- a/src/views/Movie.js
+++ b/src/views/Movie.js
@@ -54,9 +54,37 @@ export function MovieView(props) {
})
return () => {
cancel = true;
- }
+ }
}, [episode, streamData, setStreamUrl])
+ const setProgress = (evt) => {
+ 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),
+ updatedAt: Date.now()
+ }
+
+ 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,13 +94,15 @@ export function MovieView(props) {
{streamData.type === "show" ?
Season {episode.season}: Episode {episode.episode}
: undefined}
-
+
{streamData.type === "show" ?
diff --git a/src/views/Search.js b/src/views/Search.js
index 67b0179c..c4ef950e 100644
--- a/src/views/Search.js
+++ b/src/views/Search.js
@@ -115,6 +115,7 @@ export function SearchView() {
{ label: "Movie", value: "movie" },
{ label: "TV Show", value: "show" }
]}
+ noWrap={true}
selected={type}
/>
searchMovie(str, type)} />
@@ -126,7 +127,7 @@ export function SearchView() {
Whoops, there are a few {type}s like that
{options?.map((v, i) => (
- {
+ {
setShowingOptions(false)
getStream(v.title, v.slug, v.type, v.season, v.episode)
}}/>