FileOrCDTrack

Struct FileOrCDTrack 

Source
pub struct FileOrCDTrack { /* private fields */ }
Expand description

Safe wrapper over a IITFileOrCDTrack

Implementations§

Source§

impl FileOrCDTrack

Source

pub fn Location(&self) -> Result<String>

The full path to the file represented by this track.

Source

pub fn UpdateInfoFromFile(&self) -> Result<()>

Update this track’s information with the information stored in its file.

Source

pub fn is_Podcast(&self) -> Result<bool>

True if this is a podcast track.

Source

pub fn UpdatePodcastFeed(&self) -> Result<()>

Update the podcast feed for this track.

Source

pub fn is_RememberBookmark(&self) -> Result<bool>

True if playback position is remembered.

Source

pub fn set_RememberBookmark(&self, RememberBookmark: bool) -> Result<()>

True if playback position is remembered.

Source

pub fn is_ExcludeFromShuffle(&self) -> Result<bool>

True if track is skipped when shuffling.

Source

pub fn set_ExcludeFromShuffle(&self, ExcludeFromShuffle: bool) -> Result<()>

True if track is skipped when shuffling.

Source

pub fn Lyrics(&self) -> Result<String>

Lyrics for the track.

Source

pub fn set_Lyrics(&self, Lyrics: &str) -> Result<()>

Lyrics for the track.

Source

pub fn Category(&self) -> Result<String>

Category for the track.

Source

pub fn set_Category(&self, Category: &str) -> Result<()>

Category for the track.

Source

pub fn Description(&self) -> Result<String>

Description for the track.

Source

pub fn set_Description(&self, Description: &str) -> Result<()>

Description for the track.

Source

pub fn LongDescription(&self) -> Result<String>

Long description for the track.

Source

pub fn set_LongDescription(&self, LongDescription: &str) -> Result<()>

Long description for the track.

Source

pub fn BookmarkTime(&self) -> Result<i32>

The bookmark time of the track (in seconds).

Source

pub fn set_BookmarkTime(&self, BookmarkTime: i32) -> Result<()>

The bookmark time of the track (in seconds).

Source

pub fn VideoKind(&self) -> Result<ITVideoKind>

The video track kind.

Source

pub fn set_VideoKind(&self, value: ITVideoKind) -> Result<()>

The video track kind.

Source

pub fn SkippedCount(&self) -> Result<i32>

The number of times the track has been skipped.

Source

pub fn set_SkippedCount(&self, SkippedCount: i32) -> Result<()>

The number of times the track has been skipped.

Source

pub fn SkippedDate(&self) -> Result<f64>

The date and time the track was last skipped. A value of zero means no skipped date.

Source

pub fn set_SkippedDate(&self, SkippedDate: f64) -> Result<()>

The date and time the track was last skipped. A value of zero means no skipped date.

Source

pub fn is_PartOfGaplessAlbum(&self) -> Result<bool>

True if track is part of a gapless album.

Source

pub fn set_PartOfGaplessAlbum(&self, PartOfGaplessAlbum: bool) -> Result<()>

True if track is part of a gapless album.

Source

pub fn AlbumArtist(&self) -> Result<String>

The album artist of the track.

Source

pub fn set_AlbumArtist(&self, AlbumArtist: &str) -> Result<()>

The album artist of the track.

Source

pub fn Show(&self) -> Result<String>

The show name of the track.

Source

pub fn set_Show(&self, Show: &str) -> Result<()>

The show name of the track.

Source

pub fn SeasonNumber(&self) -> Result<i32>

The season number of the track.

Source

pub fn set_SeasonNumber(&self, SeasonNumber: i32) -> Result<()>

The season number of the track.

Source

pub fn EpisodeID(&self) -> Result<String>

The episode ID of the track.

Source

pub fn set_EpisodeID(&self, EpisodeID: &str) -> Result<()>

The episode ID of the track.

Source

pub fn EpisodeNumber(&self) -> Result<i32>

The episode number of the track.

Source

pub fn set_EpisodeNumber(&self, EpisodeNumber: i32) -> Result<()>

The episode number of the track.

Source

pub fn Size(&self) -> Result<i64>

The size of the track (in bytes)

Source

pub fn is_Unplayed(&self) -> Result<bool>

True if track has not been played.

Source

pub fn set_Unplayed(&self, Unplayed: bool) -> Result<()>

True if track has not been played.

Source

pub fn SortAlbum(&self) -> Result<String>

The album used for sorting.

Source

