Skip to content
This repository was archived by the owner on Oct 14, 2021. It is now read-only.

Commit c4ff15e

Browse files
committed
commit
1 parent fb96076 commit c4ff15e

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

music-player/main.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ const O = require('../framework');
77
const readline = require('../readline');
88
const fsRec = require('../fs-recursive');
99

10-
const SHUFFLE = 0;
10+
const SHUFFLE = 1;
11+
const SORT = !SHUFFLE;
1112

1213
const PROC_PRIORITY = 'realtime';
1314

@@ -44,10 +45,8 @@ async function main(){
4445
});
4546
});
4647

47-
O.sortAsc(files);
48-
49-
if(SHUFFLE)
50-
O.shuffle(files);
48+
if(SORT) O.sortAsc(files);
49+
if(SHUFFLE) O.shuffle(files);
5150

5251
while(index < files.length && !shouldExit){
5352
if(index < 0) index = 0;

0 commit comments

Comments
 (0)