Commit Graph
25 Commits
Author SHA1 Message Date
Drew Weymouth efcfe2a99f refactor: make ReorderItems generic 2024-06-01 10:42:31 -07:00
Drew Weymouth 3d6bd910f2 fix nil interface bug 2024-06-01 10:32:52 -07:00
Drew Weymouth 82d4546096 refactor tracklist to use MediaItem, even if it only contains tracks 2024-06-01 10:15:18 -07:00
Drew Weymouth 0a902aef9f refactoring continued - compiles now 2024-05-31 16:37:14 -07:00
Drew Weymouth f67a0c5fc1 in progress MediaItem refactor - does not build 2024-05-31 09:35:46 -07:00
Drew Weymouth 1c34d4c30c Merge pull request #349 from adamantike/misc/add-FilterMap-util
misc: Add FilterMapSlice util
2024-03-19 05:52:41 -07:00
Michael Manganiello 0c17ac3f8d misc: Add FilterMapSlice util
For the scenarios where both `Filter` and `Map` are being applied,
having this util should be faster, as it avoids the creation of an extra
slice during the intermediate step.
2024-03-17 13:44:17 -03:00
Michael Manganiello 80d7cf0b65 fix: Avoid slices.Contains within tight loops
Having a `slices.Contains` check within a `for` loop has a complexity of
`O(n*m)`, with a worst case scenario of `O(n^2)` for when both
collections have the same size.

This is because `slices.Contains` internally runs just a regular loop,
checking for equality element by element.

Instead, this diff changes every occurence of this pattern to converting
the collection we compare against to a set, and then running a faster
lookup against it.
2024-03-17 13:21:51 -03:00
Michael Manganiello 801967a530 misc: Upgrade Go to v1.21
Upgrade to 1.21 as 1.20 is now unmaintained.

Most changes are related to the new `slices` package from standard
library, which can replace some existing custom functions.
2024-03-05 09:49:10 -03:00
Drew Weymouth 013204727d fix album link bug 2024-03-03 10:19:14 -08:00
Drew Weymouth a458f14327 don't crash in fullscreen page when stopping (next track = nil) 2024-03-02 17:10:32 -08:00
Drew Weymouth 91951ebfd2 implement new logic for RemoveTracksFromQueue 2023-12-22 17:58:36 -08:00
Drew Weymouth 4f002574c2 handle multiple artists properly in UI 2023-10-22 11:40:06 -07:00
Drew Weymouth b64dcdcc0b fix tracklist selection being maintained when sorting 2023-06-02 17:43:22 -07:00
Drew Weymouth 1f3559de43 add tracklist sorting logic 2023-05-23 11:10:43 -07:00
Drew Weymouth 85042fcbd4 begin the refactoring - doesnt compile 2023-05-14 19:31:04 -07:00
Drew Weymouth 882f951aa1 add AlbumFilter to backend album iterators 2023-05-11 08:54:18 -07:00
Drew Weymouth c138be381e another quick refactor 2023-04-29 10:26:30 -07:00
Drew Weymouth 31e82ae367 refactor: generic SliceContains 2023-04-29 10:21:40 -07:00
Drew Weymouth 753e7f9bcc refactor 2: use generic model for grid view 2023-04-28 17:25:57 -07:00
Drew Weymouth e61dace0dd #136: add menu button to album page with options to add album to queue or playlist 2023-04-19 18:13:31 -07:00
Drew Weymouth 19a45b7361 Fix #115: add search to artists, genres, and playlists pages 2023-04-10 17:38:33 -07:00
Drew Weymouth 0c1b293f68 add reorder tracks options to playlist page context menu 2023-03-25 11:18:22 -07:00
Drew Weymouth 37928881c0 Albums page: remember last sort order 2023-03-02 20:49:00 -08:00
Drew Weymouth d25baa9869 ensure play queue track state is updated on favorite/unfavorite and scrobbles 2023-02-22 18:42:16 -08:00