Commit Graph

596 Commits

Author SHA1 Message Date
Henrik Friedrichsen
decf7c2aef Improve synchronization of playback times
Take librespot timestamps instead of approximating them in ncspot.
2021-04-11 15:17:10 +02:00
Henrik Friedrichsen
44da16dc0e Bump version to 0.6.0 2021-04-11 01:10:58 +02:00
Henrik Friedrichsen
50fcab4d7a Store user state in binary CBOR format
The state structure is growing a little too complex to store it as a TOML.
User state is now stored at `~/.config/ncspot/userstate.cbor`.
2021-04-11 00:47:49 +02:00
Henrik Friedrichsen
e61e18608b Move config (de)serialization to separate file 2021-04-11 00:46:25 +02:00
Christopher Hasse
8c68347c24 Allow creation of default userstate.toml file
Serializing an empty `Vec<Playable>` causes serde to panic as described
in #485 This commit tells serde not to serialize `queue` if it is an
empty `Vec`.
2021-04-10 14:59:37 +02:00
Henrik Friedrichsen
cea5228245 (Re)store currently playing track + shuffle state
Solves #448
2021-04-09 19:10:34 +02:00
Henrik Friedrichsen
d0db141c2d Dependency updates 2021-04-08 22:43:49 +02:00
Henrik Friedrichsen
ba7b498866 Update screenshots
UI has changed a bit in the past two years
2021-04-08 22:38:57 +02:00
Henrik Friedrichsen
32cb6e70d3 Show tracks + duration of album, playlist, queue
Stats are in the top right

Fixes #475
2021-04-08 22:26:19 +02:00
Henrik Friedrichsen
577e7ebd87 Unify pagination setup for ApiResult values
Also:
- Fix duplicate results
- Rename `album.load_tracks` to `album.load_all_tracks`
2021-04-08 17:46:50 +02:00
Henrik Friedrichsen
0f8e4d0558 Use new pagination interface for podcast episodes 2021-04-08 16:49:19 +02:00
Henrik Friedrichsen
53db188153 Use new pagination interface for playlist tracks 2021-04-06 17:45:14 +02:00
Henrik Friedrichsen
67aa5b2bad Use new pagination interface for user playlists 2021-04-06 16:20:38 +02:00
Henrik Friedrichsen
02921752e1 Use new pagination interface for artist albums
Brings along some other changes:
- Split artist albums/singles into separate panel
- Paginate artist albums/singles
- Play top tracks by artist instead of all tracks by artist

Fixes #477
2021-04-06 15:02:19 +02:00
Henrik Friedrichsen
c48771770c Implement new pagination abstraction
This moves the pagination logic to Spotify API results instead of having
to reimplement it on the consumer end.
2021-04-06 14:55:01 +02:00
Henrik Friedrichsen
0f573f8247 Refactor: Make Spotify cloneable 2021-04-03 22:35:08 +02:00
Henrik Friedrichsen
8483653cde Refactor: extract Spotify Worker to separate file 2021-04-03 21:38:42 +02:00
dependabot-preview[bot]
8b5bc64dc6 Bump libc from 0.2.91 to 0.2.92
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.91 to 0.2.92.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.91...0.2.92)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-02 12:59:01 +02:00
Henrik Friedrichsen
e5b912038a dependency updates 2021-03-27 14:38:29 +01:00
Henrik Friedrichsen
0c71187d50 dependency updates 2021-03-22 22:38:59 +01:00
Henrik Friedrichsen
d2edfc3caf rename as_boxed_view_ext to into_boxed_view_ext 2021-03-22 22:36:33 +01:00
Henrik Friedrichsen
5295eb4b5a sort artist albums by year 2021-03-22 22:16:07 +01:00
Henrik Friedrichsen
a0231362f1 implement logout command
fixes #470
2021-03-22 21:56:50 +01:00
Henrik Friedrichsen
5f87e3cd79 show display name owning the current library
as suggested in #470
2021-03-22 21:56:50 +01:00
dependabot-preview[bot]
9e9476d94c Bump libc from 0.2.89 to 0.2.90
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.89 to 0.2.90.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.89...0.2.90)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-21 16:36:09 +01:00
dependabot-preview[bot]
6dadb2c49f Bump libc from 0.2.88 to 0.2.89
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.88 to 0.2.89.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.88...0.2.89)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-16 20:46:37 +01:00
André Andersson
65e9887f38 Refactor needs_download and rename library.items to better convey usage (#466)
* Refactor

* Rename items to playlists and update error message
2021-03-16 20:43:17 +01:00
dependabot-preview[bot]
fa6e951bff Bump regex from 1.4.4 to 1.4.5
Bumps [regex](https://github.com/rust-lang/regex) from 1.4.4 to 1.4.5.
- [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.4.4...1.4.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-16 20:41:38 +01:00
Qluxzz
46899ace8b Replace all .filter.map chains with .filter_map 2021-03-16 20:41:13 +01:00
dependabot-preview[bot]
c5e6c2c79a Bump regex from 1.4.3 to 1.4.4
Bumps [regex](https://github.com/rust-lang/regex) from 1.4.3 to 1.4.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.4.3...1.4.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-13 22:50:26 +01:00
Henrik Friedrichsen
37f5d2e15e bump version to 0.5.0 + cargo update 2021-03-07 02:02:59 +01:00
Henrik Friedrichsen
eb149683a0 Create issue templates 2021-03-06 00:14:03 +01:00
Henrik Friedrichsen
ff6788a2a9 Clear search term when ESC is pressed
fixes #384
2021-03-06 00:00:19 +01:00
Henrik Friedrichsen
d6db7a54d6 Remove plain-text credential store
librespot stores a more secure token that is valid for a while, rely on this
instead.

On the flip side this requires users to re-enter their login data when their
token has expired.

If the token validity is too short we will have to come up with another
approach, e.g. OS keyrings.

fixes #447
2021-03-05 23:47:12 +01:00
Henrik Friedrichsen
f2bcfcaa60 fix: more resilient playlist track deletion
Introduction of the sort command with #328 broke the deletion of playlist items,
because sorted track indices got out of sync with their actual index within the
playlist at the Spotify backend.

The new approach is not perfect, as it doesn't update the list index of items
after deletion, but by supplying the playlist snapshot id the backend is able to
apply the requested changes.

This should still be improved in the future, though.
2021-03-05 23:34:29 +01:00
Henrik Friedrichsen
466b4cd18e Refactor pagination code into separate file 2021-03-05 21:54:29 +01:00
Henrik Friedrichsen
ca8f1a8545 Persist sorting orders for playlists
Closes #436
2021-03-05 21:54:29 +01:00
Henrik Friedrichsen
b1c0ed6fae cargo update 2021-03-05 21:54:29 +01:00
Qluxzz
3d11b2c333 Fix spelling mistake 2021-03-05 21:54:15 +01:00
dependabot-preview[bot]
6e2b108284 Bump libc from 0.2.86 to 0.2.87
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.86 to 0.2.87.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.86...0.2.87)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-05 20:28:33 +01:00
dependabot-preview[bot]
ac761410f9 Bump serde_json from 1.0.62 to 1.0.64
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.62 to 1.0.64.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.62...v1.0.64)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-05 20:28:28 +01:00
dependabot-preview[bot]
2738e30285 Bump notify-rust from 4.2.2 to 4.3.0
Bumps [notify-rust](https://github.com/hoodie/notify-rust) from 4.2.2 to 4.3.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/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-05 20:28:05 +01:00
Henrik Friedrichsen
4834a7aa44 Use debug build for backtrace logs 2021-03-02 17:18:15 +01:00
Henrik Friedrichsen
0f1227b7c7 Mention stderr file logging 2021-03-02 17:16:03 +01:00
Henrik Friedrichsen
b436e40851 Fix display of PlayNext command
fixes #445
2021-02-27 13:23:30 +01:00
KoffeinFlummi
df87ff9bdd Implement cover drawing as optional feature 2021-02-27 13:14:49 +01:00
algon
dfb60ee4be Improve album loading in artist view (#446)
* Load all albums in artist view

* Fetch multiple albums at a time
2021-02-25 21:24:10 +01:00
Henrik Friedrichsen
db894d7ce8 Add config values to override shuffle/repeat state 2021-02-25 21:07:12 +01:00
dependabot-preview[bot]
9357437759 Bump futures from 0.3.12 to 0.3.13
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.12 to 0.3.13.
- [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.12...0.3.13)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-23 20:46:41 +01:00
Henrik Friedrichsen
92d1978340 Save track queue when closing and restore at start 2021-02-22 22:14:34 +01:00