Skip to content

Commit

Permalink
Prevent crash if bandLogo is somehow null (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
kbuffington committed Mar 1, 2022
1 parent 4fb5416 commit dd025f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/georgia-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1598,7 +1598,7 @@ function on_playback_new_track(metadb) {
}
}
invertedBandLogo = artCache.getImage(`${path}-inv`);
if (!invertedBandLogo) {
if (!invertedBandLogo && bandLogo) {
invertedBandLogo = artCache.encache(bandLogo.InvertColours(), `${path}-inv`);
}
}
Expand Down

2 comments on commit dd025f2

@TT-ReBORN
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kbuffington,

Btw, since event handling has changed in SMP 1.6.1 we have an annoying bug when using playlist smooth scroll and reordering playlist items
( e.g drag track 03 beneath track 04, playlist must have scrollbar ).
When doing that, smooth scroll makes an annoying scroll jump, called by:

this.scrollbar.smooth_scroll_to(new_scroll_pos);

-TT

@TT-ReBORN
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kbuffington,

I have great news, the huge on_size() performance killer is finally gone, this will also benefit your Georgia theme.
I figured out how to reposition the playlist without a full playlist init, this took me too long to figure out.
The playlist code is still very confusing to me, why it was split ( Control_List.js, Control_Scrollbar.js and Panel_Playlist.js ) and coded like this...
Anyways when I finally release my new update, you can test it for yourself and adapt it to yours...


Need to figure out now how to fix the annoying scroll jump when reordering playlist items as described above.
I guess it has to do with the smooth scroll timer... Maybe you can lend me a hand :-)

-TT

Please sign in to comment.