Commit Graph

578 Commits

Author SHA1 Message Date
Henrik Friedrichsen
816d2f133d Mouse wheel: scroll up/down without changing focus
Fixes #918
2022-08-25 22:53:03 +02:00
Ronak Buch
56c8817aa8 Fix order of parameters to Cache::new
When updating to librespot 0.4.0 in c41294c, the volume and audio path
parameters were specified in the wrong order.
2022-08-25 09:22:26 +02:00
Thomas
b8b565d0c3 Fix back button mouse left click 2022-08-24 20:41:55 +02:00
Henrik Friedrichsen
a9f7f3cddc Fix: align with color palette of Cursive
Should make context menus (`SelectView`) look like ncspot's `ListView`.

Fixes #431
2022-08-20 23:40:33 +02:00
Henrik Friedrichsen
966223392e Handle clicks on back button (pop view from stack) 2022-08-20 23:05:14 +02:00
Henrik Friedrichsen
8905db457a Implement category playlist browsing in library
Fixes #187
2022-08-20 22:32:25 +02:00
Henrik Friedrichsen
a04bc40051 Refactor: Extract command handling for ListView 2022-08-20 00:40:21 +02:00
Henrik Friedrichsen
38dfba1db5 Use ViewExt.title() in TabView
Instead of storing a separate copy of the view title.

Additionally, rename `ViewExt.set_title()` to `ViewExt.with_title()` as it
consumes `self` and returns ownership.
2022-08-19 20:42:46 +02:00
Henrik Friedrichsen
5db79d5b2e Fix ListView scrollbar dragging
With af08a56 properly passing down relativized events we don't have to implement
to scrollbar dragging logic ourselves anymore, but can rely on the one in
cursive.

This also fixes #839
2022-08-19 19:02:15 +02:00
Henrik Friedrichsen
2311e49ea2 Don't open item/context menu for clicks after end
The previous behavior would select and open the last item if the user clicked a
row after the last item. This change prevents such a behavior as it can be
misleading.

