Skip to content

Commit

Permalink
Fix playlist init
Browse files Browse the repository at this point in the history
  • Loading branch information
jcraigk committed Nov 24, 2023
1 parent ad9b10d commit 1b870d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/playlists_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,9 @@ def clear_session
end

def init_session
return if session['playlist'].is_a?(Hash) # Ease into new session format
return if EMPTY_PLAYLIST.keys.all? { |key| session['playlist']&.key?(key) }
session['playlist'] = EMPTY_PLAYLIST.dup
session['playlist'] = session['playlist'].with_indifferent_access
session['playlist'] = session['playlist']
end

def shuffle_tracks
Expand Down

0 comments on commit 1b870d2

Please sign in to comment.