mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-12 23:45:18 +00:00
chore: uncomment important lines of code
This commit is contained in:
parent
d898d45b4a
commit
1eb0b5f847
@ -39,14 +39,6 @@ class AppRouter extends RootStackRouter {
|
||||
),
|
||||
],
|
||||
),
|
||||
AutoRoute(
|
||||
path: "home/genres",
|
||||
page: GenreRoute.page,
|
||||
),
|
||||
AutoRoute(
|
||||
path: "home/genre/:categoryId",
|
||||
page: GenrePlaylistsRoute.page,
|
||||
),
|
||||
AutoRoute(
|
||||
path: "home/sections/:sectionId",
|
||||
page: HomeBrowseSectionItemsRoute.page,
|
||||
@ -86,14 +78,6 @@ class AppRouter extends RootStackRouter {
|
||||
page: LocalLibraryRoute.page,
|
||||
// parentNavigatorKey: shellRouteNavigatorKey,
|
||||
),
|
||||
AutoRoute(
|
||||
path: "library/generate",
|
||||
page: PlaylistGeneratorRoute.page,
|
||||
),
|
||||
AutoRoute(
|
||||
path: "library/generate/result",
|
||||
page: PlaylistGenerateResultRoute.page,
|
||||
),
|
||||
AutoRoute(
|
||||
path: "lyrics",
|
||||
page: LyricsRoute.page,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -230,9 +230,9 @@ class TrackOptions extends HookConsumerWidget {
|
||||
onSelected: (value) async {
|
||||
switch (value) {
|
||||
case TrackOptionValue.album:
|
||||
// await context.navigateTo(
|
||||
// AlbumRoute(id: track.album!.id!, album: track.album!),
|
||||
// );
|
||||
await context.navigateTo(
|
||||
AlbumRoute(id: track.album.id, album: track.album),
|
||||
);
|
||||
break;
|
||||
case TrackOptionValue.delete:
|
||||
await File((track as SpotubeLocalTrackObject).path).delete();
|
||||
|
@ -1,4 +1,6 @@
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:shadcn_flutter/shadcn_flutter.dart';
|
||||
import 'package:spotube/collections/routes.gr.dart';
|
||||
import 'package:spotube/components/image/universal_image.dart';
|
||||
import 'package:spotube/components/ui/button_tile.dart';
|
||||
import 'package:spotube/extensions/string.dart';
|
||||
@ -32,7 +34,7 @@ class StatsPlaylistItem extends StatelessWidget {
|
||||
),
|
||||
trailing: info,
|
||||
onPressed: () {
|
||||
// context.navigateTo(PlaylistRoute(id: playlist.id!, playlist: playlist));
|
||||
context.navigateTo(PlaylistRoute(id: playlist.id, playlist: playlist));
|
||||
},
|
||||
);
|
||||
}
|
||||
|
@ -55,11 +55,10 @@ class AlbumPage extends HookConsumerWidget {
|
||||
await tracksNotifier.fetchMore();
|
||||
},
|
||||
onFetchAll: () async {
|
||||
// return tracksNotifier.fetchAll();
|
||||
return [];
|
||||
return tracksNotifier.fetchAll();
|
||||
},
|
||||
onRefresh: () async {
|
||||
// ref.invalidate(albumTracksProvider(album));
|
||||
ref.invalidate(metadataPluginAlbumTracksProvider(album.id));
|
||||
},
|
||||
),
|
||||
routePath: "/album/${album.id}",
|
||||
|
@ -4,10 +4,12 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:shadcn_flutter/shadcn_flutter.dart';
|
||||
import 'package:skeletonizer/skeletonizer.dart';
|
||||
import 'package:spotube/collections/fake.dart';
|
||||
import 'package:spotube/collections/routes.gr.dart';
|
||||
import 'package:spotube/collections/spotube_icons.dart';
|
||||
import 'package:spotube/components/heart_button/heart_button.dart';
|
||||
import 'package:spotube/components/image/universal_image.dart';
|
||||
import 'package:spotube/components/links/artist_link.dart';
|
||||
import 'package:spotube/components/links/link_text.dart';
|
||||
import 'package:spotube/components/titlebar/titlebar.dart';
|
||||
import 'package:spotube/components/track_tile/track_options.dart';
|
||||
import 'package:spotube/extensions/context.dart';
|
||||
@ -140,16 +142,16 @@ class TrackPage extends HookConsumerWidget {
|
||||
children: [
|
||||
const Icon(SpotubeIcons.album),
|
||||
const Gap(5),
|
||||
// Flexible(
|
||||
// child: LinkText(
|
||||
// track.album!.name!,
|
||||
// AlbumRoute(
|
||||
// id: track.album!.id!,
|
||||
// album: track.album!,
|
||||
// ),
|
||||
// push: true,
|
||||
// ),
|
||||
// ),
|
||||
Flexible(
|
||||
child: LinkText(
|
||||
track.album.name,
|
||||
AlbumRoute(
|
||||
id: track.album.id,
|
||||
album: track.album,
|
||||
),
|
||||
push: true,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const Gap(10),
|
||||
|
@ -16,53 +16,6 @@ class SyncedLyricsNotifier
|
||||
extends FamilyAsyncNotifier<SubtitleSimple, SpotubeTrackObject?> {
|
||||
SpotubeTrackObject get _track => arg!;
|
||||
|
||||
// Future<SubtitleSimple> getSpotifyLyrics(String? token) async {
|
||||
// final res = await globalDio.getUri(
|
||||
// Uri.parse(
|
||||
// "https://spclient.wg.spotify.com/color-lyrics/v2/track/${_track.id}?format=json&market=from_token",
|
||||
// ),
|
||||
// options: Options(
|
||||
// headers: {
|
||||
// "User-Agent":
|
||||
// "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.0.0 Safari/537.36",
|
||||
// "App-platform": "WebPlayer",
|
||||
// "authorization": "Bearer $token"
|
||||
// },
|
||||
// responseType: ResponseType.json,
|
||||
// validateStatus: (status) => true,
|
||||
// ),
|
||||
// );
|
||||
|
||||
// if (res.statusCode != 200) {
|
||||
// return SubtitleSimple(
|
||||
// lyrics: [],
|
||||
// name: _track.name!,
|
||||
// uri: res.realUri,
|
||||
// rating: 0,
|
||||
// provider: "Spotify",
|
||||
// );
|
||||
// }
|
||||
// final linesRaw =
|
||||
// Map.castFrom<dynamic, dynamic, String, dynamic>(res.data)["lyrics"]
|
||||
// ?["lines"] as List?;
|
||||
|
||||
// final lines = linesRaw?.map((line) {
|
||||
// return LyricSlice(
|
||||
// time: Duration(milliseconds: int.parse(line["startTimeMs"])),
|
||||
// text: line["words"] as String,
|
||||
// );
|
||||
// }).toList() ??
|
||||
// [];
|
||||
|
||||
// return SubtitleSimple(
|
||||
// lyrics: lines,
|
||||
// name: _track.name!,
|
||||
// uri: res.realUri,
|
||||
// rating: 100,
|
||||
// provider: "Spotify",
|
||||
// );
|
||||
// }
|
||||
|
||||
/// Lyrics credits: [lrclib.net](https://lrclib.net) and their contributors
|
||||
/// Thanks for their generous public API
|
||||
Future<SubtitleSimple> getLRCLibLyrics() async {
|
||||
|
Loading…
Reference in New Issue
Block a user