Skip to content

Commit

Permalink
fix: lower android limit a bit to prevent plex rate limit
Browse files Browse the repository at this point in the history
  • Loading branch information
lostb1t authored Nov 5, 2023
1 parent 5b6a37a commit c70639a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,12 +436,12 @@ pub async fn transform_hubs_home(

// some androids have trouble loading more for hero style. So load more at once
match params.platform {
Platform::Android => count = 50,
Platform::Android => count = 40,
_ => (),
}
// Hack, as the list could be smaller when removing watched items. So we request more.
if !config.include_watched && count < 50 {
count = 50;
if !config.include_watched && count < 40 {
count = 40;
}

add_query_param_salvo(req, "count".to_string(), count.to_string());
Expand Down Expand Up @@ -490,13 +490,13 @@ pub async fn get_hubs_sections(
let mut count = params.clone().count.unwrap_or(25);

match params.platform {
Platform::Android => count = 50,
Platform::Android => count = 40,
_ => (),
}

// Hack, as the list could be smaller when removing watched items. So we request more.
if !config.include_watched && count < 50 {
count = 50;
if !config.include_watched && count < 40 {
count = 40;
}

add_query_param_salvo(req, "count".to_string(), count.to_string());
Expand Down

0 comments on commit c70639a

Please sign in to comment.