Commit Graph

47 Commits

Author SHA1 Message Date
Thomas Frans
e68f50ddff Display shuffle order 2023-03-01 12:02:10 +01:00
Henrik Friedrichsen
93816af654 Linter fixes 2022-12-28 14:37:08 +01:00
Henrik Friedrichsen
61b1797527 Consume move playing in queue view
Fixes #759
2022-03-12 00:00:50 +01:00
Henrik Friedrichsen
06c6ea316e Migrate to cursive 0.17 2022-01-11 20:42:50 +01:00
Henrik Friedrichsen
74b4e65b64 Refactor: move playable models to separate module 2021-11-08 20:44:21 +01:00
Henrik Friedrichsen
32cb6e70d3 Show tracks + duration of album, playlist, queue
Stats are in the top right

Fixes #475
2021-04-08 22:26:19 +02:00
André Andersson
65e9887f38 Refactor needs_download and rename library.items to better convey usage (#466)
* Refactor

* Rename items to playlists and update error message
2021-03-16 20:43:17 +01:00
Henrik Friedrichsen
a216af91ac remember view stacks separately for screens
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.
2021-01-10 01:42:23 +01: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
Moshe Sherman
7bf0cac6c0 handle last element removal in queue 2020-10-01 20:48:27 +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
4e7af1c920 add command/binding to jump to currently playing track
fixes #181
2020-04-18 21:57:41 +02:00
Henrik Friedrichsen
dccb36d8e7 update to rust edition 2018 + bump version 2020-03-15 11:06:24 +01:00
Tobias Langendorf
363e71242a Shuffle: Start with random track if not selecting track directly
Starting a playlist, album or artist with shuffle enabled always
starts on the first track in it and then plays the rest of the
queue shuffled.
This changes it so unless a track is picked directly, playback
will start on a random track of the selection.
2020-02-21 18:42:31 +01:00
Henrik Friedrichsen
8924b85390 fix deprecation warnings that occured due to cursive 0.14.0 upgrade 2020-02-02 20:10:21 +01:00
Henrik Friedrichsen
2039878144 update to cursive 0.14.0 2020-02-02 19:55:26 +01:00
Rasmus Larsen
db7a09c87b Command parser 2019-05-21 18:11:54 +02:00
Rasmus Larsen
1671db14c1 Move to enum-based commands 2019-05-20 22:15:12 +02:00
Henrik Friedrichsen
82e1e3d1c2 update bindings, indicate that saving a queue can overwrite playlist
closes #60
2019-04-20 14:53:25 +02:00
KoffeinFlummi
4c974a83f7 Use command system for queue saving 2019-04-18 15:43:04 +02:00
KoffeinFlummi
adba809327 Display saved/followed checkmark 2019-04-18 14:04:40 +02:00
KoffeinFlummi
210c7d9f4e Implement saved tracks, albums, and artists 2019-04-16 19:52:22 +02:00
Oscar Linderholm
5981b08458 Refactor the simplified playlist function 2019-04-10 14:04:09 +02:00
Henrik Friedrichsen
534ccc904f respect currently playing track when shifting queue entries 2019-04-07 14:14:56 +02:00
Henrik Friedrichsen
b72f560e5a implement moving of tracks in queue 2019-04-05 00:27:20 +02:00
Henrik Friedrichsen
d7848ec333 code formatting + minor refactorings 2019-03-28 05:42:47 +01:00
KoffeinFlummi
486bc7617e Refactor command handling 2019-03-28 03:05:25 +01:00
Henrik Friedrichsen
0e3c9fc504 use constants for listview IDs and search edit 2019-03-26 21:28:25 +01:00
Henrik Friedrichsen
4f8342da83 refactorial spring cleaning (cargo fmt + clippy) 2019-03-26 20:51:39 +01:00
Henrik Friedrichsen
e0f7b5c156 implement functionality to save queues to playlists 2019-03-24 16:33:39 +01:00
KoffeinFlummi
b7e0e87e44 Add scroll bar to ListView, remove ScrollView 2019-03-20 22:32:45 +01:00
Henrik Friedrichsen
da4f39ffba Merge branch 'keybindings' of git://github.com/KoffeinFlummi/ncspot into KoffeinFlummi-keybindings 2019-03-17 15:45:13 +01:00
KoffeinFlummi
5a85619105 Add rebindable keys, refactor lists 2019-03-17 04:29:29 +01:00
Henrik Friedrichsen
392e3efb87 turn off autorefresh and redraw only on demand
this should significantly reduce CPU usage but is a little bit more complicated.
while we're at it, remove the different screen redraw events and use a combined
event for all screens.

TODO:
the spotify player still needs to update the statusbar at least every second.
2019-03-09 01:55:55 +01:00
Henrik Friedrichsen
502ac36de3 get rid of the panel wrapper for more space
the screen title is now displayed by the layout
2019-03-07 22:34:45 +01:00
Henrik Friedrichsen
b075c96134 update current_track when tracks before the current one are removed
also:
don't use events to update the queue UI
this makes the Add/Remove queue events useless, but we'll keep them for now

hopefully fixes #22
2019-03-07 17:33:45 +01:00
Henrik Friedrichsen
0b14fc5da7 transform simple queue to a preserving, more complex kind
this is a pretty big but necessary change and might not be stable yet.

some key points:
- the queue is now responsible for playback controls and track management, as
this was scattered between the queue and spotify objects.
- because the queue is now retained, it should be easier to save it as a
spotify playlist

closes #12
2019-03-06 23:59:33 +01:00
Henrik Friedrichsen
7b4c40026a extract SplitButton from TrackButton for future PlaylistButton 2019-03-06 00:46:47 +01:00
Henrik Friedrichsen
91e89c2970 introduce track data class 2019-03-06 00:15:28 +01:00
KoffeinFlummi
7a24eca809 Add main layout view and status bar
Fix #4
2019-03-05 19:18:36 +01:00
Henrik Friedrichsen
9507add6a4 more refined queue events + playlist delete binding
- move from listview to linearlayout + scrollview
- doesn't redraw the whole view on queue changes anymore
- uses new cursive functions for linearlayout (needs cursive git)

closes #3
2019-03-04 00:56:34 +01:00
Henrik Friedrichsen
909ce8c81d cargo fmt 2019-03-03 15:53:54 +01:00
Henrik Friedrichsen
a562f0b7a7 implement custom track button view (closes #2) 2019-03-03 00:16:17 +01:00
Henrik Friedrichsen
d73a3c144e always trigger a cursive event when a queue event is generated 2019-02-27 23:12:09 +01:00
Henrik Friedrichsen
d3c439342a introduce global event sink to trigger updates across threads 2019-02-27 22:50:31 +01:00
Henrik Friedrichsen
bebc6175cc cargo fmt 2019-02-26 23:32:38 +01:00
Henrik Friedrichsen
204cb18410 implement preliminary queue view
this approach needs some (re)work, as the UI is not fully sync'd with the data,
yet. it'd probably be better to have an event system triggered by the queue,
that will cause a UI refresh or similar.
2019-02-26 23:30:16 +01:00