diff options
Diffstat (limited to 'apps/tree.c')
-rw-r--r-- | apps/tree.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/apps/tree.c b/apps/tree.c index 90e978a0ab..7f0bf4362b 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -351,6 +351,7 @@ void start_resume(void) | |||
351 | play_list(global_settings.resume_file, | 351 | play_list(global_settings.resume_file, |
352 | slash+1, | 352 | slash+1, |
353 | global_settings.resume_index, | 353 | global_settings.resume_index, |
354 | true, /* the index is AFTER shuffle */ | ||
354 | global_settings.resume_offset, | 355 | global_settings.resume_offset, |
355 | global_settings.resume_seed ); | 356 | global_settings.resume_seed ); |
356 | *slash='/'; | 357 | *slash='/'; |
@@ -368,6 +369,7 @@ void start_resume(void) | |||
368 | play_list("/", | 369 | play_list("/", |
369 | global_settings.resume_file, | 370 | global_settings.resume_file, |
370 | global_settings.resume_index, | 371 | global_settings.resume_index, |
372 | true, | ||
371 | global_settings.resume_offset, | 373 | global_settings.resume_offset, |
372 | global_settings.resume_seed ); | 374 | global_settings.resume_seed ); |
373 | } | 375 | } |
@@ -381,7 +383,8 @@ void start_resume(void) | |||
381 | build_playlist(global_settings.resume_index); | 383 | build_playlist(global_settings.resume_index); |
382 | play_list(global_settings.resume_file, | 384 | play_list(global_settings.resume_file, |
383 | NULL, | 385 | NULL, |
384 | global_settings.resume_index, | 386 | global_settings.resume_index, |
387 | true, | ||
385 | global_settings.resume_offset, | 388 | global_settings.resume_offset, |
386 | global_settings.resume_seed); | 389 | global_settings.resume_seed); |
387 | } | 390 | } |
@@ -505,8 +508,10 @@ bool dirbrowse(char *root) | |||
505 | currdir, | 508 | currdir, |
506 | dircache[dircursor+start].name); | 509 | dircache[dircursor+start].name); |
507 | play_list(currdir, | 510 | play_list(currdir, |
508 | dircache[dircursor+start].name, | 511 | dircache[dircursor+start].name, |
509 | 0, 0, seed ); | 512 | 0, |
513 | false, | ||
514 | 0, seed ); | ||
510 | start_index = 0; | 515 | start_index = 0; |
511 | } | 516 | } |
512 | else { | 517 | else { |
@@ -514,10 +519,16 @@ bool dirbrowse(char *root) | |||
514 | strncpy(global_settings.resume_file, | 519 | strncpy(global_settings.resume_file, |
515 | currdir, MAX_PATH); | 520 | currdir, MAX_PATH); |
516 | start_index = build_playlist(dircursor+start); | 521 | start_index = build_playlist(dircursor+start); |
517 | play_list(currdir, NULL, start_index, 0, seed); | 522 | |
523 | /* it is important that we get back the index in | ||
524 | the (shuffled) list and stor that */ | ||
525 | start_index = play_list(currdir, NULL, | ||
526 | start_index, false, 0, seed); | ||
518 | } | 527 | } |
519 | 528 | ||
520 | if ( global_settings.resume ) { | 529 | if ( global_settings.resume ) { |
530 | /* the resume_index must always be the index in the | ||
531 | shuffled list in case shuffle is enabled */ | ||
521 | global_settings.resume_index = start_index; | 532 | global_settings.resume_index = start_index; |
522 | global_settings.resume_offset = 0; | 533 | global_settings.resume_offset = 0; |
523 | global_settings.resume_seed = seed; | 534 | global_settings.resume_seed = seed; |