LibraryPlaylist

Struct LibraryPlaylist 

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

Safe wrapper over a IITLibraryPlaylist

Implementations§

Source§

impl LibraryPlaylist

Source

pub fn AddFile(&self, filePath: &str) -> Result<OperationStatus>

Add the specified file path to the library.

Source

pub fn AddFiles<T>(&self, filePaths: &Variant<'_, T>) -> Result<OperationStatus>

Add the specified array of file paths to the library. filePaths can be of type VT_ARRAY|VT_VARIANT, where each entry is a VT_BSTR, or VT_ARRAY|VT_BSTR. You can also pass a JScript Array object.

Source

pub fn AddURL(&self, URL: &str) -> Result<URLTrack>

Add the specified streaming audio URL to the library.

Source

pub fn AddTrack<T>(&self, iTrackToAdd: &Variant<'_, T>) -> Result<Track>

Add the specified track to the library. iTrackToAdd is a VARIANT of type VT_DISPATCH that points to an IITTrack.

Trait Implementations§

Source§

impl IITObjectWrapper for LibraryPlaylist

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 IITPlaylistWrapper for LibraryPlaylist

Source§

fn as_user_playlist(&self) -> Option<UserPlaylist>

Cast this playlist to a UserPlaylist in case this is valid to do so
Source§

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

Delete this playlist.
Source§

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

Start playing the first track in this playlist.
Source§

fn Print( &self, showPrintDialog: bool, printKind: ITPlaylistPrintKind, theme: String, ) -> Result<()>

Print this playlist.
Source§

fn Search( &self, searchText: String, searchFields: ITPlaylistSearchField, ) -> Result<TrackCollection>

Search tracks in this playlist for the specified string.
Source§

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

The playlist kind.
Source§

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

The source that contains this playlist.
Source§

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

The total length of all songs in the playlist (in seconds).
Source§

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

True if songs in the playlist are played in random order.
Source§

fn set_Shuffle(&self, Shuffle: bool) -> Result<()>

True if songs in the playlist are played in random order.
Source§

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

The total size of all songs in the playlist (in bytes).
Source§

fn SongRepeat(&self) -> Result<ITPlaylistRepeatMode>

The playback repeat mode.
Source§

fn set_SongRepeat(&self, value: ITPlaylistRepeatMode) -> Result<()>

The playback repeat mode.
Source§

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

The total length of all songs in the playlist (in MM:SS format).
Source§

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

True if the playlist is visible in the Source list.
Source§

fn Tracks(&self) -> Result<TrackCollection>

Returns a collection of tracks in this playlist.
Source§

impl ITunesRelatedObject for LibraryPlaylist

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.