|
@@ -40,7 +40,7 @@ class ShowController extends Controller
|
40
|
40
|
));
|
41
|
41
|
}
|
42
|
42
|
|
43
|
|
- public function getAutoplayDataAction($playlist_id, $offset = null)
|
|
43
|
+ public function getAutoplayDataAction($playlist_id, $offset = null, $shuffle = false)
|
44
|
44
|
{
|
45
|
45
|
if (($uncondition = $this->userHaveNonConditionToMakeAction(SecurityContext::ACTION_PLAYLIST_DATA_AUTOPLAY)) !== false)
|
46
|
46
|
return $this->jsonResponseError($uncondition);
|
|
@@ -51,6 +51,9 @@ class ShowController extends Controller
|
51
|
51
|
|
52
|
52
|
$autoplaym = new AutoplayManager($playlist_manager->getPlaylistElements($playlist, $offset), $this->container);
|
53
|
53
|
|
|
54
|
+ if ($shuffle)
|
|
55
|
+ $autoplaym->shuffle();
|
|
56
|
+
|
54
|
57
|
return $this->jsonResponse(array(
|
55
|
58
|
'status' => 'success',
|
56
|
59
|
'data' => $autoplaym->getList()
|