Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some thing regarding the recent commits #237

Merged
merged 5 commits into from
Mar 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### unreleased
- Released on: unreleased.
- Change: updated MSRV to 1.70.
- Change: updated MSRV to 1.74.
- Change: better Error messages if the server binary cannot be started.
- Change: small optimizations.
- Change: change almost all `eprintln` to be `log::error`.
Expand All @@ -13,8 +13,11 @@
- Feat: support `mkv` & `webm` in backend `rusty` (no metadata, support depends on codec).
- Feat: in backend `rusty`, buffer files in 4Mb chunks.
- Feat: better version via `--version`.
- Feat(server): allow compiling multiple backends via features and select at binary start.
- Feat: allow specifiying which interface (ip) to run on.
- Feat(server): allow compiling multiple backends via features and select at binary start (via `--backend` or `TMS_BACKEND`).
- Feat(server): for backend `mpv`, switch to use `libmpv-sirno` and use mpv API 2.0.
- Feat(tui): add a "currently playing" symbol to active track in playlist.
- Feat(tui): add search function for Podcast Episodes.
- Fix: try to find the server binary adjacent to the TUI binary.
- Fix: change many panics to be results instead.
- Fix: dont panic if "music_dir" value is empty when entering config editor, fixes #161.
Expand All @@ -25,9 +28,15 @@
- Fix(tui): add panic hook to reset screen before printing backtrace.
- Fix(tui): dont extra clear screen on quit.
- Fix(tui): reset screen if a Error(Result) happens and exit properly.
- Fix(tui): wait until tonic is connected instead of static sleeps.
- Fix(tui): only display `ueberzug` "Not found" errors once.
- Fix(tui): blanket disable `ueberzug` for windows.
- Fix(server): log port used.
- Fix(server): log on quit.
- Fix(server): properly exit on player thread crash (instead of being pseudo-zombie).
- Fix(server): potentially fix media display in windows.
- Fix(server): in backend `rusty`, fix radio not starting if `gapless` is enabled and the track changes to be radio (from something else).
- Fix(server): in backend `rusty`, fix radio streams not being stopped once they have been skipped.
- Fix(build): install to `$CARGO_HOME/bin` instead of always into a static path.
- a **bunch** of internal refactors.

Expand Down
142 changes: 27 additions & 115 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ termusic-playback = { path = "playback/", version = "0.7.12" }
termusic-stream = { path = "stream/", version = "0.7.12" }
ahash = "^0.8"
anyhow = { version = "1.0", features = ["backtrace"] }
async-channel = "2"
async-trait = "0.1"
base64 = "0.22"
bytes = "1"
Expand Down Expand Up @@ -101,9 +100,9 @@ toml = "0.8"
tonic = "0.11"
tonic-build = "0.11"
tracing = "0.1"
tuirealm = { version = "~1.9", features = ["serialize"] }
tui-realm-stdlib = "~1.3"
tui-realm-treeview = "~1.2"
tuirealm = { version = "~1.8", features = ["serialize"] }
tui-realm-stdlib = "~1.2"
tui-realm-treeview = "~1.1"
unicode-segmentation = "1.10"
unicode-width = "^0.1.8"
urlencoding = "2"
Expand All @@ -113,6 +112,7 @@ walkdir = "2"
wildmatch = "2"
yaml-rust = "^0.4.5"
ytd-rs = { version = "0.1", features = ["yt-dlp"] }
async-channel = "2"
# winit = "0.27.0"
# windows = "0.52"

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![Build status](https://github.com/tramhao/termusic/actions/workflows/build.yml/badge.svg)](https://github.com/tramhao/termusic/actions)
[![crates.io](https://img.shields.io/crates/v/termusic.svg)](https://crates.io/crates/termusic)
[![dependency status](https://deps.rs/repo/github/tramhao/termusic/status.svg)](https://deps.rs/repo/github/tramhao/termusic)
[![MSRV](https://img.shields.io/badge/MSRV-1.70.0-blue)](https://blog.rust-lang.org/2023/06/01/Rust-1.70.0.html)
[![MSRV](https://img.shields.io/badge/MSRV-1.74.0-blue)](https://blog.rust-lang.org/2023/11/16/Rust-1.74.0.html)
# Terminal Music and Podcast Player written in Rust

Listen to music and podcasts freely as both in freedom and free of charge!
Expand Down
4 changes: 2 additions & 2 deletions lib/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ mod tests {
let child: Rect = draw_area_in_relative(area, 75, 30);
assert_eq!(child.x, 43);
assert_eq!(child.y, 63);
assert_eq!(child.width, 272);
assert_eq!(child.height, 55);
assert_eq!(child.width, 271);
assert_eq!(child.height, 54);
}
}
9 changes: 4 additions & 5 deletions tui/src/ui/components/config_editor/key_combo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ use tuirealm::props::{
PropValue, Props, Style, TextModifiers,
};
use tuirealm::tui::{
layout::{Constraint, Direction as LayoutDirection, Layout, Rect},
text::Span,
layout::{Constraint, Corner, Direction as LayoutDirection, Layout, Rect},
text::Spans,
widgets::{Block, List, ListItem, ListState, Paragraph},
};

Expand Down Expand Up @@ -445,7 +445,7 @@ impl KeyCombo {
.states
.choices
.iter()
.map(|x| ListItem::new(Span::from(x.clone())))
.map(|x| ListItem::new(Spans::from(x.clone())))
.collect();
let mut foreground = self
.props
Expand Down Expand Up @@ -545,8 +545,7 @@ impl KeyCombo {
}
let mut list = List::new(choices)
.block(block)
// .start_corner(Corner::TopLeft)
.direction(tuirealm::tui::widgets::ListDirection::TopToBottom)
.start_corner(Corner::TopLeft)
.style(Style::default().fg(foreground).bg(background))
.highlight_style(
Style::default()
Expand Down
2 changes: 1 addition & 1 deletion tui/src/ui/components/progress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ impl Model {
self.force_redraw();
}

// TODO: refactor to have "duration" optional
// TODO: refactor to have "total_duration" optional
#[allow(clippy::cast_precision_loss, clippy::cast_possible_wrap)]
pub fn progress_update(&mut self, time_pos: Option<Duration>, total_duration: Duration) {
// for unsupported file format, don't update progress
Expand Down
Loading