Skip to content

Commit

Permalink
feat: Local music library (#1479)
Browse files Browse the repository at this point in the history
* feat: add one additional library folder

This folder just doesn't get downloaded to.
I think I'm going to rework it so that it can be multiple folders,
but I'm going to commit my progress so far anyway.

Signed-off-by: Blake Leonard <[email protected]>

* chore: update dependencies so that it builds

I'm not sure if this breaks CI or something, but I couldn't build
it locally to test my changes, so I made these changes and it
builds again.

Signed-off-by: Blake Leonard <[email protected]>

* feat: index multiple folders of local music

If you used a previous commit from this branch, this is a breaking
change, because it changes the type of a configuration field. but
since this is still in development, it should be fine.

Signed-off-by: Blake Leonard <[email protected]>

* refactor: manage local library in local tracks tab

This also refactors the list to use slivers instead. That's the
easiest way to have multiple scrolling lists here...

The console keeps getting spammed with some intermediate layout
error but I can't hold it long enough to figure out what's causing
it.

Signed-off-by: Blake Leonard <[email protected]>

* refactor: use folder add/remove icons in library

Signed-off-by: Blake Leonard <[email protected]>

* refactor: remove redundant settings page

Signed-off-by: Blake Leonard <[email protected]>

* refactor: rename "Local Tracks" to just "Local"

Not sure if this would be the recommended way to do it...

Signed-off-by: Blake Leonard <[email protected]>

* fix: console spam about useless Expanded

Signed-off-by: Blake Leonard <[email protected]>

* chore: remove completed TODO

Signed-off-by: Blake Leonard <[email protected]>

* chore: use new Platform constants; regenerate plugins

Signed-off-by: Blake Leonard <[email protected]>

* refactor: put local libraries on separate pages

Signed-off-by: Blake Leonard <[email protected]>

---------

Signed-off-by: Blake Leonard <[email protected]>
  • Loading branch information
bleonard252 authored May 23, 2024
1 parent 9aea354 commit 22caa81
Show file tree
Hide file tree
Showing 19 changed files with 621 additions and 238 deletions.
12 changes: 12 additions & 0 deletions lib/collections/routes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import 'package:spotube/pages/home/genres/genre_playlists.dart';
import 'package:spotube/pages/home/genres/genres.dart';
import 'package:spotube/pages/home/home.dart';
import 'package:spotube/pages/lastfm_login/lastfm_login.dart';
import 'package:spotube/pages/library/local_folder.dart';
import 'package:spotube/pages/library/playlist_generate/playlist_generate.dart';
import 'package:spotube/pages/library/playlist_generate/playlist_generate_result.dart';
import 'package:spotube/pages/lyrics/mini_lyrics.dart';
Expand Down Expand Up @@ -113,6 +114,17 @@ final routerProvider = Provider((ref) {
),
),
]),
GoRoute(
path: "local",
pageBuilder: (context, state) {
assert(state.extra is String);
return SpotubePage(
child: LocalLibraryPage(state.extra as String,
isDownloads: state.uri.queryParameters["downloads"] != null
),
);
},
),
]),
GoRoute(
path: "/lyrics",
Expand Down
2 changes: 2 additions & 0 deletions lib/collections/spotube_icons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,6 @@ abstract class SpotubeIcons {
static const monitor = FeatherIcons.monitor;
static const power = FeatherIcons.power;
static const bluetooth = FeatherIcons.bluetooth;
static const folderAdd = FeatherIcons.folderPlus;
static const folderRemove = FeatherIcons.folderMinus;
}
Loading

0 comments on commit 22caa81

Please sign in to comment.