Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .fvmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"flutter": "3.32.2"
"flutter": "3.32.5"
}
22 changes: 4 additions & 18 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,36 @@ on:
pull_request:
branches: [main]

env:
FLUTTER_VERSION: '3.32.2'

jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: ${{env.FLUTTER_VERSION}}
- uses: kuhnroyal/flutter-fvm-config-action/setup@v3
- run: flutter pub get
- run: flutter analyze --fatal-infos

format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: ${{env.FLUTTER_VERSION}}
- uses: kuhnroyal/flutter-fvm-config-action/setup@v3
- run: flutter pub get
- run: dart format --set-exit-if-changed .

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: ${{env.FLUTTER_VERSION}}
- uses: kuhnroyal/flutter-fvm-config-action/setup@v3
- run: flutter test

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: ${{env.FLUTTER_VERSION}}
- uses: kuhnroyal/flutter-fvm-config-action/setup@v3
- run: sudo apt update
- run: sudo apt install -y clang cmake curl libgtk-3-dev ninja-build pkg-config unzip libunwind-dev libmpv-dev
- run: flutter pub get
Expand Down
3 changes: 0 additions & 3 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="29" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />
Expand Down
4 changes: 3 additions & 1 deletion lib/app/view/musicpod.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ class _MusicPodState extends State<MusicPod> {
return FutureBuilder(
key: key,
future: _allReady,
builder: (context, snapshot) => snapshot.hasData
builder: (context, snapshot) => snapshot.hasError
? SplashScreen(body: Center(child: Text(snapshot.error.toString())))
: snapshot.hasData
? isLinux
? GtkApplication(
onCommandLine: (args) =>
Expand Down
36 changes: 20 additions & 16 deletions lib/app/view/splash_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import '../../l10n/app_localizations.dart';
import '../../l10n/l10n.dart';

class SplashScreen extends StatelessWidget {
const SplashScreen({super.key});
const SplashScreen({super.key, this.body});

final Widget? body;

@override
Widget build(BuildContext context) => MaterialApp(
Expand All @@ -27,24 +29,26 @@ class SplashScreen extends StatelessWidget {
border: BorderSide.none,
backgroundColor: Colors.transparent,
),
body: Center(
child: SingleChildScrollView(
child: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Image.asset('assets/icon.png', height: 250, width: 250),
Padding(
padding: const EdgeInsets.all(20),
child: isLinux
? const YaruCircularProgressIndicator()
: const CircularProgressIndicator.adaptive(),
body:
body ??
Center(
child: SingleChildScrollView(
child: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Image.asset('assets/icon.png', height: 250, width: 250),
Padding(
padding: const EdgeInsets.all(20),
child: isLinux
? const YaruCircularProgressIndicator()
: const CircularProgressIndicator.adaptive(),
),
],
),
],
),
),
),
),
),
),
);
}
29 changes: 10 additions & 19 deletions lib/extensions/taget_platform_x.dart
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
import 'package:flutter/foundation.dart';
import 'dart:io';

extension TagetPlatformX on TargetPlatform {
bool get isIOS => this == TargetPlatform.iOS;
bool get isAndroid => this == TargetPlatform.android;
bool get isFuchsia => this == TargetPlatform.fuchsia;
bool get isMacOS => this == TargetPlatform.macOS;
bool get isWindows => this == TargetPlatform.windows;
bool get isLinux => this == TargetPlatform.linux;
bool get isDesktop => isMacOS || isWindows || isLinux;
bool get isMobile => isIOS || isAndroid || isFuchsia;
}
import 'package:flutter/foundation.dart';

