-
Notifications
You must be signed in to change notification settings - Fork 1
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
Display futur musics shuffle #68
base: master
Are you sure you want to change the base?
Conversation
PlaylistTrack.objects.get(pk=pk, room=room).delete() | ||
p_track = PlaylistTrack.objects.get(pk=pk, room=room) | ||
p_track.delete() | ||
if p_track.track_type == PlaylistTrack.SHUFFLE: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using p_track after a delete() looks dangerous
+ commit migration for min/max value of shuffled musics + better playlist serialization
+ fix some crash on malformed url (top with a target crashed for exemple)
+ add test for playlistTrack change type (good and bad cases)
+ fix fill playlist shuffle on delete shuffle PT + typo
playlistTrack are now listed in the corresponding room
+ less messages sent + less BDD calls
SPT = shuffled playlistTrack NPT = normal playlisTrack + reactivation of filling SPT by music already in SPT (will probably change it again in futur but cause too many major problems for now)
+ preparation for dual list ordering (and changing playlistrack type)
…y-futur-musics-shuffle
return Response('"{}" action needs a target parameter'.format(action), status=status.HTTP_400_BAD_REQUEST) | ||
|
||
if action == 'changetype': | ||
if target not in {'NORMAL', 'SHUFFLE'}: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the choices constant
|
||
def test_change_playlistTrack_type(self): | ||
response = self.client.post('/playlist/%s/changetype/SHUFFLE' % self.pt.pk) | ||
print(response.data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rofl...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
…y-futur-musics-shuffle
* Not mergeable* !
Only open for commenting the code.