1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#![allow(clippy::new_ret_no_self)]
extern crate chrono;
extern crate futures;
extern crate indicatif;
#[macro_use]
extern crate log;
extern crate md5;
extern crate regex;
extern crate serde;
#[macro_use]
extern crate serde_derive;
extern crate serde_json;
extern crate serde_urlencoded;
extern crate tokio;
extern crate http;
extern crate hls_m3u8;
extern crate reqwest;
extern crate parking_lot;
extern crate url;
extern crate stream_lib;
use crate::utils::error::StreamError;
use stream_lib::stream::StreamType;
pub trait Streamable {
fn new(url: String) -> Result<Box<Self>, StreamError>
where
Self: Sized;
fn get_title(&self) -> Option<String>;
fn get_author(&self) -> Option<String>;
fn is_online(&self) -> bool;
fn get_stream(&self) -> Result<StreamType, StreamError>;
fn get_ext(&self) -> String;
fn get_default_name(&self) -> String;
fn download(&self, path: String) -> Result<u64, StreamError>;
}
pub mod utils;
pub mod plugins;