Commit Graph

277 Commits

Author SHA1 Message Date
Henrik Friedrichsen
1dcebeace1 Add "save/unsave album" to context menu
Fixes #964
2022-10-22 14:20:43 +02:00
Thomas
6a5efb1052 Fix Clone impl marked todo on Pagination
- Fixed a manual implementation of Clone on Pagination (needed extra
  trait bounds to be derivable)
- Made clippy happy :)
2022-10-19 22:02:39 +02:00
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
Thomas Frans
be7ed20897 Cleanup: Remove PlayTrackMenu
PlayTrackMenu was used before the refactor of the contextmenus. I forgot
to clean up the struct before making the commit since rustc didn't
complain. Just cleaning up my mistakes ;)
2022-09-23 13:38:32 +02:00
Thomas
0eedc38b8a Improve context menus to make the UX/UI more consistent (#923)
* Add save option to context menu of all possible ListItems

* Add play options to context menus

* Fix for playlists and tracks

* Move playback controls into main menu
2022-09-20 22:09:51 +02:00
Henrik Friedrichsen
a668574376 Fix: properly set up Browse screen
Previously two vectors of categories were created. The pagination was set up to
store the newly fetched page in the `Vec` that was not displayed.

With this change newly fetched pages should correctly show up in the "Browse"
screen.

As reported in #939
2022-09-16 22:12:37 +02:00
Thomas Frans
2be126430d Fixed pagination bug that caused items not to load 2022-09-16 21:31:47 +02:00
Henrik Friedrichsen
10213f9bcf Fix: set track position only for clicks, not hold
Fixes #920
2022-08-29 21:45:29 +02:00
Henrik Friedrichsen
816d2f133d Mouse wheel: scroll up/down without changing focus
Fixes #918
2022-08-25 22:53:03 +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
f5bf1d527f cargo clippy --fix 2022-08-17 19:41:23 +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
f7f2cb63eb Handle mouse clicks and scrolling in tab header
Partially implements #840
2022-08-09 17:51:44 +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
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
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
Henrik Friedrichsen
0bbb4932e5 Clean up clippy warnings 2022-04-27 22:41:04 +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
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
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
8eebf89166 Remove log leftovers 2022-01-28 14:03:47 +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
1a63efa69e Fix: consume save command in ListView
fixes #710
2022-01-14 19:13:57 +01:00
Henrik Friedrichsen
2653bad382 Fix: relayout on first render 2022-01-14 19:10:47 +01:00
Henrik Friedrichsen
e5d51d63a3 Fix: don't show error if user moves over list edge
Ignore this error, as it's common user behavior and an error is distracting.
2022-01-14 19:01:56 +01:00
Henrik Friedrichsen
adf8da2fc5 Move from ScrollBase to scroll module
`ScrollBase` is deprecated
2022-01-13 21:09:26 +01:00
Henrik Friedrichsen
06c6ea316e Migrate to cursive 0.17 2022-01-11 20:42:50 +01:00
Henrik Friedrichsen
68b3b9b510 Fix warnings 2022-01-09 21:39:14 +01:00
cyqsimon
9771c36c7b More detailed error message in case of command parse error (#684)
* Refactored `command::parse`

* Removed unnecessary duplication in error msg

* Renamed `NotEnoughArgs` -> `InsufficientArgs`

* Inaccurate var name

* Ditch wordy error prefix

* Use `split_whitespace` instead of regex

* Cleanup unused regex import

* `insert` cmd fails fast

* Refactor: use `and_then` instead of `unwrap`

* Updated `Command::to_string`

* Added `Command::basename`

* Better err msg when running cmd in unsupported view, fully closes #597

* Sort `match` branches by their order in the enum
2022-01-01 20:48:34 +01:00
Henrik Friedrichsen
240a0a7c41 Fix: Play multiples of Track and Playable
With the migration to rspotify 0.11.x playlists were changed to be a list of `Playable`
instead of `Track` items, so that playlists can contain podcast episodes.
This needs to be considered when collecting all tracks for playback in `ListView`.

Should help with #667
2021-12-08 21:32:36 +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