Merge branch 'master' into build

This commit is contained in:
Kingkor Roy Tirtho 2022-06-05 11:45:40 +06:00
commit 6b7f50aed8
6 changed files with 68 additions and 7 deletions

View File

@ -1,3 +1,26 @@
# v2.2.0
### New
- Update checker
- Share options for playlists & track
- Android Skip to Next/Previous track from notification/lockscreen (https://github.com/KRTirtho/spotube/issues/91)
- Custom Accent Color Scheme support (Dark + Light)
- Custom Background Color Scheme support (Dark + Light)
- User customizable Audio Quality Option
- User customizable Track Matching Algorithm Option
- Material 3 Design Language and Flutter 3.0
- Caching in Playlists, Album, Search, Playlist Categories, Artist Profile & Lyrics
- M1 Mac support via MacOS Universal Binary (untested) (https://github.com/KRTirtho/spotube/pull/87)
### Improved
- Authentication is now persistent (no more re-login)
- Settings Page. Shows application details in About Dialog
- Playlist Create Dialog Scrollable
### Bug fixes
- private playlists of current user aren't shown fix (https://github.com/KRTirtho/spotube/issues/92)
- refresh token error causing re-login (culprit: internal lib spotify-dart)
- Typo in Login instructions URL
# v2.1.0 # v2.1.0
### New ### New

View File

@ -26,7 +26,7 @@ class About extends HookWidget {
final info = usePackageInfo( final info = usePackageInfo(
appName: "Spotube", appName: "Spotube",
packageName: "oss.krtirtho.Spotube", packageName: "oss.krtirtho.Spotube",
version: "2.1.0"); version: "2.2.0");
return ListTile( return ListTile(
title: const Text("About Spotube"), title: const Text("About Spotube"),

View File

@ -14,6 +14,7 @@ import 'package:spotube/models/SpotifyMarkets.dart';
import 'package:spotube/models/SpotubeTrack.dart'; import 'package:spotube/models/SpotubeTrack.dart';
import 'package:spotube/provider/Auth.dart'; import 'package:spotube/provider/Auth.dart';
import 'package:spotube/provider/UserPreferences.dart'; import 'package:spotube/provider/UserPreferences.dart';
import 'package:url_launcher/url_launcher_string.dart';
class Settings extends HookConsumerWidget { class Settings extends HookConsumerWidget {
const Settings({Key? key}) : super(key: key); const Settings({Key? key}) : super(key: key);
@ -81,6 +82,7 @@ class Settings extends HookConsumerWidget {
], ],
ListTile( ListTile(
title: const Text("Theme"), title: const Text("Theme"),
horizontalTitleGap: 10,
trailing: DropdownButton<ThemeMode>( trailing: DropdownButton<ThemeMode>(
value: preferences.themeMode, value: preferences.themeMode,
items: const [ items: const [
@ -111,6 +113,7 @@ class Settings extends HookConsumerWidget {
const SizedBox(height: 10), const SizedBox(height: 10),
ListTile( ListTile(
title: const Text("Accent Color Scheme"), title: const Text("Accent Color Scheme"),
horizontalTitleGap: 10,
trailing: ColorTile( trailing: ColorTile(
color: preferences.accentColorScheme, color: preferences.accentColorScheme,
onPressed: pickColorScheme(ColorSchemeType.accent), onPressed: pickColorScheme(ColorSchemeType.accent),
@ -121,6 +124,7 @@ class Settings extends HookConsumerWidget {
const SizedBox(height: 10), const SizedBox(height: 10),
ListTile( ListTile(
title: const Text("Background Color Scheme"), title: const Text("Background Color Scheme"),
horizontalTitleGap: 10,
trailing: ColorTile( trailing: ColorTile(
color: preferences.backgroundColorScheme, color: preferences.backgroundColorScheme,
onPressed: pickColorScheme(ColorSchemeType.background), onPressed: pickColorScheme(ColorSchemeType.background),
@ -132,6 +136,7 @@ class Settings extends HookConsumerWidget {
ListTile( ListTile(
title: title:
const Text("Market Place (Recommendation Country)"), const Text("Market Place (Recommendation Country)"),
horizontalTitleGap: 10,
trailing: DropdownButton( trailing: DropdownButton(
value: preferences.recommendationMarket, value: preferences.recommendationMarket,
items: spotifyMarkets items: spotifyMarkets
@ -148,6 +153,7 @@ class Settings extends HookConsumerWidget {
), ),
ListTile( ListTile(
title: const Text("Download lyrics along with the Track"), title: const Text("Download lyrics along with the Track"),
horizontalTitleGap: 10,
trailing: Switch.adaptive( trailing: Switch.adaptive(
activeColor: Theme.of(context).primaryColor, activeColor: Theme.of(context).primaryColor,
value: preferences.saveTrackLyrics, value: preferences.saveTrackLyrics,
@ -165,7 +171,7 @@ class Settings extends HookConsumerWidget {
flex: 2, flex: 2,
child: Text( child: Text(
"Format of the YouTube Search term (Case sensitive)", "Format of the YouTube Search term (Case sensitive)",
style: Theme.of(context).textTheme.bodyText1, style: Theme.of(context).textTheme.bodyText2,
), ),
), ),
Expanded( Expanded(
@ -180,6 +186,7 @@ class Settings extends HookConsumerWidget {
if (auth.isAnonymous) if (auth.isAnonymous)
ListTile( ListTile(
title: const Text("Login with your Spotify account"), title: const Text("Login with your Spotify account"),
horizontalTitleGap: 10,
trailing: ElevatedButton( trailing: ElevatedButton(
child: Text("Connect with Spotify".toUpperCase()), child: Text("Connect with Spotify".toUpperCase()),
onPressed: () { onPressed: () {
@ -196,6 +203,7 @@ class Settings extends HookConsumerWidget {
), ),
ListTile( ListTile(
title: const Text("Check for Update"), title: const Text("Check for Update"),
horizontalTitleGap: 10,
trailing: Switch.adaptive( trailing: Switch.adaptive(
activeColor: Theme.of(context).primaryColor, activeColor: Theme.of(context).primaryColor,
value: preferences.checkUpdate, value: preferences.checkUpdate,
@ -205,6 +213,7 @@ class Settings extends HookConsumerWidget {
), ),
ListTile( ListTile(
title: const Text("Track Match Algorithm"), title: const Text("Track Match Algorithm"),
horizontalTitleGap: 10,
trailing: DropdownButton<SpotubeTrackMatchAlgorithm>( trailing: DropdownButton<SpotubeTrackMatchAlgorithm>(
value: preferences.trackMatchAlgorithm, value: preferences.trackMatchAlgorithm,
items: const [ items: const [
@ -234,6 +243,7 @@ class Settings extends HookConsumerWidget {
), ),
ListTile( ListTile(
title: const Text("Audio Quality"), title: const Text("Audio Quality"),
horizontalTitleGap: 10,
trailing: DropdownButton<AudioQuality>( trailing: DropdownButton<AudioQuality>(
value: preferences.audioQuality, value: preferences.audioQuality,
items: const [ items: const [
@ -260,11 +270,14 @@ class Settings extends HookConsumerWidget {
Auth auth = ref.watch(authProvider); Auth auth = ref.watch(authProvider);
return ListTile( return ListTile(
title: const Text("Log out of this account"), title: const Text("Log out of this account"),
horizontalTitleGap: 10,
trailing: ElevatedButton( trailing: ElevatedButton(
child: const Text("Logout"), child: const Text("Logout"),
style: ButtonStyle( style: ButtonStyle(
backgroundColor: backgroundColor:
MaterialStateProperty.all(Colors.red), MaterialStateProperty.all(Colors.red),
foregroundColor:
MaterialStateProperty.all(Colors.white),
), ),
onPressed: () async { onPressed: () async {
SharedPreferences localStorage = SharedPreferences localStorage =
@ -276,7 +289,30 @@ class Settings extends HookConsumerWidget {
), ),
); );
}), }),
const About(), ListTile(
title: const Text(
"We know you Love Spotube",
style: TextStyle(
color: Colors.pink,
fontWeight: FontWeight.bold,
),
),
horizontalTitleGap: 10,
trailing: ElevatedButton.icon(
icon: const Icon(Icons.favorite_outline_rounded),
label: const Text("Please Sponsor/Donate"),
style: ElevatedButton.styleFrom(
primary: Colors.red[100],
onPrimary: Colors.pinkAccent,
padding: const EdgeInsets.all(15),
),
onPressed: () {
launchUrlString("https://opencollective.com/spotube",
mode: LaunchMode.externalApplication);
},
),
),
const About()
], ],
), ),
), ),

View File

@ -19,7 +19,7 @@ class HeartButton extends StatelessWidget {
(!isLiked (!isLiked
? Icons.favorite_outline_rounded ? Icons.favorite_outline_rounded
: Icons.favorite_rounded), : Icons.favorite_rounded),
color: isLiked ? Colors.green : null, color: isLiked ? Theme.of(context).primaryColor : null,
), ),
onPressed: onPressed, onPressed: onPressed,
); );

View File

@ -47,8 +47,10 @@ void useUpdateChecker(WidgetRef ref) {
useEffect(() { useEffect(() {
if (!isCheckUpdateEnabled) return null; if (!isCheckUpdateEnabled) return null;
checkUpdate().then((value) { checkUpdate().then((value) {
if (value.first == null) return; final currentVersion = value.first;
if (value.first! <= value.last) return; final latestVersion = value.last;
if (currentVersion == null || latestVersion == null) return;
if (latestVersion <= currentVersion) return;
showDialog( showDialog(
context: context, context: context,
builder: (context) { builder: (context) {

View File

@ -15,7 +15,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at # Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 2.1.0+9 version: 2.2.0+10
environment: environment:
sdk: ">=2.15.1 <3.0.0" sdk: ">=2.15.1 <3.0.0"