1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-29 16:07:40 +01:00

Merge conflicts

This commit is contained in:
Cooper Ransom 2024-03-21 18:47:49 -04:00
commit c935ee160b
3 changed files with 24 additions and 9 deletions

View file

@ -1,8 +0,0 @@
window.CONFIG = {
VITE_BACKEND_URL: "https://backend.sudo-flix.lol/",
VITE_CORS_PROXY_URL: "https://sudo-proxy1.sudo-flix.lol%2Chttps//sudo-proxy2.sudo-flix.lol,https://sudo-proxy3.sudo-flix.lol,https://sudo-proxy4.sudo-flix.lol,https://sudo-proxy5.sudo-flix.lol",
VITE_DMCA_EMAIL: "sudo-flix@proton.me",
VITE_GA_ID: "G-3VB2TNCW2V",
VITE_NORMAL_ROUTER: true,
VITE_TMDB_READ_API_KEY: "eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJhZTljNGE2ZDE1ZDFiODZiNzdlMWQyYmI5ZGY0MzdmYyIsInN1YiI6IjY1YjNmMWI0NTk0Yzk0MDE2MzNkZDBjNSIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.kAX7TkbKuJkNty6IsjcCLnoENFicVZn6d6DkLQsy3p8",
};

View file

@ -395,7 +395,8 @@
},
"nextEpisode": {
"replay": "Replay",
"next": "Next episode"
"nextIn": "Next episode in {{seconds}}",
"next": "Next Episode"
},
"playbackError": {
"badge": "Playback error",

View file

@ -19,6 +19,11 @@ function shouldShowNextEpisodeButton(
return "none";
}
function shouldStartCountdown(time: number, duration: number): boolean {
const secondsFromEnd = duration - time;
return secondsFromEnd <= 30 || time / duration >= 0.93;
}
function Button(props: {
className: string;
onClick?: () => void;
@ -88,6 +93,23 @@ export function NextEpisodeButton(props: {
props.onChange?.(metaCopy);
}, [setDirectMeta, meta, props, setShouldStartFromBeginning]);
const [seconds, setSeconds] = useState(15);
useEffect(() => {
const interval = setInterval(() => {
setSeconds((prevSeconds) => prevSeconds - 1);
}, 1000);
return () => clearInterval(interval);
}, []);
useEffect(() => {
if (seconds === 0) {
loadNextEpisode();
setSeconds(15);
}
}, [seconds, loadNextEpisode]);
if (!meta?.episode || !nextEp) return null;
if (metaType !== "show") return null;