Skip to content

Commit

Permalink
Don't load local assets with loading: true as default
Browse files Browse the repository at this point in the history
- Subsequent query will load images, if they're available
- Fixes #925
  • Loading branch information
jaedb committed Oct 10, 2023
1 parent 8dfd585 commit 5bef256
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/js/services/mopidy/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,6 @@ const MopidyMiddleware = (function () {
}

case 'MOPIDY_ENQUEUE_URIS': {
console.debug(action)
if (!action.uris || action.uris.length <= 0) {
this.props.uiActions.createNotification({
content: 'No URIs to enqueue',
Expand Down Expand Up @@ -1827,13 +1826,13 @@ const MopidyMiddleware = (function () {
if (item.__model__ === 'Track') {
tracks.push(formatTrack(item));
} else if (item.__model__ === 'Ref' && item.type === 'track') {
tracks.push(formatTrack({ ...item, loading: true }));
tracks.push(formatTrack(item));
trackUrisToLoad.push(item.uri);
} else if (item.__model__ === 'Ref' && item.type === 'album') {
subdirectories.push(formatAlbum({ ...item, loading: true }));
subdirectories.push(formatAlbum(item));
subdirectoryImagesToLoad.push(item.uri);
} else if (item.__model__ === 'Ref' && item.type === 'artist') {
subdirectories.push(formatArtist({ ...item, loading: true }));
subdirectories.push(formatArtist(item));
subdirectoryImagesToLoad.push(item.uri);
} else if (item.__model__ === 'Ref' && item.type === 'playlist') {
// Tidal moods and genres incorrectly marked as Playlist type
Expand All @@ -1846,7 +1845,7 @@ const MopidyMiddleware = (function () {
type: 'directory',
});
} else {
subdirectories.push(formatPlaylist({ ...item, loading: true }));
subdirectories.push(formatPlaylist(item));
subdirectoryImagesToLoad.push(item.uri);
playlistsToLoad.push(item.uri);
}
Expand Down

0 comments on commit 5bef256

Please sign in to comment.