Commit Graph

1192 Commits

Author SHA1 Message Date
Henrik Friedrichsen
96bf348da2 chore: Update all dependencies 2024-05-10 15:39:15 +02:00
Henrik Friedrichsen
5358d2faf5 fix: MPRIS not working on GNOME
Would show unknown artist/title before. Fixed upstream via zbus upgrade to 4.2.1.

Fixes #1449

See also:
- dbus2/zbus#765
2024-05-10 15:39:15 +02:00
Henrik Friedrichsen
47403f0d13 chore(toolchain): update (#1452)
* [create-pull-request] automated change

* chore: fix clippy warnings

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-10 15:38:53 +02:00
Twan Stok
2db47e3d39 fix: cfg fix for Linux
changed cfg!(linux) to cfg!(target_os = "linux")
2024-05-07 19:55:22 +02:00
dependabot[bot]
73c75448c4 chore(deps): bump the cargo group with 5 updates
Bumps the cargo group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [zbus](https://github.com/dbus2/zbus) | `4.1.2` | `4.2.0` |
| [libc](https://github.com/rust-lang/libc) | `0.2.153` | `0.2.154` |
| [serde](https://github.com/serde-rs/serde) | `1.0.199` | `1.0.200` |
| [tokio-util](https://github.com/tokio-rs/tokio) | `0.7.10` | `0.7.11` |
| [notify-rust](https://github.com/hoodie/notify-rust) | `4.11.0` | `4.10.0` |


Updates `zbus` from 4.1.2 to 4.2.0
- [Release notes](https://github.com/dbus2/zbus/releases)
- [Commits](https://github.com/dbus2/zbus/compare/zbus-4.1.2...zbus-4.2.0)

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

Updates `serde` from 1.0.199 to 1.0.200
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.199...v1.0.200)

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

Updates `notify-rust` from 4.11.0 to 4.10.0
- [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.11.0...v4.10.0)

---
updated-dependencies:
- dependency-name: zbus
  dependency-type: direct:production
  update-type: version-update:semver-minor
  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: tokio-util
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- 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>
2024-05-06 09:47:44 +02:00
dependabot[bot]
1fc1f80a5c chore(deps): bump the cargo group with 3 updates
Bumps the cargo group with 3 updates: [arboard](https://github.com/1Password/arboard), [serde](https://github.com/serde-rs/serde) and [unicode-width](https://github.com/unicode-rs/unicode-width).


Updates `arboard` from 3.3.2 to 3.4.0
- [Release notes](https://github.com/1Password/arboard/releases)
- [Changelog](https://github.com/1Password/arboard/blob/master/CHANGELOG.md)
- [Commits](https://github.com/1Password/arboard/compare/v3.3.2...v3.4.0)

Updates `serde` from 1.0.198 to 1.0.199
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.198...v1.0.199)

Updates `unicode-width` from 0.1.11 to 0.1.12
- [Commits](https://github.com/unicode-rs/unicode-width/compare/v0.1.11...v0.1.12)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 15:37:22 +02:00
dependabot[bot]
43f2fa8767 chore(deps): bump the cargo group with 4 updates
Bumps the cargo group with 4 updates: [chrono](https://github.com/chronotope/chrono), [reqwest](https://github.com/seanmonstar/reqwest), [serde](https://github.com/serde-rs/serde) and [serde_json](https://github.com/serde-rs/json).


Updates `chrono` from 0.4.37 to 0.4.38
- [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.37...v0.4.38)

Updates `reqwest` from 0.12.3 to 0.12.4
- [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.12.3...v0.12.4)

Updates `serde` from 1.0.197 to 1.0.198
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.197...v1.0.198)

Updates `serde_json` from 1.0.115 to 1.0.116
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.115...v1.0.116)

---
updated-dependencies:
- dependency-name: chrono
  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
  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
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-23 21:04:20 +02:00
Henrik Friedrichsen
f98239f1f9 chore: Add rust-analyzer to used components 2024-04-21 16:54:39 +02:00
dependabot[bot]
d1ea7b069e chore(deps): bump clap_complete from 4.5.1 to 4.5.2 in the cargo group
Bumps the cargo group with 1 update: [clap_complete](https://github.com/clap-rs/clap).


Updates `clap_complete` from 4.5.1 to 4.5.2
- [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.5.1...clap_complete-v4.5.2)

---
updated-dependencies:
- 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-04-15 14:33:44 +02:00
cyqsimon
7f882ccaee style: warn enum_glob_use 2024-04-14 13:36:50 +02:00
Henrik Friedrichsen
ed98d0f843 chore(toolchain): update (#1441)
[create-pull-request] automated change

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-10 22:13:47 +02:00
dependabot[bot]
3209b09808 chore(deps): bump the cargo group with 2 updates
Bumps the cargo group with 2 updates: [reqwest](https://github.com/seanmonstar/reqwest) and [notify-rust](https://github.com/hoodie/notify-rust).


Updates `reqwest` from 0.12.2 to 0.12.3
- [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.12.2...v0.12.3)

Updates `notify-rust` from 4.10.0 to 4.11.0
- [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.10.0...v4.11.0)

---
updated-dependencies:
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- 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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 10:21:24 +02:00
dependabot[bot]
a6ed8b8443 chore(deps): bump h2 from 0.4.3 to 0.4.4
Bumps [h2](https://github.com/hyperium/h2) from 0.4.3 to 0.4.4.
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/h2/compare/v0.4.3...v0.4.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-08 09:58:41 +02:00
Thomas Frans
fe009d0486 docs: improve and simplify changelog
Remove implementation details from the changelog as they are provided by
the link in the version title for each release. Also rephrase some
changes to make them more clear.

Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
2024-04-08 07:52:52 +00:00
Thomas Frans
5cb25fbf56 docs: add Snapcraft installation source
The Snapcraft installation method was removed in the past as the package
disappeared from Snapcraft. It seems to be back and maintained, so it
should be back in the documentation.
2024-04-04 21:57:41 +02:00
Thomas Frans
e976509dae chore: remove todo and improve some code in src/library.rs 2024-04-04 21:56:46 +02:00
Jakub Jirutka
ce300fb720 fix: Use native TLS only
* chore(deps): bump rspotify to 0.13.1

* Use native TLS only, don't mix it with rustls

reqwest uses native TLS, but rspotify with ureq currently uses rustls,
i.e. ncspot bundles rustls and is linked with system TLS library at the
same time.

This has already been fixed in 80da5a877a,
but this commit has been reverted in
aeff120e67 due to a bug in rspotify that
was fixed in 0.13.1 (https://github.com/ramsayleung/rspotify/pull/471).
2024-04-04 15:16:27 +02:00
Henrik Friedrichsen
427e9fe57d chore(toolchain): update (#1432)
[create-pull-request] automated change

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-04 15:14:32 +02:00
dependabot[bot]
503894354d chore(deps): bump the cargo group with 5 updates
Bumps the cargo group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [chrono](https://github.com/chronotope/chrono) | `0.4.35` | `0.4.37` |
| [clap](https://github.com/clap-rs/clap) | `4.5.3` | `4.5.4` |
| [reqwest](https://github.com/seanmonstar/reqwest) | `0.12.1` | `0.12.2` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.114` | `1.0.115` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.36.0` | `1.37.0` |


Updates `chrono` from 0.4.35 to 0.4.37
- [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.35...v0.4.37)

Updates `clap` from 4.5.3 to 4.5.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/v4.5.3...v4.5.4)

Updates `reqwest` from 0.12.1 to 0.12.2
- [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.12.1...v0.12.2)

Updates `serde_json` from 1.0.114 to 1.0.115
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.114...v1.0.115)

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

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: clap
  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-minor
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-01 16:56:11 +02:00
Henrik Friedrichsen
7f6182dd62 chore(toolchain): update (#1426)
[create-pull-request] automated change

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-30 19:03:44 +01:00
gilcu3
9624c03264 feat(config): Allow users to set AP port (#1420)
* added support for ap-port conf

* chore: Reindent table

* feat: Only set `ap_port` in session config if supplied by user

* docs: Update CHANGELOG

---------

Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
2024-03-30 19:03:29 +01:00
dependabot[bot]
ba89e50e10 chore(deps): bump the cargo group with 3 updates
Bumps the cargo group with 3 updates: [regex](https://github.com/rust-lang/regex), [reqwest](https://github.com/seanmonstar/reqwest) and [toml](https://github.com/toml-rs/toml).


Updates `regex` from 1.10.3 to 1.10.4
- [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.3...1.10.4)

Updates `reqwest` from 0.11.26 to 0.12.1
- [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.26...v0.12.1)

Updates `toml` from 0.8.11 to 0.8.12
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.11...toml-v0.8.12)

---
updated-dependencies:
- dependency-name: regex
  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-minor
  dependency-group: cargo
- dependency-name: toml
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-25 13:32:50 +01:00
dependabot[bot]
92fcc5dd38 chore(deps): bump the cargo group with 6 updates
Bumps the cargo group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.5.1` | `4.5.3` |
| [reqwest](https://github.com/seanmonstar/reqwest) | `0.11.24` | `0.11.26` |
| [strum](https://github.com/Peternator7/strum) | `0.26.1` | `0.26.2` |
| [strum_macros](https://github.com/Peternator7/strum) | `0.26.1` | `0.26.2` |
| [tokio-stream](https://github.com/tokio-rs/tokio) | `0.1.14` | `0.1.15` |
| [toml](https://github.com/toml-rs/toml) | `0.8.10` | `0.8.11` |


Updates `clap` from 4.5.1 to 4.5.3
- [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.5.1...v4.5.3)

Updates `reqwest` from 0.11.24 to 0.11.26
- [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.24...v0.11.26)

Updates `strum` from 0.26.1 to 0.26.2
- [Release notes](https://github.com/Peternator7/strum/releases)
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/compare/v0.26.1...v0.26.2)

Updates `strum_macros` from 0.26.1 to 0.26.2
- [Release notes](https://github.com/Peternator7/strum/releases)
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/compare/v0.26.1...v0.26.2)

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

Updates `toml` from 0.8.10 to 0.8.11
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.10...toml-v0.8.11)

---
updated-dependencies:
- dependency-name: clap
  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: strum
  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-stream
  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
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-18 09:27:17 +01:00
darkylein
2a0f36f838 docs: Add quotes around repeat values 2024-03-15 17:33:02 +01:00
dependabot[bot]
dc90772bfe chore(deps): bump the github-actions group with 1 update
Bumps the github-actions group with 1 update: [softprops/action-gh-release](https://github.com/softprops/action-gh-release).


Updates `softprops/action-gh-release` from 1 to 2
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v1...v2)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-11 17:48:40 +01:00
cyqsimon
228160608e chore(deps): Bump rspotify to 0.13.0
* Bump rspotify to 0.13.0

Fixes #1384

* Write changelog

* chore: Migrate away from deprecated constructor

---------

Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
2024-03-09 22:33:54 +01:00
Henrik Friedrichsen
6aa1cd9817 chore: Bump version to 1.1.0 2024-03-05 13:06:15 +01:00
Henrik Friedrichsen
b7103a3552 chore: cargo update 2024-03-05 13:06:15 +01:00
Henrik Friedrichsen
0f1a9ab579 ci: Run tests in CI
* ci: Run tests in CI

Thanks to contributors test coverage is becoming a thing, thus it makes sense to
run tests in CI workflows.

Additionally, switch back to `cargo build` instead of `cargo check`, as the
tests need compilation anyway.

* ci: Enable build for `macos-aarch64`

* fix: Streamline build target names

* fix: Set toolchain target correctly

* ci: Switch to `rustup` over 3rd party action
2024-03-05 11:48:35 +01:00
dependabot[bot]
beae6c3bec chore(deps): bump mio from 0.8.10 to 0.8.11
Bumps [mio](https://github.com/tokio-rs/mio) from 0.8.10 to 0.8.11.
- [Release notes](https://github.com/tokio-rs/mio/releases)
- [Changelog](https://github.com/tokio-rs/mio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/mio/compare/v0.8.10...v0.8.11)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-05 10:33:55 +01:00
Henrik Friedrichsen
159bfc4d9c feat(sharing): Switch to arboard crate 2024-03-04 14:12:10 +01:00
dependabot[bot]
e22b711d9c chore(deps): bump the cargo group with 2 updates
Bumps the cargo group with 2 updates: [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam) and [log](https://github.com/rust-lang/log).


Updates `crossbeam-channel` from 0.5.11 to 0.5.12
- [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.11...crossbeam-channel-0.5.12)

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

---
updated-dependencies:
- dependency-name: crossbeam-channel
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: log
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-04 08:45:27 +01:00
Konstantin Sobolev
9a26c58f8e fix: Don't panic when token update fails
* fix a panic when token update fails

sometimes we get an `Err` from `token_rx.recv()`, shouldn't panic in such cases

* chore(docs): Update Changelog

---------

Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
2024-03-02 17:58:49 +00:00
Thomas Frans
b70df761f7 chore: update changelog 2024-03-01 15:32:11 +01:00
dependabot[bot]
c0b78d3a2a chore(deps): bump the cargo group with 1 update
Bumps the cargo group with 1 update: [zbus](https://github.com/dbus2/zbus).


Updates `zbus` from 4.1.1 to 4.1.2
- [Release notes](https://github.com/dbus2/zbus/releases)
- [Commits](https://github.com/dbus2/zbus/compare/zbus-4.1.1...zbus-4.1.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-26 22:55:06 +01:00
dependabot[bot]
0007bf6de2 chore(deps): bump the cargo group with 3 updates
* chore(deps): bump the cargo group with 3 updates

Bumps the cargo group with 3 updates: [clap](https://github.com/clap-rs/clap), [zbus](https://github.com/dbus2/zbus) and [clap_complete](https://github.com/clap-rs/clap).


Updates `clap` from 4.5.0 to 4.5.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.5.0...clap_complete-v4.5.1)

Updates `zbus` from 3.15.0 to 4.0.1
- [Release notes](https://github.com/dbus2/zbus/releases)
- [Commits](https://github.com/dbus2/zbus/compare/zbus-3.15.0...zbus-4.0.1)

Updates `clap_complete` from 4.5.0 to 4.5.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.5.0...clap_complete-v4.5.1)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: zbus
  dependency-type: direct:production
  update-type: version-update:semver-major
  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>

* chore: `cargo update`

* chore: migrate to zbus v4 macros

---------

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-02-23 22:39:00 +00:00
Thomas Frans
5b4a17597d fix(mpris): missing PropertyChanged signal for volume
fix(mpris): missing PropertyChanged signal for volume

Send a `PropertyChanged` signal for the MPRIS volume when the volume
changes inside `ncspot`.
2024-02-19 22:46:00 +01:00
Konstantin Sobolev
5e916fd7ec fix: Don't panic if token is still valid
1. `None` from `update_token` should only mean "no update needed", should not be used for errors. We now panic when worker channel is not set
2. Callers should correctly handle `None` result
2024-02-19 22:07:34 +01:00
Vladimir Budylnikov
d4db350000 docs: Add winget installation info
add winget info
2024-02-18 11:31:39 +01:00
Konstantin Sobolev
5c71e2f4bf Fix: update token in blocking task
* attempt to fix https://github.com/hrkfdn/ncspot/issues/1358

mpris runs inside `tokio::runtime.spawn`. At some point it hits `metadata_changed->WebApi::track->api_with_retry`, which gets 401 response and tries to update the token.

This goes into `update_token`, which at a certain point calls *blocking* `token_rx.recv()`. Tokio runtime is not happy about that, as it uses the same thread for the `run_loop` in the worker. That's why `tokio::select!` doesn't work, we're essentially deadlocking, so the worker never pick up `RequestToken` command and `update_token` block forever.

Here I'm changing `update_token` to wrap `recv` in `spawn_blocking`, which makes `update_token` return a `JoinHandle`, on which the caller has to await. This doesn't work nicely in case of mpris though, as it is not an async function, and I don't know how to make it async as it goes through the dbus `metadata_changed` interface. My best effort here is to do `and_then`, which seems to work, but I'm not confident that's the right approach.

* fmt

* move token_rx.recv inside spawn_blocking
2024-02-17 12:59:23 +01:00
github-actions[bot]
7dec5a2767 [create-pull-request] automated change 2024-02-17 11:31:38 +01:00
dependabot[bot]
e63c4f404e chore(deps): bump the cargo group with 5 updates
Bumps the cargo group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [chrono](https://github.com/chronotope/chrono) | `0.4.33` | `0.4.34` |
| [clap](https://github.com/clap-rs/clap) | `4.4.18` | `4.5.0` |
| [toml](https://github.com/toml-rs/toml) | `0.8.9` | `0.8.10` |
| [clap_mangen](https://github.com/clap-rs/clap) | `0.2.19` | `0.2.20` |
| [clap_complete](https://github.com/clap-rs/clap) | `4.4.10` | `4.5.0` |


Updates `chrono` from 0.4.33 to 0.4.34
- [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.33...v0.4.34)

Updates `clap` from 4.4.18 to 4.5.0
- [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.18...clap_complete-v4.5.0)

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

Updates `clap_mangen` from 0.2.19 to 0.2.20
- [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.19...clap_mangen-v0.2.20)

Updates `clap_complete` from 4.4.10 to 4.5.0
- [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.10...clap_complete-v4.5.0)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: clap
  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-minor
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-12 22:44:32 +01:00
Thomas Frans
38010b4c76 fix: gracefully exit when misconfigured or unavailable audio backend
When the user has an error in their audio backend configuration or
doesn't have audio backends available, gracefully exit instead of
panicking.
2024-02-06 20:39:29 +01:00
dependabot[bot]
15515c27b5 chore(deps): bump the cargo group with 1 update
Bumps the cargo group with 1 update: [zbus](https://github.com/dbus2/zbus).


Updates `zbus` from 3.14.1 to 3.15.0
- [Release notes](https://github.com/dbus2/zbus/releases)
- [Commits](https://github.com/dbus2/zbus/compare/zbus-3.14.1...zbus-3.15.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-05 10:18:31 +01:00
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