Struct itunes_com::wrappers::FileOrCDTrack
source · pub struct FileOrCDTrack { /* private fields */ }Expand description
Safe wrapper over a IITFileOrCDTrack
Implementations§
source§impl FileOrCDTrack
impl FileOrCDTrack
sourcepub fn Location(&self) -> Result<String>
pub fn Location(&self) -> Result<String>
The full path to the file represented by this track.
Examples found in repository?
45 46 47 48 49 50 51 52 53 54 55 56 57 58
fn search_tracks(iTunes: &itunes_com::wrappers::iTunes, search_text: &str) -> windows::core::Result<()> {
println!("Searching for \"{}\"...", search_text);
let library_playlist = iTunes.LibraryPlaylist()?;
let results = library_playlist.Search(search_text.into(), ITPlaylistSearchField::ITPlaylistSearchFieldAll)?;
for result in results.iter()? {
let file_location = result.as_file_or_cd_track().map(|foct| foct.Location());
println!(" * {} at {:?}", result.Name()?, file_location);
}
Ok(())
}sourcepub fn UpdateInfoFromFile(&self) -> Result<()>
pub fn UpdateInfoFromFile(&self) -> Result<()>
Update this track’s information with the information stored in its file.
sourcepub fn is_Podcast(&self) -> Result<bool>
pub fn is_Podcast(&self) -> Result<bool>
True if this is a podcast track.
sourcepub fn UpdatePodcastFeed(&self) -> Result<()>
pub fn UpdatePodcastFeed(&self) -> Result<()>
Update the podcast feed for this track.
sourcepub fn is_RememberBookmark(&self) -> Result<bool>
pub fn is_RememberBookmark(&self) -> Result<bool>
True if playback position is remembered.
sourcepub fn set_RememberBookmark(&mut self, RememberBookmark: bool) -> Result<()>
pub fn set_RememberBookmark(&mut self, RememberBookmark: bool) -> Result<()>
True if playback position is remembered.
sourcepub fn is_ExcludeFromShuffle(&self) -> Result<bool>
pub fn is_ExcludeFromShuffle(&self) -> Result<bool>
True if track is skipped when shuffling.
sourcepub fn set_ExcludeFromShuffle(&mut self, ExcludeFromShuffle: bool) -> Result<()>
pub fn set_ExcludeFromShuffle(&mut self, ExcludeFromShuffle: bool) -> Result<()>
True if track is skipped when shuffling.
sourcepub fn set_Lyrics(&mut self, Lyrics: &str) -> Result<()>
pub fn set_Lyrics(&mut self, Lyrics: &str) -> Result<()>
Lyrics for the track.
sourcepub fn set_Category(&mut self, Category: &str) -> Result<()>
pub fn set_Category(&mut self, Category: &str) -> Result<()>
Category for the track.
sourcepub fn Description(&self) -> Result<String>
pub fn Description(&self) -> Result<String>
Description for the track.
sourcepub fn set_Description(&mut self, Description: &str) -> Result<()>
pub fn set_Description(&mut self, Description: &str) -> Result<()>
Description for the track.
sourcepub fn LongDescription(&self) -> Result<String>
pub fn LongDescription(&self) -> Result<String>
Long description for the track.
sourcepub fn set_LongDescription(&mut self, LongDescription: &str) -> Result<()>
pub fn set_LongDescription(&mut self, LongDescription: &str) -> Result<()>
Long description for the track.
sourcepub fn BookmarkTime(&self) -> Result<i32>
pub fn BookmarkTime(&self) -> Result<i32>
The bookmark time of the track (in seconds).
sourcepub fn set_BookmarkTime(&mut self, BookmarkTime: i32) -> Result<()>
pub fn set_BookmarkTime(&mut self, BookmarkTime: i32) -> Result<()>
The bookmark time of the track (in seconds).
sourcepub fn VideoKind(&self) -> Result<ITVideoKind>
pub fn VideoKind(&self) -> Result<ITVideoKind>
The video track kind.
sourcepub fn set_VideoKind(&mut self, value: ITVideoKind) -> Result<()>
pub fn set_VideoKind(&mut self, value: ITVideoKind) -> Result<()>
The video track kind.
sourcepub fn SkippedCount(&self) -> Result<i32>
pub fn SkippedCount(&self) -> Result<i32>
The number of times the track has been skipped.
sourcepub fn set_SkippedCount(&mut self, SkippedCount: i32) -> Result<()>
pub fn set_SkippedCount(&mut self, SkippedCount: i32) -> Result<()>
The number of times the track has been skipped.
sourcepub fn SkippedDate(&self) -> Result<f64>
pub fn SkippedDate(&self) -> Result<f64>
The date and time the track was last skipped. A value of zero means no skipped date.
sourcepub fn set_SkippedDate(&mut self, SkippedDate: f64) -> Result<()>
pub fn set_SkippedDate(&mut self, SkippedDate: f64) -> Result<()>
The date and time the track was last skipped. A value of zero means no skipped date.
sourcepub fn is_PartOfGaplessAlbum(&self) -> Result<bool>
pub fn is_PartOfGaplessAlbum(&self) -> Result<bool>
True if track is part of a gapless album.
sourcepub fn set_PartOfGaplessAlbum(&mut self, PartOfGaplessAlbum: bool) -> Result<()>
pub fn set_PartOfGaplessAlbum(&mut self, PartOfGaplessAlbum: bool) -> Result<()>
True if track is part of a gapless album.
sourcepub fn AlbumArtist(&self) -> Result<String>
pub fn AlbumArtist(&self) -> Result<String>
The album artist of the track.
sourcepub fn set_AlbumArtist(&mut self, AlbumArtist: &str) -> Result<()>
pub fn set_AlbumArtist(&mut self, AlbumArtist: &str) -> Result<()>
The album artist of the track.
sourcepub fn SeasonNumber(&self) -> Result<i32>
pub fn SeasonNumber(&self) -> Result<i32>
The season number of the track.
sourcepub fn set_SeasonNumber(&mut self, SeasonNumber: i32) -> Result<()>
pub fn set_SeasonNumber(&mut self, SeasonNumber: i32) -> Result<()>
The season number of the track.
sourcepub fn set_EpisodeID(&mut self, EpisodeID: &str) -> Result<()>
pub fn set_EpisodeID(&mut self, EpisodeID: &str) -> Result<()>
The episode ID of the track.
sourcepub fn EpisodeNumber(&self) -> Result<i32>
pub fn EpisodeNumber(&self) -> Result<i32>
The episode number of the track.
sourcepub fn set_EpisodeNumber(&mut self, EpisodeNumber: i32) -> Result<()>
pub fn set_EpisodeNumber(&mut self, EpisodeNumber: i32) -> Result<()>
The episode number of the track.
sourcepub fn is_Unplayed(&self) -> Result<bool>
pub fn is_Unplayed(&self) -> Result<bool>
True if track has not been played.
sourcepub fn set_Unplayed(&mut self, Unplayed: bool) -> Result<()>
pub fn set_Unplayed(&mut self, Unplayed: bool) -> Result<()>
True if track has not been played.
sourcepub fn set_SortAlbum(&mut self, SortAlbum: &str) -> Result<()>
pub fn set_SortAlbum(&mut self, SortAlbum: &str) -> Result<()>
The album used for sorting.
sourcepub fn SortAlbumArtist(&self) -> Result<String>
pub fn SortAlbumArtist(&self) -> Result<String>
The album artist used for sorting.
sourcepub fn set_SortAlbumArtist(&mut self, SortAlbumArtist: &str) -> Result<()>
pub fn set_SortAlbumArtist(&mut self, SortAlbumArtist: &str) -> Result<()>
The album artist used for sorting.
sourcepub fn SortArtist(&self) -> Result<String>
pub fn SortArtist(&self) -> Result<String>
The artist used for sorting.
sourcepub fn set_SortArtist(&mut self, SortArtist: &str) -> Result<()>
pub fn set_SortArtist(&mut self, SortArtist: &str) -> Result<()>
The artist used for sorting.
sourcepub fn SortComposer(&self) -> Result<String>
pub fn SortComposer(&self) -> Result<String>
The composer used for sorting.
sourcepub fn set_SortComposer(&mut self, SortComposer: &str) -> Result<()>
pub fn set_SortComposer(&mut self, SortComposer: &str) -> Result<()>
The composer used for sorting.
sourcepub fn set_SortName(&mut self, SortName: &str) -> Result<()>
pub fn set_SortName(&mut self, SortName: &str) -> Result<()>
The track name used for sorting.
sourcepub fn set_SortShow(&mut self, SortShow: &str) -> Result<()>
pub fn set_SortShow(&mut self, SortShow: &str) -> Result<()>
The show name used for sorting.
sourcepub fn AlbumRating(&self) -> Result<i32>
pub fn AlbumRating(&self) -> Result<i32>
The user or computed rating of the album that this track belongs to (0 to 100).
sourcepub fn set_AlbumRating(&mut self, AlbumRating: i32) -> Result<()>
pub fn set_AlbumRating(&mut self, AlbumRating: i32) -> Result<()>
The user or computed rating of the album that this track belongs to (0 to 100).
sourcepub fn AlbumRatingKind(&self) -> Result<ITRatingKind>
pub fn AlbumRatingKind(&self) -> Result<ITRatingKind>
The album rating kind.
sourcepub fn ratingKind(&self) -> Result<ITRatingKind>
pub fn ratingKind(&self) -> Result<ITRatingKind>
The track rating kind.
sourcepub fn Playlists(&self) -> Result<PlaylistCollection>
pub fn Playlists(&self) -> Result<PlaylistCollection>
Returns a collection of playlists that contain the song that this track represents.
sourcepub fn set_Location(&mut self, Location: &str) -> Result<()>
pub fn set_Location(&mut self, Location: &str) -> Result<()>
The full path to the file represented by this track.
sourcepub fn ReleaseDate(&self) -> Result<f64>
pub fn ReleaseDate(&self) -> Result<f64>
The release date of the track. A value of zero means no release date.