Skip to content

Commit

Permalink
chore: disable album artists until lib fix (#1099)
Browse files Browse the repository at this point in the history
Ref #339
  • Loading branch information
Feichtmeier authored Dec 16, 2024
1 parent 161d31b commit e30236a
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 23 deletions.
19 changes: 7 additions & 12 deletions lib/app/view/master_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,13 @@ class MasterTile extends StatelessWidget {

@override
Widget build(BuildContext context) {
final yaruMasterTile = Padding(
padding: pageId == kLocalAudioPageId
? const EdgeInsets.only(top: 5)
: EdgeInsets.zero,
child: YaruMasterTile(
title: title,
onTap: onTap,
selected: selected,
leading: leading,
subtitle: subtitle,
trailing: trailing,
),
final yaruMasterTile = YaruMasterTile(
title: title,
onTap: onTap,
selected: selected,
leading: leading,
subtitle: subtitle,
trailing: trailing,
);

final Widget tile;
Expand Down
4 changes: 2 additions & 2 deletions lib/common/data/audio.dart
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ class Audio {
artist: data.artist,
title: (data.title?.isNotEmpty == true ? data.title : fileName) ?? path,
album: data.album,
albumArtist:
data.performers.isEmpty ? data.artist : data.performers.toString(),
// TODO(#339): wait for fix
albumArtist: data.artist,
discNumber: data.discNumber,
discTotal: data.totalDisc,
durationMs: data.duration?.inMilliseconds.toDouble(),
Expand Down
5 changes: 4 additions & 1 deletion lib/local_audio/local_audio_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ class LocalAudioModel extends SafeChangeNotifier {
bool forceInit = false,
String? directory,
}) async {
_localAudioIndex = _settingsService.localAudioIndex;
_localAudioIndex =
_settingsService.localAudioIndex > LocalAudioView.values.length - 1
? 0
: _settingsService.localAudioIndex;
await _localAudioService.init(
forceInit: forceInit,
directory: directory,
Expand Down
4 changes: 2 additions & 2 deletions lib/local_audio/local_audio_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import '../l10n/l10n.dart';
enum LocalAudioView {
titles,
artists,
albumArtists,
// albumArtists,
albums,
genres,
playlists;

String localize(AppLocalizations l10n) => switch (this) {
titles => l10n.titles,
artists => l10n.artists,
albumArtists => l10n.albumArtists,
// albumArtists => l10n.albumArtists,
albums => l10n.albums,
genres => l10n.genres,
playlists => l10n.playlists,
Expand Down
10 changes: 5 additions & 5 deletions lib/local_audio/view/local_audio_body.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ class LocalAudioBody extends StatelessWidget {
noResultMessage: noResultMessage,
noResultIcon: noResultIcon,
),
LocalAudioView.albumArtists => AlbumArtistsView(
albumArtists: albumArtists,
noResultMessage: noResultMessage,
noResultIcon: noResultIcon,
),
// LocalAudioView.albumArtists => AlbumArtistsView(
// albumArtists: albumArtists,
// noResultMessage: noResultMessage,
// noResultIcon: noResultIcon,
// ),
LocalAudioView.albums => AlbumsView(
albums: albums,
noResultMessage: noResultMessage,
Expand Down
2 changes: 1 addition & 1 deletion lib/search/view/sliver_local_search_results.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class _SliverLocalSearchResultState extends State<SliverLocalSearchResult> {
(SearchModel m) => switch (m.searchType) {
SearchType.localAlbum => LocalAudioView.albums,
SearchType.localArtist => LocalAudioView.artists,
SearchType.localAlbumArtist => LocalAudioView.albumArtists,
// SearchType.localAlbumArtist => LocalAudioView.albumArtists,
SearchType.localTitle => LocalAudioView.titles,
SearchType.localGenreName => LocalAudioView.genres,
_ => LocalAudioView.playlists,
Expand Down

0 comments on commit e30236a

Please sign in to comment.