Skip to content

Commit

Permalink
fix: Stuck on loading screen if local music library source is unavai…
Browse files Browse the repository at this point in the history
…lable (#798)

* fix: Stuck on loading screen if local music library source is unavailable [macos]
Fixes #797

* fix: use important button
  • Loading branch information
Feichtmeier authored Jul 13, 2024
1 parent 793123f commit 76a0e26
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 16 deletions.
2 changes: 1 addition & 1 deletion lib/src/local_audio/local_audio_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ FutureOr<ImportResult> _init(String? directory) async {
Set<Audio> newAudios = {};
List<String> failedImports = [];

if (directory != null) {
if (directory != null && Directory(directory).existsSync()) {
for (var e in Directory(directory)
.listSync(recursive: true, followLinks: false)
.whereType<File>()
Expand Down
2 changes: 1 addition & 1 deletion lib/src/local_audio/view/local_audio_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class _LocalAudioPageState extends State<LocalAudioPage> {
const SizedBox(
height: kYaruPagePadding,
),
ElevatedButton(
ImportantButton(
child: Text(context.l10n.settings),
onPressed: () {
showDialog(
Expand Down
14 changes: 0 additions & 14 deletions needs_translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1667,20 +1667,6 @@
"duration"
],

"tr": [
"fullScreen",
"leaveFullScreen",
"copyToClipBoard",
"insertedIntoQueue",
"loadMore",
"searchOnline",
"shareThisEpisode",
"downloadEpisode",
"removeDownloadEpisode",
"language",
"duration"
],

"zh": [
"shuffle",
"repeat",
Expand Down

0 comments on commit 76a0e26

Please sign in to comment.