From a0615bda425c6c4ee79257b7376b2f549b60e373 Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 6 Oct 2025 21:50:27 +0200 Subject: [PATCH 1/3] Complete addition of cause argument As mentioned in #296 error cast are now added with cause argument. Signed-off-by: Christian --- src/routes/Intro/useAppleLogin.ts | 2 +- src/routes/Intro/useFacebookLogin.ts | 2 +- src/services/Chromecast/ChromecastTransport.js | 4 ++-- src/services/Shell/Shell.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/routes/Intro/useAppleLogin.ts b/src/routes/Intro/useAppleLogin.ts index 6b940e81a..c0278fee8 100644 --- a/src/routes/Intro/useAppleLogin.ts +++ b/src/routes/Intro/useAppleLogin.ts @@ -49,7 +49,7 @@ const useAppleLogin = (): [() => Promise, () => void] => { timeout.current && clearTimeout(timeout.current); timeout.current = setTimeout(() => { if (tries >= MAX_TRIES) - return reject(new Error('Failed to authenticate with Apple')); + return reject(new Error('Failed to authenticate with Apple', { cause: 'Number of allowed tries exceeded!' })); tries++; diff --git a/src/routes/Intro/useFacebookLogin.ts b/src/routes/Intro/useFacebookLogin.ts index 901ca9495..ac14301a5 100644 --- a/src/routes/Intro/useFacebookLogin.ts +++ b/src/routes/Intro/useFacebookLogin.ts @@ -39,7 +39,7 @@ const useFacebookLogin = () => { timeout.current && clearTimeout(timeout.current); timeout.current = setTimeout(() => { if (tries >= MAX_TRIES) - return reject(new Error('Failed to authenticate with facebook')); + return reject(new Error('Failed to authenticate with facebook', { cause: 'Number of allowed tries exceeded!' })); tries++; diff --git a/src/services/Chromecast/ChromecastTransport.js b/src/services/Chromecast/ChromecastTransport.js index 5b3e8b4f1..89c91c5e4 100644 --- a/src/services/Chromecast/ChromecastTransport.js +++ b/src/services/Chromecast/ChromecastTransport.js @@ -21,7 +21,7 @@ const initialize = () => { if (castAPIAvailable) { resolve(); } else { - reject(new Error('window.cast api not available')); + reject(new Error('window.cast api not available', { cause: 'castAPIAvailable is null.' })); } } if (castAPIAvailable !== null) { @@ -167,7 +167,7 @@ function ChromecastTransport() { }); })); } else { - return Promise.reject(new Error('Session not started')); + return Promise.reject(new Error('Session not started', { cause: 'castSession is null.' })); } }; } diff --git a/src/services/Shell/Shell.js b/src/services/Shell/Shell.js index d8f914a83..85d2dafd2 100644 --- a/src/services/Shell/Shell.js +++ b/src/services/Shell/Shell.js @@ -63,7 +63,7 @@ function Shell() { } catch (e) { console.error(e); active = false; - error = new Error(e); + error = new Error('Failed to initialize shell transport', { cause: e }); starting = false; onStateChanged(); transport = null; From 2dee307ac36675d87604c1b6edaab0efdcc04a8b Mon Sep 17 00:00:00 2001 From: PsyGuy007-sys Date: Wed, 8 Oct 2025 09:29:55 +0200 Subject: [PATCH 2/3] Add media key play/pause shortcuts --- src/routes/Player/Player.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/routes/Player/Player.js b/src/routes/Player/Player.js index 436f1a781..a55b228fc 100644 --- a/src/routes/Player/Player.js +++ b/src/routes/Player/Player.js @@ -547,6 +547,36 @@ const Player = ({ urlParams, queryParams }) => { break; } + case 'MediaPlayPause': { + if (!menusOpen && !nextVideoPopupOpen && video.state.paused !== null) { + event.preventDefault(); + if (video.state.paused) { + onPlayRequested(); + setSeeking(false); + } else { + onPauseRequested(); + } + } + + break; + } + case 'MediaPlay': { + if (!menusOpen && !nextVideoPopupOpen && video.state.paused === true) { + event.preventDefault(); + onPlayRequested(); + setSeeking(false); + } + + break; + } + case 'MediaPause': { + if (!menusOpen && !nextVideoPopupOpen && video.state.paused === false) { + event.preventDefault(); + onPauseRequested(); + } + + break; + } case 'ArrowRight': { if (!menusOpen && !nextVideoPopupOpen && video.state.time !== null) { const seekDuration = event.shiftKey ? settings.seekShortTimeDuration : settings.seekTimeDuration; From ca3a2774d2408ac7677903d832677dfa90883491 Mon Sep 17 00:00:00 2001 From: Sunny Pal <77166237+bashSunny101@users.noreply.github.com> Date: Fri, 10 Oct 2025 00:21:41 +0530 Subject: [PATCH 3/3] Fix typos and enhance clarity in CODE_OF_CONDUCT Corrected typos and improved clarity in the CODE_OF_CONDUCT.md. Fixes: #1031 --- CODE_OF_CONDUCT.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 921fba0a7..966cec58c 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -32,12 +32,12 @@ Project maintainers are responsible for enforcing this code of conduct. They can - Refrain from excesive comments generated by AI. - Refrain from docs generated entirely by AI. - Always check what files you are committing and submitting to the PR when you are using any agent for help or an AI model. -- If you don't how to tackle a problem and AI can't help you, please just ask or look in Stack Overlflow, Google, Medium etc. +- If you don't know how to tackle a problem and AI can't help you, please just ask or look in Stack Overlflow, Google, Medium etc. - Learning how to code is fun and easier when using AI, but sometimes it might be just too much ... what are you going to learn, if AI does everything for you and you don't know what the code you are submitting actually does?! ## Scope -This Code of Conduct applies everywhere in `stremio-web` repository, and also applies when an individual is officially representing the project or its community in other spaces. +This Code of Conduct applies everywhere in `stremio-web` repository, and also applies when an individual is officially representing the project or it's community in other spaces. ## Enforcement