From bde2231a909e955804f44ff92423e610f02b9f5c Mon Sep 17 00:00:00 2001 From: qtchaos <72168435+qtchaos@users.noreply.github.com> Date: Wed, 13 Mar 2024 23:20:17 +0200 Subject: [PATCH 1/6] fix: set touch-action to none --- src/components/player/atoms/Volume.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/player/atoms/Volume.tsx b/src/components/player/atoms/Volume.tsx index b2ea4cf4..6f97a14f 100644 --- a/src/components/player/atoms/Volume.tsx +++ b/src/components/player/atoms/Volume.tsx @@ -63,7 +63,7 @@ export function Volume(props: Props) { onMouseEnter={handleMouseEnter} onWheel={handleWheel} > -
+
0 ? Icons.VOLUME : Icons.VOLUME_X} />
From a69c4d2b8ccfb78fc522eb9aed9b1bfe1cabcea6 Mon Sep 17 00:00:00 2001 From: Cooper Ransom Date: Thu, 21 Mar 2024 13:30:17 -0400 Subject: [PATCH 2/6] Update github link --- README.md | 6 +++--- src/pages/Support.tsx | 2 +- src/setup/constants.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 060d5d9f..a93c9435 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Sudo-Flix is a mirror of [Movie-Web](https://github.com/movie-web/movie-web) wit | Extension | [movie-web plugin](https://shorturl.at/iqzES) | [Source Code](https://github.com/movie-web/extension) | | Proxy | [sudo-proxy](https://sudo-proxy1.sudo-flix.lol) | [Source Code](https://gitlab.com/sudo-flix/simple-proxy) | | Backend | [sudo-backend](https://backend.sudo-flix.lol) | [Source Code](https://github.com/movie-web/backend) | -| Frontend | [sudo-flix](https://sudo-flix.lol) | [Source Code](https://github.com/sudo-flix/sudo-source) | +| Frontend | [sudo-flix](https://sudo-flix.lol) | [Source Code](https://github.com/sussy-code/smov) | **I provide these if you are not able to host yourself, though I do encourage hosting the frontend.** @@ -28,7 +28,7 @@ Sudo-Flix is a mirror of [Movie-Web](https://github.com/movie-web/movie-web) wit ## Running Locally Type the following commands into your terminal / command line to run Sudo-Flix locally ```bash -git clone https://github.com/sudo-flix/sudo-source.git +git clone https://github.com/sussy-code/smov.git cd sudo-flix git pull pnpm install @@ -42,7 +42,7 @@ Then you can visit the local instance [here](http://localhost:5173) or, at local ### sudo-flix To update a sudo-flix instance you can type the below commands into a terminal at the root of your project. ```bash -git remote add upstream https://github.com/sudo-flix/sudo-source.git +git remote add upstream https://github.com/sussy-code/smov.git git fetch sudo-flix # Grab the contents of the new remote source git checkout # Most likely this would be `origin/main` git merge upstream/main diff --git a/src/pages/Support.tsx b/src/pages/Support.tsx index 74ba786e..fc1899c1 100644 --- a/src/pages/Support.tsx +++ b/src/pages/Support.tsx @@ -91,7 +91,7 @@ export function SupportPage() { , - + , ]} diff --git a/src/setup/constants.ts b/src/setup/constants.ts index 17fa0661..e98284fa 100644 --- a/src/setup/constants.ts +++ b/src/setup/constants.ts @@ -1,6 +1,6 @@ export const APP_VERSION = import.meta.env.PACKAGE_VERSION; export const DISCORD_LINK = "https://movie-web.github.io/links/discord"; -export const GITHUB_LINK = "https://github.com/sudo-flix/sudo-source"; +export const GITHUB_LINK = "https://github.com/sussy-code/smov"; export const TWITTER_LINK = "https://twitter.com/SudoFlix"; export const DONATION_LINK = "https://ko-fi.com/movieweb"; export const GA_ID = import.meta.env.VITE_GA_ID; From 4155c4b6108c26cf581ab0abb1cd265f7f0e6463 Mon Sep 17 00:00:00 2001 From: Cooper Ransom Date: Thu, 21 Mar 2024 19:01:52 -0400 Subject: [PATCH 3/6] Remove shitty auto next episode --- .../player/atoms/NextEpisodeButton.tsx | 55 +++++-------------- 1 file changed, 15 insertions(+), 40 deletions(-) diff --git a/src/components/player/atoms/NextEpisodeButton.tsx b/src/components/player/atoms/NextEpisodeButton.tsx index ce608750..3d760900 100644 --- a/src/components/player/atoms/NextEpisodeButton.tsx +++ b/src/components/player/atoms/NextEpisodeButton.tsx @@ -1,5 +1,5 @@ import classNames from "classnames"; -import React, { useCallback, useEffect, useState } from "react"; +import React, { useCallback } from "react"; import { useTranslation } from "react-i18next"; import { Icon, Icons } from "@/components/Icon"; @@ -54,30 +54,12 @@ export function NextEpisodeButton(props: { const setShouldStartFromBeginning = usePlayerStore( (s) => s.setShouldStartFromBeginning, ); - const [countdown, setCountdown] = useState(15); let show = false; if (showingState === "always") show = true; else if (showingState === "hover" && props.controlsShowing) show = true; if (isHidden || status !== "playing" || duration === 0) show = false; - useEffect(() => { - // Initialize intervalId with 0, which is a safe value to clear if not reassigned. - let intervalId: number = 0; - if (show && countdown > 0) { - intervalId = window.setInterval(() => { - setCountdown((currentCountdown) => currentCountdown - 1); - }, 1000); - } else { - window.clearInterval(intervalId); // No need for casting here. - if (!show) { - setCountdown(15); // Reset countdown when not showing. - } - } - // Cleanup function to clear the interval when the component unmounts or the dependencies change. - return () => window.clearInterval(intervalId); - }, [show, countdown]); - const animation = showingState === "hover" ? "slide-up" : "fade"; let bottom = "bottom-[calc(6rem+env(safe-area-inset-bottom))]"; if (showingState === "always") @@ -117,30 +99,23 @@ export function NextEpisodeButton(props: { >
- {countdown > 0 && show && ( -
- {t("player.nextEpisode.nextIn", { seconds: countdown })} -
- )} -
- - -
+ +
); From b2e1cc5aab2dbe59ca8c61939e357730f4360fc9 Mon Sep 17 00:00:00 2001 From: Cooper Ransom Date: Thu, 21 Mar 2024 20:08:46 -0400 Subject: [PATCH 4/6] Change next episode button to be more universal --- src/components/player/atoms/NextEpisodeButton.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/player/atoms/NextEpisodeButton.tsx b/src/components/player/atoms/NextEpisodeButton.tsx index 3d760900..b5f6548a 100644 --- a/src/components/player/atoms/NextEpisodeButton.tsx +++ b/src/components/player/atoms/NextEpisodeButton.tsx @@ -15,7 +15,7 @@ function shouldShowNextEpisodeButton( const percentage = time / duration; const secondsFromEnd = duration - time; if (secondsFromEnd <= 30) return "always"; - if (percentage >= 0.93) return "hover"; + if (percentage >= 0.94) return "hover"; return "none"; } From 39bcf8c270422027f0c3ed6d074fa0419b74bc42 Mon Sep 17 00:00:00 2001 From: qtchaos <72168435+qtchaos@users.noreply.github.com> Date: Fri, 22 Mar 2024 17:42:18 +0200 Subject: [PATCH 5/6] fix: add overflow-y-hidden for mac users --- src/components/player/atoms/Volume.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/player/atoms/Volume.tsx b/src/components/player/atoms/Volume.tsx index 6f97a14f..62662de1 100644 --- a/src/components/player/atoms/Volume.tsx +++ b/src/components/player/atoms/Volume.tsx @@ -41,8 +41,13 @@ export function Volume(props: Props) { const handleMouseEnter = useCallback(async () => { if (await canChangeVolume()) setHovering(true); + document.body.classList.add("overflow-y-hidden"); }, [setHovering]); + const handleMouseLeave = () => { + document.body.classList.remove("overflow-y-hidden"); + }; + let percentage = makePercentage(volume * 100); if (dragging) percentage = makePercentage(dragPercentage); const percentageString = makePercentageString(percentage); @@ -61,6 +66,7 @@ export function Volume(props: Props) {
From 15e11d30aad700307260b8efd571bb1c13a908e6 Mon Sep 17 00:00:00 2001 From: Cooper Ransom Date: Fri, 22 Mar 2024 13:31:25 -0400 Subject: [PATCH 6/6] Add custom @sudo-flix email --- README.md | 2 +- public/config.js | 2 +- src/assets/locales/en.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a93c9435..8438c3e0 100644 --- a/README.md +++ b/README.md @@ -72,4 +72,4 @@ git push # Push to YOUR repository ## Contact Me **Discord:** *.baddeveloper* -**Email:** *[sudo-flix@proton.me](mailto:sudo-flix@proton.me)* +**Email:** *[dev@sudo-flix.lol](mailto:dev@sudo-flix.lol)* diff --git a/public/config.js b/public/config.js index 7eb8a8bc..1f4dbfa6 100644 --- a/public/config.js +++ b/public/config.js @@ -1,7 +1,7 @@ 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_DMCA_EMAIL: "dev@sudo-flix.lol", VITE_GA_ID: "G-3VB2TNCW2V", VITE_NORMAL_ROUTER: true, VITE_TMDB_READ_API_KEY: "eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJhZTljNGE2ZDE1ZDFiODZiNzdlMWQyYmI5ZGY0MzdmYyIsInN1YiI6IjY1YjNmMWI0NTk0Yzk0MDE2MzNkZDBjNSIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.kAX7TkbKuJkNty6IsjcCLnoENFicVZn6d6DkLQsy3p8", diff --git a/src/assets/locales/en.json b/src/assets/locales/en.json index a9db3c83..df636e26 100644 --- a/src/assets/locales/en.json +++ b/src/assets/locales/en.json @@ -453,7 +453,7 @@ }, "screens": { "dmca": { - "text": "Welcome to sudo-flix's DMCA contact page. If you believe your copyrighted work has been improperly used on our platform (😢), please send a detailed DMCA notice to: sudo-flix@proton.me below. Please include a description of the copyrighted material, your contact details, and a statement of good faith belief. We're committed to resolving these matters promptly and appreciate your cooperation.", + "text": "Welcome to sudo-flix's DMCA contact page. If you believe your copyrighted work has been improperly used on our platform (😢), please send a detailed DMCA notice to: dev@sudo-flix.lol below. Please include a description of the copyrighted material, your contact details, and a statement of good faith belief. We're committed to resolving these matters promptly and appreciate your cooperation.", "title": "DMCA :(" }, "loadingApp": "Loading application",