Skip to content

Commit 17910f1

Browse files
committed
add timeout for playlist/fragment fetch
1 parent ee94a54 commit 17910f1

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

snap/snapcraft.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: hyperionbox
22
base: core22
3-
version: '2.1.6'
3+
version: '2.1.7'
44
summary: An open-source anime and movie streaming app. # 79 char long summary
55
description: |
66
An open-source anime and movie streaming app that support watch progress and download for many sources.

src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "HyperionBox"
3-
version = "2.1.6"
3+
version = "2.1.7"
44
description = "A Tauri App"
55
authors = ["goodday360"]
66
edition = "2021"

src-tauri/src/commands/methods/watch.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use reqwest::{
77
use lazy_static::lazy_static;
88
use dashmap::DashMap;
99
use url::Url;
10+
use tokio::{time::{Duration}};
1011

1112

1213

@@ -70,6 +71,7 @@ pub async fn get_playlist(url: String, headers: Headers) -> Result<Response, Str
7071
.cookie_store(true)
7172
.pool_idle_timeout(None)
7273
.pool_max_idle_per_host(5)
74+
.timeout(Duration::from_secs(30))
7375
.default_headers(headers_map.clone())
7476
.build()
7577
.map_err(|e| e.to_string())?;
@@ -180,11 +182,10 @@ pub async fn get_fragment(url: String, headers: Headers) -> Result<Response, Str
180182
let mut retry = 0;
181183

182184
loop {
183-
184-
185185
let res = client
186186
.get(_current_url.clone())
187187
.headers(headers_map.clone())
188+
.timeout(Duration::from_secs(30))
188189
.send()
189190
.await
190191
.map_err(|e| {

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "HyperionBox",
4-
"version": "2.1.6",
4+
"version": "2.1.7",
55
"identifier": "io.github.goodday360.hyperionbox",
66
"build": {
77
"beforeDevCommand": "bun run dev",

0 commit comments

Comments
 (0)