Skip to content

Commit

Permalink
Rewrite rendering system, and speed up initial program loading, GREAT…
Browse files Browse the repository at this point in the history
…LY reduced number of deps...
  • Loading branch information
LaineZ committed Jun 9, 2020
1 parent a8a90f7 commit 865ed3a
Show file tree
Hide file tree
Showing 11 changed files with 733 additions and 928 deletions.
328 changes: 1 addition & 327 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bandcamp-online-cli"
version = "0.4.1"
version = "0.5.0"
authors = ["140bpmdubstep <laineprikol@gmail.com>", "LeshaInc"]
edition = "2018"

Expand All @@ -9,13 +9,11 @@ edition = "2018"
[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
scraper = "0.12"
ureq = "1.1.1"
regex = "1.3"
anyhow = "1.0"
minimp3 = "0.3.5"
crossterm = "0.17.5"
parking_lot = "0.10"
webbrowser = "0.5.2"
log = "0.4.8"
flexi_logger = "0.15.2"
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@ Works on any Linux with ALSA-compitable sound card but CI-Builds and future rele

<kbd>↑</kbd> <kbd>↓</kbd> - navigation

<kbd>PageUp</kbd> <kbd>PageDown</kbd> - scroll pages

<kbd>X</kbd> - debug console (logging, diagnostics) - currently alsmost never used... to exit press any key that switches view <kbd>⭾</kbd>

** Playback only **

<kbd>←</kbd> - move track backwards by 5 secs **(SLOW)**
<kbd>←</kbd> - move track backwards by 5 secs

<kbd>→</kbd> - move track forward by 5 secs

Expand Down Expand Up @@ -81,10 +83,10 @@ Works on any Linux with ALSA-compitable sound card but CI-Builds and future rele
1. [Download Rust]([https://www.rust-lang.org/learn/get-started) and run this command
2. ```git clone https://github.com/LaineZ/bc_rs.git```
3. ```cd bc_rs```
4. If you run on Linux you need install these audio libs: ``libaudio`` and ``libasound2``
1. On Ubuntu you can just run that command ``sudo apt install libaudio-dev libasound2-dev``
5. ```cargo build``` also you can add ``--release`` option to reduce binary file size and speed up tracks operations. but debug-builds compiles faster
6. ```cd target/debug``` or ```cd target/release``` if you run with ``--release`` option
4. If you run on Linux you need install these audio libs: ``libaudio``, ``libasound2``, ``libxcb-shape0-dev``, ``libxcb-xfixes0-dev``
1. On Ubuntu/Debian you can just run that command ``sudo apt install libaudio-dev libasound2-dev libxcb-shape0-dev libxcb-xfixes0-dev``
5. ```cargo build --release```
6. ```cd target/release```
7. DONE! You can run in TUI Mode by instructions above

## Notice
Expand Down
3 changes: 1 addition & 2 deletions src/bc_core/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
pub mod album_parsing;
pub mod http_tools;
pub mod playback;
pub mod tags;
pub mod playback;
3 changes: 1 addition & 2 deletions src/bc_core/playback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ impl Display for FormatTime {
let total_secs = self.0.as_secs();
let mins = total_secs / 60;
let secs = total_secs % 60;
let micros = self.0.subsec_micros();
write!(f, "{:02}:{:02}.{:06}", mins, secs, micros)
write!(f, "{:02}:{:02}", mins, secs)
}
}

Expand Down
35 changes: 0 additions & 35 deletions src/bc_core/tags.rs

This file was deleted.

0 comments on commit 865ed3a

Please sign in to comment.