opensubsonic 0.3.0

Complete async Rust client for the OpenSubsonic/Subsonic REST API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Types for the Sonic Similarity API (OpenSubsonic extension).

use serde::{Deserialize, Serialize};

use super::common::Child;

/// A sonic similarity match — a [`Child`] with a similarity score.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct SonicMatch {
    /// The matched track.
    #[serde(flatten)]
    pub entry: Child,
    /// Normalized similarity score (1.0 = exact, 0.0 = most different, -1 if unsupported).
    pub similarity: f64,
}