Commit Graph

1081 Commits

Author SHA1 Message Date
Henrik Friedrichsen
bef4742cec Remove duplicate album query 2023-07-23 14:49:21 +02:00
Flynn Duniho
924296ac52 Add add command for adding song to playlist (#1232)
* Add command for adding song to playlist

* edits for code style

* Return playlist dialog via `CommandResult::Modal`

---------

Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
2023-07-22 16:03:21 +02:00
Henrik Friedrichsen
92cd4f1c8b Handle local tracks in playlist
- Show error on deletion, as we currently do not have a Uri we can pass to the
  Spotify API to delete local files in playlists
- Mark local files in `ListView`

fixes #1213
2023-07-22 15:42:14 +02:00
Henrik Friedrichsen
90b4560a2d Gracefully handle tracks without IDs
As reported in #1231:

Local files in playlists have no IDs. When trying to delete them ncspot crashes
as it tries to extract a track ID.
2023-07-22 15:42:14 +02:00
bentheklutz
2786c6ba34 Sort Artists Ignoring "The" (#1238)
* Sorting QoL

Ignore leading "The" when sorting albums and artists by artist name
in the library.

* Simplify stripping of `The ` prefix in artist

---------

Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
2023-07-22 13:05:03 +02:00
Henrik Friedrichsen
66bb0746b6 Update to strum 0.25.0 2023-07-22 12:44:50 +02:00
cyqsimon
9709c73324 Recommend Ueberzug++ 2023-07-22 12:34:14 +02:00
Henrik Friedrichsen
83f9e8d224 Update dependencies 2023-07-22 12:31:26 +02:00
hrdl
f74661a15d feat: add save current command 2023-07-07 11:23:47 +02:00
Henrik Friedrichsen
2c61a965f1 Update dependencies 2023-07-02 15:00:17 +02:00
Thomas Frans
0c93cafccf refactor: remove unused screenchange variable
The `screenchange` member variable on `Layout` didn't seem to be used
for anything except for debugging. A comment in `on_layout` makes it
seem like it wasn't meant to be used for debugging purposes but for
actual functionality that wasn't implemented.
2023-06-18 17:04:43 +02:00
Thomas Frans
d644397180 fix: forward mouse events inside layout
After refactoring layout, the if statements were removed in favor of a
single match. This changed the control flow a bit, breaking mouse event
propagation.
2023-06-14 23:03:25 +02:00
Thomas Frans
03cfd4da5f chore: improve release build options 2023-06-13 20:41:37 +02:00
Henrik Friedrichsen
9b0cd76fc5 Bump version to 0.13.3 2023-06-11 22:41:29 +02:00
Henrik Friedrichsen
07c2245bd6 Update dependencies 2023-06-11 22:39:28 +02:00
Thomas Frans
21c26abaa3 docs: add cargo installation method
Since people were having problems when installing from crates.io, it
would be nice to document it to prevent further problems.
2023-06-07 21:06:55 +02:00
Thomas Frans
3587aa1441 docs: remove Snapcraft installation source
The Snapcraft package seems to have been removed. Therefore the links in
the documentation should also be removed.
2023-06-07 21:06:31 +02:00
Thomas Frans
6c990b5bda fix: config option command_key not working 2023-06-06 20:44:14 +02:00
Thomas Frans
ac0bcb4420 fix: prevent tab switching from command line 2023-06-04 22:21:10 +02:00
Thomas Frans
bbd7bcf4aa fix: command line multi-byte prefix panic
Don't index into the command line command as the prefix can be altered
by the user and therefore be a multi-byte unicode character.
2023-06-04 17:30:06 +02:00
Thomas Frans
96bb2ea06b fix: '/' character not working in search view 2023-06-02 23:20:24 +02:00
Thomas Frans
6d2a0552bf refactor: move layout functionality under layout 2023-06-02 23:20:24 +02:00
Thomas Frans
d0efc0868f chore: fix Application::new documentation 2023-06-02 23:20:24 +02:00
Thomas Frans
0c97bd36c3 fix: remove ipc import on non-unix systems 2023-06-02 23:20:24 +02:00
Thomas Frans
c36d3cf272 refactor: move and add functions 2023-06-02 23:20:24 +02:00
Thomas Frans
04cbe8ac20 refactor: move base path config + documentation 2023-06-02 23:20:24 +02:00
Thomas Frans
6be45ece90 chore: document items in the config module
Sometimes the use of an item wasn't clear without reading the code. This
should help with that.
2023-06-02 23:20:24 +02:00
Thomas Frans
3b8de6600f refactor: move panic hook into module 2023-06-02 23:20:24 +02:00
Thomas Frans
abffb3c2a9 refactor: move cli argument parsing to main
Command line arguments are part of the OS process and should be under
main.
2023-06-02 23:20:24 +02:00
Thomas Frans
ae090b6073 refactor: move async runtime to application module
To have a clear distinction between code dealing with OS process
characteristics and code of ncspot itself, it makes sense to move the
async runtime together with ncspot as it doesn't have anything to do
with the OS process.
2023-06-02 23:20:24 +02:00
Thomas Frans
6d32f3d1f8 refactor: move 'global' data into Application
Some applications move their 'global' data into a struct called `App` or
`Application`. This makes it very clear what data belongs to the
'global' scope or in other words, to the application itself.
2023-06-02 23:20:24 +02:00
Henrik Friedrichsen
b6e5495128 Update dependencies 2023-06-01 21:17:52 +02:00
Henrik Friedrichsen
e6ed4ea024 Support multiple IPC sockets (#1171)
For instance for when multiple ncspot instances are running. In that case the
PID will be appended to the path, i.e. `~/.cache/ncspot/ncspot.20707.sock`.

Also ncspot will now delete the socket on shutdown.

Fixes #1158
2023-05-22 22:14:59 +02:00
cyqsimon
d8faa87431 Fix incorrect notification ID reuse on XDG (#1150)
* Fix incorrect notification ID reuse on XDG

* Remove `notification_id` persistence

---------

Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
2023-05-22 17:51:29 +00:00
Henrik Friedrichsen
f18454082e Update dependencies 2023-05-22 19:37:05 +02:00
Thomas Frans
e9f34873b4 fix(ui): ListView decrement selected on remove
When removing an element, it is important to check whether it was the
last element in the list and decrement the selected index if so.
2023-05-12 21:07:53 +02:00
Henrik Friedrichsen
aeff120e67 Revert "Use native TLS only, don't mix it with rustls"
This reverts commit 80da5a877a.

Fixes #1159
2023-05-10 23:08:29 +02:00
Henrik Friedrichsen
2040620b42 Dependency updates 2023-05-09 21:07:20 +02:00
Jakub Jirutka
80da5a877a Use native TLS only, don't mix it with rustls
reqwest uses native TLS by default, but rspotify with ureq currently
uses rustls.
2023-05-09 10:36:04 +02:00
Jakub Jirutka
ba60fbddd0 Fix: breaking changes in rpostify 0.11.7 2023-05-09 10:36:04 +02:00
Jakub Jirutka
22badc9038 Bump rspotify from 0.11.6 to 0.11.7 2023-05-09 10:36:04 +02:00
Henrik Friedrichsen
41b3243df0 Update dependencies
Keep `rspotify` at v0.11.6 until ramsayleung/rspotify#407 is fixed
2023-05-05 10:17:19 +02:00
Henrik Friedrichsen
d3a27e2c15 Bump version to 0.13.2 2023-05-04 23:48:25 +02:00
Callum Wishart
43a4883bd3 Update Nerdfont glyphs (#1141) 2023-05-04 23:43:50 +02:00
dependabot[bot]
b742bec22e Bump clap from 4.2.1 to 4.2.7
Bumps [clap](https://github.com/clap-rs/clap) from 4.2.1 to 4.2.7.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.2.1...v4.2.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-04 23:43:06 +02:00
dependabot[bot]
9186ebc565 Bump tokio-stream from 0.1.12 to 0.1.14
Bumps [tokio-stream](https://github.com/tokio-rs/tokio) from 0.1.12 to 0.1.14.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Changelog](https://github.com/tokio-rs/tokio/blob/tokio-0.1.14/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-stream-0.1.12...tokio-0.1.14)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-04 23:40:45 +02:00
dependabot[bot]
fe2b108c69 Bump clap_complete from 4.2.0 to 4.2.1
Bumps [clap_complete](https://github.com/clap-rs/clap) from 4.2.0 to 4.2.1.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.2.0...clap_complete-v4.2.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-04 23:40:38 +02:00
dependabot[bot]
a62c9b5c05 Bump libc from 0.2.141 to 0.2.142
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.141 to 0.2.142.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.141...0.2.142)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-04 23:40:30 +02:00
dependabot[bot]
3b51dc35ba Bump tokio-util from 0.7.7 to 0.7.8
Bumps [tokio-util](https://github.com/tokio-rs/tokio) from 0.7.7 to 0.7.8.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-util-0.7.7...tokio-util-0.7.8)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-03 10:30:15 +02:00
dependabot[bot]
2d91d13001 Bump tokio from 1.27.0 to 1.28.0
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.27.0 to 1.28.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.27.0...tokio-1.28.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-03 10:30:07 +02:00