Commit Graph

1148 Commits

Author SHA1 Message Date
dependabot[bot]
98210e2705 chore(deps): bump the cargo group with 6 updates
Bumps the cargo group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [libc](https://github.com/rust-lang/libc) | `0.2.152` | `0.2.153` |
| [reqwest](https://github.com/seanmonstar/reqwest) | `0.11.23` | `0.11.24` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.35.1` | `1.36.0` |
| [toml](https://github.com/toml-rs/toml) | `0.8.8` | `0.8.9` |
| [clap_mangen](https://github.com/clap-rs/clap) | `0.2.17` | `0.2.19` |
| [clap_complete](https://github.com/clap-rs/clap) | `4.4.9` | `4.4.10` |


Updates `libc` from 0.2.152 to 0.2.153
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.152...0.2.153)

Updates `reqwest` from 0.11.23 to 0.11.24
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.23...v0.11.24)

Updates `tokio` from 1.35.1 to 1.36.0
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.35.1...tokio-1.36.0)

Updates `toml` from 0.8.8 to 0.8.9
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.8...toml-v0.8.9)

Updates `clap_mangen` from 0.2.17 to 0.2.19
- [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_mangen-v0.2.17...clap_mangen-v0.2.19)

Updates `clap_complete` from 4.4.9 to 4.4.10
- [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.4.9...clap_complete-v4.4.10)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: toml
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: clap_mangen
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: clap_complete
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-04 11:52:05 +01:00
Thomas Frans
3c8e546445 refactor: general small refactors to simplify code
- Remove `expect` in favor of `unwrap` when the `Result`'s error variant
  contains the info in the `expect` anyway (eg. when locking things).
  The line number/context are given by the backtrace.
- Remove over-specification of types (`&T` instead of
  `&RWReadLockGuard`)
- Put reused values into constants
- `FromStr` instead of manual function
- Change `if let Some(()) = ...` to `if T.is_some()`
2024-02-03 18:52:09 +01:00
Thomas Frans
c5d666f35c docs: small overall documentation improvements (#1381)
* docs: small overall documentation improvements

- Add documentation comments to various items
- Change web API return types from bool/Option to Result
- Create helper functions with descriptive names instead of comments
- Remove redundant/confusing types
- Fix some documentation comments as instructed by `cargo doc`
- Rename variables to clear names

* docs: small fixes to the documentation update
2024-02-01 19:42:53 +01:00
Thomas Frans
8805464b1d docs(worker): comment purpose of UI refresh task
The purpose of the manual UI refresh task isn't immediately clear. It
was explained in the commit message of the commit that introduced it.
2024-02-01 14:47:55 +01:00
Thomas Frans
7940365344 refactor(library): various Rust style optimizations
Lots of small fixes to the APIs and functions in the `library` module,
mostly following best practices outlined in the Rust library guidelines.
Changes outside the `library` module were mostly required changes after
changing function signatures.
2024-01-29 21:58:01 +01:00
dependabot[bot]
97f10a9493 chore(deps): bump the cargo group with 6 updates
Bumps the cargo group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [chrono](https://github.com/chronotope/chrono) | `0.4.31` | `0.4.33` |
| [serde](https://github.com/serde-rs/serde) | `1.0.195` | `1.0.196` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.111` | `1.0.113` |
| [strum](https://github.com/Peternator7/strum) | `0.25.0` | `0.26.1` |
| [strum_macros](https://github.com/Peternator7/strum) | `0.25.3` | `0.26.1` |
| [clap_complete](https://github.com/clap-rs/clap) | `4.4.8` | `4.4.9` |


Updates `chrono` from 0.4.31 to 0.4.33
- [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.31...v0.4.33)

Updates `serde` from 1.0.195 to 1.0.196
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.195...v1.0.196)

Updates `serde_json` from 1.0.111 to 1.0.113
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.111...v1.0.113)

Updates `strum` from 0.25.0 to 0.26.1
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits)

Updates `strum_macros` from 0.25.3 to 0.26.1
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits)

Updates `clap_complete` from 4.4.8 to 4.4.9
- [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.4.8...clap_complete-v4.4.9)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: strum
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: strum_macros
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: clap_complete
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-29 08:33:43 +01:00
dependabot[bot]
71012acf68 chore(deps): bump shlex from 1.2.0 to 1.3.0
Bumps [shlex](https://github.com/comex/rust-shlex) from 1.2.0 to 1.3.0.
- [Changelog](https://github.com/comex/rust-shlex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/comex/rust-shlex/commits)

---
updated-dependencies:
- dependency-name: shlex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-23 09:15:32 +01:00
dependabot[bot]
3544e0b19e chore(deps): bump h2 from 0.3.22 to 0.3.24
Bumps [h2](https://github.com/hyperium/h2) from 0.3.22 to 0.3.24.
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/v0.3.24/CHANGELOG.md)
- [Commits](https://github.com/hyperium/h2/compare/v0.3.22...v0.3.24)

---
updated-dependencies:
- dependency-name: h2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-22 09:31:29 +01:00
dependabot[bot]
306eed4f13 chore(deps): bump the github-actions group with 1 update
Bumps the github-actions group with 1 update: [actions/cache](https://github.com/actions/cache).


Updates `actions/cache` from 3 to 4
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-22 09:23:24 +01:00
dependabot[bot]
1f72bc0ddb chore(deps): bump the cargo group with 5 updates
Bumps the cargo group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.4.13` | `4.4.18` |
| [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam) | `0.5.10` | `0.5.11` |
| [regex](https://github.com/rust-lang/regex) | `1.10.2` | `1.10.3` |
| [clap_mangen](https://github.com/clap-rs/clap) | `0.2.16` | `0.2.17` |
| [clap_complete](https://github.com/clap-rs/clap) | `4.4.6` | `4.4.8` |


Updates `clap` from 4.4.13 to 4.4.18
- [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/v4.4.13...v4.4.18)

Updates `crossbeam-channel` from 0.5.10 to 0.5.11
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-channel-0.5.10...crossbeam-channel-0.5.11)

Updates `regex` from 1.10.2 to 1.10.3
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.10.2...1.10.3)

Updates `clap_mangen` from 0.2.16 to 0.2.17
- [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_mangen-v0.2.16...clap_mangen-v0.2.17)

Updates `clap_complete` from 4.4.6 to 4.4.8
- [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.4.6...clap_complete-v4.4.8)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: crossbeam-channel
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: clap_mangen
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: clap_complete
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-22 09:23:08 +01:00
Thomas Frans
2a4178e069 style: share linting options across packages
Move the Rust and Clippy linting options into the Cargo manifest and
share them with all the packages in the workspace. This ensures a
consistent style in all packages.
2024-01-09 09:22:06 +01:00
dependabot[bot]
dee424d141 chore(deps): bump the cargo group with 5 updates
Bumps the cargo group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.4.12` | `4.4.13` |
| [libc](https://github.com/rust-lang/libc) | `0.2.151` | `0.2.152` |
| [serde](https://github.com/serde-rs/serde) | `1.0.193` | `1.0.195` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.109` | `1.0.111` |
| [clap_complete](https://github.com/clap-rs/clap) | `4.4.5` | `4.4.6` |


Updates `clap` from 4.4.12 to 4.4.13
- [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/v4.4.12...v4.4.13)

Updates `libc` from 0.2.151 to 0.2.152
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.151...0.2.152)

Updates `serde` from 1.0.193 to 1.0.195
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.193...v1.0.195)

Updates `serde_json` from 1.0.109 to 1.0.111
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.109...v1.0.111)

Updates `clap_complete` from 4.4.5 to 4.4.6
- [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.4.5...clap_complete-v4.4.6)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: clap_complete
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-08 09:58:59 +01:00
dependabot[bot]
73dea167e0 chore(deps): bump the github-actions group with 1 update
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout).


Updates `actions/checkout` from 3 to 4
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-08 09:58:50 +01:00
Thomas Frans
2056e56ef5 chore(actions): remove unsupported pr-branch input
The latest version of the Rust toolchain update action supports a
`pr-branch` input. It's not yet supported on `v1.1`.
2024-01-08 09:58:36 +01:00
github-actions[bot]
cef08e6e01 [create-pull-request] automated change 2024-01-06 12:08:06 +01:00
Thomas Frans
2b2d5745c3 chore: keep track of used toolchain version (#1319)
* chore: keep track of used toolchain version

Keeping the used toolchain version in version control makes sure that
when building older versions, the same toolchain is used every time. For
example, when `ncspot 0.12.0` has always been compiled with Rust version
`1.67.0` but the currently installed version is `1.73.0`, this file
would cause Rustup to download the older version again.

* feat: add rust-toolchain.toml update workflow
2024-01-06 12:04:31 +01:00
Thomas Frans
cb96f46e51 chore: remove unnecessary asynchronous channel
* chore: remove unnecessary asynchronous channel

The channel does not need to be asynchronous as the receiving end is
used in a blocking manner and the sending end of a regular channel never
blocks.

* Fix broken merge

---------

Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
2024-01-06 12:00:05 +01:00
Thomas Frans
4eff37a3ed style: deny clippy::multiple_inherent_impls lint 2024-01-06 11:37:50 +01:00
Thomas Frans
0eee40e877 fix: crash on Termux due to missing runtime directory
Instead of crashing on Termux, no IPC socket is created. This is a
temporary solution until a suitable runtime directory for the Termux
platform can be found.
2024-01-06 11:35:38 +01:00
dependabot[bot]
2a44323d59 chore(deps): bump the cargo group with 8 updates (#1359)
* chore(deps): bump the cargo group with 8 updates

Bumps the cargo group with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.4.11` | `4.4.12` |
| [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam) | `0.5.9` | `0.5.10` |
| [futures](https://github.com/rust-lang/futures-rs) | `0.3.29` | `0.3.30` |
| [reqwest](https://github.com/seanmonstar/reqwest) | `0.11.22` | `0.11.23` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.108` | `1.0.109` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.35.0` | `1.35.1` |
| [clap_mangen](https://github.com/clap-rs/clap) | `0.2.15` | `0.2.16` |
| [clap_complete](https://github.com/clap-rs/clap) | `4.4.4` | `4.4.5` |


Updates `clap` from 4.4.11 to 4.4.12
- [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/v4.4.11...v4.4.12)

Updates `crossbeam-channel` from 0.5.9 to 0.5.10
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-channel-0.5.9...crossbeam-channel-0.5.10)

Updates `futures` from 0.3.29 to 0.3.30
- [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.29...0.3.30)

Updates `reqwest` from 0.11.22 to 0.11.23
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.22...v0.11.23)

Updates `serde_json` from 1.0.108 to 1.0.109
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.108...v1.0.109)

Updates `tokio` from 1.35.0 to 1.35.1
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.35.0...tokio-1.35.1)

Updates `clap_mangen` from 0.2.15 to 0.2.16
- [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_mangen-v0.2.15...clap_mangen-v0.2.16)

Updates `clap_complete` from 4.4.4 to 4.4.5
- [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.4.4...clap_complete-v4.4.5)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: crossbeam-channel
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: futures
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: clap_mangen
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: clap_complete
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>

* Use `.first()` instead of `.get(0)`

* Update dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
2024-01-01 14:56:39 +00:00
Henrik Friedrichsen
92e0852b37 Set version and release date in CHANGELOG 2023-12-16 22:53:07 +01:00
Henrik Friedrichsen
9e064f9d87 Bump version to 1.0.0 2023-12-16 22:50:34 +01:00
Henrik Friedrichsen
ea36d2d42a Add Git commit hash to version string
Fixes #1348
2023-12-16 18:34:43 +01:00
Henrik Friedrichsen
87f05e430d Dependency updates 2023-12-16 18:21:20 +01:00
dependabot[bot]
faf9a2ca87 chore(deps): bump zerocopy from 0.6.5 to 0.6.6
Bumps [zerocopy](https://github.com/google/zerocopy) from 0.6.5 to 0.6.6.
- [Release notes](https://github.com/google/zerocopy/releases)
- [Changelog](https://github.com/google/zerocopy/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google/zerocopy/commits)

---
updated-dependencies:
- dependency-name: zerocopy
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-16 14:54:49 +01:00
Henrik Friedrichsen
57be87487c Dependency updates 2023-12-09 17:54:57 +01:00
eulerfan271
a826115907 fix(mpris): can_go_previous should always be true (#1346)
* make can_go_previous always true

* can_go_previous whenever queue is non-empty

* docs: Update CHANGELOG

---------

Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
2023-12-09 11:51:17 +01:00
Thomas Frans
0a1a9bdd4d refactor: tabs rewrite to clean up API
Tabs relied heavily on `ViewExt`'s `title()` function, while also
requiring a separate `id`. The `id`, if used, should be an internal part
of the struct and not part of its API. This also removes the hashmap as
it will never be faster than sequentially looking up all the names,
since there will most likely never be that many tabs in a `TabbedView`.
2023-12-03 12:02:13 +01:00
Henrik Friedrichsen
b37fb7cc10 cargo update 2023-12-03 11:47:07 +01:00
dependabot[bot]
3dd2af5996 chore(deps): bump openssl from 0.10.57 to 0.10.60
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.57 to 0.10.60.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.57...openssl-v0.10.60)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-03 11:45:47 +01:00
dependabot[bot]
14abdf8ba0 chore(deps): bump the cargo group with 2 updates
Bumps the cargo group with 2 updates: [serde](https://github.com/serde-rs/serde) and [url](https://github.com/servo/rust-url).


Updates `serde` from 1.0.192 to 1.0.193
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.192...v1.0.193)

Updates `url` from 2.4.1 to 2.5.0
- [Release notes](https://github.com/servo/rust-url/releases)
- [Commits](https://github.com/servo/rust-url/compare/v2.4.1...v2.5.0)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: url
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-03 11:45:37 +01:00
Thomas Frans
7a9c8f3a5e fix: allow any value to set MPRIS volume
This fixes a small inconsistency between the MPRIS implementation and
the specification. The specification allows any number when setting the
volume, which have to be clamped to the effectively allowed range in the
application.
https://specifications.freedesktop.org/mpris-spec/2.2/Player_Interface.html#Property:Volume
2023-12-01 16:17:00 +01:00
Thomas Frans
e0373890fe feat: improve configuration file error handling
Cleans up the error messages generated when errors are encountered in
the configuration file. Instead of showing the raw error message, give
clear information about the problem.
2023-11-29 09:44:59 +01:00
Thomas Frans
0cee99ba4c feat: add info command line subcommand (#1330)
* feat: add `info` command line subcommand

Adding an info command allows the documentation to refer to it when
mentioning platform specific information. This gives users a nicer
experience since they don't need to think about how `ncspot` will behave
on their system, but can run `ncspot info` to get that information.

* fix: info command don't create runtime directory

* fix: don't print runtime path on Windows

Windows doesn't use the runtime path so it shouldn't be printed there.

* fix: make `info` command easier to parse

* docs: add back the default configuration directory
2023-11-27 08:43:55 +01:00
dependabot[bot]
0c9be11357 chore(deps): bump the cargo group with 1 update
Bumps the cargo group with 1 update: [notify-rust](https://github.com/hoodie/notify-rust).

- [Release notes](https://github.com/hoodie/notify-rust/releases)
- [Changelog](https://github.com/hoodie/notify-rust/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hoodie/notify-rust/compare/v4.9.0...v4.10.0)

---
updated-dependencies:
- dependency-name: notify-rust
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-24 21:20:32 +01:00
Thomas Frans
caf937d858 fix: add leading slash to gitignore paths
The leading slash forces Git to only look for the mentioned files from
the root of the directory, not inside allowed subdirectories.
2023-11-24 19:10:28 +01:00
dependabot[bot]
9c29f17ca1 chore(deps): bump the cargo group with 5 updates
Bumps the cargo group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.4.7` | `4.4.8` |
| [libc](https://github.com/rust-lang/libc) | `0.2.149` | `0.2.150` |
| [serde](https://github.com/serde-rs/serde) | `1.0.190` | `1.0.192` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.107` | `1.0.108` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.33.0` | `1.34.0` |


Updates `clap` from 4.4.7 to 4.4.8
- [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/v4.4.7...v4.4.8)

Updates `libc` from 0.2.149 to 0.2.150
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.149...0.2.150)

Updates `serde` from 1.0.190 to 1.0.192
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.190...v1.0.192)

Updates `serde_json` from 1.0.107 to 1.0.108
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.107...v1.0.108)

Updates `tokio` from 1.33.0 to 1.34.0
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.33.0...tokio-1.34.0)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-19 11:38:08 +01:00
Thomas Frans
cd73c24150 docs: formatting fixes 2023-11-19 11:37:55 +01:00
Thomas Frans
fcf68995cb fix!: create IPC socket in user runtime directory (#1313)
Each user has their own runtime directory at `/run/user/<uid>`. Creating
the IPC socket in there makes sure it is cleaned up regardless of
whether `ncspot` exits normally.

BREAKING CHANGE: move IPC socket location
2023-10-28 18:43:33 +02:00
Thomas Frans
2c14883f48 docs: add changelog (#1318)
* docs: add changelog

* Add PR template

* docs: tweak PR template changelog info

* docs: extend the changelog and update it

The changelog was missing some of the unreleased changes. Some more
information was also added from previous versions.

---------

Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
2023-10-28 17:15:58 +02:00
dependabot[bot]
c61f0c6508 chore(deps): bump rustix from 0.37.24 to 0.37.26
Bumps [rustix](https://github.com/bytecodealliance/rustix) from 0.37.24 to 0.37.26.
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.37.24...v0.37.26)

---
updated-dependencies:
- dependency-name: rustix
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-26 18:21:41 +02:00
dependabot[bot]
e0d1d267b3 chore(deps): bump the cargo group with 13 updates
Bumps the cargo group with 13 updates:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.4.6` | `4.4.7` |
| [futures](https://github.com/rust-lang/futures-rs) | `0.3.28` | `0.3.29` |
| [libc](https://github.com/rust-lang/libc) | `0.2.148` | `0.2.149` |
| [regex](https://github.com/rust-lang/regex) | `1.9.6` | `1.10.2` |
| [reqwest](https://github.com/seanmonstar/reqwest) | `0.11.20` | `0.11.22` |
| [serde](https://github.com/serde-rs/serde) | `1.0.188` | `1.0.190` |
| [strum_macros](https://github.com/Peternator7/strum) | `0.25.2` | `0.25.3` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.32.0` | `1.33.0` |
| [tokio-util](https://github.com/tokio-rs/tokio) | `0.7.9` | `0.7.10` |
| [toml](https://github.com/toml-rs/toml) | `0.8.1` | `0.8.2` |
| [wl-clipboard-rs](https://github.com/YaLTeR/wl-clipboard-rs) | `0.7.0` | `0.8.0` |
| [clap_mangen](https://github.com/clap-rs/clap) | `0.2.14` | `0.2.15` |
| [clap_complete](https://github.com/clap-rs/clap) | `4.4.3` | `4.4.4` |


Updates `clap` from 4.4.6 to 4.4.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/v4.4.6...v4.4.7)

Updates `futures` from 0.3.28 to 0.3.29
- [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.28...0.3.29)

Updates `libc` from 0.2.148 to 0.2.149
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.148...0.2.149)

Updates `regex` from 1.9.6 to 1.10.2
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.9.6...1.10.2)

Updates `reqwest` from 0.11.20 to 0.11.22
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.20...v0.11.22)

Updates `serde` from 1.0.188 to 1.0.190
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.188...v1.0.190)

Updates `strum_macros` from 0.25.2 to 0.25.3
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits)

Updates `tokio` from 1.32.0 to 1.33.0
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.32.0...tokio-1.33.0)

Updates `tokio-util` from 0.7.9 to 0.7.10
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/commits)

Updates `toml` from 0.8.1 to 0.8.2
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.1...toml-v0.8.2)

Updates `wl-clipboard-rs` from 0.7.0 to 0.8.0
- [Changelog](https://github.com/YaLTeR/wl-clipboard-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/YaLTeR/wl-clipboard-rs/compare/v0.7.0...v0.8.0)

Updates `clap_mangen` from 0.2.14 to 0.2.15
- [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_mangen-v0.2.14...clap_mangen-v0.2.15)

Updates `clap_complete` from 4.4.3 to 4.4.4
- [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.4.3...clap_complete-v4.4.4)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: futures
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: strum_macros
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: tokio-util
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: toml
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: wl-clipboard-rs
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: clap_mangen
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: clap_complete
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-26 18:21:01 +02:00
dependabot[bot]
08c2b8c301 chore(deps): bump the github-actions group with 1 update
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout).

- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-26 18:09:59 +02:00
Henrik Friedrichsen
c4e31210a8 chore: Group Dependabot updates
Also, add GitHub Actions to Dependabot.
2023-10-26 18:06:05 +02:00
Henrik Friedrichsen
6ee00e39d3 Change color of unavailable song
If song is not available/playable, use secondary text color.

Fixes #1300
2023-10-14 22:36:22 +02:00
Henrik Friedrichsen
a1a986344f Revert "feat: move to async POSIX signal handler"
This reverts commit a067ab2ae2.
2023-10-14 12:44:47 +02:00
Thomas Frans
8d00ca74fc fix: MPRIS loop tokio::select!() panic on exit
This fixes a bug that would cause a panic when quiting the process
normally. `tokio::select!()` was used to await a single branch, which is
useless as it can be replaced by a normal await.
2023-10-14 12:42:24 +02:00
Thomas Frans
51d1b34ccc fix: prevent IPC socket cleanup panic
Prevent a panic when the IPC socket isn't available when the user quits
`ncspot`.
2023-10-14 12:15:38 +02:00
Thomas Frans
a69e2d763b fix: disable cursive_buffered_backend tracing
Disable the useless trace logs from the `cursive_buffered_backend`
crate.
2023-10-12 11:14:51 +02:00
Thomas Frans
a067ab2ae2 feat: move to async POSIX signal handler
Instead of trying to handle signals for every step of the `cursive`
event loop, move the signal handling into its own asynchronous task and
send callbacks to `cursive` when a signal arrives.
2023-10-08 10:47:43 +02:00