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

Display futur musics shuffle #68

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

Tantrisse
Copy link
Collaborator

@Tantrisse Tantrisse commented Jul 12, 2016

* Not mergeable* !

Only open for commenting the code.

@Tantrisse Tantrisse closed this Jul 12, 2016
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
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)
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
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


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

Choose a reason for hiding this comment

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

:D

Copy link
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
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