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

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Hakerh400 committed Dec 18, 2018
1 parent fb96076 commit c4ff15e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions music-player/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ const O = require('../framework');
const readline = require('../readline');
const fsRec = require('../fs-recursive');

const SHUFFLE = 0;
const SHUFFLE = 1;
const SORT = !SHUFFLE;

const PROC_PRIORITY = 'realtime';

Expand Down Expand Up @@ -44,10 +45,8 @@ async function main(){
});
});

O.sortAsc(files);

if(SHUFFLE)
O.shuffle(files);
if(SORT) O.sortAsc(files);
if(SHUFFLE) O.shuffle(files);

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

0 comments on commit c4ff15e

Please sign in to comment.