Commit Graph

114 Commits

Author SHA1 Message Date
Henrik Friedrichsen
f2bcfcaa60 fix: more resilient playlist track deletion
Introduction of the sort command with #328 broke the deletion of playlist items,
because sorted track indices got out of sync with their actual index within the
playlist at the Spotify backend.

The new approach is not perfect, as it doesn't update the list index of items
after deletion, but by supplying the playlist snapshot id the backend is able to
apply the requested changes.

This should still be improved in the future, though.
2021-03-05 23:34:29 +01:00
Qluxzz
3d11b2c333 Fix spelling mistake 2021-03-05 21:54:15 +01:00
algon
dfb60ee4be Improve album loading in artist view (#446)
* Load all albums in artist view

* Fetch multiple albums at a time
2021-02-25 21:24:10 +01:00
Henrik Friedrichsen
a880ffd1f6 Persist volume and shuffle/repeat state 2021-02-22 22:14:34 +01:00
Qluxzz
bca84658fb Fix not handling changed event 2021-01-20 20:49:09 +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
André Andersson
ed0c62a888 Add support for open.spotify.com links (#392)
* No longer necessary

* Add support for open.spotify.com links

* Reuse struct for insert command

* Formatting
2021-01-17 20:12:07 +01:00
Henrik Friedrichsen
9afad2d91c cargo fmt/clippy 2021-01-10 01:54:54 +01:00
Qluxzz
68e51f263d Replace from_str with parse 2021-01-08 09:52:27 +01:00
Qluxzz
9447b33684 Fix not setting country correctly 2021-01-08 09:52:27 +01:00
Qluxzz
9bc98f70fd Expose gapless playback config option 2021-01-08 09:40:50 +01:00
Henrik Friedrichsen
3874dc42f8 cargo clippy 2021-01-02 21:30:52 +01:00
Henrik Friedrichsen
d8417664fd show connection message instead of blank screen 2020-11-21 15:52:39 +01:00
Henrik Friedrichsen
880fbb3f6e fix: don't try to play tracks without spotify id
Can happen when a playlist is queued that contains tracks removed from the
Spotify catalogue.

fixes #321
2020-11-16 22:21:27 +01:00
Bettehem
a8861fc1aa Spotify URL support for MPRIS OpenUri function (#314)
* Added OpenUri D-BUS MPRIS support.
Removed "user:" from URIType check because Spotify doesn't always provide it.

* Added tags to .gitignore

* Changed mpris metadata to actually return the track's url instead of the Spotify URI so that it matches the functionality of the official Spotify client.

* Changed mpris:trackid and xesam:url to not use static naming so it can support podcasts.

* Changed xesam:url to default to an empty string instead of "0"

* Added possibility to start playing Shows and Episodes via MPRIS.
Added possibility to search for Podcast Episodes.

* Fixed mpris:trackid not returning the id in the correct format.
MPRIS OpenUri function now supports Spotify url links.

* return result directly instead of mut string

* handle artist URLs/URIs

Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
2020-11-10 20:18:22 +01:00
Henrik Friedrichsen
79a3d0ca8a add recommendations/similar tracks feature
fixes #186
2020-10-18 17:41:18 +02: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
Henrik Friedrichsen
f3c66111a2 cargo clippy 2020-10-10 20:47:12 +02:00
Henrik Friedrichsen
98914f27e1 fix: load more tracks if album has more than 50
fixes #281
2020-10-09 20:22:15 +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
eulerfan271
9e970f5799 Added config option for bitrate (#270)
* added config option for bitrate

* updated README.md to include bitrate config options
2020-09-22 17:01:56 +02:00
Henrik Friedrichsen
6f7b64c908 cargo clippy 2020-08-23 21:00:29 +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
Henrik Friedrichsen
8d8c79616c cargo fmt 2020-07-31 22:23:03 +02:00
Bettehem
413703a310 Podcast support improvements. (#229)
* Added OpenUri D-BUS MPRIS support.
Removed "user:" from URIType check because Spotify doesn't always provide it.

* Added tags to .gitignore

* Changed mpris metadata to actually return the track's url instead of the Spotify URI so that it matches the functionality of the official Spotify client.

* Changed mpris:trackid and xesam:url to not use static naming so it can support podcasts.

* Changed xesam:url to default to an empty string instead of "0"

* Added possibility to start playing Shows and Episodes via MPRIS.
Added possibility to search for Podcast Episodes.
2020-07-26 11:29:43 +02:00
Henrik Friedrichsen
9adab923d5 update to librespot 0.1.2
- make use of new player events
- remove `--locked` install note as it should not be required anymore (#179, #190, #212)
- `cargo update` dependencies
2020-07-23 01:04:18 +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
bb89d189ae migrate to rspotify 0.10.0
in preparation for the future release with podcast API support
2020-07-10 21:10:56 +02:00
Thomas Storey
e5419dae2d add methods and api usage to delete track from playlist (#211)
* wip: add methods and api usage to delete track from playlist

* enh: add ability to remove track from playlist with immediate visual feedback

* minor cosmetic changes

Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
2020-07-01 20:52:39 +02:00
Henrik Friedrichsen
4e9bfa16a2 Revert "migrate to rspotify 0.9-dev"
This reverts commit acc333460b.
2020-06-25 21:11:50 +02:00
Henrik Friedrichsen
03045ba256 Revert "switch to rspotify's new universal search method"
This reverts commit e55d0ac7ba.
2020-06-25 21:11:45 +02:00
Henrik Friedrichsen
8188f9e304 fix: only clear credentials when they're invalid
fixes #77
2020-06-21 21:50:49 +02:00
Henrik Friedrichsen
d36fb4fe40 handle lost channels to worker thread gracefully 2020-06-15 21:42:44 +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
d7c170fec8 terminate worker thread as soon as possible to avoid race conditions 2020-06-14 19:57:33 +02:00
Henrik Friedrichsen
4d3c071328 report stopped playback when player task or session has died 2020-06-13 20:36:05 +02:00
Henrik Friedrichsen
8013609d0e recreate librespot session when it's invalid
initial attempt to handle #192
2020-06-13 20:23:28 +02:00
Henrik Friedrichsen
e55d0ac7ba switch to rspotify's new universal search method 2020-06-07 18:38:57 +02:00
Henrik Friedrichsen
20536580fc refactoring/simplifications (via cargo clippy) 2020-06-06 12:07:59 +02:00
Henrik Friedrichsen
acc333460b migrate to rspotify 0.9-dev
in preparation for the future release with podcast API support
2020-06-06 12:01:16 +02:00
Henrik Friedrichsen
ce5b11dac4 update to cursive 0.15.0 2020-06-02 23:19:21 +02:00
Henrik Friedrichsen
91ce808ef8 support configuration of audio backend and backend device
fixes #194
2020-05-19 00:05:32 +02:00
Henrik Friedrichsen
d04766160d implement audio_cache setting
fixes #196
2020-05-14 22:11:35 +02:00
Henrik Friedrichsen
85bc898830 implement volume normalization setting
fixes #195
2020-05-14 21:48:09 +02:00
Bettehem
2e89cc3d01 Added OpenUri D-BUS MPRIS support.
Removed "user:" from URIType check because Spotify doesn't always provide it.
2020-04-27 10:33:31 +02:00
Henrik Friedrichsen
1b0ac4d5cc migrate to futures 0.3 2020-03-28 23:31:27 +01:00
dann-merlin
9e68ed0ba6 Actually set volume when reading in from config 2020-03-18 20:45:14 +01:00
Henrik Friedrichsen
dccb36d8e7 update to rust edition 2018 + bump version 2020-03-15 11:06:24 +01:00
dann-merlin
45858df8a3 Volume configurable range 0-100 2020-03-03 18:05:03 +01:00
dann-merlin
56a178dcfd Added configuration option for initial shuffle, repeat, volume 2020-03-03 18:05:03 +01:00