Related to #840
2022-08-19 00:41:19 +02:00
Henrik Friedrichsen
81010fc453 Refactor: Unify list size calculation 2022-08-19 00:31:56 +02:00
Henrik Friedrichsen
82716b267b Handle left mouse click on item, i.e. albums/lists
Another part of #840
2022-08-19 00:31:47 +02:00
Henrik Friedrichsen
4315cdc077 Add CursiveExt trait
For easier usage of shared logic involving the `Cursive` instance.
2022-08-19 00:18:34 +02:00
Henrik Friedrichsen
f5bf1d527f cargo clippy --fix 2022-08-17 19:41:23 +02:00
Bettehem
0af93f816d Fixed clipboard not working on GNOME Wayland. 2022-08-17 19:33:02 +02:00
Henrik Friedrichsen
d3e89115d7 Open context menu when right-clicking on items
Another part of #840
2022-08-16 23:01:51 +02:00
Henrik Friedrichsen
af08a560c7 Pass down relativized events to child views
So child views can correctly calculate the local mouse cursor position.
2022-08-16 21:52:01 +02:00
Henrik Friedrichsen
8aab5cabf2 Fix: don't crash on empty command input 2022-08-16 21:52:01 +02:00
Henrik Friedrichsen
f7f2cb63eb Handle mouse clicks and scrolling in tab header
Partially implements #840
2022-08-09 17:51:44 +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
Henrik Friedrichsen
1e135de443 Apply cargo clippy suggestions 2022-07-31 11:32:59 +02:00
Henrik Friedrichsen
249a4ef5a7 Add statusbar_format configuration option
Fixes #877
2022-07-31 11:24:22 +02:00
Bettehem
bba70b1809 Added possibility to Follow/Unfollow artists via the context menu (#868)
* Added possibility to Follow/Unfollow artists via the context menu

* Formatted code properly.

* Changed Show Artist to Artist (or Artists if there are many).
2022-07-27 22:07:30 +02:00
Bettehem
5158a13e19 Enable wayland clipboard support by default on supported platforms (#869)
* Added possibility to Follow/Unfollow artists via the context menu

* Formatted code properly.

* Wayland support is now automatically built on supported platforms.

* Revert "Formatted code properly."

This reverts commit ec057f9716574d0a7912ba8b5308c73bb0342f84.

* Revert "Added possibility to Follow/Unfollow artists via the context menu"

This reverts commit 9ac20514a640b9150fcfa38630d338ad6f097689.

* Removed need for separate wayland_clipboard feature.
Possibly fixed windows build.

* Added more cfg conditions to sharing.rs.
This possibly fixes the windows build.

* Changed to only build wayland clipboard feature on linux by default.
2022-07-25 23:05:13 +02:00
Henrik Friedrichsen
7b2c1bafdb Initialize PulseAudio backend environment vars
Set application name/description and media role to allow application specific
settings.

Fixes #871
2022-07-21 20:50:56 +02:00
James Adam
ed10872ca3 Add 'hide_display_names' config option 2022-07-11 08:27:41 +02:00
Henrik Friedrichsen
faad7dab95 Fix: don't throw error if search yields no result
Fixes #832
2022-06-10 21:37:59 +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
Henrik Friedrichsen
ce6b360cba Fix: prevent integer overflow when calculating cache size
Fixes #823
2022-06-08 19:30:51 +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
Bettehem
f7450321da Add track_format config option (#800)
* Added track_name_first config option to allow choosing if artists' names should be shown before or after the track name.

* Added active_fields config option, which allows configuration of which columns are visible in Queue/Library view.
This also removes the need for a separate track_name_first and album_column option.

* Fixed README

* Made custom tracklist formatting more flexible.
Updated readme with new instructions.
Reformatted impl member order to match the definitions in traits.rs.

* Added track_name_first config option to allow choosing if artists' names should be shown before or after the track name.

* Added active_fields config option, which allows configuration of which columns are visible in Queue/Library view.
This also removes the need for a separate track_name_first and album_column option.

* Fixed README

* Made custom tracklist formatting more flexible.
Updated readme with new instructions.
Reformatted impl member order to match the definitions in traits.rs.

* Fetch formatting config from library config

Instead of the lazy static mutex

* Moved custom format function to Playable impl as it's a better location to handle both Tracks and Episodes

* Rename from `tracklist_formatting` to `track_format`

Also shorten `format_{left|center|right}` to `{left|center|right}`

Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
2022-05-28 14:13:37 +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
Henrik Friedrichsen
cef6eb43b0 Add option to customize library tabs
New option is called `library_tabs`. By default all tabs are enabled.

Fixes #798
2022-05-10 22:59:49 +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
Henrik Friedrichsen
0bbb4932e5 Clean up clippy warnings 2022-04-27 22:41:04 +02:00
Henrik Friedrichsen
d1a44a613f Fix: do not crash DBus on invalid Spotify URIs
Fixes #795
2022-04-27 22:38:15 +02:00
Henrik Friedrichsen
52e2a53839 Fix: process command bindings in play track menu 2022-04-25 22:52:49 +02:00
Bettehem
b1f3984917 Added option to play track from context menu dialog (#790)
* Added Play Track option to a track's context menu. Works with arrow keys but j and k don't yet work.

Fixes #786
2022-04-22 06:09:10 +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
61b1797527 Consume move playing in queue view
Fixes #759
2022-03-12 00:00:50 +01:00
Henrik Friedrichsen
c42d36fa5d Consume move left/right commands in ListView
Fixes #711
2022-03-11 23:58:15 +01:00
Henrik Friedrichsen
ee1d0ae7db Enable gapless by default
Fixes #735
2022-02-27 00:03:30 +01:00
Henrik Friedrichsen
f229dfc814 Fix: make album sorting case-insensitive
Fixes #724
2022-02-18 22:39:21 +01:00
Henrik Friedrichsen
a491a20de2 Enable autojump for playlist selection list
It's not a full search, but a quick win

#225
2022-02-18 22:25:36 +01:00
Henrik Friedrichsen
bb066c774b Clippy cleanups 2022-02-18 22:10:21 +01:00
Henrik Friedrichsen
2a14a6de43 Fix clap deprecation warnings 2022-02-18 22:05:29 +01:00
Roger Roger
23bae723eb Improve playlist sorting
Add secondary and tertiary sorting options to behave more like spotify
when sorting by artist or album.
2022-02-11 10:41:18 +01:00