pub fn from(path: PathBuf) -> Option<Self> {
        let playbin = Self::setup_pipeline().ok()?;

        let (duration, tags) = Self::get_track_info(&path, playbin)?;

        let mut song = Self {
            path,
            duration,
            ..Self::default()
        };
        song.read_metadata(&tags);

        Some(song)
    }
/// Creates a new `Song` from the provided `PathBuf`
Creates a new `Song` from the provided `PathBuf`
Creates a new ` Song ` from the provided ` PathBuf `
pub fn from(path: PathBuf) -> Option<Self> {
        let playbin = Self::setup_pipeline().ok()?;
        let (duration, tags) = Self::get_track_info(&path, playbin)?;
        let mut song = Self {
            path,
            duration,
            ..Self::default()
        };
        song.read_metadata(&tags);
        Some(song)
    }
pub fn from ( path : PathBuf ) -> Option < Self > { let playbin = Self :: setup_pipeline ( ) . ok ( ) ? ; let ( duration , tags ) = Self :: get_track_info ( & path , playbin ) ? ; let mut song = Self { path , duration , .. Self :: default ( ) } ; song . read_metadata ( & tags ) ; Some ( song ) }
Creates a new `Song` from the provided `PathBuf`
Creates a new ` Song ` from the provided ` PathBuf `
path
PathBuf