Skip to content

Commit

Permalink
Fix pr 111 (#115)
Browse files Browse the repository at this point in the history
* Replace question marks with unwrap_or(), check other code for errors
  • Loading branch information
Radiicall committed Apr 19, 2024
1 parent a9c1b92 commit 5e92062
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jellyfin-rpc/src/services/jellyfin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,15 +259,15 @@ impl Content {
}

if now_playing_item.get("IndexNumberEnd").is_some() {
let end_number = if config.jellyfin.append_prefix? {
let end_number = if config.jellyfin.append_prefix.unwrap_or(false) {
format!("{:02}", now_playing_item["IndexNumberEnd"])
} else {
format!("{}", now_playing_item["IndexNumberEnd"])
};
state += &(" - ".to_string() + &end_number);
}

if !config.jellyfin.show_simple? {
if !config.jellyfin.show_simple.unwrap_or(false) {
state += &(" ".to_string() + name);
}
content.media_type(MediaType::Episode);
Expand Down

0 comments on commit 5e92062

Please sign in to comment.