librespot stores a more secure token that is valid for a while, rely on this
instead.
On the flip side this requires users to re-enter their login data when their
token has expired.
If the token validity is too short we will have to come up with another
approach, e.g. OS keyrings.
fixes#447
Previously, the stack would be reset when switching between screens.
With the new search flow this means that search results are lost, e.g. when switching
from search results to the queue and back.
* Added possibility to turn shuffle on/off via MPRIS
* Simplified code to use unwrap_or instead of a match.
Changed the default value to be retrieved from spotify.
* only set shuffle setting if parameter was passed
* fix: fetch shuffle state with every MPRIS query
And not just once during DBus/MPRIS setup. Also, redraw UI when shuffle
state has changed.
Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
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.
`directories` create is no longer maintained, and uses
`~/Library/Preferences` on MacOS, but Apple advises against creating
files in `Preferences`.
`platform-dirs` allows to use `~/.config` on MacOS.
* feat: add insert command to paste spotify links
- use Ctrl-v to paste from clipboard or use :insert without an argument
* fix: handle paste on disabled clipboard feature
* fix: handle wrong URIs
Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
* Use libc for setlocale() to fix non-ASCII
character printing.
https://github.com/hrkfdn/ncspot/issues/221
* move string instantiation outside unsafe block
update libc crate while at it
Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
* 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