From 1bdb74f2df1395fdee1d0929161bd1707a67d710 Mon Sep 17 00:00:00 2001 From: euzu Date: Tue, 17 Jun 2025 17:42:43 +0200 Subject: [PATCH] release v3.1.4 --- CHANGELOG.md | 2 +- Cargo.lock | 4 ++-- Cargo.toml | 2 +- README.md | 30 ++++++++++++++++++++++++++++++ frontend/package.json | 2 +- src/api/serve.rs | 19 ++++++++++--------- 6 files changed, 45 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index af101d10c..497c4e2d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ # Changelog -# 3.1.4 (2025-06-xx) +# 3.1.4 (2025-06-17) - share live stream refactored - fixed active user count - fixed hls streaming diff --git a/Cargo.lock b/Cargo.lock index 418699caa..3c93e698b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3020,11 +3020,11 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tuliprox" -version = "3.1.3" +version = "3.1.4" dependencies = [ "arc-swap", "axum", - "base64 0.22.1", + "base64 0.21.7", "bincode", "bitflags 2.9.1", "blake3", diff --git a/Cargo.toml b/Cargo.toml index fbbdd3434..ecae5ae76 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tuliprox" -version = "3.1.3" +version = "3.1.4" edition = "2021" [profile.release] diff --git a/README.md b/README.md index 2a93ae565..8e9c9f96c 100644 --- a/README.md +++ b/README.md @@ -779,6 +779,7 @@ Each format has different properties - resolve_series_delay: seconds, - resolve_vod: true|false, - resolve_vod_delay: true|false, +- trakt: Trakt Configuration `m3u` - type: m3u @@ -887,6 +888,34 @@ There is a difference for `resolve_vod` and `resolve_series`. `resolve_vod` works only when input: `xtream`. +- `xtream` `trakt`: +Trakt.tv is an online platform that helps you track, manage, and discover TV shows and movies. Think of it like Goodreads for TV and film. +You can add trakt list matches into your playlist. +You can define a `Trakt` config like +```yaml + - name: iptv-trakt-example + output: + - type: xtream + skip_live_direct_source: true + skip_video_direct_source: true + skip_series_direct_source: true + resolve_series: false + resolve_vod: false + trakt: + lists: + - user: "linaspurinis" + list_slug: "top-watched-movies-of-the-week" + category_name: "📈 Top Weekly Movies" + content_type: "vod" + fuzzy_match_threshold: 80 + - user: "garycrawfordgc" + list_slug: "latest-tv-shows" + category_name: "📺 Latest TV Shows" + content_type: "series" + fuzzy_match_threshold: 80 +``` +This will create 2 new categories with matched entries. + ### 2.2.2.5 `filter` The filter is a string with a filter statement. The filter can have UnaryExpression `NOT`, BinaryExpression `AND OR`, Regexp Comparison `(Group|Title|Name|Url) ~ "regexp"` @@ -1085,6 +1114,7 @@ It is whitespace-tolerant and uses familiar programming concepts with a custom s - number(a) - print(a, b, c) - first(a) + - template(a) Field names are: `name`, `title"`, `caption"`, `group"`, `id"`, `chno"`, `logo"`, `logo_small"`, `parent_code"`, `time_shift" | "url"`, `epg_channel_id"`, `epg_id`. When you use Regular expressions it could be that your match contains multiple results. The builtin function `first` returns the first match. Example `print(uppercase("hello"))`. output is only visible in `trace` log level you can enable it like `log_level: debug,tuliprox::foundation::mapper=trace` in config diff --git a/frontend/package.json b/frontend/package.json index fab9ae181..d128c6de5 100755 --- a/frontend/package.json +++ b/frontend/package.json @@ -2,7 +2,7 @@ "name": "tuliprox", "description": "tuliprox", "author": "euzu", - "version": "3.1.3", + "version": "3.1.4", "private": true, "homepage": "", "license": "MIT", diff --git a/src/api/serve.rs b/src/api/serve.rs index 68bf30b7b..14dde54b0 100644 --- a/src/api/serve.rs +++ b/src/api/serve.rs @@ -1,6 +1,7 @@ use axum::body::Body; use axum::extract::Request; use axum::response::Response; +use futures::FutureExt; use hyper::body::Incoming; use hyper_util::rt::{TokioExecutor, TokioIo}; use hyper_util::server::conn::auto::Builder; @@ -14,7 +15,6 @@ use std::pin::pin; use std::time::Duration; use tokio::sync::watch; use tower::{Service, ServiceExt}; -use futures::FutureExt; #[derive(Debug)] struct IncomingStream @@ -51,13 +51,15 @@ pub async fn serve(listener: tokio::net::TcpListener, router: axum::Router<()>) let keep_alive_first_probe = 10; let keep_alive_interval = 5; - let keep_alive_retries = 3; - - let keepalive = TcpKeepalive::new() - .with_time(Duration::from_secs(keep_alive_first_probe)) // Time until the first keepalive probe (idle time) - .with_interval(Duration::from_secs(keep_alive_interval)) // Interval between keepalive probes - .with_retries(keep_alive_retries); // Number of failed probes before the connection is closed + let mut keepalive = TcpKeepalive::new(); + keepalive = keepalive.with_time(Duration::from_secs(keep_alive_first_probe)) // Time until the first keepalive probe (idle time) + .with_interval(Duration::from_secs(keep_alive_interval)); // Interval between keep alives + #[cfg(not(target_os = "windows"))] + { + let keep_alive_retries = 3; + keepalive = keepalive.with_retries(keep_alive_retries); // Number of failed probes before the connection is closed + } if let Err(e) = sock_ref.set_tcp_keepalive(&keepalive) { error!("Failed to set keepalive for {remote_addr}: {e}"); @@ -65,7 +67,7 @@ pub async fn serve(listener: tokio::net::TcpListener, router: axum::Router<()>) let Ok(socket) = tokio::net::TcpStream::from_std(tcp_stream_std) else { continue; }; - let io = TokioIo::new(socket); + let io = TokioIo::new(socket); handle_connection(&mut make_service, &signal_tx, &close_rx, io, remote_addr).await; } } @@ -83,7 +85,6 @@ where S: Service + Clone + Send + 'static, S::Future: Send, { - trace!("connection {remote_addr:?} accepted"); make_service