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

Bugfix: Playlist view crashes when media list is undefined #922

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tobocop2
Copy link

@tobocop2 tobocop2 commented Nov 29, 2023

@mgogoulos

Description

Playlists with no media cannot be modified. If you create a playlist and do not add media to the playlist, there is a very loud error around the media list being undefined for the playlist. This fix adds some safety checks before attempting to view the playlist.

Steps

Pre-deploy

cd frontend
npm run dist
cp -ra dist/static/* ../static/

Post-deploy

Verify that an empty playlist can be modified in the UI.

@@ -98,14 +98,18 @@ export function PlaylistsSelection(props) {
let ret = [];
let i = 0;
while (i < playlists.length) {
Copy link
Author

Choose a reason for hiding this comment

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

@mgogoulos media_list is undefined for playlists with no media. This causes issues anytime this function is called and makes the playlist functionality non deterministic

@tobocop2
Copy link
Author

tobocop2 commented Dec 4, 2023

tagging for visibility @mgogoulos

@tobocop2 tobocop2 changed the title Fix bug with playlists and update static assets Bugfix: Playlist view crashes when media list is undefined Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant