pub struct Downloader { /* private fields */ }
Expand description
RustyPipe audio/video downloader
The downloader uses an Arc
internally, so if you are using the client
at multiple locations, you can just clone it.
Implementations§
Source§impl Downloader
impl Downloader
Sourcepub fn new(rp: &RustyPipe) -> Self
pub fn new(rp: &RustyPipe) -> Self
Create a new Downloader
using the given RustyPipe
instance
Sourcepub fn builder() -> DownloaderBuilder
pub fn builder() -> DownloaderBuilder
Create a new DownloaderBuilder
This is the same as DownloaderBuilder::new
Sourcepub fn id<S: Into<String>>(&self, video_id: S) -> DownloadQuery
pub fn id<S: Into<String>>(&self, video_id: S) -> DownloadQuery
Download a video with the given ID
Sourcepub fn video(&self, video: DownloadVideo) -> DownloadQuery
pub fn video(&self, video: DownloadVideo) -> DownloadQuery
Download a video from a DownloadVideo object
Sourcepub fn entity(&self, video: &impl YtEntity) -> DownloadQuery
pub fn entity(&self, video: &impl YtEntity) -> DownloadQuery
Download a video from a YtEntity
object (e.g. playlist/channel video)
Providing an entity has the advantage that the download path can be determined before the video is fetched, so already downloaded videos get skipped right away.
Sourcepub fn track(&self, track: &TrackItem) -> DownloadQuery
pub fn track(&self, track: &TrackItem) -> DownloadQuery
Download a video from a TrackItem
(YouTube Music album/playlist item)
Providing an entity has the advantage that the download path can be determined before the video is fetched, so already downloaded videos get skipped right away.
If an album track is downloaded, this method will also add the track number to the downloaded file
Trait Implementations§
Source§impl Clone for Downloader
impl Clone for Downloader
Source§fn clone(&self) -> Downloader
fn clone(&self) -> Downloader
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for Downloader
impl !RefUnwindSafe for Downloader
impl Send for Downloader
impl Sync for Downloader
impl Unpin for Downloader
impl !UnwindSafe for Downloader
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
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>
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>
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 more