Thomas Frans
655d663aed
Fix: fixes a bug that crashed ncspot.
...
Like mentioned in the corresponding issue by ayushjaipuriyar, ncspot
would crash when the queue was empty, shuffled, and played. This commit
fixes that, together with some minor clippy fixes.
2022-10-02 21:46:57 +02:00
Henrik Friedrichsen
f5bf1d527f
cargo clippy --fix
2022-08-17 19:41:23 +02:00
eulerfan271
593a4c9284
Add notification customization ( #893 )
...
* Add custom notification formatting
* Added `notification_format` to README
* cleaned up code formatting
* Fix typo
Co-authored-by: Henrik Friedrichsen <henrik@affekt.org >
2022-08-07 15:51:38 +02:00
cyqsimon
fefbd4191d
Fix some errors and warnings when enabling/disabling features ( #821 )
...
* Fix E&Ws when enabling features
* `share_clipboard` feature can be disabled more cleanly
* `notify` feature can be disabled more cleanly
2022-06-10 21:32:59 +02:00
cyqsimon
2e8f37e42b
Add desktop entry & notification icon hint ( #822 )
...
* Add desktop entry & notification icon hint
* Fix build for non-linux
* Set notification priority with hints
2022-06-05 23:59:42 +02:00
Henrik Friedrichsen
c41294cb8d
Update to librespot 0.4.0
...
Changes: https://github.com/librespot-org/librespot/compare/v0.3.1..v0.4.0
2022-05-22 17:15:02 +02:00
Bettehem
dfecb759a0
Added playback_state config option ( #783 )
...
* Added playback_state config option.
It can be used to pre-define a certain playback state for the player.
* Changed playback_state to use enums and removed redundant check for the "Playing" state.
2022-04-28 10:03:17 +02:00
Ronak Buch
f981b64687
Only download cover image when flag enabled ( #780 )
...
* Only download cover image when flag enabled
* fixup! Only download cover image when flag enabled
2022-04-18 17:10:56 +02:00
Henrik Friedrichsen
ee6d26baf3
Fix: only reuse notification on XDG platforms
...
Fixes compilation on Windows
2022-03-22 22:17:00 +01:00
Henrik Friedrichsen
1a7b5f90da
Reuse previous notification id
...
According to XDG specs, passing the previous notification ID will update it
instead of displaying a new notification.
Fixes #760
2022-03-22 22:02:37 +01:00
Henrik Friedrichsen
90dd1a03d2
Set notification app name to ncspot
...
In hopes of fixing #760
2022-03-22 00:15:04 +01:00
Henrik Friedrichsen
bb066c774b
Clippy cleanups
2022-02-18 22:10:21 +01:00
Rashil Gandhi
f29d263f41
Remove notifications' dependency on 'cover' ( #706 )
...
* Move functions from 'cover' to 'utils'
* Remove notify dependency on 'cover'
* Enable clipboard and notifications in CI/CD
* remove extra newline
2022-01-15 21:09:34 +01:00
Henrik Friedrichsen
68b3b9b510
Fix warnings
2022-01-09 21:39:14 +01:00
Henrik Friedrichsen
74b4e65b64
Refactor: move playable models to separate module
2021-11-08 20:44:21 +01:00
Henrik Friedrichsen
96f2d88696
Update to rspotify 0.11.2 ( #640 )
...
* Update to rspotify 0.11.x
Many breaking changes
* Minor cleanups via Clippy
2021-11-07 17:19:56 +01:00
Henrik Friedrichsen
6b8e1d33dc
Code cleanups
2021-08-15 15:05:49 +02:00
Henrik Friedrichsen
eb8d9ad294
Fix notify/cover platform config
2021-07-27 23:04:00 +02:00
nc
2edc22f251
add album cover to notification
2021-07-16 10:27:37 +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
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
cea5228245
(Re)store currently playing track + shuffle state
...
Solves #448
2021-04-09 19:10:34 +02:00
Henrik Friedrichsen
0f573f8247
Refactor: Make Spotify cloneable
2021-04-03 22:35:08 +02:00
Henrik Friedrichsen
db894d7ce8
Add config values to override shuffle/repeat state
2021-02-25 21:07:12 +01:00
Henrik Friedrichsen
92d1978340
Save track queue when closing and restore at start
2021-02-22 22:14:34 +01:00
Henrik Friedrichsen
a880ffd1f6
Persist volume and shuffle/repeat state
2021-02-22 22:14:34 +01:00
André Andersson
92335594bc
Restart queue if pressing play when stopped ( #399 )
...
* Restart queue if pressing play when stopped
* Remove FinishedTrack from match
* Formatting
2021-01-19 21:47:41 +01:00
Henrik Friedrichsen
63e65c32c9
update dependencies
...
rand 0.8.0 now accepts ranges
2021-01-03 23:24:45 +01:00
Henrik Friedrichsen
3874dc42f8
cargo clippy
2021-01-02 21:30:52 +01:00
Henrik Friedrichsen
013beb245b
refactor: pass globally mutable config reference
...
Before, copies of the configuration were passed over. This change also
causes configuration reloads to affect the entire application and is
easier to maintain but introduces some RwLock overhead.
2020-10-18 13:09:45 +02:00
Moshe Sherman
fc79889665
play next ( #278 )
...
* add play next feature
* fix play_next insertion order
* fix play_next call for playable
* document play_next shortcut + reformat
Co-authored-by: Henrik Friedrichsen <henrik@affekt.org >
2020-10-04 16:58:55 +02:00
Moshe Sherman
7bf0cac6c0
handle last element removal in queue
2020-10-01 20:48:27 +02:00
Moshe Sherman
4e7ec60b0e
disable repeat track if manualy skip song
2020-10-01 20:48:27 +02:00
Moshe Sherman
9872a10bfa
adhere to repeat/shuffle settings on previous track
2020-10-01 20:48:27 +02:00
Moshe Sherman
181f5e4918
dont stop track
2020-10-01 20:48:27 +02:00
Henrik Friedrichsen
3893a6f5a0
add feature flag for song notifications
...
enables users/distributions to ship without dbus dependency
2020-09-07 23:50:45 +02:00
Henrik Friedrichsen
69f11cdcf7
gracefully handle error when showing notification
...
fixes #265
2020-09-07 23:38:37 +02:00
Henrik Friedrichsen
d2b9dffb54
fix: do not delete from empty queue
...
fixes #253
2020-08-21 00:13:54 +02:00
Henrik Friedrichsen
e5bc12b1ba
use cfg of spotify object
...
TODO:
- apply this to other single config values that are passed directly, e.g. in the
statusbar
- use a more appropriate object to hold `cfg`
2020-08-18 23:06:41 +02:00
Ronak Buch
097f59eb83
Add notifications
2020-08-18 23:06:38 +02:00
Henrik Friedrichsen
1b1d392ab8
podcast support ( #203 )
...
* implement search for shows/podcasts
* create Playable supertype for queue to contain tracks and episodes
* wip: implement playback of episodes
* load spotify id from uri instead of raw id to fix podcast playback
* show duration for podcast episodes
* implement generic status bar for playables (tracks and episodes)
omit saved indicator for now as the library does not yet support podcasts
* instead of only the last 50 fetch all episodes of a show
* refactor: extract Playable code to separate file
* implement playback/queuing of shows + sharing url
* implement podcast library
* migrate mpris code to Playable supertype
2020-07-14 10:38:22 +02:00
Henrik Friedrichsen
b6772225e0
rely on librespot status instead of guessing when a track is playing
2020-06-15 21:08:58 +02:00
Henrik Friedrichsen
4e7af1c920
add command/binding to jump to currently playing track
...
fixes #181
2020-04-18 21:57:41 +02:00
Henrik Friedrichsen
c6b85f7d9b
only stop playback if the last item was deleted AND playing
...
fixes #159
2020-03-22 09:06:08 +01:00
Henrik Friedrichsen
dccb36d8e7
update to rust edition 2018 + bump version
2020-03-15 11:06:24 +01:00
dann-merlin
56a178dcfd
Added configuration option for initial shuffle, repeat, volume
2020-03-03 18:05:03 +01:00
Henrik Friedrichsen
d2915316da
various non-functional code cleanups
2020-02-21 23:33:08 +01:00
Tobias Langendorf
363e71242a
Shuffle: Start with random track if not selecting track directly
...
Starting a playlist, album or artist with shuffle enabled always
starts on the first track in it and then plays the rest of the
queue shuffled.
This changes it so unless a track is picked directly, playback
will start on a random track of the selection.
2020-02-21 18:42:31 +01:00