Commit Graph

52 Commits

Author SHA1 Message Date
Henrik Friedrichsen
f4ef7e1b56 Fix: remove broken staleness detection
Ever since albums were sorted the cache staleness detection stopped working as
the order of items plays into the check. Remove it as it currently doesn't
work. It also wasn't a very good check.
2022-09-12 23:16:06 +02:00
Henrik Friedrichsen
f229dfc814 Fix: make album sorting case-insensitive
Fixes #724
2022-02-18 22:39:21 +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
Henrik Friedrichsen
ebc49117b0 Update rspotify to 0.11.3 (et al)
Also allows us to revert the previously applied fix where the market parameter had to be removed.
2021-11-29 22:43:06 +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
John M. Merchant
25505be540 modified library.rs to sort after saving an album (#428)
* modified library.rs to sort after saving an album

* Reformat

Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
2021-10-15 17:43:00 +02:00
Henrik Friedrichsen
faad362f55 Refactor: separate Spotify API from player logic
The separation is not perfect yet, but it's a start and makes the entire codebase much easier to read.
2021-08-23 22:15:54 +02:00
Henrik Friedrichsen
6b8e1d33dc Code cleanups 2021-08-15 15:05:49 +02:00
Henrik Friedrichsen
71d42d489e Remove extern crate statements
https://doc.rust-lang.org/edition-guide/rust-2018/module-system/path-clarity.html
2021-05-07 22:51:32 +02:00
r4v3n6101
00b65557a3 Don't bother saving tracks while album is being added to library 2021-04-12 21:00:17 +02:00
Henrik Friedrichsen
577e7ebd87 Unify pagination setup for ApiResult values
Also:
- Fix duplicate results
- Rename `album.load_tracks` to `album.load_all_tracks`
2021-04-08 17:46:50 +02:00
Henrik Friedrichsen
67aa5b2bad Use new pagination interface for user playlists 2021-04-06 16:20:38 +02:00
Henrik Friedrichsen
0f573f8247 Refactor: Make Spotify cloneable 2021-04-03 22:35:08 +02:00
Henrik Friedrichsen
d2edfc3caf rename as_boxed_view_ext to into_boxed_view_ext 2021-03-22 22:36:33 +01:00
Henrik Friedrichsen
5f87e3cd79 show display name owning the current library
as suggested in #470
2021-03-22 21:56:50 +01: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
Qluxzz
46899ace8b Replace all .filter.map chains with .filter_map 2021-03-16 20:41:13 +01:00
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
André Andersson
d1211e6901 Only show playlists where the user is allowed to add tracks when trying to add tracks (#329)
* Only show playlists where the user is allowed to add tracks

* Expose user_id from library and use it to reduce api calls
2020-11-22 19:26:20 +01:00
Henrik Friedrichsen
5fb4eb7af2 fix: update playlist changes in local store
Move playlist change logic out of the library while we're at it and notify
the library of changes instead.

fixes #302
2020-10-25 00:09:23 +02:00
JojiiOfficial
6587efdfd2 Add dialog for adding duplicate tracks to a playlist (#299)
* Add dialog for adding duplicate tracks to a playlist

* use local playlist store to check for duplicates

Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
2020-10-24 20:41:55 +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
e1b4892b8a make album column for tracks configurable
introduces new config variable `album_column`

fixes #267
2020-10-17 23:56:23 +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
Henrik Friedrichsen
4e9bfa16a2 Revert "migrate to rspotify 0.9-dev"
This reverts commit acc333460b.
2020-06-25 21:11:50 +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
dccb36d8e7 update to rust edition 2018 + bump version 2020-03-15 11:06:24 +01:00
Henrik Friedrichsen
d2915316da various non-functional code cleanups 2020-02-21 23:33:08 +01:00
Henrik Friedrichsen
feee204f9c sort albums in library by artist -> year -> album title
fixes #111
2019-11-30 17:32:33 +01:00
Henrik Friedrichsen
85e9e99d87 rebind + change playlist update command to update entire library 2019-11-30 17:13:41 +01:00
Henrik Friedrichsen
ed1dc2e22e implement saving selected tracks directly to playlists
closes #103
2019-11-02 23:19:12 +01:00
Henrik Friedrichsen
498724e2a4 fix: trigger UI redraw after fetching artist data in separate thread
fixes #91
2019-09-08 21:11:59 +02:00
Henrik Friedrichsen
4067155e96 remove unused mutabilities 2019-08-13 11:50:31 +02:00
Henrik Friedrichsen
f4c640ca2b fix: sort playlists in the same order spotify sends them out 2019-06-24 22:13:52 +02:00
KoffeinFlummi
a98a4645f6 Make library the default view 2019-04-28 11:56:59 +02:00
KoffeinFlummi
662b718a4c Lazy-load non-library playlists
Fix #62
2019-04-28 11:31:32 +02:00
KoffeinFlummi
eed3edfa59 Differentiate between followed and created playlists
Fix #56
2019-04-28 11:04:51 +02:00
KoffeinFlummi
754d6d5c04 Move playlist methods out of library.rs 2019-04-28 10:32:54 +02:00
Henrik Friedrichsen
eb2e8322e5 Merge remote-tracking branch 'origin/feature/new_rspotify' into develop 2019-04-24 21:01:15 +02:00
Henrik Friedrichsen
18c2f6466a fix most of the clippy linter warnings 2019-04-23 22:28:05 +02:00
KoffeinFlummi
eed218d0c3 Implement browsing for albums, artists, playlists 2019-04-23 01:40:00 +02:00
KoffeinFlummi
1a17860957 cargo fmt 2019-04-20 00:11:43 +02:00
KoffeinFlummi
f320b953d6 Implement following playlists 2019-04-19 23:50:36 +02:00
KoffeinFlummi
e68ba60179 Optimize/parallelize library initialization 2019-04-19 22:50:12 +02:00
KoffeinFlummi
3044715362 Lock library until initialization is done 2019-04-19 22:49:30 +02:00
KoffeinFlummi
1e58ca9345 Implement (un)saving tracks, albums; (un)following artists 2019-04-18 15:43:51 +02:00
KoffeinFlummi
adba809327 Display saved/followed checkmark 2019-04-18 14:04:40 +02:00
KoffeinFlummi
d93302a63f Restore playlist deletion 2019-04-18 13:31:27 +02:00