Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: disable album artists until lib fix #1099

Merged
merged 1 commit into from
Dec 16, 2024
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
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
Loading