mirror of
https://github.com/kristoferssolo/tg-relay-rs.git
synced 2026-02-25 05:08:15 +00:00
feat: add youtube shorts support
This commit is contained in:
15
src/error.rs
15
src/error.rs
@@ -6,7 +6,10 @@ pub enum Error {
|
||||
Io(#[from] tokio::io::Error),
|
||||
|
||||
#[error("instaloader failed: {0}")]
|
||||
InstaloaderFaileled(String),
|
||||
InstaloaderFailed(String),
|
||||
|
||||
#[error("yt-dpl failed: {0}")]
|
||||
YTDLPFailed(String),
|
||||
|
||||
#[error("no media found")]
|
||||
NoMediaFound,
|
||||
@@ -29,6 +32,16 @@ impl Error {
|
||||
pub fn other(text: impl Into<String>) -> Self {
|
||||
Self::Other(text.into())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn instaloader_failed(text: impl Into<String>) -> Self {
|
||||
Self::InstaloaderFailed(text.into())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn ytdlp_failed(text: impl Into<String>) -> Self {
|
||||
Self::YTDLPFailed(text.into())
|
||||
}
|
||||
}
|
||||
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
|
||||
Reference in New Issue
Block a user