Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa4a4fb5ef | ||
|
|
7ab4ae0c4b |
@@ -22,7 +22,7 @@ jobs:
|
|||||||
CARGO_TARGET_DIR: /tmp/fennec-netflex/target
|
CARGO_TARGET_DIR: /tmp/fennec-netflex/target
|
||||||
CARGO_INCREMENTAL: "0"
|
CARGO_INCREMENTAL: "0"
|
||||||
SDK_GIT: https://gitea.bluefox.support/fennec/sdk
|
SDK_GIT: https://gitea.bluefox.support/fennec/sdk
|
||||||
SDK_TAG: v0.1.0
|
SDK_TAG: v0.1.2
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
run: |
|
run: |
|
||||||
@@ -45,22 +45,22 @@ jobs:
|
|||||||
printf 'Types: deb\nURIs: http://ports.ubuntu.com/ubuntu-ports/\nSuites: %s %s-updates %s-security\nComponents: main universe\nArchitectures: arm64\nSigned-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg\n' \
|
printf 'Types: deb\nURIs: http://ports.ubuntu.com/ubuntu-ports/\nSuites: %s %s-updates %s-security\nComponents: main universe\nArchitectures: arm64\nSigned-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg\n' \
|
||||||
"$VERSION_CODENAME" "$VERSION_CODENAME" "$VERSION_CODENAME" >/etc/apt/sources.list.d/arm64-ports.sources
|
"$VERSION_CODENAME" "$VERSION_CODENAME" "$VERSION_CODENAME" >/etc/apt/sources.list.d/arm64-ports.sources
|
||||||
apt-get update -qq
|
apt-get update -qq
|
||||||
# Multiarch dev packages: both architectures at once. The GStreamer
|
# Multiarch dev packages for both architectures; for arm64 only the
|
||||||
# ones can't be: amd64 now, swapped to arm64 in the Build step.
|
# GStreamer runtime libraries: its dev packages can't be installed for
|
||||||
|
# two architectures at once (package.sh --arm links the libraries).
|
||||||
libs="libfontconfig1-dev libfreetype-dev libxkbcommon-dev libglib2.0-dev"
|
libs="libfontconfig1-dev libfreetype-dev libxkbcommon-dev libglib2.0-dev"
|
||||||
apt-get install -y -qq --no-install-recommends build-essential pkg-config \
|
apt-get install -y -qq --no-install-recommends build-essential pkg-config \
|
||||||
gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libc6-dev-arm64-cross \
|
gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libc6-dev-arm64-cross \
|
||||||
$libs $(for l in $libs; do printf '%s:arm64 ' "$l"; done) \
|
$libs $(for l in $libs; do printf '%s:arm64 ' "$l"; done) \
|
||||||
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev >/dev/null
|
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
|
||||||
|
libgstreamer1.0-0:arm64 libgstreamer-plugins-base1.0-0:arm64
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
curl -sSf https://sh.rustup.rs | sh -s -- -y -q --profile minimal --no-modify-path --target aarch64-unknown-linux-gnu
|
curl -sSf https://sh.rustup.rs | sh -s -- -y -q --profile minimal --no-modify-path --target aarch64-unknown-linux-gnu
|
||||||
"$CARGO_HOME/bin/cargo" install -q --locked --git "$SDK_GIT" --tag "$SDK_TAG" sf-pack
|
"$CARGO_HOME/bin/cargo" install -q --locked --git "$SDK_GIT" --tag "$SDK_TAG" sf-pack
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
export PATH="$CARGO_HOME/bin:$PATH"
|
export PATH="$CARGO_HOME/bin:$PATH"
|
||||||
"$W/src/package.sh"
|
"$W/src/package.sh"
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends \
|
|
||||||
libgstreamer1.0-dev:arm64 libgstreamer-plugins-base1.0-dev:arm64 >/dev/null
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
"$W/src/package.sh" --arm
|
"$W/src/package.sh" --arm
|
||||||
- name: Release
|
- name: Release
|
||||||
env:
|
env:
|
||||||
|
|||||||
6
Cargo.lock
generated
6
Cargo.lock
generated
@@ -3402,7 +3402,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "netflex-tv"
|
name = "netflex-tv"
|
||||||
version = "0.1.2"
|
version = "0.1.4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"env_logger",
|
"env_logger",
|
||||||
@@ -4864,8 +4864,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sf-ui"
|
name = "sf-ui"
|
||||||
version = "0.1.0"
|
version = "0.1.2"
|
||||||
source = "git+https://gitea.bluefox.support/fennec/sdk?tag=v0.1.0#f00e8c68479ec5271d06be5737d5c60a831c944e"
|
source = "git+https://gitea.bluefox.support/fennec/sdk?tag=v0.1.2#cb37d872ed7195e57268e0c3a1a76367039bf959"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"glow 0.16.0",
|
"glow 0.16.0",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "netflex-tv"
|
name = "netflex-tv"
|
||||||
description = "Netflex for SmartFox: native TV client with Liquid Glass and hardware video playback"
|
description = "Netflex for SmartFox: native TV client with Liquid Glass and hardware video playback"
|
||||||
version = "0.1.2"
|
version = "0.1.4"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
# sf-ui (and Slint) are GPL-3.0 on a TV box.
|
# sf-ui (and Slint) are GPL-3.0 on a TV box.
|
||||||
license = "GPL-3.0-only"
|
license = "GPL-3.0-only"
|
||||||
@@ -10,7 +10,7 @@ publish = false
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
# The Fennec OS UI kit (Fennec SDK): Liquid Glass, TV components, images.
|
# The Fennec OS UI kit (Fennec SDK): Liquid Glass, TV components, images.
|
||||||
# Working on sf-ui next to this app: see README.md.
|
# Working on sf-ui next to this app: see README.md.
|
||||||
sf-ui = { git = "https://gitea.bluefox.support/fennec/sdk", tag = "v0.1.0" }
|
sf-ui = { git = "https://gitea.bluefox.support/fennec/sdk", tag = "v0.1.2" }
|
||||||
slint = "1.18"
|
slint = "1.18"
|
||||||
anyhow = "1"
|
anyhow = "1"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
@@ -22,7 +22,7 @@ ureq = { version = "3", features = ["json"] }
|
|||||||
|
|
||||||
# Video playback (GStreamer) only on Linux, the TV.
|
# Video playback (GStreamer) only on Linux, the TV.
|
||||||
[target.'cfg(target_os = "linux")'.dependencies]
|
[target.'cfg(target_os = "linux")'.dependencies]
|
||||||
sf-ui = { git = "https://gitea.bluefox.support/fennec/sdk", tag = "v0.1.0", features = ["video"] }
|
sf-ui = { git = "https://gitea.bluefox.support/fennec/sdk", tag = "v0.1.2", features = ["video"] }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
slint-build = "1.18"
|
slint-build = "1.18"
|
||||||
|
|||||||
2
app.toml
2
app.toml
@@ -2,7 +2,7 @@
|
|||||||
id = "support.bluefox.netflex"
|
id = "support.bluefox.netflex"
|
||||||
name = "Netflex"
|
name = "Netflex"
|
||||||
# Release versions only (1.2.3). Bump it (and Cargo.toml) for every release.
|
# Release versions only (1.2.3). Bump it (and Cargo.toml) for every release.
|
||||||
version = "0.1.2"
|
version = "0.1.4"
|
||||||
kind = "exec"
|
kind = "exec"
|
||||||
category = "Saját streaming"
|
category = "Saját streaming"
|
||||||
description = "Filmek és sorozatok a saját Netflex szerveredről, natívan: azonnal indul, miközben töltődik, hardveres videódekódolással."
|
description = "Filmek és sorozatok a saját Netflex szerveredről, natívan: azonnal indul, miközben töltődik, hardveres videódekódolással."
|
||||||
|
|||||||
25
package.sh
25
package.sh
@@ -9,11 +9,12 @@
|
|||||||
# Build on Debian trixie or older (the TV's glibc), with the GStreamer dev
|
# Build on Debian trixie or older (the TV's glibc), with the GStreamer dev
|
||||||
# packages (libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev) and
|
# packages (libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev) and
|
||||||
# sf-pack from the Fennec SDK:
|
# sf-pack from the Fennec SDK:
|
||||||
# cargo install --locked --git https://gitea.bluefox.support/fennec/sdk --tag v0.1.0 sf-pack
|
# cargo install --locked --git https://gitea.bluefox.support/fennec/sdk --tag v0.1.2 sf-pack
|
||||||
# --arm needs gcc-aarch64-linux-gnu and the arm64 (multiarch) dev packages
|
# --arm also needs gcc-aarch64-linux-gnu, the arm64 (multiarch) dev packages
|
||||||
# instead. The GStreamer dev packages of the two architectures can't be
|
# of fontconfig, freetype, xkbcommon and glib, and the arm64 GStreamer
|
||||||
# installed together: swap them between the two runs, as
|
# runtime libraries (libgstreamer1.0-0:arm64 libgstreamer-plugins-base1.0-0:arm64).
|
||||||
# .gitea/workflows/release.yml does.
|
# Not the GStreamer dev packages: they can't be installed for two
|
||||||
|
# architectures at once, so the build links the runtime libraries directly.
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
@@ -43,6 +44,20 @@ else
|
|||||||
export PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_SYSROOT_DIR=/
|
export PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_SYSROOT_DIR=/
|
||||||
export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig:/usr/share/pkgconfig
|
export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig:/usr/share/pkgconfig
|
||||||
rustup target list --installed | grep -qx "$t" || rustup target add "$t"
|
rustup target list --installed | grep -qx "$t" || rustup target add "$t"
|
||||||
|
# GStreamer without pkg-config (system-deps): link the runtime libraries
|
||||||
|
# through a folder of unversioned names.
|
||||||
|
mkdir -p "$target"
|
||||||
|
gst="$(cd "$target" && pwd)/arm-gstreamer"
|
||||||
|
rm -rf "$gst" && mkdir -p "$gst"
|
||||||
|
# system-deps key (the pkg-config name) and the library it stands for.
|
||||||
|
for pair in GSTREAMER_1_0:gstreamer-1.0 GSTREAMER_BASE_1_0:gstbase-1.0 \
|
||||||
|
GSTREAMER_APP_1_0:gstapp-1.0 GSTREAMER_VIDEO_1_0:gstvideo-1.0; do
|
||||||
|
key=${pair%%:*} lib=${pair#*:}
|
||||||
|
so=/usr/lib/aarch64-linux-gnu/lib$lib.so.0
|
||||||
|
[ -e "$so" ] || { echo "missing $so (install the arm64 GStreamer runtime libraries)" >&2; exit 1; }
|
||||||
|
ln -s "$so" "$gst/lib$lib.so"
|
||||||
|
export "SYSTEM_DEPS_${key}_NO_PKG_CONFIG=1" "SYSTEM_DEPS_${key}_LIB=$lib" "SYSTEM_DEPS_${key}_SEARCH_NATIVE=$gst"
|
||||||
|
done
|
||||||
cargo build --release --locked --target "$t"
|
cargo build --release --locked --target "$t"
|
||||||
rm -rf dist-arm
|
rm -rf dist-arm
|
||||||
pack "$target/$t/release/netflex-tv" dist-arm
|
pack "$target/$t/release/netflex-tv" dist-arm
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ impl Config {
|
|||||||
/// per-device look: `$HOME/.config/netflex/device.toml`.
|
/// per-device look: `$HOME/.config/netflex/device.toml`.
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
pub struct Local {
|
pub struct Local {
|
||||||
/// "auto" | "full" | "light" | "off"
|
/// "auto" | "full" | "light" | "off" (Material)
|
||||||
#[serde(default = "auto")]
|
#[serde(default = "auto")]
|
||||||
pub glass: String,
|
pub glass: String,
|
||||||
/// The release group picked per anime (AniList id -> "SubsPlease|1080").
|
/// The release group picked per anime (AniList id -> "SubsPlease|1080").
|
||||||
@@ -91,11 +91,13 @@ impl Local {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Applies the glass look ("auto" = full: the TV's GPU handles it).
|
/// Applies the glass look. "auto": sf-ui measures the GPU and picks full,
|
||||||
|
/// light or the matte Material style; "off" (shown as "Matt") is Material.
|
||||||
pub fn apply_look(glass: &sf_ui::Glass, look: &str) {
|
pub fn apply_look(glass: &sf_ui::Glass, look: &str) {
|
||||||
glass.set_quality(match look {
|
match look {
|
||||||
"light" => sf_ui::Quality::Light,
|
"full" => glass.set_quality(sf_ui::Quality::Full),
|
||||||
"off" => sf_ui::Quality::Flat,
|
"light" => glass.set_quality(sf_ui::Quality::Light),
|
||||||
_ => sf_ui::Quality::Full,
|
"off" => glass.set_quality(sf_ui::Quality::Material),
|
||||||
});
|
_ => glass.set_auto_quality(),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1191,7 +1191,8 @@ pub fn key(c: &Controller, a: Action, repeat: bool) {
|
|||||||
p.osd_until = now + OSD;
|
p.osd_until = now + OSD;
|
||||||
let row = buttons(p);
|
let row = buttons(p);
|
||||||
match a {
|
match a {
|
||||||
Action::Ok | Action::PlayPause if p.area == 1 && visible => match p.button {
|
// OK presses the focused button; play/pause always plays or pauses.
|
||||||
|
Action::Ok if p.area == 1 && visible => match p.button {
|
||||||
0 => {
|
0 => {
|
||||||
toggle(p, now);
|
toggle(p, now);
|
||||||
Then::Nothing
|
Then::Nothing
|
||||||
|
|||||||
@@ -668,11 +668,11 @@ impl Settings {
|
|||||||
lines.push(L::chips(
|
lines.push(L::chips(
|
||||||
"look",
|
"look",
|
||||||
"ÜVEGHATÁS",
|
"ÜVEGHATÁS",
|
||||||
[("auto", "Automatikus"), ("full", "Teljes (liquid glass)"), ("light", "Könnyített"), ("off", "Kikapcsolva")].iter().map(|(v, l)| Ch::new(*v, *l).active(cur == *v)).collect(),
|
[("auto", "Automatikus"), ("full", "Teljes (liquid glass)"), ("light", "Könnyített"), ("off", "Matt")].iter().map(|(v, l)| Ch::new(*v, *l).active(cur == *v)).collect(),
|
||||||
));
|
));
|
||||||
lines.push(L::text(
|
lines.push(L::text(
|
||||||
"look-hint2",
|
"look-hint2",
|
||||||
"A teljes „liquid glass” a felületek peremén lencseként megtöri a mögöttük lévő képet: ez a legszebb, de a legtöbb erőforrást is ez kéri. A könnyített mód ugyanilyen fényes peremet kap, egyszerű fagyasztással. Kikapcsolva nincs elmosás: gyengébb TV-n ez a legsimább.",
|
"Automatikusan az első indításkor lemérjük a TV grafikus teljesítményét, és a legszebb olyan módot választjuk, amely még akadásmentes. A teljes „liquid glass” a felületek peremén lencseként megtöri a mögöttük lévő képet: ez a legszebb, de a legtöbb erőforrást is ez kéri. A könnyített mód ugyanilyen fényes peremet kap, egyszerű fagyasztással. A matt mód üveg helyett sima, kitöltött felületeket rajzol: gyenge TV-n (pl. Raspberry Pi 4) ez a legsimább.",
|
||||||
"caption",
|
"caption",
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user