Skip to content

Commit

Permalink
Fix issue with theme music (#44)
Browse files Browse the repository at this point in the history
Add a check for an "ExtraType" that jellyfin sets to "ThemeSong" whenever a theme song is playing
  • Loading branch information
Radiicall authored Jul 28, 2023
1 parent ab8c3dd commit 8687956
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/services/jellyfin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,14 @@ impl Content {
content.state_message(genres);
content.item_id(now_playing_item["Id"].as_str().unwrap().to_string());
} else if now_playing_item["Type"].as_str().unwrap() == "Audio" {
if let Some(extratype) = now_playing_item
.get("ExtraType")
.and_then(Value::as_str)
{
if extratype == "ThemeSong" {
return
}
}
let artist = now_playing_item["AlbumArtist"]
.as_str()
.unwrap()
Expand Down

0 comments on commit 8687956

Please sign in to comment.