diff --git a/src/api/api_utils.rs b/src/api/api_utils.rs index c87638bc0..56bbc2df1 100644 --- a/src/api/api_utils.rs +++ b/src/api/api_utils.rs @@ -633,9 +633,7 @@ pub async fn stream_response(app_state: &AppState, if let Some(provider) = provider_name { if matches!(item_type, PlaylistItemType::LiveHls | PlaylistItemType::LiveDash | PlaylistItemType::Video | PlaylistItemType::Series | PlaylistItemType::Catchup) { - if let Some(token) = app_state.active_users.create_user_session(user, session_token, virtual_id, &provider, &session_url, connection_permission).await { - debug!("Creating session for user {} with token {token} {session_url}", user.username); - } + let _ = app_state.active_users.create_user_session(user, session_token, virtual_id, &provider, &session_url, connection_permission).await; } } diff --git a/src/api/endpoints/hls_api.rs b/src/api/endpoints/hls_api.rs index 1b1602bc1..ac94a95c0 100644 --- a/src/api/endpoints/hls_api.rs +++ b/src/api/endpoints/hls_api.rs @@ -37,6 +37,7 @@ fn hls_response(hls_content: String, cookie: Option) -> impl IntoRespons .into_response() } +#[allow(clippy::too_many_arguments)] pub(in crate::api) async fn handle_hls_stream_request( fingerprint: &str, app_state: &Arc, diff --git a/src/api/model/active_user_manager.rs b/src/api/model/active_user_manager.rs index e417296bd..da335a35e 100644 --- a/src/api/model/active_user_manager.rs +++ b/src/api/model/active_user_manager.rs @@ -226,16 +226,19 @@ impl ActiveUserManager { session.provider = provider.to_string(); } session.permission = connection_permission; + debug!("Using session for user {} with token {session_token} {stream_url}", user.username); return Some(session.token.to_string()); } } // no session create new one + debug!("Creating session for user {} with token {session_token} {stream_url}", user.username); let session = Self::new_user_session(session_token, virtual_id, provider, stream_url, connection_permission); let token = session.token.clone(); connection_data.sessions.push(session); Some(token) } else { + debug!("Creating session for user {} with token {session_token} {stream_url}", user.username); let mut connection_data = UserConnectionData::new(0, user.max_connections); let session = Self::new_user_session(session_token, virtual_id, provider, stream_url, connection_permission); let token = session.token.clone(); diff --git a/src/processing/parser/hls.rs b/src/processing/parser/hls.rs index 63c28da96..2e8dab7a3 100644 --- a/src/processing/parser/hls.rs +++ b/src/processing/parser/hls.rs @@ -79,7 +79,7 @@ pub fn rewrite_hls(user: &ProxyUserCredentials, props: &RewriteHlsProps) -> Stri rewrite_hls_url(&props.hls_url, line) }; if let Some(user_token) = &props.user_token { - if let Some(token) = create_hls_session_token_and_url(props.secret, *user_token, &target_url) { + if let Some(token) = create_hls_session_token_and_url(props.secret, user_token, &target_url) { let url = format!( "{}/{HLS_PREFIX}/{}/{}/{}/{}/{}", props.base_url, diff --git a/src/processing/parser/xmltv.rs b/src/processing/parser/xmltv.rs index f1264df6b..5352a247e 100644 --- a/src/processing/parser/xmltv.rs +++ b/src/processing/parser/xmltv.rs @@ -136,7 +136,7 @@ impl TVGuide { let mut matched = tag .normalized_epg_ids .as_ref() - .map_or(false, |ids| id_cache.match_with_normalized(epg_id, ids)); + .is_some_and(|ids| id_cache.match_with_normalized(epg_id, ids)); if !matched && fuzzy_matching { let (fuzzy_matched, matched_normalized_name) = Self::find_best_fuzzy_match(id_cache, tag); if fuzzy_matched {