Skip to content

Commit

Permalink
feat: show country code piped instance list
Browse files Browse the repository at this point in the history
  • Loading branch information
KRTirtho committed Jun 28, 2023
1 parent 17a25a5 commit 60328a6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions lib/pages/settings/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'package:flutter_desktop_tools/flutter_desktop_tools.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:go_router/go_router.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:piped_client/piped_client.dart';
import 'package:spotube/collections/env.dart';
import 'package:spotube/collections/language_codes.dart';

Expand Down Expand Up @@ -306,7 +307,10 @@ class SettingsPage extends HookConsumerWidget {
.map(
(e) => DropdownMenuItem(
value: e.apiUrl,
child: Text(e.name),
child: Text(
"${e.name}\n"
"${e.locations.map(countryCodeToEmoji).join(" ")}",
),
),
)
.toList(),
Expand All @@ -325,7 +329,7 @@ class SettingsPage extends HookConsumerWidget {
);
}),
AdaptiveSelectTile<SearchMode>(
secondary: const Icon(SpotubeIcons.youtube),
secondary: const Icon(SpotubeIcons.search),
title: Text(context.l10n.search_mode),
value: preferences.searchMode,
options: SearchMode.values
Expand Down
4 changes: 2 additions & 2 deletions lib/provider/user_preferences_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ enum CloseBehavior {

enum SearchMode {
youtube._internal('YouTube'),
youtubeMusic._internal('YouTubeMusic');
youtubeMusic._internal('YouTube Music');

final String label;

Expand Down Expand Up @@ -83,7 +83,7 @@ class UserPreferences extends PersistedChangeNotifier {
this.showSystemTrayIcon = true,
this.locale = const Locale("system", "system"),
this.pipedInstance = "https://pipedapi.kavin.rocks",
this.searchMode = SearchMode.youtubeMusic,
this.searchMode = SearchMode.youtube,
this.skipNonMusic = true,
}) : super() {
if (downloadLocation.isEmpty) {
Expand Down

0 comments on commit 60328a6

Please sign in to comment.