From 8c7adde890105e0267b71994b7928277f84553e5 Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Mon, 12 Sep 2022 15:02:47 +0600 Subject: [PATCH 01/11] fix(layout): Fix adaptive UI not working correctly by providing a overriding option --- lib/components/Home/Home.dart | 17 +++--- lib/components/Home/Sidebar.dart | 58 +++++++++++++------ lib/components/Home/SpotubeNavigationBar.dart | 7 ++- lib/components/Player/Player.dart | 13 ++++- lib/components/Player/PlayerOverlay.dart | 17 +++++- lib/components/Settings/Settings.dart | 34 +++++++++++ lib/models/Logger.dart | 8 ++- lib/provider/UserPreferences.dart | 23 +++++++- 8 files changed, 144 insertions(+), 33 deletions(-) diff --git a/lib/components/Home/Home.dart b/lib/components/Home/Home.dart index dedef0ddf..efb2ddfe7 100644 --- a/lib/components/Home/Home.dart +++ b/lib/components/Home/Home.dart @@ -43,13 +43,14 @@ class Home extends HookConsumerWidget { @override Widget build(BuildContext context, ref) { - final int titleBarDragMaxWidth = useBreakpointValue( - md: 80, - lg: 256, - sm: 0, - xl: 256, - xxl: 256, + final double titleBarWidth = useBreakpointValue( + sm: 0.0, + md: 80.0, + lg: 256.0, + xl: 256.0, + xxl: 256.0, ); + final extended = ref.watch(sidebarExtendedStateProvider); final _selectedIndex = useState(0); _onSelectedIndexChanged(int index) => _selectedIndex.value = index; @@ -82,7 +83,9 @@ class Home extends HookConsumerWidget { children: [ Container( constraints: BoxConstraints( - maxWidth: titleBarDragMaxWidth.toDouble(), + maxWidth: extended == null + ? titleBarWidth + : (extended ? 256 : 80), ), color: Theme.of(context).navigationRailTheme.backgroundColor, child: MoveWindow(), diff --git a/lib/components/Home/Sidebar.dart b/lib/components/Home/Sidebar.dart index 83c72969a..ed55873cc 100644 --- a/lib/components/Home/Sidebar.dart +++ b/lib/components/Home/Sidebar.dart @@ -1,20 +1,21 @@ import 'package:badges/badges.dart'; import 'package:bitsdojo_window/bitsdojo_window.dart'; -import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:go_router/go_router.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:flutter/material.dart'; import 'package:spotube/components/Shared/UniversalImage.dart'; -import 'package:spotube/hooks/useBreakpointValue.dart'; import 'package:spotube/hooks/useBreakpoints.dart'; import 'package:spotube/models/sideBarTiles.dart'; import 'package:spotube/provider/Auth.dart'; import 'package:spotube/provider/Downloader.dart'; import 'package:spotube/provider/SpotifyRequests.dart'; +import 'package:spotube/provider/UserPreferences.dart'; import 'package:spotube/utils/platform.dart'; import 'package:spotube/utils/type_conversion_utils.dart'; +final sidebarExtendedStateProvider = StateProvider((ref) => null); + class Sidebar extends HookConsumerWidget { final int selectedIndex; final void Function(int) onSelectedIndexChanged; @@ -46,16 +47,15 @@ class Sidebar extends HookConsumerWidget { final downloadCount = ref.watch( downloaderProvider.select((s) => s.currentlyRunning), ); - - final int titleBarDragMaxWidth = useBreakpointValue( - md: 80, - lg: 256, - sm: 0, - xl: 256, - xxl: 256, - ); + final forceExtended = ref.watch(sidebarExtendedStateProvider); useEffect(() { + if (forceExtended != null) { + if (extended.value != forceExtended) { + extended.value = forceExtended; + } + return; + } if (breakpoints.isMd && extended.value) { extended.value = false; } else if (breakpoints.isMoreThanOrEqualTo(Breakpoints.lg) && @@ -65,7 +65,17 @@ class Sidebar extends HookConsumerWidget { return null; }); - if (breakpoints.isSm) return Container(); + final layoutMode = + ref.watch(userPreferencesProvider.select((s) => s.layoutMode)); + + if (layoutMode == LayoutMode.compact || + (breakpoints.isSm && layoutMode == LayoutMode.adaptive)) { + return Container(); + } + + void toggleExtended() => + ref.read(sidebarExtendedStateProvider.notifier).state = + !(forceExtended ?? extended.value); return SafeArea( child: Material( @@ -76,11 +86,11 @@ class Sidebar extends HookConsumerWidget { if (selectedIndex == 3 && kIsDesktop) SizedBox( height: appWindow.titleBarHeight, - width: titleBarDragMaxWidth.toDouble(), + width: extended.value ? 256 : 80, child: MoveWindow(), ), Padding( - padding: const EdgeInsets.only(left: 15), + padding: const EdgeInsets.only(left: 10), child: (extended.value) ? Row( children: [ @@ -88,11 +98,25 @@ class Sidebar extends HookConsumerWidget { const SizedBox( width: 10, ), - Text("Spotube", - style: Theme.of(context).textTheme.headline4), + Text( + "Spotube", + style: Theme.of(context).textTheme.headline4, + ), + IconButton( + icon: const Icon(Icons.menu_rounded), + onPressed: toggleExtended, + ), ], ) - : _buildSmallLogo(), + : Column( + children: [ + IconButton( + icon: const Icon(Icons.menu_rounded), + onPressed: toggleExtended, + ), + _buildSmallLogo(), + ], + ), ), Expanded( child: NavigationRail( @@ -130,7 +154,7 @@ class Sidebar extends HookConsumerWidget { ), ), SizedBox( - width: titleBarDragMaxWidth.toDouble(), + width: extended.value ? 256 : 80, child: Builder( builder: (context) { final data = meSnapshot.asData?.value; diff --git a/lib/components/Home/SpotubeNavigationBar.dart b/lib/components/Home/SpotubeNavigationBar.dart index e78112578..ab376404d 100644 --- a/lib/components/Home/SpotubeNavigationBar.dart +++ b/lib/components/Home/SpotubeNavigationBar.dart @@ -5,6 +5,7 @@ import 'package:spotube/components/Home/Sidebar.dart'; import 'package:spotube/hooks/useBreakpoints.dart'; import 'package:spotube/models/sideBarTiles.dart'; import 'package:spotube/provider/Downloader.dart'; +import 'package:spotube/provider/UserPreferences.dart'; class SpotubeNavigationBar extends HookConsumerWidget { final int selectedIndex; @@ -22,8 +23,12 @@ class SpotubeNavigationBar extends HookConsumerWidget { downloaderProvider.select((s) => s.currentlyRunning), ); final breakpoint = useBreakpoints(); + final layoutMode = + ref.watch(userPreferencesProvider.select((s) => s.layoutMode)); - if (breakpoint.isMoreThan(Breakpoints.sm)) return const SizedBox(); + if (layoutMode == LayoutMode.extended || + (breakpoint.isMoreThan(Breakpoints.sm) && + layoutMode == LayoutMode.adaptive)) return const SizedBox(); return NavigationBar( destinations: [ ...sidebarTileList.map( diff --git a/lib/components/Player/Player.dart b/lib/components/Player/Player.dart index 1109c6a8a..5750e1b93 100644 --- a/lib/components/Player/Player.dart +++ b/lib/components/Player/Player.dart @@ -8,6 +8,7 @@ import 'package:spotube/hooks/useBreakpoints.dart'; import 'package:spotube/models/Logger.dart'; import 'package:spotube/provider/Playback.dart'; import 'package:flutter/material.dart'; +import 'package:spotube/provider/UserPreferences.dart'; import 'package:spotube/utils/type_conversion_utils.dart'; class Player extends HookConsumerWidget { @@ -17,6 +18,8 @@ class Player extends HookConsumerWidget { @override Widget build(BuildContext context, ref) { Playback playback = ref.watch(playbackProvider); + final layoutMode = + ref.watch(userPreferencesProvider.select((s) => s.layoutMode)); final breakpoint = useBreakpoints(); @@ -51,7 +54,9 @@ class Player extends HookConsumerWidget { WidgetsBinding.instance.addPostFrameCallback((time) { // clearing the overlay-entry as passing the already available // entry will result in splashing while resizing the window - if (breakpoint.isLessThanOrEqualTo(Breakpoints.md) && + if ((layoutMode == LayoutMode.compact || + (breakpoint.isLessThanOrEqualTo(Breakpoints.md) && + layoutMode == LayoutMode.adaptive)) && entryRef.value == null && playback.track != null) { entryRef.value = OverlayEntry( @@ -75,11 +80,13 @@ class Player extends HookConsumerWidget { return () { disposeOverlay(); }; - }, [breakpoint, playback.track]); + }, [breakpoint, playback.track, layoutMode]); // returning an empty non spacious Container as the overlay will take // place in the global overlay stack aka [_entries] - if (breakpoint.isLessThanOrEqualTo(Breakpoints.md)) { + if (layoutMode == LayoutMode.compact || + (breakpoint.isLessThanOrEqualTo(Breakpoints.md) && + layoutMode == LayoutMode.adaptive)) { return Container(); } diff --git a/lib/components/Player/PlayerOverlay.dart b/lib/components/Player/PlayerOverlay.dart index b5dd5cca7..302ea109b 100644 --- a/lib/components/Player/PlayerOverlay.dart +++ b/lib/components/Player/PlayerOverlay.dart @@ -8,6 +8,7 @@ import 'package:spotube/hooks/playback.dart'; import 'package:spotube/hooks/useBreakpoints.dart'; import 'package:spotube/hooks/usePaletteColor.dart'; import 'package:spotube/provider/Playback.dart'; +import 'package:spotube/provider/UserPreferences.dart'; class PlayerOverlay extends HookConsumerWidget { final String albumArt; @@ -21,6 +22,9 @@ class PlayerOverlay extends HookConsumerWidget { Widget build(BuildContext context, ref) { final breakpoint = useBreakpoints(); final paletteColor = usePaletteColor(albumArt, ref); + final layoutMode = ref.watch( + userPreferencesProvider.select((s) => s.layoutMode), + ); var isHome = GoRouter.of(context).location == "/"; final isAllowedPage = ["/playlist/", "/album/"].any( @@ -36,8 +40,17 @@ class PlayerOverlay extends HookConsumerWidget { return AnimatedPositioned( duration: const Duration(milliseconds: 2500), right: (breakpoint.isMd && !isAllowedPage ? 10 : 5), - left: (breakpoint.isSm || isAllowedPage ? 5 : 90), - bottom: (breakpoint.isSm && !isAllowedPage ? 63 : 10), + left: (layoutMode == LayoutMode.compact || + (breakpoint.isSm && layoutMode == LayoutMode.adaptive) || + isAllowedPage + ? 5 + : 90), + bottom: (layoutMode == LayoutMode.compact && !isAllowedPage) || + (breakpoint.isSm && + layoutMode == LayoutMode.adaptive && + !isAllowedPage) + ? 63 + : 10, child: GestureDetector( onVerticalDragEnd: (details) { int sensitivity = 8; diff --git a/lib/components/Settings/Settings.dart b/lib/components/Settings/Settings.dart index 9bc358395..2ac7cea5d 100644 --- a/lib/components/Settings/Settings.dart +++ b/lib/components/Settings/Settings.dart @@ -123,6 +123,40 @@ class Settings extends HookConsumerWidget { style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), ), + AdaptiveListTile( + leading: const Icon(Icons.dashboard_rounded), + title: const Text("Layout Mode"), + subtitle: const Text( + "Override responsive layout mode settings", + ), + trailing: (context, update) => DropdownButton( + value: preferences.layoutMode, + items: const [ + DropdownMenuItem( + child: Text( + "Adaptive", + ), + value: LayoutMode.adaptive, + ), + DropdownMenuItem( + child: Text( + "Compact", + ), + value: LayoutMode.compact, + ), + DropdownMenuItem( + child: Text("Extended"), + value: LayoutMode.extended, + ), + ], + onChanged: (value) { + if (value != null) { + preferences.setLayoutMode(value); + update?.call(() {}); + } + }, + ), + ), AdaptiveListTile( leading: const Icon(Icons.dark_mode_outlined), title: const Text("Theme"), diff --git a/lib/models/Logger.dart b/lib/models/Logger.dart index d0a6288cb..029f4c147 100644 --- a/lib/models/Logger.dart +++ b/lib/models/Logger.dart @@ -4,6 +4,7 @@ import 'package:flutter/foundation.dart'; import 'package:logger/logger.dart'; import 'package:path_provider/path_provider.dart'; import 'package:path/path.dart' as path; +import 'package:spotube/utils/platform.dart'; final _loggerFactory = _SpotubeLogger(); @@ -18,8 +19,11 @@ class _SpotubeLogger extends Logger { @override void log(Level level, message, [error, StackTrace? stackTrace]) { - getApplicationDocumentsDirectory().then((dir) async { - final file = File(path.join(dir.path, ".spotube_logs")); + (kIsAndroid + ? getExternalStorageDirectory() + : getApplicationDocumentsDirectory()) + .then((dir) async { + final file = File(path.join(dir!.path, ".spotube_logs")); if (level == Level.error) { await file.writeAsString("[${DateTime.now()}]\n$message\n$stackTrace", mode: FileMode.writeOnlyAppend); diff --git a/lib/provider/UserPreferences.dart b/lib/provider/UserPreferences.dart index 3f9f00209..3b4f2906a 100644 --- a/lib/provider/UserPreferences.dart +++ b/lib/provider/UserPreferences.dart @@ -1,5 +1,4 @@ import 'dart:async'; -import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; @@ -14,6 +13,12 @@ import 'package:spotube/utils/platform.dart'; import 'package:spotube/utils/primitive_utils.dart'; import 'package:path/path.dart' as path; +enum LayoutMode { + compact, + extended, + adaptive, +} + class UserPreferences extends PersistedChangeNotifier { ThemeMode themeMode; String ytSearchFormat; @@ -30,11 +35,14 @@ class UserPreferences extends PersistedChangeNotifier { String downloadLocation; + LayoutMode layoutMode; + UserPreferences({ required this.geniusAccessToken, required this.recommendationMarket, required this.themeMode, required this.ytSearchFormat, + required this.layoutMode, this.saveTrackLyrics = false, this.accentColorScheme = Colors.green, this.backgroundColorScheme = Colors.grey, @@ -126,6 +134,12 @@ class UserPreferences extends PersistedChangeNotifier { updatePersistence(); } + void setLayoutMode(LayoutMode mode) { + layoutMode = mode; + notifyListeners(); + updatePersistence(); + } + Future _getDefaultDownloadDirectory() async { if (kIsAndroid) return "/storage/emulated/0/Download/Spotube"; return getDownloadsDirectory().then((dir) { @@ -158,6 +172,11 @@ class UserPreferences extends PersistedChangeNotifier { skipSponsorSegments = map["skipSponsorSegments"] ?? skipSponsorSegments; downloadLocation = map["downloadLocation"] ?? await _getDefaultDownloadDirectory(); + + layoutMode = LayoutMode.values.firstWhere( + (mode) => mode.name == map["layoutMode"], + orElse: () => kIsDesktop ? LayoutMode.extended : LayoutMode.compact, + ); } @override @@ -175,6 +194,7 @@ class UserPreferences extends PersistedChangeNotifier { "audioQuality": audioQuality.index, "skipSponsorSegments": skipSponsorSegments, "downloadLocation": downloadLocation, + "layoutMode": layoutMode.name, }; } } @@ -185,5 +205,6 @@ final userPreferencesProvider = ChangeNotifierProvider( recommendationMarket: 'US', themeMode: ThemeMode.system, ytSearchFormat: "\$MAIN_ARTIST - \$TITLE \$FEATURED_ARTISTS", + layoutMode: kIsMobile ? LayoutMode.compact : LayoutMode.adaptive, ), ); From 276315567647a97c7fbd5bf2f3d679df33d5e641 Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Mon, 12 Sep 2022 22:38:59 +0600 Subject: [PATCH 02/11] chore: update metadata_god deps git ref --- pubspec.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.lock b/pubspec.lock index 1b7073119..7d7b7e342 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -723,7 +723,7 @@ packages: description: path: "." ref: HEAD - resolved-ref: "7f7e4d8edecc194ca0c7a265f8aa273cd7a22022" + resolved-ref: e8cc330d9468b9dee56d84d3c03c61f9386f3aee url: "https://github.com/KRTirtho/metadata_god.git" source: git version: "0.0.1" From 5866b0fcd661cf32060bb1485ea81634fbb9b90a Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Mon, 12 Sep 2022 22:47:01 +0600 Subject: [PATCH 03/11] feat: add macos audio metadata tags support --- pubspec.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.lock b/pubspec.lock index 7d7b7e342..1a8cb9d47 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -723,7 +723,7 @@ packages: description: path: "." ref: HEAD - resolved-ref: e8cc330d9468b9dee56d84d3c03c61f9386f3aee + resolved-ref: "737b3c0be8c286840edafcefe317399c4d50fdac" url: "https://github.com/KRTirtho/metadata_god.git" source: git version: "0.0.1" From 16064f68e882b091401ace4b895e387f46635800 Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Mon, 12 Sep 2022 22:49:01 +0600 Subject: [PATCH 04/11] feat: remove macos bounds for reading and writing audio metadata --- lib/components/Library/UserLocalTracks.dart | 12 ------------ lib/provider/Downloader.dart | 4 ---- 2 files changed, 16 deletions(-) diff --git a/lib/components/Library/UserLocalTracks.dart b/lib/components/Library/UserLocalTracks.dart index 02aa0a9ed..f917d0c80 100644 --- a/lib/components/Library/UserLocalTracks.dart +++ b/lib/components/Library/UserLocalTracks.dart @@ -13,7 +13,6 @@ import 'package:spotube/models/CurrentPlaylist.dart'; import 'package:spotube/models/Logger.dart'; import 'package:spotube/provider/Playback.dart'; import 'package:spotube/provider/UserPreferences.dart'; -import 'package:spotube/utils/platform.dart'; import 'package:spotube/utils/primitive_utils.dart'; import 'package:spotube/utils/type_conversion_utils.dart'; @@ -45,17 +44,6 @@ final localTracksProvider = FutureProvider>((ref) async { } final entities = downloadDir.listSync(recursive: true); - // TODO: Add MacOS audiotag reading support - if (kIsMacOS) { - return entities - .map( - (entity) => TypeConversionUtils.localTrack_X_Track( - File(entity.path), - ), - ) - .toList(); - } - final filesWithMetadata = (await Future.wait( entities.map((e) => File(e.path)).where((file) { final mimetype = lookupMimeType(file.path); diff --git a/lib/provider/Downloader.dart b/lib/provider/Downloader.dart index d1346b6b9..30596cc0f 100644 --- a/lib/provider/Downloader.dart +++ b/lib/provider/Downloader.dart @@ -13,7 +13,6 @@ import 'package:spotube/models/SpotubeTrack.dart'; import 'package:spotube/provider/Playback.dart'; import 'package:spotube/provider/UserPreferences.dart'; import 'package:spotube/provider/YouTube.dart'; -import 'package:spotube/utils/platform.dart'; import 'package:spotube/utils/type_conversion_utils.dart'; import 'package:youtube_explode_dart/youtube_explode_dart.dart' hide Comment; @@ -94,9 +93,6 @@ class Downloader with ChangeNotifier { "[addToQueue] Download of ${file.path} is done successfully", ); - // TODO: Add MacOS audiotag writing support - if (kIsMacOS) return; - logger.v( "[addToQueue] Writing metadata to ${file.path}", ); From 427954150ab65b250e79fc844fc864abff5b6972 Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Tue, 13 Sep 2022 09:38:12 +0600 Subject: [PATCH 05/11] fix(artist-page): SpotubeMarqueeText used in ArtistCard crashes the app --- lib/components/Artist/ArtistCard.dart | 67 ++++++++++++++++++--------- 1 file changed, 45 insertions(+), 22 deletions(-) diff --git a/lib/components/Artist/ArtistCard.dart b/lib/components/Artist/ArtistCard.dart index 7b43cd796..cf13be86a 100644 --- a/lib/components/Artist/ArtistCard.dart +++ b/lib/components/Artist/ArtistCard.dart @@ -1,9 +1,8 @@ -import 'package:cached_network_image/cached_network_image.dart'; +import 'package:auto_size_text/auto_size_text.dart'; import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; import 'package:spotify/spotify.dart'; import 'package:spotube/components/Shared/HoverBuilder.dart'; -import 'package:spotube/components/Shared/SpotubeMarqueeText.dart'; import 'package:spotube/components/Shared/UniversalImage.dart'; import 'package:spotube/utils/type_conversion_utils.dart'; @@ -13,11 +12,12 @@ class ArtistCard extends StatelessWidget { @override Widget build(BuildContext context) { - final backgroundImage = - UniversalImage.imageProvider(TypeConversionUtils.image_X_UrlString( - artist.images, - placeholder: ImagePlaceholder.artist, - )); + final backgroundImage = UniversalImage.imageProvider( + TypeConversionUtils.image_X_UrlString( + artist.images, + placeholder: ImagePlaceholder.artist, + ), + ); return SizedBox( height: 240, width: 200, @@ -34,32 +34,55 @@ class ArtistCard extends StatelessWidget { borderRadius: BorderRadius.circular(8), boxShadow: [ BoxShadow( - blurRadius: 10, - offset: const Offset(0, 3), - spreadRadius: 5, - color: Theme.of(context).shadowColor) + blurRadius: 10, + offset: const Offset(0, 3), + spreadRadius: 5, + color: Theme.of(context).shadowColor, + ) ], ), child: Padding( padding: const EdgeInsets.all(15), child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - CircleAvatar( - maxRadius: 80, - minRadius: 20, - backgroundImage: backgroundImage, + Stack( + children: [ + CircleAvatar( + maxRadius: 80, + minRadius: 20, + backgroundImage: backgroundImage, + ), + Positioned( + right: 0, + child: Container( + padding: const EdgeInsets.symmetric( + horizontal: 10, + vertical: 5, + ), + decoration: BoxDecoration( + color: Colors.blue, + borderRadius: BorderRadius.circular(50)), + child: const Text( + "Artist", + style: TextStyle( + color: Colors.white, + fontSize: 12, + fontWeight: FontWeight.bold, + ), + ), + ), + ), + ], ), - SpotubeMarqueeText( - text: artist.name!, + AutoSizeText( + artist.name!, + maxLines: 2, + textAlign: TextAlign.center, style: Theme.of(context).textTheme.bodyLarge!.copyWith( fontWeight: FontWeight.bold, ), - isHovering: isHovering, ), - Text( - "Artist", - style: Theme.of(context).textTheme.subtitle1, - ) ], ), ), From d5ff927c7273b6e72c5d775ee777f2cbd0d6d05c Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Tue, 13 Sep 2022 09:42:31 +0600 Subject: [PATCH 06/11] feat(search): horizontal swipe scroll support for Desktop platform --- lib/components/Search/Search.dart | 107 +++++++++++++++++++----------- 1 file changed, 68 insertions(+), 39 deletions(-) diff --git a/lib/components/Search/Search.dart b/lib/components/Search/Search.dart index 47404d18c..b8762c4fd 100644 --- a/lib/components/Search/Search.dart +++ b/lib/components/Search/Search.dart @@ -1,3 +1,4 @@ +import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart' hide Page; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -147,19 +148,28 @@ class Search extends HookConsumerWidget { style: Theme.of(context).textTheme.headline5, ), const SizedBox(height: 10), - Scrollbar( - controller: albumController, - child: SingleChildScrollView( - scrollDirection: Axis.horizontal, + ScrollConfiguration( + behavior: + ScrollConfiguration.of(context).copyWith( + dragDevices: { + PointerDeviceKind.touch, + PointerDeviceKind.mouse, + }, + ), + child: Scrollbar( controller: albumController, - child: Row( - children: albums.map((album) { - return AlbumCard( - TypeConversionUtils.simpleAlbum_X_Album( - album, - ), - ); - }).toList(), + child: SingleChildScrollView( + scrollDirection: Axis.horizontal, + controller: albumController, + child: Row( + children: albums.map((album) { + return AlbumCard( + TypeConversionUtils.simpleAlbum_X_Album( + album, + ), + ); + }).toList(), + ), ), ), ), @@ -170,21 +180,30 @@ class Search extends HookConsumerWidget { style: Theme.of(context).textTheme.headline5, ), const SizedBox(height: 10), - Scrollbar( - controller: artistController, - child: SingleChildScrollView( - scrollDirection: Axis.horizontal, + ScrollConfiguration( + behavior: + ScrollConfiguration.of(context).copyWith( + dragDevices: { + PointerDeviceKind.touch, + PointerDeviceKind.mouse, + }, + ), + child: Scrollbar( controller: artistController, - child: Row( - children: artists - .map( - (artist) => Container( - margin: const EdgeInsets.symmetric( - horizontal: 15), - child: ArtistCard(artist), - ), - ) - .toList(), + child: SingleChildScrollView( + scrollDirection: Axis.horizontal, + controller: artistController, + child: Row( + children: artists + .map( + (artist) => Container( + margin: const EdgeInsets.symmetric( + horizontal: 15), + child: ArtistCard(artist), + ), + ) + .toList(), + ), ), ), ), @@ -195,20 +214,30 @@ class Search extends HookConsumerWidget { style: Theme.of(context).textTheme.headline5, ), const SizedBox(height: 10), - Scrollbar( - scrollbarOrientation: breakpoint > Breakpoints.md - ? ScrollbarOrientation.bottom - : ScrollbarOrientation.top, - controller: playlistController, - child: SingleChildScrollView( - scrollDirection: Axis.horizontal, + ScrollConfiguration( + behavior: + ScrollConfiguration.of(context).copyWith( + dragDevices: { + PointerDeviceKind.touch, + PointerDeviceKind.mouse, + }, + ), + child: Scrollbar( + scrollbarOrientation: + breakpoint > Breakpoints.md + ? ScrollbarOrientation.bottom + : ScrollbarOrientation.top, controller: playlistController, - child: Row( - children: playlists - .map( - (playlist) => PlaylistCard(playlist), - ) - .toList(), + child: SingleChildScrollView( + scrollDirection: Axis.horizontal, + controller: playlistController, + child: Row( + children: playlists + .map( + (playlist) => PlaylistCard(playlist), + ) + .toList(), + ), ), ), ), From 74d56792c6e7ab4029218ff997cdb6026091f3c4 Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Tue, 13 Sep 2022 09:53:38 +0600 Subject: [PATCH 07/11] chore(player-controls): add bottom space to life up player control buttons --- lib/components/Player/PlayerControls.dart | 52 ++++++++++++++--------- 1 file changed, 31 insertions(+), 21 deletions(-) diff --git a/lib/components/Player/PlayerControls.dart b/lib/components/Player/PlayerControls.dart index 204ad7089..b6096e869 100644 --- a/lib/components/Player/PlayerControls.dart +++ b/lib/components/Player/PlayerControls.dart @@ -31,25 +31,26 @@ class PlayerControls extends HookConsumerWidget { child: Column( children: [ StreamBuilder( - stream: playback.player.onPositionChanged, - builder: (context, snapshot) { - final totalMinutes = PrimitiveUtils.zeroPadNumStr( - duration.inMinutes.remainder(60)); - final totalSeconds = PrimitiveUtils.zeroPadNumStr( - duration.inSeconds.remainder(60)); - final currentMinutes = snapshot.hasData - ? PrimitiveUtils.zeroPadNumStr( - snapshot.data!.inMinutes.remainder(60)) - : "00"; - final currentSeconds = snapshot.hasData - ? PrimitiveUtils.zeroPadNumStr( - snapshot.data!.inSeconds.remainder(60)) - : "00"; + stream: playback.player.onPositionChanged, + builder: (context, snapshot) { + final totalMinutes = PrimitiveUtils.zeroPadNumStr( + duration.inMinutes.remainder(60)); + final totalSeconds = PrimitiveUtils.zeroPadNumStr( + duration.inSeconds.remainder(60)); + final currentMinutes = snapshot.hasData + ? PrimitiveUtils.zeroPadNumStr( + snapshot.data!.inMinutes.remainder(60)) + : "00"; + final currentSeconds = snapshot.hasData + ? PrimitiveUtils.zeroPadNumStr( + snapshot.data!.inSeconds.remainder(60)) + : "00"; - final sliderMax = duration.inSeconds; - final sliderValue = snapshot.data?.inSeconds ?? 0; + final sliderMax = duration.inSeconds; + final sliderValue = snapshot.data?.inSeconds ?? 0; - return HookBuilder(builder: (context) { + return HookBuilder( + builder: (context) { final progressStatic = (sliderMax == 0 || sliderValue > sliderMax) ? 0 @@ -84,7 +85,9 @@ class PlayerControls extends HookConsumerWidget { activeColor: iconColor, ), Padding( - padding: const EdgeInsets.symmetric(horizontal: 8.0), + padding: const EdgeInsets.symmetric( + horizontal: 8.0, + ), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -97,8 +100,10 @@ class PlayerControls extends HookConsumerWidget { ), ], ); - }); - }), + }, + ); + }, + ), Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ @@ -122,7 +127,11 @@ class PlayerControls extends HookConsumerWidget { }), IconButton( icon: playback.status == PlaybackStatus.loading - ? const CircularProgressIndicator() + ? const SizedBox( + height: 20, + width: 20, + child: CircularProgressIndicator(), + ) : Icon( playback.isPlaying ? Icons.pause_rounded @@ -151,6 +160,7 @@ class PlayerControls extends HookConsumerWidget { ) ], ), + const SizedBox(height: 5) ], )); } From 1a3556d39e8473cadb6143192c48465dc6485599 Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Tue, 13 Sep 2022 10:13:54 +0600 Subject: [PATCH 08/11] fix(local-track): throwing exception when downloadLocation is empty chore: bumped `audioplayers` to a git ref --- lib/components/Library/UserLocalTracks.dart | 6 +- pubspec.lock | 28 +++----- pubspec.yaml | 73 ++------------------- 3 files changed, 19 insertions(+), 88 deletions(-) diff --git a/lib/components/Library/UserLocalTracks.dart b/lib/components/Library/UserLocalTracks.dart index f917d0c80..d481ecf15 100644 --- a/lib/components/Library/UserLocalTracks.dart +++ b/lib/components/Library/UserLocalTracks.dart @@ -35,9 +35,11 @@ const imgMimeToExt = { final localTracksProvider = FutureProvider>((ref) async { try { - final downloadDir = Directory( - ref.watch(userPreferencesProvider.select((s) => s.downloadLocation)), + final downloadLocation = ref.watch( + userPreferencesProvider.select((s) => s.downloadLocation), ); + if (downloadLocation.isEmpty) return []; + final downloadDir = Directory(downloadLocation); if (!await downloadDir.exists()) { await downloadDir.create(recursive: true); return []; diff --git a/pubspec.lock b/pubspec.lock index 1a8cb9d47..e7119321b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -15,13 +15,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.1.0" - ansicolor: - dependency: transitive - description: - name: ansicolor - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.1" app_package_maker: dependency: transitive description: @@ -130,9 +123,11 @@ packages: audioplayers: dependency: "direct main" description: - name: audioplayers - url: "https://pub.dartlang.org" - source: hosted + path: "packages/audioplayers" + ref: "3ee12cd0361c0fc2f3d0303c504732d12fa8e49a" + resolved-ref: "3ee12cd0361c0fc2f3d0303c504732d12fa8e49a" + url: "https://github.com/bluefireteam/audioplayers.git" + source: git version: "1.0.1" audioplayers_android: dependency: transitive @@ -196,7 +191,7 @@ packages: name: bitsdojo_window url: "https://pub.dartlang.org" source: hosted - version: "0.1.4" + version: "0.1.5" bitsdojo_window_linux: dependency: transitive description: @@ -224,7 +219,7 @@ packages: name: bitsdojo_window_windows url: "https://pub.dartlang.org" source: hosted - version: "0.1.4" + version: "0.1.5" boolean_selector: dependency: transitive description: @@ -734,13 +729,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.2" - msix: - dependency: "direct dev" - description: - name: msix - url: "https://pub.dartlang.org" - source: hosted - version: "2.8.18" oauth2: dependency: transitive description: @@ -824,7 +812,7 @@ packages: name: path_provider url: "https://pub.dartlang.org" source: hosted - version: "2.0.10" + version: "2.0.11" path_provider_android: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index bdef24544..e9e222c84 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,37 +1,16 @@ name: spotube description: A lightweight free Spotify crossplatform-client which handles playback manually, streams music using Youtube & no Spotify premium account is needed -# The following line prevents the package from being accidentally published to -# pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: "none" # Remove this line if you wish to publish to pub.dev +publish_to: "none" -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html version: 2.4.0+13 environment: sdk: ">=2.17.0 <3.0.0" -# Dependencies specify other packages that your package needs in order to work. -# To automatically upgrade your package dependencies to the latest versions -# consider running `flutter pub upgrade --major-versions`. Alternatively, -# dependencies can be manually updated by changing the version numbers below to -# the latest version available on pub.dev. To see which dependencies have newer -# versions available, run `flutter pub outdated`. dependencies: flutter: sdk: flutter - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 cached_network_image: ^3.2.0 html: ^0.15.0 @@ -40,7 +19,7 @@ dependencies: spotify: ^0.8.0 url_launcher: ^6.0.17 youtube_explode_dart: ^1.10.8 - bitsdojo_window: 0.1.4 + bitsdojo_window: ^0.1.5 path: ^1.8.0 path_provider: ^2.0.8 collection: ^1.15.0 @@ -61,7 +40,11 @@ dependencies: hive: ^2.2.2 hive_flutter: ^1.1.0 dbus: ^0.7.3 - audioplayers: ^1.0.1 + audioplayers: + git: + url: https://github.com/bluefireteam/audioplayers.git + ref: 3ee12cd0361c0fc2f3d0303c504732d12fa8e49a + path: packages/audioplayers/ introduction_screen: ^3.0.2 audio_session: ^0.1.9 # This is temporary until the win32v3 update PR is merged and released @@ -85,60 +68,18 @@ dependency_overrides: dev_dependencies: flutter_test: sdk: flutter - msix: ^2.8.0 - - # The "flutter_lints" package below contains a set of recommended lints to - # encourage good coding practices. The lint set provided by the package is - # activated in the `analysis_options.yaml` file located at the root of your - # package. See that file for information about deactivating specific lint - # rules and activating additional ones. flutter_lints: ^1.0.0 flutter_launcher_icons: ^0.9.2 hive_generator: ^1.1.3 build_runner: ^2.1.11 flutter_distributor: ^0.0.2 -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter. flutter: - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. uses-material-design: true - - # To add assets to your application, add an assets section, like this: assets: - assets/ - assets/tutorial/ - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware. - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages - flutter_icons: android: true image_path: "assets/spotube-logo.png" From 91048f9b15cf0973530d812c3ca80ca7e9aeb92d Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Tue, 13 Sep 2022 12:23:07 +0600 Subject: [PATCH 09/11] chore: use metadata_god pub.dev version --- macos/Flutter/GeneratedPluginRegistrant.swift | 2 ++ pubspec.lock | 10 ++++------ pubspec.yaml | 4 +--- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 3e375fb36..eb3904ca3 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -9,6 +9,7 @@ import audio_service import audio_session import audioplayers_darwin import bitsdojo_window_macos +import metadata_god import package_info_plus_macos import path_provider_macos import shared_preferences_macos @@ -20,6 +21,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin")) AudioplayersDarwinPlugin.register(with: registry.registrar(forPlugin: "AudioplayersDarwinPlugin")) BitsdojoWindowPlugin.register(with: registry.registrar(forPlugin: "BitsdojoWindowPlugin")) + MetadataGodPlugin.register(with: registry.registrar(forPlugin: "MetadataGodPlugin")) FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) diff --git a/pubspec.lock b/pubspec.lock index e7119321b..2b3ebd268 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -716,12 +716,10 @@ packages: metadata_god: dependency: "direct main" description: - path: "." - ref: HEAD - resolved-ref: "737b3c0be8c286840edafcefe317399c4d50fdac" - url: "https://github.com/KRTirtho/metadata_god.git" - source: git - version: "0.0.1" + name: metadata_god + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.0" mime: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index e9e222c84..f3557ff6b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -56,9 +56,7 @@ dependencies: auto_size_text: ^3.0.0 badges: ^2.0.3 mime: ^1.0.2 - metadata_god: - git: - url: https://github.com/KRTirtho/metadata_god.git + metadata_god: ^0.1.0 # Temporary before [package_info_plus_windows] is updated to support # win32v3 From a3b64d3ebe797366acb700194ceec32a8401747e Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Tue, 13 Sep 2022 12:45:12 +0600 Subject: [PATCH 10/11] chore: bump next release version and add CHANGELOG cd: release GHA uses git tags and runs on publish --- .github/workflows/spotube-release.yml | 103 +++++++++++++------------- CHANGELOG.md | 20 +++++ lib/components/Settings/About.dart | 7 +- pubspec.yaml | 2 +- 4 files changed, 75 insertions(+), 57 deletions(-) diff --git a/.github/workflows/spotube-release.yml b/.github/workflows/spotube-release.yml index f446af7c5..4f9d1528c 100644 --- a/.github/workflows/spotube-release.yml +++ b/.github/workflows/spotube-release.yml @@ -1,10 +1,8 @@ name: Spotube Release on: - workflow_dispatch: - inputs: - tag: - description: The tag to release - required: true + release: + types: + - published jobs: publish_chocolatey: @@ -16,18 +14,17 @@ jobs: repository: KRTirtho/flutter_distributor ref: deb-implementation path: build/flutter_distributor - # - name: Get latest tag - # id: tag - # uses: dawidd6/action-get-tag@v1 - # with: - # # Optionally strip `v` prefix - # strip_v: true + - name: Get latest tag + id: tag + uses: dawidd6/action-get-tag@v1 + with: + strip_v: true # Replace Version in files - run: | choco install sed make -y - sed -i "s/%{{SPOTUBE_VERSION}}%/${{ github.event.inputs.tag }}/" windows/runner/Runner.rc - sed -i "s/%{{SPOTUBE_VERSION}}%/${{ github.event.inputs.tag }}/" choco-struct/tools/VERIFICATION.txt - sed -i "s/%{{SPOTUBE_VERSION}}%/${{ github.event.inputs.tag }}/" choco-struct/spotube.nuspec + sed -i "s/%{{SPOTUBE_VERSION}}%/${{ steps.tag.outputs.tag }}/" windows/runner/Runner.rc + sed -i "s/%{{SPOTUBE_VERSION}}%/${{ steps.tag.outputs.tag }}/" choco-struct/tools/VERIFICATION.txt + sed -i "s/%{{SPOTUBE_VERSION}}%/${{ steps.tag.outputs.tag }}/" choco-struct/spotube.nuspec # Build Windows Executable - uses: subosito/flutter-action@v2.2.0 @@ -67,11 +64,11 @@ jobs: runs-on: macos-11 steps: - uses: actions/checkout@v2 - # - name: Get latest tag - # uses: dawidd6/action-get-tag@v1 - # id: tag - # with: - # strip_v: true + - name: Get latest tag + uses: dawidd6/action-get-tag@v1 + id: tag + with: + strip_v: true - uses: subosito/flutter-action@v2 with: cache: true @@ -82,23 +79,23 @@ jobs: - run: du -sh build/macos/Build/Products/Release/spotube.app - run: npm install -g appdmg # using a versioned path for compatibility in gensums - - run: mkdir -p build/${{ github.event.inputs.tag }} - - run: appdmg appdmg.json build/${{ github.event.inputs.tag }}/Spotube-macos-x86_64.dmg + - run: mkdir -p build/${{ steps.tag.outputs.tag }} + - run: appdmg appdmg.json build/${{ steps.tag.outputs.tag }}/Spotube-macos-x86_64.dmg - uses: actions/upload-artifact@v2 with: name: Spotube-Macos-Bundle path: | - build/${{ github.event.inputs.tag }}/Spotube-macos-x86_64.dmg + build/${{ steps.tag.outputs.tag }}/Spotube-macos-x86_64.dmg publish_linux: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - # - name: Get latest tag - # id: tag - # uses: dawidd6/action-get-tag@v1 - # with: - # strip_v: true + - name: Get latest tag + id: tag + uses: dawidd6/action-get-tag@v1 + with: + strip_v: true - uses: subosito/flutter-action@v2 with: cache: true @@ -114,7 +111,7 @@ jobs: mv appimage-builder-x86_64.AppImage /usr/local/bin/appimage-builder # replacing & adding new release version with older version - run: | - sed -i 's|%{{APPDATA_RELEASE}}%||' linux/com.github.KRTirtho.Spotube.appdata.xml + sed -i 's|%{{APPDATA_RELEASE}}%||' linux/com.github.KRTirtho.Spotube.appdata.xml - run: | flutter config --enable-linux-desktop @@ -136,11 +133,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - # - name: Get latest tag - # id: tag - # uses: dawidd6/action-get-tag@v1 - # with: - # strip_v: true + - name: Get latest tag + id: tag + uses: dawidd6/action-get-tag@v1 + with: + strip_v: true - uses: subosito/flutter-action@v2 with: cache: true @@ -187,11 +184,11 @@ jobs: with: name: Spotube-Android-Bundle path: ./Spotube-Android-Bundle - # - name: Get latest tag - # id: tag - # uses: dawidd6/action-get-tag@v1 - # with: - # strip_v: true + - name: Get latest tag + id: tag + uses: dawidd6/action-get-tag@v1 + with: + strip_v: true - run: sudo apt-get install tree -y # generating checksums for all the binary - run: | @@ -209,7 +206,7 @@ jobs: - uses: ncipollo/release-action@v1 with: token: ${{ secrets.GITHUB_TOKEN }} - tag: v${{ github.event.inputs.tag }} + tag: v${{ steps.tag.outputs.tag }} omitBodyDuringUpdate: true omitNameDuringUpdate: true omitPrereleaseDuringUpdate: true @@ -236,17 +233,17 @@ jobs: - uses: actions/checkout@v3 with: path: spotube - # - name: Get latest tag - # id: tag - # uses: dawidd6/action-get-tag@v1 - # with: - # strip_v: true + - name: Get latest tag + id: tag + uses: dawidd6/action-get-tag@v1 + with: + strip_v: true - run: | - python3 spotube/scripts/update_flathub_version.py ${{ github.event.inputs.tag }} + python3 spotube/scripts/update_flathub_version.py ${{ steps.tag.outputs.tag }} rm -rf spotube - uses: EndBug/add-and-commit@v9 with: - message: v${{ github.event.inputs.tag }} Update + message: v${{ steps.tag.outputs.tag }} Update push: origin master publish_aur: @@ -254,17 +251,17 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - # - name: Get latest tag - # id: tag - # uses: dawidd6/action-get-tag@v1 - # with: - # strip_v: true + - name: Get latest tag + id: tag + uses: dawidd6/action-get-tag@v1 + with: + strip_v: true - uses: actions/download-artifact@v3 with: name: Spotube-Linux-Bundle path: ./Spotube-Linux-Bundle - run: | - sed -i "s/%{{SPOTUBE_VERSION}}%/${{ github.event.inputs.tag }}/" aur-struct/PKGBUILD + sed -i "s/%{{SPOTUBE_VERSION}}%/${{ steps.tag.outputs.tag }}/" aur-struct/PKGBUILD sed -i "s/%{{PKGREL}}%/1/" aur-struct/PKGBUILD sed -i "s/%{{LINUX_MD5}}%/`md5sum Spotube-Linux-Bundle/Spotube-linux-x86_64.tar.xz | awk '{print $1}'`/" aur-struct/PKGBUILD - uses: KSXGitHub/github-actions-deploy-aur@v2.2.5 @@ -274,4 +271,4 @@ jobs: commit_username: ${{ secrets.AUR_USERNAME }} commit_email: ${{ secrets.AUR_EMAIL }} ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} - commit_message: Updated to v${{ github.event.inputs.tag }} + commit_message: Updated to v${{ steps.tag.outputs.tag }} diff --git a/CHANGELOG.md b/CHANGELOG.md index fa2e2f4d5..cd026aab6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,23 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [2.4.1](https://github.com/KRTirtho/spotube/compare/v2.4.0...v2.4.1) (2022-09-13) + + +### Features + +* add macos audio metadata tags support ([5866b0f](https://github.com/KRTirtho/spotube/commit/5866b0fcd661cf32060bb1485ea81634fbb9b90a)) +* remove macos bounds for reading and writing audio metadata ([16064f6](https://github.com/KRTirtho/spotube/commit/16064f68e882b091401ace4b895e387f46635800)) +* **search:** horizontal swipe scroll support for Desktop platform ([d5ff927](https://github.com/KRTirtho/spotube/commit/d5ff927c7273b6e72c5d775ee777f2cbd0d6d05c)) + + +### Bug Fixes + +* **artist-page:** SpotubeMarqueeText used in ArtistCard crashes the app ([4279541](https://github.com/KRTirtho/spotube/commit/427954150ab65b250e79fc844fc864abff5b6972)) +* **layout:** Fix adaptive UI not working correctly by providing a overriding option ([8c7adde](https://github.com/KRTirtho/spotube/commit/8c7adde890105e0267b71994b7928277f84553e5)) +* **local-track:** throwing exception when downloadLocation is empty ([1a3556d](https://github.com/KRTirtho/spotube/commit/1a3556d39e8473cadb6143192c48465dc6485599)) + ## [2.4.0](https://github.com/KRTirtho/spotube/compare/v2.3.0...v2.4.0) (2022-09-09) diff --git a/lib/components/Settings/About.dart b/lib/components/Settings/About.dart index d520a3b5b..33b14396b 100644 --- a/lib/components/Settings/About.dart +++ b/lib/components/Settings/About.dart @@ -24,9 +24,10 @@ class About extends HookWidget { @override Widget build(BuildContext context) { final info = usePackageInfo( - appName: "Spotube", - packageName: "oss.krtirtho.Spotube", - version: "2.4.0"); + appName: "Spotube", + packageName: "oss.krtirtho.Spotube", + version: "2.4.1", + ); return ListTile( leading: Icon(Icons.info_outline_rounded), diff --git a/pubspec.yaml b/pubspec.yaml index f3557ff6b..d385b5184 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: A lightweight free Spotify crossplatform-client which handles playb publish_to: "none" -version: 2.4.0+13 +version: 2.4.1+14 environment: sdk: ">=2.17.0 <3.0.0" From 08575e3d09d90bb5144600c0c66316822956f628 Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Tue, 13 Sep 2022 13:31:06 +0600 Subject: [PATCH 11/11] chore: update metadata_god to v0.1.1 --- macos/Flutter/GeneratedPluginRegistrant.swift | 2 -- pubspec.lock | 2 +- pubspec.yaml | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index eb3904ca3..3e375fb36 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -9,7 +9,6 @@ import audio_service import audio_session import audioplayers_darwin import bitsdojo_window_macos -import metadata_god import package_info_plus_macos import path_provider_macos import shared_preferences_macos @@ -21,7 +20,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin")) AudioplayersDarwinPlugin.register(with: registry.registrar(forPlugin: "AudioplayersDarwinPlugin")) BitsdojoWindowPlugin.register(with: registry.registrar(forPlugin: "BitsdojoWindowPlugin")) - MetadataGodPlugin.register(with: registry.registrar(forPlugin: "MetadataGodPlugin")) FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) diff --git a/pubspec.lock b/pubspec.lock index 2b3ebd268..b76961f47 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -719,7 +719,7 @@ packages: name: metadata_god url: "https://pub.dartlang.org" source: hosted - version: "0.1.0" + version: "0.1.1" mime: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index d385b5184..811f3f0e5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -56,7 +56,7 @@ dependencies: auto_size_text: ^3.0.0 badges: ^2.0.3 mime: ^1.0.2 - metadata_god: ^0.1.0 + metadata_god: ^0.1.1 # Temporary before [package_info_plus_windows] is updated to support # win32v3