pub fn set_SortAlbum(&self, SortAlbum: &str) -> Result<()>

The album used for sorting.

Source

pub fn SortAlbumArtist(&self) -> Result<String>

The album artist used for sorting.

Source

pub fn set_SortAlbumArtist(&self, SortAlbumArtist: &str) -> Result<()>

The album artist used for sorting.

Source

pub fn SortArtist(&self) -> Result<String>

The artist used for sorting.

Source

pub fn set_SortArtist(&self, SortArtist: &str) -> Result<()>

The artist used for sorting.

Source

pub fn SortComposer(&self) -> Result<String>

The composer used for sorting.

Source

pub fn set_SortComposer(&self, SortComposer: &str) -> Result<()>

The composer used for sorting.

Source

pub fn SortName(&self) -> Result<String>

The track name used for sorting.

Source

pub fn set_SortName(&self, SortName: &str) -> Result<()>

The track name used for sorting.

Source

pub fn SortShow(&self) -> Result<String>

The show name used for sorting.

Source

pub fn set_SortShow(&self, SortShow: &str) -> Result<()>

The show name used for sorting.

Source

pub fn Reveal(&self) -> Result<()>

Reveal the track in the main browser window.

Source

pub fn AlbumRating(&self) -> Result<Rating>

The user or computed rating of the album that this track belongs to.

Source

pub fn set_AlbumRating(&self, AlbumRating: Rating) -> Result<()>

The user or computed rating of the album that this track belongs to.

Source

pub fn AlbumRatingKind(&self) -> Result<ITRatingKind>

The album rating kind.

Source

pub fn ratingKind(&self) -> Result<ITRatingKind>

The track rating kind.

Source

pub fn Playlists(&self) -> Result<PlaylistCollection>

Returns a collection of playlists that contain the song that this track represents.

Source

pub fn set_Location(&self, Location: &str) -> Result<()>

The full path to the file represented by this track.

Source

pub fn ReleaseDate(&self) -> Result<f64>

The release date of the track. A value of zero means no release date.

Trait Implementations§

Source§

impl IITObjectWrapper for FileOrCDTrack

Source§

fn GetITObjectIDs(&self) -> Result<ObjectIDs>

Returns the four IDs that uniquely identify this object. Read more
Source§

fn as_variant(&self) -> Variant<'_, Self::WrappedType>

Get a COM VARIANT pointing to this object
Source§

fn persistent_id(&self) -> Result<PersistentId>

Convenience function around iTunes::GetITObjectPersistentID
Source§

fn Name(&self) -> Result<String>

The name of the object.
Source§

fn set_Name(&self, Name: &str) -> Result<()>

The name of the object.
Source§

fn Index(&self) -> Result<i32>

The index of the object in internal application order (1-based).
Source§

fn sourceID(&self) -> Result<i32>

The source ID of the object.
Source§

fn playlistID(&self) -> Result<i32>

The playlist ID of the object.
Source§

fn trackID(&self) -> Result<i32>

The track ID of the object.
Source§

fn TrackDatabaseID(&self) -> Result<i32>

The track database ID of the object.
Source§

impl IITTrackWrapper for FileOrCDTrack

Source§

fn Delete(&self) -> Result<()>

Delete this track.
Source§

fn Play(&self) -> Result<()>

Start playing this track.
Source§

fn AddArtworkFromFile(&self, filePath: &str) -> Result<Artwork>

Add artwork from an image file to this track.
Source§

fn Kind(&self) -> Result<ITTrackKind>

The track kind.
Source§

fn Playlist(&self) -> Result<Playlist>

The playlist that contains this track.
Source§

fn Album(&self) -> Result<String>

The album containing the track.
Source§

fn set_Album(&self, Album: &str) -> Result<()>

The album containing the track.
Source§

fn Artist(&self) -> Result<String>

The artist/source of the track.
Source§

fn set_Artist(&self, Artist: &str) -> Result<()>

The artist/source of the track.
Source§

fn BitRate(&self) -> Result<i32>

The bit rate of the track (in kbps).
Source§

fn BPM(&self) -> Result<i32>

The tempo of the track (in beats per minute).
Source§

fn set_BPM(&self, BPM: i32) -> Result<()>

The tempo of the track (in beats per minute).
Source§

fn Comment(&self) -> Result<String>

Freeform notes about the track.
Source§

fn set_Comment(&self, Comment: &str) -> Result<()>

Freeform notes about the track.
Source§

fn is_Compilation(&self) -> Result<bool>

True if this track is from a compilation album.
Source§

