Skip to content

Display futur musics shuffle#68

Open
Tantrisse wants to merge 23 commits intomasterfrom
Display-futur-musics-shuffle
Open

Display futur musics shuffle#68
Tantrisse wants to merge 23 commits intomasterfrom
Display-futur-musics-shuffle

Conversation

@Tantrisse
Copy link
Copy Markdown
Collaborator

@Tantrisse Tantrisse commented Jul 12, 2016

* Not mergeable* !

Only open for commenting the code.

@Tantrisse Tantrisse closed this Jul 12, 2016
Comment thread endpoints/playlist.py Outdated
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:
Copy link
Copy Markdown
Owner

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
@Tantrisse Tantrisse reopened this Jul 12, 2016
@Tantrisse Tantrisse closed this Jul 12, 2016
@Tantrisse Tantrisse reopened this Jul 12, 2016
Tantrisse added 15 commits July 13, 2016 15:02
+ 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)
Comment thread endpoints/playlist.py Outdated
return Response('"{}" action needs a target parameter'.format(action), status=status.HTTP_400_BAD_REQUEST)

if action == 'changetype':
if target not in {'NORMAL', 'SHUFFLE'}:
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Use the choices constant

Comment thread endpoints/tests/test_playlist.py Outdated

def test_change_playlistTrack_type(self):
response = self.client.post('/playlist/%s/changetype/SHUFFLE' % self.pt.pk)
print(response.data)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

:D

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Rofl...

Copy link
Copy Markdown
Owner

@Amoki Amoki left a comment

Choose a reason for hiding this comment

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

👍

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.

2 participants