diff --git a/ambience/meta.json b/ambience/meta.json index d610d853..4e1179f0 100644 --- a/ambience/meta.json +++ b/ambience/meta.json @@ -1,5 +1,5 @@ { - "modified": 1671363997000, + "modified": 1671570872000, "tracks": [ { "id": "F-CU7SomBvo", diff --git a/bin/audio.dart b/bin/audio.dart index fb595baa..805a85ab 100644 --- a/bin/audio.dart +++ b/bin/audio.dart @@ -6,9 +6,15 @@ import 'package:ambience/server/playlists.dart'; final PlaylistCollection collection = PlaylistCollection(Directory('ambience')); Future loadAmbience() async { - await collection.reload(); - await collection.sync(); - _customTrackMeta(); + await collection.loadMeta(); + try { + await collection.readSource(); + await collection.sync(); + _customTrackMeta(); + } on ProcessException catch (e) { + print('Unable to refresh playlists because ' + '"${e.executable}" is not installed or outdated.'); + } } void _customTrackMeta() { diff --git a/bin/server.dart b/bin/server.dart index f8464824..1b7631ec 100644 --- a/bin/server.dart +++ b/bin/server.dart @@ -124,17 +124,10 @@ void run(List args) async { await createAssetPreview('web/images/assets/scene', zoomIn: true); if (Environment.enableMusic) { - try { - await loadAmbience(); - print('Background music up to date'); - } on Exception catch (e) { - print(e.toString()); - print('Failed to extract background music sources.' - ' If you require the integrated music player,' - ' make sure you have yt-dlp and ffmpeg installed.'); - } + await loadAmbience(); + print('Loaded music playlists'); } else { - print('Music player not enabled'); + print('Music playlists not enabled'); } print('''\nDungeon Club is ready!