Merge branch 'development' into pr/704

This commit is contained in:
Timothy Z. 2026-03-02 13:33:22 +02:00
commit e26c33fe33
12 changed files with 48 additions and 22 deletions

View file

@ -1,7 +1,7 @@
{
"name": "stremio",
"displayName": "Stremio",
"version": "5.0.0-beta.29",
"version": "5.0.0-beta.30",
"author": "Smart Code OOD",
"private": true,
"license": "gpl-2.0",
@ -41,7 +41,7 @@
"react-i18next": "^15.1.3",
"react-is": "18.3.1",
"spatial-navigation-polyfill": "github:Stremio/spatial-navigation#64871b1422466f5f45d24ebc8bbd315b2ebab6a6",
"stremio-translations": "github:Stremio/stremio-translations#7c0c337f32163aa13158bb90cd6133da43feafef",
"stremio-translations": "github:Stremio/stremio-translations#1bfcb6d2a4f37bb647959ba0bbbd1ade1415c2fe",
"url": "0.11.4",
"use-long-press": "^3.2.0"
},

View file

@ -90,8 +90,8 @@ importers:
specifier: github:Stremio/spatial-navigation#64871b1422466f5f45d24ebc8bbd315b2ebab6a6
version: https://codeload.github.com/Stremio/spatial-navigation/tar.gz/64871b1422466f5f45d24ebc8bbd315b2ebab6a6
stremio-translations:
specifier: github:Stremio/stremio-translations#7c0c337f32163aa13158bb90cd6133da43feafef
version: https://codeload.github.com/Stremio/stremio-translations/tar.gz/7c0c337f32163aa13158bb90cd6133da43feafef
specifier: github:Stremio/stremio-translations#1bfcb6d2a4f37bb647959ba0bbbd1ade1415c2fe
version: https://codeload.github.com/Stremio/stremio-translations/tar.gz/1bfcb6d2a4f37bb647959ba0bbbd1ade1415c2fe
url:
specifier: 0.11.4
version: 0.11.4
@ -4133,8 +4133,8 @@ packages:
resolution: {integrity: sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==}
engines: {node: '>= 0.4'}
stremio-translations@https://codeload.github.com/Stremio/stremio-translations/tar.gz/7c0c337f32163aa13158bb90cd6133da43feafef:
resolution: {tarball: https://codeload.github.com/Stremio/stremio-translations/tar.gz/7c0c337f32163aa13158bb90cd6133da43feafef}
stremio-translations@https://codeload.github.com/Stremio/stremio-translations/tar.gz/1bfcb6d2a4f37bb647959ba0bbbd1ade1415c2fe:
resolution: {tarball: https://codeload.github.com/Stremio/stremio-translations/tar.gz/1bfcb6d2a4f37bb647959ba0bbbd1ade1415c2fe}
version: 1.45.0
string-length@4.0.2:
@ -9378,7 +9378,7 @@ snapshots:
es-errors: 1.3.0
internal-slot: 1.1.0
stremio-translations@https://codeload.github.com/Stremio/stremio-translations/tar.gz/7c0c337f32163aa13158bb90cd6133da43feafef: {}
stremio-translations@https://codeload.github.com/Stremio/stremio-translations/tar.gz/1bfcb6d2a4f37bb647959ba0bbbd1ade1415c2fe: {}
string-length@4.0.2:
dependencies:

View file

@ -23,8 +23,8 @@
// HTML sizes
@html-width: ~"calc(max(var(--small-viewport-width), var(--dynamic-viewport-width)))";
@html-height: ~"calc(max(var(--small-viewport-height), var(--dynamic-viewport-height)))";
@html-standalone-width: ~"calc(max(100%, var(--small-viewport-width)))";
@html-standalone-height: ~"calc(max(100%, var(--small-viewport-height)))";
@html-standalone-width: ~"calc(max(100%, var(--large-viewport-width)))";
@html-standalone-height: ~"calc(max(100%, var(--large-viewport-height)))";
// Safe area insets
@safe-area-inset-top: env(safe-area-inset-top, 0rem);
@ -156,6 +156,7 @@ html {
overscroll-behavior: none;
user-select: none;
touch-action: manipulation;
background-color: var(--primary-background-color);
-webkit-tap-highlight-color: transparent;
@media (display-mode: standalone) {

View file

@ -18,7 +18,9 @@ const PlatformProvider = ({ children }: Props) => {
const openExternal = (url: string) => {
try {
const { hostname } = new URL(url);
const isWhitelisted = WHITELISTED_HOSTS.some((host: string) => hostname.endsWith(host));
const isWhitelisted = WHITELISTED_HOSTS.some((host: string) =>
hostname === host || hostname.endsWith('.' + host)
);
const finalUrl = !isWhitelisted ? `https://www.stremio.com/warning#${encodeURIComponent(url)}` : url;
window.open(finalUrl, '_blank');

View file

@ -74,6 +74,11 @@
"label": "SETTINGS_SHORTCUT_SUBTITLES_DELAY",
"combos": [["G"], ["H"]]
},
{
"name": "toggleSubtitles",
"label": "SETTINGS_SHORTCUT_TOGGLE_SUBTITLES",
"combos": [["C"]]
},
{
"name": "subtitlesMenu",
"label": "SETTINGS_SHORTCUT_MENU_SUBTITLES",

View file

@ -7,7 +7,7 @@ type Props = {
src: string,
alt: string,
fallbackSrc: string,
renderFallback: () => void,
renderFallback: () => React.ReactNode,
onError: (event: React.SyntheticEvent<HTMLImageElement>) => void,
};

View file

@ -14,7 +14,7 @@ const MetaLinks = ({ className, label, links }) => {
{
typeof label === 'string' && label.length > 0 ?
<div className={styles['label-container']}>
{ stringWithPrefix(label.toUpperCase(), 'LINKS') }
{ stringWithPrefix(label.toUpperCase(), 'LINKS_') }
</div>
:
null

View file

@ -5,6 +5,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0, user-scalable=no, viewport-fit=cover">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="Stremio">
<link rel="icon" type="image/x-icon" href="<%= htmlWebpackPlugin.options.faviconsPath %>/favicon.ico">
<link rel="manifest" href="manifest.json" />

View file

@ -183,7 +183,7 @@ const Intro = ({ queryParams }) => {
return;
}
if (!state.privacyPolicyAccepted) {
dispatch({ type: 'error', error: 'You must accept the Privacy Policy' });
dispatch({ type: 'error', error: t('MUST_ACCEPT_PRIVACY_POLICY') });
return;
}
openLoaderModal();

View file

@ -19,7 +19,7 @@ const PasswordResetModal = ({ email, onCloseRequest }) => {
emailRef.current.value.length > 0 && emailRef.current.validity.valid ?
platform.openExternal('https://www.strem.io/reset-password/' + emailRef.current.value, '_blank')
:
setError('Invalid email');
setError(t('INVALID_EMAIL'));
}, []);
const passwordResetModalButtons = React.useMemo(() => {
return [
@ -31,7 +31,7 @@ const PasswordResetModal = ({ email, onCloseRequest }) => {
}
},
{
label: t('SEND'),
label: t('BUTTON_SEND'),
props: {
onClick: goToPasswordReset
}
@ -52,7 +52,7 @@ const PasswordResetModal = ({ email, onCloseRequest }) => {
ref={emailRef}
className={styles['credentials-text-input']}
type={'email'}
placeholder={'Email'}
placeholder={t('EMAIL')}
defaultValue={typeof email === 'string' ? email : ''}
onChange={emailOnChange}
onSubmit={goToPasswordReset}

View file

@ -90,6 +90,7 @@ const Player = ({ urlParams, queryParams }) => {
const nextVideoPopupDismissed = React.useRef(false);
const defaultSubtitlesSelected = React.useRef(false);
const subtitlesEnabled = React.useRef(true);
const defaultAudioTrackSelected = React.useRef(false);
const [error, setError] = React.useState(null);
@ -670,6 +671,19 @@ const Player = ({ urlParams, queryParams }) => {
combo === 1 ? onUpdateSubtitlesSize(-1) : onUpdateSubtitlesSize(1);
}, [onUpdateSubtitlesSize, onUpdateSubtitlesSize]);
onShortcut('toggleSubtitles', () => {
const savedTrack = player.streamState?.subtitleTrack;
if (subtitlesEnabled.current) {
video.setSubtitlesTrack(null);
video.setExtraSubtitlesTrack(null);
} else if (savedTrack?.id) {
savedTrack.embedded ? video.setSubtitlesTrack(savedTrack.id) : video.setExtraSubtitlesTrack(savedTrack.id);
}
subtitlesEnabled.current = !subtitlesEnabled.current;
}, [player.streamState]);
onShortcut('subtitlesMenu', () => {
closeMenus();
if (video.state?.subtitlesTracks?.length > 0 || video.state?.extraSubtitlesTracks?.length > 0) {

View file

@ -3,6 +3,7 @@
@import (reference) '~stremio/common/screen-sizes.less';
:import('~stremio/components/MetaPreview/styles.less') {
description-container: description-container;
action-buttons-container: action-buttons-container;
}
@ -12,6 +13,7 @@
display: flex;
flex-direction: column;
padding: @padding;
padding-top: calc(@padding + var(--safe-area-inset-top));
height: 100dvh;
max-width: 35rem;
overflow-y: auto;
@ -27,7 +29,7 @@
.close-button {
display: none;
position: absolute;
top: 1.3rem;
top: calc(1.3rem + var(--safe-area-inset-top));
right: 1.3rem;
padding: 0.5rem;
background-color: transparent;
@ -57,9 +59,14 @@
.info {
padding: @padding;
overflow-y: auto;
flex: 1;
.side-drawer-meta-preview {
.description-container {
display: -webkit-box;
-webkit-line-clamp: 4;
-webkit-box-orient: vertical;
}
.action-buttons-container {
padding-top: 0;
margin-top: 0;
@ -91,10 +98,6 @@
@media @phone-landscape {
.side-drawer {
max-width: 50dvw;
.info {
flex: 1;
}
}
}