Only include OpenMPT subsongs if they're 10 seconds or longer.
parent
75f0e677a8
commit
7cfcd87cf5
|
@ -63,12 +63,14 @@
|
||||||
int i;
|
int i;
|
||||||
int subsongs = mod->get_num_subsongs();
|
int subsongs = mod->get_num_subsongs();
|
||||||
|
|
||||||
delete mod;
|
|
||||||
|
|
||||||
for (i = 0; i < subsongs; ++i) {
|
for (i = 0; i < subsongs; ++i) {
|
||||||
|
mod->select_subsong(i);
|
||||||
|
if (mod->get_duration_seconds() < 10.0) continue;
|
||||||
[tracks addObject:[NSURL URLWithString:[[url absoluteString] stringByAppendingFormat:@"#%i", i]]];
|
[tracks addObject:[NSURL URLWithString:[[url absoluteString] stringByAppendingFormat:@"#%i", i]]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delete mod;
|
||||||
|
|
||||||
return tracks;
|
return tracks;
|
||||||
} catch ( std::exception & /*e*/ ) {
|
} catch ( std::exception & /*e*/ ) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue