Commit Graph

435 Commits

Author SHA1 Message Date
Henrik Friedrichsen
eb8d9ad294 Fix notify/cover platform config 2021-07-27 23:04:00 +02:00
Henrik Friedrichsen
d731fe7188 Make command_key configurable
Fixes #487
2021-07-27 01:35:21 +02:00
Henrik Friedrichsen
ad3383657d Fix: Show album art when playing 'similar tracks'
`SimplifiedTrack` objects don't contain a `cover_url`.
So fetch the whole track details in MPRIS handler to make sure the `cover_url`
is set.

Fixes #354
2021-07-26 21:37:53 +02:00
Henrik Friedrichsen
6bd83ce9c8 Don't panic if user quits login process
Fixes #479
2021-07-26 18:50:08 +02:00
Henrik Friedrichsen
2a82826e7a Add commandline flag for custom config filename
Related to #565
2021-07-22 17:17:57 +02:00
nc
2edc22f251 add album cover to notification 2021-07-16 10:27:37 +02:00
Henrik Friedrichsen
9eb99cc8be cargo clippy 2021-07-11 01:38:57 +02:00
Henrik Friedrichsen
46a8f01bac Fix: Handle commands in select artist modal
Fixes #560
2021-07-11 01:29:11 +02:00
Ronak Buch
952b7f4fe8 fixup! Bump reqwest form 0.9 to 0.11 2021-05-30 01:30:42 +02:00
Ronak Buch
9de86e6294 Fix nerdfont pause/stop glyphs
b42315d accidentally changed both of these to the glyph for play, this
reverts them back to the correct glyphs.
2021-05-30 01:30:22 +02:00
Ronak Buch
1259badd9a Bump reqwest form 0.9 to 0.11 2021-05-28 09:43:28 +02:00
Henrik Friedrichsen
0d405cf221 Print Spotify connection message only once
To avoid the terminal output getting garbled when ncspot is reconnecting
2021-05-24 21:03:25 +02:00
Henrik Friedrichsen
b7ab1202b8 Clear worker channel when worker has died
Should prevent panic in `Spotify::send_worker()`
2021-05-24 19:57:46 +02:00
Henrik Friedrichsen
0ac789c36e Don't panic when librespot event channel died
Terminate worker instead and attempt to open a new session

Should hopefully help with #536
2021-05-23 15:29:00 +02:00
Henrik Friedrichsen
01d227be79 Move up invalid session check 2021-05-23 15:28:09 +02:00
Henrik Friedrichsen
a2873d2438 Fix cfg borrow with cover feature
Fixes: #534
2021-05-20 17:01:55 +02:00
Henrik Friedrichsen
b42315d113 Add flip_status_indicators setting
Fixes #511
2021-05-14 17:41:19 +02:00
Henrik Friedrichsen
cd2cde542e Revert "Flip play/pause indicators" 2021-05-14 14:13:44 +02:00
Ronak Buch
c989909b07 Explicitly set default normalisation threshold for librespot
The normalisation threshold should be in ratio space, but the default
value is specified in dB space, so using it as the default implicitly
without passing it through the db_to_ratio function causes distortion
and clipping when normalisation is enabled.
2021-05-14 03:28:11 +02:00
Henrik Friedrichsen
40ad2bd208 Fix build of cover feature 2021-05-11 22:47:56 +02:00
Henrik Friedrichsen
8fb854dea6 Cargo format 2021-05-10 22:18:03 +02:00
fwcd
09404285c1 Use 'play' icon in stopped state 2021-05-10 22:09:38 +02:00
Henrik Friedrichsen
83dd2494c8 Remove spammy trace log in ListView 2021-05-07 23:16:47 +02:00
Henrik Friedrichsen
5fd93c33cb Add audio_cache_size to set maximum cache size 2021-05-07 23:14:26 +02:00
Henrik Friedrichsen
f0d5e31c86 Flip play/pause indicators
Fixes #511
2021-05-07 22:56:09 +02:00
Ronak Buch
b0d2e8f62e Make behavior of Shift modifier consistent
Previously, Shift+o opened the menu for the currently playing item
while Shift+x copied a link to the currently selected item. Now Shift
operates on the currently playing item in both cases.
2021-05-07 22:52:42 +02:00
Henrik Friedrichsen
f6a895e160 Update to librespot 0.2.0 and Tokio v1
This also brings some much need async/.await rewrites
2021-05-07 22:51:32 +02:00
Henrik Friedrichsen
71d42d489e Remove extern crate statements
https://doc.rust-lang.org/edition-guide/rust-2018/module-system/path-clarity.html
2021-05-07 22:51:32 +02:00
Henrik Friedrichsen
9cad68b8b0 Display error when command can not be parsed
fixes #161
2021-05-01 23:48:09 +02:00
Henrik Friedrichsen
b80e018079 Remove libc dependency + setlocale call
This is already taken care of in Cursive:
e2f79776a4
2021-05-01 22:53:23 +02:00
Henrik Friedrichsen
846a62e631 Log warning instead of panicking on invalid color
fixes #498
2021-04-26 22:01:02 +02:00
Kemyt
aa8e9f1099 Add rounding to volume percentage display
Shows percentage is sometimes lower than actual because float number
is cast to u16 without rounding, so for example 4.99_f64 becomes 4_u16
2021-04-17 17:48:41 +02:00
r4v3n6101
00b65557a3 Don't bother saving tracks while album is being added to library 2021-04-12 21:00:17 +02:00
Henrik Friedrichsen
98e572169b Implement track preloading
Will preload the next track close to the end of the currently playing
track. Should make playback of queued tracks a little smoother.
2021-04-11 15:54:32 +02:00
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
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
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
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