Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3518,8 +3518,8 @@ impl App {

#[cfg(test)]
mod tests {
use crate::core::test_helpers::{private_user, simplified_playlist};
use super::*;
use crate::core::test_helpers::{private_user, simplified_playlist};
use chrono::{Duration as ChronoDuration, Utc};
use rspotify::model::{artist::SimplifiedArtist, idtypes::PlaylistId};
use rspotify::prelude::Id;
Expand Down
15 changes: 15 additions & 0 deletions src/infra/network/playback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,21 @@ impl PlaybackNetwork for Network {
return;
}

if err.to_string().contains("504")
|| err.to_string().contains("503")
|| err.to_string().contains("502")
|| err.to_string().contains("Gateway Timeout")
|| err.to_string().contains("Service Unavailable")
|| err.to_string().contains("Bad Gateway")
Comment thread
LargeModGames marked this conversation as resolved.
{
app.status_message = Some(
"Spotify server temporarily unavailable (5xx); retrying automatically.".to_string(),
);
app.status_message_expires_at = Some(Instant::now() + Duration::from_secs(10));
app.instant_since_last_current_playback_poll = Instant::now();
Comment thread
LargeModGames marked this conversation as resolved.
return;
}
Comment thread
LargeModGames marked this conversation as resolved.

app.handle_error(err);
return;
}
Expand Down
Loading