pub struct Track {
pub media_type: MediaType,
pub last_modified: SystemTime,
pub podcast_localfile: Option<String>,
/* private fields */
}Fields§
§media_type: MediaType§last_modified: SystemTime§podcast_localfile: Option<String>Implementations§
Source§impl Track
impl Track
Sourcepub fn from_episode(ep: &Episode) -> Self
pub fn from_episode(ep: &Episode) -> Self
Create a new MediaType::Podcast track
Sourcepub fn read_from_path<P: AsRef<Path>>(path: P, for_db: bool) -> Result<Self>
pub fn read_from_path<P: AsRef<Path>>(path: P, for_db: bool) -> Result<Self>
Create a new MediaType::Music track
Sourcepub fn new_radio(url: &str) -> Self
pub fn new_radio(url: &str) -> Self
Create a new MediaType::LiveRadio track
pub fn adjust_lyric_delay( &mut self, time_pos: Duration, offset: i64, ) -> Result<()>
pub fn cycle_lyrics(&mut self) -> Result<&Id3Lyrics>
pub const fn parsed_lyric(&self) -> Option<&Lyric>
pub fn set_parsed_lyric(&mut self, pl: Option<Lyric>)
pub fn lyric_frames_remove_selected(&mut self)
pub fn set_lyric_selected_index(&mut self, index: usize)
pub const fn lyric_selected_index(&self) -> usize
pub fn lyric_selected(&self) -> Option<&Id3Lyrics>
pub fn lyric_frames_is_empty(&self) -> bool
pub fn lyric_frames_len(&self) -> usize
pub fn lyric_frames(&self) -> Option<Vec<Id3Lyrics>>
pub const fn picture(&self) -> Option<&Picture>
pub fn album_photo(&self) -> Option<&str>
Sourcepub fn artist(&self) -> Option<&str>
pub fn artist(&self) -> Option<&str>
Optionally return the artist of the song
If None it wasn’t able to read the tags
pub fn set_artist(&mut self, a: &str)
Sourcepub fn album(&self) -> Option<&str>
pub fn album(&self) -> Option<&str>
Optionally return the song’s album
If None failed to read the tags
pub fn set_album(&mut self, album: &str)
pub fn genre(&self) -> Option<&str>
pub fn set_genre(&mut self, genre: &str)
Sourcepub fn title(&self) -> Option<&str>
pub fn title(&self) -> Option<&str>
Optionally return the title of the song
If None it wasn’t able to read the tags
pub fn set_title(&mut self, title: &str)
pub const fn duration(&self) -> Duration
pub fn duration_formatted(&self) -> String
pub fn duration_formatted_short(d: &Duration) -> String
pub fn save_tag(&mut self) -> Result<()>
pub fn set_lyric(&mut self, lyric_str: &str, lang_ext: &str)
pub fn set_photo(&mut self, picture: Picture)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Track
impl RefUnwindSafe for Track
impl Send for Track
impl Sync for Track
impl Unpin for Track
impl UnwindSafe for Track
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request