Skip to content

Commit

Permalink
checks for duplicates
Browse files Browse the repository at this point in the history
  • Loading branch information
elpoeprod committed Nov 5, 2024
1 parent c4643f4 commit 75283af
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions elpAudio/scripts/GetMusicFromFolder.gml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ if directory_exists(global.dirr) {
// ALL FILES
mus[0]=file_find_first(global.dirr+exts,findfile);
if mus[0]!='' {
if FileIsSupported(mus[0]) ds_list_add(global.list,global.dirr+mus[0]);
if FileIsSupported(mus[0]) {ii=0 rep=0 repeat(ds_list_size(global.list)) {if ds_list_find_value(global.list,ii)==global.dirr+mus[0] rep=1 ii+=1} if !rep ds_list_add(global.list,global.dirr+mus[0])};
repeat(2048) {
mus[i]=file_find_next();
if mus[i]!='' {
if FileIsSupported(mus[i]) ds_list_add(global.list,global.dirr+mus[i]);
if FileIsSupported(mus[i]) {ii=0 rep=0 repeat(ds_list_size(global.list)) {if ds_list_find_value(global.list,ii)==global.dirr+mus[i] rep=1 ii+=1} if !rep ds_list_add(global.list,global.dirr+mus[i])};
i+=1
} else break;
}
}
file_find_close()
global.thesong=ds_list_find_value(global.list,0)
}

0 comments on commit 75283af

Please sign in to comment.