Skip to content

Commit

Permalink
Reconstruct with isahc and async-std
Browse files Browse the repository at this point in the history
`isahc` uses libcurl as backend which handles complicated HTTP protocol.

The old codes have many messy construction.  At this commit, we rewrite
all codes and let them have independent relationship as much as possibe.

Now, aget-rs supports to asynchronically download http/s content and
m3u8 stream videos.
  • Loading branch information
PeterDing committed May 23, 2020
1 parent 8efa20e commit ea051d8
Show file tree
Hide file tree
Showing 60 changed files with 2,726 additions and 1,813 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/target
Cargo.lock
20 changes: 13 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@ dist: xenial

matrix:
include:
# Stable channel.
# Build on linux
- os: linux
rust: stable
env: TARGET=x86_64-unknown-linux-gnu
rust: nightly
env:
- TARGET=x86_64-unknown-linux-gnu
- DEPLOY=true

# Build on osx
- os: osx
rust: stable
env: TARGET=x86_64-apple-darwin
rust: nightly
env:
- TARGET=x86_64-apple-darwin
- DEPLOY=true

# Code formatting check
- os: linux
Expand All @@ -21,8 +26,9 @@ matrix:
- cargo install --debug --force rustfmt-nightly
script: cargo fmt -- --check

# Test benchmark
- os: linux
rust: stable
rust: nightly
install: cargo build
script: bash ci/benchmark.bash

Expand Down Expand Up @@ -75,7 +81,7 @@ deploy:
# deploy only if we push a tag
tags: true
# deploy only on stable channel that has TARGET env variable sets
condition: $TRAVIS_RUST_VERSION = stable && $TARGET != ""
condition: $DEPLOY = true && $TARGET != ""

notifications:
email:
Expand Down
25 changes: 12 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,18 @@ edition = "2018"
name = "ag"
path = "src/main.rs"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
percent-encoding = "2.1"
term_size = "0.3"
ansi_term = "0.12"
bytes = "0.5"
failure = "0.1"

isahc = { version = "0.9", features = ["cookies"] }
futures = "0.3"
futures-util = "0.3"
actix-rt = "1.0"
awc = { version = "1.0", features = ["openssl"] }

[dependencies.clap]
version = "2.33"
default-features = false
features = [ "suggestions", "color" ]
async-std = { version = "1", features = ["unstable"] }
thiserror = "1.0"
term_size = "0.3"
ansi_term = "0.12"
openssl = "0.10"
clap = "2"
percent-encoding = "2"
m3u8-rs = "1"
url = "2"
206 changes: 0 additions & 206 deletions src/app.rs

This file was deleted.

Loading

0 comments on commit ea051d8

Please sign in to comment.