Skip to content

Commit

Permalink
Merge pull request #11 from EmeryxWildfire/main
Browse files Browse the repository at this point in the history
  • Loading branch information
Radiicall authored Mar 4, 2023
2 parents 9c48a73 + 0ff5438 commit 932db85
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/jellyfin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,15 @@ async fn get_currently_watching(now_playing_item: &Value) -> Vec<String> {
};

vec![item_type, name.to_string(), genres, item_id]
} else if now_playing_item["Type"].as_str().unwrap() == "Audio" {
item_type = "music".to_owned();
item_id = now_playing_item["Id"].as_str().unwrap().to_string();
let artist: String = now_playing_item["AlbumArtist"].as_str().unwrap().to_string();

vec![item_type, name.to_string(), artist, item_id]
} else {
// Return 3 empty strings to make vector equal length
vec!["".to_string(), "".to_string(), "".to_string()]
// Return 4 empty strings to make vector equal length
vec!["".to_string(), "".to_string(), "".to_string(), "".to_string()]
}
}

Expand Down

0 comments on commit 932db85

Please sign in to comment.