fn set_Compilation(&self, Compilation: bool) -> Result<()>

True if this track is from a compilation album.
Source§

fn Composer(&self) -> Result<String>

The composer of the track.
Source§

fn set_Composer(&self, Composer: &str) -> Result<()>

The composer of the track.
Source§

fn DateAdded(&self) -> Result<f64>

The date the track was added to the playlist.
Source§

fn DiscCount(&self) -> Result<i32>

The total number of discs in the source album.
Source§

fn set_DiscCount(&self, DiscCount: i32) -> Result<()>

The total number of discs in the source album.
Source§

fn DiscNumber(&self) -> Result<i32>

The index of the disc containing the track on the source album.
Source§

fn set_DiscNumber(&self, DiscNumber: i32) -> Result<()>

The index of the disc containing the track on the source album.
Source§

fn Duration(&self) -> Result<i32>

The length of the track (in seconds).
Source§

fn is_Enabled(&self) -> Result<bool>

True if the track is checked for playback.
Source§

fn set_Enabled(&self, Enabled: bool) -> Result<()>

True if the track is checked for playback.
Source§

fn EQ(&self) -> Result<String>

The name of the EQ preset of the track.
Source§

fn set_EQ(&self, EQ: &str) -> Result<()>

The name of the EQ preset of the track.
Source§

fn set_Finish(&self, Finish: i32) -> Result<()>

The stop time of the track (in seconds).
Source§

fn Finish(&self) -> Result<i32>

The stop time of the track (in seconds).
Source§

fn Genre(&self) -> Result<String>

The music/audio genre (category) of the track.
Source§

fn set_Genre(&self, Genre: &str) -> Result<()>

The music/audio genre (category) of the track.
Source§

fn Grouping(&self) -> Result<String>

The grouping (piece) of the track. Generally used to denote movements within classical work.
Source§

fn set_Grouping(&self, Grouping: &str) -> Result<()>

The grouping (piece) of the track. Generally used to denote movements within classical work.
Source§

fn KindAsString(&self) -> Result<String>

A text description of the track.
Source§

fn ModificationDate(&self) -> Result<f64>

The modification date of the content of the track.
Source§

fn PlayedCount(&self) -> Result<i32>

The number of times the track has been played.
Source§

fn set_PlayedCount(&self, PlayedCount: i32) -> Result<()>

The number of times the track has been played.
Source§

fn PlayedDate(&self) -> Result<f64>

The date and time the track was last played. A value of zero means no played date.
Source§

fn set_PlayedDate(&self, PlayedDate: f64) -> Result<()>

The date and time the track was last played. A value of zero means no played date.
Source§

fn PlayOrderIndex(&self) -> Result<i32>

The play order index of the track in the owner playlist (1-based).
Source§

fn Rating(&self) -> Result<Rating>

The rating of the track.
Source§

fn set_Rating(&self, Rating: Rating) -> Result<()>

The rating of the track.
Source§

fn SampleRate(&self) -> Result<i32>

The sample rate of the track (in Hz).
Source§

fn Size(&self) -> Result<i32>

The size of the track (in bytes).
Source§

fn Start(&self) -> Result<i32>

The start time of the track (in seconds).
Source§

fn set_Start(&self, Start: i32) -> Result<()>

The start time of the track (in seconds).
Source§

fn Time(&self) -> Result<String>

The length of the track (in MM:SS format).
Source§

fn TrackCount(&self) -> Result<i32>

The total number of tracks on the source album.
Source§

fn set_TrackCount(&self, TrackCount: i32) -> Result<()>

The total number of tracks on the source album.
Source§

fn TrackNumber(&self) -> Result<i32>

The index of the track on the source album.
Source§

fn set_TrackNumber(&self, TrackNumber: i32) -> Result<()>

The index of the track on the source album.
Source§

fn VolumeAdjustment(&self) -> Result<i32>

The relative volume adjustment of the track (-100% to 100%).
Source§

fn set_VolumeAdjustment(&self, VolumeAdjustment: i32) -> Result<()>

The relative volume adjustment of the track (-100% to 100%).
Source§

fn Year(&self) -> Result<i32>

The year the track was recorded/released.
Source§

fn set_Year(&self, Year: i32) -> Result<()>

The year the track was recorded/released.
Source§

fn Artwork(&self) -> Result<ArtworkCollection>

Returns a collection of artwork.
Source§

impl ITunesRelatedObject for FileOrCDTrack

Source§

fn iTunes_instance(&self) -> Arc<iTunes>

Return the related iTunes instance this object is related to

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.