Merge pull request #981 from Materialious/update/1.9.10

Minor fixes to android tv detection
This commit is contained in:
Ward
2025-06-19 16:35:01 +12:00
committed by GitHub
11 changed files with 20 additions and 42 deletions
+2 -2
View File
@@ -7,8 +7,8 @@ android {
applicationId "us.materialio.app"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 126
versionName "1.9.9"
versionCode 127
versionName "1.9.10"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
@@ -61,7 +61,11 @@
<release version="1.9.9" date="2025-6-19">
<release version="1.9.10" date="2025-6-19">
<url>https://github.com/Materialious/Materialious/releases/tag/1.9.10</url>
</release>
<release version="1.9.9" date="2025-6-19">
<url>https://github.com/Materialious/Materialious/releases/tag/1.9.9</url>
</release>
<release version="1.9.8" date="2025-6-18">
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "Materialious",
"version": "1.9.9",
"version": "1.9.10",
"description": "Modern material design for Invidious.",
"author": {
"name": "Ward Pearce",
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "materialious",
"version": "1.9.9",
"version": "1.9.10",
"private": true,
"scripts": {
"dev": "vite dev",
@@ -70,4 +70,4 @@
"svelte-persisted-store": "^0.12.0",
"youtubei.js": "^14.0.0"
}
}
}
@@ -2,12 +2,12 @@ import { registerPlugin } from '@capacitor/core';
import { WebPlugin } from '@capacitor/core';
interface AndroidTV {
isAndroidTv: () => Promise<boolean>;
isAndroidTv: () => Promise<{ value: boolean }>;
}
export class AndroidTvWeb extends WebPlugin implements AndroidTV {
async isAndroidTv(): Promise<boolean> {
return false;
async isAndroidTv(): Promise<{ value: boolean }> {
return { value: false };
}
}
@@ -9,7 +9,7 @@
let mediumCol = $state('6');
async function checkWidth() {
if (await androidTv.isAndroidTv()) {
if ((await androidTv.isAndroidTv()).value) {
mediumCol = '3';
} else if (innerWidth <= 1750) {
largeCol = '4';
+2 -28
View File
@@ -191,7 +191,7 @@
if (
Capacitor.getPlatform() === 'android' &&
data.video.adaptiveFormats.length > 0 &&
!(await androidTv.isAndroidTv())
!(await androidTv.isAndroidTv()).value
) {
const videoFormats = data.video.adaptiveFormats.filter((format) =>
format.type.startsWith('video/')
@@ -515,20 +515,12 @@
} else {
playerElement.pause();
}
if (!document.fullscreenElement) {
shakaUi.getControls()?.toggleFullScreen();
}
return false;
});
Mousetrap.bind('right', () => {
if (!playerElement) return;
playerElement.currentTime = playerElement.currentTime + 10;
if (!document.fullscreenElement) {
shakaUi.getControls()?.toggleFullScreen();
}
return false;
});
@@ -536,10 +528,6 @@
if (!playerElement) return;
playerElement.currentTime = playerElement.currentTime - 10;
if (!document.fullscreenElement) {
shakaUi.getControls()?.toggleFullScreen();
}
return false;
});
@@ -559,10 +547,6 @@
player.setTextTrackVisibility(true);
}
}
if (!document.fullscreenElement) {
shakaUi.getControls()?.toggleFullScreen();
}
return false;
});
@@ -579,11 +563,6 @@
if (!playerElement) return;
playerElement.playbackRate = playerElement.playbackRate - 0.25;
if (!document.fullscreenElement) {
shakaUi.getControls()?.toggleFullScreen();
}
return false;
});
@@ -591,17 +570,12 @@
if (!playerElement) return;
playerElement.playbackRate = playerElement.playbackRate + 0.25;
if (!document.fullscreenElement) {
shakaUi.getControls()?.toggleFullScreen();
}
return false;
});
setChapterMarkers();
if (await androidTv.isAndroidTv()) {
if ((await androidTv.isAndroidTv()).value) {
shakaUi.getControls()?.toggleFullScreen();
Mousetrap.bind('enter', () => {
@@ -92,7 +92,7 @@
}
onMount(async () => {
isAndroidTv = await androidTv.isAndroidTv();
isAndroidTv = (await androidTv.isAndroidTv()).value;
Mousetrap.bind(['ctrl+k', 'command+k'], () => {
document.getElementById('search-box')?.focus();
showSearchBox = !showSearchBox;
@@ -158,7 +158,7 @@
tabindex="0"
role="button"
onclick={async () => {
if (await androidTv.isAndroidTv()) {
if ((await androidTv.isAndroidTv()).value) {
goto(watchUrl.toString());
}
}}
+1 -1
View File
@@ -170,7 +170,7 @@
onMount(async () => {
ui();
isAndroidTv = await androidTv.isAndroidTv();
isAndroidTv = (await androidTv.isAndroidTv()).value;
document.addEventListener('click', linkClickOverwrite);
+1 -1
View File
@@ -3,7 +3,7 @@ import os
import re
from datetime import datetime
LATEST_VERSION = "1.9.9"
LATEST_VERSION = "1.9.10"
RELEASE_DATE = datetime.now().strftime("%Y-%-m-%d") # Format: YYYY-M-D
WORKING_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "materialious")