bool get isDesktop => defaultTargetPlatform.isDesktop;
bool get isMobile => defaultTargetPlatform.isMobile;
bool get isLinux => defaultTargetPlatform.isLinux;
bool get isMacOS => defaultTargetPlatform.isMacOS;
bool get isWindows => defaultTargetPlatform.isWindows;
bool get isIOS => defaultTargetPlatform.isIOS;
bool get isAndroid => defaultTargetPlatform.isAndroid;
bool get isFuchsia => defaultTargetPlatform.isFuchsia;
bool get isDesktop => !kIsWeb && !isMobile;
bool get isMobile => !kIsWeb && (isIOS || isAndroid || isFuchsia);
bool get isLinux => !kIsWeb && Platform.isLinux;
bool get isMacOS => !kIsWeb && Platform.isMacOS;
bool get isWindows => !kIsWeb && Platform.isWindows;
bool get isIOS => !kIsWeb && Platform.isIOS;
bool get isAndroid => !kIsWeb && Platform.isAndroid;
bool get isFuchsia => !kIsWeb && Platform.isFuchsia;
35 changes: 10 additions & 25 deletions lib/external_path/external_path_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,29 +52,14 @@ class ExternalPathService {
return [];
}

Future<bool> _androidPermissionsGranted() async {
final mediaLibraryIsGranted =
(await Permission.mediaLibrary
.onDeniedCallback(() {})
.onGrantedCallback(() {})
.onPermanentlyDeniedCallback(() {})
.onRestrictedCallback(() {})
.onLimitedCallback(() {})
.onProvisionalCallback(() {})
.request())
.isGranted;

final manageExternalStorageIsGranted =
(await Permission.manageExternalStorage
.onDeniedCallback(() {})
.onGrantedCallback(() {})
.onPermanentlyDeniedCallback(() {})
.onRestrictedCallback(() {})
.onLimitedCallback(() {})
.onProvisionalCallback(() {})
.request())
.isGranted;

return mediaLibraryIsGranted && manageExternalStorageIsGranted;
}
Future<bool> _androidPermissionsGranted() async =>
(await Permission.audio
.onDeniedCallback(() {})
.onGrantedCallback(() {})
.onPermanentlyDeniedCallback(() {})
.onRestrictedCallback(() {})
.onLimitedCallback(() {})
.onProvisionalCallback(() {})
.request())
.isGranted;
}
44 changes: 22 additions & 22 deletions lib/l10n/app_localizations_pl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ class AppLocalizationsPl extends AppLocalizations {
String get stop => 'Stop';

@override
String get shuffle => 'Shuffle';
String get shuffle => 'Losowo';

@override
String get repeat => 'Repeat';
String get repeat => 'Powtarzaj';

@override
String get repeatAll => 'Repeat All';
Expand Down Expand Up @@ -63,10 +63,10 @@ class AppLocalizationsPl extends AppLocalizations {
String get removeFromFavorites => 'Remove from favorites';

@override
String get share => 'Share';
String get share => 'Udostępnij';

@override
String get local => 'Local';
String get local => 'Lokalne';

@override
String get localAudio => 'Lokalne pliki audio';
Expand Down Expand Up @@ -135,7 +135,7 @@ class AppLocalizationsPl extends AppLocalizations {
String get titles => 'Tytuły';

@override
String get description => 'Description';
String get description => 'Opis';

@override
String get artist => 'Artysta';
Expand Down Expand Up @@ -312,7 +312,7 @@ class AppLocalizationsPl extends AppLocalizations {
String get station => 'Stacja';

@override
String get stations => 'Stations';
String get stations => 'Stacje';

@override
String get country => 'Kraj';
Expand Down Expand Up @@ -468,7 +468,7 @@ class AppLocalizationsPl extends AppLocalizations {
String get confirm => 'Confirm';

@override
String get confirmation => 'Confirmation';
String get confirmation => 'Potwierdzenie';

@override
String get isMaybeLowBandwidthDialogTitle => 'No WIFI/Ethernet';
Expand Down Expand Up @@ -932,7 +932,7 @@ class AppLocalizationsPl extends AppLocalizations {
String get reorder => 'Reorder';

@override
String get move => 'Move';
String get move => 'Przenieś';

@override
String get pinAlbum => 'Pin album to sidebar';
Expand Down Expand Up @@ -973,7 +973,7 @@ class AppLocalizationsPl extends AppLocalizations {
String get podcastName => 'Podcast name';

@override
String get url => 'Url';
String get url => 'Adres URL';

@override
String get loadFromFileOptional => 'Load from file (optional)';
Expand Down Expand Up @@ -1040,7 +1040,7 @@ class AppLocalizationsPl extends AppLocalizations {
'Set playlist name and add more titles later';

@override
String get or => 'or';
String get or => 'lub';

@override
String get loadMore => 'Load more';
Expand All @@ -1061,7 +1061,7 @@ class AppLocalizationsPl extends AppLocalizations {
String get language => 'Język';

@override
String get duration => 'Duration';
String get duration => 'Czas trwania';

@override
String get radioTagDisclaimerTitle => 'This station sends a lot of tags.';
Expand Down Expand Up @@ -1190,7 +1190,7 @@ class AppLocalizationsPl extends AppLocalizations {
'Ta funkcja jest aktualnie niedostępna dla tego systemu operacyjnego.';

@override
String get regionNone => 'None';
String get regionNone => 'Żaden';

@override
String get regionAfghanistan => 'Afganistan';
Expand All @@ -1202,13 +1202,13 @@ class AppLocalizationsPl extends AppLocalizations {
String get regionAlbania => 'Albania';

@override
String get regionAlgeria => 'Algeria';
String get regionAlgeria => 'Algieria';

@override
String get regionAmericansamoa => 'Americansamoa';

@override
String get regionAndorra => 'Andorra';
String get regionAndorra => 'Andora';

@override
String get regionAngolia => 'Angolia';
Expand Down Expand Up @@ -1978,7 +1978,7 @@ class AppLocalizationsPl extends AppLocalizations {
String get pinnedAlbums => 'Pinned albums';

@override
String get export => 'Export';
String get export => 'Eksport';

@override
String get import => 'Import';
Expand All @@ -1998,16 +1998,16 @@ class AppLocalizationsPl extends AppLocalizations {
'Do you want to reload the local audio directory?';

@override
String get external => 'external';
String get external => 'zewnętrzne';

@override
String get externalPlaylist => 'External playlist';

@override
String get pictures => 'Pictures';
String get pictures => 'Obrazy';

@override
String get localPictureTypeOther => 'Other';
String get localPictureTypeOther => 'Inne';

@override
String get localPictureTypeFileIcon32x32 => 'Icon 32x32';
Expand Down Expand Up @@ -2037,10 +2037,10 @@ class AppLocalizationsPl extends AppLocalizations {
String get localPictureTypeConductor => 'Conductor';

@override
String get localPictureTypeBandOrchestra => 'Band/Orchestra';
String get localPictureTypeBandOrchestra => 'Zespół/Orkiestra';

@override
String get localPictureTypeComposer => 'Composer';
String get localPictureTypeComposer => 'Kompozytor';

@override
String get localPictureTypeLyricistTextWriter => 'Lyricist/Text writer';
Expand Down Expand Up @@ -2080,7 +2080,7 @@ class AppLocalizationsPl extends AppLocalizations {
'You can\'t unpin albums without empty album metadata!';

@override
String get path => 'Path';
String get path => 'Ścieżka';

@override
String get albumNotFound =>
Expand All @@ -2099,7 +2099,7 @@ class AppLocalizationsPl extends AppLocalizations {
'The provided URL must exist on the radiobrowser server, otherwise it will not be added to you library! Ideally search for them in the radio feature and add them with the star button to your library!';

@override
String get disc => 'Disc';
String get disc => 'Dysk';

@override
String get groupAlbumsOnlyByAlbumName => 'Group albums only by album name';
Expand Down
Loading