Commit Graph

506 Commits

Author SHA1 Message Date
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
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
ba36f98367 seek spits out correct error when used with no args 2022-01-04 09:21:43 +01:00
Csaba Varró
f0a2cd79ff Remove panics in the update_token flow (#688)
It caused a crash when the token failed to update
2022-01-01 21:43:12 +01:00
dependabot[bot]
4d1388e5bd Bump clap from 2.34.0 to 3.0.0 (#689)
* Bump clap from 2.34.0 to 3.0.0

Bumps [clap](https://github.com/clap-rs/clap) from 2.34.0 to 3.0.0.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v2.34.0...clap_complete-v3.0.0)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Adapt to clap v3 changes

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
2022-01-01 21:04:02 +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
075ecd0e24 Set terminal title to ncspot
Fixes #685
2021-12-31 16:18:48 +01:00
cyqsimon
17867685ab Improved README (#683)
* auto generate table of contents

* cspell check

* Added `single` alias to repeat mode `track`

* Updated command documentation

* Reformat command table
Removed the "alias" column since it takes up too much space.
2021-12-27 16:34:56 +01:00
cyqsimon
e0ec759730 Improved seek command to allow more units (#682)
* `seek` command accepts fancy duration

* Use default formatting

* Better var naming

* Documented `seek` command
2021-12-27 09:28:49 +01:00
Henrik Friedrichsen
299c470cf9 Add exec command
Fixes #673
2021-12-17 20:57:52 +01:00
Bettehem
3324094974 Added Wayland clipboard support. (#666)
* Fixed MPRIS OpenUri function not respecting ncspot's shuffle setting.

* Added support for Wayland clipboard.

* Formatted code properly using cargo fmt.

* Added is_wayland() function to check if using Wayland.

* Added wayland_clipboard feature flag.
It can be used to enable Wayland clipboard support.
Changed is_wayland() function to check wayland related environment
variables at runtime and not compile time.
2021-12-09 11:55:44 +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
dc977d758e Fix serialization of jump commands 2021-12-07 21:36:36 +01:00
Felix
3d43081df3 Added jumpnext and jumpprevious as commands 2021-12-07 16:35:52 +01:00
Bettehem
3808adced6 Fixed MPRIS OpenUri function not respecting ncspot's shuffle setting. 2021-12-01 21:17:39 +01:00
Henrik Friedrichsen
550fa6acf4 Add cache_version flag to saved state
Can be used to determine whether the cache file format has been broken after an update.
If so, the cache will be discarded and recreated.
2021-11-30 20:43:58 +01:00