Commit Graph

968 Commits

Author SHA1 Message Date
Henrik Friedrichsen
05d221aada Bump version to 0.11.2 2022-10-15 12:48:44 +02:00
Henrik Friedrichsen
03ffbbc6d8 cargo update 2022-10-15 12:47:32 +02:00
Henrik Friedrichsen
bcd51ee33a cargo update 2022-10-07 23:05:49 +02:00
Henrik Friedrichsen
5dcbc18f85 Save current state on SIGHUP as well
Fixes #948
2022-10-04 08:30:18 +02:00
Henrik Friedrichsen
b1f1c20484 Exit gracefully on SIGTERM
* Exit gracefully on `SIGTERM`

Save current state and close ncspot on `SIGTERM`

Fixes #948

* Disable signal handling on non-UNIX platforms
2022-10-03 00:07:40 +02:00
dependabot[bot]
222b41c9cf Bump wl-clipboard-rs from 0.6.0 to 0.7.0
Bumps [wl-clipboard-rs](https://github.com/YaLTeR/wl-clipboard-rs) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/YaLTeR/wl-clipboard-rs/releases)
- [Changelog](https://github.com/YaLTeR/wl-clipboard-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/YaLTeR/wl-clipboard-rs/compare/v0.6.0...v0.7.0)

---
updated-dependencies:
- dependency-name: wl-clipboard-rs
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-02 22:11:50 +02:00
Henrik Friedrichsen
c2ab691722 Upgrade to Clap v4 2022-10-02 22:11:10 +02:00
Henrik Friedrichsen
9464c3da77 cargo update 2022-10-02 21:52:31 +02:00
Thomas Frans
655d663aed Fix: fixes a bug that crashed ncspot.
Like mentioned in the corresponding issue by ayushjaipuriyar, ncspot
would crash when the queue was empty, shuffled, and played. This commit
fixes that, together with some minor clippy fixes.
2022-10-02 21:46:57 +02:00
Thomas Frans
be7ed20897 Cleanup: Remove PlayTrackMenu
PlayTrackMenu was used before the refactor of the contextmenus. I forgot
to clean up the struct before making the commit since rustc didn't
complain. Just cleaning up my mistakes ;)
2022-09-23 13:38:32 +02:00
Thomas
0eedc38b8a Improve context menus to make the UX/UI more consistent (#923)
* Add save option to context menu of all possible ListItems

* Add play options to context menus

* Fix for playlists and tracks

* Move playback controls into main menu
2022-09-20 22:09:51 +02:00
Henrik Friedrichsen
ccbc382144 Bump version to 0.11.1 2022-09-17 14:27:18 +02:00
Henrik Friedrichsen
efb8d8e874 cargo update 2022-09-17 14:19:38 +02:00
Henrik Friedrichsen
a668574376 Fix: properly set up Browse screen
Previously two vectors of categories were created. The pagination was set up to
store the newly fetched page in the `Vec` that was not displayed.

With this change newly fetched pages should correctly show up in the "Browse"
screen.

As reported in #939
2022-09-16 22:12:37 +02:00
Thomas Frans
2be126430d Fixed pagination bug that caused items not to load 2022-09-16 21:31:47 +02:00
Henrik Friedrichsen
c1f0c5409c Fix: Re-request album tracks if it has >50 tracks
Fixes #926
2022-09-12 23:29:12 +02:00
Henrik Friedrichsen
f4ef7e1b56 Fix: remove broken staleness detection
Ever since albums were sorted the cache staleness detection stopped working as
the order of items plays into the check. Remove it as it currently doesn't
work. It also wasn't a very good check.
2022-09-12 23:16:06 +02:00
Henrik Friedrichsen
63722c5be3 Fix: Use buffered backend to prevent flickering
This is reported to be occuring with the Cursive Termion backend as it redraws
the screen every time, resulting in flickering for some users.

Should be removed once Cursive has integrated this.

See also:
- https://github.com/gyscos/cursive/issues/142
- https://github.com/gyscos/cursive/issues/667

Fixes #934
2022-09-11 23:34:24 +02:00
Henrik Friedrichsen
e6a01da3cd Update to cursive 0.2.0 2022-09-11 23:20:13 +02:00
Henrik Friedrichsen
771b31a6b3 Dependency updates 2022-09-03 16:42:41 +02:00
Henrik Friedrichsen
10213f9bcf Fix: set track position only for clicks, not hold
Fixes #920
2022-08-29 21:45:29 +02:00
Henrik Friedrichsen
816d2f133d Mouse wheel: scroll up/down without changing focus
Fixes #918
2022-08-25 22:53:03 +02:00
Ronak Buch
56c8817aa8 Fix order of parameters to Cache::new
When updating to librespot 0.4.0 in c41294c, the volume and audio path
parameters were specified in the wrong order.
2022-08-25 09:22:26 +02:00
Thomas
b8b565d0c3 Fix back button mouse left click 2022-08-24 20:41:55 +02:00
Henrik Friedrichsen
bddfd6f622 Bump version to 0.11.0 2022-08-21 00:07:08 +02:00
Henrik Friedrichsen
b746c14e7b Update dependencies 2022-08-21 00:06:16 +02:00
Henrik Friedrichsen
a9f7f3cddc Fix: align with color palette of Cursive
Should make context menus (`SelectView`) look like ncspot's `ListView`.

Fixes #431
2022-08-20 23:40:33 +02:00
Henrik Friedrichsen
966223392e Handle clicks on back button (pop view from stack) 2022-08-20 23:05:14 +02:00
Henrik Friedrichsen
8905db457a Implement category playlist browsing in library
Fixes #187
2022-08-20 22:32:25 +02:00
Henrik Friedrichsen
a04bc40051 Refactor: Extract command handling for ListView 2022-08-20 00:40:21 +02:00
Henrik Friedrichsen
38dfba1db5 Use ViewExt.title() in TabView
Instead of storing a separate copy of the view title.

Additionally, rename `ViewExt.set_title()` to `ViewExt.with_title()` as it
consumes `self` and returns ownership.
2022-08-19 20:42:46 +02:00
Henrik Friedrichsen
5db79d5b2e Fix ListView scrollbar dragging
With af08a56 properly passing down relativized events we don't have to implement
to scrollbar dragging logic ourselves anymore, but can rely on the one in
cursive.

This also fixes #839
2022-08-19 19:02:15 +02:00
Henrik Friedrichsen
2311e49ea2 Don't open item/context menu for clicks after end
The previous behavior would select and open the last item if the user clicked a
row after the last item. This change prevents such a behavior as it can be
misleading.

Related to #840
2022-08-19 00:41:19 +02:00
Henrik Friedrichsen
81010fc453 Refactor: Unify list size calculation 2022-08-19 00:31:56 +02:00
Henrik Friedrichsen
82716b267b Handle left mouse click on item, i.e. albums/lists
Another part of #840
2022-08-19 00:31:47 +02:00
Henrik Friedrichsen
4315cdc077 Add CursiveExt trait
For easier usage of shared logic involving the `Cursive` instance.
2022-08-19 00:18:34 +02:00
Henrik Friedrichsen
f5bf1d527f cargo clippy --fix 2022-08-17 19:41:23 +02:00
Bettehem
0af93f816d Fixed clipboard not working on GNOME Wayland. 2022-08-17 19:33:02 +02:00
Henrik Friedrichsen
d3e89115d7 Open context menu when right-clicking on items
Another part of #840
2022-08-16 23:01:51 +02:00
Henrik Friedrichsen
af08a560c7 Pass down relativized events to child views
So child views can correctly calculate the local mouse cursor position.
2022-08-16 21:52:01 +02:00
Henrik Friedrichsen
8aab5cabf2 Fix: don't crash on empty command input 2022-08-16 21:52:01 +02:00
dependabot[bot]
55c6bcc47c Bump futures from 0.3.21 to 0.3.23
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.21 to 0.3.23.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.21...0.3.23)

---
updated-dependencies:
- dependency-name: futures
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-15 12:06:18 +02:00
dependabot[bot]
708fb8d38a Bump chrono from 0.4.21 to 0.4.22
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.21 to 0.4.22.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.21...v0.4.22)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-15 12:06:10 +02:00
dependabot[bot]
b468185441 Bump clap from 3.2.16 to 3.2.17
Bumps [clap](https://github.com/clap-rs/clap) from 3.2.16 to 3.2.17.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/v3.2.17/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.16...v3.2.17)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-15 12:06:04 +02:00
dependabot[bot]
084be121d0 Bump libc from 0.2.127 to 0.2.131
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.127 to 0.2.131.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/commits)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-14 23:46:22 +02:00
dependabot[bot]
97f6576914 Bump chrono from 0.4.20 to 0.4.21
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.20 to 0.4.21.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.20...v0.4.21)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-14 23:46:17 +02:00
ayushjaipuriyar
24fa9c1c44 Changes to README capitalized in playlists (#901)
* Changes to README

* Fix whitespaces in table alignment

Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
2022-08-09 17:56:45 +02:00
Henrik Friedrichsen
f7f2cb63eb Handle mouse clicks and scrolling in tab header
Partially implements #840
2022-08-09 17:51:44 +02:00
dependabot[bot]
6ce2ffdf44 Bump serde from 1.0.142 to 1.0.143
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.142 to 1.0.143.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.142...v1.0.143)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-09 13:30:47 +02:00
dependabot[bot]
cee6399586 Bump strum_macros from 0.24.2 to 0.24.3
Bumps [strum_macros](https://github.com/Peternator7/strum) from 0.24.2 to 0.24.3.
- [Release notes](https://github.com/Peternator7/strum/releases)
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits)

---
updated-dependencies:
- dependency-name: strum_macros
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-08 11:47:12 +02:00